[LTR] Implement Eomer, Marshal of Rohan (#10617)

Also, small refactor adding EachTurn to the name of both `setTriggersOnce` and `setDoOnlyOnce`.
This commit is contained in:
Susucre 2023-07-15 03:32:00 +02:00 committed by GitHub
parent 189dff86ea
commit 2188c690c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 136 additions and 71 deletions

View file

@ -32,7 +32,7 @@ public final class AcademyWall extends CardImpl {
new DrawDiscardControllerEffect(true),
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private AcademyWall(final AcademyWall card) {

View file

@ -37,7 +37,7 @@ public final class AkkiBattleSquad extends CardImpl {
// Whenever one or more modified creatures you control attack, untap all modified creatures you control. After this combat phase, there is an additional combat phase. This ability triggers only once each turn.
Ability ability = new AttacksCreatureYouControlTriggeredAbility(
new UntapAllEffect(filter), false, filter
).setTriggerPhrase("Whenever one or more modified creatures you control attack, ").setTriggersOnce(true);
).setTriggerPhrase("Whenever one or more modified creatures you control attack, ").setTriggersOnceEachTurn(true);
ability.addEffect(new AdditionalCombatPhaseEffect());
this.addAbility(ability);
}

View file

@ -71,7 +71,7 @@ class AnjeMaidOfDishonorTriggeredAbility extends TriggeredAbilityImpl {
public AnjeMaidOfDishonorTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new BloodToken()));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
setTriggerPhrase("Whenever {this} and/or one or more other Vampires enter the battlefield under your control, ");
}

View file

@ -40,7 +40,7 @@ public final class BloodHypnotist extends CardImpl {
// Whenever you sacrifice one or more Blood tokens, target creature can't block this turn. This ability triggers only once each turn.
Ability ability = new SacrificePermanentTriggeredAbility(
new CantBlockTargetEffect(Duration.EndOfTurn), filter
).setTriggersOnce(true);
).setTriggersOnceEachTurn(true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -56,7 +56,7 @@ public final class CalixGuidedByFate extends CardImpl {
// Whenever Calix or an enchanted creature you control deals combat damage to a player, you may create a token that's a copy of a nonlegendary enchantment you control. Do this only once each turn.
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(
new CalixGuidedByFateEffect(), filter, true, SetTargetPointer.NONE, true
).setDoOnlyOnce(true));
).setDoOnlyOnceEachTurn(true));
}
private CalixGuidedByFate(final CalixGuidedByFate card) {

View file

@ -25,7 +25,7 @@ public final class ChanceMetElves extends CardImpl {
this.toughness = new MageInt(2);
// Whenever you scry, put a +1/+1 counter on Chance-Met Elves. This ability triggers only once each turn.
this.addAbility(new ScryTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance())).setTriggersOnce(true));
this.addAbility(new ScryTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance())).setTriggersOnceEachTurn(true));
}
private ChanceMetElves(final ChanceMetElves card) {

View file

@ -40,7 +40,7 @@ public class ChandraHopesBeacon extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
new CopyTargetSpellEffect(true).withSpellName("it"),
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
//+2: Add two mana in any combination of colors.
this.addAbility(new LoyaltyAbility(new AddManaInAnyCombinationEffect(2), 2));

View file

@ -50,7 +50,7 @@ class CloakedCadetTriggeredAbility extends TriggeredAbilityImpl {
CloakedCadetTriggeredAbility() {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
setTriggerPhrase("Whenever one or more +1/+1 counters are put on one or more Humans you control, ");
}

View file

@ -45,7 +45,7 @@ class CorruptionOfTowashiTriggeredAbility extends TriggeredAbilityImpl {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true);
this.setTriggerPhrase("Whenever a permanent you control transforms " +
"or a permanent enters the battlefield under your control transformed, ");
this.setDoOnlyOnce(true);
this.setDoOnlyOnceEachTurn(true);
}
private CorruptionOfTowashiTriggeredAbility(final CorruptionOfTowashiTriggeredAbility ability) {

View file

@ -47,7 +47,7 @@ class CrawlingInfestationTriggeredAbility extends TriggeredAbilityImpl {
public CrawlingInfestationTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new InsectToken()));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
setTriggerPhrase("Whenever one or more creature cards are put into your graveyard from anywhere during your turn, ");
}

View file

@ -35,7 +35,7 @@ public final class DeepGnomeTerramancer extends CardImpl {
// Whenever one or more lands enter the battlefield under an opponent's control
// without being played, you may search your library for a Plains card, put it
// onto the battlefield tapped, then shuffle. Do this only once each turn.
this.addAbility(new DeepGnomeTerramancerTriggeredAbility().setDoOnlyOnce(true), new PlayLandWatcher());
this.addAbility(new DeepGnomeTerramancerTriggeredAbility().setDoOnlyOnceEachTurn(true), new PlayLandWatcher());
}
private DeepGnomeTerramancer(final DeepGnomeTerramancer card) {

View file

@ -40,7 +40,7 @@ public final class DennickPiousApparition extends CardImpl {
this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new InvestigateEffect(1), false,
StaticFilters.FILTER_CARD_CREATURE, TargetController.ANY
).setTriggersOnce(true).setTriggerPhrase("Whenever one or more creature cards are put into graveyards from anywhere, "));
).setTriggersOnceEachTurn(true).setTriggerPhrase("Whenever one or more creature cards are put into graveyards from anywhere, "));
// If Dennick, Pious Apparition would be put into a graveyard from anywhere, exile it instead.
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));

View file

@ -51,7 +51,7 @@ public class DonalHeraldOfWings extends CardImpl {
// Do this only once each turn. (The copy becomes a token.)
this.addAbility(new SpellCastControllerTriggeredAbility(
new DonalHeraldOfWingsEffect(), filterSpell, true
).setDoOnlyOnce(true));
).setDoOnlyOnceEachTurn(true));
}
private DonalHeraldOfWings(final DonalHeraldOfWings card) {

View file

@ -39,7 +39,7 @@ public final class DramaticFinale extends CardImpl {
// Whenever one or more nontoken creatures you control die, create a 2/1 white and black Inkling creature token with flying. This ability triggers only once each turn.
this.addAbility(new DiesCreatureTriggeredAbility(
new CreateTokenEffect(new InklingToken()), false, filter
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private DramaticFinale(final DramaticFinale card) {

View file

@ -28,7 +28,7 @@ public final class DuskLegionDuelist extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Whenever one or more +1/+1 counters are put on Dusk Legion Duelist, draw a card. This ability triggers only once each turn.
this.addAbility(new OneOrMoreCountersAddedTriggeredAbility(new DrawCardSourceControllerEffect(1)).setTriggersOnce(true));
this.addAbility(new OneOrMoreCountersAddedTriggeredAbility(new DrawCardSourceControllerEffect(1)).setTriggersOnceEachTurn(true));
}
private DuskLegionDuelist(final DuskLegionDuelist card) {

View file

@ -20,7 +20,7 @@ public final class DyingToServe extends CardImpl {
// Whenever you discard one or more cards, create a tapped 2/2 black Zombie creature token. This ability triggers only once each turn.
this.addAbility(new DiscardCardControllerTriggeredAbility(new CreateTokenEffect(
new ZombieToken(), 1, true, false), false
).setTriggerPhrase("Whenever you discard one or more cards, ").setTriggersOnce(true));
).setTriggerPhrase("Whenever you discard one or more cards, ").setTriggersOnceEachTurn(true));
}
private DyingToServe(final DyingToServe card) {

View file

@ -44,7 +44,7 @@ public final class ElvishWarmaster extends CardImpl {
// Whenever one or more other Elves enters the battlefield under your control, create a 1/1 green Elf Warrior creature token. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new CreateTokenEffect(new ElfWarriorToken()), filter
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
// {5}{G}{G}: Elves you control get +2/+2 and gain deathtouch until end of turn.
Ability ability = new SimpleActivatedAbility(new BoostControlledEffect(

View file

@ -0,0 +1,64 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.AdditionalCombatPhaseEffect;
import mage.abilities.effects.common.UntapAllEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate;
import java.util.UUID;
/**
*
* @author Susucr
*/
public final class EomerMarshalOfRohan extends CardImpl {
private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("one or more other attacking legendary creatures");
static {
filter.add(AnotherPredicate.instance);
filter.add(AttackingPredicate.instance);
filter.add(SuperType.LEGENDARY.getPredicate());
}
public EomerMarshalOfRohan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Haste
this.addAbility(HasteAbility.getInstance());
// Whenever one or more other attacking legendary creatures you control die, untap all creatures you control. After this phase, there is an additional combat phase. This ability triggers only once each turn.
Ability ability = new DiesCreatureTriggeredAbility(
new UntapAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE), false, filter
).setTriggersOnceEachTurn(true);
ability.addEffect(new AdditionalCombatPhaseEffect());
this.addAbility(ability);
}
private EomerMarshalOfRohan(final EomerMarshalOfRohan card) {
super(card);
}
@Override
public EomerMarshalOfRohan copy() {
return new EomerMarshalOfRohan(this);
}
}

View file

@ -30,7 +30,7 @@ public final class ExpeditionSupplier extends CardImpl {
// Whenever Expedition Supplier or another Human enters the battlefield under your control, conjure a card named Utility Knife onto the battlefield. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility(new ConjureCardEffect(
"Utility Knife", Zone.BATTLEFIELD, 1
), filter, false, true).setTriggersOnce(true));
), filter, false, true).setTriggersOnceEachTurn(true));
}
private ExpeditionSupplier(final ExpeditionSupplier card) {

View file

@ -41,7 +41,7 @@ public final class FolkHero extends CardImpl {
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
new SpellCastControllerTriggeredAbility(
new DrawCardSourceControllerEffect(1), filter, false
).setTriggersOnce(true), Duration.WhileOnBattlefield,
).setTriggersOnceEachTurn(true), Duration.WhileOnBattlefield,
StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
)));
}

View file

@ -36,7 +36,7 @@ public final class ForgeBoss extends CardImpl {
this.addAbility(new SacrificeAllTriggeredAbility(
new DamagePlayersEffect(2, TargetController.OPPONENT),
filter, TargetController.YOU, false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private ForgeBoss(final ForgeBoss card) {

View file

@ -54,7 +54,7 @@ public final class ForgeNeverwinterCharlatan extends CardImpl {
this.addAbility(new SacrificeAllTriggeredAbility(
new CreateTokenEffect(new TreasureToken(), 1, true),
StaticFilters.FILTER_PERMANENT_CREATURE, TargetController.ANY, false
).setTriggersOnce(true).setTriggerPhrase("Whenever one or more players sacrifice one or more creatures, "));
).setTriggersOnceEachTurn(true).setTriggerPhrase("Whenever one or more players sacrifice one or more creatures, "));
}
private ForgeNeverwinterCharlatan(final ForgeNeverwinterCharlatan card) {

View file

@ -1,7 +1,5 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
@ -11,6 +9,8 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.ZombieDecayedToken;
import java.util.UUID;
/**
*
* @author weirddan455
@ -28,7 +28,7 @@ public final class GhoulishProcession extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// Whenever one or more nontoken creatures die, create a 2/2 black Zombie creature token with decayed. This ability triggers only once each turn.
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new ZombieDecayedToken()), false, filter).setTriggersOnce(true));
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new ZombieDecayedToken()), false, filter).setTriggersOnceEachTurn(true));
}
private GhoulishProcession(final GhoulishProcession card) {

View file

@ -41,7 +41,7 @@ public final class GloinDwarfEmissary extends CardImpl {
// Whenever you cast a historic spell, create a Treasure token. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new TreasureToken()), filter, false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
// {T}, Sacrifice a Treasure: Goad target creature.
Ability ability = new SimpleActivatedAbility(new GoadTargetEffect(), new TapSourceCost());

View file

@ -41,7 +41,7 @@ public final class IngeniousSmith extends CardImpl {
// This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private IngeniousSmith(final IngeniousSmith card) {

View file

@ -47,12 +47,12 @@ public final class JinGitaxiasProgressTyrant extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
new CopySourceSpellEffect().setText("copy that spell. You may choose new targets for the copy"),
filter, false, true
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
// Whenever an opponent casts an artifact, instant, or sorcery spell, counter that spell. This ability triggers only once each turn.
this.addAbility(new SpellCastOpponentTriggeredAbility(
new JinGitaxiasProgressTyrantEffect(), filter, false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private JinGitaxiasProgressTyrant(final JinGitaxiasProgressTyrant card) {

View file

@ -37,7 +37,7 @@ public final class LegolasCounterOfKills extends CardImpl {
// Whenever you scry, if Legolas, Counter of Kills is tapped, you may untap it. Do this only once each turn.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new ScryTriggeredAbility(new UntapSourceEffect()).setDoOnlyOnce(true), SourceTappedCondition.TAPPED,
new ScryTriggeredAbility(new UntapSourceEffect()).setDoOnlyOnceEachTurn(true), SourceTappedCondition.TAPPED,
"Whenever you scry, if {this} is tapped, you may untap it. Do this only once each turn."
));

View file

@ -47,7 +47,7 @@ public final class LosheelClockworkScholar extends CardImpl {
// Whenever one or more artifact creatures enter the battlefield under your control, draw a card. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new DrawCardSourceControllerEffect(1), filter2
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private LosheelClockworkScholar(final LosheelClockworkScholar card) {

View file

@ -34,7 +34,7 @@ public final class MerryWardenOfIsengard extends CardImpl {
// Whenever one or more artifacts enter the battlefield under your control, create a 1/1 white Soldier creature token with lifelink. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
new CreateTokenEffect(new SoldierLifelinkToken()), StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT
).setTriggerPhrase("Whenever one or more artifacts enter the battlefield under your control, ").setTriggersOnce(true));
).setTriggerPhrase("Whenever one or more artifacts enter the battlefield under your control, ").setTriggersOnceEachTurn(true));
}
private MerryWardenOfIsengard(final MerryWardenOfIsengard card) {

View file

@ -52,7 +52,7 @@ class MirrorShieldHopliteTriggeredAbility extends TriggeredAbilityImpl {
MirrorShieldHopliteTriggeredAbility() {
super(Zone.BATTLEFIELD, new CopyStackObjectEffect());
this.setTriggerPhrase("Whenever a creature you control becomes the target of a backup ability, ");
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
}
private MirrorShieldHopliteTriggeredAbility(final MirrorShieldHopliteTriggeredAbility ability) {

View file

@ -49,7 +49,7 @@ public final class MishraExcavationProdigy extends CardImpl {
// Whenever you discard one or more artifact cards, add {R}{R}. This ability triggers only once each turn.
this.addAbility(new DiscardCardControllerTriggeredAbility(
new BasicManaEffect(Mana.RedMana(2)), false, filter
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private MishraExcavationProdigy(final MishraExcavationProdigy card) {

View file

@ -26,7 +26,7 @@ public final class MorbidOpportunist extends CardImpl {
// Whenever one or more other creatures die, draw a card. This ability triggers only once each turn.
this.addAbility(new DiesCreatureTriggeredAbility(
new DrawCardSourceControllerEffect(1), false, true
).setTriggerPhrase("Whenever one or more other creatures die, ").setTriggersOnce(true));
).setTriggerPhrase("Whenever one or more other creatures die, ").setTriggersOnceEachTurn(true));
}
private MorbidOpportunist(final MorbidOpportunist card) {

View file

@ -41,7 +41,7 @@ public final class NeeraWildMage extends CardImpl {
// Then put the rest on the bottom of your library in a random order.
// This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new NeeraWildMageEffect(), StaticFilters.FILTER_SPELL_A,
true, true).setTriggersOnce(true));
true, true).setTriggersOnceEachTurn(true));
}
private NeeraWildMage(final NeeraWildMage card) {

View file

@ -29,7 +29,7 @@ public final class NimrodelWatcher extends CardImpl {
// Whenever you scry, Nimrodel Watcher gets +1/+0 until end of turn and can't be blocked this turn. This ability triggers only once each turn.
Ability ability = new ScryTriggeredAbility(new BoostSourceEffect(
1, 0, Duration.EndOfTurn
)).setTriggersOnce(true);
)).setTriggersOnceEachTurn(true);
ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn)
.setText("and can't be blocked this turn"));
this.addAbility(ability);

View file

@ -32,7 +32,7 @@ public final class NykthosParagon extends CardImpl {
this.toughness = new MageInt(6);
// Whenever you gain life, you may put that many +1/+1 counters on each creature you control. Do this only once each turn.
this.addAbility(new GainLifeControllerTriggeredAbility(new NykthosParagonEffect(), true, true).setDoOnlyOnce(true));
this.addAbility(new GainLifeControllerTriggeredAbility(new NykthosParagonEffect(), true, true).setDoOnlyOnceEachTurn(true));
}
private NykthosParagon(final NykthosParagon card) {

View file

@ -55,7 +55,7 @@ class OniCultAnvilTriggeredAbility extends TriggeredAbilityImpl {
public OniCultAnvilTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ConstructToken()));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
setTriggerPhrase("Whenever one or more artifacts you control leave the battlefield during your turn, ");
}

View file

@ -47,7 +47,7 @@ public final class RatchetRescueRacer extends CardImpl {
this.addAbility(new DiesCreatureTriggeredAbility(
new TransformSourceEffect().setText("convert {this}"), false, filter
).setTriggerPhrase("Whenever one or more nontoken artifacts you control " +
"are put into a graveyard from the battlefield, ").setTriggersOnce(true));
"are put into a graveyard from the battlefield, ").setTriggersOnceEachTurn(true));
}
private RatchetRescueRacer(final RatchetRescueRacer card) {

View file

@ -39,7 +39,7 @@ public final class RiveteersAscendancy extends CardImpl {
Ability ability = new SacrificePermanentTriggeredAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(true),
StaticFilters.FILTER_PERMANENT_A_CREATURE
).setDoOnlyOnce(true);
).setDoOnlyOnceEachTurn(true);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}

View file

@ -56,7 +56,7 @@ class SatoruUmezawaTriggeredAbility extends TriggeredAbilityImpl {
SatoruUmezawaTriggeredAbility() {
super(Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
setTriggerPhrase("Whenever you activate a ninjutsu ability, ");
}

View file

@ -38,7 +38,7 @@ public final class SefrisOfTheHiddenWays extends CardImpl {
// Whenever one or more creature cards are put into your graveyard from anywhere, venture into the dungeon. This ability triggers only once each turn.
this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new VentureIntoTheDungeonEffect(), false, filter, TargetController.YOU
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
// Create Undead Whenever you complete a dungeon, return target creature card from your graveyard to the battlefield.
Ability ability = new CompletedDungeonTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect());

View file

@ -37,7 +37,7 @@ public final class SengirConnoisseur extends CardImpl {
// Whenever one or more other creatures die, put a +1/+1 counter on Sengir Connoisseur. This ability triggers only once each turn.
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter)
.setTriggersOnce(true));
.setTriggersOnceEachTurn(true));
}
private SengirConnoisseur(final SengirConnoisseur card) {

View file

@ -31,7 +31,7 @@ public final class SpitefulBanditry extends CardImpl {
new CreateTokenEffect(new TreasureToken())
.setText("you create a Treasure token"),
false, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE
).setTriggerPhrase("Whenever one or more creatures your opponents control die, ").setTriggersOnce(true));
).setTriggerPhrase("Whenever one or more creatures your opponents control die, ").setTriggersOnceEachTurn(true));
}
private SpitefulBanditry(final SpitefulBanditry card) {

View file

@ -47,7 +47,7 @@ class StonebindersFamiliarTriggeredAbility extends TriggeredAbilityImpl {
StonebindersFamiliarTriggeredAbility() {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
}
private StonebindersFamiliarTriggeredAbility(final StonebindersFamiliarTriggeredAbility ability) {

View file

@ -47,7 +47,7 @@ public final class TameshiRealityArchitect extends CardImpl {
// Whenever one or more noncreature permanents are returned to hand, draw a card. This ability triggers only once each turn.
this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.HAND,
new DrawCardSourceControllerEffect(1), filter,
"Whenever one or more noncreature permanents are returned to hand, ", false).setTriggersOnce(true));
"Whenever one or more noncreature permanents are returned to hand, ", false).setTriggersOnceEachTurn(true));
// {X}{W}, Return a land you control to its owner's hand: Return target artifact or enchantment card with mana value X or less from your graveyard to the battlefield. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(

View file

@ -33,7 +33,7 @@ public final class ThopterShop extends CardImpl {
// Whenever one or more artifact creatures you control die, draw a card. This ability triggers only once each turn.
this.addAbility(new DiesCreatureTriggeredAbility(
new DrawCardSourceControllerEffect(1), false, filter
).setTriggersOnce(true).setTriggerPhrase("Whenever one or more artifact creatures you control die, "));
).setTriggersOnceEachTurn(true).setTriggerPhrase("Whenever one or more artifact creatures you control die, "));
// {2}{W}, {T}: Create a 1/1 colorless Thopter artifact creature token with flying.
Ability ability = new SimpleActivatedAbility(

View file

@ -29,7 +29,7 @@ public final class TocasiasWelcome extends CardImpl {
// Whenever one or more creatures with mana value 3 or less enter the battlefield under your control, draw a card. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new DrawCardSourceControllerEffect(1), filter
).setTriggersOnce(true).setTriggerPhrase("Whenever one or more creatures with mana value 3 " +
).setTriggersOnceEachTurn(true).setTriggerPhrase("Whenever one or more creatures with mana value 3 " +
"or less enter the battlefield under your control, "));
}

View file

@ -63,7 +63,7 @@ public final class TomBombadil extends CardImpl {
// cards from the top of your library until you reveal a Saga card. Put that
// card onto the battlefield and the rest on the bottom of your library in a
// random order. This ability triggers only once each turn.
this.addAbility(new TomBombadilTriggeredAbility().setTriggersOnce(true));
this.addAbility(new TomBombadilTriggeredAbility().setTriggersOnceEachTurn(true));
}
private TomBombadil(final TomBombadil card) {

View file

@ -73,7 +73,7 @@ class TyvarTheBellicoseTriggeredAbility extends TriggeredAbilityImpl {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(
CounterType.P1P1.createInstance(0), SavedDamageValue.MANY, false
));
this.setTriggersOnce(true);
this.setTriggersOnceEachTurn(true);
}
private TyvarTheBellicoseTriggeredAbility(final TyvarTheBellicoseTriggeredAbility ability) {

View file

@ -49,7 +49,7 @@ public final class UrzaPowerstoneProdigy extends CardImpl {
// Whenever you discard one or more artifact cards, create a tapped Powerstone token. This ability triggers only once each turn.
this.addAbility(new DiscardCardControllerTriggeredAbility(
new CreateTokenEffect(new PowerstoneToken(), 1, true), false, filter
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private UrzaPowerstoneProdigy(final UrzaPowerstoneProdigy card) {

View file

@ -52,7 +52,7 @@ public final class VarisSilverymoonRanger extends CardImpl {
// Whenever you cast a creature or planeswalker spell, venture into the dungeon. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
new VentureIntoTheDungeonEffect(), filter, false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
// Whenever you complete a dungeon, create a 2/2 green Wolf creature token.
this.addAbility(new CompletedDungeonTriggeredAbility(new CreateTokenEffect(new WolfToken())));

View file

@ -32,7 +32,7 @@ public final class VraanExecutionerThane extends CardImpl {
Ability ability = new DiesCreatureTriggeredAbility(
new LoseLifeOpponentsEffect(2), false,
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
).setTriggerPhrase("Whenever one or more other creatures you control die, ").setTriggersOnce(true);
).setTriggerPhrase("Whenever one or more other creatures you control die, ").setTriggersOnceEachTurn(true);
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
this.addAbility(ability);
}

View file

@ -38,7 +38,7 @@ public final class WelcomingVampire extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever one or more other creatures with power 2 or less enter the battlefield under your control, draw a card. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter).setTriggersOnce(true));
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter).setTriggersOnceEachTurn(true));
}
private WelcomingVampire(final WelcomingVampire card) {

View file

@ -29,7 +29,7 @@ public final class WhisperingWizard extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new SpiritWhiteToken()),
StaticFilters.FILTER_SPELL_A_NON_CREATURE, false
).setTriggersOnce(true));
).setTriggersOnceEachTurn(true));
}
private WhisperingWizard(final WhisperingWizard card) {

View file

@ -78,6 +78,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Ent-Draught Basin", 238, Rarity.UNCOMMON, mage.cards.e.EntDraughtBasin.class));
cards.add(new SetCardInfo("Entish Restoration", 163, Rarity.UNCOMMON, mage.cards.e.EntishRestoration.class));
cards.add(new SetCardInfo("Eomer of the Riddermark", 121, Rarity.UNCOMMON, mage.cards.e.EomerOfTheRiddermark.class));
cards.add(new SetCardInfo("Eomer, Marshal of Rohan", 120, Rarity.RARE, mage.cards.e.EomerMarshalOfRohan.class));
cards.add(new SetCardInfo("Eowyn, Fearless Knight", 201, Rarity.RARE, mage.cards.e.EowynFearlessKnight.class));
cards.add(new SetCardInfo("Eowyn, Lady of Rohan", 10, Rarity.UNCOMMON, mage.cards.e.EowynLadyOfRohan.class));
cards.add(new SetCardInfo("Erebor Flamesmith", 122, Rarity.COMMON, mage.cards.e.EreborFlamesmith.class));

View file

@ -41,7 +41,7 @@ public interface TriggeredAbility extends Ability {
boolean checkUsedAlready(Game game);
TriggeredAbility setTriggersOnce(boolean triggersOnce);
TriggeredAbility setTriggersOnceEachTurn(boolean triggersOnce);
boolean checkInterveningIfClause(Game game);

View file

@ -24,8 +24,8 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
protected boolean optional;
protected boolean leavesTheBattlefieldTrigger;
private boolean triggersOnce = false;
private boolean doOnlyOnce = false;
private boolean triggersOnceEachTurn = false;
private boolean doOnlyOnceEachTurn = false;
private GameEvent triggerEvent = null;
private String triggerPhrase = null; // TODO: This should be change to final and all constructers to set a value
@ -52,8 +52,8 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
super(ability);
this.optional = ability.optional;
this.leavesTheBattlefieldTrigger = ability.leavesTheBattlefieldTrigger;
this.triggersOnce = ability.triggersOnce;
this.doOnlyOnce = ability.doOnlyOnce;
this.triggersOnceEachTurn = ability.triggersOnceEachTurn;
this.doOnlyOnceEachTurn = ability.doOnlyOnceEachTurn;
this.triggerEvent = ability.triggerEvent;
this.triggerPhrase = ability.triggerPhrase;
}
@ -68,7 +68,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
}
private final void setLastTrigger(Game game) {
if (!triggersOnce) {
if (!triggersOnceEachTurn) {
return;
}
game.getState().setValue(CardUtil.getCardZoneString(
@ -94,7 +94,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
@Override
public boolean checkTriggeredAlready(Game game) {
if (!triggersOnce) {
if (!triggersOnceEachTurn) {
return true;
}
Integer lastTurnTriggered = (Integer) game.getState().getValue(
@ -103,14 +103,14 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
return lastTurnTriggered == null || lastTurnTriggered != game.getTurnNum();
}
public TriggeredAbility setTriggersOnce(boolean triggersOnce) {
this.triggersOnce = triggersOnce;
public TriggeredAbility setTriggersOnceEachTurn(boolean triggersOnce) {
this.triggersOnceEachTurn = triggersOnce;
return this;
}
@Override
public boolean checkUsedAlready(Game game) {
if (!doOnlyOnce) {
if (!doOnlyOnceEachTurn) {
return false;
}
Integer lastTurnUsed = (Integer) game.getState().getValue(
@ -119,9 +119,9 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
return lastTurnUsed != null && lastTurnUsed == game.getTurnNum();
}
public TriggeredAbility setDoOnlyOnce(boolean doOnlyOnce) {
public TriggeredAbility setDoOnlyOnceEachTurn(boolean doOnlyOnce) {
this.optional = true;
this.doOnlyOnce = doOnlyOnce;
this.doOnlyOnceEachTurn = doOnlyOnce;
return this;
}
@ -139,7 +139,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
MageObject object = game.getObject(getSourceId());
Player player = game.getPlayer(this.getControllerId());
if (player == null || object == null
|| (doOnlyOnce && checkUsedAlready(game))
|| (doOnlyOnceEachTurn && checkUsedAlready(game))
|| !player.chooseUse(
getEffects().getOutcome(this),
this.getRule(object.getLogName()), this, game
@ -151,7 +151,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
if (!super.resolve(game)) {
return false;
}
if (doOnlyOnce) {
if (doOnlyOnceEachTurn) {
game.getState().setValue(CardUtil.getCardZoneString(
"lastTurnUsed" + originalId, sourceId, game
), game.getTurnNum());
@ -239,10 +239,10 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
}
sb.append(superRule);
if (triggersOnce) {
if (triggersOnceEachTurn) {
sb.append(" This ability triggers only once each turn.");
}
if (doOnlyOnce) {
if (doOnlyOnceEachTurn) {
sb.append(" Do this only once each turn.");
}
}