Example #1
0
 private void PerformAttack(IPokemon pokemon, IAttack attack, IPokemon target)
 {
     if (pokemon.IsAbleToAttackAfterConditionEffect())
     {
         if (pokemon.IsAbleToAttack())
         {
             _battleLogController.SetText($"{pokemon.Name} used {attack.Name}");
             ExecuteAttack(pokemon, attack, target);
             ExecuteAfterAttackAdditionalEffects(pokemon, attack, target);
             ExecuteChangeStatsAfterAttack(pokemon, attack, target);
         }
     }
 }