Commit 98971329 authored by wind2009's avatar wind2009 Committed by mercury233

Fix IsAllEnemyBetterThanValue (#101)

parent 5073eed4
......@@ -74,7 +74,8 @@ namespace WindBot.Game.AI
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()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment