mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
removed code for 'NextUpkeep' because no cards left that use it
This commit is contained in:
@@ -26,14 +26,8 @@ public class DrawEffect extends SpellAbilityEffect {
|
|||||||
if (tgtPlayers.size() > 1) {
|
if (tgtPlayers.size() > 1) {
|
||||||
sb.append(" each");
|
sb.append(" each");
|
||||||
}
|
}
|
||||||
sb.append(Lang.joinVerb(tgtPlayers, "draw")).append(" ");
|
sb.append(Lang.joinVerb(tgtPlayers, " draw")).append(" ");
|
||||||
|
sb.append(Lang.nounWithAmount(numCards, " card"));
|
||||||
sb.append(numCards).append(Lang.joinNounToAmount(numCards, " card"));
|
|
||||||
|
|
||||||
if (sa.hasParam("NextUpkeep")) {
|
|
||||||
sb.append(" at the beginning of the next upkeep");
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,30 +43,24 @@ public class DrawEffect extends SpellAbilityEffect {
|
|||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
|
|
||||||
final boolean optional = sa.hasParam("OptionalDecider");
|
final boolean optional = sa.hasParam("OptionalDecider");
|
||||||
final boolean slowDraw = sa.hasParam("NextUpkeep");
|
|
||||||
|
|
||||||
for (final Player p : getDefinedPlayersBeforeTargetOnes(sa)) {
|
for (final Player p : getDefinedPlayersBeforeTargetOnes(sa)) {
|
||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa))
|
||||||
if (optional && !p.getController().confirmAction(sa, null, "Do you want to draw " + numCards + " cards(s)?"))
|
if (optional && !p.getController().confirmAction(sa, null, "Do you want to draw " + Lang.nounWithAmount(numCards, " card") + "?"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//TODO: remove this deprecation exception
|
//TODO: remove this deprecation exception
|
||||||
if (slowDraw) {
|
final List<Card> drawn = p.drawCards(numCards);
|
||||||
throw new RuntimeException("This api option is no longer supported. Please file a bug report with the card that threw this error.");
|
if (sa.hasParam("Reveal")) {
|
||||||
} else {
|
p.getGame().getAction().reveal(drawn, p);
|
||||||
final List<Card> drawn = p.drawCards(numCards);
|
}
|
||||||
if (sa.hasParam("Reveal")) {
|
if (sa.hasParam("RememberDrawn")) {
|
||||||
p.getGame().getAction().reveal(drawn, p);
|
for (final Card c : drawn) {
|
||||||
}
|
source.addRemembered(c);
|
||||||
if (sa.hasParam("RememberDrawn")) {
|
}
|
||||||
for (final Card c : drawn) {
|
|
||||||
source.addRemembered(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // drawResolve()
|
} // drawResolve()
|
||||||
}
|
|
||||||
|
|||||||
@@ -48,9 +48,10 @@ public class Lang {
|
|||||||
return subjects.size() > 1 ? verb : verb + "s";
|
return subjects.size() > 1 ? verb : verb + "s";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> String joinNounToAmount(int cnt, String noun) {
|
public static <T> String nounWithAmount(int cnt, String noun) {
|
||||||
// Simpliest check
|
// Simpliest check
|
||||||
return cnt > 1 ? noun : ( noun.endsWith("s") || noun.endsWith("x") ? noun + "es" : noun + "s");
|
String suffix = cnt <= 1 ? "" : ( noun.endsWith("s") || noun.endsWith("x") ? "es" : "s");
|
||||||
|
return String.valueOf(cnt) + " " + noun + suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user