C targeting API, comments needed
Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!
PLEASE DO NOT REPORT BUGS HERE!
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
Re: C targeting API, comments needed
by jatill » 24 Mar 2009, 19:07
I've used this a ton now. Let me say, the system is amazing.
Just a couple comments:
For cards where you select your own permanent, you must set
td.allowed_controller = player; AND
td.preferred_controller = player;
It took me a while to figure out that the preferred controller was required also.
Next, I have no idea what the last target in select_target does. Hopefully that will be clear once you update the docs.
Just a couple comments:
For cards where you select your own permanent, you must set
td.allowed_controller = player; AND
td.preferred_controller = player;
It took me a while to figure out that the preferred controller was required also.
Next, I have no idea what the last target in select_target does. Hopefully that will be clear once you update the docs.
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: C targeting API, comments needed
by LoneFox » 24 Mar 2009, 19:35
preferred_controller is for the AI. I'm not sure if "preferred" is correct word here, because the AI skips compulsory triggers if that field is set to opponent and all legal targets are controlled by the AI itself.jatill wrote:I've used this a ton now. Let me say, the system is amazing.
Just a couple comments:
For cards where you select your own permanent, you must set
td.allowed_controller = player; AND
td.preferred_controller = player;
It took me a while to figure out that the preferred controller was required also.
These default to opponent for preferred and both for allowed, because that is (or I believe it to be) the most common case.
It is return location for selected target, in case you want it to go somewhere else than the first target slot in card_instance.jatill wrote:Next, I have no idea what the last target in select_target does. Hopefully that will be clear once you update the docs.
Re: C targeting API, comments needed
by jatill » 24 Mar 2009, 19:56
Oh, that's exciting. So I could pass in instance->targets[1] if I wanted that to get loaded instead or targets[0]?It is return location for selected target, in case you want it to go somewhere else than the first target slot in card_instance.
What, exactly, do I need to to to target a Plains. I know I need to set the 'special' field to something, but do you know what that something is?
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
18 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 23 guests