updated fight effect text

This commit is contained in:
Evan Kranzler 2021-11-13 18:30:42 -05:00
parent b286d70447
commit 652dd49940
7 changed files with 19 additions and 11 deletions

View file

@ -31,7 +31,7 @@ import java.util.UUID;
public final class BrashTaunter extends CardImpl { public final class BrashTaunter extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent(); private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature");
static { static {
filter.add(AnotherPredicate.instance); filter.add(AnotherPredicate.instance);

View file

@ -19,7 +19,6 @@ import mage.counters.CounterType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
@ -41,7 +40,7 @@ public final class FoeRazerRegent extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Foe-Razer Regent enters the battlefield, you may have it fight target creature you don't control. // When Foe-Razer Regent enters the battlefield, you may have it fight target creature you don't control.
Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect().setText("you may have it fight target creature you don't control"), true);
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.addAbility(ability); this.addAbility(ability);

View file

@ -33,7 +33,9 @@ public final class MarkovEnforcer extends CardImpl {
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
// Whenever Markov Enforcer or another Vampire enters the battlefield under your control, Markov Enforcer fights up to one target creature an opponent controls. // Whenever Markov Enforcer or another Vampire enters the battlefield under your control, Markov Enforcer fights up to one target creature an opponent controls.
Ability ability = new EntersBattlefieldThisOrAnotherTriggeredAbility(new FightTargetSourceEffect(), filter); Ability ability = new EntersBattlefieldThisOrAnotherTriggeredAbility(
new FightTargetSourceEffect(), filter, false, true
);
ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1)); ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1));
this.addAbility(ability); this.addAbility(ability);

View file

@ -41,7 +41,7 @@ public final class NessianWildsRavager extends CardImpl {
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(ability, TributeNotPaidCondition.instance,
"When {this} enters the battlefield, if its tribute wasn't paid, you may have {this} fight another target creature.")); "When {this} enters the battlefield, if tribute wasn't paid, you may have {this} fight another target creature."));
} }
private NessianWildsRavager(final NessianWildsRavager card) { private NessianWildsRavager(final NessianWildsRavager card) {

View file

@ -32,7 +32,7 @@ import java.util.UUID;
*/ */
public final class PolukranosUnchained extends CardImpl { public final class PolukranosUnchained extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent(); private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature");
static { static {
filter.add(AnotherPredicate.instance); filter.add(AnotherPredicate.instance);

View file

@ -27,7 +27,7 @@ public final class SomberwaldStag extends CardImpl {
// When Somberwald Stag enters the battlefield, you may have it fight target creature you don't control. // When Somberwald Stag enters the battlefield, you may have it fight target creature you don't control.
Effect effect = new FightTargetSourceEffect(); Effect effect = new FightTargetSourceEffect();
effect.setText("have it fight target creature you don't control"); effect.setText("you may have it fight target creature you don't control");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common; package mage.abilities.effects.common;
import mage.MageObject; import mage.MageObject;
@ -8,9 +7,9 @@ import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.Target;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public class FightTargetSourceEffect extends OneShotEffect { public class FightTargetSourceEffect extends OneShotEffect {
@ -52,7 +51,15 @@ public class FightTargetSourceEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) { if (staticText != null && !staticText.isEmpty()) {
return staticText; return staticText;
} }
return new StringBuilder("{this} fights another target ").append(mode.getTargets().get(0).getTargetName()).toString(); Target target = mode.getTargets().get(0);
StringBuilder sb = new StringBuilder("{this} fights ");
if (target.getMinNumberOfTargets() == 0 && target.getMaxNumberOfTargets() == 1) {
sb.append("up to one ");
}
if (!target.getTargetName().contains("other")) {
sb.append("target ");
}
sb.append(target.getTargetName());
return sb.toString();
} }
} }