Fix text for cards with duration at start

This commit is contained in:
xenohedron 2023-05-21 00:51:59 -04:00
parent 26a95eed51
commit 7ffd805f87
24 changed files with 55 additions and 41 deletions

View file

@ -27,7 +27,7 @@ import mage.target.TargetPermanent;
*/
public final class BlinkmothNexus extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Blinkmoth");
private static final FilterPermanent filter = new FilterPermanent("Blinkmoth creature");
static {
filter.add(SubType.BLINKMOTH.getPredicate());

View file

@ -32,9 +32,8 @@ public final class BogardanDragonheart extends CardImpl {
// Sacrifice another creature: Until end of turn, Bogardan Dragonheart becomes a Dragon with base power and toughness 4/4, flying, and haste.
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new BogardanDragonheartToken(), null, Duration.EndOfTurn, false,
false, false
), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))));
new BogardanDragonheartToken(), null, Duration.EndOfTurn
).withDurationRuleAtStart(true), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))));
}
private BogardanDragonheart(final BogardanDragonheart card) {

View file

@ -41,7 +41,7 @@ public final class CelestialColonnade extends CardImpl {
.withSubType(SubType.ELEMENTAL)
.withAbility(FlyingAbility.getInstance())
.withAbility(VigilanceAbility.getInstance()),
"land", Duration.EndOfTurn), new ManaCostsImpl<>("{3}{W}{U}")));
"land", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{3}{W}{U}")));
}
private CelestialColonnade(final CelestialColonnade card) {
@ -53,4 +53,4 @@ public final class CelestialColonnade extends CardImpl {
return new CelestialColonnade(this);
}
}
}

View file

@ -38,7 +38,7 @@ public final class ChimericMass extends CardImpl {
.withType(CardType.ARTIFACT)
.withSubType(SubType.CONSTRUCT)
.withAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect(new CountersSourceCount(CounterType.CHARGE)))),
"", Duration.EndOfTurn, false, false, true), new GenericManaCost(1)));
"", Duration.EndOfTurn, false, false, true).withDurationRuleAtStart(true), new GenericManaCost(1)));
}
private ChimericMass(final ChimericMass card) {

View file

@ -29,14 +29,14 @@ public final class ChimericSphere extends CardImpl {
.withSubType(SubType.CONSTRUCT)
.withType(CardType.ARTIFACT)
.withAbility(FlyingAbility.getInstance()),
"", Duration.EndOfTurn), new ManaCostsImpl<>("{2}")));
"", Duration.EndOfTurn).withDurationRuleAtStart(true), 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 CreatureToken(3, 2, "3/2 Construct artifact creature without flying")
new CreatureToken(3, 2, "3/2 Construct artifact creature and loses flying")
.withSubType(SubType.CONSTRUCT)
.withType(CardType.ARTIFACT),
"", Duration.EndOfTurn), new ManaCostsImpl<>("{2}")));
"", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{2}")));
}
private ChimericSphere(final ChimericSphere card) {
@ -48,4 +48,3 @@ public final class ChimericSphere extends CardImpl {
return new ChimericSphere(this);
}
}

View file

@ -36,11 +36,13 @@ public final class CreepingTarPit extends CardImpl {
// {1}{U}{B}: Until end of turn, Creeping Tar Pit becomes a 3/2 blue and black Elemental creature and can't be blocked. It's still a land.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
new CreatureToken(3, 2, "3/2 blue and black Elemental creature and can't be blocked")
new CreatureToken(3, 2, "3/2 blue and black Elemental creature")
.withColor("BU")
.withSubType(SubType.ELEMENTAL)
.withAbility(new CantBeBlockedSourceAbility()),
"land", Duration.EndOfTurn), new ManaCostsImpl<>("{1}{U}{B}")));
"land", Duration.EndOfTurn)
.setText("{this} becomes a 3/2 blue and black Elemental creature until end of turn and can't be blocked this turn. It's still a land"),
new ManaCostsImpl<>("{1}{U}{B}")));
}
private CreepingTarPit(final CreepingTarPit card) {

View file

@ -28,7 +28,8 @@ public final class DaxossTorment extends CardImpl {
.withSubType(SubType.DEMON)
.withAbility(FlyingAbility.getInstance())
.withAbility(HasteAbility.getInstance()),
"previous types", Duration.EndOfTurn)));
"previous types", Duration.EndOfTurn)
.setText("{this} becomes a 5/5 Demon creature with flying and haste in addition to its other types until end of turn")));
}
private DaxossTorment(final DaxossTorment card) {

View file

@ -53,11 +53,11 @@ public final class DenOfTheBugbear extends CardImpl {
"Whenever this creature attacks, create a 1/1 red Goblin creature token that's tapped and attacking."
);
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
new CreatureToken(3, 2, "3/2 red Goblin creature with \"Whenever this creature attacks, create a 1/1 red Goblin creature token that's tapped and attacking\"")
new CreatureToken(3, 2, "3/2 red Goblin creature with \"Whenever this creature attacks, create a 1/1 red Goblin creature token that's tapped and attacking.\"")
.withColor("R")
.withSubType(SubType.GOBLIN)
.withAbility(ability),
"land", Duration.EndOfTurn), new ManaCostsImpl<>("{3}{R}")));
"land", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{3}{R}")));
}
private DenOfTheBugbear(final DenOfTheBugbear card) {

View file

@ -35,7 +35,7 @@ public final class DimirKeyrune extends CardImpl {
.withColor("UB")
.withSubType(SubType.HORROR)
.withAbility(new CantBeBlockedSourceAbility()),
"", Duration.EndOfTurn), new ManaCostsImpl<>("{U}{B}")));
"", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{U}{B}")));
}
private DimirKeyrune(final DimirKeyrune card) {

View file

@ -35,7 +35,7 @@ public final class FrostwalkBastion extends CardImpl {
// {1}{S}: Until end of turn, Frostwalk Bastion becomes a 2/3 Construct artifact creature. It's still a land.
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new FrostwalkBastionToken(), "land", Duration.EndOfTurn
), new ManaCostsImpl<>("{1}{S}")));
).withDurationRuleAtStart(true), new ManaCostsImpl<>("{1}{S}")));
// Whenever Frostwalk Bastion deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
Ability ability = new DealsDamageToACreatureTriggeredAbility(
@ -75,4 +75,4 @@ class FrostwalkBastionToken extends TokenImpl {
public FrostwalkBastionToken copy() {
return new FrostwalkBastionToken(this);
}
}
}

View file

@ -46,7 +46,7 @@ public final class GuardianIdol extends CardImpl {
class GuardianIdolGolemToken extends TokenImpl {
public GuardianIdolGolemToken() {
super("Golem", "2/2 Golem artifact creature token");
super("Golem", "2/2 Golem artifact creature");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.GOLEM);
@ -60,4 +60,4 @@ class GuardianIdolGolemToken extends TokenImpl {
public GuardianIdolGolemToken copy() {
return new GuardianIdolGolemToken(this);
}
}
}

View file

@ -47,7 +47,7 @@ class HiddenPredatorsStateTriggeredAbility extends StateTriggeredAbility {
public HiddenPredatorsStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HiddenPredatorsToken(), Duration.Custom));
setTriggerPhrase("When an opponent controls a creature with power 4 or greater, if {this} is an enchantment");
setTriggerPhrase("When an opponent controls a creature with power 4 or greater, if {this} is an enchantment, ");
}
public HiddenPredatorsStateTriggeredAbility(final HiddenPredatorsStateTriggeredAbility ability) {

View file

@ -64,7 +64,7 @@ public final class HiveOfTheEyeTyrant extends CardImpl {
"\"Whenever this creature attacks, exile target card from defending player's graveyard.\""
).withSubType(SubType.BEHOLDER).withColor("B").withAbility(new MenaceAbility()).withAbility(ability),
"land", Duration.EndOfTurn
), new ManaCostsImpl<>("{3}{B}")));
).withDurationRuleAtStart(true), new ManaCostsImpl<>("{3}{B}")));
}
private HiveOfTheEyeTyrant(final HiveOfTheEyeTyrant card) {

View file

@ -32,7 +32,7 @@ public final class IzzetKeyrune extends CardImpl {
// {U}{R}: Until end of turn, Izzet Keyrune becomes a 2/1 blue and red Elemental artifact creature.
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new IzzetKeyruneToken(), "", Duration.EndOfTurn
), new ManaCostsImpl<>("{U}{R}")));
).withDurationRuleAtStart(true), new ManaCostsImpl<>("{U}{R}")));
// Whenever Izzet Keyrune deals combat damage to a player, you may draw a card. If you do, discard a card.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(

View file

@ -36,7 +36,7 @@ public final class LavaclawReaches extends CardImpl {
this.addAbility(new RedManaAbility());
// {1}{B}{R}: Until end of turn, Lavaclaw Reaches becomes a 2/2 black and red Elemental creature with ": This creature gets +X/+0 until end of turn." It's still a land.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LavaclawReachesToken(), "land", Duration.EndOfTurn), new ManaCostsImpl<>("{1}{B}{R}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LavaclawReachesToken(), "land", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{1}{B}{R}")));
}
private LavaclawReaches(final LavaclawReaches card) {

View file

@ -103,9 +103,9 @@ class LurkingJackalsStateTriggeredAbility extends StateTriggeredAbility {
class LurkingJackalsToken extends TokenImpl {
public LurkingJackalsToken() {
super("Dog", "3/2 Dog creature");
super("Dog", "3/2 Jackal creature");
cardType.add(CardType.CREATURE);
subtype.add(SubType.DOG);
subtype.add(SubType.JACKAL);
power = new MageInt(3);
toughness = new MageInt(2);
}

View file

@ -31,14 +31,14 @@ public final class Skinshifter extends CardImpl {
this.toughness = new MageInt(1);
Ability ability = new SimpleActivatedAbility(
new BecomesCreatureSourceEffect(new RhinoToken(), "", Duration.EndOfTurn),
new BecomesCreatureSourceEffect(new RhinoToken(), "", Duration.EndOfTurn).withDurationRuleAtStart(true),
new ManaCostsImpl<>("{G}"));
ability.getModes().setChooseText("Choose one. Activate only once each turn.");
Mode mode = new Mode(new BecomesCreatureSourceEffect(new BirdToken(), "", Duration.EndOfTurn));
Mode mode = new Mode(new BecomesCreatureSourceEffect(new BirdToken(), "", Duration.EndOfTurn).withDurationRuleAtStart(true));
ability.addMode(mode);
mode = new Mode(new BecomesCreatureSourceEffect(new PlantToken(), "", Duration.EndOfTurn));
mode = new Mode(new BecomesCreatureSourceEffect(new PlantToken(), "", Duration.EndOfTurn).withDurationRuleAtStart(true));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -23,7 +23,8 @@ public final class StalkingStones extends CardImpl {
public StalkingStones(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StalkingStonesToken(), "land", Duration.WhileOnBattlefield), new GenericManaCost(6)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StalkingStonesToken(), "land", Duration.WhileOnBattlefield)
.setText("{this} becomes a 3/3 Elemental artifact creature that's still a land"), new GenericManaCost(6)));
}
private StalkingStones(final StalkingStones card) {
@ -39,7 +40,7 @@ public final class StalkingStones extends CardImpl {
class StalkingStonesToken extends TokenImpl {
public StalkingStonesToken() {
super("Elemental", "3/3 Elemental artifact");
super("Elemental", "3/3 Elemental artifact creature");
this.cardType.add(CardType.CREATURE);
this.cardType.add(CardType.ARTIFACT);

View file

@ -25,7 +25,9 @@ public final class StillLife extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{G}");
// {G}{G}: Still Life becomes a 4/3 Centaur creature until end of turn. It's still an enchantment.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StillLifeCentaur(), "", Duration.EndOfTurn), new ManaCostsImpl<>("{G}{G}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StillLifeCentaur(), "", Duration.EndOfTurn)
.setText("{this} becomes a 4/3 Centaur creature in addition to its other types until end of turn")
, new ManaCostsImpl<>("{G}{G}")));
}
private StillLife(final StillLife card) {
@ -41,7 +43,7 @@ public final class StillLife extends CardImpl {
class StillLifeCentaur extends TokenImpl {
public StillLifeCentaur() {
super("Centaur", "4/3 Centaur creature token");
super("Centaur", "4/3 Centaur creature");
cardType.add(CardType.CREATURE);
subtype.add(SubType.CENTAUR);
power = new MageInt(4);

View file

@ -30,7 +30,7 @@ public final class StirringWildwood extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new GreenManaAbility());
this.addAbility(new WhiteManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StirringWildwoodToken(), "land", Duration.EndOfTurn), new ManaCostsImpl<>("{1}{G}{W}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StirringWildwoodToken(), "land", Duration.EndOfTurn).withDurationRuleAtStart(true), new ManaCostsImpl<>("{1}{G}{W}")));
}
private StirringWildwood(final StirringWildwood card) {

View file

@ -22,7 +22,7 @@ public final class StuffedBear extends CardImpl {
// {2}: Stuffed Bear becomes a 4/4 green Bear artifact creature until end of turn.
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new CreatureToken(4, 4, "4/4 green Bear artifact creature until end of turn")
new CreatureToken(4, 4, "4/4 green Bear artifact creature")
.withColor("G")
.withSubType(SubType.BEAR)
.withType(CardType.ARTIFACT),

View file

@ -33,7 +33,7 @@ public final class SvogthosTheRestlessTomb extends CardImpl {
this.addAbility(new ColorlessManaAbility());
// {3}{B}{G}: Until end of turn, Svogthos, the Restless Tomb becomes a black and green Plant Zombie creature with "This creature's power and toughness are each equal to the number of creature cards in your graveyard." It's still a land.
// set to character defining to prevent setting P/T again to 0 becuase already set by CDA of the token
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new SvogthosToken(), "land", Duration.EndOfTurn, false, false, true), new ManaCostsImpl<>("{3}{B}{G}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new SvogthosToken(), "land", Duration.EndOfTurn, false, false, true).withDurationRuleAtStart(true), new ManaCostsImpl<>("{3}{B}{G}"));
this.addAbility(ability);
}

View file

@ -24,8 +24,9 @@ public final class XanthicStatue extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{8}");
// {5}: Until end of turn, Xanthic Statue becomes an 8/8 Golem artifact creature with trample.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new XanthicStatueCreature(),
"", Duration.EndOfTurn), new ManaCostsImpl<>("{5}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new XanthicStatueCreature(), Duration.EndOfTurn)
.setText("until end of turn, {this} becomes an 8/8 Golem artifact creature with trample")
, new ManaCostsImpl<>("{5}")));
}
private XanthicStatue(final XanthicStatue card) {

View file

@ -20,7 +20,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
protected boolean loseAbilities;
protected DynamicValue power = null;
protected DynamicValue toughness = null;
protected boolean durationRuleAtStart = false; // put duration rule at the start of the rules text rather than the end
protected boolean durationRuleAtStart; // put duration rule at the start of the rules text rather than the end
/**
Becomes a creature retaining its previous types
@ -56,6 +56,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
this.theyAreStillType = theyAreStillType;
this.losePreviousTypes = losePreviousTypes;
this.loseAbilities = loseAbilities;
this.durationRuleAtStart = (theyAreStillType != null && theyAreStillType.contains("planeswalker"));
setText();
this.addDependencyType(DependencyType.BecomeCreature);
@ -167,6 +168,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
public BecomesCreatureSourceEffect withDurationRuleAtStart(boolean durationRuleAtStart) {
this.durationRuleAtStart = durationRuleAtStart;
setText();
return this;
}
@ -183,7 +185,14 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
sb.append(duration.toString());
}
if (theyAreStillType != null && !theyAreStillType.isEmpty()) {
sb.append(". It's still a ");
if (theyAreStillType.contains("planeswalker")) {
sb.append(" that's");
} else if (token.getDescription().endsWith("\"")) {
sb.append(" It's");
} else {
sb.append(". It's");
}
sb.append(" still a ");
sb.append(theyAreStillType);
}
staticText = sb.toString();