mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Documented add cards scripts and the new_card function
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1149 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
Data type: add cards script
|
||||
|
||||
DOC_MSE_VERSION: since 0.3.7
|
||||
|
||||
--Overview--
|
||||
|
||||
A script to add multiple cards to the set at once.
|
||||
|
||||
--Properties--
|
||||
! Property Type Default Description
|
||||
| @name@ [[type:string]] Name of this script; appears in the menu.
|
||||
| @description@ [[type:string]] @""@ Description of this script; appears in the status bar.
|
||||
| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this script enabled?
|
||||
| @script@ [[type:script]] Script that produces the cards.<br>
|
||||
This script should return a [[type:list]] of [[type:card]]s.
|
||||
The [[fun:new_card]] function can be used to make new cards.
|
||||
|
||||
--Example--
|
||||
>add cards script:
|
||||
> name: &Basic Lands
|
||||
> description: Adds 5 basic lands to the set.
|
||||
> script:
|
||||
> [ new_card([name: "Plains", super_type: "Basic Land", sub_type: "Plains"])
|
||||
> , new_card([name: "Island", super_type: "Basic Land", sub_type: "Island"])
|
||||
> , new_card([name: "Swamp", super_type: "Basic Land", sub_type: "Swamp"])
|
||||
> , new_card([name: "Mountain", super_type: "Basic Land", sub_type: "Mountain"])
|
||||
> , new_card([name: "Forest", super_type: "Basic Land", sub_type: "Forest"])
|
||||
> ]
|
||||
|
||||
When invoked, this script will add the five basic lands to the set.
|
||||
|
||||
@@ -46,6 +46,8 @@ Such a package contains a [[file:format|data file]] called <tt>game</tt> that ha
|
||||
| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords.
|
||||
| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game.
|
||||
| @word lists@ [[type:list]] of [[type:word list]]s Word lists that can be used by text fields.
|
||||
| @add cards script@ [[type:list]] of [[type:add cards script]]s DOC_MSE_VERSION: since 0.3.7
|
||||
A list of scripts for convienently adding multiple cards to a set.
|
||||
|
||||
--Examples--
|
||||
Look at the game files in the standard MSE distribution for examples.
|
||||
|
||||
@@ -27,6 +27,8 @@ These contain several properties, similair to the file types. But they are part
|
||||
| [[type:keyword param type]] A type of parameters for keywords.
|
||||
| [[type:statistics dimension]] A dimension for the statistics panel.
|
||||
| [[type:statistics category]] A category for the statistics panel.
|
||||
| [[type:word list]] A list of words that can be used for a drop down list in text fields.
|
||||
| [[type:add cards script]] A script for convienently adding multiple cards to a set.
|
||||
| [[type:font]] Description of a font.
|
||||
| [[type:symbol part]] Part of a [[type:symbol]].
|
||||
| [[type:control point]] A point on in a symbol part.
|
||||
|
||||
Reference in New Issue
Block a user