It is currently 18 Sep 2025, 19:42
   
Text Size

Battle for Zendikar spoiler season

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Battle for Zendikar spoiler season

Postby Agetian » 20 Sep 2015, 10:02

Marek14 wrote:1. basic effect will return the card to hand, and it will be conditional on the land NOT being Plains.
2. second effect, conditional on the land being a Plains, will be GenericChoice effect that will the player choice between returning card to battlefield or to hand.
Yes, I agree that a GenericChoice implementation would be good here, but I can't produce a working version... do you know how to properly implement a GenericChoice for a conditional effect like that? :/

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Battle for Zendikar spoiler season

Postby Marek14 » 20 Sep 2015, 10:22

Agetian wrote:
Marek14 wrote:1. basic effect will return the card to hand, and it will be conditional on the land NOT being Plains.
2. second effect, conditional on the land being a Plains, will be GenericChoice effect that will the player choice between returning card to battlefield or to hand.
Yes, I agree that a GenericChoice implementation would be good here, but I can't produce a working version... do you know how to properly implement a GenericChoice for a conditional effect like that? :/

- Agetian
Ether Well seems closest to what you need...

BTW, when looking, I noticed a slight problem in Catastrophe. If you choose to destroy lands, any animated lands destroyed should still be unable to regenerate (but not normal lands).
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Battle for Zendikar spoiler season

Postby Marek14 » 20 Sep 2015, 11:57

Token update:

Battle for Zendikar will add the following tokens:

New tokens
c_10_10_eldrazi: for Desolation Twin
c_1_1_eldrazi_scion, c_1_1_eldrazi_scion2, c_1_1_eldrazi_scion3 (exact assignment to cards unclear for now): for Adverse Conditions, Blight Herder, Blisterpod, Brood Butcher, Brood Monitor, Call the Scions, Carrier Thrall, Catacomb Sifter, Drowner of Hope, Eldrazi Skyspawner, Eyeless Watcher, From Beyond, Grave Birthing, Incubator Drone, Spawning Bed and Void Attendant
g_1_1_plant: for Grovetender Druids
rg_5_5_elemental: for Omnath, Locus of Rage
u_8_8_octopus: for Kiora, Master of the Depths
w_1_1_kor_ally: for Retreat to Emeria and Unified Front
w_2_2_knight_ally: for Gideon, Ally of Zendikar

Tokens with new pictures:
r_3_1_elemental_bfz: for Akoum Stonewaker (actually different from other existing red 3/1 Elementals, as it has trample)

The dragon token is only made by reprinted Dragonmaster Outcast.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 12:19

KrazyTheFox wrote:Partial implementation of Quarantine Field:
Code: Select all
Name:Quarantine Field
ManaCost:X X W W
Types:Enchantment
K:etbCounter:ISOLATION:X
SVar:X:Count$xPaid
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponent controls until CARDNAME leaves the battlefield.
SVar:TrigExile:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | ValidTgts$ Permanent.nonLand+OppCtrl | TargetMin$ 0 | TargetMax$ Y | References$ Y | TgtPrompt$ Select target nonland permanent an opponent controls | ConditionPresent$ Card.Self | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | Triggers$ ComeBack | RememberObjects$ Targeted | ImprintCards$ Self | SVars$ TrigReturn,ExileSelf | ConditionPresent$ Card.Self | Duration$ Permanent
SVar:ComeBack:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsImprinted | Execute$ TrigReturn | TriggerZones$ Command | TriggerController$ TriggeredCardController | Static$ True | TriggerDescription$ That permanent is exiled until CARDNAME leaves the battlefield.
SVar:TrigReturn:AB$ ChangeZoneAll | Cost$ 0 | Origin$ Exile | Destination$ Battlefield | ChangeType$ Card.IsRemembered | SubAbility$ ExileSelf
SVar:ExileSelf:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self
SVar:Y:Count$CardCounters.ISOLATION
SVar:PlayMain1:TRUE
SVar:OblivionRing:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/quarantine_field.jpg
Oracle:Quarantine Field enters the battlefield with X isolation counters on it.\nWhen Quarantine Field enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponent controls until Quarantine Field leaves the battlefield.

The above card has an error, but otherwise appears to work correctly:
Code: Select all
SVar 'Y' not found in ability, fallback to Card (Quarantine Field). Ability is (When Quarantine Field enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponent controls until Quarantine Field leaves the battlefield. (Targeting ERROR) )
Ah the Quarantine Field warning is just because the "References" isn't being recognized. Not sure how references is setup with Triggers, but it's not really a big deal, a fair amount of cards actually throw that warning (while it would be good to fix them, it mostly only matters for cards that mirror abilities like Necrotic Ooze). The "Targeting error" part is probably just because it spit out the message before targets were determined, and that's what Trigger.toStrings() look like at that step.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 12:27

Also what's up with this "HasSubType" property? You should be able to just do Land.Plains like in Bant Panorama.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby Agetian » 20 Sep 2015, 12:51

My latest attempt with GenericChoice:

Code: Select all
Name:Emeria Shepherd
ManaCost:5 W W
Types:Creature Angel
PT:4/4
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl+HasNoSubtype Plains | Execute$ TrigChangeHand | OptionalDecider$ You | TriggerDescription$ Landfall - Whenever a land enters the battlefield, you may return target nonland permanent card from your graveyard to your hand.

T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl+HasSubtype Plains | Execute$ DBChoose | OptionalDecider$ You | TriggerDescription$ Landfall - Whenever a land enters the battlefield, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead.

SVar:DBChoose:DB$ GenericChoice | Cost$ 0 | ValidTgts$ Permanent.YouCtrl+nonLand+inZoneGraveyard | TgtPrompt$ Select target nonland permanent. | Choices$ TrigChangeHand,TrigChangeBattlefield | Defined$ You

SVar:TrigChangeHand:DB$ChangeZone | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Permanent.YouCtrl+nonLand | Cost$ 0 | Defined$ Targered | SpellDescription$ HAND
SVar:TrigChangeBattlefield:DB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Permanent.YouCtrl+nonLand | Cost$ 0 | Defined$ Targeted | SpellDescription$ BATTLEFIELD

SVar:Picture:http://www.wizards.com/global/images/magic/general/emeria_shepherd.jpg
This doesn't work because it doesn't allow to actually choose the freaking card to move to battlefield/hand when a Plains enters the battlefield. I do get the prompt as to where to move something to, but I don't get prompted as to *WHAT* I want to move there. I tried changing DB$ to AB$ feeling that that's exactly why it won't let me target, but then I got the "no API in ...." exception, so obviously abilities can't be run in that way. Tried some shamanism with RunSVar and stuff like that, but that wasn't of much help either and either does nothing or crashes... :(

- Agetian
Last edited by Agetian on 20 Sep 2015, 13:45, edited 1 time in total.
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 13:40

Agetian, Empty Pump with a Target into a Generic Choice? I think it's not asking you for a target because Generic Choice builds the SubAbility on runtime, so it's not available to choose a target when it's added to the stack.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby Agetian » 20 Sep 2015, 13:45

Ahh, yeah I was thinking about those Pump abilities, but thought it'd not be viable (the word "Pump" confused me, I thought it's only for the actual pump spells/abilities).
Here's what I came up with though, it doesn't use Pump but seems to work:

Code: Select all
Name:Emeria Shepherd
ManaCost:5 W W
Types:Creature Angel
PT:4/4
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl+HasSubtype Plains | Execute$ DBChoose | OptionalDecider$ You | TriggerDescription$ Landfall - Whenever a land enters the battlefield, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead.
T:Mode$ ChangesZone | Secondary$ True | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl+HasNoSubtype Plains | Execute$ TrigChangeHand | OptionalDecider$ You | TriggerDescription$ Landfall - Whenever a land enters the battlefield, you may return target nonland permanent card from your graveyard to your hand.

SVar:DBChoose:DB$ ChooseCard | Defined$ You | Cost$ 0 | Choices$ Permanent.YouCtrl+nonLand | ChoiceZone$ Graveyard | SubAbility$ DBChooseDest
SVar:DBChooseDest:DB$ GenericChoice | Cost$ 0 | Choices$ TrigChangeHand2,TrigChangeBattlefield | Defined$ You

SVar:TrigChangeHand:DB$ChangeZone | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Permanent.YouCtrl+nonLand | Cost$ 0 | Defined$ ChosenCard | SpellDescription$ Return to Hand
SVar:TrigChangeHand2:DB$ChangeZone | Origin$ Graveyard | Destination$ Hand | Defined$ ChosenCard | SpellDescription$ Return to Hand | SubAbility$ DBCleanup
SVar:TrigChangeBattlefield:DB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | Defined$ ChosenCard | SpellDescription$ Return to Battlefield | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | CleanRemembered$ True

SVar:Picture:http://www.wizards.com/global/images/magic/general/emeria_shepherd.jpg
Seems to work, but I'm not sure... is this OK, or should we change it into an empty Pump implementation?

EDIT: Added the "Cleanup" function to forget a remembered card. Added "Secondary$ True" to one of the triggers to avoid duplicate description.

Known issues with this implementation:
- if a Plains enters the battlefield, the user is asked if he wants to return something from the graveyard even if the graveyard is empty (but even if the user says "yes, I want to" and chooses "hand/battlefield", nothing happens, which is good).
- once a creature is returned to the battlefield/hand after a Plains ETBs, Emeria Shepherd receives a "chosen colors: <chosen_card_name>" text in its description that does not disappear even after running DB Cleanup. This issue is not unique, the same happens with the Bound part of Bound // Determined which utilizes a similar mechanism of asking for a card. This issue appears to be purely graphical, it does not seem to cause any functional issues.

- Agetian
Last edited by Agetian on 20 Sep 2015, 14:04, edited 1 time in total.
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 14:03

ChooseCard works, and is probably better than an empty pump, which I'm not really a fan of. Also, we have DestinationAlternative as seen in Caravan Vigil. So you don't actually need the GenericChoice in there.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 14:06

Aligned Hedron Network - Doesn't target, should Remember in the ChangeZone ability, and then RememberObjects$ Remembered

SVar:DBEffect:DB$ Effect | Triggers$ ComeBack | RememberObjects$ Targeted | ImprintCards$ Self | SVars$ TrigReturn,ExileSelf | ConditionPresent$ Card.Self | Duration$ Permanent


Bane of Bala Ged - Since origin is a known Origin, need to add "Hidden$ True". Might also need DefinedPlayer instead of Chooser, and potentially Permanent.YouCtrl

SVar:TrigExile:AB$ ChangeZone | Cost$ T | Origin$ Battlefield | Destination$ Exile | Defined$ DefendingPlayer | Mandatory$ True | ChangeType$ Permanent | ChangeNum$ 2 | IsCurse$ True | Chooser$ DefendingPlayer


(Will post more as I check them out)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby Hanmac » 20 Sep 2015, 14:33

apropos token:
Phyrexian Swarmlord makes token that images doesnt have infect (but the tokens have)
maybe the image can be fixed too?

as for the r_3_1_elemental_bfz token image, maybe trample and haste does need to add into the name too?

PS: when can we hope for a snapshot where the BFZ cards are added? there are many of them i want to try in many decks
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Battle for Zendikar spoiler season

Postby Marek14 » 20 Sep 2015, 14:43

Hanmac wrote:apropos token:
Phyrexian Swarmlord makes token that images doesnt have infect (but the tokens have)
maybe the image can be fixed too?

as for the r_3_1_elemental_bfz token image, maybe trample and haste does need to add into the name too?

PS: when can we hope for a snapshot where the BFZ cards are added? there are many of them i want to try in many decks
Phyrexian Swarmlord is missing the token image code. The token is currently called "g_1_1_insect_infect.jpg" (so the bfz elemental should probably be called r_3_1_elemental_trample?) Here's the corrected version:

Code: Select all
Name:Phyrexian Swarmlord
ManaCost:4 G G
Types:Creature Insect Horror
PT:4/4
K:Infect
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, put a 1/1 green Insect creature token with infect onto the battlefield for each poison counter your opponents have.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ X | References$ X | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Infect | TokenImage$ g 1 1 insect infect
SVar:X:Count$TotalOppPoisonCounters
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_swarmlord.jpg
Oracle:Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)\nAt the beginning of your upkeep, put a 1/1 green Insect creature token with infect onto the battlefield for each poison counter your opponents have.
Actually, this code is also missing from the other two cards that should produce this token: Carrion Call and Trigon of Infestation:

Code: Select all
Name:Carrion Call
ManaCost:3 G
Types:Instant
A:SP$ Token | Cost$ 3 G | TokenImage$ G 1 1 Insect Infect | TokenAmount$ 2 | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Infect | TokenImage$ g 1 1 insect infect | SpellDescription$ Put two 1/1 green Insect creature tokens with infect onto the battlefield.
SVar:Picture:http://www.wizards.com/global/images/magic/general/carrion_call.jpg
Oracle:Put two 1/1 green Insect creature tokens with infect onto the battlefield. (They deal damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
Code: Select all
Name:Trigon of Infestation
ManaCost:4
Types:Artifact
K:etbCounter:CHARGE:3
A:AB$ PutCounter | Cost$ G G T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Token | Cost$ 2 T SubCounter<1/CHARGE> | TokenImage$ G 1 1 Insect Infect | TokenAmount$ 1 | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Infect | TokenImage$ g 1 1 insect infect | SpellDescription$ Put a 1/1 green Insect creature token with infect onto the battlefield.
SVar:Picture:http://www.wizards.com/global/images/magic/general/trigon_of_infestation.jpg
Oracle:Trigon of Infestation enters the battlefield with three charge counters on it.\n{G}{G}, {T}: Put a charge counter on Trigon of Infestation.\n{2}, {T}, Remove a charge counter from Trigon of Infestation: Put a 1/1 green Insect creature token with infect onto the battlefield.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Battle for Zendikar spoiler season

Postby friarsol » 20 Sep 2015, 14:58

Guul Draz Overseer - Valid parameter is wrong. Needs to be "Other" not "other"
SVar:TrigPumpAll:AB$PumpAll | Cost$ 0 | ValidCards$ Creature.other+YouCtrl | NumAtt$ X | References$ X

Noyan Dar - I think the SubAbility needs to be "ParentTarget" not just Targeted. Or you can remember the card you put counters on use Remembered
SVar:DBAnimate:DB$Animate | Defined$ Targeted | Power$ 0 | Toughness$ 0 | Types$ Creature,Elemental | Keywords$ Haste | Permanent$ True
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Battle for Zendikar spoiler season

Postby Agetian » 20 Sep 2015, 15:01

friarsol wrote:ChooseCard works, and is probably better than an empty pump, which I'm not really a fan of. Also, we have DestinationAlternative as seen in Caravan Vigil. So you don't actually need the GenericChoice in there.
Interestingly, Alternative Destination only works if either Hidden is set to True (for the SA) or if the Origin is a hidden zone (e.g. Hand), so it doesn't work for moving cards out of the Graveyard :/

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Battle for Zendikar spoiler season

Postby Agetian » 20 Sep 2015, 15:20

Ok, I added support for alternative destinations to Known zones in ChangeZone and committed the implementation of Emeria Shepherd based on it. My tests indicated that it works fine (tried non-Plains + say no, Plains + say no, non-Plains + say yes, Plains + say yes and return to Hand/Battlefield afterwards, non-Plains/Plains with empty Graveyard, looks like it functions correctly).

Known issues:
- If a Plains enters the battlefield when the Graveyard is empty, then the player is still asked if he wants to return a card to the battlefield/hand. :/ Not sure how to fix yet... this is annoying but at least it doesn't cause a crash or rule-breaking behavior. - corrected in r30057.

- Agetian
Last edited by Agetian on 20 Sep 2015, 16:19, edited 1 time in total.
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 33 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 33 users online :: 0 registered, 0 hidden and 33 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 33 guests

Login Form