- Fixed a possible NPE caused by Scars of the Veteran.

This commit is contained in:
Sloth
2014-03-28 21:24:03 +00:00
parent 624133a1af
commit f1eb3b9251

View File

@@ -913,7 +913,9 @@ public class Player extends GameEntity implements Comparable<Player> {
if (apiIsEffect) { if (apiIsEffect) {
List<Card> newCardsInCommand = this.getGame().getCardsIn(ZoneType.Command); List<Card> newCardsInCommand = this.getGame().getCardsIn(ZoneType.Command);
newCardsInCommand.removeAll(cardsInCommand); newCardsInCommand.removeAll(cardsInCommand);
newCardsInCommand.get(0).setSVar("PreventedDamage", "Number$" + Integer.toString(dmgToBePrevented)); if (!newCardsInCommand.isEmpty()) {
newCardsInCommand.get(0).setSVar("PreventedDamage", "Number$" + Integer.toString(dmgToBePrevented));
}
} }
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage); this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
restDamage = restDamage - dmgToBePrevented; restDamage = restDamage - dmgToBePrevented;