From 07a1dbc099a5a4e24df44c33d079b9050d6c9f6f Mon Sep 17 00:00:00 2001 From: tool4ever Date: Sun, 24 Aug 2025 21:10:56 +0100 Subject: [PATCH] Fix scripts (#8524) --- .../forge/game/ability/effects/AirbendEffect.java | 1 - .../forge/game/ability/effects/EarthbendEffect.java | 1 + .../res/cardsfolder/e/emblem_of_the_warmind.txt | 2 +- forge-gui/res/cardsfolder/g/grafted_identity.txt | 2 +- forge-gui/res/cardsfolder/k/kitnap.txt | 2 +- forge-gui/res/cardsfolder/r/rhystic_lightning.txt | 6 ++---- forge-gui/res/cardsfolder/s/shifting_shadow.txt | 13 +++++-------- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/AirbendEffect.java b/forge-game/src/main/java/forge/game/ability/effects/AirbendEffect.java index fa59097f4a8..a32995cd92d 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/AirbendEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/AirbendEffect.java @@ -39,7 +39,6 @@ public class AirbendEffect extends SpellAbilityEffect { return sb.toString(); } - @Override public void resolve(SpellAbility sa) { final Card hostCard = sa.getHostCard(); diff --git a/forge-game/src/main/java/forge/game/ability/effects/EarthbendEffect.java b/forge-game/src/main/java/forge/game/ability/effects/EarthbendEffect.java index 23a7f2a1f3d..5e58004a14c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/EarthbendEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/EarthbendEffect.java @@ -40,6 +40,7 @@ public class EarthbendEffect extends SpellAbilityEffect { TargetRestrictions abTgt = new TargetRestrictions("Select target land you control", "Land.YouCtrl".split(","), "1", "1"); sa.setTargetRestrictions(abTgt); } + @Override public void resolve(SpellAbility sa) { final Card source = sa.getHostCard(); diff --git a/forge-gui/res/cardsfolder/e/emblem_of_the_warmind.txt b/forge-gui/res/cardsfolder/e/emblem_of_the_warmind.txt index 3e4f3f280f0..1c3fe433aef 100644 --- a/forge-gui/res/cardsfolder/e/emblem_of_the_warmind.txt +++ b/forge-gui/res/cardsfolder/e/emblem_of_the_warmind.txt @@ -2,6 +2,6 @@ Name:Emblem of the Warmind ManaCost:1 R Types:Enchantment Aura K:Enchant:Creature.YouCtrl:creature you control -SVar:AttachAILogic:Pump | TgtPrompt$ Select target you control +SVar:AttachAILogic:Pump S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddKeyword$ Haste | Description$ Creatures you control have haste. Oracle:Enchant creature you control\nCreatures you control have haste. diff --git a/forge-gui/res/cardsfolder/g/grafted_identity.txt b/forge-gui/res/cardsfolder/g/grafted_identity.txt index fa4d6a3e7f6..478f9412aa7 100644 --- a/forge-gui/res/cardsfolder/g/grafted_identity.txt +++ b/forge-gui/res/cardsfolder/g/grafted_identity.txt @@ -5,6 +5,6 @@ K:Enchant:Creature S:Mode$ RaiseCost | ValidCard$ Card.Self | Activator$ You | Type$ Spell | Cost$ Sac<1/Creature/creature> | EffectZone$ All | Description$ As an additional cost to cast this spell, sacrifice a creature. S:Mode$ Continuous | Affected$ Card.EnchantedBy | GainControl$ You | Description$ You control enchanted creature. S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddPower$ 1 | AddToughness$ 1 | Description$ Enchanted creature gets +1/+1. -SVar:AttachAILogic$ GainControl +SVar:AttachAILogic:GainControl DeckHas:Ability$Sacrifice Oracle:As an additional cost to cast this spell, sacrifice a creature.\nEnchant creature\nYou control enchanted creature.\nEnchanted creature gets +1/+1. diff --git a/forge-gui/res/cardsfolder/k/kitnap.txt b/forge-gui/res/cardsfolder/k/kitnap.txt index 20f74333a08..44667fed1ef 100644 --- a/forge-gui/res/cardsfolder/k/kitnap.txt +++ b/forge-gui/res/cardsfolder/k/kitnap.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Gift K:Enchant:Creature SVar:GiftAbility:DB$ Draw | NumCards$ 1 | Defined$ Promised | GiftDescription$ a card -SVar:AttachAILogic:GainControl | GiftAbility$ GiftAbility +SVar:AttachAILogic:GainControl S:Mode$ Continuous | Affected$ Card.EnchantedBy | GainControl$ You | Description$ You control enchanted creature. T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters, tap enchanted creature. If the gift wasn't promised, put three stun counters on it. SVar:TrigTap:DB$ Tap | Defined$ Enchanted | SubAbility$ DBStun diff --git a/forge-gui/res/cardsfolder/r/rhystic_lightning.txt b/forge-gui/res/cardsfolder/r/rhystic_lightning.txt index 20782c25804..bf70a7a4a92 100644 --- a/forge-gui/res/cardsfolder/r/rhystic_lightning.txt +++ b/forge-gui/res/cardsfolder/r/rhystic_lightning.txt @@ -1,10 +1,8 @@ Name:Rhystic Lightning ManaCost:2 R Types:Instant -A:SP$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 0 | UnlessPayer$ Targeted | UnlessCost$ 2 | ValidTgts$ Any | ConditionDefined$ Targeted | ConditionPresent$ Permanent | ConditionCompare$ EQ0 | SubAbility$ DBStore2 | SpellDescription$ CARDNAME deals 4 damage to any target unless that permanent's controller or that player pays {2}. If they do, CARDNAME deals 2 damage to the permanent or player. -SVar:DBStore2:DB$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 0 | UnlessPayer$ TargetedController | UnlessCost$ 2 | ConditionDefined$ Targeted | ConditionPresent$ Permanent | ConditionCompare$ GE1 | SubAbility$ DBDmg -SVar:DBDmg:DB$ DealDamage | Defined$ Targeted | NumDmg$ X | SubAbility$ DBReset -SVar:DBReset:DB$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 1 +A:SP$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 0 | UnlessPayer$ TargetedOrController | UnlessCost$ 2 | ValidTgts$ Any | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals 4 damage to any target unless that permanent's controller or that player pays {2}. If they do, CARDNAME deals 2 damage to the permanent or player. +SVar:DBDmg:DB$ DealDamage | Defined$ Targeted | NumDmg$ X SVar:RhysticPaid:Number$1 SVar:X:Count$Compare RhysticPaid EQ1.2.4 AI:RemoveDeck:All diff --git a/forge-gui/res/cardsfolder/s/shifting_shadow.txt b/forge-gui/res/cardsfolder/s/shifting_shadow.txt index 37899cc73d4..be409af6901 100644 --- a/forge-gui/res/cardsfolder/s/shifting_shadow.txt +++ b/forge-gui/res/cardsfolder/s/shifting_shadow.txt @@ -2,14 +2,11 @@ Name:Shifting Shadow ManaCost:2 R Types:Enchantment Aura K:Enchant:Creature -SVar:AttachAILogic:Pump | SubAbility$ RememberSelf | SpellDescription$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order." -SVar:RememberSelf:DB$ Pump | Defined$ Creature.EnchantedBy | ImprintCards$ Self -S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach,DBCleanup -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True -SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowRememberSelf | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order. -SVar:ShadowRememberSelf:DB$ Pump | ImprintCards$ OriginalHost | SubAbility$ ShadowDestroyEnchanted +SVar:AttachAILogic:Pump +S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | Description$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order." +SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowDestroyEnchanted | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order. SVar:ShadowDestroyEnchanted:DB$ Destroy | Defined$ Self | SubAbility$ ShadowRevealCards SVar:ShadowRevealCards:DB$ DigUntil | Valid$ Creature | ValidDescription$ creature | FoundDestination$ Battlefield | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | RememberFound$ True | SubAbility$ ShadowReattach -SVar:ShadowReattach:DB$ Attach | Defined$ RememberedLast | Object$ Imprinted | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True +SVar:ShadowReattach:DB$ Attach | Defined$ Remembered | Object$ OriginalHost | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True Oracle:Enchant creature\nEnchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach Shifting Shadow to it, then put all other cards revealed this way on the bottom of your library in a random order."