Check if exists a target to counter in Stack before counter
@@ -126,7 +126,8 @@ class SpellstutterSpriteCounterTargetEffect extends OneShotEffect {
*/
int numberFaeries = game.getState().getBattlefield().countAll(SpellstutterSprite.filter, source.getControllerId(), game);
StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget());
- if (stackObject.getConvertedManaCost() <= numberFaeries) {
+ // If do'nt have any spell targeted
+ if (stackObject != null && stackObject.getConvertedManaCost() <= numberFaeries) {
if (game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game)) {
return true;
}
@@ -134,6 +135,21 @@ class SpellstutterSpriteCounterTargetEffect extends OneShotEffect {
return false;
}
+// @Override
+// public boolean apply(Game game, Ability source) {
+// Player controller = game.getPlayer(source.getControllerId());
+// MageObject sourceObject = source.getSourceObject(game);
+// if (controller != null && sourceObject != null) {
+// Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
+// if (spell != null) {
+// UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
+// return controller.moveCardsToExile(spell, source, game, true, exileId, sourceObject.getIdName());
+// }
+// return true;
+// }
+// return false;
+// }
+
@Override
public String getText(Mode mode) {
return "counter target spell with converted mana cost X or less, where X is the number of Faeries you control";
