How to code flashback ? (Working)

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.
baldersmashed
Posts: 156
Joined: Sat Apr 25, 2009 12:00 am

Re: Flashback cards

Post by baldersmashed » Sun Apr 18, 2010 12:41 am

I didn't think that would work for the bringers! Great find!! :D
Dr.Solomat wrote:"Vegeta! What does the scouter say about Wagics power level?"

"It's over ten thooooouuuuuusaaaaaaaaand!"

"What 10.000? There's no way that can be right!"

KF1
Posts: 1952
Joined: Tue Apr 06, 2010 7:04 pm

Re: Flashback cards

Post by KF1 » Sun Apr 18, 2010 1:01 am

Great news indeed! More cards is always a good thing.

Does this mean that Phasing ability cards like Sandbar Crocodile [Mirage Block] will be implemented in a similar manner via the exile mechanic?

Norrin
Posts: 32
Joined: Thu Apr 15, 2010 5:01 am
Location: Brazil

Re: Flashback cards

Post by Norrin » Sun Apr 18, 2010 3:05 am

Theres a problem about the bringer, the thing is, i made a card using this code, to test it:

Code: Select all

auto=@movedto(Bringer|mystack):counter(1/1) target(creature)
the effect didnt trigger when i played the bringer by paying the alternative cost.Too bad :|
Thats probably a huge drawback, too bad, i was going to try coding evoke now, but if it doesnt trigger these effects then its not worthy :|
I tested Evoke like this:

Code: Select all

[card]
name=Mulldrifter
abilities=flying
auto=draw:2
autohand={2}{U}:moveto(mybattlefield) && bury all(this)
text= Flying
When Mulldrifter enters the battlefield, draw two cards.
Evoke 2B (You may cast this spell for its evoke cost. If you do, it's 
sacrificed when it enters the battlefield.)
mana={4}{U}
type=Creature
subtype=Elemental
power=2
toughness=2
[/card]
the mulldrifter comes into play, triggers come into play effects, and let me draw 2 cards and then die,but this way, the spell isnt actualy played, so its not exactly how the card is supposed to be :|

baldersmashed
Posts: 156
Joined: Sat Apr 25, 2009 12:00 am

Re: Flashback cards

Post by baldersmashed » Sun Apr 18, 2010 7:14 am

Another problem with using the copy action to code permanents with alternate costs would unfortunately put the original in the graveyard while the copy stayed in play. This would create a way to cheat and get two permanents out of one card, as the original card could be returned by graveyard manipulation. This could also create an instance in which @movedto(*|graveyard) triggers would be triggered twice. I wouldn't want to see this while my opponent sat with a Vulturous Zombie on the board!

Looks like alternative cost permanents will have to wait a while longer...
Dr.Solomat wrote:"Vegeta! What does the scouter say about Wagics power level?"

"It's over ten thooooouuuuuusaaaaaaaaand!"

"What 10.000? There's no way that can be right!"

Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Flashback cards

Post by Dr.Solomat » Sun Apr 18, 2010 9:18 am

!!!BAD NEWS!!!

I am a little upset, because it seems that flashbacked spells don't go on the stack!!! :o

I tested this with Acorn Harvest. I played it from the graveyard and tried to counter it with my own Counterspell. Result: I couldn't counter it.....

2.test: I gave my Elvish Berserker the autoline:"auto=@movedTo(sorcery|mystack):token(Elf,creature token elf,3/3,green)". In the test game I had an Elvish Berserker on the battlefield and played Acorn Harvest from the graveyard. Result: Elvish Berserkers ability did not trigger! :shock:


Any opinion about that? Shall we still add flashback cards?

Pros:
- The AI cannot counter spells anyways.
- We would have a huge boost of really good cards, which work the way they should over 95% of the times they are played.
- We have cards with "retrace" in the official Wagic game for a long time. No one has complaint about that yet, So i think no one will when cards with flashback are added.
- Except for this drawback, the Flashback concept Norrin created is working perfectly.

Cons:
- Trigger effects don't work with these cards when they are played for their flashback costs.
- Well, they can't be countered by yourself (why would you want to do that? ;) ) or by other effects (which actually don't exist in Wagic :D ).
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn

baldersmashed
Posts: 156
Joined: Sat Apr 25, 2009 12:00 am

Re: Flashback cards

Post by baldersmashed » Mon Apr 19, 2010 1:58 am

Flashback and alternate costs could really be boosted by allowing nonland cards to be moved from other zones to the stack. 'moveTo' action could be modified to do so. I assume that since it would be moved there that the game would simply resume its normal course and, seeing there is a spell on the stack, resolve it like it was cast. The only issue would be that it would have to be coded so that a card moved to the stack would still be considered as cast and trigger '@movedto' abilities that would be relevant, such as the good Dr.'s modified Elvish Berserker.
From there it would be a simple matter to allow them to be moved from the stack so that Remand style cards can also be included. :)
Dr.Solomat wrote:"Vegeta! What does the scouter say about Wagics power level?"

"It's over ten thooooouuuuuusaaaaaaaaand!"

"What 10.000? There's no way that can be right!"

Norrin
Posts: 32
Joined: Thu Apr 15, 2010 5:01 am
Location: Brazil

Re: Flashback cards

Post by Norrin » Mon Apr 19, 2010 3:59 am

baldersmashed wrote:Flashback and alternate costs could really be boosted by allowing nonland cards to be moved from other zones to the stack. 'moveTo' action could be modified to do so. I assume that since it would be moved there that the game would simply resume its normal course and, seeing there is a spell on the stack, resolve it like it was cast. The only issue would be that it would have to be coded so that a card moved to the stack would still be considered as cast and trigger '@movedto' abilities that would be relevant, such as the good Dr.'s modified Elvish Berserker.
From there it would be a simple matter to allow them to be moved from the stack so that Remand style cards can also be included. :)
And its possible, and it triggers the @movedto effects.This is what i tested:

Code: Select all

[card]
name=Chatter of the Squirrel
auto=token(Squirrel,creature squirrel, 1/1,green)
autograveyard={1}{G}:  copy(this) && moveTo(mystack) asSorcery
text=Put a 1/1 green Squirrel creature token onto the battlefield.
Flashback 1G (You may cast this card from your graveyard for its flashback cost. Then exile it.)
mana={G}
type=Sorcery
[/card]
Along with this in play:

Code: Select all

[card]
name=Tester
auto=@movedTo(Sorcery|mystack):draw:1
text=Just a Test.
mana={G}
type=Creature
subtype=Spirit
power=3
toughness=3
[/card]
What happened was:
1- I still couldnt target it with Counterspell.
2- The effect from "Tester" triggered,allowing me to draw a card.
3- The token was created, and the card vanished, same effect as before.

I also added the moveTo(mystack) to the mulldrifter, but then the card would vanish, even if i alter the order of the moveTo statements (moveTo(mystack) && moveTo(mybattlefield) && bury all(this) or (moveTo(mybattlefield) && moveTo(mystack) && bury all(this)).The first case triggers @moved to and vanishes, never coming into play and the second case triggers come into play effects and leaves the card on the graveyard, but doest triggers @moved to.Guess we will have wait on those.

Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Flashback cards

Post by Dr.Solomat » Mon Apr 19, 2010 9:18 am

And its possible, and it triggers the @movedto effects.This is what i tested:

Code: Select all

[card]
name=Chatter of the Squirrel
auto=token(Squirrel,creature squirrel, 1/1,green)
autograveyard={1}{G}:  copy(this) && moveTo(mystack) asSorcery
text=Put a 1/1 green Squirrel creature token onto the battlefield.
Flashback 1G (You may cast this card from your graveyard for its flashback cost. Then exile it.)
mana={G}
type=Sorcery
[/card]
I tested this code, too. It works perfectly! But there are 2 questions that remain:

1. Why does "@movedTo(sorcery/mystack)" trigger the same time when you can't cast a couterspell on it????

2. Why is the spell moved to exile when cast from the graveyard although the "moveTo(exile)" part is missing? :)
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn

Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Flashback cards

Post by Dr.Solomat » Mon Apr 19, 2010 9:31 am

Okay,

I think I will add all working flashback cards to the svn. A lot of thanks go to Norrin and all who participated on the discussion.
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn

Norrin
Posts: 32
Joined: Thu Apr 15, 2010 5:01 am
Location: Brazil

Re: Flashback cards

Post by Norrin » Mon Apr 19, 2010 4:51 pm

Dr.Solomat wrote:
1. Why does "@movedTo(sorcery/mystack)" trigger the same time when you can't cast a couterspell on it????
I think i can answer that one.See, the Copy keyword was meant to copy a creature,not to create a copy of a spell.When i first tried using copy(this) to code flashback, i had something like this:
target=creature
auto=flying
For the Defy Gravity card.But then the copy wouldnt do anithing, then i changed to:
auto=flying target(creature)
Then it worked.Thats when i realized the spell wasnt beign copied.If the spell isnt beign copied, then it cant be countered, since its not a spell :D

Post Reply