fix AiAttack with CHOSEN_FOG_EFFECT

This commit is contained in:
Hanmac
2018-05-06 08:49:29 +02:00
parent 94a9597963
commit 4cf79222f0

View File

@@ -267,9 +267,15 @@ public class AiAttackController {
// no need to block (already holding mana to cast fog next turn)
if (!AiCardMemory.isMemorySetEmpty(ai, AiCardMemory.MemorySet.CHOSEN_FOG_EFFECT)) {
// Don't send the card that'll do the fog effect to attack, it's unsafe!
if (attackers.contains(AiCardMemory.MemorySet.CHOSEN_FOG_EFFECT)) {
attackers.remove(AiCardMemory.MemorySet.CHOSEN_FOG_EFFECT);
List<Card> toRemove = Lists.newArrayList();
for(Card c : attackers) {
if (AiCardMemory.isRememberedCard(ai, c, AiCardMemory.MemorySet.CHOSEN_FOG_EFFECT)) {
toRemove.add(c);
}
}
attackers.removeAll(toRemove);
return attackers;
}