- check for regeneration shields when using curses to deal lethal damage

This commit is contained in:
excessum
2014-04-30 14:11:07 +00:00
parent 85883108ca
commit 6e0a528c41

View File

@@ -1413,13 +1413,13 @@ public class ComputerUtil {
if (o instanceof Card) { if (o instanceof Card) {
final Card c = (Card) o; final Card c = (Card) o;
final boolean canRemove = (c.getNetDefense() <= dmg) final boolean canRemove = (c.getNetDefense() <= dmg)
|| (!c.hasKeyword("Indestructible") && (dmg >= ComputerUtilCombat.getDamageToKill(c))); || (!c.hasKeyword("Indestructible") && c.getShield().isEmpty() && (dmg >= ComputerUtilCombat.getDamageToKill(c)));
if (!canRemove) { if (!canRemove) {
continue; continue;
} }
if (saviourApi == ApiType.Pump) { if (saviourApi == ApiType.Pump) {
final boolean cantSave = c.getNetDefense() + defense <= dmg final boolean cantSave = c.getNetDefense() + defense <= dmg
|| (!c.hasKeyword("Indestructible") && !grantIndestructible || (!c.hasKeyword("Indestructible") && c.getShield().isEmpty() && !grantIndestructible
&& (dmg >= defense + ComputerUtilCombat.getDamageToKill(c))); && (dmg >= defense + ComputerUtilCombat.getDamageToKill(c)));
if (cantSave && (tgt == null || !grantShroud)) { if (cantSave && (tgt == null || !grantShroud)) {
continue; continue;