mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Card: add Aftermath keyword
This commit is contained in:
@@ -1874,6 +1874,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|| (keyword.startsWith("Split second") && !sb.toString().contains("Split second"))
|
||||
|| (keyword.startsWith("Devoid"))) {
|
||||
sb.append(keyword).append("\r\n");
|
||||
} else if (keyword.equals("Aftermath")) {
|
||||
sb.append(Keyword.getInstance(keyword).getReminderText()).append("\r\n");
|
||||
} else if (keyword.equals("You may cast CARDNAME as though it had flash if you pay 2 more to cast it.")) {
|
||||
sb.append(keyword).append("\r\n");
|
||||
} else if (keyword.startsWith("Flashback")) {
|
||||
|
||||
@@ -2160,6 +2160,9 @@ public class CardFactoryUtil {
|
||||
else if (keyword.equals("Living Weapon")) {
|
||||
addTriggerAbility(keyword, card, null);
|
||||
}
|
||||
else if (keyword.equals("Aftermath")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
else if (keyword.equals("Epic")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
@@ -3495,6 +3498,20 @@ public class CardFactoryUtil {
|
||||
kws.addSpellAbility(newSA);
|
||||
}
|
||||
card.addSpellAbility(newSA);
|
||||
} else if (keyword.equals("Aftermath")) {
|
||||
// Aftermath does modify existing SA, and does not add new one
|
||||
|
||||
// only target RightSplit of it
|
||||
final SpellAbility origSA = card.getState(CardStateName.RightSplit).getFirstAbility();
|
||||
origSA.getRestrictions().setZone(ZoneType.Graveyard);
|
||||
|
||||
// Add the Exile Self Part
|
||||
String dbStr = "DB$ ChangeZone | Origin$ Stack | Destination$ Exile";
|
||||
|
||||
final AbilitySub newSA = (AbilitySub) AbilityFactory.getAbility(dbStr.toString(), card);
|
||||
|
||||
// append to original SA
|
||||
origSA.appendSubAbility(newSA);
|
||||
} else if (keyword.startsWith("Awaken")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String counters = k[1];
|
||||
|
||||
@@ -10,11 +10,12 @@ import forge.util.EnumUtil;
|
||||
public enum Keyword {
|
||||
UNDEFINED(SimpleKeyword.class, false, ""),
|
||||
ABSORB(KeywordWithAmount.class, false, "If a source would deal damage to this creature, prevent %d of that damage."),
|
||||
AWAKEN(KeywordWithCostAndAmount.class, true, "If you cast this spell for %s, also put {%d:+1/+1 counter} on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land."),
|
||||
AFFINITY(KeywordWithType.class, false, "This spell costs you {1} less to cast for each %s you control."),
|
||||
AFTERMATH(SimpleKeyword.class, false, "Cast this spell only from your graveyard. Then exile it."),
|
||||
AMPLIFY(KeywordWithAmountAndType.class, false, "As this creature enters the battlefield, put %d +1/+1 counter on it for each %s card you reveal in your hand."),
|
||||
ANNIHILATOR(KeywordWithAmount.class, false, "Whenever this creature attacks, defending player sacrifices {%d:permanent}."),
|
||||
AURA_SWAP(KeywordWithCost.class, false, "%s: You may exchange this permanent with an Aura card in your hand."),
|
||||
AWAKEN(KeywordWithCostAndAmount.class, true, "If you cast this spell for %s, also put {%d:+1/+1 counter} on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land."),
|
||||
BANDING(SimpleKeyword.class, true, "Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding you control are blocking or being blocked by a creature, you divide that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking."),
|
||||
BATTLE_CRY(SimpleKeyword.class, false, "Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn."),
|
||||
BESTOW(KeywordWithCost.class, true, "If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature."),
|
||||
|
||||
Reference in New Issue
Block a user