Exemplo n.º 1
0
 void ResolveFleeState()
 {
     if (battleControl.battleType == BattleType.WildFleeable)
     {
         battleDialogue.AddToMessages("You tried to flee...");
         if (battleControl.TryToFlee())
         {
             battleDialogue.AddToMessages("You fled from battle!");
             AdvanceState(TurnState.BattleEnding);
         }
         else
         {
             firstToGo  = battleControl.playerMon;
             secondToGo = battleControl.enemyMon;
             battleDialogue.AddToMessages("Couldn't get away!");
             battleControl.SelectEnemyMove();
             AdvanceState(TurnState.FaintCheck);
         }
     }
     else
     {
         if (battleControl.battleType == BattleType.Trainer)
         {
             battleDialogue.AddToMessages("Can't flee from a trainer battle!");
         }
         else
         {
             battleDialogue.AddToMessages("Can't flee from this battle!");
         }
         firstToGo  = battleControl.playerMon;
         secondToGo = battleControl.enemyMon;
         battleControl.SelectEnemyMove();
         AdvanceState(TurnState.FaintCheck);
     }
 }