|
Post by lordagamemnon on Jul 27, 2023 3:45:17 GMT
Is there a way to automate verb agreement in keyword definitions? I'd like to have a keyword that functions like ward (side note: I haven't looked super hard, but I haven't found any discussion here of a keyword file that includes the definition of ward. If that's around for me to crib from, that would also be great.) The syntax visible on cards would look like: Keyword--<cost> (When you do thing X, do thing Y unless an opponent <fulfills cost>.)
I'm trying to get any verbs in <cost> to convert to third-person singular instead of the normal imperative that's used in costs. For example: Keyword--Discard a card (When you do thing X, do thing Y unless an opponent discards a card.)
english_plural and english_singular don't operate on verbs, so that's out. I can define the parameter as a cost, use the "For mana costs, add 'pay'" option, then nest replace statements as follows in the reminder text to accommodate card or life costs:
{replace(replace(for_mana_costs(add:"pays ", param1), match:"discard ", replace:"discards "), match:"pay ", replace:"pays ")}
Note spaces to enforce whole-word matching. This feels rather inelegant, though. It also requires manually adding any new verbs I might need later, so I'd like to know if there's a better and more extensible way to do it. Does anyone have recommendations?
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Jul 27, 2023 11:21:51 GMT
The "for_mana_costs" function should already do that, by calling another function named "actionize". (You really can't get around having a list of all the verbs somewhere.)
Here is a keyword file that includes a definition for ward: keywords (68.78 KB)
|
|
|
Post by lordagamemnon on Jul 27, 2023 13:22:35 GMT
Thank you for the help. I note that ward calls for_mana_costs with an additional argument of action:true. Unfortunately, that doesn't seem to work when I try it, and when I check the definition of for_mana_costs in script, it doesn't include any reference to the actionize function you mentioned. Was this added at some point recently-ish? I make a lot of custom games, sometimes just using Magic templates, so my MSE files have accumulated some strange additions over the years and I don't necessarily keep up with new definition files because doing so requires me to diff/merge. I'm probably overdue for that, though--does the download available on the downloads page have the most recent game files?
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Jul 27, 2023 15:11:46 GMT
Yeah the Lite pack has the most up-to-date version of the script file.
|
|