mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Added AI checks for regeneration in AF Destroy and DealDamage.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user