Example #1
0
 /// <summary>
 /// Frame Update (main phase step 1 : action preparation)
 /// </summary>
 void UpdatePhase4Step1()
 {
     // Hide help window
     helpWindow.IsVisible = false;
     // Determine win/loss
     if (IsJudged())
     {
         // If won, or if lost : end method
         return;
     }
     // If an action forcing Battler doesn't exist
     if (InGame.Temp.ForcingBattler == null)
     {
         // Set up battle event
         SetupBattleEvent();
         // If battle event is running
         if (InGame.Temp.BattleInterpreter.IsRunning)
         {
             return;
         }
     }
     // If an action forcing Battler exists
     if (InGame.Temp.ForcingBattler != null)
     {
         // Add to head, or move
         actionBattlers.Remove(InGame.Temp.ForcingBattler);
         actionBattlers.Insert(0, InGame.Temp.ForcingBattler);
     }
     // If no actionless battlers exist (all have performed an action)
     if (actionBattlers.Count == 0)
     {
         // Start party command phase
         StartPhase2();
         return;
     }
     // Initialize Animation ID and common event ID
     animation1Id = 0;
     animation2Id = 0;
     commonEventId = 0;
     // Shift from head of actionless battlers
     activeBattler = actionBattlers[0];
     actionBattlers.RemoveAt(0);
     // If already removed from battle
     /*
     if (active_battler.index == null)
     {
         return;
     }*/
     // Slip damage
     if (activeBattler.Hp > 0 && activeBattler.IsSlipDamage)
     {
         activeBattler.SlipDamageEffect();
         activeBattler.IsDamagePop = true;
     }
     // Natural removal of states
     activeBattler.RemoveStatesAuto();
     // Refresh status window
     statusWindow.Refresh();
     // Shift to step 2
     phase4Step = 2;
 }