- Fixed Khalni Ambush

- Added Effect hint for FightTargetsEffect
- Added test for FightTargetsEffect hint to VerifyCardDataTest (for #6728)
This commit is contained in:
Alex Vasile 2022-01-28 00:52:46 -05:00
parent ead1c359c5
commit ffa05bf9db
38 changed files with 104 additions and 56 deletions

View file

@ -28,8 +28,8 @@ public final class AffectionateIndrik extends CardImpl {
// When Affectionate Indrik enters the battlefield, you may have it fight target creature you don't control. // When Affectionate Indrik enters the battlefield, you may have it fight target creature you don't control.
Ability ability = new EntersBattlefieldTriggeredAbility( Ability ability = new EntersBattlefieldTriggeredAbility(
new FightTargetSourceEffect() new FightTargetSourceEffect()
.setText("you may have it fight " .setText("you may have it fight target creature you don't control. " +
+ "target creature you don't control"), "<i>(Each deals damage equal to its power to the other.)</i>"),
true true
); );
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));

View file

@ -33,7 +33,8 @@ public final class AncientAnimus extends CardImpl {
effect.setText("Put a +1/+1 counter on target creature you control if it's legendary"); effect.setText("Put a +1/+1 counter on target creature you control if it's legendary");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("Then it fights target creature an opponent controls"); effect.setText("Then it fights target creature an opponent controls. " +
"<i>(Each deals damage equal to its power to the other.)</i>");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Target target = new TargetOpponentsCreaturePermanent(); Target target = new TargetOpponentsCreaturePermanent();

View file

@ -49,7 +49,8 @@ class ArenaEffect extends OneShotEffect {
ArenaEffect() { ArenaEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "Tap target creature you control and target creature of an opponent's choice they control. Those creatures fight each other."; this.staticText = "Tap target creature you control and target creature of an opponent's choice they control. " +
"Those creatures fight each other. <i>(Each deals damage equal to its power to the other.)</i>";
} }
ArenaEffect(final ArenaEffect effect) { ArenaEffect(final ArenaEffect effect) {

View file

@ -41,7 +41,8 @@ public final class AtzocanArcher extends CardImpl {
// When Atzocan Archer enters the battlefield, you may have it fight another target creature. // When Atzocan Archer enters the battlefield, you may have it fight another target creature.
Effect effect = new FightTargetSourceEffect(); Effect effect = new FightTargetSourceEffect();
effect.setText("you may have it fight another target creature"); effect.setText("you may have it fight another target creature. " +
"<i>(Each deals damage equal to its power to the other.)</i>");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -51,7 +51,7 @@ public final class AyulaQueenAmongBears extends CardImpl {
ability.addTarget(new TargetPermanent(filter2)); ability.addTarget(new TargetPermanent(filter2));
// Target Bear you control fights target creature you don't control. // Target Bear you control fights target creature you don't control.
Mode mode = new Mode(new FightTargetsEffect()); Mode mode = new Mode(new FightTargetsEffect(false));
mode.addTarget(new TargetControlledPermanent(filter3)); mode.addTarget(new TargetControlledPermanent(filter3));
mode.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); mode.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
ability.addMode(mode); ability.addMode(mode);

View file

@ -58,7 +58,8 @@ class BackForMoreEffect extends OneShotEffect {
BackForMoreEffect() { BackForMoreEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Return target creature card from your graveyard to the battlefield. " + staticText = "Return target creature card from your graveyard to the battlefield. " +
"When you do, it fights up to one target creature you don't control."; "When you do, it fights up to one target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
private BackForMoreEffect(final BackForMoreEffect effect) { private BackForMoreEffect(final BackForMoreEffect effect) {

View file

@ -60,7 +60,9 @@ class BlizzardBrawlEffect extends OneShotEffect {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Choose target creature you control and target creature you don't control. " + staticText = "Choose target creature you control and target creature you don't control. " +
"If you control three or more snow permanents, the creature you control gets +1/+0 " + "If you control three or more snow permanents, the creature you control gets +1/+0 " +
"and gains indestructible until end of turn. Then those creatures fight each other."; "and gains indestructible until end of turn. " +
"Then those creatures fight each other." +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
private BlizzardBrawlEffect(final BlizzardBrawlEffect effect) { private BlizzardBrawlEffect(final BlizzardBrawlEffect effect) {

View file

@ -108,7 +108,8 @@ class FightEnchantedTargetEffect extends OneShotEffect {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
return "you may have enchanted creature fight target creature an opponent controls."; return "you may have enchanted creature fight target creature an opponent controls. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
} }

View file

@ -25,7 +25,8 @@ public final class DecisiveDenial extends CardImpl {
// Choose one // Choose one
// Target creature you control fights target creature you don't control. // Target creature you control fights target creature you don't control.
this.getSpellAbility().addEffect(new FightTargetsEffect() this.getSpellAbility().addEffect(new FightTargetsEffect()
.setText("target creature you control fights target creature you don't control")); .setText("target creature you control fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));

View file

@ -27,7 +27,7 @@ public final class DissensionInTheRanks extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}");
// Target blocking creature fights another target blocking creature. // Target blocking creature fights another target blocking creature.
this.getSpellAbility().addEffect(new FightTargetsEffect()); this.getSpellAbility().addEffect(new FightTargetsEffect(false));
TargetCreaturePermanent target = new TargetCreaturePermanent(1, 1, filter, false); TargetCreaturePermanent target = new TargetCreaturePermanent(1, 1, filter, false);
target.setTargetTag(1); target.setTargetTag(1);
this.getSpellAbility().addTarget(target); this.getSpellAbility().addTarget(target);

View file

@ -41,7 +41,7 @@ public final class DomriAnarchOfBolas extends CardImpl {
this.addAbility(new LoyaltyAbility(new DomriAnarchOfBolasEffect(), 1)); this.addAbility(new LoyaltyAbility(new DomriAnarchOfBolasEffect(), 1));
// -2: Target creature you control fights target creature you don't control. // -2: Target creature you control fights target creature you don't control.
Ability ability = new LoyaltyAbility(new FightTargetsEffect(), -2); Ability ability = new LoyaltyAbility(new FightTargetsEffect(false), -2);
ability.addTarget(new TargetControlledCreaturePermanent()); ability.addTarget(new TargetControlledCreaturePermanent());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.addAbility(ability); this.addAbility(ability);

View file

@ -37,7 +37,7 @@ public final class DomriRade extends CardImpl {
this.addAbility(new LoyaltyAbility(new DomriRadeEffect1(), 1)); this.addAbility(new LoyaltyAbility(new DomriRadeEffect1(), 1));
// -2: Target creature you control fights another target creature. // -2: Target creature you control fights another target creature.
LoyaltyAbility ability2 = new LoyaltyAbility(new FightTargetsEffect(), -2); LoyaltyAbility ability2 = new LoyaltyAbility(new FightTargetsEffect(false), -2);
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
target.setTargetTag(1); target.setTargetTag(1);
ability2.addTarget(target); ability2.addTarget(target);

View file

@ -26,7 +26,8 @@ public final class EpicConfrontation extends CardImpl {
Effect effect = new BoostTargetEffect(1, 2, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 2, Duration.EndOfTurn);
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("It fights target creature you don't control"); effect.setText("It fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL); Target target = new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL);

View file

@ -23,7 +23,8 @@ public final class HuntTheWeak extends CardImpl {
// Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control. // Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getSpellAbility().addEffect(new FightTargetsEffect().setText( this.getSpellAbility().addEffect(new FightTargetsEffect().setText(
"Then that creature fights target creature you don't control" "Then that creature fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"
)); ));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));

View file

@ -36,7 +36,8 @@ public final class InscriptionOfAbundance extends CardImpl {
// Choose one. If this spell was kicked, choose any number instead. // Choose one. If this spell was kicked, choose any number instead.
// Put two +1/+1 counters on target creature. // Put two +1/+1 counters on target creature.
this.getSpellAbility().getModes().setChooseText("choose one. If this spell was kicked, choose any number instead."); this.getSpellAbility().getModes().setChooseText("choose one. " +
"If this spell was kicked, choose any number instead.");
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))); this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
@ -46,7 +47,7 @@ public final class InscriptionOfAbundance extends CardImpl {
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);
// Target creature you control fights target creature you don't control. // Target creature you control fights target creature you don't control.
mode = new Mode(new FightTargetsEffect()); mode = new Mode(new FightTargetsEffect(false));
mode.addTarget(new TargetControlledCreaturePermanent()); mode.addTarget(new TargetControlledCreaturePermanent());
mode.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); mode.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);

View file

@ -49,7 +49,7 @@ class JoustEffect extends OneShotEffect {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Choose target creature you control and target creature you don't control. " + staticText = "Choose target creature you control and target creature you don't control. " +
"The creature you control gets +2/+1 until end of turn if it's a Knight. " + "The creature you control gets +2/+1 until end of turn if it's a Knight. " +
"Then those creatures fight each other."; "Then those creatures fight each other. <i>(Each deals damage equal to its power to the other.)</i>";
} }
private JoustEffect(final JoustEffect effect) { private JoustEffect(final JoustEffect effect) {

View file

@ -37,12 +37,15 @@ public final class MageDuel extends CardImpl {
// This spell costs {2} less to cast if you've cast another instant or sorcery spell this turn. // This spell costs {2} less to cast if you've cast another instant or sorcery spell this turn.
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SpellCostReductionSourceEffect(2, MageDuelCondition.instance).setCanWorksOnStackOnly(true) Zone.ALL,
new SpellCostReductionSourceEffect(2, MageDuelCondition.instance).setCanWorksOnStackOnly(true)
).setRuleAtTheTop(true), new SpellsCastWatcher()); ).setRuleAtTheTop(true), new SpellsCastWatcher());
// Target creature you control gets +1/+2 until end of turn. Then it fights target creature you don't control. // Target creature you control gets +1/+2 until end of turn. Then it fights target creature you don't control.
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 2)); this.getSpellAbility().addEffect(new BoostTargetEffect(1, 2));
this.getSpellAbility().addEffect(new FightTargetsEffect().setText("Then it fights target creature you don't control")); this.getSpellAbility().addEffect(new FightTargetsEffect().setText(
"Then it fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.getSpellAbility().addWatcher(new SpellsCastWatcher()); this.getSpellAbility().addWatcher(new SpellsCastWatcher());

View file

@ -56,7 +56,8 @@ class MagusOfTheArenaEffect extends OneShotEffect {
MagusOfTheArenaEffect() { MagusOfTheArenaEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "Tap target creature you control and target creature of an opponent's choice they control. Those creatures fight each other"; this.staticText = "Tap target creature you control and target creature of an opponent's choice they control. " +
"Those creatures fight each other. <i>(Each deals damage equal to its power to the other.)</i>";
} }
MagusOfTheArenaEffect(final MagusOfTheArenaEffect effect) { MagusOfTheArenaEffect(final MagusOfTheArenaEffect effect) {

View file

@ -40,8 +40,12 @@ public final class NessianWildsRavager extends CardImpl {
// When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature. // When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true);
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, this.addAbility(new ConditionalInterveningIfTriggeredAbility(
"When {this} enters the battlefield, if tribute wasn't paid, you may have {this} fight another target creature.")); ability,
TributeNotPaidCondition.instance,
"When {this} enters the battlefield, if tribute wasn't paid, " +
"you may have {this} fight another target creature. " +
"<i>(Each deals damage equal to its power to the other.)</i>"));
} }
private NessianWildsRavager(final NessianWildsRavager card) { private NessianWildsRavager(final NessianWildsRavager card) {

View file

@ -33,7 +33,10 @@ public final class NightfallPredator extends CardImpl {
// {R}, {tap}: Nightfall Predator fights target creature. // {R}, {tap}: Nightfall Predator fights target creature.
Ability activatedAbility = new SimpleActivatedAbility( Ability activatedAbility = new SimpleActivatedAbility(
new FightTargetSourceEffect().setText("{this} fights target creature"), new ManaCostsImpl("{R}") new FightTargetSourceEffect().setText(
"{this} fights target creature. " +
"<i>(Each deals damage equal to its power to the other.)</i>"),
new ManaCostsImpl("{R}")
); );
activatedAbility.addCost(new TapSourceCost()); activatedAbility.addCost(new TapSourceCost());
activatedAbility.addTarget(new TargetCreaturePermanent()); activatedAbility.addTarget(new TargetCreaturePermanent());

View file

@ -52,6 +52,7 @@ class OutmuscleEffect extends OneShotEffect {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Put a +1/+1 counter on target creature you control, " + staticText = "Put a +1/+1 counter on target creature you control, " +
"then it fights target creature you don't control. " + "then it fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i> " +
"<br><i>Adamant</i> &mdash; If at least three green mana was spent to cast this spell, " + "<br><i>Adamant</i> &mdash; If at least three green mana was spent to cast this spell, " +
"the creature you control gains indestructible until end of turn."; "the creature you control gains indestructible until end of turn.";
} }

View file

@ -28,7 +28,8 @@ public final class PheresBandBrawler extends CardImpl {
// When Pheres-Band Brawler enters the battlefield, it fights up to one target creature you don't control. // When Pheres-Band Brawler enters the battlefield, it fights up to one target creature you don't control.
Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect() Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect()
.setText("it fights up to one target creature you don't control")); .setText("it fights up to one target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"));
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false)); ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -43,7 +43,7 @@ public final class PrepareFight extends SplitCard {
// Fight // Fight
// Target creature you control fights target creature you don't control. // Target creature you control fights target creature you don't control.
getRightHalfCard().addAbility(new AftermathAbility().setRuleAtTheTop(true)); getRightHalfCard().addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new FightTargetsEffect()); getRightHalfCard().getSpellAbility().addEffect(new FightTargetsEffect(false));
getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
getRightHalfCard().getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); getRightHalfCard().getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
} }

View file

@ -41,7 +41,8 @@ class RivalsDuelFightTargetsEffect extends OneShotEffect {
public RivalsDuelFightTargetsEffect() { public RivalsDuelFightTargetsEffect() {
super(Outcome.Damage); super(Outcome.Damage);
staticText = "Choose two target creatures that share no creature types. Those creatures fight each other"; staticText = "Choose two target creatures that share no creature types. " +
"Those creatures fight each other. <i>(Each deals damage equal to its power to the other.)</i>";
} }
public RivalsDuelFightTargetsEffect(final RivalsDuelFightTargetsEffect effect) { public RivalsDuelFightTargetsEffect(final RivalsDuelFightTargetsEffect effect) {

View file

@ -23,7 +23,8 @@ public final class SavageSmash extends CardImpl {
// Target creature you control gets +2/+2 until end of turn. It fights target creature you don't control. // Target creature you control gets +2/+2 until end of turn. It fights target creature you don't control.
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
this.getSpellAbility().addEffect( this.getSpellAbility().addEffect(
new FightTargetsEffect().setText("It fights target creature you don't control") new FightTargetsEffect().setText("It fights target creature you don't control." +
"<i>(Each deals damage equal to its power to the other.)</i>")
); );
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));

View file

@ -43,7 +43,8 @@ public final class SavageStomp extends CardImpl {
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("Then that creature fights target creature you don't control"); effect.setText("Then that creature fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));

View file

@ -48,7 +48,8 @@ class SavageSwipeEffect extends OneShotEffect {
SavageSwipeEffect() { SavageSwipeEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Target creature you control gets +2/+2 until end of turn if its power is 2. " + staticText = "Target creature you control gets +2/+2 until end of turn if its power is 2. " +
"Then it fights target creature you don't control."; "Then it fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
private SavageSwipeEffect(final SavageSwipeEffect effect) { private SavageSwipeEffect(final SavageSwipeEffect effect) {

View file

@ -99,6 +99,7 @@ class SkophosMazeWardenTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever another creature becomes the target of an ability of a land you control " + return "Whenever another creature becomes the target of an ability of a land you control " +
"named Labyrinth of Skophos, you may have {this} fight that creature."; "named Labyrinth of Skophos, you may have {this} fight that creature. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
} }

View file

@ -24,7 +24,8 @@ public final class StruggleForSkemfar extends CardImpl {
// Put a +1/+1 counter on target creature you control. Then that creature fights up to one target creature you don't control. // Put a +1/+1 counter on target creature you control. Then that creature fights up to one target creature you don't control.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getSpellAbility().addEffect(new FightTargetsEffect().setText( this.getSpellAbility().addEffect(new FightTargetsEffect().setText(
"Then that creature fights up to one target creature you don't control" "Then that creature fights up to one target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"
)); ));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent( this.getSpellAbility().addTarget(new TargetCreaturePermanent(

View file

@ -55,11 +55,12 @@ public final class TheTriumphOfAnax extends CardImpl {
sagaAbility.addChapterEffect( sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_IV, SagaChapter.CHAPTER_IV, this, SagaChapter.CHAPTER_IV, SagaChapter.CHAPTER_IV,
new Effects(new FightTargetsEffect().setText( new Effects(new FightTargetsEffect().setText(
"Target creature you control fights up to one target creature you don't control" "Target creature you control fights up to one target creature you don't control. " +
)), new Targets( "<i>(Each deals damage equal to its power to the other.)</i>")),
new Targets(
new TargetControlledCreaturePermanent(), new TargetControlledCreaturePermanent(),
new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false) new TargetPermanent(0, 1,
) StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false))
); );
this.addAbility(sagaAbility); this.addAbility(sagaAbility);
} }

View file

@ -53,7 +53,8 @@ public final class TimeToFeed extends CardImpl {
this.getSpellAbility().addEffect(new TimeToFeedTextEffect()); this.getSpellAbility().addEffect(new TimeToFeedTextEffect());
// Target creature you control fights that creature. // Target creature you control fights that creature.
Effect effect = new FightTargetsEffect(); Effect effect = new FightTargetsEffect();
effect.setText("Target creature you control fights that creature"); effect.setText("Target creature you control fights that creature. " +
"<i>(Each deals damage equal to its power to the other.)</i>");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
Target target = new TargetCreaturePermanent(filter1); Target target = new TargetCreaturePermanent(filter1);

View file

@ -31,7 +31,7 @@ public final class UlvenwaldTracker extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {1}{G}, {tap}: Target creature you control fights another target creature. // {1}{G}, {tap}: Target creature you control fights another target creature.
Ability ability = new SimpleActivatedAbility(new FightTargetsEffect(), new ManaCostsImpl<>("{1}{G}")); Ability ability = new SimpleActivatedAbility(new FightTargetsEffect(false), new ManaCostsImpl<>("{1}{G}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
Target controlledTarget = new TargetControlledCreaturePermanent(); Target controlledTarget = new TargetControlledCreaturePermanent();
controlledTarget.setTargetTag(1); controlledTarget.setTargetTag(1);

View file

@ -27,7 +27,8 @@ public final class UndercityUprising extends CardImpl {
StaticFilters.FILTER_PERMANENT_CREATURES StaticFilters.FILTER_PERMANENT_CREATURES
)); ));
this.getSpellAbility().addEffect(new FightTargetsEffect() this.getSpellAbility().addEffect(new FightTargetsEffect()
.setText("Then target creature you control fights target creature you don't control")); .setText("Then target creature you control fights target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>"));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
} }

View file

@ -34,7 +34,7 @@ public final class UnnaturalAggression extends CardImpl {
this.addAbility(new DevoidAbility(this.color)); this.addAbility(new DevoidAbility(this.color));
// Target creature you control fights target creature an opponent controls. // Target creature you control fights target creature an opponent controls.
this.getSpellAbility().addEffect(new FightTargetsEffect()); this.getSpellAbility().addEffect(new FightTargetsEffect(false));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
// If the creature an opponent controls would die this turn, exile it instead. // If the creature an opponent controls would die this turn, exile it instead.

View file

@ -59,7 +59,8 @@ class WarbriarBlessingEffect extends OneShotEffect {
WarbriarBlessingEffect() { WarbriarBlessingEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "enchanted creature fights up to one target creature you don't control"; staticText = "enchanted creature fights up to one target creature you don't control. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
private WarbriarBlessingEffect(final WarbriarBlessingEffect effect) { private WarbriarBlessingEffect(final WarbriarBlessingEffect effect) {

View file

@ -10,6 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -20,23 +21,19 @@ import mage.target.common.TargetCreaturePermanent;
*/ */
public final class WildInstincts extends CardImpl { public final class WildInstincts extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(TargetController.OPPONENT.getControllerPredicate());
}
public WildInstincts(UUID ownerId, CardSetInfo setInfo) { public WildInstincts(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Target creature you control gets +2/+2 until end of turn. It fights target creature an opponent controls. // Target creature you control gets +2/+2 until end of turn. It fights target creature an opponent controls.
Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); Effect boostTargetEffect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
getSpellAbility().addEffect(effect); getSpellAbility().addEffect(boostTargetEffect);
getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
effect = new FightTargetsEffect(); Effect fightTargetsEffect = new FightTargetsEffect();
effect.setText("It fights target creature an opponent controls <i>(Each deals damage equal to its power to each other)</i>"); fightTargetsEffect.setText("It fights target creature an opponent controls. " +
getSpellAbility().addEffect(effect); "<i>(Each deals damage equal to its power to the other.)</i>");
getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); getSpellAbility().addEffect(fightTargetsEffect);
getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
} }
private WildInstincts(final WildInstincts card) { private WildInstincts(final WildInstincts card) {

View file

@ -6,6 +6,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SagaAbility; import mage.abilities.common.SagaAbility;
import mage.abilities.common.WerewolfBackTriggeredAbility; import mage.abilities.common.WerewolfBackTriggeredAbility;
import mage.abilities.common.WerewolfFrontTriggeredAbility; import mage.abilities.common.WerewolfFrontTriggeredAbility;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
@ -1411,8 +1412,11 @@ public class VerifyCardDataTest {
// special check: missing or wrong ability/effect hints // special check: missing or wrong ability/effect hints
Map<Class, String> hints = new HashMap<>(); Map<Class, String> hints = new HashMap<>();
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(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(ScryEffect.class, "Look at the top card of your library. You may put that card on the bottom of your library");
for (Class objectClass : hints.keySet()) { for (Class objectClass : hints.keySet()) {
String objectHint = hints.get(objectClass); String objectHint = hints.get(objectClass);
// ability/effect must have description or not // ability/effect must have description or not

View file

@ -16,8 +16,15 @@ import java.util.UUID;
*/ */
public class FightTargetsEffect extends OneShotEffect { public class FightTargetsEffect extends OneShotEffect {
protected boolean showEffectHint;
public FightTargetsEffect() { public FightTargetsEffect() {
super(Outcome.Damage); this(true);
}
public FightTargetsEffect(boolean showEffectHint) {
super(Outcome.Benefit);
this.showEffectHint = showEffectHint;
} }
public FightTargetsEffect(final FightTargetsEffect effect) { public FightTargetsEffect(final FightTargetsEffect effect) {
@ -80,6 +87,12 @@ public class FightTargetsEffect extends OneShotEffect {
if(!target.getTargetName().contains("other")){ if(!target.getTargetName().contains("other")){
sb.append("target "); sb.append("target ");
} }
sb.append(target.getTargetName());return sb.toString(); sb.append(target.getTargetName());
if (showEffectHint) {
sb.append(". <i>(Each deals damage equal to its power to the other.)</i>");
}
return sb.toString();
} }
} }