* Kicker - Fixed that {X} Kicker costs with generic mana costs where added to the spells costs correctly (e.g. Kangee, Aerie Keeper).

This commit is contained in:
LevelX2 2015-08-06 19:41:00 +02:00
parent 5c9705c06b
commit 297ab8cdad
2 changed files with 12 additions and 5 deletions

View file

@ -27,21 +27,20 @@
*/ */
package mage.sets.lorwyn; package mage.sets.lorwyn;
import mage.constants.CardType; import java.util.UUID;
import mage.constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -61,10 +60,11 @@ public class WortBoggartAuntie extends CardImpl {
this.subtype.add("Goblin"); this.subtype.add("Goblin");
this.subtype.add("Shaman"); this.subtype.add("Shaman");
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.addAbility(FearAbility.getInstance()); this.addAbility(FearAbility.getInstance());
// At the beginning of your upkeep, you may return target Goblin card from your graveyard to your hand. // At the beginning of your upkeep, you may return target Goblin card from your graveyard to your hand.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandTargetEffect(), TargetController.YOU, true); Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInYourGraveyard(filter)); ability.addTarget(new TargetCardInYourGraveyard(filter));

View file

@ -42,6 +42,7 @@ import mage.abilities.costs.OptionalAdditionalCost;
import mage.abilities.costs.OptionalAdditionalCostImpl; import mage.abilities.costs.OptionalAdditionalCostImpl;
import mage.abilities.costs.OptionalAdditionalSourceCosts; import mage.abilities.costs.OptionalAdditionalSourceCosts;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.costs.mana.VariableManaCost;
import mage.constants.AbilityType; import mage.constants.AbilityType;
@ -261,6 +262,12 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
game.informPlayers(game.getPlayer(this.controllerId).getLogName() + " announced a value of " + xManaValue + " for " + " kicker X "); game.informPlayers(game.getPlayer(this.controllerId).getLogName() + " announced a value of " + xManaValue + " for " + " kicker X ");
} }
ability.getManaCostsToPay().add(new GenericManaCost(xManaValue)); ability.getManaCostsToPay().add(new GenericManaCost(xManaValue));
ManaCostsImpl<ManaCost> kickerManaCosts = (ManaCostsImpl) cost;
for (ManaCost manaCost : kickerManaCosts) {
if (!(manaCost instanceof VariableManaCost)) {
ability.getManaCostsToPay().add(manaCost.copy());
}
}
} else { } else {
ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy()); ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
} }