Reworking triggered ability text generation to allow for ability words and flavor words to be added more easily (#8010)

* refactor all instances of getRule in triggered abilities using new getTriggerPrefix method

* updated triggered ability rules generation

* renamed method

* fixed a test failure

* some more refactoring

* simplified some instances of ability word usage
This commit is contained in:
Evan Kranzler 2021-07-15 07:46:38 -04:00 committed by GitHub
parent 0a31110164
commit ca80806400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
398 changed files with 946 additions and 989 deletions

View file

@ -84,8 +84,8 @@ public final class AAT1 extends CardImpl {
}
@Override
public String getRule() {
return "Whenever a repair counter is removed from a creature card in your graveyard " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a repair counter is removed from a creature card in your graveyard " ;
}
@Override

View file

@ -129,7 +129,7 @@ class AdarkarValkyrieDelayedTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "When target creature other than {this} dies this turn, " + super.getRule();
public String getTriggerPhrase() {
return "When target creature other than {this} dies this turn, " ;
}
}

View file

@ -81,8 +81,8 @@ class AeonChroniclerTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a time counter is removed from {this} while it's exiled, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a time counter is removed from {this} while it's exiled, " ;
}
}

View file

@ -83,8 +83,8 @@ class AkoumFirebirdLandfallAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "<i>Landfall</i> &mdash; Whenever a land enters the battlefield under your control, " + super.getRule();
public String getTriggerPhrase() {
return "<i>Landfall</i> &mdash; Whenever a land enters the battlefield under your control, " ;
}
@Override

View file

@ -97,7 +97,7 @@ class ArashinWarBeastTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} deals combat damage to one or more blockers, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} deals combat damage to one or more blockers, " ;
}
}

View file

@ -107,7 +107,7 @@ class ArcbondDelayedTriggeredAbility extends DelayedTriggeredAbility {
@Override
public String getRule() {
return "Choose target creature. Whenever that creature is dealt damage this turn, " + modes.getText();
return "Choose target creature. Whenever that creature is dealt damage this turn, it deals that much damage to each other creature and each player.";
}
}
@ -115,7 +115,6 @@ class ArcbondEffect extends OneShotEffect {
public ArcbondEffect() {
super(Outcome.Benefit);
this.staticText = "it deals that much damage to each other creature and each player";
}
public ArcbondEffect(final ArcbondEffect effect) {

View file

@ -79,7 +79,7 @@ class ArcboundTrackerTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast a spell other than your first spell each turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast a spell other than your first spell each turn, " ;
}
}

View file

@ -78,8 +78,8 @@ class AsLuckWouldHaveItTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you roll a die, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you roll a die, " ;
}
}

View file

@ -154,7 +154,7 @@ class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever " + filter.getMessage() + " dies, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever " + filter.getMessage() + " dies, " ;
}
}

View file

@ -69,7 +69,7 @@ class AwakenTheSkyTyrantTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When a source an opponent controls deals damage to you, " + super.getRule();
public String getTriggerPhrase() {
return "When a source an opponent controls deals damage to you, " ;
}
}

View file

@ -95,8 +95,8 @@ class AzoriusAEthermageAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return rule + super.getRule();
public String getTriggerPhrase() {
return rule ;
}
@Override

View file

@ -74,8 +74,8 @@ class AzorsElocutorsTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a source deals damage to you, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a source deals damage to you, " ;
}
}

View file

@ -152,8 +152,8 @@ class BaronVonCountTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast a spell with the indicated numeral in its mana cost, text box, power, or toughness, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast a spell with the indicated numeral in its mana cost, text box, power, or toughness, " ;
}
}
@ -225,8 +225,8 @@ class BaronVonCountSecondTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When the doom counter moves from \"1,\" " + super.getRule();
public String getTriggerPhrase() {
return "When the doom counter moves from \"1,\" " ;
}
}

View file

@ -97,7 +97,7 @@ class BattleOfFrostAndFireTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "Whenever you cast a spell with mana value 5 or greater this turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast a spell with mana value 5 or greater this turn, " ;
}
}

View file

@ -75,6 +75,6 @@ class BeckTriggeredAbility extends DelayedTriggeredAbility {
@Override
public String getRule() {
return "Whenever a creature enters the battlefield this turn, you may " + modes.getText();
return "Whenever a creature enters the battlefield this turn, you may draw a card.";
}
}

View file

@ -88,8 +88,8 @@ class BenalishCommanderTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a time counter is removed from {this} while it's exiled, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a time counter is removed from {this} while it's exiled, " ;
}
}

View file

@ -67,8 +67,8 @@ class BlackViseTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "At the beginning of the chosen player's upkeep, " + super.getRule();
public String getTriggerPhrase() {
return "At the beginning of the chosen player's upkeep, " ;
}
}

View file

@ -104,7 +104,7 @@ class BlazeCommandoTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever an instant or sorcery spell you control deals damage, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever an instant or sorcery spell you control deals damage, " ;
}
}

View file

@ -68,7 +68,7 @@ class BlindCreeperAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a player casts a spell, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a player casts a spell, " ;
}
}

View file

@ -84,7 +84,7 @@ class BloodcrazedHopliteTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a +1/+1 counter is put on {this}, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a +1/+1 counter is put on {this}, " ;
}
}

View file

@ -78,8 +78,8 @@ class BloodletterStateTriggeredAbility extends StateTriggeredAbility {
}
@Override
public String getRule() {
return "When the names of three or more nonland permanents begin with the same letter, " + super.getRule();
public String getTriggerPhrase() {
return "When the names of three or more nonland permanents begin with the same letter, " ;
}
}

View file

@ -71,7 +71,7 @@ class BloodstoneGoblinTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast a spell, if that spell was kicked, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast a spell, if that spell was kicked, " ;
}
}

View file

@ -102,8 +102,8 @@ class BombSquadTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature has four or more fuse counters on it, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature has four or more fuse counters on it, " ;
}
}

View file

@ -103,8 +103,8 @@ class DiesWhileInGraveyardTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever " + filter.getMessage() + " dies while {this} is in your graveyard, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever " + filter.getMessage() + " dies while {this} is in your graveyard, " ;
}
}

View file

@ -93,8 +93,8 @@ class BreathOfFuryAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When enchanted creature deals combat damage to a player, " + super.getRule();
public String getTriggerPhrase() {
return "When enchanted creature deals combat damage to a player, " ;
}
}

View file

@ -90,7 +90,7 @@ class BreathlessKnightTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} or another creature enters the battlefield under your control, if that creature entered from a graveyard or you cast it from a graveyard, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} or another creature enters the battlefield under your control, if that creature entered from a graveyard or you cast it from a graveyard, " ;
}
}

View file

@ -101,7 +101,7 @@ class BridgeFromBelowAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return filter.getMessage() + ", if {this} is in your graveyard, " + super.getRule();
public String getTriggerPhrase() {
return filter.getMessage() + ", if {this} is in your graveyard, " ;
}
}

View file

@ -78,8 +78,8 @@ class LoseControlTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When a player other than {this}'s owner controls it, " + super.getRule();
public String getTriggerPhrase() {
return "When a player other than {this}'s owner controls it, " ;
}
}

View file

@ -85,8 +85,8 @@ class BurningCinderFuryOfCrimsonChaosFireAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever any player taps a permanent, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever any player taps a permanent, " ;
}
}

View file

@ -98,8 +98,8 @@ class CanalCourierTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} and another creature attack different players, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} and another creature attack different players, " ;
}
}

View file

@ -79,7 +79,7 @@ class CaptainRipleyVanceTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast your third spell each turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast your third spell each turn, " ;
}
}

View file

@ -112,8 +112,8 @@ class CapturedByTheConsulateTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever an opponent casts a spell, if it has a single target, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever an opponent casts a spell, if it has a single target, " ;
}
@Override

View file

@ -101,10 +101,10 @@ class CarpetOfFlowersTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
public String getTriggerPhrase() {
return "At the beginning of each of your main phases, if "
+ "you haven't added mana with this ability this turn, "
+ super.getRule();
;
}
}

View file

@ -93,8 +93,8 @@ class CarthTheLionTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} enters the battlefield or a planeswalker you control dies, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} enters the battlefield or a planeswalker you control dies, " ;
}
}

View file

@ -83,7 +83,7 @@ class CeaselessSearbladesTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you activate an ability of an Elemental, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you activate an ability of an Elemental, " ;
}
}

View file

@ -76,7 +76,7 @@ class ChanceEncounterTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you win a coin flip, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you win a coin flip, " ;
}
}

View file

@ -107,7 +107,7 @@ class CherishedHatchlingTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "and whenever you cast a Dinosaur spell this turn, " + super.getRule();
public String getTriggerPhrase() {
return "and whenever you cast a Dinosaur spell this turn, " ;
}
}

View file

@ -88,8 +88,8 @@ class ColossalWhaleAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} attacks, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} attacks, " ;
}
@Override

View file

@ -79,7 +79,7 @@ class CrackdownConstructTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you activate an ability of an artifact or creature that isn't a mana ability, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you activate an ability of an artifact or creature that isn't a mana ability, " ;
}
}

View file

@ -113,8 +113,8 @@ public final class CragSaurian extends CardImpl {
}
@Override
public String getRule() {
return "Whenever a source deals damage to {this}, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a source deals damage to {this}, " ;
}
}
}

View file

@ -77,7 +77,7 @@ class CultOfTheWaxingMoonAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a permanent you control transforms into a non-Human creature, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a permanent you control transforms into a non-Human creature, " ;
}
}

View file

@ -89,8 +89,7 @@ class CuratorsWardTriggeredAbility extends TriggeredAbilityImpl {
@Override
public String getRule() {
return "When enchanted permanent leaves the battlefield, if it was historic, " + super.getRule()
+ " <i>(Artifacts, legendaries, and Sagas are historic.)</i>";
return "When enchanted permanent leaves the battlefield, if it was historic, draw two cards. <i>(Artifacts, legendaries, and Sagas are historic.)</i>";
}
@Override

View file

@ -82,8 +82,8 @@ class CurseOfChaosTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a player attacks enchanted player with one or more creatures, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a player attacks enchanted player with one or more creatures, " ;
}
@Override

View file

@ -74,8 +74,8 @@ class BecomesMonarchSourceControllerTriggeredAbility extends TriggeredAbilityImp
}
@Override
public String getRule() {
return "Whenever you become the monarch, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you become the monarch, " ;
}
@Override

View file

@ -73,7 +73,7 @@ class DaringSleuthTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When you sacrifice a Clue, " + super.getRule();
public String getTriggerPhrase() {
return "When you sacrifice a Clue, " ;
}
}

View file

@ -90,8 +90,8 @@ class DeadIronSledgeTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever equipped creature blocks or becomes blocked by a creature, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever equipped creature blocks or becomes blocked by a creature, " ;
}
@Override

View file

@ -73,6 +73,6 @@ class DeathFrenzyDelayedTriggeredAbility extends DelayedTriggeredAbility {
@Override
public String getRule() {
return "Whenever a creature dies this turn, " + modes.getText();
return "Whenever a creature dies this turn, you gain 1 life.";
}
}

View file

@ -69,7 +69,7 @@ class DesolationTwinOnCastAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When you cast this spell, " + super.getRule();
public String getTriggerPhrase() {
return "When you cast this spell, " ;
}
}

View file

@ -89,8 +89,8 @@ class DetritivoreTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a time counter is removed from {this} while it's exiled, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a time counter is removed from {this} while it's exiled, " ;
}
}

View file

@ -68,7 +68,7 @@ class DragonAppeasementTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you sacrifice a creature, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you sacrifice a creature, " ;
}
}

View file

@ -108,7 +108,7 @@ class DragonlordKolaghanTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever an opponent casts a creature or planeswalker spell with the same name as a card in their graveyard, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever an opponent casts a creature or planeswalker spell with the same name as a card in their graveyard, " ;
}
}

View file

@ -127,7 +127,7 @@ class DropOfHoneyStateTriggeredAbility extends StateTriggeredAbility {
}
@Override
public String getRule() {
return "When there are no creatures on the battlefield, " + super.getRule();
public String getTriggerPhrase() {
return "When there are no creatures on the battlefield, " ;
}
}

View file

@ -100,7 +100,7 @@ class DruidOfHornsTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast an Aura spell that targets {this}, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast an Aura spell that targets {this}, " ;
}
}

View file

@ -98,8 +98,8 @@ class EfreetWeaponmasterAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When {this} enters the battlefield or is turned face up, " + super.getRule();
public String getTriggerPhrase() {
return "When {this} enters the battlefield or is turned face up, " ;
}
}

View file

@ -95,8 +95,8 @@ class EnigmaSphinxTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "When {this} is put into your graveyard from the battlefield, " + super.getRule();
public String getTriggerPhrase() {
return "When {this} is put into your graveyard from the battlefield, " ;
}
}

View file

@ -83,8 +83,8 @@ class ErayoSoratamiAscendantTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever the fourth spell of a turn is cast, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever the fourth spell of a turn is cast, " ;
}
@Override
@ -146,8 +146,8 @@ class ErayosEssenceTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever an opponent casts a spell for the first time each turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever an opponent casts a spell for the first time each turn, " ;
}
@Override

View file

@ -101,7 +101,7 @@ class ErebossTitanTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature leaves an opponent's graveyard, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature leaves an opponent's graveyard, " ;
}
}

View file

@ -82,8 +82,8 @@ class DealsDamageAllTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a Sliver deals damage, its controller" + super.getRule();
public String getTriggerPhrase() {
return "Whenever a Sliver deals damage, its controller" ;
}
}

View file

@ -108,8 +108,8 @@ class EssenceSymbioteTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature you control mutates, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature you control mutates, " ;
}
}

View file

@ -97,8 +97,8 @@ class EtherealValkyrieTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} enters the battlefield or attacks, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} enters the battlefield or attacks, " ;
}
}

View file

@ -136,8 +136,8 @@ class ExtraplanarLensTriggeredAbility extends TriggeredManaAbility {
}
@Override
public String getRule() {
return "Whenever a land with the same name as the exiled card is tapped for mana, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a land with the same name as the exiled card is tapped for mana, " ;
}
@Override

View file

@ -68,8 +68,8 @@ class BlocksCreatureWithFlyingTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} blocks a creature with flying, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} blocks a creature with flying, " ;
}
@Override

View file

@ -81,8 +81,8 @@ class FatalMutationAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever enchanted creature is turned face up, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever enchanted creature is turned face up, " ;
}
}

View file

@ -73,7 +73,7 @@ class FathomMageTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a +1/+1 counter is put on {this}, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a +1/+1 counter is put on {this}, " ;
}
}

View file

@ -103,8 +103,8 @@ class FiveAlarmFireTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature you control deals combat damage, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature you control deals combat damage, " ;
}
}

View file

@ -71,7 +71,7 @@ class ScryTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you scry, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you scry, " ;
}
}

View file

@ -80,7 +80,7 @@ class FleetingMemoriesTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you sacrifice a Clue, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you sacrifice a Clue, " ;
}
}

View file

@ -93,8 +93,8 @@ class FleshCarverAbility extends DiesSourceTriggeredAbility {
}
@Override
public String getRule() {
return "When Flesh Carver dies, " + super.getRule();
public String getTriggerPhrase() {
return "When Flesh Carver dies, " ;
}
}

View file

@ -93,8 +93,8 @@ class ForbiddenOrchardTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you tap {this} for mana, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you tap {this} for mana, " ;
}
@Override

View file

@ -100,8 +100,8 @@ class FrontierSiegeKhansTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "At the beginning of each of your main phases, " + super.getRule();
public String getTriggerPhrase() {
return "At the beginning of each of your main phases, " ;
}
}

View file

@ -92,8 +92,8 @@ class FrostwebSpiderTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} blocks a " + filter.getMessage() + ", " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} blocks a " + filter.getMessage() + ", " ;
}
@Override

View file

@ -86,8 +86,8 @@ class FungalBehemothTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a time counter is removed from {this} while it's exiled, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a time counter is removed from {this} while it's exiled, " ;
}
}

View file

@ -65,8 +65,8 @@ class FurnaceCelebrationAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you sacrifice another permanent, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you sacrifice another permanent, " ;
}

View file

@ -121,8 +121,8 @@ class GoToJailTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "At the beginning of the chosen player's upkeep, " + super.getRule();
public String getTriggerPhrase() {
return "At the beginning of the chosen player's upkeep, " ;
}
}

View file

@ -80,7 +80,7 @@ class GenerousPatronTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you put one or more counters on a creature you don't control, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you put one or more counters on a creature you don't control, " ;
}
}

View file

@ -83,7 +83,7 @@ class GladehartCavalryTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature you control with a +1/+1 counter on it dies, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature you control with a +1/+1 counter on it dies, " ;
}
}

View file

@ -69,6 +69,6 @@ class GlimpseOfNatureTriggeredAbility extends DelayedTriggeredAbility {
@Override
public String getRule() {
return "Whenever you cast a creature spell this turn, " + modes.getText();
return "Whenever you cast a creature spell this turn, draw a card.";
}
}

View file

@ -86,7 +86,7 @@ class GlintHornBuccaneerTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you discard a card, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you discard a card, " ;
}
}

View file

@ -93,7 +93,7 @@ class GlissaTheTraitorTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature an opponent controls is put into a graveyard from the battlefield, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature an opponent controls is put into a graveyard from the battlefield, " ;
}
}

View file

@ -86,8 +86,8 @@ class GlyphOfLifeTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "Whenever that creature is dealt damage by an attacking creature this turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever that creature is dealt damage by an attacking creature this turn, " ;
}
}

View file

@ -91,10 +91,7 @@ class GoblinGuideTriggeredAbility extends TriggeredAbilityImpl {
@Override
public String getRule() {
if (text == null || text.isEmpty()) {
return "When {this} attacks, " + super.getRule();
}
return text;
return "Whenever {this} attacks, defending player reveals the top card of their library. If it's a land card, that player puts it into their hand.";
}
@Override
@ -108,7 +105,6 @@ class GoblinGuideEffect extends OneShotEffect {
public GoblinGuideEffect() {
super(Outcome.DrawCard);
staticText = "defending player reveals the top card of their library. If it's a land card, that player puts it into their hand";
}
public GoblinGuideEffect(final GoblinGuideEffect effect) {

View file

@ -128,8 +128,8 @@ class GoldenGuardianDelayedTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "When {this} dies this turn, " + super.getRule();
public String getTriggerPhrase() {
return "When {this} dies this turn, " ;
}
}

View file

@ -101,8 +101,8 @@ class GoldspanDragonTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} attacks or becomes the target of a spell, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} attacks or becomes the target of a spell, " ;
}
@Override

View file

@ -87,8 +87,8 @@ class GontisMachinationsTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you lose life for the first time each turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you lose life for the first time each turn, " ;
}
}

View file

@ -69,7 +69,7 @@ class GrafMoleTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you sacrifice a Clue, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you sacrifice a Clue, " ;
}
}

View file

@ -1,7 +1,6 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@ -9,28 +8,24 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author Styxo/spjspj
*/
public final class GrandMoffTarkin extends CardImpl {
public GrandMoffTarkin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ADVISOR);
@ -91,11 +86,8 @@ class GrandMoffTarkinTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
if (text == null || text.isEmpty()) {
return "At the beginning of each opponent's upkeep, " + super.getRule();
}
return text;
public String getTriggerPhrase() {
return "At the beginning of each opponent's upkeep, ";
}
@Override

View file

@ -117,8 +117,8 @@ class GrandWarlordRadhaTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever one or more creatures you control attack, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever one or more creatures you control attack, " ;
}
}

View file

@ -73,8 +73,8 @@ class GravePactTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature you control dies, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature you control dies, " ;
}
}

View file

@ -67,8 +67,8 @@ class GravityWellTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature with flying attacks, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature with flying attacks, " ;
}
@Override

View file

@ -91,8 +91,8 @@ class GreatbowDoyenTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever an Archer you control deals damage to a creature, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever an Archer you control deals damage to a creature, " ;
}
}

View file

@ -120,8 +120,8 @@ class GrenzoHavocRaiserTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever a creature you control deals combat damage to a player, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever a creature you control deals combat damage to a player, " ;
}
}

View file

@ -182,7 +182,7 @@ class GrinningTotemDelayedTriggeredAbility extends DelayedTriggeredAbility {
@Override
public String getRule() {
return "At the beginning of your next upkeep, if you haven't played it, " + modes.getText();
return "At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.";
}
}
@ -193,7 +193,6 @@ class GrinningTotemPutIntoGraveyardEffect extends OneShotEffect {
public GrinningTotemPutIntoGraveyardEffect(UUID exileZoneId) {
super(Outcome.Detriment);
this.exileZoneId = exileZoneId;
this.staticText = "put it into its owner's graveyard";
}
public GrinningTotemPutIntoGraveyardEffect(final GrinningTotemPutIntoGraveyardEffect effect) {

View file

@ -96,8 +96,8 @@ class GuardianOfTazeemTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "<i>Landfall</i> &mdash; Whenever a land enters the battlefield under your control, " + super.getRule();
public String getTriggerPhrase() {
return "<i>Landfall</i> &mdash; Whenever a land enters the battlefield under your control, " ;
}
}

View file

@ -79,7 +79,7 @@ class HallarTheFirefletcherTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you cast a spell, if that spell was kicked," + super.getRule();
public String getTriggerPhrase() {
return "Whenever you cast a spell, if that spell was kicked, ";
}
}

View file

@ -116,8 +116,8 @@ class HammerJammerTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you roll a die, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you roll a die, " ;
}
}

View file

@ -93,7 +93,7 @@ class HanSoloScrumratTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever {this} creature deals damage during your turn, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever {this} creature deals damage during your turn, " ;
}
}

View file

@ -90,7 +90,7 @@ class HapatraVizierOfPoisonsTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you put one or more -1/-1 counters on a creature, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you put one or more -1/-1 counters on a creature, " ;
}
}

View file

@ -97,8 +97,8 @@ class HarshJusticeTriggeredAbility extends DelayedTriggeredAbility {
}
@Override
public String getRule() {
return "This turn, whenever an attacking creature deals combat damage to you, " + super.getRule();
public String getTriggerPhrase() {
return "This turn, whenever an attacking creature deals combat damage to you, " ;
}
}

View file

@ -81,7 +81,7 @@ class HeraldOfAnafenzaTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you activate {this}'s outlast ability, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you activate {this}'s outlast ability, " ;
}
}

View file

@ -73,8 +73,8 @@ class HibernationsEndAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
return "Whenever you pay {this}'s cumulative upkeep, " + super.getRule();
public String getTriggerPhrase() {
return "Whenever you pay {this}'s cumulative upkeep, " ;
}
}

Some files were not shown because too many files have changed in this diff Show more