diff --git a/Mage/src/mage/abilities/condition/common/SuspendedCondition.java b/Mage/src/mage/abilities/condition/common/SuspendedCondition.java index 361b45879f..3b2538b584 100644 --- a/Mage/src/mage/abilities/condition/common/SuspendedCondition.java +++ b/Mage/src/mage/abilities/condition/common/SuspendedCondition.java @@ -69,11 +69,11 @@ public class SuspendedCondition implements Condition { break; } } - } - if (found) { - if (game.getState().getZone(card.getId()) == Zone.EXILED && - card.getCounters().getCount(CounterType.TIME) > 0) { - return true; + if (found) { + if (game.getState().getZone(card.getId()) == Zone.EXILED && + card.getCounters().getCount(CounterType.TIME) > 0) { + return true; + } } } return false; diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java b/Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java index b3e76851de..74ec3946fa 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java @@ -49,24 +49,25 @@ public class SunburstCount implements DynamicValue{ @Override public int calculate(Game game, Ability source) { int count = 0; - - StackObject spell = game.getStack().getFirst(); - if (spell != null && spell instanceof Spell && ((Spell)spell).getSourceId().equals(source.getSourceId())) { - Mana mana = ((Spell)spell).getSpellAbility().getManaCostsToPay().getPayment(); - if(mana.getBlack() > 0) { - count++; - } - if(mana.getBlue() > 0) { - count++; - } - if(mana.getGreen() > 0) { - count++; - } - if(mana.getRed() > 0) { - count++; - } - if(mana.getWhite() > 0) { - count++; + 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(); + if(mana.getBlack() > 0) { + count++; + } + if(mana.getBlue() > 0) { + count++; + } + if(mana.getGreen() > 0) { + count++; + } + if(mana.getRed() > 0) { + count++; + } + if(mana.getWhite() > 0) { + count++; + } } } return count;