mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fixed hints on ward
This commit is contained in:
parent
149c799926
commit
24ff47c803
16 changed files with 48 additions and 26 deletions
|
@ -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")));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public final class GavonyDawnguard extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Ward {1}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}")));
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}"), false));
|
||||
|
||||
// If it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield.
|
||||
this.addAbility(new BecomeDayAsEntersAbility());
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class GraveyardGlutton extends CardImpl {
|
|||
this.nightCard = true;
|
||||
|
||||
// Ward—Discard 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());
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class GraveyardTrespasser extends CardImpl {
|
|||
this.secondSideCardClazz = mage.cards.g.GraveyardGlutton.class;
|
||||
|
||||
// Ward—Discard 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());
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public final class MoonrageBrute extends CardImpl {
|
|||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
|
||||
// Ward—Pay 3 life.
|
||||
this.addAbility(new WardAbility(new PayLifeCost(3)));
|
||||
this.addAbility(new WardAbility(new PayLifeCost(3), false));
|
||||
|
||||
// Nightbound
|
||||
this.addAbility(new NightboundAbility());
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
)));
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public class TimotharBaronOfBats extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Ward—Discard 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.
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -7,10 +7,7 @@ import mage.abilities.common.WerewolfBackTriggeredAbility;
|
|||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.keyword.MultikickerAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.*;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.cards.decks.importer.DeckImporter;
|
||||
|
@ -1420,6 +1417,7 @@ public class VerifyCardDataTest {
|
|||
hints.put(FightTargetsEffect.class, "Each deals damage equal to its power to the other");
|
||||
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(WardAbility.class, "becomes the target of a spell or ability an opponent controls");
|
||||
|
||||
for (Class objectClass : hints.keySet()) {
|
||||
String objectHint = hints.get(objectClass);
|
||||
|
|
|
@ -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("—").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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue