- Added AI checks for regeneration in AF Destroy and DealDamage.

This commit is contained in:
jendave
2011-08-07 00:44:23 +00:00
parent 76bc152f0d
commit eefe3ae509
2 changed files with 3 additions and 2 deletions

View File

@@ -313,7 +313,8 @@ public class AbilityFactory_DealDamage {
CardList killables = hPlay.filter(new CardListFilter() {
public boolean addCard(Card c) {
return (c.getEnoughDamageToKill(d, source, false, noPrevention) <= d )
return (c.getEnoughDamageToKill(d, source, false, noPrevention) <= d )
&& !ComputerUtil.canRegenerate(c)
&& !(c.getSVar("SacMe").length() > 0);
}
});

View File

@@ -130,7 +130,7 @@ public class AbilityFactory_Destroy {
// TODO: filter out things that could regenerate in response? might be tougher?
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.getShield() == 0;
return (c.getShield() == 0 && !ComputerUtil.canRegenerate(c));
}
});
}