[DTK] Fixed Dash cost reduction effect of Warbringer.

This commit is contained in:
LevelX2 2015-03-15 19:30:44 +01:00
parent 325aab10a2
commit 9f1cf7993c

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DashedCondition;
import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.DashAbility; import mage.abilities.keyword.DashAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -99,13 +100,7 @@ class WarbringerSpellsCostReductionEffect extends CostModificationEffectImpl {
if (abilityToModify.getControllerId().equals(source.getControllerId())) { if (abilityToModify.getControllerId().equals(source.getControllerId())) {
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId()); Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
if (spell != null) { if (spell != null) {
for (Ability ability : spell.getCard().getAbilities()) { return DashedCondition.getInstance().apply(game, abilityToModify);
if (ability instanceof DashAbility) {
if (((DashAbility) ability).isActivated()) {
return true;
}
}
}
} }
} }
} }