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

Keywords?

Post MTG Forge Related Programming Questions Here

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

Keywords?

Postby mcrawford620 » 06 Jul 2012, 21:23

I'm looking in CardFactoryUtil.evaluateCreature() and it references a ton of card.hasKeyword().
I was trying to add something to check for cards like Phantasmal Bear that die when targeted with a spell.

Code: Select all
T:Mode$ BecomesTarget | ValidTarget$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When CARDNAME becomes the target of a spell or ability, sacrifice it.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
SVar:Targeting:Dies
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantasmal_bear.jpg
SetInfo:M12|Common|http://magiccards.info/scans/en/m12/70.jpg
Oracle:When Phantasmal Bear becomes the target of a spell or ability, sacrifice it.
Should I add a K: keyword to the card script? Or use something else in evaluateCreature() to tell the AI that these creatures are less valuable?
mcrawford620
 
Posts: 112
Joined: 25 Jun 2012, 16:59
Has thanked: 55 times
Been thanked: 25 times

Re: Keywords?

Postby friarsol » 06 Jul 2012, 21:41

You can probably just use the same Targeting SVar check you are using in other places. That makes the most sense to me.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Keywords?

Postby ArsenalNut » 06 Jul 2012, 23:17

friarsol wrote:You can probably just use the same Targeting SVar check you are using in other places. That makes the most sense to me.
This Targting SVar seems like it would also be useful in situation where the AI should target an opponents creature to get rid of it. For instance, I saw the AI use a Vapor Snag to return my Grand Architect when I also had a Phantasmal Image that was cloning the Grand Architect.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times


Return to Developer's Corner

Who is online

Users browsing this forum: Timothysow and 26 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 27 users online :: 1 registered, 0 hidden and 26 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: Timothysow and 26 guests

Login Form