From d9b131c1661a84b31f6aa58c8ebd0d8ce644ac87 Mon Sep 17 00:00:00 2001 From: Tim Mocny Date: Fri, 4 Feb 2022 05:15:17 +0000 Subject: [PATCH] NEO: Satsuki and improvements to PutCounterAll StackDescription builder --- .../ability/effects/CountersPutAllEffect.java | 20 +++++++++++-------- .../res/cardsfolder/h/havengul_runebinder.txt | 5 +++-- .../cardsfolder/i/indulgent_aristocrat.txt | 3 ++- .../cardsfolder/k/katilda_dawnhart_prime.txt | 2 +- .../res/cardsfolder/m/mikaeus_the_lunarch.txt | 5 +++-- .../upcoming/satsuki_the_living_lore.txt | 12 +++++++++++ 6 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/satsuki_the_living_lore.txt diff --git a/forge-game/src/main/java/forge/game/ability/effects/CountersPutAllEffect.java b/forge-game/src/main/java/forge/game/ability/effects/CountersPutAllEffect.java index a378b64d7eb..aa609d24dc1 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/CountersPutAllEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/CountersPutAllEffect.java @@ -11,6 +11,7 @@ import forge.game.card.CounterType; import forge.game.player.Player; import forge.game.spellability.SpellAbility; import forge.game.zone.ZoneType; +import forge.util.Lang; public class CountersPutAllEffect extends SpellAbilityEffect { @@ -22,15 +23,18 @@ public class CountersPutAllEffect extends SpellAbilityEffect { final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("CounterNum"), sa); final String zone = sa.getParamOrDefault("ValidZone", "Battlefield"); - sb.append("Put ").append(amount).append(" ").append(cType.getName()).append(" counter"); - if (amount != 1) { - sb.append("s"); - } - sb.append(" on each valid "); - if (zone.matches("Battlefield")) { - sb.append("permanent."); + sb.append("Put "); + sb.append(Lang.nounWithNumeralExceptOne(amount, cType.getName().toLowerCase() + " counter")); + sb.append(" on each "); + if (sa.hasParam("ValidCardsDesc")) { + sb.append(sa.getParam("ValidCardsDesc")).append("."); } else { - sb.append("card in ").append(zone).append("."); + sb.append("valid "); + if (zone.matches("Battlefield")) { + sb.append("permanent."); + } else { + sb.append("card in ").append(zone).append("."); + } } return sb.toString(); diff --git a/forge-gui/res/cardsfolder/h/havengul_runebinder.txt b/forge-gui/res/cardsfolder/h/havengul_runebinder.txt index 5535d5dfff2..54a5d982ed8 100644 --- a/forge-gui/res/cardsfolder/h/havengul_runebinder.txt +++ b/forge-gui/res/cardsfolder/h/havengul_runebinder.txt @@ -2,6 +2,7 @@ Name:Havengul Runebinder ManaCost:2 U U Types:Creature Human Wizard PT:2/2 -A:AB$ Token | Cost$ 2 U T ExileFromGrave<1/Creature> | TokenAmount$ 1 | TokenScript$ b_2_2_zombie | TokenOwner$ You | LegacyImage$ b 2 2 zombie dka | SubAbility$ DBCounters | SpellDescription$ Create a 2/2 black Zombie creature token, then put a +1/+1 counter on each Zombie creature you control. -SVar:DBCounters:DB$ PutCounterAll | ValidCards$ Creature.Zombie+YouCtrl | CounterType$ P1P1 | CounterNum$ 1 +A:AB$ Token | Cost$ 2 U T ExileFromGrave<1/Creature/creature card> | TokenScript$ b_2_2_zombie | SubAbility$ DBCounters | SpellDescription$ Create a 2/2 black Zombie creature token, then put a +1/+1 counter on each Zombie creature you control. +SVar:DBCounters:DB$ PutCounterAll | ValidCards$ Creature.Zombie+YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | StackDescription$ None +DeckHas:Ability$Token|Counters & Type$Zombie Oracle:{2}{U}, {T}, Exile a creature card from your graveyard: Create a 2/2 black Zombie creature token, then put a +1/+1 counter on each Zombie creature you control. diff --git a/forge-gui/res/cardsfolder/i/indulgent_aristocrat.txt b/forge-gui/res/cardsfolder/i/indulgent_aristocrat.txt index d0e8516fbc6..31910059b9d 100644 --- a/forge-gui/res/cardsfolder/i/indulgent_aristocrat.txt +++ b/forge-gui/res/cardsfolder/i/indulgent_aristocrat.txt @@ -3,8 +3,9 @@ ManaCost:B Types:Creature Vampire Noble PT:1/1 K:Lifelink -A:AB$ PutCounterAll | Cost$ 2 Sac<1/Creature> | ValidCards$ Vampire.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ AtOppEOT | SpellDescription$ Put a +1/+1 counter on each Vampire you control. +A:AB$ PutCounterAll | Cost$ 2 Sac<1/Creature/creature> | ValidCards$ Vampire.YouCtrl | ValidCardsDesc$ Vampire you control | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ AtOppEOT | SpellDescription$ Put a +1/+1 counter on each Vampire you control. SVar:AIPreference:SacCost$Creature.token+nonVampire,Creature.nonVampire+cmcEQ1,Creature.nonVampire+cmcEQ2+powerLE1 +DeckHas:Ability$LifeGain|Counters|Sacrifice DeckHints:Type$Vampire # TODO: improve the logic when the AI wants to sac creatures AI:RemoveDeck:Random diff --git a/forge-gui/res/cardsfolder/k/katilda_dawnhart_prime.txt b/forge-gui/res/cardsfolder/k/katilda_dawnhart_prime.txt index 136eb225a27..c8a667e4336 100644 --- a/forge-gui/res/cardsfolder/k/katilda_dawnhart_prime.txt +++ b/forge-gui/res/cardsfolder/k/katilda_dawnhart_prime.txt @@ -5,7 +5,7 @@ PT:1/1 K:Protection from Werewolves S:Mode$ Continuous | Affected$ Creature.Human+YouCtrl | AddAbility$ Mana | Description$ Human creatures you control have "{T}: Add one mana of any of this creature's colors." SVar:Mana:AB$ ManaReflected | Cost$ T | Valid$ Defined.Self | ColorOrType$ Color | ReflectProperty$ Is | SpellDescription$ Add one mana of any of this creature's colors. -A:AB$ PutCounterAll | Cost$ 4 G W T | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on each creature you control. +A:AB$ PutCounterAll | Cost$ 4 G W T | ValidCards$ Creature.YouCtrl | ValidCardsDesc$ creature you control | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on each creature you control. DeckHas:Ability$Counters DeckHints:Type$Human Oracle:Protection from Werewolves\nHuman creatures you control have "{T}: Add one mana of any of this creature's colors."\n{4}{G}{W}, {T}: Put a +1/+1 counter on each creature you control. diff --git a/forge-gui/res/cardsfolder/m/mikaeus_the_lunarch.txt b/forge-gui/res/cardsfolder/m/mikaeus_the_lunarch.txt index 957ffbfc54f..d36f044825a 100644 --- a/forge-gui/res/cardsfolder/m/mikaeus_the_lunarch.txt +++ b/forge-gui/res/cardsfolder/m/mikaeus_the_lunarch.txt @@ -4,6 +4,7 @@ Types:Legendary Creature Human Cleric PT:0/0 K:etbCounter:P1P1:X SVar:X:Count$xPaid -A:AB$ PutCounter | Cost$ T | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME. -A:AB$ PutCounterAll | Cost$ T SubCounter<1/P1P1> | ValidCards$ Creature.Other+YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on each other creature you control. +A:AB$ PutCounter | Cost$ T | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on NICKNAME. +A:AB$ PutCounterAll | Cost$ T SubCounter<1/P1P1/NICKNAME> | ValidCards$ Creature.Other+YouCtrl | ValidCardsDesc$ other creature you control | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on each other creature you control. +DeckHas:Ability$Counters Oracle:Mikaeus, the Lunarch enters the battlefield with X +1/+1 counters on it.\n{T}: Put a +1/+1 counter on Mikaeus.\n{T}, Remove a +1/+1 counter from Mikaeus: Put a +1/+1 counter on each other creature you control. diff --git a/forge-gui/res/cardsfolder/upcoming/satsuki_the_living_lore.txt b/forge-gui/res/cardsfolder/upcoming/satsuki_the_living_lore.txt new file mode 100644 index 00000000000..e1e89c3e7be --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/satsuki_the_living_lore.txt @@ -0,0 +1,12 @@ +Name:Satsuki, the Living Lore +ManaCost:G W +Types:Legendary Creature Human Druid +PT:1/3 +A:AB$ PutCounterAll | Cost$ T | ValidCards$ Saga.YouCtrl | ValidCardsDesc$ Saga you control | CounterType$ LORE | CounterNum$ 1 | SorcerySpeed$ True | SpellDescription$ Put a lore counter on each Saga you control. Activate only as a sorcery. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigCharm | TriggerDescription$ When CARDNAME dies, ABILITY +SVar:TrigCharm:DB$ Charm | Choices$ BounceSaga,GraveSaga +SVar:BounceSaga:DB$ ChangeZone | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Saga.YouCtrl,Creature.Enchantment+YouCtrl | ChangeNum$ 1 | TgtPrompt$ Choose target Saga or enchantment creature you control | SpellDescription$ Return target Saga or enchantment creature you control to its owner's hand. +SVar:GraveSaga:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target Saga card in your graveyard | ValidTgts$ Saga | ChangeNum$ 1 | SpellDescription$ Return target Saga card from your graveyard to your hand. +DeckHints:Type$Saga +DeckHas:Ability$Graveyard +Oracle:{T}: Put a lore counter on each Saga you control. Activate only as a sorcery.\nWhen Satsuki, the Living Lore dies, choose up to one:\n• Return target Saga or enchantment creature you control to it owner's hand.\n• Return target Saga card from your graveyard to your hand.