[XLN] fixed Kopala, Warden of Waves applying both effects to spells
@@ -2,8 +2,6 @@ package mage.cards.k;
import mage.MageInt;
import mage.abilities.Ability;
-import mage.abilities.ActivatedAbility;
-import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.cards.CardImpl;
@@ -32,10 +30,10 @@ public final class KopalaWardenOfWaves extends CardImpl {
this.toughness = new MageInt(2);
// Spells your opponents cast that target a Merfolk you control cost {2} more to cast.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KopalaWardenOfWavesCostModificationEffect1()));
+ this.addAbility(new SimpleStaticAbility(new KopalaWardenOfWavesCostModificationEffect1()));
// Abilities your opponents activate that target a Merfolk you control cost {2} more to activate.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KopalaWardenOfWavesCostModificationEffect2()));
+ this.addAbility(new SimpleStaticAbility(new KopalaWardenOfWavesCostModificationEffect2()));
}
private KopalaWardenOfWaves(final KopalaWardenOfWaves card) {
@@ -102,11 +100,8 @@ class KopalaWardenOfWavesCostModificationEffect1 extends CostModificationEffectI
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
- if (!(abilityToModify instanceof SpellAbility)) {
- return false;
- }
-
- return KopalaWardenOfWaves.isAbilityCompatible(abilityToModify, source, game);
+ return abilityToModify.getAbilityType() == AbilityType.SPELL
+ && KopalaWardenOfWaves.isAbilityCompatible(abilityToModify, source, game);
}
@Override
@@ -135,11 +130,8 @@ class KopalaWardenOfWavesCostModificationEffect2 extends CostModificationEffectI
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
- if (!(abilityToModify instanceof ActivatedAbility)) {
- return false;
- }
-
- return KopalaWardenOfWaves.isAbilityCompatible(abilityToModify, source, game);
+ return abilityToModify.getAbilityType() == AbilityType.ACTIVATED
+ && KopalaWardenOfWaves.isAbilityCompatible(abilityToModify, source, game);
}
@Override
