Page 1 of 1
target of Opponent's choice

Posted:
19 Nov 2010, 06:34
by slapshot5
Hi all,
I'm not really versed in how targeting works through AbilityFactory. That being said, I'd like to implement Preacher, which would use AF_GainControl, but the target is of opponent's choice. I'm guessing there's no way to do this currently with AbilityFactory. Does anyone know what the scope of a change to support this would be?
-slapshot5
Re: target of Opponent's choice

Posted:
19 Nov 2010, 15:19
by friarsol
I can't think of a way the current structure could do this right now. The Target and Target_Selection classes are the ones that handle Targeting, and so they would both be involved in the making it happen. Target would need an "OppChoice" parameter and it would be set similarly to TgtZone in AbilityFactory.
The weird thing about that phrasing is that currently the AI targets when he is deciding to play the spell or not. So if I activate Preacher, Target_Selection.chooseTargets() would call whatever function would let the AI target (instead of the player), but we're not in the scope of the AF to know what the spell is doing.
For Preacher the AI wants the Human to have the most worthless creature on the list. For Cuombajj Witches, they can target any creature or player. They wouldn't want to target any of their own things and unless they could kill something would most likely just ping the player for a damage.
And if the AI wanted to activate abilities with OppChoice... Let's just say I'm not sure which piece would be the tougher part to handle, but I have a feeling it might be this one.
Re: target of Opponent's choice

Posted:
19 Nov 2010, 16:14
by Rob Cashwalker
Preacher would also be looking for the situation with the human having a single good creature.
Re: target of Opponent's choice

Posted:
23 Nov 2010, 16:32
by zerker2000
Actually, for Preacher, it's more of the human not having any 0/1's. For the witches, however, we'd have to look at
e.g. not having any 2 or more power creatures within 1 damage of death.