From 4f0c6d9c80edb9d4f9435c9a9c4320443950f920 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 9 Apr 2022 11:34:48 -0400 Subject: [PATCH 1/4] vivien_on_the_hunt.txt --- .../cardsfolder/upcoming/vivien_on_the_hunt.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/vivien_on_the_hunt.txt diff --git a/forge-gui/res/cardsfolder/upcoming/vivien_on_the_hunt.txt b/forge-gui/res/cardsfolder/upcoming/vivien_on_the_hunt.txt new file mode 100644 index 00000000000..f1c094a6c06 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/vivien_on_the_hunt.txt @@ -0,0 +1,14 @@ +Name:Vivien on the Hunt +ManaCost:4 G G +Types:Legendary Planeswalker Vivien +Loyalty: 4 +A:AB$ Sacrifice | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | Optional$ True | SacValid$ Creature | RememberSacrificed$ True | SubAbility$ DBChangeZone | SpellDescription$ You may sacrifice a creature. If you do, search your library for a creature card with mana value equal to 1 plus the sacrificed creature's mana value, put it onto the battlefield, then shuffle. +SVar:DBChangeZone:DB$ ChangeZone | ConditionDefined$ Remembered | ConditionPresent$ Card | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature.cmcEQX | ChangeTypeDesc$ creature card with mana value equal to 1 plus the sacrificed creature's mana value | ChangeNum$ 1 | SubAbility$ DBCleanup +SVar:X:Remembered$CardManaCost/Plus.1 +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +A:AB$ Mill | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Defined$ You | NumCards$ 5 | RememberMilled$ True | SubAbility$ DBChangeZone2 | SpellDescription$ Mill five cards, then put any number of creature cards milled this way into your hand. +SVar:DBChangeZone2:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | Hidden$ True | ChangeType$ Creature.IsRemembered | ChangeTypeDesc$ creature cards milled this way | ChangeNum$ Z | ChangeNumDesc$ any number of | SelectPrompt$ Select any number of creature cards milled this way | SubAbility$ DBCleanup +SVar:Z:Remembered$Valid Creature +A:AB$ Token | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | TokenScript$ g_4_4_rhino_warrior | SpellDescription$ Create a 4/4 green Rhino Warrior creature token. +DeckHas:Ability$Sacrifice|Token|Mill|Graveyard & Type$Rhino +Oracle:[+2]: You may sacrifice a creature. If you do, search your library for a creature card with mana value equal to 1 plus the sacrificed creature's mana value, put it onto the battlefield, then shuffle.\n[+1]: Mill five cards, then put any number of creature cards milled this way into your hand.\n[−1]: Create a 4/4 green Rhino Warrior creature token. From a6f636a51eac1b0233da0d581a614b8bbf8968c6 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 9 Apr 2022 11:34:58 -0400 Subject: [PATCH 2/4] g_4_4_rhino_warrior.txt --- forge-gui/res/tokenscripts/g_4_4_rhino_warrior.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 forge-gui/res/tokenscripts/g_4_4_rhino_warrior.txt diff --git a/forge-gui/res/tokenscripts/g_4_4_rhino_warrior.txt b/forge-gui/res/tokenscripts/g_4_4_rhino_warrior.txt new file mode 100644 index 00000000000..c3b724f2be9 --- /dev/null +++ b/forge-gui/res/tokenscripts/g_4_4_rhino_warrior.txt @@ -0,0 +1,6 @@ +Name:Rhino Warrior Token +ManaCost:no cost +Colors:green +Types:Creature Rhino Warrior +PT:4/4 +Oracle: From 94e395b4cd528df6d16d9f22126688f706dbc7c6 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 9 Apr 2022 11:35:48 -0400 Subject: [PATCH 3/4] SacrificeEffect: add (OPTIONAL) tag to StackDesc --- .../java/forge/game/ability/effects/SacrificeEffect.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java b/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java index abb1ab3d665..76e8e1c234c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java @@ -213,6 +213,10 @@ public class SacrificeEffect extends SpellAbilityEffect { String valid = sa.getParamOrDefault("SacValid", "Self"); String num = sa.getParamOrDefault("Amount", "1"); + if (sa.hasParam("Optional")) { // TODO make boolean and handle verb reconjugation throughout + sb.append("(OPTIONAL) "); + } + final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), num, sa); if (valid.equals("Self")) { @@ -228,9 +232,9 @@ public class SacrificeEffect extends SpellAbilityEffect { msg = CardType.CoreType.isValidEnum(msg) ? msg.toLowerCase() : msg; if (sa.hasParam("Destroy")) { - sb.append(oneTgtP ? "destroys " : " destroys "); + sb.append(oneTgtP ? "destroys " : " destroy "); } else { - sb.append(oneTgtP ? "sacrifices " : "sacrifices "); + sb.append(oneTgtP ? "sacrifices " : "sacrifice "); } sb.append(Lang.nounWithNumeralExceptOne(amount, msg)).append("."); } From 2e3e3441804004f92450f51effe19cd0454eef89 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 9 Apr 2022 11:36:49 -0400 Subject: [PATCH 4/4] ChangeZoneEffect: add StackDesc for non-targeted from origin Graveyard --- .../forge/game/ability/effects/ChangeZoneEffect.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java index 354a38db3cb..b4db3ff835c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChangeZoneEffect.java @@ -172,7 +172,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect { } final String cardTag = type.contains("card") ? "" : " card"; sb.append(Lang.nounWithNumeralExceptOne(num, type + cardTag)).append(", "); - if (!sa.hasParam("NoReveal") || !destination.equals("Battlefield")) { + if (!sa.hasParam("NoReveal") && !destination.equals("Battlefield")) { if (choosers.size() == 1) { sb.append(num > 1 ? "reveals them, " : "reveals it, "); } else { @@ -294,6 +294,14 @@ public class ChangeZoneEffect extends SpellAbilityEffect { // for the non-targeted SAs when you choose what is returned on resolution sb.append("Return ").append(num).append(" ").append(type).append(" card(s) "); sb.append(" to your ").append(destination); + } else if (origin.equals("Graveyard")) { + // for non-targeted SAs when you choose what is moved on resolution + // this will need expansion as more cards use it + sb.append(chooserNames).append(" puts "); + final String cardTag = type.contains("card") ? "" : " card"; + sb.append(num != 0 ? Lang.nounWithNumeralExceptOne(num, type + cardTag) : + sa.getParamOrDefault("ChangeNumDesc", "") + " " + type + cardTag); + sb.append(" into their ").append(destination.toLowerCase()).append("."); } return sb.toString();