mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Keyword: make Suspend extra class to make the special case if it doesn't have Cost or amount
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -618,6 +618,7 @@ forge-game/src/main/java/forge/game/keyword/Kicker.java -text svneol=unset#text/
|
|||||||
forge-game/src/main/java/forge/game/keyword/Modular.java -text svneol=unset#text/plain
|
forge-game/src/main/java/forge/game/keyword/Modular.java -text svneol=unset#text/plain
|
||||||
forge-game/src/main/java/forge/game/keyword/Protection.java -text
|
forge-game/src/main/java/forge/game/keyword/Protection.java -text
|
||||||
forge-game/src/main/java/forge/game/keyword/SimpleKeyword.java -text
|
forge-game/src/main/java/forge/game/keyword/SimpleKeyword.java -text
|
||||||
|
forge-game/src/main/java/forge/game/keyword/Suspend.java -text svneol=unset#text/plain
|
||||||
forge-game/src/main/java/forge/game/keyword/UndefinedKeyword.java -text
|
forge-game/src/main/java/forge/game/keyword/UndefinedKeyword.java -text
|
||||||
forge-game/src/main/java/forge/game/mana/Mana.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/mana/Mana.java svneol=native#text/plain
|
||||||
forge-game/src/main/java/forge/game/mana/ManaCostBeingPaid.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/mana/ManaCostBeingPaid.java svneol=native#text/plain
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public enum Keyword {
|
|||||||
STRIVE(KeywordWithCost.class, false, "CARDNAME costs %s more to cast for each target beyond the first."),
|
STRIVE(KeywordWithCost.class, false, "CARDNAME costs %s more to cast for each target beyond the first."),
|
||||||
SUNBURST(SimpleKeyword.class, false, "This enters the battlefield with either a +1/+1 or charge counter on it for each color of mana spent to cast it based on whether it's a creature."),
|
SUNBURST(SimpleKeyword.class, false, "This enters the battlefield with either a +1/+1 or charge counter on it for each color of mana spent to cast it based on whether it's a creature."),
|
||||||
SURGE(KeywordWithCost.class, true, "You may cast this spell for its surge cost if you or a teammate has cast another spell this turn."),
|
SURGE(KeywordWithCost.class, true, "You may cast this spell for its surge cost if you or a teammate has cast another spell this turn."),
|
||||||
SUSPEND(KeywordWithCostAndAmount.class, false, "Rather than cast this card from your hand, you may pay %s and exile it with {%d:time counter} on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost."),
|
SUSPEND(Suspend.class, false, "Rather than cast this card from your hand, you may pay %s and exile it with {%d:time counter} on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost."),
|
||||||
TOTEM_ARMOR(SimpleKeyword.class, true, "If enchanted permanent would be destroyed, instead remove all damage marked on it and destroy this Aura."),
|
TOTEM_ARMOR(SimpleKeyword.class, true, "If enchanted permanent would be destroyed, instead remove all damage marked on it and destroy this Aura."),
|
||||||
TRAMPLE(SimpleKeyword.class, true, "If this creature would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker."),
|
TRAMPLE(SimpleKeyword.class, true, "If this creature would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker."),
|
||||||
TRANSFIGURE(KeywordWithCost.class, false, "%s, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card onto the battlefield. Then shuffle your library. Transfigure only as a sorcery."),
|
TRANSFIGURE(KeywordWithCost.class, false, "%s, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card onto the battlefield. Then shuffle your library. Transfigure only as a sorcery."),
|
||||||
|
|||||||
24
forge-game/src/main/java/forge/game/keyword/Suspend.java
Normal file
24
forge-game/src/main/java/forge/game/keyword/Suspend.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package forge.game.keyword;
|
||||||
|
|
||||||
|
public class Suspend extends KeywordWithCostAndAmount {
|
||||||
|
|
||||||
|
boolean withoutCostAndAmount = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void parse(String details) {
|
||||||
|
if ("".equals(details)) {
|
||||||
|
withoutCostAndAmount = true;
|
||||||
|
} else {
|
||||||
|
super.parse(details);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String formatReminderText(String reminderText) {
|
||||||
|
if (withoutCostAndAmount) {
|
||||||
|
return "At the beginning of its owner's upkeep, remove a time counter from that card. When the last is removed, the player plays it without paying its mana cost. If it's a creature, it has haste.";
|
||||||
|
} else {
|
||||||
|
return super.formatReminderText(reminderText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user