diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index a3c6e9f9e8..7db556d598 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -58,7 +58,7 @@ import mage.abilities.costs.mana.MonoHybridManaCost; import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.Effect; import mage.abilities.effects.ReplacementEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.EquipAbility; @@ -463,7 +463,7 @@ public class ComputerPlayer> extends PlayerImpl i if (playableAbilities.size() > 0) { for (ActivatedAbility ability: playableAbilities) { if (ability.canActivate(playerId, game)) { - if (!(ability.getEffects().get(0) instanceof BecomesCreatureSourceEOTEffect)) { + if (!(ability.getEffects().get(0) instanceof BecomesCreatureSourceEffect)) { if (this.activateAbility(ability, game)) return; } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/JadeIdol.java b/Mage.Sets/src/mage/sets/championsofkamigawa/JadeIdol.java index 4030acd42d..f4a284750a 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/JadeIdol.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/JadeIdol.java @@ -32,10 +32,11 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.SpellCastTriggeredAbility; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.filter.Filter; import mage.filter.FilterCard; @@ -57,7 +58,7 @@ public class JadeIdol extends CardImpl { public JadeIdol(UUID ownerId) { super(ownerId, 256, "Jade Idol", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "CHK"; - this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEOTEffect(new JadeIdolToken(), ""), filter, false)); + this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEffect(new JadeIdolToken(), "", Duration.EndOfTurn), filter, false)); } public JadeIdol(final JadeIdol card) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java index 79a220f8ea..3663a6c1b7 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java @@ -30,18 +30,17 @@ package mage.sets.championsofkamigawa; import java.util.UUID; -import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SpellCastTriggeredAbility; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.filter.Filter; import mage.filter.FilterCard; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; import mage.target.common.TargetLandPermanent; /** @@ -64,7 +63,7 @@ public class Soilshaper extends CardImpl { this.color.setGreen(true); this.power = new MageInt(1); this.toughness = new MageInt(1); - Ability ability = new SpellCastTriggeredAbility(new SoilshaperEffect(), filter, false); + Ability ability = new SpellCastTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), "land", Duration.EndOfTurn), filter, false); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); } @@ -80,51 +79,13 @@ public class Soilshaper extends CardImpl { } -class SoilshaperEffect extends ContinuousEffectImpl { +class SoilshaperToken extends Token { - public SoilshaperEffect() { - super(Constants.Duration.EndOfTurn, Constants.Outcome.BecomeCreature); - staticText = "target land becomes a 3/3 creature until end of turn. It's still a land"; - } + public SoilshaperToken() { + super("", "3/3"); + this.cardType.add(CardType.CREATURE); - public SoilshaperEffect(final SoilshaperEffect effect) { - super(effect); - } - - @Override - public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == Constants.SubLayer.NA) { - permanent.getCardType().add(CardType.CREATURE); - } - break; - case PTChangingEffects_7: - if (sublayer == Constants.SubLayer.SetPT_7b) { - permanent.getPower().setValue(3); - permanent.getToughness().setValue(3); - } - } - return true; - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public SoilshaperEffect copy() { - return new SoilshaperEffect(this); - } - - @Override - public boolean hasLayer(Constants.Layer layer) { - return layer == Constants.Layer.PTChangingEffects_7 || layer == Constants.Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4; - } - -} \ No newline at end of file + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/sets/darksteel/BlinkmothNexus.java b/Mage.Sets/src/mage/sets/darksteel/BlinkmothNexus.java index eef6cd9b8d..76e43483ee 100644 --- a/Mage.Sets/src/mage/sets/darksteel/BlinkmothNexus.java +++ b/Mage.Sets/src/mage/sets/darksteel/BlinkmothNexus.java @@ -32,13 +32,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.mana.ColorlessManaAbility; @@ -64,7 +65,7 @@ public class BlinkmothNexus extends CardImpl { super(ownerId, 163, "Blinkmoth Nexus", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "DST"; this.addAbility(new ColorlessManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new BlinkmothNexusToken(), "land"), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new BlinkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1))); Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Constants.Duration.EndOfTurn), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/darksteel/DarksteelBrute.java b/Mage.Sets/src/mage/sets/darksteel/DarksteelBrute.java index 508c32ae88..62ec38de63 100644 --- a/Mage.Sets/src/mage/sets/darksteel/DarksteelBrute.java +++ b/Mage.Sets/src/mage/sets/darksteel/DarksteelBrute.java @@ -32,11 +32,12 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; @@ -51,7 +52,7 @@ public class DarksteelBrute extends CardImpl { super(ownerId, 108, "Darksteel Brute", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "DST"; this.addAbility(IndestructibleAbility.getInstance()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new DarksteelBruteToken(), ""), new GenericManaCost(3))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DarksteelBruteToken(), "", Duration.EndOfTurn), new GenericManaCost(3))); } public DarksteelBrute (final DarksteelBrute card) { diff --git a/Mage.Sets/src/mage/sets/guildpact/GruulWarPlow.java b/Mage.Sets/src/mage/sets/guildpact/GruulWarPlow.java index 7a5c4072e8..5bbb10642c 100644 --- a/Mage.Sets/src/mage/sets/guildpact/GruulWarPlow.java +++ b/Mage.Sets/src/mage/sets/guildpact/GruulWarPlow.java @@ -30,12 +30,13 @@ package mage.sets.guildpact; import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -51,7 +52,7 @@ public class GruulWarPlow extends CardImpl { super(ownerId, 151, "Gruul War Plow", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "GPT"; this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault()))); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GruulWarPlowToken(), ""), new ManaCostsImpl("{1}{R}{G}"))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GruulWarPlowToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}"))); } public GruulWarPlow(final GruulWarPlow card) { diff --git a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java index 5db218cc4f..f368b35688 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java +++ b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java @@ -31,18 +31,13 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; -import mage.Constants.Layer; -import mage.Constants.Outcome; import mage.Constants.Rarity; -import mage.Constants.SubLayer; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.target.common.TargetLandPermanent; @@ -66,7 +61,7 @@ public class AwakenerDruid extends CardImpl { this.subtype.add("Druid"); this.power = new MageInt(1); this.toughness = new MageInt(1); - Ability ability = new EntersBattlefieldTriggeredAbility(new AwakenerDruidEffect(), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new BecomesCreatureTargetEffect(new AwakenerDruidToken(), "land", Duration.WhileOnBattlefield), false); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); } @@ -82,67 +77,6 @@ public class AwakenerDruid extends CardImpl { } } -class AwakenerDruidEffect extends ContinuousEffectImpl { - - protected static AwakenerDruidToken token = new AwakenerDruidToken(); - - public AwakenerDruidEffect() { - super(Duration.WhileOnBattlefield, Outcome.BecomeCreature); - staticText = "target Forest becomes a 4/5 green Treefolk creature for as long as {this} is on the battlefield. It's still a land."; - } - - public AwakenerDruidEffect(final AwakenerDruidEffect effect) { - super(effect); - } - - @Override - public AwakenerDruidEffect copy() { - return new AwakenerDruidEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == SubLayer.NA) { - if (token.getCardType().size() > 0) - permanent.getCardType().addAll(token.getCardType()); - if (token.getSubtype().size() > 0) - permanent.getSubtype().addAll(token.getSubtype()); - } - break; - case ColorChangingEffects_5: - if (sublayer == SubLayer.NA) { - if (token.getColor().hasColor()) - permanent.getColor().setColor(token.getColor()); - } - break; - case PTChangingEffects_7: - if (sublayer == SubLayer.SetPT_7b) { - if (token.getPower() != MageInt.EmptyMageInt) - permanent.getPower().setValue(token.getPower().getValue()); - if (token.getToughness() != MageInt.EmptyMageInt) - permanent.getToughness().setValue(token.getToughness().getValue()); - } - } - } - return true; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.PTChangingEffects_7 || layer == Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4; - } - -} - class AwakenerDruidToken extends Token { public AwakenerDruidToken() { diff --git a/Mage.Sets/src/mage/sets/magic2012/Skinshifter.java b/Mage.Sets/src/mage/sets/magic2012/Skinshifter.java index 226c228420..6ccf9c96cf 100644 --- a/Mage.Sets/src/mage/sets/magic2012/Skinshifter.java +++ b/Mage.Sets/src/mage/sets/magic2012/Skinshifter.java @@ -29,6 +29,7 @@ package mage.sets.magic2012; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; @@ -36,7 +37,7 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.ActivateOncePerTurnActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -59,15 +60,15 @@ public class Skinshifter extends CardImpl { this.toughness = new MageInt(1); Ability ability = new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD, - new BecomesCreatureSourceEOTEffect(new RhinoToken(), ""), + new BecomesCreatureSourceEffect(new RhinoToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{G}")); Mode mode = new Mode(); - mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new BirdToken(), "")); + mode.getEffects().add(new BecomesCreatureSourceEffect(new BirdToken(), "", Duration.EndOfTurn)); ability.addMode(mode); mode = new Mode(); - mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new PlantToken(), "")); + mode.getEffects().add(new BecomesCreatureSourceEffect(new PlantToken(), "", Duration.EndOfTurn)); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java index 9ff05daf55..6a84a5f5b8 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java +++ b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java @@ -31,17 +31,18 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; +import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; import mage.target.common.TargetLandPermanent; /** @@ -53,7 +54,7 @@ public class LifesparkSpellbomb extends CardImpl { public LifesparkSpellbomb(UUID ownerId) { super(ownerId, 197, "Lifespark Spellbomb", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); this.expansionSetCode = "MRD"; - Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new LifesparkSpellbombEffect(), new ColoredManaCost(Constants.ColoredManaSymbol.G)); + Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new LifesparkSpellbombToken(), "land", Duration.EndOfTurn), new ColoredManaCost(Constants.ColoredManaSymbol.G)); firstAbility.addCost(new SacrificeSourceCost()); firstAbility.addTarget(new TargetLandPermanent()); this.addAbility(firstAbility); @@ -71,54 +72,15 @@ public class LifesparkSpellbomb extends CardImpl { return new LifesparkSpellbomb(this); } - } -class LifesparkSpellbombEffect extends ContinuousEffectImpl { +class LifesparkSpellbombToken extends Token { - public LifesparkSpellbombEffect() { - super(Constants.Duration.EndOfTurn, Constants.Outcome.BecomeCreature); - staticText = "Until end of turn, target land becomes a 3/3 creature that's still a land"; - } + public LifesparkSpellbombToken() { + super("", "3/3"); + this.cardType.add(CardType.CREATURE); - public LifesparkSpellbombEffect(final LifesparkSpellbombEffect effect) { - super(effect); - } - - @Override - public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == Constants.SubLayer.NA) { - permanent.getCardType().add(CardType.CREATURE); - } - break; - case PTChangingEffects_7: - if (sublayer == Constants.SubLayer.SetPT_7b) { - permanent.getPower().setValue(3); - permanent.getToughness().setValue(3); - } - } - return true; - } - return false; + this.power = new MageInt(3); + this.toughness = new MageInt(3); } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public LifesparkSpellbombEffect copy() { - return new LifesparkSpellbombEffect(this); - } - - @Override - public boolean hasLayer(Constants.Layer layer) { - return layer == Constants.Layer.PTChangingEffects_7 || layer == layer.TypeChangingEffects_4; - } - -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java index 3c01246107..9ece2fb7da 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java @@ -30,12 +30,13 @@ package mage.sets.mirrodinbesieged; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.InfectAbility; import mage.abilities.mana.ColorlessManaAbility; @@ -52,7 +53,7 @@ public class InkmothNexus extends CardImpl { super(ownerId, 145, "Inkmoth Nexus", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "MBS"; this.addAbility(new ColorlessManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new InkmothNexusToken(), "land"), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new InkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1))); } public InkmothNexus (final InkmothNexus card) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java index 57e586ed88..98cff101d2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java @@ -38,7 +38,7 @@ import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.RequirementEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.PreventAllDamageSourceEffect; @@ -79,7 +79,7 @@ public class GideonJura extends CardImpl { ability2.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability2); - LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureSourceEOTEffect(new GideonJuraToken(), "planeswalker"), 0); + LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonJuraToken(), "planeswalker", Duration.EndOfTurn), 0); ability3.addEffect(new PreventAllDamageSourceEffect(Duration.EndOfTurn)); this.addAbility(ability3); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java index 78c849a70d..010afe155a 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java @@ -47,7 +47,7 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersCount; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.game.Game; @@ -66,7 +66,7 @@ public class ChimericMass extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new ChimericMassEffect(), "{this} enters the battlefield with X charge counters on it")); Costs costs = new CostsImpl(); costs.add(new GenericManaCost(1)); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ChimericMassToken(), ""), costs)); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericMassToken(), "", Duration.EndOfTurn), costs)); } public ChimericMass(final ChimericMass card) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java index 42da6b9404..17e43e31ac 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java @@ -32,13 +32,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Abilities; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.game.Game; @@ -57,8 +58,7 @@ public class GlintHawkIdol extends CardImpl { super(ownerId, 156, "Glint Hawk Idol", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "SOM"; this.addAbility(new GlintHawkIdolTriggeredAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), new ColoredManaCost(Constants.ColoredManaSymbol.W))); - + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GlintHawkIdolToken(), "", Duration.EndOfTurn), new ColoredManaCost(Constants.ColoredManaSymbol.W))); } public GlintHawkIdol (final GlintHawkIdol card) { @@ -74,7 +74,7 @@ public class GlintHawkIdol extends CardImpl { class GlintHawkIdolTriggeredAbility extends TriggeredAbilityImpl { GlintHawkIdolTriggeredAbility() { - super(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), true); + super(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GlintHawkIdolToken(), "", Duration.EndOfTurn), true); } GlintHawkIdolTriggeredAbility(final GlintHawkIdolTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java index f35745cf33..b3211e8f83 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java @@ -35,6 +35,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; +import mage.MageInt; import mage.Mana; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; @@ -46,12 +47,14 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DynamicManaEffect; import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetLandPermanent; @@ -77,7 +80,7 @@ public class KothOfTheHammer extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), "")); Ability ability = new LoyaltyAbility(new UntapTargetEffect(), 1); - ability.addEffect(new KothOfTheHammerFirstEffect()); + ability.addEffect(new BecomesCreatureTargetEffect(new KothOfTheHammerToken(), "land", Duration.EndOfTurn)); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); this.addAbility(new LoyaltyAbility(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(filterCount)), -2)); @@ -93,60 +96,17 @@ public class KothOfTheHammer extends CardImpl { return new KothOfTheHammer(this); } } +class KothOfTheHammerToken extends Token { -class KothOfTheHammerFirstEffect extends ContinuousEffectImpl { + public KothOfTheHammerToken() { + super("Elemental", "4/4 red Elemental"); + this.cardType.add(CardType.CREATURE); + this.subtype.add("Elemental"); - public KothOfTheHammerFirstEffect() { - super(Duration.EndOfTurn, Constants.Outcome.BecomeCreature); - staticText = "It becomes a 4/4 red Elemental creature until end of turn. It's still a land"; - } - - public KothOfTheHammerFirstEffect(final KothOfTheHammerFirstEffect effect) { - super(effect); - } - - @Override - public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == Constants.SubLayer.NA) { - permanent.getCardType().add(CardType.CREATURE); - permanent.getSubtype().add("Elemental"); - } - break; - case ColorChangingEffects_5: - if (sublayer == Constants.SubLayer.NA) { - permanent.getColor().setRed(true); - } - break; - case PTChangingEffects_7: - if (sublayer == Constants.SubLayer.SetPT_7b) { - permanent.getPower().setValue(4); - permanent.getToughness().setValue(4); - } - } - return true; - } - return false; + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public KothOfTheHammerFirstEffect copy() { - return new KothOfTheHammerFirstEffect(this); - } - - @Override - public boolean hasLayer(Constants.Layer layer) { - return layer == Constants.Layer.PTChangingEffects_7 || layer == Constants.Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4; - } - } class KothOfTheHammerThirdEffect extends ContinuousEffectImpl { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/RustedRelic.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/RustedRelic.java index 4ac8511406..d9c169bebf 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/RustedRelic.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/RustedRelic.java @@ -32,13 +32,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.Metalcraft; import mage.abilities.decorator.ConditionalContinousEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.game.permanent.token.Token; @@ -54,7 +55,7 @@ public class RustedRelic extends CardImpl { this.addAbility( new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( - new BecomesCreatureSourceEOTEffect(new RustedRelicToken(), "artifact"), + new BecomesCreatureSourceEffect(new RustedRelicToken(), "artifact", Duration.Custom), Metalcraft.getInstance(), "Metalcraft - Rusted Relic is a 5/5 Golem artifact creature as long as you control three or more artifacts"))); } diff --git a/Mage.Sets/src/mage/sets/tempest/StalkingStones.java b/Mage.Sets/src/mage/sets/tempest/StalkingStones.java index 88120d7063..2804481071 100644 --- a/Mage.Sets/src/mage/sets/tempest/StalkingStones.java +++ b/Mage.Sets/src/mage/sets/tempest/StalkingStones.java @@ -31,15 +31,15 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; -import mage.abilities.Ability; +import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; /** * @@ -51,7 +51,7 @@ public class StalkingStones extends CardImpl { super(ownerId, 333, "Stalking Stones", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "TMP"; this.addAbility(new ColorlessManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new StalkingStonesEffect(), new GenericManaCost(6))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StalkingStonesToken(), "land", Duration.WhileOnBattlefield), new GenericManaCost(6))); } public StalkingStones(final StalkingStones card) { @@ -64,52 +64,14 @@ public class StalkingStones extends CardImpl { } } -class StalkingStonesEffect extends ContinuousEffectImpl { +class StalkingStonesToken extends Token { - public StalkingStonesEffect() { - super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.BecomeCreature); - staticText = "{this} becomes a 3/3 Elemental artifact creature that's still a land"; - } + public StalkingStonesToken() { + super("Elemental", "3/3 Elemental artifact"); + this.cardType.add(CardType.CREATURE); + this.cardType.add(CardType.ARTIFACT); - public StalkingStonesEffect(final StalkingStonesEffect effect) { - super(effect); - } - - @Override - public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == Constants.SubLayer.NA) { - permanent.getCardType().add(CardType.ARTIFACT); - permanent.getCardType().add(CardType.CREATURE); - permanent.getSubtype().add("Elemental"); - } - break; - case PTChangingEffects_7: - if (sublayer == Constants.SubLayer.SetPT_7b) { - permanent.getPower().setValue(3); - permanent.getToughness().setValue(3); - } - } - return true; - } - return false; + this.power = new MageInt(3); + this.toughness = new MageInt(3); } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public StalkingStonesEffect copy() { - return new StalkingStonesEffect(this); - } - - @Override - public boolean hasLayer(Constants.Layer layer) { - return layer == Constants.Layer.PTChangingEffects_7 || layer == layer.TypeChangingEffects_4; - } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/tenth/FaerieConclave.java b/Mage.Sets/src/mage/sets/tenth/FaerieConclave.java index c0a531a128..bdb07f418f 100644 --- a/Mage.Sets/src/mage/sets/tenth/FaerieConclave.java +++ b/Mage.Sets/src/mage/sets/tenth/FaerieConclave.java @@ -31,13 +31,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; @@ -54,7 +55,7 @@ public class FaerieConclave extends CardImpl { this.expansionSetCode = "10E"; this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlueManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new FaerieConclaveToken(), "land"), new ManaCostsImpl("{1}{U}"))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new FaerieConclaveToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); } public FaerieConclave(final FaerieConclave card) { diff --git a/Mage.Sets/src/mage/sets/tenth/ForbiddingWatchtower.java b/Mage.Sets/src/mage/sets/tenth/ForbiddingWatchtower.java index 9462f93b15..3b9570f7c9 100644 --- a/Mage.Sets/src/mage/sets/tenth/ForbiddingWatchtower.java +++ b/Mage.Sets/src/mage/sets/tenth/ForbiddingWatchtower.java @@ -31,13 +31,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.WhiteManaAbility; @@ -55,7 +56,7 @@ public class ForbiddingWatchtower extends CardImpl { this.expansionSetCode = "10E"; this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ForbiddingWatchtowerToken(), "land"), new ManaCostsImpl("{1}{W}"))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ForbiddingWatchtowerToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"))); } public ForbiddingWatchtower(final ForbiddingWatchtower card) { diff --git a/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java b/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java index 9c918fec07..69402460cf 100644 --- a/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java +++ b/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java @@ -29,13 +29,14 @@ package mage.sets.tenth; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; @@ -54,7 +55,7 @@ public class GhituEncampment extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new RedManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BecomesCreatureSourceEOTEffect(new GhituEncampmentToken(), "land"), + new BecomesCreatureSourceEffect(new GhituEncampmentToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); } diff --git a/Mage.Sets/src/mage/sets/tenth/SpawningPool.java b/Mage.Sets/src/mage/sets/tenth/SpawningPool.java index 6268672fa5..cb875c916c 100644 --- a/Mage.Sets/src/mage/sets/tenth/SpawningPool.java +++ b/Mage.Sets/src/mage/sets/tenth/SpawningPool.java @@ -31,6 +31,7 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.ObjectColor; @@ -39,7 +40,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; @@ -55,7 +56,7 @@ public class SpawningPool extends CardImpl { this.expansionSetCode = "10E"; this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new SkeletonToken(), "land"), new ManaCostsImpl("{1}{B}"))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new SkeletonToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"))); } public SpawningPool(final SpawningPool card) { diff --git a/Mage.Sets/src/mage/sets/tenth/TreetopVillage.java b/Mage.Sets/src/mage/sets/tenth/TreetopVillage.java index 3780502368..a5efbb90d2 100644 --- a/Mage.Sets/src/mage/sets/tenth/TreetopVillage.java +++ b/Mage.Sets/src/mage/sets/tenth/TreetopVillage.java @@ -31,6 +31,7 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.MageInt; import mage.ObjectColor; @@ -39,7 +40,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; @@ -56,7 +57,7 @@ public class TreetopVillage extends CardImpl { this.expansionSetCode = "10E"; this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new GreenManaAbility()); - this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ApeToken(), "land"), new ManaCostsImpl("{1}{G}"))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ApeToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); } public TreetopVillage(final TreetopVillage card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java b/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java index 751c66bcc4..57947e2cff 100644 --- a/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java +++ b/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java @@ -30,13 +30,14 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.abilities.mana.BlueManaAbility; @@ -56,7 +57,7 @@ public class CelestialColonnade extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CelestialColonnadeToken(), "land"), new ManaCostsImpl("{3}{W}{U}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new CelestialColonnadeToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{3}{W}{U}"))); } public CelestialColonnade(final CelestialColonnade card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/CreepingTarPit.java b/Mage.Sets/src/mage/sets/worldwake/CreepingTarPit.java index c0fe3ab85b..bd9e732d73 100644 --- a/Mage.Sets/src/mage/sets/worldwake/CreepingTarPit.java +++ b/Mage.Sets/src/mage/sets/worldwake/CreepingTarPit.java @@ -30,13 +30,14 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.UnblockableAbility; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; @@ -55,7 +56,7 @@ public class CreepingTarPit extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CreepingTarPitToken(), "land"), new ManaCostsImpl("{1}{U}{B}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new CreepingTarPitToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{U}{B}"))); } public CreepingTarPit (final CreepingTarPit card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java b/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java index a29c72cddd..8db4f07f98 100644 --- a/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java +++ b/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java @@ -30,12 +30,13 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; @@ -50,7 +51,7 @@ public class DreadStatuary extends CardImpl { super(ownerId, 135, "Dread Statuary", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "WWK"; this.addAbility(new ColorlessManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new DreadStatuaryToken(), "land"), new ManaCostsImpl("{4}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DreadStatuaryToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{4}"))); } public DreadStatuary(final DreadStatuary card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java b/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java index 818566c8b6..a03bf93695 100644 --- a/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java +++ b/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java @@ -37,7 +37,7 @@ import mage.MageInt; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continious.BoostPowerXSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; @@ -56,7 +56,7 @@ public class LavaclawReaches extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new LavaclawReachesToken(), "land"), new ManaCostsImpl("{1}{B}{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LavaclawReachesToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{B}{R}"))); } public LavaclawReaches(final LavaclawReaches card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java index 2095768c13..178eda7873 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java +++ b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; @@ -37,7 +38,7 @@ import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; @@ -57,7 +58,7 @@ public class RagingRavine extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new GreenManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new RagingRavineToken(), "land"), new ManaCostsImpl("{2}{R}{G}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new RagingRavineToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{2}{R}{G}"))); } public RagingRavine(final RagingRavine card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java b/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java index 0c09e1b696..527b4fe88f 100644 --- a/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java +++ b/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java @@ -30,13 +30,14 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect; import mage.abilities.keyword.ReachAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; @@ -55,7 +56,7 @@ public class StirringWildwood extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new StirringWildwoodToken(), "land"), new ManaCostsImpl("{1}{G}{W}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StirringWildwoodToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{G}{W}"))); } public StirringWildwood(final StirringWildwood card) { diff --git a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEOTEffect.java b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEffect.java similarity index 87% rename from Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEOTEffect.java rename to Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEffect.java index 8e763dd6cd..bb2c94c3ca 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEOTEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureSourceEffect.java @@ -44,27 +44,27 @@ import mage.game.permanent.token.Token; * * @author BetaSteward_at_googlemail.com */ -public class BecomesCreatureSourceEOTEffect extends ContinuousEffectImpl { +public class BecomesCreatureSourceEffect extends ContinuousEffectImpl { protected Token token; protected String type; - public BecomesCreatureSourceEOTEffect(Token token, String type) { - super(Duration.EndOfTurn, Outcome.BecomeCreature); + public BecomesCreatureSourceEffect(Token token, String type, Duration duration) { + super(duration, Outcome.BecomeCreature); this.token = token; this.type = type; setText(); } - public BecomesCreatureSourceEOTEffect(final BecomesCreatureSourceEOTEffect effect) { + public BecomesCreatureSourceEffect(final BecomesCreatureSourceEffect effect) { super(effect); this.token = effect.token.copy(); this.type = effect.type; } @Override - public BecomesCreatureSourceEOTEffect copy() { - return new BecomesCreatureSourceEOTEffect(this); + public BecomesCreatureSourceEffect copy() { + return new BecomesCreatureSourceEffect(this); } @Override @@ -118,9 +118,9 @@ public class BecomesCreatureSourceEOTEffect extends ContinuousEffectImpl 0) - staticText = "Until end of turn {this} becomes a " + token.getDescription() + " that's still a " + this.type; + staticText = duration.toString() + " {this} becomes a " + token.getDescription() + " that's still a " + this.type; else - staticText = "Until end of turn {this} becomes a " + token.getDescription(); + staticText = duration.toString() + " {this} becomes a " + token.getDescription(); } @Override