From 1181988fd4b80bb39e08c405b4d582664382f3d0 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Sun, 31 Jul 2011 19:13:55 +0400 Subject: [PATCH] Fixed variable cost not working in ActivateOncePerTurnActivatedAbility. --- Mage/src/mage/abilities/ActivatedAbilityImpl.java | 4 ++++ .../ActivateOncePerTurnActivatedAbility.java | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Mage/src/mage/abilities/ActivatedAbilityImpl.java b/Mage/src/mage/abilities/ActivatedAbilityImpl.java index 2b18e56ebe..a395183d94 100644 --- a/Mage/src/mage/abilities/ActivatedAbilityImpl.java +++ b/Mage/src/mage/abilities/ActivatedAbilityImpl.java @@ -35,7 +35,9 @@ import mage.Constants.Zone; import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.PhyrexianManaCost; +import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; import mage.cards.Card; @@ -98,6 +100,8 @@ public abstract class ActivatedAbilityImpl> ex if (cost != null) { if (cost instanceof PhyrexianManaCost) { this.addManaCost((PhyrexianManaCost)cost); + } else if (cost instanceof ManaCostsImpl) { + this.addManaCost((ManaCostsImpl) cost); } else { this.addCost(cost); } diff --git a/Mage/src/mage/abilities/common/ActivateOncePerTurnActivatedAbility.java b/Mage/src/mage/abilities/common/ActivateOncePerTurnActivatedAbility.java index c7e1dc4da7..e03a349dfa 100644 --- a/Mage/src/mage/abilities/common/ActivateOncePerTurnActivatedAbility.java +++ b/Mage/src/mage/abilities/common/ActivateOncePerTurnActivatedAbility.java @@ -32,6 +32,8 @@ import java.util.UUID; import mage.Constants.Zone; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCost; +import mage.abilities.costs.mana.ManaCosts; import mage.abilities.effects.Effect; import mage.game.Game; @@ -51,11 +53,14 @@ public class ActivateOncePerTurnActivatedAbility extends ActivatedAbilityImpl