Fix cards 'H' to 'L' with card name instead of {this} (plus a couple more split cards), fix ImpelledGiantTest

This commit is contained in:
Steven Knipe 2025-07-07 00:25:06 -07:00
parent 339dff5de8
commit 57df155a79
19 changed files with 58 additions and 51 deletions

View file

@ -32,7 +32,7 @@ public final class AgentOfAcquisitions extends CardImpl {
// Instead of drafting a card from a booster pack, you may draft each card in that booster pack, one at a time. If you do, turn Agent of Acquisitions face down and you cant draft cards for the rest of this draft round.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Instead of drafting a card from a booster pack, "
+ "you may draft each card in that booster pack, one at a time. If you do, turn Agent of Acquisitions face down and "
+ "you may draft each card in that booster pack, one at a time. If you do, turn {this} face down and "
+ "you can't draft cards for the rest of this draft round - not implemented.")));
}

View file

@ -6,7 +6,6 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.SpellAbilityType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -24,7 +23,7 @@ public final class DeadGone extends SplitCard {
// Dead
// Dead deals 2 damage to target creature.
getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(2, "Dead"));
getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(2));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// Gone

View file

@ -32,7 +32,7 @@ public final class FeastOfFlesh extends CardImpl {
// Feast of Flesh deals X damage to target creature and you gain X life, where X is 1 plus the number of cards named Feast of Flesh in all graveyards.
IntPlusDynamicValue value = new IntPlusDynamicValue(1, new CardsInAllGraveyardsCount(filter));
Effect effect1 = new DamageTargetEffect(value);
effect1.setText("Feast of Flesh deals X damage to target creature");
effect1.setText("{this} deals X damage to target creature");
Effect effect2 = new GainLifeEffect(value);
effect2.setText("and you gain X life, where X is 1 plus the number of cards named Feast of Flesh in all graveyards");
this.getSpellAbility().addEffect(effect1);

View file

@ -1,26 +1,29 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.abilities.effects.common.AttachEffect;
import mage.target.TargetPermanent;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author weirddan455
@ -81,7 +84,7 @@ class HoldForRansomSacrificeEffect extends OneShotEffect {
HoldForRansomSacrificeEffect() {
super(Outcome.Sacrifice);
this.staticText = "Hold for Ransom's controller sacrifices it and draws a card";
this.staticText = "{this}'s controller sacrifices it and draws a card";
}
private HoldForRansomSacrificeEffect(final HoldForRansomSacrificeEffect effect) {

View file

@ -103,7 +103,7 @@ class KalamaxTheStormsireSpellCastAbility extends SpellCastControllerTriggeredAb
@Override
public String getRule() {
return "Whenever you cast your first instant spell each turn, " +
"if Kalamax, the Stormsire is tapped, " +
"if {this} is tapped, " +
"copy that spell. You may choose new targets for the copy.";
}
}

View file

@ -1,7 +1,6 @@
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.KickedCondition;
@ -14,6 +13,8 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import java.util.UUID;
/**
*
* @author LevelX2
@ -36,7 +37,7 @@ public final class KavuPrimarch extends CardImpl {
// If Kavu Primarch was kicked, it enters with four +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)),KickedCondition.ONCE,
"If Kavu Primarch was kicked, it enters with four +1/+1 counters on it.", ""));
"If {this} was kicked, it enters with four +1/+1 counters on it.", ""));
}
private KavuPrimarch(final KavuPrimarch card) {

View file

@ -127,7 +127,7 @@ class KingNarfisBetrayalSecondEffect extends OneShotEffect {
public KingNarfisBetrayalSecondEffect() {
super(Outcome.Benefit);
this.staticText = "Until end of turn, you may cast spells from among cards exiled with King Narfi's Betrayal," +
this.staticText = "Until end of turn, you may cast spells from among cards exiled with {this}," +
" and you may spend mana as though it were mana of any color to cast those spells";
}

View file

@ -1,8 +1,6 @@
package mage.cards.k;
import java.util.List;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -13,19 +11,21 @@ import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.List;
import java.util.UUID;
/**
*
* @author North
*/
public final class KorDuelist extends CardImpl {
private static final String ruleText = "As long as Kor Duelist is equipped, it has double strike";
private static final String ruleText = "As long as {this} is equipped, it has double strike";
public KorDuelist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");

View file

@ -1,7 +1,6 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
@ -15,9 +14,10 @@ import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
*
* @author Styxo
@ -81,6 +81,6 @@ class LairwatchGiantTriggeredAbility extends TriggeredAbilityImpl {
@Override
public String getRule() {
return "Whenever Lairwatch Giant blocks two or more creatures, it gains first strike until end of turn.";
return "Whenever {this} blocks two or more creatures, it gains first strike until end of turn.";
}
}

View file

@ -42,7 +42,7 @@ class LashOutEffect extends OneShotEffect {
LashOutEffect() {
super(Outcome.Damage);
this.staticText = "Lash Out deals 3 damage to target creature. Clash with an opponent. If you win, Lash Out deals 3 damage to that creature's controller";
this.staticText = "{this} deals 3 damage to target creature. Clash with an opponent. If you win, {this} deals 3 damage to that creature's controller";
}
private LashOutEffect(final LashOutEffect effect) {

View file

@ -1,7 +1,6 @@
package mage.cards.l;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
@ -18,6 +17,8 @@ import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
*
* @author LevelX2
@ -60,7 +61,7 @@ class LastStandEffect extends OneShotEffect {
public LastStandEffect() {
super(Outcome.Benefit);
this.staticText = "Target opponent loses 2 life for each Swamp you control. Last Stand deals damage to target creature equal to the number of Mountains you control. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards";
this.staticText = "Target opponent loses 2 life for each Swamp you control. {this} deals damage to target creature equal to the number of Mountains you control. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards";
}
private LastStandEffect(final LastStandEffect effect) {

View file

@ -40,7 +40,7 @@ class LeechesEffect extends OneShotEffect {
LeechesEffect() {
super(Outcome.Benefit);
this.staticText = "Target player loses all poison counters. Leeches deals that much damage to that player";
this.staticText = "Target player loses all poison counters. {this} deals that much damage to that player";
}
private LeechesEffect(final LeechesEffect effect) {

View file

@ -1,14 +1,15 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.InfoEffect;
import java.util.UUID;
/**
*
@ -27,11 +28,11 @@ public final class LeovoldsOperative extends CardImpl {
// TODO: Draft specific abilities not implemented
// Draft Leovolds Operative face up.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Draft Leovold's Operative face up - not implemented.")));
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Draft {this} face up - not implemented.")));
// As you draft a card, you may draft an additional card from that booster pack. If you do, turn Leovold's Operative face down, then pass the next booster pack without drafting a card from it.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("As you draft a card, you may draft an additional card from that booster pack. "
+ "If you do, turn Leovold's Operative face down, then pass the next booster pack without drafting a card from it - not implemented.")));
+ "If you do, turn {this} face down, then pass the next booster pack without drafting a card from it - not implemented.")));
}
private LeovoldsOperative(final LeovoldsOperative card) {

View file

@ -36,7 +36,7 @@ public final class Lich extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}{B}");
// As Lich enters the battlefield, you lose life equal to your life total.
this.addAbility(new EntersBattlefieldAbility(new LoseLifeSourceControllerEffect(ControllerLifeCount.instance), null, "As Lich enters the battlefield, you lose life equal to your life total.", null));
this.addAbility(new EntersBattlefieldAbility(new LoseLifeSourceControllerEffect(ControllerLifeCount.instance), null, "As {this} enters the battlefield, you lose life equal to your life total.", null));
// You don't lose the game for having 0 or less life.
this.addAbility(new SimpleStaticAbility(new DontLoseByZeroOrLessLifeEffect(Duration.WhileOnBattlefield)));

View file

@ -1,7 +1,6 @@
package mage.cards.l;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -13,6 +12,8 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Derpthemeus
@ -40,7 +41,7 @@ public final class LightningDart extends CardImpl {
public LightningDartEffect() {
super(Outcome.Damage);
this.staticText = "Lightning Dart deals 1 damage to target creature. If that creature is white or blue, Lightning Dart deals 4 damage to it instead";
this.staticText = "{this} deals 1 damage to target creature. If that creature is white or blue, {this} deals 4 damage to it instead";
}
private LightningDartEffect(final LightningDartEffect effect) {

View file

@ -1,15 +1,16 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.InfoEffect;
import java.util.UUID;
/**
*
@ -27,8 +28,8 @@ public final class LoreSeeker extends CardImpl {
// TODO: Draft specific abilities not implemented
// Reveal Lore Seeker as you draft it. After you draft Lore Seeker, you may add a booster pack to the draft.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Reveal Lore Seeker as you draft it. "
+ "After you draft Lore Seeker, you may add a booster pack to the draft - not implemented.")));
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Reveal {this} as you draft it. "
+ "After you draft {this}, you may add a booster pack to the draft - not implemented.")));
}
private LoreSeeker(final LoreSeeker card) {

View file

@ -1,6 +1,5 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.CardsInTargetHandCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
@ -12,6 +11,8 @@ import mage.constants.CardType;
import mage.constants.SpellAbilityType;
import mage.target.TargetPlayer;
import java.util.UUID;
public final class ToilTrouble extends SplitCard {
public ToilTrouble(UUID ownerId, CardSetInfo setInfo) {
@ -26,7 +27,7 @@ public final class ToilTrouble extends SplitCard {
// Trouble
// Trouble deals damage to target player equal to the number of cards in that player's hand.
Effect effect = new DamageTargetEffect(CardsInTargetHandCount.instance);
effect.setText("Trouble deals damage to target player equal to the number of cards in that player's hand");
effect.setText("{this} deals damage to target player equal to the number of cards in that player's hand");
getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer().withChooseHint("to deal damage to"));

View file

@ -1,7 +1,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
@ -9,13 +8,15 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SpellAbilityType;
import mage.constants.SubType;
import mage.game.permanent.token.TokenImpl;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author LevelX2
@ -34,9 +35,7 @@ public final class TurnBurn extends SplitCard {
// Burn
// Burn deals 2 damage to any target.
effect = new DamageTargetEffect(2);
effect.setText("Burn deals 2 damage to any target");
getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(2));
getRightHalfCard().getSpellAbility().addTarget(new TargetAnyTarget().withChooseHint("2 damage"));
}

View file

@ -15,7 +15,7 @@ public class ImpelledGiantTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Impelled Giant"); // Creature 3/3
addCard(Zone.BATTLEFIELD, playerA, "Hurloon Minotaur"); // Creature 2/3
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tap an untapped red creature you control other than Impelled Giant");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tap an untapped red creature you control other than");
setChoice(playerA, "Hurloon Minotaur");
setStopAt(1, PhaseStep.BEGIN_COMBAT);