mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Improved shouldPumpCard for cases where the opposing combatant can't be damaged anyway.
This commit is contained in:
@@ -468,7 +468,8 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
|||||||
List<Card> blockedBy = combat.getAttackersBlockedBy(c);
|
List<Card> blockedBy = combat.getAttackersBlockedBy(c);
|
||||||
// For now, Only care the first creature blocked by a card.
|
// For now, Only care the first creature blocked by a card.
|
||||||
// TODO Add in better BlockAdditional support
|
// TODO Add in better BlockAdditional support
|
||||||
if (!blockedBy.isEmpty() && attack > 0 && !ComputerUtilCombat.attackerWouldBeDestroyed(ai, blockedBy.get(0), combat)) {
|
if (!blockedBy.isEmpty() && attack > 0 && !ComputerUtilCombat.attackerWouldBeDestroyed(ai, blockedBy.get(0), combat)
|
||||||
|
&& blockedBy.get(0).staticDamagePrevention(99, c, true, true) > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -485,7 +486,8 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
|||||||
&& combat.isBlocked(c)
|
&& combat.isBlocked(c)
|
||||||
&& combat.getBlockers(c) != null
|
&& combat.getBlockers(c) != null
|
||||||
&& !combat.getBlockers(c).isEmpty()
|
&& !combat.getBlockers(c).isEmpty()
|
||||||
&& !ComputerUtilCombat.blockerWouldBeDestroyed(ai, combat.getBlockers(c).get(0), combat)) {
|
&& !ComputerUtilCombat.blockerWouldBeDestroyed(ai, combat.getBlockers(c).get(0), combat)
|
||||||
|
&& combat.getBlockers(c).get(0).staticDamagePrevention(99, c, true, true) > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user