Page 1 of 1

multiple keywords on 1 card

PostPosted: 14 Sep 2010, 15:43
by slapshot5
Hi all,

I've been digging into the keywords a bit lately, and it looks like we cannot use multiple keywords on one card (e.g. spDestroyTgt and SpBounce). When I tried it, I got exceptions. It would be nice if we could do this for cards like the following:

Code: Select all
Active Volcano
R
Instant
Choose one — Destroy target blue permanent; or return target Island to its owner's hand.
spDestroyTgt:Permanent.Blue
spBounce:Land.Island
SVars:Rarity:Uncommon
SVars:Picture:http://www.wizards.com/global/images/magic/general/active_volcano.jpg

Blue Elemental Blast
U
Instant
Choose one — Counter target red spell; or destroy target red permanent.
spCounter:Spell:Color(Red):Graveyard
SpDestroyTgt:Permanent.Red
SVars:Rarity:Common
SVars:Picture:http://www.wizards.com/global/images/magic/general/blue_elemental_blast.jpg

Red Elemental Blast
R
Instant
Choose one — Counter target blue spell; or destroy target blue permanent.
spCounter:Spell:Color(Blue):Graveyard
spDestroyTgt:Permanent.Red
SVars:Rarity:Common
SVars:Picture:http://www.wizards.com/global/images/magic/general/red_elemental_blast.jpg

and many others. (Just pretend the syntax is all correct in my examples...)

Perhaps we need to get the restrictions to display from the keywords instead of from card.getText()?

Is this currently possible, and I'm doing something wrong, or is this something we should look into?

-slapshot5

Re: multiple keywords on 1 card

PostPosted: 14 Sep 2010, 16:47
by DennisBergkamp
It's something we should look into, it currently does not work... I'm not 100% sure, but I think it's because both keywords do a card.clearSpellAbility().

Re: multiple keywords on 1 card

PostPosted: 14 Sep 2010, 16:54
by Rob Cashwalker
The only thing holding this back for the human player is that each keyword handler (for a spell, not permanents) clears any previous spell abilities added to the card. The human player will be presented with each available mode of the spell.
However the AI only checks the first ability if it should be played. So in the above cases, it would never attempt to bounce an island.

The way around this is to either modify the AI to check all spell abilities assigned to a card (not all spell abilities assigned to the card may playable in any given situation) OR we create a keyword, like "spCharm". This keyword would take the raw keyword strings as input, and using our proposed AbilityFactory, convert the strings to abilities. Then the AI decision of the Charm keyword queries both abilities for their AI decision, and then chooses between the positive responses. Given a parameter that specifies the number of allowed choices would enable Commands (choose 2 of 4).

The new card format is actually part of this master plan to re-architect the keyword handling.

Re: multiple keywords on 1 card

PostPosted: 14 Sep 2010, 17:29
by friarsol
Exactly as Rob says. This will probably wait until after we have Abilities that can be added on the fly.

I think I would call this "spModal" instead of "spCharm" but the name really doesn't matter. (Modal)

After we got this working it should be a pretty simple step to add an Entwine ability onto that, so that Barbed Lightning might look like this:
Code: Select all
k:spModal:<Choose X>:Entwine:<Cost>:<Choose Y>:<List of Keywords>
k:spModal:1:Entwine:2:2:k:spTargetC:3:k:spTargetP:3