Made reminder text on Ward optional (#8666)

For #6728
This commit is contained in:
Alex Vasile 2022-05-12 09:39:05 -06:00 committed by GitHub
commit d59a75d53b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 59 additions and 29 deletions

View file

@ -43,7 +43,9 @@ public final class ChapelShieldgeist extends CardImpl {
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURE
).setText("each creature you control has ward {1}")));
).setText("each creature you control has ward {1}. " +
"<i>(Whenever it becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays 1.)</i>")));
// If Chapel Shieldgeist would be put into a graveyard from anywhere, exile it instead.
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));

View file

@ -33,7 +33,7 @@ public final class ColossalSkyturtle extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}"), false));
// Channel {2}{G}, Discard Colossal Skyturtle: Return target card from your graveyard to your hand.
Ability ability = new ChannelAbility("{2}{G}", new ReturnFromGraveyardToHandTargetEffect());

View file

@ -44,7 +44,9 @@ public final class DragonsDisciple extends CardImpl {
// Dragons you control have ward {1}.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield, filter
)));
).setText("Dragons you control have ward {1}. " +
"<i>(Whenever a Dragon you control becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays 1.)</i>")));
}
private DragonsDisciple(final DragonsDisciple card) {

View file

@ -38,7 +38,7 @@ public final class GavonyDawnguard extends CardImpl {
this.toughness = new MageInt(3);
// Ward {1}
this.addAbility(new WardAbility(new GenericManaCost(1)));
this.addAbility(new WardAbility(new GenericManaCost(1), false));
// If it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield.
this.addAbility(new BecomeDayAsEntersAbility());

View file

@ -37,7 +37,7 @@ public final class GraveyardGlutton extends CardImpl {
this.nightCard = true;
// WardDiscard a card.
this.addAbility(new WardAbility(new DiscardCardCost()));
this.addAbility(new WardAbility(new DiscardCardCost(), false));
// Whenever Graveyard Glutton enters the battlefield or attacks, exile up to two target cards from graveyards. For each creature card exiled this way, each opponent loses 1 life and you gain 1 life.
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GraveyardGluttonEffect());

View file

@ -37,7 +37,7 @@ public final class GraveyardTrespasser extends CardImpl {
this.secondSideCardClazz = mage.cards.g.GraveyardGlutton.class;
// WardDiscard a card.
this.addAbility(new WardAbility(new DiscardCardCost()));
this.addAbility(new WardAbility(new DiscardCardCost(), false));
// Whenever Graveyard Trespasser enters the battlefield or attacks, exile up to one target card from a graveyard. If a creature card was exiled this way, each opponent loses 1 life and you gain 1 life.
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GraveyardTrespasserEffect());

View file

@ -50,7 +50,12 @@ public final class HallOfStormGiants extends CardImpl {
.withColor("U")
.withSubType(SubType.GIANT)
.withAbility(new WardAbility(new GenericManaCost(3))),
"land", Duration.EndOfTurn), new ManaCostsImpl("{5}{U}")));
"land", Duration.EndOfTurn).setText(
"Until end of turn, Hall of Storm Giants becomes a 7/7 blue Giant creature with ward {3}. " +
"It's still a land. " +
"<i>(Whenever it becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays {3}.)</i>"),
new ManaCostsImpl("{5}{U}")));
}
private HallOfStormGiants(final HallOfStormGiants card) {

View file

@ -45,7 +45,7 @@ public final class KairiTheSwirlingSky extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Ward {3}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}")));
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}"), false));
// When Kairi, the Swirling Sky dies, choose one
// Return any number of target nonland permanents with total mana value 6 or less to their owners' hands.

View file

@ -3,6 +3,7 @@ package mage.cards.k;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
@ -35,7 +36,7 @@ public final class KappaCannoneer extends CardImpl {
this.addAbility(new ImproviseAbility());
// Ward {4}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{4}")));
this.addAbility(new WardAbility(new GenericManaCost(4), false));
// Whenever an artifact enters the battlefield under your control, put a +1/+1 counter on Kappa Cannoneer and it can't be blocked this turn.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(

View file

@ -33,7 +33,8 @@ public final class LeatherArmor extends CardImpl {
new WardAbility(new GenericManaCost(1)),
AttachmentType.EQUIPMENT,
Duration.WhileOnBattlefield,
"and has ward {1}"
"and has ward {1}. <i>(Whenever equipped creature becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays {1}.)</i>"
));
this.addAbility(ability);

View file

@ -30,7 +30,7 @@ public final class MoonrageBrute extends CardImpl {
this.addAbility(FirstStrikeAbility.getInstance());
// WardPay 3 life.
this.addAbility(new WardAbility(new PayLifeCost(3)));
this.addAbility(new WardAbility(new PayLifeCost(3), false));
// Nightbound
this.addAbility(new NightboundAbility());

View file

@ -3,6 +3,7 @@ package mage.cards.o;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
@ -37,7 +38,7 @@ public final class ObsessiveCollector extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
this.addAbility(new WardAbility(new GenericManaCost(2), false));
// Whenever Obsessive Collector deals combat damage to a player, seek a card with mana value equal to the number of cards in your hand.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ObsessiveCollectorEffect(), false));

View file

@ -48,7 +48,7 @@ public final class OctaviaLivingThesis extends CardImpl {
).setRuleAtTheTop(true).addHint(hint));
// Ward {8}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{8}")));
this.addAbility(new WardAbility(new ManaCostsImpl<>("{8}"), false));
// Magecraft Whenever you cast an instant or sorcery spell, target creature has base power and toughness 8/8 until end of turn.
Ability ability = new MagecraftAbility(

View file

@ -40,7 +40,8 @@ public final class PlateArmor extends CardImpl {
new WardAbility(new GenericManaCost(1)),
AttachmentType.EQUIPMENT,
Duration.WhileOnBattlefield,
"and has ward {1}"
"and has ward {1}. <i>(Whenever equipped creature becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays {1}.)</i>"
));
this.addAbility(ability);

View file

@ -3,6 +3,7 @@ package mage.cards.r;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
import mage.abilities.effects.OneShotEffect;
@ -46,7 +47,7 @@ public final class RaffineSchemingSeer extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Ward {1}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}")));
this.addAbility(new WardAbility(new GenericManaCost(1), false));
// Whenever you attack, target creature connives X, where X is the number of attacking creatures.
Ability ability = new AttacksWithCreaturesTriggeredAbility(new RaffineSchemingSeerEffect(), 1);

View file

@ -5,6 +5,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.condition.common.SourceTappedCondition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
@ -41,7 +42,7 @@ public final class ReservoirKraken extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
this.addAbility(new WardAbility(new GenericManaCost(2), false));
// At the beginning of each combat, if Reservoir Kraken is untapped, any opponent may tap an untapped creature they control. If they do, tap Reservoir Kraken and create a 1/1 blue Fish creature token with "This creature can't be blocked."
this.addAbility(new ConditionalInterveningIfTriggeredAbility(

View file

@ -35,11 +35,11 @@ public final class StorvaldFrostGiantJarl extends CardImpl {
this.toughness = new MageInt(7);
// Ward {3}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}")));
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}"), false));
// Other creatures you control have ward {3}.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new WardAbility(new GenericManaCost(3)), Duration.WhileOnBattlefield,
new WardAbility(new GenericManaCost(3), false), Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURES, true
)));

View file

@ -58,7 +58,7 @@ public class TimotharBaronOfBats extends CardImpl {
this.toughness = new MageInt(4);
// WardDiscard a card.
this.addAbility(new WardAbility(new DiscardCardCost()));
this.addAbility(new WardAbility(new DiscardCardCost(), false));
// Whenever another nontoken Vampire you control dies, you may pay {1} and exile it.
// If you do, create a 1/1 black Bat creature token with flying.

View file

@ -5,6 +5,7 @@ import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.ReplacementEffectImpl;
@ -41,7 +42,7 @@ public final class TivitSellerOfSecrets extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Ward {3}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}")));
this.addAbility(new WardAbility(new GenericManaCost(3), false));
// Council's dilemma Whenever Tivit enters the battlefield or deals combat damage to a player, starting with you, each player votes for evidence or bribery. For each evidence vote, investigate. For each bribery vote, create a Treasure token.
this.addAbility(new OrTriggeredAbility(

View file

@ -47,7 +47,7 @@ public final class VarisSilverymoonRanger extends CardImpl {
this.addAbility(ReachAbility.getInstance());
// Ward {1}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}")));
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}"), false));
// Whenever you cast a creature or planeswalker spell, venture into the dungeon. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(

View file

@ -31,7 +31,9 @@ public final class WingedBoots extends CardImpl {
));
ability.addEffect(new GainAbilityAttachedEffect(
new WardAbility(new GenericManaCost(4)), AttachmentType.EQUIPMENT
).setText("and ward {4}"));
).setText("and ward {4}. " +
"<i>(Whenever equipped creature becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player pays {4}.)</i>"));
this.addAbility(ability);
// Equip {1}

View file

@ -1421,6 +1421,7 @@ public class VerifyCardDataTest {
hints.put(MenaceAbility.class, "can't be blocked except by two or more");
hints.put(ScryEffect.class, "Look at the top card of your library. You may put that card on the bottom of your library");
hints.put(EquipAbility.class, "Equip only as a sorcery.");
hints.put(WardAbility.class, "becomes the target of a spell or ability an opponent controls");
for (Class objectClass : hints.keySet()) {
String objectHint = hints.get(objectClass);

View file

@ -18,15 +18,22 @@ import mage.util.CardUtil;
public class WardAbility extends TriggeredAbilityImpl {
private final Cost cost;
private final boolean showAbilityHint;
public WardAbility(Cost cost) {
this(cost, true);
}
public WardAbility(Cost cost, boolean showAbilityHint) {
super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(cost), false);
this.cost = cost;
this.showAbilityHint = showAbilityHint;
}
private WardAbility(final WardAbility ability) {
super(ability);
this.cost = ability.cost.copy();
this.showAbilityHint = ability.showAbilityHint;
}
@Override
@ -73,14 +80,18 @@ public class WardAbility extends TriggeredAbilityImpl {
} else {
sb.append("&mdash;").append(CardUtil.getTextWithFirstCharUpperCase(cost.getText())).append('.');
}
sb.append(" <i>(Whenever {this} becomes the target of a spell or ability an opponent controls, " +
"counter that spell or ability unless that player ");
if (cost instanceof ManaCost) {
sb.append("pays ").append(cost.getText());
} else {
sb.append(cost.getText().replace("pay ", "pays "));
if (showAbilityHint) {
sb.append(" <i>(Whenever this creature becomes the target of a spell or ability an opponent controls, " +
"counter it unless that player ");
if (cost instanceof ManaCost) {
sb.append("pays ").append(cost.getText());
} else {
sb.append(cost.getText().replace("pay ", "pays "));
}
sb.append(".)</i>");
}
sb.append(".)</i>");
return sb.toString();
}
}