fixed text on wish effects

This commit is contained in:
Evan Kranzler 2021-03-12 15:05:37 -05:00
parent 9c56a98dc9
commit 19ec3e399e
4 changed files with 30 additions and 22 deletions

View file

@ -27,10 +27,6 @@ public class WishEffect extends OneShotEffect {
private final String choiceText;
private final boolean topOfLibrary;
public WishEffect() {
this(new FilterCard());
}
public WishEffect(FilterCard filter) {
this(filter, true);
}
@ -49,13 +45,27 @@ public class WishEffect extends OneShotEffect {
this.alsoFromExile = alsoFromExile;
this.reveal = reveal;
this.topOfLibrary = topOfLibrary;
choiceText = (topOfLibrary ? "Put " : "Choose ") + filter.getMessage() + " you own from outside the game"
+ (alsoFromExile ? " or in exile" : "")
+ (reveal ? ", reveal that card," : "")
+ (topOfLibrary ? " on top of your library." : " and put it into your hand.");
if (!reveal) {
choiceText = "Put a card you own from outside the game "
+ (topOfLibrary ? "on top of your library." : "into your hand.");
} else {
choiceText = (topOfLibrary ? "Put " : "Reveal ") + filter.getMessage() + " you own from outside the game"
+ (alsoFromExile ? " or choose " + makeExileText(filter)
+ " you own in exile. Put that card into your hand." : " and put it into your hand.");
}
staticText = "You may " + Character.toLowerCase(choiceText.charAt(0)) + choiceText.substring(1, choiceText.length() - 1);
}
private static String makeExileText(FilterCard filter) {
String s = filter.getMessage();
if (s.startsWith("a ")) {
return s.replace("a ", "a face-up ");
} else if (s.startsWith("an ")) {
return s.replace("an ", "a face-up ");
}
return "a face-up " + s;
}
public WishEffect(final WishEffect effect) {
super(effect);
this.filter = effect.filter;