static public void Update(GameTime gt) { bBattleWon = objective.ObjectiveReached(encounterGroups); bIsRunning = bBattleWon; if (EncounterObjective.Lost(objective)) { CombatProcessor.bLostBattle = true; } if (bBattleWon && !CombatProcessor.bAfterBattleScreen) { CombatProcessor.InitiateVictory(); } else if (!bBattleWon) { LUA.LuaBScriptEvent.msTime = gt.ElapsedGameTime.Milliseconds; if (bGenerateLuaTurnInfo) { turnSetInfo = currentTurn().toLuaTurnSetInfo(); bGenerateLuaTurnInfo = false; } BattleScriptHandler.Execute(LUA.LuaBScriptEvent.EventType.updateEV, turnSetInfo); encounterGroups[currentGroupIndex].Update(); } }
internal static bool Lost(EncounterObjective objective) { if (PlayerSaveData.heroParty.FindAll(h => h.IsAlive()).Count == 0) { return(true); } return(false); }