From 04648eb0eba7a4fc401e6131c37304dc0555bf15 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 18 Nov 2014 23:42:51 +0100 Subject: [PATCH] * Fixed that lose all abilities dd not lose the colors of the target. --- .../sets/championsofkamigawa/Soilshaper.java | 2 +- .../mage/sets/dragonsmaze/Dragonshift.java | 5 +- .../src/mage/sets/dragonsmaze/TurnBurn.java | 7 +-- .../src/mage/sets/eventide/Snakeform.java | 10 ++-- .../src/mage/sets/gatecrash/Hydroform.java | 2 +- .../mage/sets/gatecrash/SkarrgGuildmage.java | 2 +- .../mage/sets/guildpact/SiegeOfTowers.java | 2 +- .../mage/sets/lorwyn/ElvishBranchbender.java | 2 +- .../mage/sets/magic2010/AwakenerDruid.java | 4 +- .../src/mage/sets/magic2012/TurnToFrog.java | 7 +-- .../mage/sets/magic2015/NissaWorldwaker.java | 4 +- .../sets/magic2015/PolymorphistsJest.java | 5 ++ .../sets/mirrodin/LifesparkSpellbomb.java | 13 +++-- .../sets/morningtide/FendeepSummoner.java | 4 +- .../sets/onslaught/KamahlFistOfKrosa.java | 2 +- .../sets/scarsofmirrodin/KothOfTheHammer.java | 2 +- .../sets/theros/AnthousaSetessanHero.java | 2 +- .../mage/sets/worldwake/VastwoodAnimist.java | 2 +- .../BecomesCreatureTargetEffect.java | 47 ++++++++++++++----- .../mage/game/permanent/token/FrogToken.java | 1 - 20 files changed, 73 insertions(+), 52 deletions(-) diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java index 159591eeb8..a2dfac9acc 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Soilshaper.java @@ -58,7 +58,7 @@ public class Soilshaper extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a Spirit or Arcane spell, target land becomes a 3/3 creature until end of turn. It's still a land. - Ability ability = new SpellCastControllerTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), "land", Duration.EndOfTurn), filter, false); + Ability ability = new SpellCastControllerTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), false, true, Duration.EndOfTurn), filter, false); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java b/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java index f56a87a2cf..27114cec3d 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java @@ -68,10 +68,7 @@ public class Dragonshift extends CardImpl { this.color.setBlue(true); // Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying. - Effect effect = new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn); - effect.setText(""); - this.getSpellAbility().addEffect(effect); - effect = new BecomesCreatureTargetEffect(new DragonToken(), null, Duration.EndOfTurn); + Effect effect = new BecomesCreatureTargetEffect(new DragonToken(), true, false, Duration.EndOfTurn); effect.setText("Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/TurnBurn.java b/Mage.Sets/src/mage/sets/dragonsmaze/TurnBurn.java index c1b5fe2f9f..1367481e7d 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/TurnBurn.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/TurnBurn.java @@ -58,11 +58,8 @@ public class TurnBurn extends SplitCard { // Turn // Until end of turn, target creature loses all abilities and becomes a red Weird with base power and toughness 0/1. getLeftHalfCard().getColor().setBlue(true); - Effect effect = new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn); - effect.setText("Until end of turn, target creature loses all abilities"); - getLeftHalfCard().getSpellAbility().addEffect(effect); - effect = new BecomesCreatureTargetEffect(new WeirdToken(), null, Duration.EndOfTurn); - effect.setText("and becomes a red Weird with base power and toughness 0/1"); + Effect effect = new BecomesCreatureTargetEffect(new WeirdToken(), true, false, Duration.EndOfTurn); + effect.setText("Until end of turn, target creature loses all abilities and becomes a red Weird with base power and toughness 0/1"); getLeftHalfCard().getSpellAbility().addEffect(effect); getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/eventide/Snakeform.java b/Mage.Sets/src/mage/sets/eventide/Snakeform.java index 4338b6835c..50658d612a 100644 --- a/Mage.Sets/src/mage/sets/eventide/Snakeform.java +++ b/Mage.Sets/src/mage/sets/eventide/Snakeform.java @@ -53,13 +53,9 @@ public class Snakeform extends CardImpl { this.color.setBlue(true); this.color.setGreen(true); - // Until end of turn, target creature loses all abilities - Effect effect = new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn); - effect.setText("Until end of turn, target creature loses all abilities"); - this.getSpellAbility().addEffect(effect); - // and becomes a green Snake with base power and toughness 1/1. - effect = new BecomesCreatureTargetEffect(new SnakeToken(), null, Duration.EndOfTurn); - effect.setText("and becomes a green Snake with base power and toughness 1/1"); + // Until end of turn, target creature loses all abilities and becomes a green Snake with base power and toughness 1/1. + Effect effect = new BecomesCreatureTargetEffect(new SnakeToken(), true, false, Duration.EndOfTurn); + effect.setText("Until end of turn, target creature loses all abilities and becomes a green Snake with base power and toughness 1/1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/gatecrash/Hydroform.java b/Mage.Sets/src/mage/sets/gatecrash/Hydroform.java index f15b018c89..3b199e946a 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/Hydroform.java +++ b/Mage.Sets/src/mage/sets/gatecrash/Hydroform.java @@ -53,7 +53,7 @@ public class Hydroform extends CardImpl { this.color.setGreen(true); // Target land becomes a 3/3 Elemental creature with flying until end of turn. It's still a land. - this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new HydroformToken(), "land", Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new HydroformToken(), false, true, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetLandPermanent()); } diff --git a/Mage.Sets/src/mage/sets/gatecrash/SkarrgGuildmage.java b/Mage.Sets/src/mage/sets/gatecrash/SkarrgGuildmage.java index d5d8b50edc..45ba7fbb01 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/SkarrgGuildmage.java +++ b/Mage.Sets/src/mage/sets/gatecrash/SkarrgGuildmage.java @@ -75,7 +75,7 @@ public class SkarrgGuildmage extends CardImpl { Zone.BATTLEFIELD, new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), "Creatures you control gain trample until end of turn"), new ManaCostsImpl("{R}{G}"))); // {1}{R}{G}: Target land you control becomes a 4/4 Elemental creature until end of turn. It's still a land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new SkarrgGuildmageToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}") ); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new SkarrgGuildmageToken(), false, true, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}") ); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/guildpact/SiegeOfTowers.java b/Mage.Sets/src/mage/sets/guildpact/SiegeOfTowers.java index 820df95abc..e53ef56857 100644 --- a/Mage.Sets/src/mage/sets/guildpact/SiegeOfTowers.java +++ b/Mage.Sets/src/mage/sets/guildpact/SiegeOfTowers.java @@ -62,7 +62,7 @@ public class SiegeOfTowers extends CardImpl { // Replicate {1}{R} this.addAbility(new ReplicateAbility(this, "{1}{R}")); // Target Mountain becomes a 3/1 creature. It's still a land. - Effect effect = new BecomesCreatureTargetEffect(new SiegeOfTowersToken(), "land", Duration.EndOfGame); + Effect effect = new BecomesCreatureTargetEffect(new SiegeOfTowersToken(), false, true, Duration.EndOfGame); effect.setText("Target Mountain becomes a 3/1 creature. It's still a land"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/lorwyn/ElvishBranchbender.java b/Mage.Sets/src/mage/sets/lorwyn/ElvishBranchbender.java index 96890487e7..0a7fc15bbf 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/ElvishBranchbender.java +++ b/Mage.Sets/src/mage/sets/lorwyn/ElvishBranchbender.java @@ -110,7 +110,7 @@ class ElvishBranchbenderEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int xValue = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); - ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), "", Duration.EndOfTurn); + ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), false, false, Duration.EndOfTurn); effect.setTargetPointer(targetPointer); game.addEffect(effect, source); return false; diff --git a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java index 26e0e4b1ce..febf03d040 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java +++ b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java @@ -88,7 +88,7 @@ public class AwakenerDruid extends CardImpl { class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect { public AwakenerDruidBecomesCreatureEffect() { - super(new AwakenerDruidToken(), "land", Duration.WhileOnBattlefield); + super(new AwakenerDruidToken(), false, true, Duration.WhileOnBattlefield); } public AwakenerDruidBecomesCreatureEffect(final AwakenerDruidBecomesCreatureEffect effect) { @@ -112,7 +112,7 @@ class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect { @Override public String getText(Mode mode) { - return "target Forest becomes a 4/5 green Treefolk creature for as long as Awakener Druid remains on the battlefield. It's still a land"; + return "target Forest becomes a 4/5 green Treefolk creature for as long as {this} remains on the battlefield. It's still a land"; } } diff --git a/Mage.Sets/src/mage/sets/magic2012/TurnToFrog.java b/Mage.Sets/src/mage/sets/magic2012/TurnToFrog.java index 9bda2e70b9..c19bc1f50b 100644 --- a/Mage.Sets/src/mage/sets/magic2012/TurnToFrog.java +++ b/Mage.Sets/src/mage/sets/magic2012/TurnToFrog.java @@ -51,11 +51,8 @@ public class TurnToFrog extends CardImpl { this.color.setBlue(true); // Until end of turn, target creature loses all abilities and becomes a blue Frog with base power and toughness 1/1. - Effect effect = new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn); - effect.setText("Until end of turn, target creature loses all abilities"); - this.getSpellAbility().addEffect(effect); - effect = new BecomesCreatureTargetEffect(new FrogToken(), null, Duration.EndOfTurn); - effect.setText("and becomes a blue Frog with base power and toughness 1/1"); + Effect effect = new BecomesCreatureTargetEffect(new FrogToken(), true, false, Duration.EndOfTurn); + effect.setText("Until end of turn, target creature loses all abilities and becomes a blue Frog with base power and toughness 1/1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/sets/magic2015/NissaWorldwaker.java b/Mage.Sets/src/mage/sets/magic2015/NissaWorldwaker.java index 474a1ff20d..9a00479e1a 100644 --- a/Mage.Sets/src/mage/sets/magic2015/NissaWorldwaker.java +++ b/Mage.Sets/src/mage/sets/magic2015/NissaWorldwaker.java @@ -84,7 +84,7 @@ public class NissaWorldwaker extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false)); // +1: Target land you control becomes a 4/4 Elemental creature with trample. It's still a land. - LoyaltyAbility ability = new LoyaltyAbility(new BecomesCreatureTargetEffect(new NissaWorldwakerToken(), "land", Duration.Custom), 1); + LoyaltyAbility ability = new LoyaltyAbility(new BecomesCreatureTargetEffect(new NissaWorldwakerToken(), false, true, Duration.Custom), 1); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); @@ -136,7 +136,7 @@ class NissaWorldwakerSearchEffect extends OneShotEffect { Card card = player.getLibrary().getCard(cardId, game); if (card != null) { if (player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId())) { - ContinuousEffect effect = new BecomesCreatureTargetEffect(new NissaWorldwakerToken(), "land", Duration.Custom); + ContinuousEffect effect = new BecomesCreatureTargetEffect(new NissaWorldwakerToken(), false, true, Duration.Custom); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); } diff --git a/Mage.Sets/src/mage/sets/magic2015/PolymorphistsJest.java b/Mage.Sets/src/mage/sets/magic2015/PolymorphistsJest.java index 832d26db3e..b340f6a49d 100644 --- a/Mage.Sets/src/mage/sets/magic2015/PolymorphistsJest.java +++ b/Mage.Sets/src/mage/sets/magic2015/PolymorphistsJest.java @@ -109,6 +109,11 @@ class PolymorphistsJestEffect extends ContinuousEffectImpl { for(UUID uuid : objects){ Permanent permanent = game.getPermanent(uuid); if (permanent != null){ + permanent.getColor().setBlack(false); + permanent.getColor().setGreen(false); + permanent.getColor().setBlue(false); + permanent.getColor().setWhite(false); + permanent.getColor().setBlack(false); permanent.getColor().setColor(ObjectColor.BLUE); } } diff --git a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java index 97e04e519c..8def04fa46 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java +++ b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java @@ -28,8 +28,6 @@ package mage.sets.mirrodin; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,6 +37,11 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.permanent.token.Token; import mage.target.common.TargetLandPermanent; @@ -51,10 +54,14 @@ 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(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new LifesparkSpellbombToken(), "land", Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.G)); + + // {G}, Sacrifice Lifespark Spellbomb: Until end of turn, target land becomes a 3/3 creature that's still a land. + Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new LifesparkSpellbombToken(), false, true, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.G)); firstAbility.addCost(new SacrificeSourceCost()); firstAbility.addTarget(new TargetLandPermanent()); this.addAbility(firstAbility); + + // {1}, Sacrifice Lifespark Spellbomb: Draw a card. Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1)); secondAbility.addCost(new SacrificeSourceCost()); this.addAbility(secondAbility); diff --git a/Mage.Sets/src/mage/sets/morningtide/FendeepSummoner.java b/Mage.Sets/src/mage/sets/morningtide/FendeepSummoner.java index a8663c444a..47956705cc 100644 --- a/Mage.Sets/src/mage/sets/morningtide/FendeepSummoner.java +++ b/Mage.Sets/src/mage/sets/morningtide/FendeepSummoner.java @@ -63,7 +63,9 @@ public class FendeepSummoner extends CardImpl { this.color.setBlack(true); this.power = new MageInt(3); this.toughness = new MageInt(5); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new FendeepSummonerToken(), "land", Duration.EndOfTurn), new TapSourceCost()); + + // {T}: Up to two target Swamps each become 3/5 Treefolk Warrior creatures in addition to their other types until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new FendeepSummonerToken(), false, false, Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetLandPermanent(0, 2, filter, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/KamahlFistOfKrosa.java b/Mage.Sets/src/mage/sets/onslaught/KamahlFistOfKrosa.java index cff4de31a6..4b849735fa 100644 --- a/Mage.Sets/src/mage/sets/onslaught/KamahlFistOfKrosa.java +++ b/Mage.Sets/src/mage/sets/onslaught/KamahlFistOfKrosa.java @@ -62,7 +62,7 @@ public class KamahlFistOfKrosa extends CardImpl { // {G}: Target land becomes a 1/1 creature until end of turn. It's still a land. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BecomesCreatureTargetEffect(new KamahlFistOfKrosaLandToken(), "land", Duration.EndOfTurn), + new BecomesCreatureTargetEffect(new KamahlFistOfKrosaLandToken(), false, true, Duration.EndOfTurn), new ManaCostsImpl("{G}")); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java index 05149b708d..f4868a8f0b 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java @@ -85,7 +85,7 @@ public class KothOfTheHammer extends CardImpl { // +1: Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land. Ability ability = new LoyaltyAbility(new UntapTargetEffect(), 1); - ability.addEffect(new BecomesCreatureTargetEffect(new KothOfTheHammerToken(), "land", Duration.EndOfTurn)); + ability.addEffect(new BecomesCreatureTargetEffect(new KothOfTheHammerToken(), false, true, Duration.EndOfTurn)); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/theros/AnthousaSetessanHero.java b/Mage.Sets/src/mage/sets/theros/AnthousaSetessanHero.java index 256e9079eb..b00e0b4742 100644 --- a/Mage.Sets/src/mage/sets/theros/AnthousaSetessanHero.java +++ b/Mage.Sets/src/mage/sets/theros/AnthousaSetessanHero.java @@ -58,7 +58,7 @@ public class AnthousaSetessanHero extends CardImpl { this.toughness = new MageInt(5); // Heroic - Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands. - Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new AnthousaWarriorToken(), "lands", Duration.EndOfTurn)); + Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new AnthousaWarriorToken(), false, true, Duration.EndOfTurn)); ability.addTarget(new TargetControlledPermanent(0,3,new FilterLandPermanent("lands"), false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java b/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java index 3c37e7ec13..eb6d19d056 100644 --- a/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java +++ b/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java @@ -110,7 +110,7 @@ class VastwoodAnimistEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int amount = new PermanentsOnBattlefieldCount(filterAllies).calculate(game, source, this); - ContinuousEffect effect = new BecomesCreatureTargetEffect(new VastwoodAnimistElementalToken(amount), "land", Duration.EndOfTurn); + ContinuousEffect effect = new BecomesCreatureTargetEffect(new VastwoodAnimistElementalToken(amount), false, true, Duration.EndOfTurn); effect.setTargetPointer(targetPointer); game.addEffect(effect, source); return false; diff --git a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java index 2563cdf7cd..dc22bdded7 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java @@ -48,24 +48,28 @@ import mage.util.CardUtil; public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { protected Token token; - protected String type; + protected boolean loseAllAbilities; + protected boolean addStillALandText; /** * * @param token - * @param type + * @param loseAllAbilities loses all subtypes and colors + * @param stillALand add rule text, "it's still a land" * @param duration */ - public BecomesCreatureTargetEffect(Token token, String type, Duration duration) { + public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration) { super(duration, Outcome.BecomeCreature); this.token = token; - this.type = type; + this.loseAllAbilities = loseAllAbilities; + this.addStillALandText = stillALand; } public BecomesCreatureTargetEffect(final BecomesCreatureTargetEffect effect) { super(effect); token = effect.token.copy(); - type = effect.type; + this.loseAllAbilities = effect.loseAllAbilities; + this.addStillALandText = effect.addStillALandText; } @Override @@ -82,10 +86,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (type == null) { + if (loseAllAbilities) { permanent.getSubtype().clear(); permanent.getSubtype().addAll(token.getSubtype()); - permanent.getCardType().clear(); } else { if (token.getSubtype().size() > 0) { for (String subtype :token.getSubtype()) { @@ -107,12 +110,22 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { break; case ColorChangingEffects_5: if (sublayer == SubLayer.NA) { + if (loseAllAbilities) { + permanent.getColor().setBlack(false); + permanent.getColor().setGreen(false); + permanent.getColor().setBlue(false); + permanent.getColor().setWhite(false); + permanent.getColor().setBlack(false); + } if (token.getColor().hasColor()) { permanent.getColor().setColor(token.getColor()); } } break; case AbilityAddingRemovingEffects_6: + if (loseAllAbilities) { + permanent.removeAllAbilities(source.getSourceId(), game); + } if (sublayer == SubLayer.NA) { if (token.getAbilities().size() > 0) { for (Ability ability : token.getAbilities()) { @@ -155,19 +168,27 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { Target target = mode.getTargets().get(0); if(target.getMaxNumberOfTargets() > 1){ if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) { - sb.append("Up to "); + sb.append("up to "); } - sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName()).append(" each become "); + sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName()); + if (loseAllAbilities) { + sb.append(" lose all their abilities and "); + } + sb.append(" each become "); } else { - sb.append("Target ").append(target.getTargetName()).append(" becomes a "); + sb.append("target ").append(target.getTargetName()); + if (loseAllAbilities) { + sb.append(" loses all abilities and "); + } + sb.append(" becomes a "); } sb.append(token.getDescription()); sb.append(" ").append(duration.toString()); - if (type != null && type.length() > 0) { + if (addStillALandText) { if (target.getMaxNumberOfTargets() > 1) { - sb.append(". They're still ").append(type); + sb.append(". They're still lands"); } else { - sb.append(". It's still a ").append(type); + sb.append(". It's still a land"); } } return sb.toString(); diff --git a/Mage/src/mage/game/permanent/token/FrogToken.java b/Mage/src/mage/game/permanent/token/FrogToken.java index 822d54c3f6..031440d530 100644 --- a/Mage/src/mage/game/permanent/token/FrogToken.java +++ b/Mage/src/mage/game/permanent/token/FrogToken.java @@ -30,7 +30,6 @@ package mage.game.permanent.token; import mage.constants.CardType; import mage.MageInt; -import mage.ObjectColor; /** *