Skip to content

Commit

Permalink
Fix IsAllEnemyBetterThanValue (IceYGO#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind2009-Louse authored and mercury233 committed Sep 1, 2018
1 parent 5073eed commit 9897132
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Game/AI/AIFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public bool IsOneEnemyBetterThanValue(int value, bool onlyATK)

public bool IsAllEnemyBetterThanValue(int value, bool onlyATK)
{
return Enemy.MonsterZone.GetMonsters()
List<ClientCard> monsters = Enemy.MonsterZone.GetMonsters();
return monsters.Count > 0 && monsters
.All(card => card.GetDefensePower() > value && (!onlyATK || card.IsAttack()));
}

Expand Down

0 comments on commit 9897132

Please sign in to comment.