From 465cd821049c5437397c1e871a56d9971b19ca1d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 24 Sep 2013 10:54:55 +0200 Subject: [PATCH] * Daxos of Meletis - Fixed that java error happened if player tries to cast non castable cards (e.g. lands). --- Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java b/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java index 0a22cd3fa6b..c2f10887d16 100644 --- a/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java +++ b/Mage.Sets/src/mage/sets/theros/DaxosOfMeletis.java @@ -121,10 +121,13 @@ class DaxosOfMeletisEffect extends OneShotEffect { if (cmc > 0) { controller.gainLife(cmc, game); } - // allow to cast the card - game.addEffect(new DaxosOfMeletisCastFromExileEffect(card.getId(), exileId), source); - // and you may spend mana as though it were mana of any color to cast it - game.addEffect(new DaxosOfMeletisSpendAnyManaEffect(card.getId()), source); + // Add effects only if the card has a spellAbility (e.g. not for lands). + if (card.getSpellAbility() != null) { + // allow to cast the card + game.addEffect(new DaxosOfMeletisCastFromExileEffect(card.getId(), exileId), source); + // and you may spend mana as though it were mana of any color to cast it + game.addEffect(new DaxosOfMeletisSpendAnyManaEffect(card.getId()), source); + } } return true; } @@ -165,7 +168,7 @@ class DaxosOfMeletisCastFromExileEffect extends AsThoughEffectImpl