mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added AI checks for regeneration in AF Destroy and DealDamage.
This commit is contained in:
@@ -314,6 +314,7 @@ public class AbilityFactory_DealDamage {
|
|||||||
CardList killables = hPlay.filter(new CardListFilter() {
|
CardList killables = hPlay.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
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);
|
&& !(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?
|
// TODO: filter out things that could regenerate in response? might be tougher?
|
||||||
list = list.filter(new CardListFilter() {
|
list = list.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
return c.getShield() == 0;
|
return (c.getShield() == 0 && !ComputerUtil.canRegenerate(c));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user