bool Game_Interpreter_Map::ContinuationEnemyEncounter(RPG::EventCommand const& com) { continuation = NULL; switch (Game_Temp::battle_result) { case Game_Temp::BattleVictory: if ((Game_Temp::battle_defeat_mode == 0 && Game_Temp::battle_escape_mode != 2) || !SkipTo(Cmd::VictoryHandler, Cmd::EndBattle)) { index++; return false; } index++; return true; case Game_Temp::BattleEscape: switch (Game_Temp::battle_escape_mode) { case 0: // disallowed - shouldn't happen return true; case 1: return CommandEndEventProcessing(com); case 2: if (!SkipTo(Cmd::EscapeHandler, Cmd::EndBattle)) { index++; return false; } index++; return true; default: return false; } case Game_Temp::BattleDefeat: switch (Game_Temp::battle_defeat_mode) { case 0: return CommandGameOver(com); case 1: if (!SkipTo(Cmd::DefeatHandler, Cmd::EndBattle)) { index++; return false; } index++; return true; default: return false; } case Game_Temp::BattleAbort: if (!SkipTo(Cmd::EndBattle)) { index++; return false; } index++; return true; default: return false; } }
// Execute Command. bool Game_Interpreter::ExecuteCommand() { RPG::EventCommand const& com = list[index]; switch (com.code) { case Cmd::ShowMessage: return CommandShowMessage(com); case Cmd::ChangeFaceGraphic: return CommandChangeFaceGraphic(com); case Cmd::ShowChoice: return CommandShowChoices(com); case Cmd::ShowChoiceOption: return SkipTo(Cmd::ShowChoiceEnd); case Cmd::ShowChoiceEnd: return true; case Cmd::InputNumber: return CommandInputNumber(com); case Cmd::ControlSwitches: return CommandControlSwitches(com); case Cmd::ControlVars: return CommandControlVariables(com); case Cmd::ChangeGold: return CommandChangeGold(com); case Cmd::ChangeItems: return CommandChangeItems(com); case Cmd::ChangePartyMembers: return CommandChangePartyMember(com); case Cmd::ChangeLevel: return CommandChangeLevel(com); case Cmd::ChangeSkills: return CommandChangeSkills(com); case Cmd::ChangeEquipment: return CommandChangeEquipment(com); case Cmd::ChangeHP: return CommandChangeHP(com); case Cmd::ChangeSP: return CommandChangeSP(com); case Cmd::ChangeCondition: return CommandChangeCondition(com); case Cmd::FullHeal: return CommandFullHeal(com); case Cmd::TintScreen: return CommandTintScreen(com); case Cmd::FlashScreen: return CommandFlashScreen(com); case Cmd::ShakeScreen: return CommandShakeScreen(com); case Cmd::Wait: return CommandWait(com); case Cmd::PlayBGM: return CommandPlayBGM(com); case Cmd::FadeOutBGM: return CommandFadeOutBGM(com); case Cmd::PlaySound: return CommandPlaySound(com); case Cmd::EndEventProcessing: return CommandEndEventProcessing(com); case Cmd::Comment: case Cmd::Comment_2: return true; case Cmd::GameOver: return CommandGameOver(com); default: return true; } }