Trigger @Untapped

All additions requested or suggested to improve the card coding language.

Trigger @Untapped

Postby moxen » Fri May 21, 2010 8:06 am

Would it be possible to hardcode the Mesmeric Orb? http://gatherer.wizards.com/Pages/Card/ ... seid=30008

The syntax of untap is an action and not a trigger.
Image

[EDIT abra: changed the name of your suggestion as it is more the addition of the trigger as the mesmeric orb in itself that should be added]
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: Mesmeric Orb

Postby Saint » Mon May 24, 2010 9:27 am

auto=@each(Permanent;-tapped):deplete:1(targetcontroller)
or
auto=@each(creature,artifact,land,enchantment,aura;-tapped):deplete:1(targetcontroller)

Or something like that should work, don't think you really need to hardcode it.

These are the rulings so it's pretty straightforward:

12/1/2004 It triggers for each permanent that untaps, so if ten permanents you control untap, Mesmeric Orb's effect puts the top ten cards of your library into your graveyard.
12/1/2004 Mesmeric Orb triggers once for each permanent that untaps, so the cards are put into your graveyard one at a time.
"The bird of the Hermes is my name, eating my wings to make me tame." - Ripley Scrowle, Elias Ashmole's Theatrum Chemicum Britannicum - 1652
Saint
 
Posts: 432
Joined: Sat Jan 09, 2010 4:57 pm
Location: Netherlands

Re: Mesmeric Orb

Postby moxen » Sat May 29, 2010 5:19 pm

Correct me if I'm wrong. I'm still quite noob to wagic coding.

@each is a trigger for beginning of a particular phase only.
-tapped is a state. It's not a trigger. It checks if the variable is tapped or not tapped and not a check if it is changing from being tapped to becoming untapped.
The only trigger I can find that is similar is auto=@tapped. However there is no @untapped to my understanding, this should be hardcoded I guess.

If there was an @untapped trigger then the correct codes should be:
[Card]
name=Mesmeric Orb
auto=@untapped(*):deplete:1 controller
Text=
mana={2}
type=Artifact
[/Card]

There's another card that will benefit if there is a @untapped function.

Wake Thrasher(Eventide)
Whenever a permanent you control becomes untapped, Wake Thrasher gets +1/+1 until end of turn.

This card is like infinite dmg with seeker of skybreak/aphetto alchemist.
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: Mesmeric Orb

Postby Saint » Sun May 30, 2010 5:42 pm

Yep your right but there isen't an @untapped function, if there was it would make it alot easier, the @each is incorrect your right about that but -tapped is pretty much all you can do right now and would do the trick it just has to trigger at any moment and in any phase. You should make it check for tapped for first then throw in a aslongas(...-tapped) in it and it should work. If there was a untapped command it would easially work the way you just put it though.... what we could do is make it a whole bookwork of code and @each phase check it so it checks for the going from tapped to untapped in each phase of the game.
That's pretty much all I can come up with (@untapped will open up more then one door for coding cards in general though).
"The bird of the Hermes is my name, eating my wings to make me tame." - Ripley Scrowle, Elias Ashmole's Theatrum Chemicum Britannicum - 1652
Saint
 
Posts: 432
Joined: Sat Jan 09, 2010 4:57 pm
Location: Netherlands

Re: Mesmeric Orb

Postby moxen » Fri Jun 04, 2010 10:47 am

Saint wrote:Yep your right but there isen't an @untapped function, if there was it would make it alot easier, the @each is incorrect your right about that but -tapped is pretty much all you can do right now and would do the trick it just has to trigger at any moment and in any phase. You should make it check for tapped for first then throw in a aslongas(...-tapped) in it and it should work. If there was a untapped command it would easially work the way you just put it though.... what we could do is make it a whole bookwork of code and @each phase check it so it checks for the going from tapped to untapped in each phase of the game.
That's pretty much all I can come up with (@untapped will open up more then one door for coding cards in general though).


If we're doing a check on -tap every phase depletion/+1/+1 will occur at every beginning of phase as long as a card is tapped. As long as is also a check for a state. It doesn't check for a transition. It is not a trigger.

The below portion in the svn seems to be the portion that controls the checking for being from being untapped to becoming tapped. But I can't quite figure out how to link this to @tapped yet. It shouldn't be very difficult to code in an @untapped trigger as we only need to reverse the sequence of something that already has a code.

int triggerOnEvent(WEvent * event){
WEventCardTap * e = dynamic_cast<WEventCardTap *>(event);
if (!e) return 0;
if (e->before == e->after) return 0;
if (e->after != tap) return 0;
if (!tc->canTarget(e->card)) return 0;
return 1;
}
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: Trigger @Untapped

Postby abrasax » Fri Jun 04, 2010 10:51 am

It shouldn't be very difficult to code in an @untapped trigger as we only need to reverse the sequence of something that already has a code.


I fully agree.

It is something I wanted to add at a certain point of time, but I must admit that since @damaged I was not very active in developping the parser. It always a matter of time and motivation.

If you have time to look at it and make it work it would be great.

Grüssi

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
abrasax
 
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: Trigger @Untapped

Postby Saint » Fri Jun 04, 2010 11:42 am

abrasax wrote:
It shouldn't be very difficult to code in an @untapped trigger as we only need to reverse the sequence of something that already has a code.


I fully agree.

It is something I wanted to add at a certain point of time, but I must admit that since @damaged I was not very active in developping the parser. It always a matter of time and motivation.

If you have time to look at it and make it work it would be great.

Grüssi

Abra


It shouldn't be very difficult to code in an @untapped trigger as we only need to reverse the sequence of something that already has a code.


I fully agree.

It is something I wanted to add at a certain point of time, but I must admit that since @damaged I was not very active in developping the parser. It always a matter of time and motivation.

If you have time to look at it and make it work it would be great.

Grüssi

Abra

I have to agree with the both of you it won't be to much work to create a @untapped parser but like abra sayed it's a matter of time and motivation and WEN the parser is available it'll open up alot of doors to make coding even easier :)
"The bird of the Hermes is my name, eating my wings to make me tame." - Ripley Scrowle, Elias Ashmole's Theatrum Chemicum Britannicum - 1652
Saint
 
Posts: 432
Joined: Sat Jan 09, 2010 4:57 pm
Location: Netherlands

Re: Trigger @Untapped

Postby moxen » Sat Jun 12, 2010 7:13 pm

One more to add if we get an @untapped parsher.
Image
Code: Select all
[Card]
name=Cloud of Faeries
abilities=Flying
autohand={2}:cycling
auto=@movedto(this|mybattlefield) from(myhand):may untap target(land) && token(-9111119)
text=
mana={1}{U}
type=Instant
[/card]
[card]
name=Cloud of Faeries 2nd Tap
auto=counter(0/0,1,COF)
auto=[color=#800080]@untapped[/color](land):thisforeach(counter{0/0.1.COF}>0) may untap target(land) && counter(0/0,-1,COF) && counter(0/0,1,Bury)
auto=thisforeach(counter{0/0.1.Bury}>0) bury
id=-9111119
type=Nothing
[/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
moxen
 
Posts: 254
Joined: Fri May 21, 2010 7:00 am

Re: Trigger @Untapped

Postby moxen » Thu Jun 24, 2010 6:30 pm

@untapped will benefit the coding of the following cards

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

could be more but these are the ones I know.
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

Advertising


Return to Card Coding & Parser

Who is online

Users browsing this forum: No registered users and 1 guest