mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
text fixes
This commit is contained in:
parent
0820761c3a
commit
33781ac614
18 changed files with 48 additions and 122 deletions
|
|
@ -12,7 +12,6 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +19,7 @@ import java.util.Optional;
|
|||
*/
|
||||
public enum CavesControlledAndInGraveCount implements DynamicValue {
|
||||
FOR_EACH("1", "Cave you control and each Cave card in your graveyard"),
|
||||
WHERE_X("X", "Caves you control plus the number of Cave cards in your graveyard");
|
||||
WHERE_X("X", "the number of Caves you control plus the number of Cave cards in your graveyard");
|
||||
private static final FilterPermanent filter1 = new FilterControlledPermanent(SubType.CAVE);
|
||||
private static final FilterCard filter2 = new FilterCard();
|
||||
|
||||
|
|
@ -49,7 +48,6 @@ public enum CavesControlledAndInGraveCount implements DynamicValue {
|
|||
.count(filter1, sourceAbility.getControllerId(), sourceAbility, game)
|
||||
+ Optional
|
||||
.ofNullable(game.getPlayer(sourceAbility.getControllerId()))
|
||||
.filter(Objects::nonNull)
|
||||
.map(Player::getGraveyard)
|
||||
.map(g -> g.count(filter2, game))
|
||||
.orElse(0);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class ReturnSourceFromGraveyardToBattlefieldEffect extends OneShotEffect
|
|||
}
|
||||
|
||||
public ReturnSourceFromGraveyardToBattlefieldEffect(boolean tapped) {
|
||||
this(tapped, true);
|
||||
this(tapped, false);
|
||||
}
|
||||
|
||||
public ReturnSourceFromGraveyardToBattlefieldEffect(boolean tapped, boolean ownerControl) {
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ public class ReturnSourceFromGraveyardToBattlefieldWithCounterEffect extends Ret
|
|||
private final Counter counter;
|
||||
|
||||
public ReturnSourceFromGraveyardToBattlefieldWithCounterEffect(Counter counter, boolean tapped) {
|
||||
this(counter, tapped, true, false, false);
|
||||
this(counter, tapped, false, false, false);
|
||||
}
|
||||
|
||||
public ReturnSourceFromGraveyardToBattlefieldWithCounterEffect(Counter counter, boolean tapped, boolean ownerControl, boolean haste, boolean attacking) {
|
||||
super(tapped, ownerControl, haste, attacking);
|
||||
this.counter = counter;
|
||||
this.staticText = setText();
|
||||
this.staticText += " with " + counter.getDescription() + " on it";
|
||||
}
|
||||
|
||||
private ReturnSourceFromGraveyardToBattlefieldWithCounterEffect(final ReturnSourceFromGraveyardToBattlefieldWithCounterEffect effect) {
|
||||
|
|
@ -44,23 +44,6 @@ public class ReturnSourceFromGraveyardToBattlefieldWithCounterEffect extends Ret
|
|||
return super.apply(game, source);
|
||||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder(staticText);
|
||||
sb.append(" with ");
|
||||
if (counter.getCount() == 1) {
|
||||
sb.append('a');
|
||||
} else {
|
||||
sb.append(counter.getCount());
|
||||
}
|
||||
sb.append(' ');
|
||||
sb.append(counter.getName());
|
||||
sb.append(" counter");
|
||||
if (counter.getCount() != 1) {
|
||||
sb.append('s');
|
||||
}
|
||||
sb.append(" on it");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class AddCounterSourceReplacementEffect extends ReplacementEffectImpl {
|
||||
|
|
|
|||
|
|
@ -119,8 +119,11 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
|
|||
if (excludeSource && !each && !message.startsWith("all")) {
|
||||
sb.append("other ");
|
||||
}
|
||||
sb.append(filter.getMessage()).append(" you control ");
|
||||
sb.append(each ? "gets " : "get ");
|
||||
sb.append(filter.getMessage());
|
||||
if (!filter.getMessage().endsWith("you control")) {
|
||||
sb.append(" you control");
|
||||
}
|
||||
sb.append(each ? " gets " : " get ");
|
||||
sb.append(CardUtil.getBoostText(power, toughness, duration));
|
||||
staticText = sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,11 +126,14 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl {
|
|||
sb.append("other ");
|
||||
}
|
||||
String gainedAbility = CardUtil.stripReminderText(ability.getRule());
|
||||
sb.append(filter.getMessage()).append(" you control ");
|
||||
sb.append(filter.getMessage());
|
||||
if (!filter.getMessage().endsWith("you control")) {
|
||||
sb.append(" you control");
|
||||
}
|
||||
if (duration == Duration.WhileOnBattlefield || duration == Duration.EndOfGame) {
|
||||
sb.append("have ");
|
||||
sb.append(" have ");
|
||||
} else {
|
||||
sb.append("gain ");
|
||||
sb.append(" gain ");
|
||||
}
|
||||
if (forceQuotes || gainedAbility.startsWith("When") || gainedAbility.startsWith("{T}")) {
|
||||
gainedAbility = '"' + gainedAbility + '"';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue