Permalink
Browse files

Removed the unfinished and obsolete battle event system.

When I'll add one, it won't be likely done like that anyway.
  • Loading branch information...
1 parent 8756da9 commit 5e6afc361b1680eaaad5b79dde7761533b71398d Yohann Ferreira committed Sep 20, 2012
View
@@ -1,29 +0,0 @@
-------------------------------------------------------------------------------[[
--- Filename: battle_events.lua
---
--- Description: This file contains the definitions of all scripted events in
--- battles, generally to be used for boss battles.
-------------------------------------------------------------------------------]]
-
--- All item definitions are stored in this table
-if (battle_events == nil) then
- battle_events = {}
-end
-
-battle_events[1] = {
- name = "Duel with Kyle",
- --TODO: Add dialogue!
-
- Before = function(bat_mode)
- end,
-
- During = function(bat_mode)
- end,
-
- After = function(bat_mode)
- bat_mode:AddDialogue("Kyle", "Do you really think it's going to matter if I take a little treasure? I just want enough to start a new life, away from this servitude. Can't you understand that?");
- bat_mode:AddDialogue("Claudius", "You’ve tarnished your honor and disgraced the Harrvahan knighthood!");
- bat_mode:AddDialogue("Kyle", "To hell with the knighthood!");
- bat_mode:ShowDialogue();
- end
-}
@@ -125,9 +125,6 @@ GameGlobal::~GameGlobal() {
_map_sprites_script.CloseFile();
_map_objects_script.CloseFile();
_map_treasures_script.CloseFile();
-
- _battle_events_script.CloseTable();
- _battle_events_script.CloseFile();
} // GameGlobal::~GameGlobal()
bool GameGlobal::SingletonInitialize() {
@@ -198,12 +195,6 @@ bool GameGlobal::SingletonInitialize() {
if (!_map_treasures_script.OpenFile("dat/actors/map_treasures.lua"))
return false;
-
- if (_battle_events_script.OpenFile("dat/battle_events.lua") == false) {
- return false;
- }
- _battle_events_script.OpenTable("battle_events");
-
return true;
} // bool GameGlobal::SingletonInitialize()
@@ -525,9 +525,6 @@ class GameGlobal : public hoa_utils::Singleton<GameGlobal> {
hoa_script::ReadScriptDescriptor& GetStatusEffectsScript()
{ return _status_effects_script; }
- hoa_script::ReadScriptDescriptor* GetBattleEventScript()
- { return &_battle_events_script; }
-
hoa_script::ReadScriptDescriptor& GetMapSpriteScript()
{ return _map_sprites_script; }
//@}
@@ -671,9 +668,6 @@ class GameGlobal : public hoa_utils::Singleton<GameGlobal> {
//! \brief Contains data and functional definitions for map treasures seen in game maps
hoa_script::ReadScriptDescriptor _map_treasures_script;
-
- //! \brief Contains data and functional definitions for scripted events in key game battles
- hoa_script::ReadScriptDescriptor _battle_events_script;
//@}
/** \brief The container which stores all of the groups of events that have occured in the game
@@ -607,9 +607,6 @@ void BattleMode::ChangeState(BATTLE_STATE new_state) {
_actor_state_paused = true;
}
break;
- case BATTLE_STATE_EVENT:
- // TODO
- break;
case BATTLE_STATE_VICTORY:
// Official victory:
// Cancel all character actions to free possible involved objects
@@ -79,11 +79,10 @@ enum BATTLE_STATE {
BATTLE_STATE_INITIAL = 0, //!< Character sprites are running in from off-screen to their battle positions
BATTLE_STATE_NORMAL = 1, //!< Normal state where player is watching actions play out and waiting for a turn
BATTLE_STATE_COMMAND = 2, //!< Player is choosing a command for a character
- BATTLE_STATE_EVENT = 3, //!< A scripted event is taking place, suspending all standard action
- BATTLE_STATE_VICTORY = 4, //!< Battle has ended with the characters victorious
- BATTLE_STATE_DEFEAT = 5, //!< Battle has ended with the characters defeated
- BATTLE_STATE_EXITING = 6, //!< Player has closed battle windows and battle mode is fading out
- BATTLE_STATE_TOTAL = 7
+ BATTLE_STATE_VICTORY = 3, //!< Battle has ended with the characters victorious
+ BATTLE_STATE_DEFEAT = 4, //!< Battle has ended with the characters defeated
+ BATTLE_STATE_EXITING = 5, //!< Player has closed battle windows and battle mode is fading out
+ BATTLE_STATE_TOTAL = 6
};
@@ -622,7 +622,6 @@ void BindModeCode() {
luabind::value("BATTLE_STATE_INITIAL", BATTLE_STATE_INITIAL),
luabind::value("BATTLE_STATE_NORMAL", BATTLE_STATE_NORMAL),
luabind::value("BATTLE_STATE_COMMAND", BATTLE_STATE_COMMAND),
- luabind::value("BATTLE_STATE_EVENT", BATTLE_STATE_EVENT),
luabind::value("BATTLE_STATE_VICTORY", BATTLE_STATE_VICTORY),
luabind::value("BATTLE_STATE_DEFEAT", BATTLE_STATE_DEFEAT),
luabind::value("BATTLE_STATE_EXITING", BATTLE_STATE_EXITING),

0 comments on commit 5e6afc3

Please sign in to comment.