Page 1 of 1

NEW UPDATE_FaceTheHydra_DefeatAGodUsing a custom instant

PostPosted: 12 Jun 2019, 02:53
by Xanxer
Thank you again for the files you provided schnautzr.

I have made some changes to the Face the Hydra Avatar and have moved away from a custom Vanguard to a custom Tribal Instant that when played an emblem gets created with a Face the Hydra or Defeat a God rules set depending on which is in the Ais' deck.
Code: Select all
Name:Challenge 1 - FaceTheHydra_Rev2
ManaCost:no cost
Types:Tribal Instant Challenge
K:Split second
K:CARDNAME can't be countered.

# A WAY TO KICKSTART EMBLEM ABILITY/GAME RULE CREATION AND DISTRIBUTION
T:Mode$ NewGame | ValidCard$ Self | TriggerZones$ Command,Library,Hand | Execute$ FTHC | IsPresent$ Card.Self | PresentZone$ Library | PresentZone2$ Hand | TriggerDescription$ If you start the game with CARDNAME in your library, exile it and go through the prompts. Hope you enjoy the game.
SVar:FTHC:DB$ Play | Defined$ Self | ValidSA$ Spell | WithoutManaCost$ True | AllowRepeats$ True | Controller$ You | SubAbility$ TrigExile
SVar:TrigExile:DB$ ChangeZone | Origin$ Library,Hand | Destination$ Exile | Defined$ Self | SubAbility$ Emblem1

# THIS WILL CREATE AN EMBLEM WITH PREDEFINED RULE SCRIPTS1
SVar:Emblem1:DB$ Effect | StackDescription$ SpellDescription | Name$ Challenge 1 FaceTheHydra Effect | StaticAbilities$ noCastHero,heroProtection,hydraNoDraw,attackTheHeads,noLoseGame, | Triggers$ hydrasTurn,headGrowth,dmgDealtoHeads,hydraDmgPL,winCon | SVars$ TrigDig,TrigPlay,FightTheHydraHead,HasEffect,PlayMain1,TrigDealDamage,V,TrigDamageHead,TrigDamageElite,X,Z,TrigChallengeWon,F,G,H | EffectOwner$ You | Duration$ Permanent | SpellDescription$ When the game starts, choose any number of players to get an emblem.

# CHOOSE A NUMBER 0-5 FOR THE AMOUNT OF HEADS THE HYDRA HEADS THAT WILL APPEAR - FOR A "CHOOSE YOUR OWN DIFFICULTY" #
T:Mode$ NewGame | ValidPlayer$ You | Execute$ ChooseNumberA | TriggerDescription$ • When the game starts, Choose a number 0-5 for the amount of random Heads the Hydra will start with.
SVar:ChooseNumberA:DB$ ChooseNumber | Min$ 0 | Max$ 5 | Defined$ Player.Opponent | SubAbility$ TrigHydraFetch1A
SVar:TrigHydraFetch1A:DB$ ChangeZone | Origin$ Library | Destination$ Hand | AtRandom$ True | ChangeType$ Card.Head | ChangeNum$ xHnum | ShuffleNonMandatory$ True | References$ xHnum | SubAbility$ TrigHydraFetch1B
SVar:TrigHydraFetch1B:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Card.Head | References$ xHnum | ChangeNum$ xHnum | SubAbility$ Cleanupnum
SVar:Cleanupnum:DB$ Cleanup | ClearRemembered$ True
SVar:xHnum:Count$ChosenNumber

# SETUP TURNS - CHOOSE A NUMBER OF TURNS THE HYDRA SKIPS #
T:Mode$ NewGame | ValidPlayer$ You | Execute$ ChooseNumberB | TriggerDescription$ • When the game starts, Choose a number 1-3, you get that many turns to prepare to "Face The Hydra".
SVar:ChooseNumberB:DB$ ChooseNumber | Min$ 1 | Max$ 3 | Defined$ Player.Opponent | SubAbility$ HydraSkipTurns
SVar:HydraSkipTurns:DB$ SkipTurn | NumTurns$ xTnum | Defined$ Player.You | References$ xTnum | SubAbility$ CleanupTnum
SVar:CleanupTnum:DB$ Cleanup | ClearRemembered$ True
SVar:xTnum:Count$ChosenNumber

# OPPONENT MAY SEARCH FOR UP TO 2 HERO CARDS FROM SIDEBOARD TO BE PUT ONTO THE BATTLEFIELD #
T:Mode$ NewGame | ValidPlayer$ Opponent | Execute$ TrigTheHero1A | Optional$ True | OptionalDecider$ Opponent | TriggerDescription$ • When the game starts, Each opponent may choose to search their sideboard for up to two Hero cards.
SVar:TrigTheHero1A:DB$ ChangeZone | Optional$ True | Origin$ Sideboard | Destination$ Battlefield | DefinedPlayer$ Player.Opponent | ChangeType$ Card.Hero | ChangeNum$ 2 | DefinedPlayer$ Opponent| ShuffleNonMandatory$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

# Minimum life total script - checks if opponents life is 40. If life is less than 40, sets life total to 40.
T:Mode$ NewGame | CheckSVar$ SurvCurLife | SVarCompare$ LE39 | References$ SurvCurLife | Execute$ SurvivorSetLife | TriggerDescription$ When the game starts your life total becomes 40.
SVar:SurvCurLife:PlayerCountOpponents$LifeTotal
SVar:SurvivorSetLife:DB$ SetLife | Defined$ Opponent | LifeAmount$ 40

# THE HYDRA CANNOT GO FIRST
T:Mode$ NewGame | Execute$ TrigBranch | TriggerDescription$ The Hydra can not go first.
SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ X | BranchConditionSVarCompare$ EQ0 | TrueSubAbility$ HordeEndTurn | FalseSubAbility$ DBCleanup
SVar:HordeEndTurn:DB$ EndTurn | PlayerTurn$ True
SVar:X:Count$StartingPlayer.1.0

# OPPONENTS CAN'T CAST HERO CARDS FROM ANYWHERE #
SVar:noCastHero:Mode$ CantBeCast | EffectZone$ Command | ValidCard$ Card.Hero | Caster$ Opponent | Origin$ Library,Graveyard,Exile,Command,Hand | HiddenDescription$ • Your opponents can't cast Hero spells from anywhere.

# PROTECTION FOR HERO CARDS #
SVar:heroProtection:Mode$ Continuous | EffectZone$ Command | Affected$ Hero.OppCtrl | AddKeyword$ Shroud & Indestructible & Protection from everything | HiddenDescription$ • Hero cards have Shroud, Indestructible, and Protection from everything.

# HYDRA CAN'T DRAW CARDS #
SVar:hydraNoDraw:Mode$ Continuous | Affected$ You | EffectZone$ Command | AddKeyword$ You can't draw cards. | HiddenDescription$ • The Hydra can't draw cards.

# HYDRA'S TURN #
SVar:hydrasTurn:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | EffectZone$ Command | TriggerZones$ Command | Execute$ TrigDig | TriggerDescription$ • At the beginning of the Hydra's upkeep, it reveals the top card of its library. If it's a Head or sorcery card, it cast it without paying its mana cost.
SVar:TrigDig:DB$ Dig | DigNum$ 1 | Reveal$ True | NoMove$ True | SubAbility$ TrigPlay
SVar:TrigPlay:DB$ Play | Defined$ TopOfLibrary | WithoutManaCost$ True | ConditionDefined$ TopOfLibrary | ConditionPresent$ Head,Sorcery | ConditionCompare$ EQ1

# ORIGINAL RULES YOU ATTACK THE HEADS DIRECTLY - USED FIGHT INESTEAD #
SVar:attackTheHeads:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.OppCtrl | AddAbility$ FightTheHydraHead | AddSVar$ HasEffect | Description$ • Creatures opponent control have "This creature fights target creature. (Each deals damage equal to its power to the other.)"
SVar:FightTheHydraHead:AB$ Fight | Cost$ T | Defined$ Self | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ CARDNAME fights target creature. (Each deals damage equal to its power to the other.)
SVar:HasEffect:TRUE
SVar:PlayMain1:TRUE

# ENABLE WITH/FOR ORIGINAL RULE #
#S:Mode$ CantAttack | EffectZone$ Command | Affected$ Creature.OppCtrl | Target$ You | • Description$ Creatures can't attack the Hydra.

# CAN NOT LOSE IF 0 OR LESS #
SVar:noLoseGame:Mode$ Continuous | Affected$ You | EffectZone$ Command | AddKeyword$ You don't lose the game for having 0 or less life. | HiddenDescription$ • The Hydra doesn't lose the game for having 0 or less life.

# GROWING HEADS #
SVar:headGrowth:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard,Exile,Hand | ValidCard$ Card.Head | Execute$ TrigGrowingHeads | TriggerController$ TriggeredCardController | TriggerDescription$ • Growing Heads: Whenever a Head leaves the battlefield, the Hydra reveals the top two cards of its library, puts all Heads onto the battlefield and put the rest into its graveyard.
SVar:TrigGrowingHeads:DB$ Dig | DigNum$ 2 | Reveal$ True | ChangeNum$ 2 | ChangeValid$ Card.Head | DestinationZone$ Battlefield | DestinationZone2$ Graveyard

# WHENEVER HYDRA LOSES LIFE IT DEALS X DAMAGE TO TRGT HEAD #
SVar:dmgDealtoHeads:Mode$ LifeLost | Execute$ TrigDealDamage | ValidPlayer$ You | TriggerZones$ Command | TriggerDescription$ • Whenever the Hydra loses life, it deals that damage to target Head it controls.
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature.Head+YouCtrl | TgtPrompt$ Select target Head | NumDmg$ V | References$ V
SVar:V:TriggerCount$LifeAmount

# HYDRA DAMAGES PLAYERS AT ITS UPKEEP #
SVar:hydraDmgPL:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigDamageHead | TriggerZones$ Command | TriggerDescription$ • At the beginning of the Hydra's upkeep, the Hydra deals 1 damage to each opponent for each untapped Head you control, If a untapped Head you control is Elite, the Hydra deals 2 damage to each opponent instead.
SVar:TrigDamageHead:DB$ DealDamage | Defined$ Opponent | NumDmg$ X | References$ X | SubAbility$ TrigDamageElite
SVar:TrigDamageElite:DB$ DealDamage | Defined$ Opponent | NumDmg$ Z | References$ Z
SVar:X:Count$Valid Head.ActivePlayerCtrl
SVar:Z:Count$Valid Elite.ActivePlayerCtrl

# WIN CONDITION #
SVar:winCon:Mode$ Phase | Phase$ End of Turn |  EffectZone$ Command | ValidPlayer$ Opponent | TriggerZones$ Command | CheckSVar$ H | SVarCompare$ EQ0 | References$ F,G,H | Execute$ TrigChallengeWon | TriggerDescription$ • At the end of your turn, if the Hydra controls no Heads and has no cards in its library. You have slain the Hydra.
SVar:TrigChallengeWon:DB$ WinsGame | Defined$ Opponent
SVar:F:Count$ValidLibrary Card.YouOwn+inZoneLibrary
SVar:G:Count$ValidBattlefield Head.YouOwn+inZoneBattlefield
SVar:H:SVar$F/Plus.G

Oracle: • Theros Challenge 1 - Face The Hydra! -Include this card for game creation •\nWhen the game starts you choose a number 0-5 and the Hydra will put that many Heads onto the battlefield at random.\nThen you will choose a number 1-3 for the amount of turns you get to prepare for the challenge.
Code: Select all
Name:Challenge 3 Defeat a God Rev2
ManaCost:no cost
Types:Tribal Instant Challenge
K:Split second
K:CARDNAME can't be countered.

# A WAY TO KICKSTART EMBLEM ABILITY/GAME RULE CREATION AND DISTRIBUTION
T:Mode$ NewGame | ValidCard$ Self | TriggerZones$ Command,Library | Execute$ DAGC1 | IsPresent$ Card.Self | PresentZone$ Library | TriggerDescription$ If you start the game with CARDNAME in your library, exile it and go through the prompts. Hope you enjoy the game.
T:Mode$ NewGame | ValidCard$ Self | TriggerZones$ Command,Hand | Execute$ DBDraw1 | IsPresent$ Card.Self | PresentZone$ Hand | TriggerDescription$ If you start the game with CARDNAME in your opening hand, exile it and go through the prompts. Hope you enjoy the game.
SVar:DBDraw1:DB$ Draw | Defined$ Player.You | NumCards$ 1 | SubAbility$ DAGC1 | SpellDescription$ If CARDNAME was exiled from your hand, Draw a card
SVar:DAGC1:DB$ Play | Defined$ Self | ValidSA$ Spell | WithoutManaCost$ True | AllowRepeats$ True | Controller$ You | SubAbility$ TrigExile
SVar:TrigExile:DB$ ChangeZone | Origin$ Library,Hand | Destination$ Exile | Defined$ Self | SubAbility$ Emblem1

# DEFEAT A GOD EMBLEM
SVar:Emblem1:DB$ Effect | StackDescription$ SpellDescription | Name$ Challenge 3 Defeat a God Rev2 Effect | StaticAbilities$ noCastHero,heroProtection,xenagosNoDraw,xenagosProtection,noLoseGame,lifeNoChange,xenCreatureNoAttck,revelFight | Triggers$ xenagosTurn | SVars$ TrigDig,TrigPlay,DBTurnCleanup,revelFight,FightTheReveler,HasEffect | EffectOwner$ You | Duration$ Permanent | SpellDescription$ When the game starts, choose any number of players to get an emblem.

# CONJURE/SUMMON XENAGOS AND THRONG #
T:Mode$ NewGame | ValidPlayer$ You | Execute$ DBThron | TriggerDescription$ • When Defeat a God starts Xenagos Ascended and two Rollicking Throng are summoned.
SVar:DBThron:DB$ ChangeZone | ValidPlayer$ You | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.namedRollicking Throng | ChangeNum$ 2 | StackDescription$ SpellDescription | SubAbility$ DBXen | SpellDescription$ Search your library for two cards named Rollicking Throng, put them onto the battlefield, then shuffle.
SVar:DBXen:DB$ ChangeZone | ValidPlayer$ You | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.namedXenagoes Ascended | ChangeNum$ 1 | StackDescription$ SpellDescription | SpellDescription$ Search your library for a card named Xenagoes Ascended, put it onto the battlefield, then shuffle.

# MINIMUM LIFE TOTAL SCRIPT - CHECKS IF OPPONENTS LIFE IS AT LEAST 40 #
T:Mode$ NewGame | CheckSVar$ SurvCurLife | SVarCompare$ LE39 | References$ SurvCurLife | Execute$ SurvivorSetLife | TriggerDescription$ When the game starts your life total becomes 40.
SVar:SurvCurLife:PlayerCountOpponents$LifeTotal
SVar:SurvivorSetLife:DB$ SetLife | Defined$ Opponent | LifeAmount$ 40

# SETUP TURNS - CHOOSE A NUMBER OF TURNS XENAGOS SKIPS #
T:Mode$ NewGame | Execute$ ChooseNumberB | TriggerDescription$ • When the game starts, Choose a number 1-3, you get that many turns to prepare to "Face The Hydra".
SVar:ChooseNumberB:DB$ ChooseNumber | Min$ 1 | Max$ 3 | Defined$ Opponent | SubAbility$ HydraSkipTurns
SVar:HydraSkipTurns:DB$ SkipTurn | NumTurns$ xTnum | Defined$ You | References$ xTnum | SubAbility$ CleanupTnum
SVar:CleanupTnum:DB$ Cleanup | ClearRemembered$ True
SVar:xTnum:Count$ChosenNumber

# OPPONENT MAY SEARCH FOR UP TO 2 HERO CARDS FROM SIDEBOARD TO BE PUT ONTO THE BATTLEFIELD #
T:Mode$ NewGame | ValidPlayer$ Opponent | Execute$ TrigTheHero1A | Optional$ True | OptionalDecider$ Opponent | TriggerDescription$ • When the game starts, Each opponent may choose to search their sideboard for up to three Hero cards.
SVar:TrigTheHero1A:DB$ ChangeZone | Optional$ True | Origin$ Sideboard | Destination$ Battlefield | DefinedPlayer$ Opponent | ChangeType$ Card.Hero | ChangeNum$ 3 | DefinedPlayer$ Opponent| ShuffleNonMandatory$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

# XENAGOES CANNOT GO FIRST
T:Mode$ NewGame | Execute$ TrigBranch | TriggerDescription$ Xenagoes Ascended can not go first.
SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ X | BranchConditionSVarCompare$ EQ0 | TrueSubAbility$ HordeEndTurn | FalseSubAbility$ DBCleanup
SVar:HordeEndTurn:DB$ EndTurn | PlayerTurn$ True
SVar:X:Count$StartingPlayer.1.0

# PROTECTION FOR HERO CARDS #
SVar:heroProtection:Mode$ Continuous | EffectZone$ Command | Affected$ Hero.OppCtrl | AddKeyword$ Shroud & Indestructible & Protection from everything | HiddenDescription$ • Hero cards have Shroud, Indestructible, and Protection from everything.

# OPPONENTS CAN'T CAST HERO CARDS FROM ANYWHERE #
SVar:noCastHero:Mode$ CantBeCast | EffectZone$ Command | ValidCard$ Card.Hero | Caster$ Opponent | Origin$ Library,Graveyard,Exile,Command,Hand | HiddenDescription$ • Your opponents can't cast Hero spells from anywhere.

# PROTECTION FOR XENAGOS #
SVar:xenagosProtection:Mode$ Continuous | EffectZone$ Command | Affected$ Card.namedXenagos Ascended+YouCtrl | AddKeyword$ Hexproof & Indestructible | Description$ • Xenagos Ascended has Hexproof, Indestructible, and Protection from everything.

# CAN NOT LOSE IF 0 OR LESS #
SVar:noLoseGame:Mode$ Continuous | Affected$ You | EffectZone$ Command | AddKeyword$ You don't lose the game for having 0 or less life. | HiddenDescription$ • The Hydra doesn't lose the game for having 0 or less life.

# XENAGOS CAN'T LOSE LIFE #
SVar:lifeNoChange:Mode$ Continuous | Affected$ You | EffectZone$ Command | AddKeyword$ Your life total can't change. | HiddenDescription$ • Xenagos has no life total.

# CREATURES XENAGOS CONTROL CANNOT ATTACK #
SVar:xenCreatureNoAttck:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.YouCtrl | Target$ Opponent | AddKeyword$ CARDNAME can't attack. | Description$ • Creatures Xenagos control can't attack unless a card specifies.

# XENAGOS TURN #
SVar:xenagosTurn:Mode$ Phase | Phase$ Main1 | EffectZone$ Command | ValidPlayer$ You | TriggerZones$ Command | Execute$ TrigDig | TriggerDescription$ • At the beginning of Xenagos's first main phase, it reveals the top two cards of its library and casts those cards.
SVar:TrigDig:DB$ Dig | DigNum$ 2 | Reveal$ True | RememberRevealed$ True | NoMove$ True | SubAbility$ TrigPlay
SVar:TrigPlay:DB$ Play | Defined$ Remembered | Amount$ 2 | WithoutManaCost$ True | ConditionDefined$ TopOfLibrary | ConditionPresent$ Reveler,Sorcery,Enchantment | ConditionCompare$ EQ1 | SubAbility$ DBTurnCleanup
SVar:DBTurnCleanup:DB$ Cleanup | ClearRemembered$ True

# IN ORIGINAL RULES YOU ATTACK REVELERS DIRECTLY - USED FIGHT SCRIPT #
SVar:revelFight:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.OppCtrl | AddAbility$ FightTheReveler | AddSVar$ HasEffect | Description$ • Creatures opponent control have "This creature fights target creature. (Each deals damage equal to its power to the other.)"
SVar:FightTheReveler:AB$ Fight | Cost$ T | Defined$ Self | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ CARDNAME fights target creature. (Each deals damage equal to its power to the other.)
SVar:HasEffect:TRUE

Oracle: • Theros Challenge 3 - Defeat a God! •\nWhen the game starts, conjure Xenagos Ascended and two Rollicking Throng onto the battlefield.\nThen you will choose a number 1-3 for the amount of turns you will get to prepare for the challenge and the choice to search your sideboard for up to 3 Hero cards.


Re: Face The Hydra_Using a custom Vanguard Avatar

PostPosted: 12 Jun 2019, 12:28
by schnautzr
Hi! I worked a lot on Battle the Horde awhile back. Here's what I've got.

Also, join the Discord :) https://discord.gg/kw8TqK