Documentation of keyword functions, changes sort_text function

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@589 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-01 18:41:11 +00:00
parent 849f8935d9
commit 624d5cba56
4 changed files with 114 additions and 16 deletions
+19
View File
@@ -0,0 +1,19 @@
Function: keyword_usage
--Usage--
> keyword_usage(card: some_card)
Returns a comma separated list of the keywords that appear on the card.
For example if a card contains the keywords "Flying" and "Haste" the function will return @"Flying, Haste"@.
If a keyword appears multiple times on the card it will also appear multiple times in the output, unless @unique@ is specified.
--Parameters--
! Parameter Type Description
| @card@ [[type:card]] Card to find keywords on.
| @unique@ [[type:boolean]] (optional) Return each keyword at most once.
--Examples--
> keyword_usage(card: some_card, unique: false) == "Flying, Flying, Haste"
> keyword_usage(card: some_card, unique: true) == "Flying, Haste"