How to code cards with multiple different target (types)?

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.
Locked
User avatar
Bas
Posts: 425
Joined: Sat Dec 26, 2015 10:55 pm
Location: Germany

How to code cards with multiple different target (types)?

Post by Bas »

For instance, I want to code Magma Jet with Scry effect.

For Scry, I need to target a card in my GY. However, it just jerks up and instead deals damage to that.

So I need to specify a target for the damage and one for the moveto, got any idea here? Or any other card with a similiar issue (but integrated into WTH)?

Thanks!
Forums are down atm.

Please join the discord server in order to not miss stuff and be reachable:
https://discord.gg/JHK5pVaK5p

(You are not required to install the software, you can use it in a browser as well, albeit I recommend installing)
User avatar
Bas
Posts: 425
Joined: Sat Dec 26, 2015 10:55 pm
Location: Germany

Re: How to code cards with multiple different target (types)

Post by Bas »

Plus:

Can I create Tokens that have no type? I would use these as a workaround, so something like magma Jet would do damage to a target, then create such a token, which has an effect like "At the End of the turn, sacrifice this token. Sacrifice: Scry 1."

Also, how do I create a token with a custom auto= line? Or do I have to create the token in my prim file separately first?
Forums are down atm.

Please join the discord server in order to not miss stuff and be reachable:
https://discord.gg/JHK5pVaK5p

(You are not required to install the software, you can use it in a browser as well, albeit I recommend installing)
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code cards with multiple different target (types)

Post by Zethfox »

You never need to create a token to get an ability, i added a menu making ability to wagic to remove that workaround. Ill have to go through the source as its been over 2 years since ive looked at it, but there is a menuability or something similar to that name, that allows you to contruct abilities. Look through the primitives for similar cards. Srcy wasnt added cause of rules, you dont want to code srcy where cards go in grave then back to deck. Scry needed a "revealing" zone, to add it to wagic.
User avatar
Bas
Posts: 425
Joined: Sat Dec 26, 2015 10:55 pm
Location: Germany

Re: How to code cards with multiple different target (types)

Post by Bas »

Well. I prefer to add Scry in a "dirty way" than not adding it at all. Also, we didn't have any devs aside on here at the board until you returned (how comes?), so without judging, I didn't feel as I had another way of realizing these cards.*
But then again, if I get it working with tokens, it means I could prob easier translate this to cleaner code.

* I am also using the 0.19.0 Wagic for PSP becuase newer versions are either slow or bugged in deck editor mode.
Forums are down atm.

Please join the discord server in order to not miss stuff and be reachable:
https://discord.gg/JHK5pVaK5p

(You are not required to install the software, you can use it in a browser as well, albeit I recommend installing)
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: How to code cards with multiple different target (types)

Post by Zethfox »

You misunderstand, i added a way to do exactly what token workarounds were used for that is legit. You should never need to call token () for creating an effect. Take a little time and scan through primitives of similar effects, you will see the keywords.
Locked