text generation improvements (#11203)

* update ETB trigger effect text gen

* set replace for common abilities

* fix remaining

* rename method, cleanup

* more fixes, better logic
This commit is contained in:
xenohedron 2023-09-25 21:51:51 -04:00 committed by GitHub
parent 10f2ae0bbc
commit 4e561b6254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 60 additions and 85 deletions

View file

@ -1,18 +1,19 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
@ -36,21 +37,12 @@ public class AllegiantGeneralPryde extends CardImpl {
this.toughness = new MageInt(2);
// Trooper creatures you control have "When this creature enters the battlefield, you may sacrifice a creature. If you do, draw two cards and lose 2 life."
SacrificeEffect sacrifceEffect = new SacrificeEffect(
StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED, 1, "");
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(sacrifceEffect, true, true);
ability.setTriggerPhrase("When this creature enters the battlefield, ");
ability.addTarget(new TargetControlledCreaturePermanent(1));
DrawCardSourceControllerEffect drawCardSourceControllerEffect = new DrawCardSourceControllerEffect(2);
drawCardSourceControllerEffect.setText("If you do, draw two cards");
ability.addEffect(drawCardSourceControllerEffect);
LoseLifeSourceControllerEffect loseLifeSourceControllerEffect = new LoseLifeSourceControllerEffect(2);
loseLifeSourceControllerEffect.setText("and lose 2 life.");
ability.addEffect(loseLifeSourceControllerEffect);
//EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(2), true);
GainAbilityControlledEffect effect = new GainAbilityControlledEffect(
ability, Duration.WhileOnBattlefield, filter);
this.addAbility(new SimpleStaticAbility(effect));
Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
new DrawCardSourceControllerEffect(2),
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
).addEffect(new LoseLifeSourceControllerEffect(2).concatBy("and")))
.setTriggerPhrase("When this creature enters the battlefield, ");
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(gainedAbility, Duration.WhileOnBattlefield, filter)));
}
private AllegiantGeneralPryde(final AllegiantGeneralPryde card) {

View file

@ -34,7 +34,8 @@ public final class AngelicCub extends CardImpl {
// Whenever Angelic Cub becomes the target of a spell or ability for the first time each turn, put a +1/+1 counter on it.
this.addAbility(new BecomesTargetSourceFirstTimeTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
.setText("put a +1/+1 counter on it"),
StaticFilters.FILTER_SPELL_OR_ABILITY_A, SetTargetPointer.NONE, false
));
// As long as Angelic Cub has three or more +1/+1 counters on it, it has flying.

View file

@ -27,7 +27,7 @@ public final class AngelicProtector extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new BecomesTargetSourceTriggeredAbility(
new BoostSourceEffect(0, 3, Duration.EndOfTurn)
).setTriggerPhrase("Whenever {this} becomes the target of a spell or ability, "));
).withRuleTextReplacement(false));
}
private AngelicProtector(final AngelicProtector card) {

View file

@ -39,7 +39,7 @@ public final class BallroomBrawlers extends CardImpl {
this.toughness = new MageInt(5);
// Whenever Ballroom Brawlers attacks, Ballroom Brawlers and up to one other target creature you control each gain your choice of first strike or lifelink until end of turn.
Ability ability = new AttacksTriggeredAbility(new BallroomBrawlersEffect()).setReplaceRuleText(false);
Ability ability = new AttacksTriggeredAbility(new BallroomBrawlersEffect()).withRuleTextReplacement(false);
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
this.addAbility(ability);
}

View file

@ -31,7 +31,8 @@ public final class BonecrusherGiant extends AdventureCard {
this.addAbility(new BecomesTargetSourceTriggeredAbility(
new DamageTargetEffect(
2, true, "that spell's controller", "{this}"
), StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false));
), StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false)
.withRuleTextReplacement(false));
// Stomp
// Damage cant be prevented this turn. Stomp deals 2 damage to any target.

View file

@ -25,8 +25,8 @@ import mage.target.common.TargetCardInLibrary;
*/
public final class CaptainPhasma extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Nontoken trooper creatures");
private static final FilterCreatureCard filterCard = new FilterCreatureCard("Trooper card");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken Trooper creatures");
private static final FilterCreatureCard filterCard = new FilterCreatureCard("Trooper creature card");
static {
filter.add(SubType.TROOPER.getPredicate());
@ -44,11 +44,9 @@ public final class CaptainPhasma extends CardImpl {
this.toughness = new MageInt(4);
// Nontoken Trooper creatures you control have "When this creature enters the battlefield, create 1/1/ white Trooper creature token."
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TrooperToken())
.setText("When this creature enters the battlefield, create a 1/1 white Trooper creature token"),
false, true);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false)));
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TrooperToken()), false)
.setTriggerPhrase("When this creature enters the battlefield, ");
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false)));
// {W}{U}{B}{R}{G}: Search your library for a Trooper creature card, reveal it, put it into your hand, then shuffle your library.
this.addAbility(new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true), new ManaCostsImpl<>("{W}{U}{B}{R}{G}")));

View file

@ -33,7 +33,7 @@ public final class CursedMonstrosity extends CardImpl {
this.addAbility(new BecomesTargetSourceTriggeredAbility(
new SacrificeSourceUnlessPaysEffect(
new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))
)));
)).withRuleTextReplacement(true));
}
private CursedMonstrosity(final CursedMonstrosity card) {

View file

@ -43,7 +43,7 @@ public final class Hecatomb extends CardImpl {
// When Hecatomb enters the battlefield, sacrifice Hecatomb unless you sacrifice four creatures.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(
new SacrificeTargetCost(new TargetControlledPermanent(4, filter2))))
.setReplaceRuleText(false));
.withRuleTextReplacement(false));
// Tap an untapped Swamp you control: Hecatomb deals 1 damage to any target.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, true)));

View file

@ -31,8 +31,7 @@ public final class LavabellySliver extends CardImpl {
// Sliver creatures you control have "When this creature enters the battlefield, it deals 1 damage to target player or planeswalker and you gain 1 life."
Ability ability = new EntersBattlefieldTriggeredAbility(
new DamageTargetEffect(1, "it"),
false, true
new DamageTargetEffect(1, "it"), false
).setTriggerPhrase("When this creature enters the battlefield, ");
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
ability.addTarget(new TargetPlayerOrPlaneswalker());

View file

@ -42,6 +42,7 @@ class LurkingJackalsStateTriggeredAbility extends StateTriggeredAbility {
public LurkingJackalsStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LurkingJackalsToken(), null, Duration.Custom));
setTriggerPhrase("When an opponent has 10 or less life, if {this} is an enchantment, ");
this.replaceRuleText = true;
}
private LurkingJackalsStateTriggeredAbility(final LurkingJackalsStateTriggeredAbility ability) {

View file

@ -37,7 +37,8 @@ public final class PreyseizerDragon extends CardImpl {
this.addAbility(new DevourAbility(2));
// Whenever Preyseizer Dragon attacks, it deals damage to any target equal to the number of +1/+1 counters on Preyseizer Dragon.
Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), false);
Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1))
.setText("it deals damage to any target equal to the number of +1/+1 counters on {this}"), false);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -27,7 +27,8 @@ public final class Retromancer extends CardImpl {
// Whenever Retromancer becomes the target of a spell or ability, Retromancer deals 3 damage to that spell or ability's controller.
this.addAbility(new BecomesTargetSourceTriggeredAbility(new DamageTargetEffect(3)
.setText("{this} deals 3 damage to that spell or ability's controller"),
StaticFilters.FILTER_SPELL_OR_ABILITY_A, SetTargetPointer.PLAYER, false));
StaticFilters.FILTER_SPELL_OR_ABILITY_A, SetTargetPointer.PLAYER, false)
.withRuleTextReplacement(false));
}
private Retromancer(final Retromancer card) {

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import java.util.UUID;
@ -6,7 +5,6 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.cards.CardImpl;
@ -14,7 +12,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
@ -24,6 +21,8 @@ import mage.target.common.TargetOpponentsCreaturePermanent;
*/
public final class RocketTrooper extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures");
public RocketTrooper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.HUMAN);
@ -32,13 +31,10 @@ public final class RocketTrooper extends CardImpl {
this.toughness = new MageInt(2);
// Trooper creatures you control have "Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls".
Effect effect = new DamageTargetEffect(1);
effect.setText("Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false, true);
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it"), false)
.setTriggerPhrase("When this creature enters the battlefield, ");
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield,
new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures"), false)));
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false)));
}

View file

@ -36,7 +36,7 @@ public final class SerraInquisitors extends CardImpl {
// Whenever Serra Inquisitors blocks or becomes blocked by one or more black creatures, Serra Inquisitors gets +2/+0 until end of turn.
this.addAbility(new BlocksOrBecomesBlockedByOneOrMoreTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfTurn),
filter, false).setReplaceRuleText(false));
filter, false).withRuleTextReplacement(false));
}
private SerraInquisitors(final SerraInquisitors card) {

View file

@ -43,7 +43,7 @@ public final class WormfangDrake extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(
new SacrificeSourceUnlessPaysEffect(new ExileTargetCost(new TargetControlledPermanent(filter))),
false
).setReplaceRuleText(false));
).withRuleTextReplacement(false));
// When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false));

View file

@ -28,7 +28,7 @@ public final class YuanShaosInfantry extends CardImpl {
// Whenever Yuan Shao's Infantry attacks alone, Yuan Shao's Infantry can't be blocked this combat.
Effect effect = new CantBeBlockedSourceEffect(Duration.EndOfCombat);
effect.setText("{this} can't be blocked this combat");
this.addAbility(new AttacksAloneSourceTriggeredAbility(effect).setReplaceRuleText(false));
this.addAbility(new AttacksAloneSourceTriggeredAbility(effect).withRuleTextReplacement(false));
}
private YuanShaosInfantry(final YuanShaosInfantry card) {

View file

@ -51,6 +51,7 @@ class ZhurTaaDruidAbility extends TriggeredAbilityImpl {
ZhurTaaDruidAbility() {
super(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT));
setTriggerPhrase("Whenever you tap {this} for mana, ");
this.replaceRuleText = true;
}
private ZhurTaaDruidAbility(final ZhurTaaDruidAbility ability) {

View file

@ -17,10 +17,6 @@ public interface TriggeredAbility extends Ability {
* This check for the relevant event types is called at first to prevent
* further actions if the current event is ignored from this triggered
* ability
*
* @param event
* @param game
* @return
*/
boolean checkEventType(GameEvent event, Game game);
@ -30,10 +26,6 @@ public interface TriggeredAbility extends Ability {
* multiple times. Because some abilities call this to check if an ability
* is relevant (e.g. Torpor Orb), so the method is called multiple times for
* the same event.
*
* @param event
* @param game
* @return
*/
boolean checkTrigger(GameEvent event, Game game);
@ -45,7 +37,10 @@ public interface TriggeredAbility extends Ability {
TriggeredAbility setDoOnlyOnceEachTurn(boolean doOnlyOnce);
TriggeredAbility setReplaceRuleText(boolean replaceRuleText);
/**
* if true, replaces "{this}" with "it" in the effect text
*/
TriggeredAbility withRuleTextReplacement(boolean replaceRuleText);
boolean checkInterveningIfClause(Game game);

View file

@ -27,7 +27,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
protected boolean leavesTheBattlefieldTrigger;
private boolean triggersOnceEachTurn = false;
private boolean doOnlyOnceEachTurn = false;
protected boolean replaceRuleText = true;
protected boolean replaceRuleText = false; // if true, replace "{this}" with "it" in effect text
private GameEvent triggerEvent = null;
private String triggerPhrase = null;
@ -131,7 +131,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
}
@Override
public TriggeredAbility setReplaceRuleText(boolean replaceRuleText) {
public TriggeredAbility withRuleTextReplacement(boolean replaceRuleText) {
this.replaceRuleText = replaceRuleText;
return this;
}
@ -220,18 +220,8 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
superRule = superRule.replaceFirst(" (become|block|deal|discard|gain|get|lose|mill|sacrifice)s? ", " $1 ");
}
}
if (replaceRuleText
&& triggerPhrase != null
&& triggerPhrase.contains("{this}")
&& !triggerPhrase.contains("other")
&& !triggerPhrase.contains(" of a ")
&& !triggerPhrase.contains(" by a ")
&& !triggerPhrase.contains(" to a ")
&& !triggerPhrase.contains(" blocks a ")
&& (superRule.startsWith("{this}")
|| superRule.startsWith("sacrifice {this}")
)) {
superRule = superRule.replace("{this} ", "it ");
if (replaceRuleText && triggerPhrase != null) {
superRule = superRule.replaceFirst("^(sacrifice )?\\{this\\}", "$1it");
}
sb.append(superRule);
if (triggersOnceEachTurn) {

View file

@ -16,6 +16,7 @@ public class AttacksAloneSourceTriggeredAbility extends TriggeredAbilityImpl {
public AttacksAloneSourceTriggeredAbility(Effect effect) {
super(Zone.BATTLEFIELD, effect);
setTriggerPhrase("Whenever {this} attacks alone, ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected AttacksAloneSourceTriggeredAbility(final AttacksAloneSourceTriggeredAbility ability) {

View file

@ -24,6 +24,7 @@ public class AttacksAndIsNotBlockedTriggeredAbility extends TriggeredAbilityImpl
super(Zone.BATTLEFIELD, effect, optional);
this.setTargetPointer = setTargetPointer;
setTriggerPhrase("Whenever {this} attacks and isn't blocked, ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected AttacksAndIsNotBlockedTriggeredAbility(final AttacksAndIsNotBlockedTriggeredAbility ability) {

View file

@ -16,6 +16,7 @@ public class AttacksOrBlocksTriggeredAbility extends TriggeredAbilityImpl {
} else {
setTriggerPhrase("Whenever {this} attacks or blocks, ");
}
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected AttacksOrBlocksTriggeredAbility(final AttacksOrBlocksTriggeredAbility ability) {

View file

@ -35,6 +35,7 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
this.text = text;
this.setTargetPointer = setTargetPointer;
setTriggerPhrase("Whenever {this} attacks, ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected AttacksTriggeredAbility(final AttacksTriggeredAbility ability) {

View file

@ -22,6 +22,7 @@ public class BecomesBlockedSourceTriggeredAbility extends TriggeredAbilityImpl {
super(Zone.BATTLEFIELD, effect, optional);
this.setTargetPointer = setTargetPointer;
setTriggerPhrase("Whenever {this} becomes blocked, ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected BecomesBlockedSourceTriggeredAbility(final BecomesBlockedSourceTriggeredAbility ability) {

View file

@ -19,6 +19,7 @@ public class BecomesTappedSourceTriggeredAbility extends TriggeredAbilityImpl {
public BecomesTappedSourceTriggeredAbility(Effect effect, boolean isOptional) {
super(Zone.BATTLEFIELD, effect, isOptional);
setTriggerPhrase("Whenever {this} becomes tapped, ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected BecomesTappedSourceTriggeredAbility(final BecomesTappedSourceTriggeredAbility ability) {

View file

@ -41,6 +41,7 @@ public class BecomesTargetSourceTriggeredAbility extends TriggeredAbilityImpl {
|| effect instanceof ShuffleIntoLibrarySourceEffect
|| effect instanceof ExileSourceEffect);
setTriggerPhrase((textWhen ? "When" : "Whenever") + " {this} becomes the target of " + filter.getMessage() + ", ");
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
protected BecomesTargetSourceTriggeredAbility(final BecomesTargetSourceTriggeredAbility ability) {

View file

@ -14,13 +14,14 @@ public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility {
public CycleTriggeredAbility(Effect effect, boolean optional) {
super(Zone.ALL, effect, "When you cycle {this}, ", optional);
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
public CycleTriggeredAbility(Effect effect) {
this(effect, false);
}
public CycleTriggeredAbility(CycleTriggeredAbility ability) {
protected CycleTriggeredAbility(CycleTriggeredAbility ability) {
super(ability);
}

View file

@ -15,6 +15,7 @@ public class DiesSourceTriggeredAbility extends ZoneChangeTriggeredAbility {
public DiesSourceTriggeredAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, Zone.GRAVEYARD, effect, "When {this} dies, ", optional);
this.replaceRuleText = true; // default true to replace "{this}" with "it"
}
public DiesSourceTriggeredAbility(Effect effect) {

View file

@ -11,27 +11,18 @@ import mage.game.events.GameEvent;
*/
public class EntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl {
protected boolean ignoreRulesGeneration; // use it with custom rules (if you don't want ETB auto-generated text)
protected String etbFlavorWord = null;
public EntersBattlefieldTriggeredAbility(Effect effect) {
this(effect, false);
}
public EntersBattlefieldTriggeredAbility(Effect effect, boolean optional) {
this(effect, optional, false);
}
public EntersBattlefieldTriggeredAbility(Effect effect, boolean optional, boolean ignoreRulesGeneration) {
super(Zone.ALL, effect, optional); // Zone.All because a creature with trigger can be put into play and be sacrificed during the resolution of an effect (discard Obstinate Baloth with Smallpox)
this.ignoreRulesGeneration = ignoreRulesGeneration;
this.replaceRuleText = true; // default true to replace "{this}" with "it"
setTriggerPhrase("When {this} enters the battlefield, ");
}
protected EntersBattlefieldTriggeredAbility(final EntersBattlefieldTriggeredAbility ability) {
super(ability);
this.ignoreRulesGeneration = ability.ignoreRulesGeneration;
this.etbFlavorWord = ability.etbFlavorWord;
}
@Override

View file

@ -12,7 +12,6 @@ public class EntersBattlefieldUntappedTriggeredAbility extends EntersBattlefield
public EntersBattlefieldUntappedTriggeredAbility(Effect effect, boolean optional) {
super(effect, optional);
this.ignoreRulesGeneration = true;
setTriggerPhrase("When {this} enters the battlefield untapped, ");
}

View file

@ -5,7 +5,6 @@ import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.target.targetpointer.FixedTarget;
/**
@ -14,7 +13,7 @@ import mage.target.targetpointer.FixedTarget;
public class TurnedFaceUpSourceTriggeredAbility extends TriggeredAbilityImpl {
private boolean setTargetPointer;
private final boolean setTargetPointer;
public TurnedFaceUpSourceTriggeredAbility(Effect effect) {
this(effect, false);
@ -30,6 +29,7 @@ public class TurnedFaceUpSourceTriggeredAbility extends TriggeredAbilityImpl {
this.setWorksFaceDown(true);
this.setTargetPointer = setTargetPointer;
setTriggerPhrase("When {this} is turned face up, ");
this.replaceRuleText = true;
}
protected TurnedFaceUpSourceTriggeredAbility(final TurnedFaceUpSourceTriggeredAbility ability) {

View file

@ -21,7 +21,7 @@ public class FabricateAbility extends EntersBattlefieldTriggeredAbility {
private final int value;
public FabricateAbility(int value) {
super(new FabricateEffect(value), false, true);
super(new FabricateEffect(value), false);
this.value = value;
}