diff --git a/Mage.Sets/src/mage/sets/apocalypse/Anavolver.java b/Mage.Sets/src/mage/sets/apocalypse/Anavolver.java index de5bd117ca6..f619943220c 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/Anavolver.java +++ b/Mage.Sets/src/mage/sets/apocalypse/Anavolver.java @@ -44,6 +44,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -62,9 +63,10 @@ public class Anavolver extends CardImpl { // Kicker {1}{U} and/or {B} (You may pay an additional {1}{U} and/or {B} as you cast this spell.) KickerManaCost kicker1 = new KickerManaCost("{1}{U}"); - this.getSpellAbility().addOptionalCost(kicker1); KickerManaCost kicker2 = new KickerManaCost("{B}"); - this.getSpellAbility().addOptionalCost(kicker2); + KickerAbility kickerAbility = new KickerAbility(kicker1); + kickerAbility.addKickerManaCost(kicker2); + this.addAbility(kickerAbility); // If Anavolver was kicked with its {1}{U} kicker, it enters the battlefield with two +1/+1 counters on it and with flying. EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/apocalypse/Cetavolver.java b/Mage.Sets/src/mage/sets/apocalypse/Cetavolver.java index 4c9b217926a..266673af6d3 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/Cetavolver.java +++ b/Mage.Sets/src/mage/sets/apocalypse/Cetavolver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -59,9 +60,10 @@ public class Cetavolver extends CardImpl { // Kicker {1}{R} and/or {G} (You may pay an additional {1}{R} and/or {G} as you cast this spell.) KickerManaCost kicker1 = new KickerManaCost("{1}{R}"); - this.getSpellAbility().addOptionalCost(kicker1); KickerManaCost kicker2 = new KickerManaCost("{G}"); - this.getSpellAbility().addOptionalCost(kicker2); + KickerAbility kickerAbility = new KickerAbility(kicker1); + kickerAbility.addKickerManaCost(kicker2); + this.addAbility(kickerAbility); // If Cetavolver was kicked with its {1}{R} kicker, it enters the battlefield with two +1/+1 counters on it and with first strike. EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/apocalypse/Degavolver.java b/Mage.Sets/src/mage/sets/apocalypse/Degavolver.java index 4ae450e0da3..37411ca8c7c 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/Degavolver.java +++ b/Mage.Sets/src/mage/sets/apocalypse/Degavolver.java @@ -44,6 +44,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -63,9 +64,10 @@ public class Degavolver extends CardImpl { // Kicker {1}{B} and/or {R} (You may pay an additional {1}{B} and/or {R} as you cast this spell.) KickerManaCost kicker1 = new KickerManaCost("{1}{B}"); - this.getSpellAbility().addOptionalCost(kicker1); KickerManaCost kicker2 = new KickerManaCost("{R}"); - this.getSpellAbility().addOptionalCost(kicker2); + KickerAbility kickerAbility = new KickerAbility(kicker1); + kickerAbility.addKickerManaCost(kicker2); + this.addAbility(kickerAbility); // If Degavolver was kicked with its {1}{B} kicker, it enters the battlefield with two +1/+1 counters on it and with "Pay 3 life: Regenerate Degavolver." EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java b/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java index 9d73ccc7839..9bec37405a8 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java +++ b/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java @@ -29,15 +29,16 @@ package mage.sets.apocalypse; import java.util.UUID; - -import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.game.Game; @@ -55,7 +56,14 @@ public class DesolationAngel extends CardImpl { this.color.setBlack(true); this.power = new MageInt(5); this.toughness = new MageInt(4); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{W}{W}")); + + // Kicker (You may pay an additional as you cast this spell.) + this.addAbility(new KickerAbility(new KickerManaCost("{W}{W}"))); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Desolation Angel enters the battlefield, destroy all lands you control. If it was kicked, destroy all lands instead. this.addAbility(new EntersBattlefieldTriggeredAbility(new DesolationAngelEntersBattlefieldEffect())); } @@ -71,7 +79,7 @@ public class DesolationAngel extends CardImpl { class DesolationAngelEntersBattlefieldEffect extends OneShotEffect { DesolationAngelEntersBattlefieldEffect() { - super(Constants.Outcome.DestroyPermanent); + super(Outcome.DestroyPermanent); staticText = "destroy all lands you control. If it was kicked, destroy all lands instead"; } diff --git a/Mage.Sets/src/mage/sets/futuresight/KavuPrimarch.java b/Mage.Sets/src/mage/sets/futuresight/KavuPrimarch.java index 7796bfeacb8..04a39b2ccdc 100644 --- a/Mage.Sets/src/mage/sets/futuresight/KavuPrimarch.java +++ b/Mage.Sets/src/mage/sets/futuresight/KavuPrimarch.java @@ -36,6 +36,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.ConvokeAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -53,11 +54,12 @@ public class KavuPrimarch extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); + // Kicker {4} (You may pay an additional {4} as you cast this spell.) + this.addAbility(new KickerAbility(new KickerManaCost("{4}"))); + // Convoke (Each creature you tap while casting this spell reduces its cost by {1} or by one mana of that creature's color.) this.addAbility(new ConvokeAbility()); - // Kicker {4} (You may pay an additional {4} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{4}")); // If Kavu Primarch was kicked, it enters the battlefield with four +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)),KickedCondition.getInstance(), true, diff --git a/Mage.Sets/src/mage/sets/invasion/UrborgSkeleton.java b/Mage.Sets/src/mage/sets/invasion/UrborgSkeleton.java new file mode 100644 index 00000000000..d72a1d96593 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/UrborgSkeleton.java @@ -0,0 +1,85 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. +*/ +package mage.sets.invasion; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.KickerManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** +* +* @author LevelX2 +*/ +public class UrborgSkeleton extends CardImpl { + + private final static String staticText = "If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it"; + + public UrborgSkeleton(UUID ownerId) { + super(ownerId, 134, "Urborg Skeleton", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Skeleton"); + + this.color.setBlack(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Kicker {3} (You may pay an additional {3} as you cast this spell.) + this.addAbility(new KickerAbility(new KickerManaCost("{3}"))); + + // {B}: Regenerate Urborg Skeleton. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); + + // If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it. + Ability ability = new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), + KickedCondition.getInstance(),false, staticText,""); + this.addAbility(ability); + } + + public UrborgSkeleton(final UrborgSkeleton card) { + super(card); + } + + @Override + public UrborgSkeleton copy() { + return new UrborgSkeleton(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planeshift/OrimsChant.java b/Mage.Sets/src/mage/sets/planeshift/OrimsChant.java index 57f1c09d70d..1146db9efe5 100644 --- a/Mage.Sets/src/mage/sets/planeshift/OrimsChant.java +++ b/Mage.Sets/src/mage/sets/planeshift/OrimsChant.java @@ -36,6 +36,7 @@ import mage.abilities.Ability; import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,7 +55,7 @@ public class OrimsChant extends CardImpl { this.color.setWhite(true); // Kicker {W} (You may pay an additional {W} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{W}")); + this.addAbility(new KickerAbility(new KickerManaCost("{W}"))); // Target player can't cast spells this turn. this.getSpellAbility().addTarget(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/sets/worldwake/ApexHawks.java b/Mage.Sets/src/mage/sets/worldwake/ApexHawks.java index efaeefe3232..2235797cbb1 100644 --- a/Mage.Sets/src/mage/sets/worldwake/ApexHawks.java +++ b/Mage.Sets/src/mage/sets/worldwake/ApexHawks.java @@ -32,11 +32,11 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -55,8 +55,8 @@ public class ApexHawks extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // Multikicker (You may pay an additional any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{W}"))); + // Multikicker (You may pay an additional {1}{W} any number of times as you cast this spell.) + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{W}"))); // Flying this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/worldwake/BloodhuskRitualist.java b/Mage.Sets/src/mage/sets/worldwake/BloodhuskRitualist.java index 2e661a824e2..61967575ef3 100644 --- a/Mage.Sets/src/mage/sets/worldwake/BloodhuskRitualist.java +++ b/Mage.Sets/src/mage/sets/worldwake/BloodhuskRitualist.java @@ -34,10 +34,12 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.MultikickerManaCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.DiscardTargetEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetOpponent; @@ -57,10 +59,13 @@ public class BloodhuskRitualist extends CardImpl { this.toughness = new MageInt(2); // Multikicker (You may pay an additional {B} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{B}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{B}"))); // When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked. - Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(new MultikickerCount())); + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(new MultikickerCount())), + KickedCondition.getInstance(), + ""); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/worldwake/CometStorm.java b/Mage.Sets/src/mage/sets/worldwake/CometStorm.java index 5f085d08ce6..eb06a2e4701 100644 --- a/Mage.Sets/src/mage/sets/worldwake/CometStorm.java +++ b/Mage.Sets/src/mage/sets/worldwake/CometStorm.java @@ -27,15 +27,16 @@ */ package mage.sets.worldwake; -import java.util.List; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.abilities.Ability; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.SpellAbility; +import mage.abilities.costs.mana.MultikickerManaCost; +import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.Game; import mage.game.permanent.Permanent; @@ -55,16 +56,26 @@ public class CometStorm extends CardImpl { this.color.setRed(true); // Multikicker {1} - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}"))); // Choose target creature or player, then choose another target creature or player for each time Comet Storm was kicked. Comet Storm deals X damage to each of them. this.getSpellAbility().addEffect(new CometStormEffect()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(1)); } public CometStorm(final CometStorm card) { super(card); } + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int numbTargets = new MultikickerCount().calculate(game, ability) + 1; + ability.addTarget(new TargetCreatureOrPlayer(numbTargets)); + } + } + @Override public CometStorm copy() { return new CometStorm(this); @@ -84,24 +95,17 @@ class CometStormEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - int amount = source.getManaCostsToPay().getX() + 1; int damage = source.getManaCostsToPay().getX(); Player you = game.getPlayer(source.getControllerId()); - TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(amount); if (you != null) { - if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Damage, source.getControllerId(), source.getId(), game)) { - if (!target.getTargets().isEmpty()) { - List targets = target.getTargets(); - for (UUID uuid : targets) { - Permanent permanent = game.getPermanent(uuid); - Player player = game.getPlayer(uuid); - if (permanent != null) { - permanent.damage(damage, source.getId(), game, true, false); - } - if (player != null) { - player.damage(damage, source.getId(), game, true, false); - } - } + for (UUID uuid : this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(uuid); + Player player = game.getPlayer(uuid); + if (permanent != null) { + permanent.damage(damage, source.getId(), game, true, false); + } + if (player != null) { + player.damage(damage, source.getId(), game, true, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/worldwake/EnclaveElite.java b/Mage.Sets/src/mage/sets/worldwake/EnclaveElite.java index 77a03c66c4a..722ec67a4a5 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EnclaveElite.java +++ b/Mage.Sets/src/mage/sets/worldwake/EnclaveElite.java @@ -32,11 +32,11 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.IslandwalkAbility; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -57,7 +57,7 @@ public class EnclaveElite extends CardImpl { this.toughness = new MageInt(2); // Multikicker (You may pay an additional any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{U}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{U}"))); // Islandwalk this.addAbility(new IslandwalkAbility()); diff --git a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java index fa76bd1458d..1806b2d051b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java +++ b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java @@ -28,24 +28,21 @@ package mage.sets.worldwake; -import mage.Constants; +import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.EmptyEffect; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.dynamicvalue.common.MultikickerCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import java.util.UUID; + /** * @@ -60,14 +57,14 @@ public class EverflowingChalice extends CardImpl { this.expansionSetCode = "WWK"; // Multikicker {2} (You may pay an additional {2} any number of times as you cast this spell.) - MultikickerAbility ability = new MultikickerAbility(new EmptyEffect(rule), false); - ability.addManaCost(new GenericManaCost(2)); - this.addAbility(ability); + this.addAbility(new KickerAbility(new MultikickerManaCost("{2}"))); // Everflowing Chalice enters the battlefield with a charge counter on it for each time it was kicked. - Ability ability1 = new EntersBattlefieldAbility(new EverflowingChaliceAddCountersEffect(), null, true, rule, null); - this.addAbility(ability1); + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.CHARGE.createInstance(0), new MultikickerCount(), true), + "with a charge counter on it for each time it was kicked")); + // {T}: Add {1} to your mana pool for each charge counter on Everflowing Chalice. this.addAbility(new DynamicManaAbility(Mana.ColorlessMana, new CountersCount(CounterType.CHARGE))); } @@ -82,36 +79,3 @@ public class EverflowingChalice extends CardImpl { } -class EverflowingChaliceAddCountersEffect extends OneShotEffect { - - public EverflowingChaliceAddCountersEffect() { - super(Constants.Outcome.Benefit); - } - - public EverflowingChaliceAddCountersEffect(final EverflowingChaliceAddCountersEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - for (Ability ability : permanent.getAbilities()) { - if (ability instanceof MultikickerAbility) { - int count = ((MultikickerAbility)ability).getActivateCount(); - if (count > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(count), game); - } - } - } - } - return true; - } - - @Override - public EverflowingChaliceAddCountersEffect copy() { - return new EverflowingChaliceAddCountersEffect(this); - } - -} - diff --git a/Mage.Sets/src/mage/sets/worldwake/GnarlidPack.java b/Mage.Sets/src/mage/sets/worldwake/GnarlidPack.java index 1720f91682c..d187334348a 100644 --- a/Mage.Sets/src/mage/sets/worldwake/GnarlidPack.java +++ b/Mage.Sets/src/mage/sets/worldwake/GnarlidPack.java @@ -32,10 +32,10 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -55,7 +55,7 @@ public class GnarlidPack extends CardImpl { this.toughness = new MageInt(2); // Multikicker (You may pay an additional any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{G}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{G}"))); // Gnarlid Pack enters the battlefield with a +1/+1 counter on it for each time it was kicked. this.addAbility(new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java b/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java index 4ad8f4c0479..da2a556ac23 100644 --- a/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java +++ b/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java @@ -35,12 +35,12 @@ import mage.Constants.TargetController; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.CountersCount; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.continious.BoostAllEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -75,7 +75,7 @@ public class JoragaWarcaller extends CardImpl { this.toughness = new MageInt(1); // Multikicker {1}{G} - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{G}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{G}"))); // Joraga Warcaller enters the battlefield with a +1/+1 counter on it for each time it was kicked. this.addAbility(new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/worldwake/LightkeeperOfEmeria.java b/Mage.Sets/src/mage/sets/worldwake/LightkeeperOfEmeria.java index 0c871034def..3a2b3570e0f 100644 --- a/Mage.Sets/src/mage/sets/worldwake/LightkeeperOfEmeria.java +++ b/Mage.Sets/src/mage/sets/worldwake/LightkeeperOfEmeria.java @@ -32,11 +32,11 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; /** @@ -55,7 +55,7 @@ public class LightkeeperOfEmeria extends CardImpl { this.toughness = new MageInt(4); // Multikicker (You may pay an additional {W} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{W}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{W}"))); // Flying this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java b/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java index c18f25b5e71..b2b38a92afd 100644 --- a/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java +++ b/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java @@ -27,32 +27,29 @@ */ package mage.sets.worldwake; +import java.util.UUID; import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.abilities.Ability; -import mage.abilities.common.EmptyEffect; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.MultikickerManaCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.dynamicvalue.common.MultikickerCount; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.effects.common.continious.BoostAllEffect; -import mage.abilities.keyword.MultikickerAbility; -import mage.cards.Card; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; -import java.util.List; -import java.util.UUID; - /** * * @author jeffwadsworth @@ -61,11 +58,12 @@ import java.util.UUID; public class MarshalsAnthem extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control"); + private static final FilterCard filterCard = new FilterCard("creature card in your graveyard"); static { filter.add(new ControllerPredicate(TargetController.YOU)); + filterCard.add(new CardTypePredicate(CardType.CREATURE)); } - protected static final String rule = "return up to X target creature cards from your graveyard to the battlefield, where X is the number of times Marshal's Anthem was kicked"; public MarshalsAnthem(UUID ownerId) { super(ownerId, 15, "Marshal's Anthem", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); @@ -74,15 +72,30 @@ public class MarshalsAnthem extends CardImpl { this.color.setWhite(true); // Multikicker {1}{W} - MultikickerAbility ability = new MultikickerAbility(new EmptyEffect(rule), false); - ability.addManaCost(new ManaCostsImpl("{1}{W}")); - this.addAbility(ability); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{W}"))); // Creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Constants.Duration.WhileOnBattlefield, filter, false))); // When Marshal's Anthem enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times Marshal's Anthem was kicked. - this.addAbility(new EntersBattlefieldTriggeredAbility(new MarshalsAnthemEffect())); + + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false), + KickedCondition.getInstance(), + "When {this} enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times {this} was kicked."); + this.addAbility(ability); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof ConditionalTriggeredAbility) { + ability.getTargets().clear(); + int numbTargets = new MultikickerCount().calculate(game, ability); + if (numbTargets > 0) { + ability.addTarget(new TargetCardInYourGraveyard(0, numbTargets, filterCard)); + } + } } public MarshalsAnthem(final MarshalsAnthem card) { @@ -93,52 +106,4 @@ public class MarshalsAnthem extends CardImpl { public MarshalsAnthem copy() { return new MarshalsAnthem(this); } -} - -class MarshalsAnthemEffect extends OneShotEffect { - - public MarshalsAnthemEffect() { - super(Constants.Outcome.PutCreatureInPlay); - this.staticText = "return up to X target creature cards from your graveyard to the battlefield, where X is the number of times {this} was kicked"; - } - - public MarshalsAnthemEffect(final MarshalsAnthemEffect effect) { - super(effect); - } - - @Override - public MarshalsAnthemEffect copy() { - return new MarshalsAnthemEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterCard filter = new FilterCard("creature card in your graveyard"); - filter.add(new CardTypePredicate(CardType.CREATURE)); - Player you = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - for (Ability ability : permanent.getAbilities()) { - if (ability instanceof MultikickerAbility) { - int count = Math.min(you.getGraveyard().size(), ((MultikickerAbility) ability).getActivateCount()); - TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(0, count, filter); - if (you != null) { - if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.Neutral, source.getControllerId(), source.getId(), game)) { - if (!target.getTargets().isEmpty()) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Card card = game.getCard(targetId); - if (card != null) { - card.putOntoBattlefield(game, Constants.Zone.GRAVEYARD, source.getId(), you.getId()); - } - } - return true; - } - } - } - } - } - } - return false; - } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/worldwake/QuagVampires.java b/Mage.Sets/src/mage/sets/worldwake/QuagVampires.java index 7ffad4f0db6..e784bab41a5 100644 --- a/Mage.Sets/src/mage/sets/worldwake/QuagVampires.java +++ b/Mage.Sets/src/mage/sets/worldwake/QuagVampires.java @@ -32,10 +32,10 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -57,7 +57,7 @@ public class QuagVampires extends CardImpl { this.toughness = new MageInt(1); // Multikicker (You may pay an additional {1}{B} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{B}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{B}"))); // Swampwalk this.addAbility(new SwampwalkAbility()); diff --git a/Mage.Sets/src/mage/sets/worldwake/SkitterOfLizards.java b/Mage.Sets/src/mage/sets/worldwake/SkitterOfLizards.java index b26667d016d..d2c90d2a922 100644 --- a/Mage.Sets/src/mage/sets/worldwake/SkitterOfLizards.java +++ b/Mage.Sets/src/mage/sets/worldwake/SkitterOfLizards.java @@ -31,13 +31,12 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; -import mage.abilities.common.EmptyEffect; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -57,7 +56,7 @@ public class SkitterOfLizards extends CardImpl { this.toughness = new MageInt(1); // Multikicker (You may pay an additional {1}{R} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}{R}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}{R}"))); // Haste this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/worldwake/StrengthOfTheTajuru.java b/Mage.Sets/src/mage/sets/worldwake/StrengthOfTheTajuru.java index cc7874a0516..7e1b6930aac 100644 --- a/Mage.Sets/src/mage/sets/worldwake/StrengthOfTheTajuru.java +++ b/Mage.Sets/src/mage/sets/worldwake/StrengthOfTheTajuru.java @@ -27,11 +27,17 @@ */ package mage.sets.worldwake; +import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.abilities.Ability; -import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.SpellAbility; +import mage.abilities.costs.mana.MultikickerManaCost; +import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.counters.Counter; import mage.counters.CounterType; @@ -39,10 +45,6 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; -import java.util.UUID; -import mage.Constants.Outcome; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.keyword.MultikickerAbility; /** * @author noxx @@ -57,7 +59,7 @@ public class StrengthOfTheTajuru extends CardImpl { // Multikicker (You may pay an additional {1} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{1}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{1}"))); // Choose target creature, then choose another target creature for each time Strength of the Tajuru was kicked. Put X +1/+1 counters on each of them. this.getSpellAbility().addEffect(new StrengthOfTheTajuruAddCountersTargetEffect()); @@ -65,10 +67,11 @@ public class StrengthOfTheTajuru extends CardImpl { } @Override - public void adjustCosts(Ability ability, Game game) { - int numTargets = ability.getTargets().get(0).getTargets().size(); - if (numTargets > 1) { - ability.getManaCostsToPay().add(new GenericManaCost(numTargets - 1)); + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int numbTargets = new MultikickerCount().calculate(game, ability) + 1; + ability.addTarget(new TargetCreaturePermanent(0, numbTargets)); } } @@ -86,7 +89,7 @@ class StrengthOfTheTajuruAddCountersTargetEffect extends OneShotEffect { this.toughness = new MageInt(3); // Multikicker {U} - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{U}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{U}"))); // Flying this.addAbility(FlyingAbility.getInstance()); // When Voyager Drake enters the battlefield, up to X target creatures gain flying until end of turn, where X is the number of times Voyager Drake was kicked. - this.addAbility(new EntersBattlefieldTriggeredAbility(new VoyagerDrakeEffect(), false)); + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), false), + KickedCondition.getInstance(), + "When {this} enters the battlefield, up to X target creatures gain flying until end of turn, where X is the number of times {this} was kicked."); + this.addAbility(ability); } + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof ConditionalTriggeredAbility) { + ability.getTargets().clear(); + int numbTargets = new MultikickerCount().calculate(game, ability); + if (numbTargets > 0) { + ability.addTarget(new TargetCreaturePermanent(0,numbTargets)); + } + } + } public VoyagerDrake(final VoyagerDrake card) { super(card); } @@ -84,53 +93,3 @@ public class VoyagerDrake extends CardImpl { return new VoyagerDrake(this); } } - -class VoyagerDrakeEffect extends OneShotEffect { - - public VoyagerDrakeEffect() { - super(Constants.Outcome.PutCreatureInPlay); - this.staticText = "up to X target creatures gain flying until end of turn, where X is the number of times {this} was kicked"; - } - - public VoyagerDrakeEffect(final VoyagerDrakeEffect effect) { - super(effect); - } - - @Override - public VoyagerDrakeEffect copy() { - return new VoyagerDrakeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new CardTypePredicate(CardType.CREATURE)); - Player you = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - for (Ability ability : permanent.getAbilities()) { - if (ability instanceof MultikickerAbility) { - int count = Math.min(game.getBattlefield().countAll(filter, game), ((MultikickerAbility) ability).getActivateCount()); - TargetCreaturePermanent target = new TargetCreaturePermanent(0, count, filter, false); - if (you != null) { - if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.AddAbility, source.getControllerId(), source.getId(), game)) { - if (!target.getTargets().isEmpty()) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Permanent creature = game.getPermanent(targetId); - if (creature != null) { - ContinuousEffect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(creature.getId())); - game.addEffect(effect, source); - } - } - return true; - } - } - } - } - } - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java b/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java index 428ba8f5ee5..1027ab2ba6e 100644 --- a/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java +++ b/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java @@ -30,15 +30,13 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.ColoredManaSymbol; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.MultikickerManaCost; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.MultikickerAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.permanent.token.WolfToken; @@ -57,7 +55,7 @@ public class WolfbriarElemental extends CardImpl { this.toughness = new MageInt(4); // Multikicker (You may pay an additional {G} any number of times as you cast this spell.) - this.addAbility(new MultikickerAbility(new ManaCostsImpl("{G}"))); + this.addAbility(new KickerAbility(new MultikickerManaCost("{G}"))); // When Wolfbriar Elemental enters the battlefield, put a 2/2 green Wolf creature token onto the battlefield for each time it was kicked. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken(), new MultikickerCount()))); diff --git a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java index dfa61e2a2a7..67419748361 100644 --- a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java +++ b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.counters.CounterType; import java.util.UUID; +import mage.abilities.keyword.KickerAbility; /** * @author nantuko, BetaSteward_at_googlemail.com @@ -62,7 +63,7 @@ public class AetherFigment extends CardImpl { this.addAbility(new UnblockableAbility()); // Kicker {3} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{3}")); + this.addAbility(new KickerAbility(new KickerManaCost("{3}"))); // If AEther Figment was kicked, it enters the battlefield with two +1/+1 counters on it Ability ability = new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), KickedCondition.getInstance(), ""), staticText); diff --git a/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java b/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java index b5d4ad5aa69..97e6e5e7534 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java +++ b/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java @@ -32,7 +32,12 @@ import mage.Constants.CardType; import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.abilities.Ability; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.OptionalAdditionalCost; +import mage.abilities.costs.OptionalAdditionalCostImpl; import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -64,14 +69,20 @@ public class BloodTribute extends CardImpl { this.color.setBlack(true); + // Kicker - Tap an untapped Vampire you control. + OptionalAdditionalCost cost = new OptionalAdditionalCostImpl("Kicker-","",new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); + this.addAbility(new KickerAbility(cost)); + // Target opponent loses half his or her life, rounded up. this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addEffect(new BloodTributeLoseLifeEffect()); - // Kicker - Tap an untapped Vampire you control. + // If Blood Tribute was kicked, you gain life equal to the life lost this way. - KickerAbility ability = new KickerAbility(new BloodTributeGainLifeEffect(), false); - ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - this.addAbility(ability); + Effect effect = new ConditionalOneShotEffect( + new BloodTributeGainLifeEffect(), + KickedCondition.getInstance(), + "If Blood Tribute was kicked, you gain life equal to the life lost this way"); + this.getSpellAbility().addEffect(effect); } public BloodTribute(final BloodTribute card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/BoldDefense.java b/Mage.Sets/src/mage/sets/zendikar/BoldDefense.java index 58be8c06267..b7b160c30e8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BoldDefense.java +++ b/Mage.Sets/src/mage/sets/zendikar/BoldDefense.java @@ -40,6 +40,7 @@ import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -57,10 +58,11 @@ public class BoldDefense extends CardImpl { this.expansionSetCode = "ZEN"; this.color.setWhite(true); + this.addAbility(new KickerAbility(new KickerManaCost("{3}{W}"))); + DynamicValue dn = new BoldDefensePTCount(); this.getSpellAbility().addEffect(new BoostControlledEffect(dn, dn, Duration.EndOfTurn)); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{3}{W}")); ContinuousEffect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent(), false); this.getSpellAbility().addEffect(new ConditionalContinousEffect(effect, KickedCondition.getInstance(), staticText)); diff --git a/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java b/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java index 441deb907b4..a12f7cca818 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java +++ b/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java @@ -35,6 +35,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,9 @@ public class BurstLightning extends CardImpl { super(ownerId, 119, "Burst Lightning", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); this.expansionSetCode = "ZEN"; this.color.setRed(true); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{4}")); + + this.addAbility(new KickerAbility(new KickerManaCost("{4}"))); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(4), new DamageTargetEffect(2), KickedCondition.getInstance(), "{this} deals 2 damage to target creature or player. If {this} was kicked, it deals 4 damage to that creature or player instead")); diff --git a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java index 97a127cb4dc..a93fb0c098f 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java +++ b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java @@ -36,6 +36,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; @@ -49,7 +50,9 @@ public class ConquerorsPledge extends CardImpl { super(ownerId, 8, "Conqueror's Pledge", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}{W}"); this.expansionSetCode = "ZEN"; this.color.setWhite(true); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{6}")); + + this.addAbility(new KickerAbility(new KickerManaCost("{6}"))); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new KorSoldierToken(), 12), new CreateTokenEffect(new KorSoldierToken(), 6), KickedCondition.getInstance(), "Put six 1/1 white Kor Soldier creature tokens onto the battlefield. If {this} was kicked, put twelve of those tokens onto the battlefield instead")); diff --git a/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java b/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java index 7a8ab4e104a..9ae53d0b8cf 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java +++ b/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java @@ -41,6 +41,7 @@ import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.Game; import mage.target.targetpointer.FixedTarget; @@ -58,7 +59,8 @@ public class ElementalAppeal extends CardImpl { this.color.setRed(true); // Kicker {5} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{5}")); + this.addAbility(new KickerAbility(new KickerManaCost("{5}"))); + // Put a 7/1 red Elemental creature token with trample and haste onto the battlefield. Exile it at the beginning of the next end step. this.getSpellAbility().addEffect(new ElementalAppealEffect()); // If Elemental Appeal was kicked, that creature gets +7/+0 until end of turn. diff --git a/Mage.Sets/src/mage/sets/zendikar/GatekeeperOfMalakir.java b/Mage.Sets/src/mage/sets/zendikar/GatekeeperOfMalakir.java index 062743bfebb..5f0ed1e3b94 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GatekeeperOfMalakir.java +++ b/Mage.Sets/src/mage/sets/zendikar/GatekeeperOfMalakir.java @@ -42,6 +42,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPlayer; import java.util.UUID; +import mage.abilities.keyword.KickerAbility; /** * @@ -66,7 +67,8 @@ public class GatekeeperOfMalakir extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{B}")); + this.addAbility(new KickerAbility(new KickerManaCost("{B}"))); + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SacrificeEffect(filter, 1, "target player")); diff --git a/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java b/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java index 77252815796..8eb14e0f84a 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java +++ b/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java @@ -46,6 +46,7 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect; import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -73,7 +74,8 @@ public class Gigantiform extends CardImpl { this.color.setGreen(true); // Kicker {4} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{4}")); + this.addAbility(new KickerAbility(new KickerManaCost("{4}"))); + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/sets/zendikar/GoblinBushwhacker.java b/Mage.Sets/src/mage/sets/zendikar/GoblinBushwhacker.java index 2686277acda..e7f35764051 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GoblinBushwhacker.java +++ b/Mage.Sets/src/mage/sets/zendikar/GoblinBushwhacker.java @@ -39,6 +39,7 @@ import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; /** @@ -58,7 +59,8 @@ public class GoblinBushwhacker extends CardImpl { this.toughness = new MageInt(1); // Kicker {R} (You may pay an additional {R} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{R}")); + this.addAbility(new KickerAbility(new KickerManaCost("{R}"))); + // When Goblin Bushwhacker enters the battlefield, if it was kicked, creatures you control get +1/+0 and gain haste until end of turn. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn), false); diff --git a/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java b/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java index a56177bbc64..e8bbb19e28b 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java +++ b/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java @@ -38,6 +38,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetNonBasicLandPermanent; @@ -57,7 +58,8 @@ public class GoblinRuinblaster extends CardImpl { this.toughness = new MageInt(1); // Kicker {R} (You may pay an additional {R} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{R}")); + this.addAbility(new KickerAbility(new KickerManaCost("{R}"))); + // Haste this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/zendikar/HeartstabberMosquito.java b/Mage.Sets/src/mage/sets/zendikar/HeartstabberMosquito.java index d9460e0f9da..57bdb76cee4 100644 --- a/Mage.Sets/src/mage/sets/zendikar/HeartstabberMosquito.java +++ b/Mage.Sets/src/mage/sets/zendikar/HeartstabberMosquito.java @@ -37,6 +37,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreaturePermanent; @@ -56,7 +57,8 @@ public class HeartstabberMosquito extends CardImpl { this.toughness = new MageInt(2); // Kicker {2}{B} (You may pay an additional {2}{B} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{2}{B}")); + this.addAbility(new KickerAbility(new KickerManaCost("{2}{B}"))); + // Flying this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/zendikar/IntoTheRoil.java b/Mage.Sets/src/mage/sets/zendikar/IntoTheRoil.java index cae90a1d91a..1269aeec910 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IntoTheRoil.java +++ b/Mage.Sets/src/mage/sets/zendikar/IntoTheRoil.java @@ -36,6 +36,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetNonlandPermanent; @@ -51,7 +52,7 @@ public class IntoTheRoil extends CardImpl { this.color.setBlue(true); // Kicker {1}{U} (You may pay an additional {1}{U} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{1}{U}")); + this.addAbility(new KickerAbility(new KickerManaCost("{1}{U}"))); // Return target nonland permanent to its owner's hand. If Into the Roil was kicked, draw a card. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); diff --git a/Mage.Sets/src/mage/sets/zendikar/KorAeronaut.java b/Mage.Sets/src/mage/sets/zendikar/KorAeronaut.java index ebf06ec0f70..56c478e94cf 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KorAeronaut.java +++ b/Mage.Sets/src/mage/sets/zendikar/KorAeronaut.java @@ -38,6 +38,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreaturePermanent; @@ -56,7 +57,9 @@ public class KorAeronaut extends CardImpl { this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(2); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{1}{W}")); + + this.addAbility(new KickerAbility(new KickerManaCost("{1}{W}"))); + this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java b/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java index 9152d8984c2..de7b26ab69b 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java +++ b/Mage.Sets/src/mage/sets/zendikar/KorSanctifiers.java @@ -37,6 +37,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -66,7 +67,8 @@ public class KorSanctifiers extends CardImpl { this.toughness = new MageInt(3); // Kicker {W} (You may pay an additional {W} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{W}")); + this.addAbility(new KickerAbility(new KickerManaCost("{W}"))); + // When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); diff --git a/Mage.Sets/src/mage/sets/zendikar/MarshCasualties.java b/Mage.Sets/src/mage/sets/zendikar/MarshCasualties.java index d8fd45c39f8..bc76d785517 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MarshCasualties.java +++ b/Mage.Sets/src/mage/sets/zendikar/MarshCasualties.java @@ -41,6 +41,7 @@ import mage.target.TargetPlayer; import java.util.List; import java.util.UUID; +import mage.abilities.keyword.KickerAbility; /** * @@ -57,7 +58,8 @@ public class MarshCasualties extends CardImpl { this.color.setBlack(true); // Kicker {3} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{3}")); + this.addAbility(new KickerAbility(new KickerManaCost("{3}"))); + // Creatures target player controls get -1/-1 until end of turn. If Marsh Casualties was kicked, those creatures get -2/-2 until end of turn instead. this.getSpellAbility().addEffect(new ConditionalContinousEffect( new MarshCasualtiesEffect(-2, -2), diff --git a/Mage.Sets/src/mage/sets/zendikar/MoldShambler.java b/Mage.Sets/src/mage/sets/zendikar/MoldShambler.java index 17d8b94d25d..8a6ab2f5aea 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MoldShambler.java +++ b/Mage.Sets/src/mage/sets/zendikar/MoldShambler.java @@ -36,6 +36,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -65,7 +66,7 @@ public class MoldShambler extends CardImpl { this.toughness = new MageInt(3); // Kicker {1}{G} (You may pay an additional {1}{G} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{1}{G}")); + this.addAbility(new KickerAbility(new KickerManaCost("{1}{G}"))); // When Mold Shambler enters the battlefield, if it was kicked, destroy target noncreature permanent. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); diff --git a/Mage.Sets/src/mage/sets/zendikar/OranRiefRecluse.java b/Mage.Sets/src/mage/sets/zendikar/OranRiefRecluse.java index 7d38108bbc2..39c17a0fab6 100644 --- a/Mage.Sets/src/mage/sets/zendikar/OranRiefRecluse.java +++ b/Mage.Sets/src/mage/sets/zendikar/OranRiefRecluse.java @@ -37,6 +37,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; @@ -65,7 +66,7 @@ public class OranRiefRecluse extends CardImpl { this.toughness = new MageInt(3); // Kicker {2}{G} (You may pay an additional {2}{G} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{2}{G}")); + this.addAbility(new KickerAbility(new KickerManaCost("{2}{G}"))); // Reach (This creature can block creatures with flying.) this.addAbility(ReachAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java b/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java index 400d374225b..173d3e32322 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java +++ b/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java @@ -36,6 +36,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.game.Game; @@ -56,7 +57,8 @@ public class RiteOfReplication extends CardImpl { this.color.setBlue(true); // Kicker {5} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{5}")); + this.addAbility(new KickerAbility(new KickerManaCost("{5}"))); + // Put a token that's a copy of target creature onto the battlefield. If Rite of Replication was kicked, put five of those tokens onto the battlefield instead. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new RiteOfReplicationEffect(5), diff --git a/Mage.Sets/src/mage/sets/zendikar/SadisticSacrament.java b/Mage.Sets/src/mage/sets/zendikar/SadisticSacrament.java index 92eaa215819..dbff367b4c0 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SadisticSacrament.java +++ b/Mage.Sets/src/mage/sets/zendikar/SadisticSacrament.java @@ -37,6 +37,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.filter.FilterCard; @@ -60,7 +61,8 @@ public class SadisticSacrament extends CardImpl { this.color.setBlack(true); // Kicker {7} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{7}")); + this.addAbility(new KickerAbility(new KickerManaCost("{7}"))); + // Search target player's library for up to three cards, exile them, then that player shuffles his or her library. // If Sadistic Sacrament was kicked, instead search that player's library for up to fifteen cards, exile them, then that player shuffles his or her library. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( diff --git a/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java b/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java index dc840afad36..5ef873ce953 100644 --- a/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java +++ b/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java @@ -37,6 +37,7 @@ import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; @@ -60,7 +61,7 @@ public class TempestOwl extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Kicker {4}{U} - this.getSpellAbility().addOptionalCost(new KickerManaCost("{4}{U}")); + this.addAbility(new KickerAbility(new KickerManaCost("{4}{U}"))); // When Tempest Owl enters the battlefield, if it was kicked, tap up to three target permanents. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); diff --git a/Mage.Sets/src/mage/sets/zendikar/TorchSlinger.java b/Mage.Sets/src/mage/sets/zendikar/TorchSlinger.java index 90779234c27..aa6c35ce9db 100644 --- a/Mage.Sets/src/mage/sets/zendikar/TorchSlinger.java +++ b/Mage.Sets/src/mage/sets/zendikar/TorchSlinger.java @@ -36,6 +36,7 @@ import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.mana.KickerManaCost; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreaturePermanent; @@ -56,7 +57,8 @@ public class TorchSlinger extends CardImpl { this.toughness = new MageInt(2); // Kicker {1}{R} (You may pay an additional {1}{R} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{1}{R}")); + this.addAbility(new KickerAbility(new KickerManaCost("{1}{R}"))); + // When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); diff --git a/Mage.Sets/src/mage/sets/zendikar/VampiresBite.java b/Mage.Sets/src/mage/sets/zendikar/VampiresBite.java index 07b8d3c11bf..3f9dc596e25 100644 --- a/Mage.Sets/src/mage/sets/zendikar/VampiresBite.java +++ b/Mage.Sets/src/mage/sets/zendikar/VampiresBite.java @@ -37,6 +37,7 @@ import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreaturePermanent; @@ -54,7 +55,7 @@ public class VampiresBite extends CardImpl { this.color.setBlack(true); // Kicker {2}{B} (You may pay an additional {2}{B} as you cast this spell.) - this.getSpellAbility().addOptionalCost(new KickerManaCost("{2}{B}")); + this.addAbility(new KickerAbility(new KickerManaCost("{2}{B}"))); // Target creature gets +3/+0 until end of turn. If Vampire's Bite was kicked, that creature gains lifelink until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/zendikar/VinesOfVastwood.java b/Mage.Sets/src/mage/sets/zendikar/VinesOfVastwood.java index 6d019bee41e..d77c4781a0e 100644 --- a/Mage.Sets/src/mage/sets/zendikar/VinesOfVastwood.java +++ b/Mage.Sets/src/mage/sets/zendikar/VinesOfVastwood.java @@ -39,6 +39,7 @@ import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.target.common.TargetCreaturePermanent; @@ -53,11 +54,16 @@ public class VinesOfVastwood extends CardImpl { super(ownerId, 193, "Vines of Vastwood", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); this.expansionSetCode = "ZEN"; this.color.setGreen(true); + + // Kicker {G} (You may pay an additional {G} as you cast this spell.) + this.addAbility(new KickerAbility(new KickerManaCost("{G}"))); + + // Target creature can't be the target of spells or abilities your opponents control this turn. TargetCreaturePermanent target = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(target); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addOptionalCost(new KickerManaCost("{G}")); + // If Vines of Vastwood was kicked, that creature gets +4/+4 until end of turn. this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn), KickedCondition.getInstance(), staticText)); }