Clean up constructors and add comments

This commit is contained in:
xenohedron 2023-05-20 23:55:49 -04:00
parent 9aaf1ccef7
commit 0bc473f4b2
25 changed files with 45 additions and 30 deletions

View file

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

View file

@ -103,7 +103,7 @@ class EbonyFlyEffect extends OneShotEffect {
new CreatureToken(result, result) new CreatureToken(result, result)
.withType(CardType.ARTIFACT) .withType(CardType.ARTIFACT)
.withAbility(FlyingAbility.getInstance()), .withAbility(FlyingAbility.getInstance()),
"", Duration.EndOfTurn, false, false "", Duration.EndOfTurn, false, false, false
), source); ), source);
return true; return true;
} }

View file

@ -35,7 +35,7 @@ public final class HiddenAncients extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); 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. // 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 HiddenAncientsTreefolkToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolkToken(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature."));

View file

@ -35,7 +35,7 @@ public final class HiddenGibbons extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
// When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. // When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature.")); "When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature."));

View file

@ -30,7 +30,7 @@ public final class HiddenGuerrillas extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
// When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample. // When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), Duration.WhileOnBattlefield),
new FilterArtifactSpell(), false); new FilterArtifactSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample.")); "When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample."));

View file

@ -50,7 +50,7 @@ public final class HiddenHerd extends CardImpl {
class HiddenHerdAbility extends TriggeredAbilityImpl { class HiddenHerdAbility extends TriggeredAbilityImpl {
public HiddenHerdAbility() { public HiddenHerdAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HiddenHerdBeast(), "", Duration.WhileOnBattlefield, true, false), false); super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HiddenHerdBeast(), Duration.WhileOnBattlefield), false);
} }
public HiddenHerdAbility(final HiddenHerdAbility ability) { public HiddenHerdAbility(final HiddenHerdAbility ability) {

View file

@ -46,7 +46,7 @@ class HiddenPredatorsStateTriggeredAbility extends StateTriggeredAbility {
} }
public HiddenPredatorsStateTriggeredAbility() { public HiddenPredatorsStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HiddenPredatorsToken(), "", Duration.Custom, true, false)); 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");
} }

View file

@ -38,7 +38,7 @@ public final class HiddenSpider extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
// When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach. // When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach.")); "When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach."));

View file

@ -29,7 +29,7 @@ public final class HiddenStag extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
// Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature. // Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature.
Effect effect = new BecomesCreatureSourceEffect(new ElkBeastToken(), "", Duration.WhileOnBattlefield, true, false); Effect effect = new BecomesCreatureSourceEffect(new ElkBeastToken(), Duration.WhileOnBattlefield);
TriggeredAbility ability = new OpponentPlaysLandTriggeredAbility(Zone.BATTLEFIELD, effect, false); TriggeredAbility ability = new OpponentPlaysLandTriggeredAbility(Zone.BATTLEFIELD, effect, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature.")); "Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature."));

View file

@ -32,7 +32,7 @@ public final class LurkingEvil extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}");
// Pay half your life, rounded up: Lurking Evil becomes a 4/4 Horror creature with flying. // Pay half your life, rounded up: Lurking Evil becomes a 4/4 Horror creature with flying.
Effect effect = new BecomesCreatureSourceEffect(new LurkingEvilToken(), null, Duration.EndOfGame, true, false); Effect effect = new BecomesCreatureSourceEffect(new LurkingEvilToken(), Duration.EndOfGame);
effect.setText("{this} becomes a 4/4 Phyrexian Horror creature with flying"); effect.setText("{this} becomes a 4/4 Phyrexian Horror creature with flying");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new LurkingEvilCost())); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new LurkingEvilCost()));
} }

View file

@ -40,7 +40,7 @@ public final class LurkingJackals extends CardImpl {
class LurkingJackalsStateTriggeredAbility extends StateTriggeredAbility { class LurkingJackalsStateTriggeredAbility extends StateTriggeredAbility {
public LurkingJackalsStateTriggeredAbility() { public LurkingJackalsStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LurkingJackalsToken(), "", Duration.Custom, true, false)); super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LurkingJackalsToken(), Duration.Custom));
setTriggerPhrase("When an opponent has 10 or less life, if {this} is an enchantment, "); setTriggerPhrase("When an opponent has 10 or less life, if {this} is an enchantment, ");
} }

View file

@ -34,7 +34,7 @@ public final class LurkingSkirge extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// When a creature is put into an opponent's graveyard from the battlefield, if Lurking Skirge is an enchantment, Lurking Skirge becomes a 3/2 Imp creature with flying. // When a creature is put into an opponent's graveyard from the battlefield, if Lurking Skirge is an enchantment, Lurking Skirge becomes a 3/2 Imp creature with flying.
TriggeredAbility ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new BecomesCreatureSourceEffect(new LurkingSkirgeToken(), "", Duration.WhileOnBattlefield, true, false), false, filter, false); TriggeredAbility ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new BecomesCreatureSourceEffect(new LurkingSkirgeToken(), Duration.WhileOnBattlefield), false, filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When a creature is put into an opponent's graveyard from the battlefield, if {this} is an enchantment, {this} becomes a 3/2 Phyrexian Imp creature with flying.")); "When a creature is put into an opponent's graveyard from the battlefield, if {this} is an enchantment, {this} becomes a 3/2 Phyrexian Imp creature with flying."));
} }

View file

@ -36,7 +36,7 @@ public final class OpalAcrolith extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
// Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature. // Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalAcrolithToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalAcrolithToken(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature.")); "Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature."));

View file

@ -31,7 +31,7 @@ public final class OpalArchangel extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}");
// When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance. // When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), Duration.WhileOnBattlefield),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance."));

View file

@ -40,7 +40,7 @@ public final class OpalAvenger extends CardImpl {
class OpalAvengerStateTriggeredAbility extends StateTriggeredAbility { class OpalAvengerStateTriggeredAbility extends StateTriggeredAbility {
public OpalAvengerStateTriggeredAbility() { public OpalAvengerStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new OpalAvengerToken(), "", Duration.Custom, true, false)); super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new OpalAvengerToken(), Duration.Custom));
setTriggerPhrase("When you have 10 or less life, if {this} is an enchantment, "); setTriggerPhrase("When you have 10 or less life, if {this} is an enchantment, ");
} }

View file

@ -29,7 +29,7 @@ public final class OpalCaryatid extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); 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. // 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 OpalCaryatidSoldierToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldierToken(), Duration.WhileOnBattlefield),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature."));

View file

@ -30,7 +30,7 @@ public final class OpalChampion extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
// When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike. // When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), Duration.WhileOnBattlefield),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike."));

View file

@ -30,7 +30,7 @@ public final class OpalGargoyle extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
// When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying. // When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), Duration.WhileOnBattlefield),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying."));

View file

@ -32,7 +32,7 @@ public final class OpalGuardian extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}{W}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}{W}");
// When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red. // When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), Duration.WhileOnBattlefield),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red."));

View file

@ -33,7 +33,7 @@ public final class SvogthosTheRestlessTomb extends CardImpl {
this.addAbility(new ColorlessManaAbility()); 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. // {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 // 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, true), new ManaCostsImpl<>("{3}{B}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new SvogthosToken(), "land", Duration.EndOfTurn, false, true, false), new ManaCostsImpl<>("{3}{B}{G}"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -29,7 +29,7 @@ public final class VeilOfBirds extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}");
// When an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying. // When an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilOfBirdsToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilOfBirdsToken(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying.")); "Whenever an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying."));

View file

@ -35,7 +35,7 @@ public final class VeiledApparition extends CardImpl {
// When an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and "At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}." // When an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and "At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilApparitionToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilApparitionToken(), Duration.WhileOnBattlefield),
filter, false); filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}.")); "Whenever an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."));

View file

@ -41,7 +41,7 @@ public final class VeiledCrocodile extends CardImpl {
class VeiledCrocodileStateTriggeredAbility extends StateTriggeredAbility { class VeiledCrocodileStateTriggeredAbility extends StateTriggeredAbility {
public VeiledCrocodileStateTriggeredAbility() { public VeiledCrocodileStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new VeilCrocodileToken(), "", Duration.Custom, true, false)); super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new VeilCrocodileToken(), Duration.Custom));
setTriggerPhrase("When a player has no cards in hand, if {this} is an enchantment, "); setTriggerPhrase("When a player has no cards in hand, if {this} is an enchantment, ");
} }

View file

@ -32,7 +32,7 @@ public final class VeiledSerpent extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
// When an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island. // When an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeiledSerpentToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeiledSerpentToken(), Duration.WhileOnBattlefield),
new FilterSpell(), false); new FilterSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island.")); "Whenever an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island."));

View file

@ -22,18 +22,33 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
protected DynamicValue toughness = 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 = false; // put duration rule at the start of the rules text rather than the end
/**
Becomes a creature retaining its previous types
@param token Token as blueprint for creature to become
@param theyAreStillType String for rules text generation
@param duration Duration for the effect
*/
public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration) { public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration) {
this(token, theyAreStillType, duration, false, false, false); this(token, theyAreStillType, duration, false, false, false);
} }
/**
Becomes a creature losing its previous types
@param token Token as blueprint for creature to become
@param duration Duration for the effect
*/
public BecomesCreatureSourceEffect(Token token, Duration duration) { public BecomesCreatureSourceEffect(Token token, Duration duration) {
this(token, "", duration, true, false, false); this(token, "", duration, true, false, false);
} }
public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining) { /**
this(token, theyAreStillType, duration, losePreviousTypes, characterDefining, false); @param token Token as blueprint for creature to become
} @param theyAreStillType String for rules text generation
@param duration Duration for the effect
@param losePreviousTypes if true, permanent loses its previous types
@param characterDefining if true, effect applies on layer 7a (it probably shouldn't)
@param loseAbilities if true, permanent loses its other abilities
*/
public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining, boolean loseAbilities) { public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining, boolean loseAbilities) {
super(duration, Outcome.BecomeCreature); super(duration, Outcome.BecomeCreature);
this.characterDefining = characterDefining; this.characterDefining = characterDefining;