Refactor scripts! (#4874)

This commit is contained in:
tool4ever
2024-03-23 17:48:44 +01:00
committed by GitHub
parent 9928e0d876
commit 5e2a69f2cb
74 changed files with 158 additions and 222 deletions

View File

@@ -4,9 +4,8 @@ Types:Creature Elemental Knight
PT:4/6
K:Vigilance
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ When CARDNAME enters the battlefield, destroy up to one target nonland permanent. Its controller creates a 3/3 colorless Golem artifact creature token.
SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Permanent.nonLand | AlwaysRemember$ True | RememberLKI$ True | TgtPrompt$ Select target nonland permanent | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_3_3_a_golem | TokenOwner$ RememberedController | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_3_3_a_golem | TokenOwner$ TargetedController
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME dies, return target artifact or enchantment card from your graveyard to your hand.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Artifact.YouCtrl,Enchantment.YouCtrl
Oracle:Vigilance\nWhen Cavalier of Dawn enters the battlefield, destroy up to one target nonland permanent. Its controller creates a 3/3 colorless Golem artifact creature token.\nWhen Cavalier of Dawn dies, return target artifact or enchantment card from your graveyard to your hand.

View File

@@ -1,8 +1,7 @@
Name:Certain Death
ManaCost:5 B
Types:Sorcery
A:SP$ Destroy | Cost$ 5 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | AlwaysRemember$ True | RememberLKI$ True | SubAbility$ DBLoseLife | SpellDescription$ Destroy target creature. Its controller loses 2 life and you gain 2 life.
SVar:DBLoseLife:DB$ LoseLife | Defined$ RememberedController | LifeAmount$ 2 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ Destroy | Cost$ 5 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBLoseLife | SpellDescription$ Destroy target creature. Its controller loses 2 life and you gain 2 life.
SVar:DBLoseLife:DB$ LoseLife | Defined$ TargetedController | LifeAmount$ 2 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2
Oracle:Destroy target creature. Its controller loses 2 life and you gain 2 life.

View File

@@ -1,7 +1,6 @@
Name:Choking Sands
ManaCost:1 B B
Types:Sorcery
A:SP$ Destroy | Cost$ 1 B B | ValidTgts$ Land.nonSwamp | TgtPrompt$ Select target non-Swamp land | RememberLKI$ True | SubAbility$ DBDamage | SpellDescription$ Destroy target non-Swamp land. If that land was nonbasic, CARDNAME deals 2 damage to the land's controller.
SVar:DBDamage:DB$ DealDamage | Defined$ RememberedController | NumDmg$ 2 | ConditionDefined$ RememberedLKI | ConditionPresent$ Land.Basic | ConditionCompare$ EQ0 | ConditionDescription$ If that land is nonbasic, | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ Destroy | Cost$ 1 B B | ValidTgts$ Land.nonSwamp | TgtPrompt$ Select target non-Swamp land | SubAbility$ DBDamage | SpellDescription$ Destroy target non-Swamp land. If that land was nonbasic, CARDNAME deals 2 damage to the land's controller.
SVar:DBDamage:DB$ DealDamage | Defined$ TargetedController | NumDmg$ 2 | ConditionDefined$ Targeted | ConditionPresent$ Land.Basic | ConditionCompare$ EQ0 | ConditionDescription$ If that land is nonbasic,
Oracle:Destroy target non-Swamp land. If that land was nonbasic, Choking Sands deals 2 damage to the land's controller.

View File

@@ -5,9 +5,8 @@ PT:8/8
K:Trample
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ When you cast this spell and whenever CARDNAME attacks, destroy up to one target nonland permanent. Its controller creates a tapped Powerstone token.
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigDestroy | Secondary$ True | TriggerDescription$ When you cast this spell and whenever CARDNAME attacks, destroy up to one target nonland permanent. Its controller creates a tapped Powerstone token.
SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Permanent.nonland | TgtPrompt$ Select up to one target nonland permanent | RememberLKI$ True | AlwaysRemember$ True | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenTapped$ True | TokenScript$ c_a_powerstone | TokenOwner$ RememberedController | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Permanent.nonland | TgtPrompt$ Select up to one target nonland permanent | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenTapped$ True | TokenScript$ c_a_powerstone | TokenOwner$ TargetedController
K:Unearth:8
SVar:HasAttackEffect:TRUE
DeckHas:Ability$Graveyard|Token

View File

@@ -1,8 +1,7 @@
Name:Cleansing Wildfire
ManaCost:1 R
Types:Sorcery
A:SP$ Destroy | Cost$ 1 R | ValidTgts$ Land | TgtPrompt$ Select target land | AlwaysRemember$ True | RememberLKI$ True | SubAbility$ DBChange | SpellDescription$ Destroy target land. Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle.
SVar:DBChange:DB$ ChangeZone | Optional$ True | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | Tapped$ True | ChangeNum$ 1 | DefinedPlayer$ RememberedController | ShuffleNonMandatory$ True | SubAbility$ DBDraw | StackDescription$ Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle their library.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | SubAbility$ DBCleanup | SpellDescription$ Draw a card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ Destroy | Cost$ 1 R | ValidTgts$ Land | TgtPrompt$ Select target land | SubAbility$ DBChange | SpellDescription$ Destroy target land. Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle.
SVar:DBChange:DB$ ChangeZone | Optional$ True | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | Tapped$ True | ChangeNum$ 1 | DefinedPlayer$ TargetedController | ShuffleNonMandatory$ True | SubAbility$ DBDraw | StackDescription$ Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle their library.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | SpellDescription$ Draw a card.
Oracle:Destroy target land. Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle.\nDraw a card.

View File

@@ -1,8 +1,7 @@
Name:Condemn
ManaCost:W
Types:Instant
A:SP$ ChangeZone | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | RememberLKI$ True | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBGainLife | SpellDescription$ Put target attacking creature on the bottom of its owner's library.
SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ Its controller gains life equal to its toughness.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardToughness
A:SP$ ChangeZone | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBGainLife | SpellDescription$ Put target attacking creature on the bottom of its owner's library.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | SpellDescription$ Its controller gains life equal to its toughness.
SVar:X:Targeted$CardToughness
Oracle:Put target attacking creature on the bottom of its owner's library. Its controller gains life equal to its toughness.

View File

@@ -1,12 +1,11 @@
Name:Contraband Livestock
ManaCost:1 W
Types:Instant
A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select a target creature | Origin$ Battlefield | Destination$ Exile | RememberLKI$ True | SubAbility$ DBRollDice | AILogic$ Pongify | StackDescription$ SpellDescription | SpellDescription$ Exile target creature,
SVar:DBRollDice:DB$ RollDice | Sides$ 20 | ResultSubAbilities$ 1-9:GreenOx,10-19:GreenBoar,20:WhiteGoat | SubAbility$ DBCleanup | SpellDescription$ then roll a d20.
SVar:GreenOx:DB$ Token | TokenAmount$ 1 | TokenScript$ g_4_4_ox | TokenOwner$ RememberedController | SpellDescription$ 1-9 VERT Its controller creates a 4/4 green Ox creature token.
SVar:GreenBoar:DB$ Token | TokenAmount$ 1 | TokenScript$ g_2_2_boar | TokenOwner$ RememberedController | SpellDescription$ 10-19 VERT Its controller creates a 2/2 green Boar creature token.
SVar:WhiteGoat:DB$ Token | TokenAmount$ 1 | TokenScript$ w_0_1_goat | TokenOwner$ RememberedController | SpellDescription$ 20 VERT Its controller creates a 0/1 white Goat creature token.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select a target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBRollDice | AILogic$ Pongify | StackDescription$ SpellDescription | SpellDescription$ Exile target creature,
SVar:DBRollDice:DB$ RollDice | Sides$ 20 | ResultSubAbilities$ 1-9:GreenOx,10-19:GreenBoar,20:WhiteGoat | SpellDescription$ then roll a d20.
SVar:GreenOx:DB$ Token | TokenAmount$ 1 | TokenScript$ g_4_4_ox | TokenOwner$ TargetedController | SpellDescription$ 1-9 VERT Its controller creates a 4/4 green Ox creature token.
SVar:GreenBoar:DB$ Token | TokenAmount$ 1 | TokenScript$ g_2_2_boar | TokenOwner$ TargetedController | SpellDescription$ 10-19 VERT Its controller creates a 2/2 green Boar creature token.
SVar:WhiteGoat:DB$ Token | TokenAmount$ 1 | TokenScript$ w_0_1_goat | TokenOwner$ TargetedController | SpellDescription$ 20 VERT Its controller creates a 0/1 white Goat creature token.
DeckHas:Ability$Token
AI:RemoveDeck:All
Oracle:Exile target creature, then roll a d20.\n1-9 | Its controller creates a 4/4 green Ox creature token.\n10-19 | Its controller creates a 2/2 green Boar creature token.\n20 | Its controller creates a 0/1 white Goat creature token.

View File

@@ -2,7 +2,6 @@ Name:Crib Swap
ManaCost:2 W
Types:Tribal Instant Shapeshifter
K:Changeling
A:SP$ ChangeZone | Cost$ 2 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | RememberLKI$ True | IsCurse$ True | SubAbility$ DBToken | AILogic$ Pongify | SpellDescription$ Exile target creature. Its controller creates a 1/1 colorless Shapeshifter creature token with changeling.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_1_1_shapeshifter_changeling | TokenOwner$ RememberedController | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ ChangeZone | Cost$ 2 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | IsCurse$ True | SubAbility$ DBToken | AILogic$ Pongify | SpellDescription$ Exile target creature. Its controller creates a 1/1 colorless Shapeshifter creature token with changeling.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_1_1_shapeshifter_changeling | TokenOwner$ TargetedController
Oracle:Changeling (This card is every creature type.)\nExile target creature. Its controller creates a 1/1 colorless Shapeshifter creature token with changeling.

View File

@@ -1,9 +1,8 @@
Name:Crumble
ManaCost:G
Types:Instant
A:SP$ Destroy | ValidTgts$ Artifact | NoRegen$ True | SubAbility$ DBGainLife | RememberLKI$ True | SpellDescription$ Destroy target artifact. It can't be regenerated.
SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ That artifact's controller gains life equal to its mana value.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardManaCost
A:SP$ Destroy | ValidTgts$ Artifact | NoRegen$ True | SubAbility$ DBGainLife | SpellDescription$ Destroy target artifact. It can't be regenerated.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | SpellDescription$ That artifact's controller gains life equal to its mana value.
SVar:X:Targeted$CardManaCost
AI:RemoveDeck:Random
Oracle:Destroy target artifact. It can't be regenerated. That artifact's controller gains life equal to its mana value.