From f58db07bc0f91c562cedb1bafb9304e10ebf6d0f Mon Sep 17 00:00:00 2001 From: BigCrunch22 <22bigcrunch@gmail.com> Date: Sat, 22 Aug 2026 21:29:04 +0800 Subject: [PATCH] Implement Sliver of Hope - Sliver of Hope (Hope) --- forge-game/src/main/java/forge/game/card/Card.java | 2 +- .../src/main/java/forge/game/card/CardFactoryUtil.java | 5 +++++ forge-game/src/main/java/forge/game/keyword/Keyword.java | 1 + forge-gui/res/cardsfolder/s/sliver_of_hope.txt | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/cardsfolder/s/sliver_of_hope.txt diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 5249b18cd2aa..48c300cf49e2 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -2633,7 +2633,7 @@ private String keywordsToText(final Collection keywords) { || keyword.equals("Horsemanship") || keyword.equals("Infect") || keyword.equals("Persist") || keyword.equals("Phasing") || keyword.equals("Shadow") || keyword.equals("Skulk") || keyword.equals("Undying") || keyword.equals("Wither") || keyword.equals("Bargain") - || keyword.equals("Mentor") || keyword.equals("Training")) { + || keyword.equals("Mentor") || keyword.equals("Training") || keyword.equals("Hope")) { if (sb.length() != 0) { sb.append("\r\n"); } diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 620dac70ee2d..2caf5989ee44 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -2303,6 +2303,11 @@ public static void addReplacementEffect(final KeywordInterface inst, final CardS final ReplacementEffect re = makeEtbCounter(sb.toString(), card, intrinsic); + inst.addReplacement(re); + } else if (keyword.equals("Hope")) { + final String repeffstr = "Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+attacking" + + " | Prevent$ True | Secondary$ True | Description$ Hope (" + inst.getReminderText() + ")"; + final ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, host, intrinsic, card); inst.addReplacement(re); } else if (keyword.startsWith("Impending") && inst instanceof KeywordWithCostAndAmount impending) { final String effect = "DB$ PutCounter | Defined$ ReplacedCard | CounterType$ TIME | CounterNum$ " + impending.getAmountString() diff --git a/forge-game/src/main/java/forge/game/keyword/Keyword.java b/forge-game/src/main/java/forge/game/keyword/Keyword.java index 646f3131b54c..840039620744 100644 --- a/forge-game/src/main/java/forge/game/keyword/Keyword.java +++ b/forge-game/src/main/java/forge/game/keyword/Keyword.java @@ -102,6 +102,7 @@ public enum Keyword { HEXPROOF("Hexproof", Hexproof.class, true, "This can't be the target of %s spells or abilities your opponents control."), HIDEAWAY("Hideaway", KeywordWithAmount.class, false, "When this permanent enters, look at the top {%d:card} of your library, exile one face down, then put the rest on the bottom of your library."), HIDDEN_AGENDA("Hidden agenda", SimpleKeyword.class, false, "Start the game with this conspiracy face down in the command zone and secretly choose a card name. You may turn this conspiracy face up any time and reveal that name."), + HOPE("Hope", SimpleKeyword.class, true, "Prevent all damage that would be dealt to attacking creatures with hope."), HORSEMANSHIP("Horsemanship", SimpleKeyword.class, true, "This creature can't be blocked except by creatures with horsemanship."), IMPENDING("Impending", KeywordWithCostAndAmount.class, false, "If you cast this spell for its impending cost, it enters with {%2$d:time counter} and isn't a creature until the last is removed. At the beginning of your end step, remove a time counter from it."), IMPROVISE("Improvise", SimpleKeyword.class, true, "Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}."), diff --git a/forge-gui/res/cardsfolder/s/sliver_of_hope.txt b/forge-gui/res/cardsfolder/s/sliver_of_hope.txt new file mode 100644 index 000000000000..64ec5c10ee0b --- /dev/null +++ b/forge-gui/res/cardsfolder/s/sliver_of_hope.txt @@ -0,0 +1,6 @@ +Name:Sliver of Hope +ManaCost:3 W +Types:Creature Sliver +PT:3/3 +S:Mode$ Continuous | Affected$ Sliver.YouCtrl | AddKeyword$ Hope | Description$ Slivers you control have hope. +Oracle:Slivers you control have hope. (Prevent all damage that would be dealt to attacking creatures with hope.)