mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
[CLB] various text fixes
This commit is contained in:
parent
a9d1a92abc
commit
e9044d69e9
38 changed files with 103 additions and 64 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.MageItem;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -10,10 +11,9 @@ import mage.filter.predicate.other.PlayerIdPredicate;
|
|||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageItem;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -41,7 +41,8 @@ public class PreventAllDamageToAllEffect extends PreventionEffectImpl {
|
|||
+ (onlyCombat ? "combat " : "")
|
||||
+ "damage that would be dealt to "
|
||||
+ filter.getMessage()
|
||||
+ (duration.toString().isEmpty() ? "" : ' ' + duration.toString());
|
||||
+ (duration.toString().isEmpty() ? "" : ' ')
|
||||
+ (duration == Duration.EndOfTurn ? "this turn" : duration.toString());
|
||||
}
|
||||
|
||||
public PreventAllDamageToAllEffect(final PreventAllDamageToAllEffect effect) {
|
||||
|
|
@ -85,12 +86,12 @@ public class PreventAllDamageToAllEffect extends PreventionEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game)) {
|
||||
MageItem object ;
|
||||
if(EventType.DAMAGE_PLAYER.equals(event.getType())) {
|
||||
object = game.getPlayer(event.getTargetId());
|
||||
MageItem object;
|
||||
if (EventType.DAMAGE_PLAYER.equals(event.getType())) {
|
||||
object = game.getPlayer(event.getTargetId());
|
||||
} else {
|
||||
object = game.getObject(event.getTargetId());
|
||||
}
|
||||
}
|
||||
if (object != null) {
|
||||
return filter.match(object, source.getControllerId(), source, game);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@ public class UntapTargetEffect extends OneShotEffect {
|
|||
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
|
||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets()));
|
||||
sb.append(haveTargetWord ? " " : " target ");
|
||||
sb.append(target.getTargetName()).append('s');
|
||||
sb.append(target.getTargetName());
|
||||
if (!target.getTargetName().endsWith("s")) {
|
||||
sb.append('s');
|
||||
}
|
||||
} else {
|
||||
sb.append(haveTargetWord ? "" : "target ");
|
||||
sb.append(target.getTargetName());
|
||||
|
|
|
|||
|
|
@ -7,10 +7,14 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.constants.*;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
|
|
@ -136,7 +140,7 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
|
|||
|
||||
boolean quotes = forceQuotes
|
||||
|| ability instanceof SimpleActivatedAbility
|
||||
||ability instanceof ActivatedManaAbilityImpl
|
||||
|| ability instanceof ActivatedManaAbilityImpl
|
||||
|| ability instanceof TriggeredAbility;
|
||||
boolean each = filter.getMessage().toLowerCase(Locale.ENGLISH).startsWith("each");
|
||||
if (excludeSource && !each) {
|
||||
|
|
@ -150,10 +154,10 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
if (quotes) {
|
||||
sb.append('"');
|
||||
}
|
||||
sb.append(ability.getRule());
|
||||
if (quotes) {
|
||||
sb.append(CardUtil.getTextWithFirstCharUpperCase(ability.getRule()));
|
||||
sb.append('"');
|
||||
} else {
|
||||
sb.append(ability.getRule());
|
||||
}
|
||||
if (!duration.toString().isEmpty()) {
|
||||
sb.append(' ').append(duration.toString());
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import mage.constants.*;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -218,7 +219,7 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl {
|
|||
if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) {
|
||||
sb.append("up to ");
|
||||
}
|
||||
sb.append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName()).append(" gain ");
|
||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName()).append(" gain ");
|
||||
} else {
|
||||
if (!target.getTargetName().toLowerCase(Locale.ENGLISH).startsWith("another")) {
|
||||
sb.append("target ");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class MyriadAbility extends AttacksTriggeredAbility {
|
|||
|
||||
public MyriadAbility() {
|
||||
super(new MyriadEffect(), false,
|
||||
"Myriad <i>(Whenever this creature attacks, for each opponent other than the defending player, "
|
||||
"myriad <i>(Whenever this creature attacks, for each opponent other than the defending player, "
|
||||
+ "put a token that's a copy of this creature onto the battlefield tapped and attacking "
|
||||
+ "that player or a planeswalker they control. Exile those tokens at the end of combat.)</i>",
|
||||
SetTargetPointer.PLAYER
|
||||
|
|
|
|||
|
|
@ -301,11 +301,11 @@ public final class StaticFilters {
|
|||
FILTER_PERMANENTS_ARTIFACT_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledArtifactPermanent FILTER_ARTIFACTS_NON_CREATURE = new FilterControlledArtifactPermanent("Noncreature artifacts");
|
||||
public static final FilterControlledArtifactPermanent FILTER_ARTIFACT_NON_CREATURE = new FilterControlledArtifactPermanent("noncreature artifact");
|
||||
|
||||
static {
|
||||
FILTER_ARTIFACTS_NON_CREATURE.add(Predicates.not(CardType.CREATURE.getPredicate()));
|
||||
FILTER_ARTIFACTS_NON_CREATURE.setLockedFilter(true);
|
||||
FILTER_ARTIFACT_NON_CREATURE.add(Predicates.not(CardType.CREATURE.getPredicate()));
|
||||
FILTER_ARTIFACT_NON_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue