- Little touch-up for -X/-0 spells.

This commit is contained in:
Sloth
2012-07-19 19:29:27 +00:00
parent 7e721da1da
commit b0bd1e6d72

View File

@@ -650,7 +650,8 @@ public class AbilityFactoryPump {
} }
}); // leaves all creatures that will be destroyed }); // leaves all creatures that will be destroyed
} // -X/-X end } // -X/-X end
else if ((attack < 0) && !list.isEmpty()) { else if ((attack < 0) && !list.isEmpty()
&& !Singletons.getModel().getGameState().getPhaseHandler().isPreventCombatDamageThisTurn()) {
// spells that give -X/0 // spells that give -X/0
Player activePlayer = Singletons.getModel().getGameState().getPhaseHandler().getPlayerTurn(); Player activePlayer = Singletons.getModel().getGameState().getPhaseHandler().getPlayerTurn();
if (activePlayer.isComputer()) { if (activePlayer.isComputer()) {
@@ -666,7 +667,17 @@ public class AbilityFactoryPump {
list = list.filter(new CardListFilter() { list = list.filter(new CardListFilter() {
@Override @Override
public boolean addCard(final Card c) { public boolean addCard(final Card c) {
return c.isAttacking(); if (!c.isAttacking()) {
return false;
}
if (c.getNetAttack() > 0 && AllZone.getComputerPlayer().getLife() < 5) {
return true;
}
//Don't waste a -7/-0 spell on a 1/1 creature
if (c.getNetAttack() + attack > -2 || c.getNetAttack() > 3) {
return true;
}
return false;
} }
}); });
} else { } else {