Card Contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Contributions
by Hexadecimal » 07 Mar 2015, 08:28
I see. Still, the way Riders currently handled leaves out the bug I've reported several times: when Riders bounce themselves, soldier token aren't created. Can someone take a look into that ?Sloth wrote:That script doesn't work because the trigger will work in any zone. Even the hand or library.
- Hexadecimal
- Posts: 69
- Joined: 08 Oct 2013, 20:36
- Has thanked: 6 times
- Been thanked: 2 times
Re: Card Contributions
by squee1968 » 09 Sep 2015, 15:19
Since Friarsol implemented Psychic Theft it reminded me of another similar card not yet in Forge. I playtested this briefly, and it seemed to work, but as almost always, there's probably something wrong with it.
- Code: Select all
Name:Elkin Lair
ManaCost:3 R
Types:World Enchantment
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | Execute$ TrigChangeZone | TriggerDescription$ At the beginning of each player's upkeep, that player exiles a card at random from his or her hand. The player may play that card this turn. At the beginning of the next end step, if the player hasn't played the card, he or she puts it into his or her graveyard.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | ChangeType$ Card | DefinedPlayer$ TriggeredPlayer | ChangeNum$ 1 | Hidden$ True | Mandatory$ True | AtRandom$ True | RememberChanged$ True | SubAbility$ ElkinEffect
SVar:ElkinEffect:DB$ Effect | StaticAbilities$ ElkinPlay | Duration$ Permanent | RememberObjects$ Remembered | Triggers$ TrigReturn,TrigCast,TrigLandPlayed | SVars$ ElkinSVar,RemoveEffect,DBReturn | SubAbility$ DBResetSVar
SVar:ElkinPlay:Mode$ Continuous | Affected$ Card.IsRemembered | AddHiddenKeyword$ May be played | EffectZone$ Command | AffectedZone$ Exile | CheckSVar$ ElkinSVar | Description$ The player may play that card this turn.
# Even though the Effect is "Permanent", it's not really permanent
SVar:DBResetSVar:DB$ StoreSvar | SVar$ ElkinSVar | Type$ Number | Expression$ 1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:ElkinSVar:Number$1
# Return the card as a normal trigger
SVar:TrigReturn:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | TriggerZones$ Command | Execute$ DBReturn | TriggerDescription$ At the beginning of the next end step, if the player hasn't played the card, he or she puts it into his or her graveyard.
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Graveyard | SubAbility$ RemoveEffect
SVar:TrigLandPlayed:Mode$ LandPlayed | ValidCard$ Land.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
SVar:RemoveEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
# Remove Effect when the card is played
SVar:TrigCast:Mode$ SpellCast | ValidCard$ Card.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/elkin_lair.jpg
Oracle: At the beginning of each player's upkeep, that player exiles a card at random from his or her hand. The player may play that card this turn. At the beginning of the next end step, if the player hasn't played the card, he or she puts it into his or her graveyard.
Last edited by squee1968 on 09 Sep 2015, 16:26, edited 1 time in total.
Re: Card Contributions
by friarsol » 09 Sep 2015, 15:47
It also needs a LandPlayed static trigger like Grinning Totem does to clear the effect.squee1968 wrote:Since Friarsol implemented Psychic Theft it reminded me of another similar card not yet in Forge. I playtested this briefly, and it seemed to work, but as almost always, there's probably something wrong with it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by Hanmac » 18 Dec 2015, 06:24
I don't know if it's the right Thread for it, but for one of the cards I want to script from Oath I need "withDevoid" similar to "withDeathtouch" or does that already work?
Re: Card Contributions
by friarsol » 18 Dec 2015, 15:04
Should already work it's setup as "with<Keyword>"Hanmac wrote:I don't know if it's the right Thread for it, but for one of the cards I want to script from Oath I need "withDevoid" similar to "withDeathtouch" or does that already work?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by fsecco » 22 Dec 2015, 13:37
I've been wanting to script Chaos Orb as it works in Old School 93/94 format, having to target a permanent instead of destroying everything it touches. It obviously can't be flipped, so I'm assuming the players get 100% accuracy with it.
What I could come up was 1, T, Sac Orb: Destroy target permanent.
But that's not perfect for 2 reasons:
1) Chaos Orb doesn't target.
2) You don't sacrifice it, but instead it is destroyed upon resolution (so you can combo with Guardian Beast).
Any way to implement this?
This is how it looks now:
What I could come up was 1, T, Sac Orb: Destroy target permanent.
But that's not perfect for 2 reasons:
1) Chaos Orb doesn't target.
2) You don't sacrifice it, but instead it is destroyed upon resolution (so you can combo with Guardian Beast).
Any way to implement this?
This is how it looks now:
- Code: Select all
Name:Chaos Orb
ManaCost:2
Types:Artifact
A:AB$ Destroy | Cost$ 1 T Sac<1/CARDNAME> | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | SpellDescription$ Destroy target permanent.
SVar:Picture:http://www.wizards.com/global/images/magic/general/chaos_orb.jpg
Oracle:{1}, {T}, Sacrifice Chaos Orb: Destroy target permanent.
Re: Card Contributions
by TalpanianEmperor » 03 Jan 2016, 12:32
I came up with this temporary version of General Tazri for testing purposes.
The ally search works fine, but I had to bootleg her second ability from Bloom Tender and Jazal, and it hasn't worked yet.
The ally search works fine, but I had to bootleg her second ability from Bloom Tender and Jazal, and it hasn't worked yet.
- Code: Select all
Name:General Tazri
ManaCost:4 W
Types:Legendary Creature Human Ally
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Card.Creature+Ally | ChangeNum$ 1
A:AB$ PumpAll | Cost$ W U B R G | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckW | References$ CheckW | ConditionSVarCompare$ GE1 | SubAbility$ PumpU | Svar:PumpU:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckU | References$ CheckU | ConditionSVarCompare$ GE1 | SubAbility$ PumpB | Svar:PumpB:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckB | References$ CheckB | ConditionSVarCompare$ GE1 | SubAbility$ PumpR | Svar:PumpR:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSvar$ CheckR | References$ CheckR | ConditionSVarCompare$ GE1 | SubAbility$ PumpG | Svar:PumpG:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckG | References$ CheckG | ConditionSVarCompare$ GE1
SVar:CheckW:Count$Valid Ally+White
SVar:CheckU:Count$Valid Ally+Blue
SVar:CheckB:Count$Valid Ally+Black
SVar:CheckR:Count$Valid Ally+Red
SVar:CheckG:Count$Valid Ally+Green
SVar:Picture:http://www.wizards.com/global/images/magic/general/General_Tazri.jpg
Oracle:When General Tazri enters the battlefield, you may search your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.\n{W}{U}{B}{R}{G}: Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
"Each year that passes rings you inwardly with memory and might. Wield your heart, and the world will tremble."
-- Doran, The Siege Tower.
-- Doran, The Siege Tower.
- TalpanianEmperor
- Posts: 37
- Joined: 06 Oct 2013, 07:03
- Has thanked: 6 times
- Been thanked: 1 time
Re: Card Contributions
by Myrd » 03 Jan 2016, 16:23
You can do:fsecco wrote:2) You don't sacrifice it, but instead it is destroyed upon resolution (so you can combo with Guardian Beast).
- Code: Select all
... SubAbility$ DestroySelf
SVar:DestroySelf:DB$ Destroy | Cost$ 0 | Defined$ Self
Re: Card Contributions
by Marek14 » 04 Jan 2016, 08:53
My version looks like this (uses Soul of Ravnica as template):TalpanianEmperor wrote:I came up with this temporary version of General Tazri for testing purposes.
The ally search works fine, but I had to bootleg her second ability from Bloom Tender and Jazal, and it hasn't worked yet.
- Code: Select all
Name:General Tazri
ManaCost:4 W
Types:Legendary Creature Human Ally
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Card.Creature+Ally | ChangeNum$ 1
A:AB$ PumpAll | Cost$ W U B R G | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckW | References$ CheckW | ConditionSVarCompare$ GE1 | SubAbility$ PumpU | Svar:PumpU:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckU | References$ CheckU | ConditionSVarCompare$ GE1 | SubAbility$ PumpB | Svar:PumpB:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckB | References$ CheckB | ConditionSVarCompare$ GE1 | SubAbility$ PumpR | Svar:PumpR:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSvar$ CheckR | References$ CheckR | ConditionSVarCompare$ GE1 | SubAbility$ PumpG | Svar:PumpG:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ConditionCheckSVar$ CheckG | References$ CheckG | ConditionSVarCompare$ GE1
SVar:CheckW:Count$Valid Ally+White
SVar:CheckU:Count$Valid Ally+Blue
SVar:CheckB:Count$Valid Ally+Black
SVar:CheckR:Count$Valid Ally+Red
SVar:CheckG:Count$Valid Ally+Green
SVar:Picture:http://www.wizards.com/global/images/magic/general/General_Tazri.jpg
Oracle:When General Tazri enters the battlefield, you may search your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.\n{W}{U}{B}{R}{G}: Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
- Code: Select all
Name:General Tazri
ManaCost:4 W
Types:Legendary Creature Human Ally
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigChange | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may serach your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Creature.Ally | ChangeNum$ 1 | ShuffleNonMandatory$ True
A:AB$ PumpAll | Cost$ W U B R G | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+White+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllU | SpellDescription$ Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
SVar:PumpAllU:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Blue+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllB
SVar:PumpAllB:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Black+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllR
SVar:PumpAllR:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Red+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllG
SVar:PumpAllG:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Green+YouCtrl | ConditionCompare$ GE1
SVar:Picture:http://www.wizards.com/global/images/magic/general/general_tazri.jpg
Oracle:When General Tazri enters the battlefield, you may serach your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.\n{W}{U}{B}{R}{G}: Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
Re: Card Contributions
by TalpanianEmperor » 04 Jan 2016, 09:33
If it works, I'll take itMarek14 wrote:My version looks like this (uses Soul of Ravnica as template):
- Code: Select all
Name:General Tazri
ManaCost:4 W
Types:Legendary Creature Human Ally
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigChange | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may serach your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Creature.Ally | ChangeNum$ 1 | ShuffleNonMandatory$ True
A:AB$ PumpAll | Cost$ W U B R G | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+White+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllU | SpellDescription$ Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
SVar:PumpAllU:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Blue+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllB
SVar:PumpAllB:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Black+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllR
SVar:PumpAllR:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Red+YouCtrl | ConditionCompare$ GE1 | SubAbility$ PumpAllG
SVar:PumpAllG:DB$ PumpAll | ValidCards$ Creature.Ally+YouCtrl | NumAtt$ 1 | NumDef$ 1 | ConditionPresent$ Creature.Ally+Green+YouCtrl | ConditionCompare$ GE1
SVar:Picture:http://www.wizards.com/global/images/magic/general/general_tazri.jpg
Oracle:When General Tazri enters the battlefield, you may serach your library for an Ally creature card, reveal it, put it into your hand, then shuffle your library.\n{W}{U}{B}{R}{G}: Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures.
Thanks Marek!
"Each year that passes rings you inwardly with memory and might. Wield your heart, and the world will tremble."
-- Doran, The Siege Tower.
-- Doran, The Siege Tower.
- TalpanianEmperor
- Posts: 37
- Joined: 06 Oct 2013, 07:03
- Has thanked: 6 times
- Been thanked: 1 time
Re: Card Contributions
by tjtillman » 24 Jan 2016, 16:53
I've tried this out and it seems to work as I would expect when I cast it. However, when I try to put the card in play for the CPU (with plenty of valid targets) it won't go onto the stack. Any suggestions?
- Code: Select all
Name:Nissa's Judgment
ManaCost:4 G
Types:Sorcery
A:SP$ PutCounter | Cost$ 4 G | AILogic$ PowerDmg | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DealToCreature | SpellDescription$ Support 2. (Put a +1/+1 counter on each of up to two target creatures.)
SVar:DealToCreature:DB$ EachDamage | Cost$ 0 | AILogic$ PowerDmg | ValidCards$ Creature.YouCtrl+counters_GE1_P1P1 | NumDmg$ X | References$ X | TgtPrompt$ Choose target creature opponent controls | ValidTgts$ Creature.OppCtrl | SpellDescription$ Each creature you control with a +1/+1 counter deals damage equal to its power to target creature opponent controls.
SVar:X:Count$CardPower
SVar:Picture:http://www.wizards.com/global/images/magic/general/nissas_judgment.jpg
Oracle:Support 2. (Put a +1/+1 counter on each of up to two target creatures.) Choose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature.
Re: Card Contributions
by friarsol » 24 Jan 2016, 19:58
Looks right to me, I quickly took a peek and the AI for EachDamage (forge\forge-ai\src\main\java\forge\ai\ability\DamageEachAi.java) is a bit... lacking. We can mark this script with:tjtillman wrote:I've tried this out and it seems to work as I would expect when I cast it. However, when I try to put the card in play for the CPU (with plenty of valid targets) it won't go onto the stack. Any suggestions?
[/code]
SVar:RemAIDeck:True
so the AI won't add it to its deck for limited, and users will get a warning about it for Constructed play. Basically the AI here would need to be expanded to consider targeting creatures too, and looking briefly, it doesn't even seem to be doing what it already does properly. It's not even tabulating up the damage, and not considering the multiple damage sources.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by Agetian » 24 Jan 2016, 20:33
I added the card in r30720, marked as AI-unplayable for now until someone can come up with a better AI implementation that can handle it.friarsol wrote:Looks right to me, I quickly took a peek and the AI for EachDamage (forge\forge-ai\src\main\java\forge\ai\ability\DamageEachAi.java) is a bit... lacking. We can mark this script with:tjtillman wrote:I've tried this out and it seems to work as I would expect when I cast it. However, when I try to put the card in play for the CPU (with plenty of valid targets) it won't go onto the stack. Any suggestions?
[/code]
SVar:RemAIDeck:True
- Agetian
- Agetian
- Programmer
- Posts: 3474
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 563 times
Re: Card Contributions
by tjtillman » 26 Jan 2016, 00:54
So one idea I considered in the script was using RepeatEach and then DealDamage individually but forcing the same target each time. Not sure how the AI would handle that, perhaps just aiming to kill whichever creature the first of the Each could kill on its own. If that's so it wouldn't be optimal, but perhaps at least usable by the CPU then?friarsol wrote:Looks right to me, I quickly took a peek and the AI for EachDamage (forge\forge-ai\src\main\java\forge\ai\ability\DamageEachAi.java) is a bit... lacking. We can mark this script with:
SVar:RemAIDeck:True
so the AI won't add it to its deck for limited, and users will get a warning about it for Constructed play. Basically the AI here would need to be expanded to consider targeting creatures too, and looking briefly, it doesn't even seem to be doing what it already does properly. It's not even tabulating up the damage, and not considering the multiple damage sources.
Re: Card Contributions
by fsecco » 01 Feb 2016, 13:06
The image link doesn't work... I guess you could use http://mythicspoiler.com/c15/cards/mizzixsmastery.jpg
Also, it doesn't exile itself... I don't know how to do that without messing the effect.
Also, it doesn't exile itself... I don't know how to do that without messing the effect.
- Code: Select all
Name:Mizzix’s Mastery
ManaCost:3 R
Types:Sorcery
A:SP$ ChangeZone | Cost$ 3 R | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target card in a graveyard | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | RememberChanged$ True | SubAbility$ DBPump | SpellDescription$ Exile target card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile Mizzix's Mastery.
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ May be played without paying its mana cost | PumpZone$ Exile | SubAbility$ DBCleanup
A:SP$ ChangeZoneAll | Cost$ 5 R R R | ChangeType$ Instant.YouCtrl,Sorcery.YouCtrl | Origin$ Graveyard | Destination$ Exile | RememberChanged$ True | PrecostDesc$ Overload | CostDesc$ {5}{R}{R}{R} | NonBasicSpell$ True | SubAbility$ DBPump | SpellDescription$ Exile each card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile Mizzix's Mastery.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/mizzixs_mastery.jpg
Oracle:Exile target card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile Mizzix's Mastery.\nOverload Overload {5}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
Who is online
Users browsing this forum: No registered users and 22 guests