forked from External/mage
simplify text gen for DamageCantBePreventedEffect
This commit is contained in:
parent
98f78790f2
commit
02eafaf062
10 changed files with 11 additions and 11 deletions
|
|
@ -36,7 +36,7 @@ public final class BonecrusherGiant extends AdventureCard {
|
|||
|
||||
// Stomp
|
||||
// Damage can’t be prevented this turn. Stomp deals 2 damage to any target.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(2));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class CallInAProfessional extends CardImpl {
|
|||
// Players can't gain life this turn. Damage can't be prevented this turn. Call In a Professional deals 3 damage to any target.
|
||||
this.getSpellAbility().addEffect(new CantGainLifeAllEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(
|
||||
Duration.EndOfTurn, "Damage can't be prevented this turn"
|
||||
Duration.EndOfTurn
|
||||
));
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class EverlastingTorment extends CardImpl {
|
|||
|
||||
// Damage can't be prevented.
|
||||
this.addAbility(new SimpleStaticAbility(new DamageCantBePreventedEffect(
|
||||
Duration.WhileOnBattlefield, "Damage can't be prevented"
|
||||
Duration.WhileOnBattlefield
|
||||
)));
|
||||
|
||||
// All damage is dealt as though its source had wither.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class FearFireFoes extends CardImpl {
|
|||
|
||||
// Damage can't be prevented this turn. Fear, Fire, Foes! deals X damage to target creature and 1 damage to each other creature with the same controller.
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(
|
||||
Duration.EndOfTurn, "Damage can't be prevented this turn"
|
||||
Duration.EndOfTurn
|
||||
));
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.REGULAR));
|
||||
this.getSpellAbility().addEffect(new FearFireFoesEffect());
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class FlaringPain extends CardImpl {
|
|||
|
||||
|
||||
// Damage can't be prevented this turn.
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn));
|
||||
// Flashback {R}
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{R}")));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class InsultInjury extends SplitCard {
|
|||
// Insult
|
||||
// Damage can't be prevented this turn. If a source you control would deal damage this turn it deals
|
||||
// double that damage instead.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new InsultDoubleDamageEffect());
|
||||
|
||||
// to
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class IsengardUnleashed extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}{R}");
|
||||
|
||||
// Damage can't be prevented this turn. If a source you control would deal damage this turn to an opponent or a permanent an opponent controls, it deals triple that damage instead.
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new IsengardUnleashedTripleDamageEffect());
|
||||
// Flashback {4}{R}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{R}{R}{R}")));
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class Skullcrack extends CardImpl {
|
|||
|
||||
// Players can't gain life this turn. Damage can't be prevented this turn. Skullcrack deals 3 damage to target player.
|
||||
this.getSpellAbility().addEffect(new CantGainLifeAllEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class WildSlash extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// <i>Ferocious</i> If you control a creature with power 4 or greater, damage can't be prevented this turn.
|
||||
ContinuousRuleModifyingEffect effect = new DamageCantBePreventedEffect(Duration.EndOfTurn, "damage can't be prevented this turn");
|
||||
ContinuousRuleModifyingEffect effect = new DamageCantBePreventedEffect(Duration.EndOfTurn);
|
||||
effect.setText("<i>Ferocious</i> — If you control a creature with power 4 or greater, damage can't be prevented this turn.<br>");
|
||||
this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect(effect,
|
||||
new LockedInCondition(FerociousCondition.instance)));
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import mage.game.events.GameEvent;
|
|||
|
||||
public class DamageCantBePreventedEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public DamageCantBePreventedEffect(Duration duration, String staticText) {
|
||||
public DamageCantBePreventedEffect(Duration duration) {
|
||||
super(duration, Outcome.Benefit);
|
||||
this.staticText = staticText;
|
||||
this.staticText = "damage can't be prevented" + (duration == Duration.EndOfTurn ? " this turn" : "");
|
||||
}
|
||||
|
||||
protected DamageCantBePreventedEffect(final DamageCantBePreventedEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue