mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
many the text fixes
This commit is contained in:
parent
8f89253b58
commit
1816c8ad73
99 changed files with 208 additions and 227 deletions
|
|
@ -226,7 +226,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
}
|
||||
}
|
||||
if (replaceRuleText && triggerPhrase != null) {
|
||||
superRule = superRule.replaceFirst("^((?:you may )?sacrifice |put a [^ ]+ counter on |return )?\\{this\\}", "$1it");
|
||||
superRule = superRule.replaceFirst("^((?:you may )?sacrifice |put an? [^ ]+ counter on |return |transform )?\\{this\\}", "$1it");
|
||||
}
|
||||
sb.append(superRule);
|
||||
if (triggersOnceEachTurn) {
|
||||
|
|
@ -272,6 +272,8 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
|| effect instanceof ReturnToHandSourceEffect
|
||||
|| effect instanceof ShuffleIntoLibrarySourceEffect
|
||||
|| effect instanceof ExileSourceEffect
|
||||
|| effect instanceof FlipSourceEffect
|
||||
|| effect instanceof DestroySourceEffect
|
||||
) ? "When " : "Whenever ");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class BecomesTappedAttachedTriggeredAbility extends TriggeredAbilityImpl
|
|||
|
||||
public BecomesTappedAttachedTriggeredAbility(Effect effect, String description, boolean isOptional) {
|
||||
super(Zone.BATTLEFIELD, effect, isOptional);
|
||||
setTriggerPhrase("Whenever " + description + " becomes tapped, ");
|
||||
setTriggerPhrase(getWhen() + description + " becomes tapped, ");
|
||||
}
|
||||
|
||||
protected BecomesTappedAttachedTriggeredAbility(final BecomesTappedAttachedTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public class BlocksSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public BlocksSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
setTriggerPhrase("Whenever {this} blocks, ");
|
||||
this.replaceRuleText = true;
|
||||
}
|
||||
|
||||
protected BlocksSourceTriggeredAbility(final BlocksSourceTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package mage.abilities.common;
|
|||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedEvent;
|
||||
|
|
@ -25,10 +22,7 @@ public class DealsCombatDamageToAPlayerTriggeredAbility extends TriggeredAbility
|
|||
public DealsCombatDamageToAPlayerTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
boolean textWhen = !optional && (effect instanceof SacrificeSourceEffect
|
||||
|| effect instanceof ShuffleIntoLibrarySourceEffect
|
||||
|| effect instanceof ExileSourceEffect);
|
||||
setTriggerPhrase((textWhen ? "When" : "Whenever") + " {this} deals combat damage to a player, ");
|
||||
setTriggerPhrase(getWhen() + "{this} deals combat damage to a player, ");
|
||||
this.replaceRuleText = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.effects.Effect;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
|
|
@ -17,9 +16,10 @@ public class DiscardedByOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
this(effect, false);
|
||||
}
|
||||
|
||||
public DiscardedByOpponentTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.GRAVEYARD, effect, optional);
|
||||
setTriggerPhrase("When a spell or ability an opponent controls causes you to discard this card, ");
|
||||
public DiscardedByOpponentTriggeredAbility(Effect effect, boolean textCardName) {
|
||||
super(Zone.GRAVEYARD, effect, false);
|
||||
setTriggerPhrase("When a spell or ability an opponent controls causes you to discard "
|
||||
+ (textCardName ? "{this}, " : "this card, "));
|
||||
}
|
||||
|
||||
protected DiscardedByOpponentTriggeredAbility(final DiscardedByOpponentTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
|
|
@ -18,7 +17,7 @@ public class DrawCardControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
public DrawCardControllerTriggeredAbility(Zone zone, Effect effect, boolean optional) {
|
||||
super(zone, effect, optional);
|
||||
setTriggerPhrase("Whenever you draw a card, ");
|
||||
setTriggerPhrase(getWhen() + "you draw a card, ");
|
||||
}
|
||||
|
||||
protected DrawCardControllerTriggeredAbility(final DrawCardControllerTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ public class Effects extends ArrayList<Effect> {
|
|||
// add punctuation to very last rule.
|
||||
if (lastRule != null && lastRule.length() > 3
|
||||
&& !lastRule.endsWith(".")
|
||||
&& !lastRule.endsWith("!")
|
||||
&& !lastRule.endsWith("\"")
|
||||
&& !lastRule.endsWith(".]")
|
||||
&& !lastRule.startsWith("<b>LEVEL ")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -21,7 +20,7 @@ public class DestroySourceEffect extends OneShotEffect {
|
|||
public DestroySourceEffect(boolean noRegen) {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.noRegen = noRegen;
|
||||
staticText = "destroy {this}";
|
||||
staticText = "destroy {this}" + (noRegen ? ". It can't be regenerated" : "");
|
||||
}
|
||||
|
||||
protected DestroySourceEffect(final DestroySourceEffect effect) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class FlipSourceEffect extends OneShotEffect {
|
|||
public FlipSourceEffect(Token flipToken) {
|
||||
super(Outcome.BecomeCreature);
|
||||
this.flipToken = flipToken;
|
||||
staticText = "flip it";
|
||||
staticText = "flip {this}";
|
||||
}
|
||||
|
||||
protected FlipSourceEffect(final FlipSourceEffect effect) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class CantAttackBlockUnlessPaysSourceEffect extends PayCostToAttackBlockE
|
|||
public CantAttackBlockUnlessPaysSourceEffect(Cost cost, RestrictType restrictType) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, restrictType, cost);
|
||||
staticText = "{this} can't " + restrictType.toString() + " unless you " + (cost == null ? "" : cost.getText())
|
||||
+ (restrictType == RestrictType.ATTACK ? " <i>(This cost is paid as attackers are declared.)</i>" : "");
|
||||
+ (restrictType == RestrictType.ATTACK ? ". <i>(This cost is paid as attackers are declared.)</i>" : "");
|
||||
}
|
||||
|
||||
public CantAttackBlockUnlessPaysSourceEffect(ManaCosts manaCosts, RestrictType restrictType) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class InspiredAbility extends TriggeredAbilityImpl {
|
|||
setAbilityWord(AbilityWord.INSPIRED);
|
||||
}
|
||||
setTriggerPhrase("Whenever {this} becomes untapped, ");
|
||||
this.replaceRuleText = true;
|
||||
}
|
||||
|
||||
protected InspiredAbility(final InspiredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ public class ProtectionAbility extends StaticAbility {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "protection from " + filter.getMessage() + (removeAuras ? "" : ". This effect doesn't remove Auras.");
|
||||
return (flavorWord == null ? "protection from " : CardUtil.italicizeWithEmDash(flavorWord) + "Protection from ")
|
||||
+ filter.getMessage() + (removeAuras ? "" : ". This effect doesn't remove Auras.");
|
||||
}
|
||||
|
||||
public boolean canTarget(MageObject source, Game game) {
|
||||
|
|
@ -125,7 +126,7 @@ public class ProtectionAbility extends StaticAbility {
|
|||
return true;
|
||||
}
|
||||
|
||||
private static final String getFilterText(ObjectColor color) {
|
||||
private static String getFilterText(ObjectColor color) {
|
||||
return CardUtil.concatWithAnd(
|
||||
color.getColors()
|
||||
.stream()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue