It is currently 31 Oct 2025, 16:57
   
Text Size

target of Opponent's choice

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

target of Opponent's choice

Postby slapshot5 » 19 Nov 2010, 06:34

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
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: target of Opponent's choice

Postby friarsol » 19 Nov 2010, 15:19

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: target of Opponent's choice

Postby Rob Cashwalker » 19 Nov 2010, 16:14

Preacher would also be looking for the situation with the human having a single good creature.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: target of Opponent's choice

Postby zerker2000 » 23 Nov 2010, 16:32

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.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 30 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 30 guests

Login Form