From 57cd39023835ddddbca5093e9f81d14e73f1a06d Mon Sep 17 00:00:00 2001 From: Northmoc <103371817+Northmoc@users.noreply.github.com> Date: Tue, 4 Jun 2024 09:46:33 -0400 Subject: [PATCH] UNF: magar_of_the_magic_strings.txt and support (#4105) * UNF: magar_of_the_magic_strings.txt and support * tweaks * clean up * revised --- .../java/forge/game/ability/effects/PlayEffect.java | 4 +--- forge-gui/res/cardsfolder/c/capricious_hellraiser.txt | 2 +- forge-gui/res/cardsfolder/d/denied.txt | 2 +- forge-gui/res/cardsfolder/e/enter_the_dungeon.txt | 4 ++-- forge-gui/res/cardsfolder/s/skirk_alarmist.txt | 4 ++-- .../upcoming/magar_of_the_magic_strings.txt | 11 +++++++++++ 6 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/magar_of_the_magic_strings.txt diff --git a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java index 0d81d8a9a3b..0f9dac54a96 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java @@ -163,9 +163,7 @@ public class PlayEffect extends SpellAbilityEffect { String name = source.getNamedCard(); if (name.trim().isEmpty()) { name = controller.getNamedCard(); - if(name.trim().isEmpty()) { - return; - } + if (name.trim().isEmpty()) return; } Card card = Card.fromPaperCard(StaticData.instance().getCommonCards().getUniqueByName(name), controller); // so it gets added to stack diff --git a/forge-gui/res/cardsfolder/c/capricious_hellraiser.txt b/forge-gui/res/cardsfolder/c/capricious_hellraiser.txt index 54136a57218..08990c1f514 100644 --- a/forge-gui/res/cardsfolder/c/capricious_hellraiser.txt +++ b/forge-gui/res/cardsfolder/c/capricious_hellraiser.txt @@ -7,7 +7,7 @@ S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ 3 | EffectZone T:Mode$ ChangesZone | ValidCard$ Card.Self | Destination$ Battlefield | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile three cards at random from your graveyard. Choose a noncreature, nonland card from among them and copy it. You may cast the copy without paying its mana cost. SVar:TrigExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | AtRandom$ True | Hidden$ True | ChangeType$ Card.YouOwn | ChangeNum$ 3 | RememberChanged$ True | SubAbility$ DBChoose SVar:DBChoose:DB$ ChooseCard | ChoiceZone$ Exile | Amount$ 1 | Choices$ Card.IsRemembered+nonLand+nonCreature | ChoiceTitle$ Choose a noncreature, nonland card | SubAbility$ DBPlay -SVar:DBPlay:DB$ Play | Defined$ ChosenCard | ValidSA$ Spell | Controller$ You | CopyCard$ True | WithoutManaCost$ True | ValidSA$ Spell | Optional$ True | SubAbility$ DBCleanup +SVar:DBPlay:DB$ Play | Defined$ ChosenCard | ValidSA$ Spell | Controller$ You | CopyCard$ True | WithoutManaCost$ True | Optional$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True DeckHas:Ability$Graveyard DeckHints:Ability$Mill diff --git a/forge-gui/res/cardsfolder/d/denied.txt b/forge-gui/res/cardsfolder/d/denied.txt index 53579920048..12d2a2d87bc 100644 --- a/forge-gui/res/cardsfolder/d/denied.txt +++ b/forge-gui/res/cardsfolder/d/denied.txt @@ -2,7 +2,7 @@ Name:Denied! ManaCost:U Types:Instant A:SP$ NameCard | Defined$ You | AILogic$ MostProminentInHumanDeck | SubAbility$ DBTarget | SpellDescription$ Choose a card name, -SVar:DBTarget:DB$ Pump | TargetType$ Spell | ValidTgts$ Card | TgtZone$ Stack | SubAbility$ DBRevealHand | SpellDescription$ None +SVar:DBTarget:DB$ Pump | TargetType$ Spell | ValidTgts$ Card | TgtZone$ Stack | SubAbility$ DBRevealHand | StackDescription$ None SVar:DBRevealHand:DB$ RevealHand | Defined$ TargetedController | RememberRevealed$ True | SubAbility$ DBCounter | SpellDescription$ then target spell's controller reveals their hand. SVar:DBCounter:DB$ Counter | Defined$ Targeted | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ GE1 | SubAbility$ DBCleanup | SpellDescription$ If a card with the chosen name is revealed this way, counter that spell. SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True diff --git a/forge-gui/res/cardsfolder/e/enter_the_dungeon.txt b/forge-gui/res/cardsfolder/e/enter_the_dungeon.txt index 0e8209ba0d9..b6b1b0e8e60 100644 --- a/forge-gui/res/cardsfolder/e/enter_the_dungeon.txt +++ b/forge-gui/res/cardsfolder/e/enter_the_dungeon.txt @@ -2,6 +2,6 @@ Name:Enter the Dungeon ManaCost:B B Types:Sorcery A:SP$ Subgame | RememberPlayers$ Win | StartingLife$ 5 | SubAbility$ DBRepeatEachPlayer | SpellDescription$ Players play a Magic subgame, starting at 5 life and using their libraries as their decks. | StackDescription$ SpellDescription -SVar:DBRepeatEachPlayer:DB$ RepeatEach | RepeatPlayers$ Remembered | ClearRememberedBeforeLoop$ True | RepeatSubAbility$ DBSearch | SpellDescription$ The winner searches their library for two cards, puts those cards into their hand, then shuffles their library. | StackDescription$ SpellDescription -SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 2 | Mandatory$ True | DefinedPlayer$ Player.IsRemembered | SpellDescription$ None +SVar:DBRepeatEachPlayer:DB$ RepeatEach | RepeatPlayers$ Remembered | ClearRememberedBeforeLoop$ True | RepeatSubAbility$ DBSearch | SpellDescription$ The winner searches their library for two cards, puts those cards into their hand, then shuffles. | StackDescription$ SpellDescription +SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 2 | Mandatory$ True | DefinedPlayer$ Player.IsRemembered | StackDescription$ None Oracle:Players play a Magic subgame under the table, starting at 5 life and using their libraries as their decks. The winner searches their library for two cards, puts those cards into their hand, then shuffles. diff --git a/forge-gui/res/cardsfolder/s/skirk_alarmist.txt b/forge-gui/res/cardsfolder/s/skirk_alarmist.txt index 69572d4c449..441d866f8cc 100644 --- a/forge-gui/res/cardsfolder/s/skirk_alarmist.txt +++ b/forge-gui/res/cardsfolder/s/skirk_alarmist.txt @@ -3,7 +3,7 @@ ManaCost:1 R Types:Creature Human Wizard PT:1/2 K:Haste -A:AB$ SetState | Cost$ T | ValidTgts$ Creature.YouCtrl+faceDown | Mode$ TurnFaceUp | SubAbility$ DBPump | SpellDescription$ Turn target face-down creature you control face up. At the beginning of the next end step, sacrifice it. -SVar:DBPump:DB$ Pump | Defined$ Targeted | AtEOT$ Sacrifice +A:AB$ SetState | Cost$ T | ValidTgts$ Creature.YouCtrl+faceDown | TgtPrompt$ Select target face-down creature you control | Mode$ TurnFaceUp | SubAbility$ DBPump | StackDescription$ Turn {c:Targeted} face up. | SpellDescription$ Turn target face-down creature you control face up. +SVar:DBPump:DB$ Pump | Defined$ Targeted | AtEOT$ Sacrifice | StackDescription$ SpellDescription | SpellDescription$ At the beginning of the next end step, sacrifice it. AI:RemoveDeck:All Oracle:Haste\n{T}: Turn target face-down creature you control face up. At the beginning of the next end step, sacrifice it. diff --git a/forge-gui/res/cardsfolder/upcoming/magar_of_the_magic_strings.txt b/forge-gui/res/cardsfolder/upcoming/magar_of_the_magic_strings.txt new file mode 100644 index 00000000000..bea857cd922 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/magar_of_the_magic_strings.txt @@ -0,0 +1,11 @@ +Name:Magar of the Magic Strings +ManaCost:1 B R +Types:Legendary Creature Minotaur Performer +PT:3/3 +A:AB$ ChangeZone | Cost$ 1 B R | ValidTgts$ Instant.YouOwn,Sorcery.YouOwn | TgtPrompt$ Select target instant or sorcery card in your graveyard | Origin$ Graveyard | Destination$ Battlefield | RememberLKI$ True | FaceDown$ True | FaceDownPower$ 3 | FaceDownToughness$ 3 | FaceDownSetType$ Creature | AnimateSubAbility$ DBAnimate | StackDescription$ REP Note_{p:You} notes & target instant or sorcery card in your graveyard_{c:Targeted} & put_puts | SpellDescription$ Note the name of target instant or sorcery card in your graveyard and put it onto the battlefield face down. It's a 3/3 creature with "Whenever this creature deals combat damage to a player, you may create a copy of the card with the noted name. You may cast the copy without paying its mana cost" and "If this creature would leave the battlefield, exile it instead of putting it anywhere else." +SVar:DBAnimate:DB$ Animate | RememberObjects$ RememberedLKI | Defined$ Remembered | Triggers$ DealsCDTrig | Replacements$ ReplaceDies | Duration$ Permanent +SVar:DealsCDTrig:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigPlay | TriggerZones$ Battlefield | TriggerDescription$ Whenever this creature deals combat damage to a player, you may create a copy of the card with the noted name. You may cast the copy without paying its mana cost. +SVar:TrigPlay:DB$ Play | Defined$ RememberedLKI | ZoneRegardless$ True | CopyCard$ True | ValidSA$ Spell | WithoutManaCost$ True | Optional$ True +SVar:ReplaceDies:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | ExcludeDestination$ Exile | ValidCard$ Card.Self | ReplaceWith$ Exile | Description$ If this creature would leave the battlefield, exile it instead of putting it anywhere else. +SVar:Exile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | Defined$ ReplacedCard +Oracle:{1}{B}{R}: Note the name of target instant or sorcery card in your graveyard and put it onto the battlefield face down. It's a 3/3 creature with "Whenever this creature deals combat damage to a player, you may create a copy of the card with the noted name. You may cast the copy without paying its mana cost" and "If this creature would leave the battlefield, exile it instead of putting it anywhere else."