- Fix for attempting to put counters on a token that no longer exists

This commit is contained in:
Sol
2011-09-29 23:13:49 +00:00
parent ebca6d8c69
commit d2304b1df8

View File

@@ -590,7 +590,11 @@ public class AbilityFactory_Counters {
for (Card tgtCard : tgtCards) {
if (tgt == null || CardFactoryUtil.canTarget(card, tgtCard)) {
if (AllZone.getZoneOf(tgtCard).is(Constant.Zone.Battlefield)) {
PlayerZone zone = AllZone.getZoneOf(tgtCard);
if (zone == null){
// Do nothing, token disappeared
}
else if (zone.is(Constant.Zone.Battlefield)) {
tgtCard.addCounter(Counters.valueOf(type), counterAmount);
}
else {