From a65c1f5c3f7727e558200bff00f89cb84cb7ae1d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 5 May 2018 13:58:14 +0400 Subject: [PATCH] Refactoring: token names --- .../src/mage/cards/c/ChimericSphere.java | 25 +++++++++---------- .../mage/cards/e/ErayoSoratamiAscendant.java | 13 +++++----- .../src/mage/cards/f/FaithfulSquire.java | 14 +++++------ .../src/mage/cards/h/HiddenAncients.java | 13 +++++----- Mage.Sets/src/mage/cards/o/OpalCaryatid.java | 14 +++++------ 5 files changed, 38 insertions(+), 41 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/ChimericSphere.java b/Mage.Sets/src/mage/cards/c/ChimericSphere.java index d4fa5a6d580..e08bef467bf 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericSphere.java +++ b/Mage.Sets/src/mage/cards/c/ChimericSphere.java @@ -39,7 +39,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; /** * @@ -51,10 +50,10 @@ public class ChimericSphere extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); // {2}: Until end of turn, Chimeric Sphere becomes a 2/1 Construct artifact creature with flying. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereCreature1(), + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereFlyingToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{2}"))); // {2}: Until end of turn, Chimeric Sphere becomes a 3/2 Construct artifact creature without flying. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereCreature2(), + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereNotFlyingToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{2}"))); } @@ -68,9 +67,9 @@ public class ChimericSphere extends CardImpl { } } -class ChimericSphereCreature1 extends TokenImpl { +class ChimericSphereFlyingToken extends TokenImpl { - public ChimericSphereCreature1() { + public ChimericSphereFlyingToken() { super("Chimeric Sphere", "2/1 Construct artifact creature with flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); @@ -79,30 +78,30 @@ class ChimericSphereCreature1 extends TokenImpl { this.addAbility(FlyingAbility.getInstance()); } - public ChimericSphereCreature1(final ChimericSphereCreature1 token) { + public ChimericSphereFlyingToken(final ChimericSphereFlyingToken token) { super(token); } - public ChimericSphereCreature1 copy() { - return new ChimericSphereCreature1(this); + public ChimericSphereFlyingToken copy() { + return new ChimericSphereFlyingToken(this); } } -class ChimericSphereCreature2 extends TokenImpl { +class ChimericSphereNotFlyingToken extends TokenImpl { - public ChimericSphereCreature2() { + public ChimericSphereNotFlyingToken() { super("Chimeric Sphere", "3/2 Construct artifact creature without flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); power = new MageInt(3); toughness = new MageInt(2); } - public ChimericSphereCreature2(final ChimericSphereCreature2 token) { + public ChimericSphereNotFlyingToken(final ChimericSphereNotFlyingToken token) { super(token); } - public ChimericSphereCreature2 copy() { - return new ChimericSphereCreature2(this); + public ChimericSphereNotFlyingToken copy() { + return new ChimericSphereNotFlyingToken(this); } } diff --git a/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java b/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java index 847af0db2b4..c6cd7d05b67 100644 --- a/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java +++ b/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java @@ -44,7 +44,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; import mage.watchers.common.CastSpellLastTurnWatcher; @@ -89,7 +88,7 @@ class ErayoSoratamiAscendantTriggeredAbility extends TriggeredAbilityImpl { } private static Effect getFlipEffect() { - Effect effect = new FlipSourceEffect(new ErayosEssence()); + Effect effect = new FlipSourceEffect(new ErayosEssenceToken()); effect.setText("flip {this}"); return effect; } @@ -120,9 +119,9 @@ class ErayoSoratamiAscendantTriggeredAbility extends TriggeredAbilityImpl { } } -class ErayosEssence extends TokenImpl { +class ErayosEssenceToken extends TokenImpl { - ErayosEssence() { + ErayosEssenceToken() { super("Erayo's Essence", ""); addSuperType(SuperType.LEGENDARY); cardType.add(CardType.ENCHANTMENT); @@ -134,12 +133,12 @@ class ErayosEssence extends TokenImpl { effect.setText("counter that spell"); this.addAbility(new ErayosEssenceTriggeredAbility(effect)); } - public ErayosEssence(final ErayosEssence token) { + public ErayosEssenceToken(final ErayosEssenceToken token) { super(token); } - public ErayosEssence copy() { - return new ErayosEssence(this); + public ErayosEssenceToken copy() { + return new ErayosEssenceToken(this); } } diff --git a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java index 91899b75cce..f400e04f3dc 100644 --- a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java +++ b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java @@ -53,7 +53,6 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.events.GameEvent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; /** @@ -76,7 +75,7 @@ public class FaithfulSquire extends CardImpl { // At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it this.addAbility(new ConditionalTriggeredAbility( - new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new KaisoMemoryOfLoyalty()), true), + new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new KaisoMemoryOfLoyaltyToken()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); @@ -92,9 +91,9 @@ public class FaithfulSquire extends CardImpl { } } -class KaisoMemoryOfLoyalty extends TokenImpl { +class KaisoMemoryOfLoyaltyToken extends TokenImpl { - KaisoMemoryOfLoyalty() { + KaisoMemoryOfLoyaltyToken() { super("Kaiso, Memory of Loyalty", ""); addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); @@ -114,11 +113,12 @@ class KaisoMemoryOfLoyalty extends TokenImpl { ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } - public KaisoMemoryOfLoyalty(final KaisoMemoryOfLoyalty token) { + + public KaisoMemoryOfLoyaltyToken(final KaisoMemoryOfLoyaltyToken token) { super(token); } - public KaisoMemoryOfLoyalty copy() { - return new KaisoMemoryOfLoyalty(this); + public KaisoMemoryOfLoyaltyToken copy() { + return new KaisoMemoryOfLoyaltyToken(this); } } diff --git a/Mage.Sets/src/mage/cards/h/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index 3ee93bf641b..4f39fdbb79b 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenAncients.java +++ b/Mage.Sets/src/mage/cards/h/HiddenAncients.java @@ -42,7 +42,6 @@ import mage.filter.FilterSpell; import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -63,7 +62,7 @@ public class HiddenAncients extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); // When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature. - TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true, false), + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolkToken(), "", Duration.WhileOnBattlefield, true, false), filter, false); this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); @@ -79,20 +78,20 @@ public class HiddenAncients extends CardImpl { } } -class HiddenAncientsTreefolk extends TokenImpl { +class HiddenAncientsTreefolkToken extends TokenImpl { - public HiddenAncientsTreefolk() { + public HiddenAncientsTreefolkToken() { super("Treefolk", "5/5 Treefolk creature"); cardType.add(CardType.CREATURE); subtype.add(SubType.TREEFOLK); power = new MageInt(5); toughness = new MageInt(5); } - public HiddenAncientsTreefolk(final HiddenAncientsTreefolk token) { + public HiddenAncientsTreefolkToken(final HiddenAncientsTreefolkToken token) { super(token); } - public HiddenAncientsTreefolk copy() { - return new HiddenAncientsTreefolk(this); + public HiddenAncientsTreefolkToken copy() { + return new HiddenAncientsTreefolkToken(this); } } diff --git a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java index fc8da28d492..05e7af6b31d 100644 --- a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java +++ b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java @@ -41,7 +41,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -56,7 +55,7 @@ public class OpalCaryatid extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); // When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature. - TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true, false), + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldierToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); @@ -72,20 +71,21 @@ public class OpalCaryatid extends CardImpl { } } -class OpalCaryatidSoldier extends TokenImpl { +class OpalCaryatidSoldierToken extends TokenImpl { - public OpalCaryatidSoldier() { + public OpalCaryatidSoldierToken() { super("Soldier", "2/2 Soldier creature"); cardType.add(CardType.CREATURE); subtype.add(SubType.SOLDIER); power = new MageInt(2); toughness = new MageInt(2); } - public OpalCaryatidSoldier(final OpalCaryatidSoldier token) { + + public OpalCaryatidSoldierToken(final OpalCaryatidSoldierToken token) { super(token); } - public OpalCaryatidSoldier copy() { - return new OpalCaryatidSoldier(this); + public OpalCaryatidSoldierToken copy() { + return new OpalCaryatidSoldierToken(this); } }