How to code cards with "storm" ? (Require Confirmation)

For all your questions regarding Image Card Coding.
Please read the Image Posting Guideline & Index before posting in this forum.
Forum rules
DO NOT POST BUG REPORT IN THIS FORUM !!

Please read carefully the forum rules related to the card coding section : viewtopic.php?f=21&t=1545

All post will be edited to follow forum rules.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

How to code cards with "storm" ? (Require Confirmation)

Post by Zethfox »

I am new to the forums, I would like to thank all that made wagic possible, that aside
I have coded a 100% working storm engine based on kaioshin token code and the codes the people in that thread have brainstormed.
I have a huge request from a svn write member to add which i will cover later

the code works in multiple parts, first add

Code: Select all

[INIT]
mode=mtg
[PLAYERS]
life:20
auto=shuffle
auto=draw:24
auto=@each my draw:draw:0
auto=token(-1111999) <---this is the added line
auto=@each untap:token(-1111999) <---this is the added line
auto=@movedTo(*|stack):token(-1111999) <---this is the added line

to the /rules/MTG. adding it in the rules makes it globel and doesnt seem to harm or break anything..for testing purposes I changed draw amount to 24 and darw to 0...allowing me to use a deck i will post further down as a tester.
now add the following card to your primitives/MTG

Code: Select all

[card]
name=StormCounter
auto=@next endofturn:moveto(exile) all(this)
id=-1111999
type=nothing
[/card]
the following card is an exsample card to be added to your Primitives/MTG also...

Code: Select all

[card]
name=Empty the Warrens
auto=token(Goblin,creature Goblin, 1/1,Red)*2 
&&thisforeach(StormCounter|mybattlefield)token(Goblin,creature Goblin, 1/1,Red)*2
text= Put two 1/1 red Goblin creature tokens into play. 
Storm
mana={3}{R}
type=Sorcery
[/card]
as you will notice everytime you play a SPELL and it goes to the stack, a card is added to your battlefield and to your opponents battlefeild. the card called stormcounter will only be added from actual spells being played and will not be added for triggered abilities or lands or tapped abilities.
the warrens card checks for the amount of stormcounters on your battlefield and trigger a copy of itself for every time a stormcounter is on YOURSIDE ONLY...the opponent playing spells also adds to the stormcounters on both battlefeilds and Storm effects CAN trigger from the Ai's storm enabled cards...You will also notice at the end of turn stages all stormcounters are wiped from the game starting fresh every turn.

heres what i need from a SVN editer...which can also help to produce many other effects similar to this without the added cards in the field.
I need 2 new zones added which are not a major or impossible task to complete...copy the battlefield code and add it back in as battlefield2 or offscreenzone or whatever you want to call it, then do the same for opponents battlefield code and also name it something similar to player battlefield.
what this will allow is for for the stormcounter or other counters such as hellkite damage code to appear off screen and as for hellkite code it can become a auto=may code which activates from the new zone its "token" is in while still allowing for it to do what its supposed to do.
these new zone will allows for all "not supposed to be seen" tokens a place to hide. the plan is to have stormcounter coded like this.

Code: Select all

[card]
name=StormCounter
auto=moveto(myoffscreen) all(this)
auto=@next endofturn:moveto(exile) all(this)
id=-1111999

##and storm enabled cards as##
[card]
name=Empty the Warrens
auto=token(Goblin,creature Goblin, 1/1,Red)*2 
&&thisforeach(StormCounter|myoffscreen)token(Goblin,creature Goblin, 1/1,Red)*2
text= Put two 1/1 red Goblin creature tokens into play. 
Storm
mana={3}{R}
type=Sorcery
[/card]
this will also allow for Zuberas or like cards depending on something to be counted during a turn code would appear as follows

Code: Select all

[card]
name=Zuberacounter
auto=moveto(myoffscreen) all(this)
auto=@next endofturn:moveto(exile) all(this)
id=3333333
type=nothing
[/card]

[card]
name=Ember-fist zubera
auto=@movedTo(this|graveyard) from (battlefield) :token(33333333)
&&thisforeach(Zuberacounter|offscreen) damage:1 target(creature,player)
text=When Ember-Fist Zubera is put into a graveyard from play, it deals damage to target creature or player equal to the number of Zubera put into all graveyards from play this turn.
mana={1}{R}
type=Creature
subtype=Zubera Spirit
power=1
toughness=2
[/card]
Using offscreen instead of MYoffscreen as it would work exactly like current battlefield VS Mybattlefield counting all zuberas place in a graveyard from all players this turn. then the Zuberacounters would exile at end of turn.

if someone else was currently working on this sort of thing your feedback and everyones would be apprecated.

Code: Select all

#NAME:stormtest
#DESC:A deck with simple mechanics
#DESC:to get you started.
#DESC:We recommend to create your own decks
#DESC:to get the full Wagic Fun!

Lightiningbolt (TMP) *12	
Lotus Petal (TE) *17
Empty the warrens *4
things that need work:
I do not know the code or way in which to make it so when a stormcounter is added into play the interupt black box from coming up, auto=nofizzle doesnt seem to get rid of it.

new hide away zone would make it a clean and very easy code to use "&&thisforeach(StormCounter|my X) {effect}" activates the storm on cards.
unless someone knows how to get the tokens to not show up. which would be great also.
thank you for reading my wall of text :D hope someone finds it interesting.

[EDIT ABRA : Renamed topic]
Last edited by Zethfox on Fri Jun 11, 2010 6:42 pm, edited 1 time in total.
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: working Storm ability for testing

Post by moxen »

I totally support the idea of creating new zones that can hold cards. Wishes,phasing, sideboarding would be totally codable if we have them.
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: How to code cards with "storm" ? (Require Confirmation)

Post by moxen »

However even if this works, it isn't a 100% storm effect. As storm is actually putting an additional copy on the stack, if an opponent attempts to counter a storm spell, he/she can only counter the original spell itself or anyone of the other copies that come with the storm effect.
If we were to utilize the unearth mechanics of actually copying an entire spell as it is and making them counterable then it should work.

About your code. I haven't gotten it to work yet. Seems to only create a total of 4 tokens. I've be pasted your exact codes. Anyway I think you can improve it slightly by using counters to keep track instead of so many tokens. It'll be neater. So even though we don't have an outside zone yet, this thing will still be bearable to play. Just create one token to keep a counter and bury it at the clean up step. I'll see if I can help.
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: How to code cards with "storm" ? (Require Confirmation)

Post by moxen »

4 hours. No luck yet. PC and PSP still crashes when the storm is suppose to trigger.
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code cards with "storm" ? (Require Confirmation)

Post by Zethfox »

im running this code on the latest templete .12 version...remember to add the rules edit in the MTG/rules...

Code: Select all

auto=@movedTo(*|stack):token(-1111999)
in the Rules/MTG makes a token everytime a spell is put on the stack.

Code: Select all

&&thisforeach(StormCounter|mybattlefield)token(Goblin,creature Goblin, 1/1,Red)*2
causes the effect to trigger for each token called stormcounter

these cards were coded for version .12.....if you are running .11 then they will not work.

it works exactly like storm should work, and only the original cast of the spell can be countered the "copies" cant be countered and fizzle if the original is counterspelled.
about coding as counters instead of tokens...after 4 days trying, im pretty sure now that wagic can not refference counters on another card. it can only seem to check its own counters...for exsample you cant have tomatoe deals X damage for each counter on carrot. reason being

Code: Select all

thisforeach(counter{0/0.1.storm}|stormcounter})
and

Code: Select all

thisforeach(stormcounter[counter{0/0.1.storm}])
are invalid codes if placed on a card other then stormcounter...BTW ive tried about 100s of combinations of those above listed invalids with 0 success.
coding a working stormcounter is no probelm tho

Code: Select all

[card]
auto=@movedTo(*|stack): counter(0/0,1,storm) all(stormcounter|mybattlefield)
name=StormCounter
auto=counter(0/0,0,storm)
auto=@next endofturn:moveto(exile) all(this)
id=-1111999
type=stormcounter
subtype=turn played this spells
[/card]
that places a token card at side of battle feild each turn that basically counts up the spells cast in the turn. cant refference itself to remove counters at end of turn since type=nothing cant be targeted by effect which is another reason im guessing thisforeach codes i posted cant refference its counters...
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code cards with "storm" ? (Require Confirmation)

Post by Zethfox »

tried it again, same code PC<--- since version .12 isnt on psp yet that i know of. no probelm at all. check your primitives and rules/mtg.txt for any possible error in the 3 code parts i gave you in open.

If someone knows a way to get tokens to have no image but still be in battlefield this storm effect would function perfectly without the clutter of tokens on screen...
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: How to code cards with "storm" ? (Require Confirmation)

Post by moxen »

I must have corrupted my copy somewhat. I redid a fresh copy with the svn update.
It no longer crashes now. However, it only performs 2 copies of the spell. No matter how many stormcount tokens there are present. I still only get 2 copies. Anything I might be doing wrong here?
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: How to code cards with "storm" ? (Require Confirmation)

Post by moxen »

Zethfox wrote: it works exactly like storm should work, and only the original cast of the spell can be countered the "copies" cant be countered and fizzle if the original is counterspelled.
moxen wrote: As storm is actually putting an additional copy on the stack, if an opponent attempts to counter a storm spell, he/she can only counter the original spell itself or anyone of the other copies that come with the storm effect.
If we were to utilize the unearth mechanics of actually copying an entire spell as it is and making them counterable then it should work.
Please read below. I've played storm decks during my irl MTG days and I do know the rules pretty well about them.

http://www.wizards.com/Magic/Magazine/A ... daily/bd69

The word “play” is also bad news for blue mages. Since all of the copies go on the stack when you play the spell—meaning when it is announced, not when it resolves—each of the copies will still be looming on the stack even if the original spell is countered. Countering a storm spell won’t counter the copies it makes. The copies can be countered like any other spell on the stack—whether they were “put” there or played—but will require a separate counter for each copy.
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
moxen
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: How to code cards with "storm" ? (Require Confirmation)

Post by moxen »

Your work around works. But I can't it to use thisforeach. It only seems to count if it is foreach. Great job.

Code: Select all

[card]
name=Empty the Warrens
auto=token(Goblin,creature Goblin, 1/1,Red)*2 && foreach(StormCounter|mybattlefield) token(Goblin,creature Goblin, 1/1,Red)*2
text= Put two 1/1 red Goblin creature tokens into play. Storm
mana={3}{R}
type=Sorcery
[/card]
Only those crazy enough to think they can change the world are the ones who do.

Wishlist: Sneak Attack, Through the Breach, Aluren, Serra Avatar, Goblin Piledriver
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code cards with "storm" ? (Require Confirmation)

Post by Zethfox »

thank you :) now if only we had a place to hide those stupid things, i read hints in this forums of how to get a card to not have an image or be onscreen but i forget where...
Locked