[AER] various text fixes

This commit is contained in:
Evan Kranzler 2022-02-19 22:21:02 -05:00
parent 6d02a902b7
commit 014a4b6941
48 changed files with 205 additions and 236 deletions

View file

@ -138,7 +138,7 @@ public class DiesAttachedTriggeredAbility extends TriggeredAbilityImpl {
if (diesRuleText) {
sb.append(" dies, ");
} else {
sb.append(" is put into graveyard, ");
sb.append(" is put into a graveyard, ");
}
return sb.toString();
}

View file

@ -49,7 +49,7 @@ public class PayEnergyCost extends CostImpl {
}
private void setText() {
StringBuilder sb = new StringBuilder("Pay ");
StringBuilder sb = new StringBuilder("pay ");
for (int i = 0; i < amount; i++) {
sb.append("{E}");
}

View file

@ -1,8 +1,8 @@
package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.Cards;
@ -13,18 +13,18 @@ import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Library;
import mage.players.Player;
import mage.util.CardUtil;
/**
*
* @author Styxo
*/
public class RevealCardsFromLibraryUntilEffect extends OneShotEffect {
private FilterCard filter;
private Zone zoneToPutRest;
private Zone zoneToPutCard;
private boolean shuffleRestInto;
private boolean anyOrder;
private final FilterCard filter;
private final Zone zoneToPutRest;
private final Zone zoneToPutCard;
private final boolean shuffleRestInto;
private final boolean anyOrder;
public RevealCardsFromLibraryUntilEffect(FilterCard filter, Zone zoneToPutCard, Zone zoneToPutRest) {
this(filter, zoneToPutCard, zoneToPutRest, false, false);
@ -41,17 +41,15 @@ public class RevealCardsFromLibraryUntilEffect extends OneShotEffect {
this.zoneToPutRest = zoneToPutRest;
this.shuffleRestInto = shuffleRestInto;
this.anyOrder = anyOrder;
setText();
}
public RevealCardsFromLibraryUntilEffect(final RevealCardsFromLibraryUntilEffect effect) {
private RevealCardsFromLibraryUntilEffect(final RevealCardsFromLibraryUntilEffect effect) {
super(effect);
this.filter = effect.filter;
this.zoneToPutCard = effect.zoneToPutCard;
this.zoneToPutRest = effect.zoneToPutRest;
this.shuffleRestInto = effect.shuffleRestInto;
this.anyOrder = effect.anyOrder;
setText();
}
@Override
@ -63,50 +61,54 @@ public class RevealCardsFromLibraryUntilEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && controller.getLibrary().hasCards()) {
Cards cards = new CardsImpl();
Library library = controller.getLibrary();
Card card = null;
do {
card = library.removeFromTop(game);
if (card != null) {
cards.add(card);
}
} while (library.hasCards() && !filter.match(card, game));
// reveal cards
if (!cards.isEmpty()) {
controller.revealCards(sourceObject.getIdName(), cards, game);
if (filter.match(card, game)) {
// put card in correct zone
controller.moveCards(card, zoneToPutCard, source, game);
// remove it from revealed card list
cards.remove(card);
}
// Put the rest in correct zone
switch (zoneToPutRest) {
case LIBRARY: {
if (!cards.isEmpty()) {
if (shuffleRestInto) {
library.addAll(cards.getCards(game), game);
} else {
controller.putCardsOnBottomOfLibrary(cards, game, source, anyOrder);
}
}
break;
}
default:
if (!cards.isEmpty()) {
controller.moveCards(cards, zoneToPutRest, source, game);
}
}
if (controller == null || !controller.getLibrary().hasCards()) {
return false;
}
Cards cards = new CardsImpl();
Library library = controller.getLibrary();
Card card = null;
do {
card = library.removeFromTop(game);
if (card != null) {
cards.add(card);
}
} while (library.hasCards() && !filter.match(card, game));
// reveal cards
if (cards.isEmpty()) {
return true;
}
return false;
controller.revealCards(sourceObject.getIdName(), cards, game);
if (filter.match(card, game)) {
// put card in correct zone
controller.moveCards(card, zoneToPutCard, source, game);
// remove it from revealed card list
cards.remove(card);
}
// Put the rest in correct zone
if (zoneToPutRest == Zone.LIBRARY) {
if (!cards.isEmpty()) {
if (shuffleRestInto) {
library.addAll(cards.getCards(game), game);
} else {
controller.putCardsOnBottomOfLibrary(cards, game, source, anyOrder);
}
}
} else {
if (!cards.isEmpty()) {
controller.moveCards(cards, zoneToPutRest, source, game);
}
}
return true;
}
private void setText() {
StringBuilder sb = new StringBuilder("reveal cards from the top of your library until you reveal a " + filter.getMessage() + ". Put that card ");
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("reveal cards from the top of your library until you reveal ");
sb.append(CardUtil.addArticle(filter.getMessage()));
sb.append(". Put that card ");
switch (zoneToPutCard) {
case HAND: {
@ -144,6 +146,6 @@ public class RevealCardsFromLibraryUntilEffect extends OneShotEffect {
break;
}
}
staticText = sb.toString();
return sb.toString();
}
}

View file

@ -16,7 +16,7 @@ import mage.constants.Zone;
public final class EtheriumCellToken extends TokenImpl {
public EtheriumCellToken() {
super("Etherium Cell", "colorless artifact token named Etherium Cell which has \"{T}, Sacrifice this artifact: Add one mana of any color.\"");
super("Etherium Cell", "colorless artifact token named Etherium Cell with \"{T}, Sacrifice this artifact: Add one mana of any color.\"");
this.setOriginalExpansionSetCode("AER");
cardType.add(CardType.ARTIFACT);