[minor] SunburstCount prevent exception.

This commit is contained in:
LevelX2 2013-06-21 21:30:24 +02:00
parent 250f860298
commit 514d21375c
2 changed files with 24 additions and 23 deletions

View file

@ -69,13 +69,13 @@ public class SuspendedCondition implements Condition {
break;
}
}
}
if (found) {
if (game.getState().getZone(card.getId()) == Zone.EXILED &&
card.getCounters().getCount(CounterType.TIME) > 0) {
return true;
}
}
}
return false;
}
}

View file

@ -49,7 +49,7 @@ public class SunburstCount implements DynamicValue{
@Override
public int calculate(Game game, Ability source) {
int count = 0;
if (!game.getStack().isEmpty()) {
StackObject spell = game.getStack().getFirst();
if (spell != null && spell instanceof Spell && ((Spell)spell).getSourceId().equals(source.getSourceId())) {
Mana mana = ((Spell)spell).getSpellAbility().getManaCostsToPay().getPayment();
@ -69,6 +69,7 @@ public class SunburstCount implements DynamicValue{
count++;
}
}
}
return count;
}