Template:Spell

From Fax Encyclopedicus

Jump to: navigation, search
 
Line 1: Line 1:
-
==={{{name}}}===
+
<includeonly>==={{{name|{{PAGENAME}}}}}===
-
{{{school}}} ({{{subschool}}}) [{{{desc}}}]<br>
+
<!--
-
'''Level:''' {{{level}}}<br>
+
 
-
'''Components:''' {{{comp}}}<br>
+
-->{{ #if: {{{school|}}} | {{{school}}} <!-- no school entry --> }}<!--
-
'''Casting Time:''' {{{time}}}<br>
+
 
-
'''Range:''' {{{range}}}<br>
+
-->{{ #if: {{{subschool|}}} | &nbsp;({{{subschool}}}) | <!-- no subschool entry --> }}<!--
-
'''Target:''' {{{target}}}<br>
+
 
-
'''Duration:''' {{{dur}}}<br>
+
-->{{ #if: {{{desc|}}} | &nbsp;[{{{desc}}}] | <!-- no descriptor entry --> }}<!--
-
'''Saving Throw:''' {{{save}}}<br>
+
 
-
'''Spell Resistance:''' {{{SR}}}
+
-->{{ #if: {{{class1|}}} |
 +
* '''Level:''' {{ #ifexist: {{{class1}}} | [[{{{class1}}}]] | {{{class1}}} }} {{{class1level}}}<!--
 +
  -->{{ #if: {{{class2|}}} | , {{ #ifexist: {{{class2}}} | [[{{{class2}}}]] | {{{class2}}} }} {{{class2level}}}<!--
 +
    -->{{ #if: {{{class3|}}} | , {{ #ifexist: {{{class3}}} | [[{{{class3}}}]] | {{{class3}}} }} {{{class3level}}}<!--
 +
      -->{{ #if: {{{class4|}}} | , {{ #ifexist: {{{class4}}} | [[{{{class4}}}]] | {{{class4}}} }} {{{class4level}}}<!--
 +
        -->{{ #if: {{{class5|}}} | , {{ #ifexist: {{{class5}}} | [[{{{class5}}}]] | {{{class5}}} }} {{{class5level}}}<!--
 +
          -->{{ #if: {{{class6|}}} | , {{ #ifexist: {{{class6}}} | [[{{{class6}}}]] | {{{class6}}} }} {{{class6level}}}<!--
 +
            -->{{ #if: {{{class7|}}} | , {{ #ifexist: {{{class7}}} | [[{{{class7}}}]] | {{{class7}}} }} {{{class7level}}}<!--
 +
              -->{{ #if: {{{class8|}}} | , {{ #ifexist: {{{class8}}} | [[{{{class8}}}]] | {{{class8}}} }} {{{class8level}}}<!--
 +
                -->{{ #if: {{{class9|}}} | , {{ #ifexist: {{{class9}}} | [[{{{class9}}}]] | {{{class9}}} }} {{{class9level}}}<!--
 +
                  -->{{ #if: {{{classX|}}} | , {{ #ifexist: {{{classX}}} | [[{{{classX}}}]] | {{{classX}}} }} {{{classXlevel}}}<!--
 +
                  -->| <!-- no 10th class entry --> }}<!--
 +
                -->| <!-- no 9th class entry --> }}<!--
 +
              -->| <!-- no 8th class entry --> }}<!--
 +
            -->| <!-- no 7th class entry --> }}<!--
 +
          -->| <!-- no 6th class entry --> }}<!--
 +
        -->| <!-- no 5th class entry --> }}<!--
 +
      -->| <!-- no 4th class entry --> }}<!--
 +
    -->| <!-- no 3rd class entry --> }}<!--
 +
  -->| <!-- no 2nd class entry --> }}<!--
 +
-->| <!-- no 1st class entry, maybe plain level:
 +
 
 +
-->{{ #if: {{{level|}}} |
 +
* '''Level:''' {{{level}}} | <!-- no level entry --> }} }}<!--
 +
 
 +
-->{{ #if: {{{comp|}}} |
 +
* '''Components:''' {{{comp}}} | <!-- no components entry --> }}<!--
 +
 
 +
-->{{ #if: {{{time|}}} |
 +
* '''Casting Time:''' {{{time}}} | <!-- no casting time entry --> }}<!--
 +
 
 +
-->{{ #if: {{{range|}}} |
 +
* '''Range:''' {{{range}}} | <!-- no range entry --> }}<!--
 +
 
 +
-->{{ #if: {{{target|}}} |
 +
* '''Target:''' {{{target}}} | <!-- no target entry --> }}<!--
 +
 
 +
-->{{ #if: {{{area|}}} |
 +
* '''Area:''' {{{area}}} | <!-- no area entry --> }}<!--
 +
 
 +
-->{{ #if: {{{effect|}}} |
 +
* '''Effect:''' {{{effect}}} | <!-- no effect entry --> }}<!--
 +
 
 +
-->{{ #if: {{{dur|}}} |
 +
* '''Duration:''' {{{dur}}} | <!-- no duration entry --> }}<!--
 +
 
 +
-->{{ #if: {{{save|}}} |
 +
* '''Saving Throw:''' {{{save}}} | <!-- no saving throw entry --> }}<!--
 +
 
 +
-->{{ #if: {{{SR|}}} |
 +
* '''Spell Resistance:''' {{{SR}}} | <!-- no spell resistanceentry --> }}<!--
 +
 
 +
-->{{ #ifeq: {{NAMESPACE}} | Template | <!-- don't include templates in the categories --> | <!--
 +
 
 +
  -->{{ #if: {{{nocat|}}} | <!-- don't categorize when nocat is set --> |
 +
 
 +
[[Category:{{{type|Spells}}}]]<!--
 +
 
 +
    -->{{ #if: {{{noclasscat|}}} | <!-- don't categorize for each class; use level
 +
 
 +
      -->{{ #if: {{{nolevelcat|}}} | <!-- unless nolevelcat is also set --> | <!--
 +
 
 +
        -->{{ #if: {{{level|}}} |
 +
[[Category:{{{type|Spells}}} (Level {{{level}}})]] | <!--
 +
 
 +
no level entry supplied
 +
        --> }} <!--
 +
nolevelcat false
 +
      --> }} <!--
 +
noclasscat set
 +
    --> | <!--
 +
noclasscat not set, doing class categorization:
 +
 
 +
      -->{{ #if: {{{class1|}}} |
 +
[[Category:{{{class1|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class1|}}} {{{type|Spells}}} (Level {{{class1level}}})]] }}<!--
 +
 
 +
        -->{{ #if: {{{class2|}}} |
 +
[[Category:{{{class2|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class2|}}} {{{type|Spells}}} (Level {{{class2level}}})]] }}<!--
 +
 
 +
          -->{{ #if: {{{class3|}}} |
 +
[[Category:{{{class3|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class3|}}} {{{type|Spells}}} (Level {{{class3level}}})]] }}<!--
 +
 
 +
            -->{{ #if: {{{class4|}}} |
 +
[[Category:{{{class4|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class4|}}} {{{type|Spells}}} (Level {{{class4level}}})]] }}<!--
 +
 
 +
              -->{{ #if: {{{class5|}}} |
 +
[[Category:{{{class5|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class5|}}} {{{type|Spells}}} (Level {{{class5level}}})]] }}<!--
 +
 
 +
                -->{{ #if: {{{class6|}}} |
 +
[[Category:{{{class6|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class6|}}} {{{type|Spells}}} (Level {{{class6level}}})]] }}<!--
 +
 
 +
                  -->{{ #if: {{{class7|}}} |
 +
[[Category:{{{class7|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class7|}}} {{{type|Spells}}} (Level {{{class7level}}})]] }}<!--
 +
 
 +
                    -->{{ #if: {{{class8|}}} |
 +
[[Category:{{{class8|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class8|}}} {{{type|Spells}}} (Level {{{class8level}}})]] }}<!--
 +
 
 +
                      -->{{ #if: {{{class9|}}} |
 +
[[Category:{{{class9|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{class9|}}} {{{type|Spells}}} (Level {{{class9level}}})]] }}<!--
 +
 
 +
                        -->{{ #if: {{{classX|}}} |
 +
[[Category:{{{classX|}}} {{{type|Spells}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> |
 +
[[Category:{{{classX|}}} {{{type|Spells}}} (Level {{{classXlevel}}})]] }}<!--
 +
 
 +
                        --> | <!-- no 10th class entry --> }}<!--
 +
                      --> | <!-- no 9th class entry --> }}<!--
 +
                    --> | <!-- no 8th class entry --> }}<!--
 +
                  --> | <!-- no 7th class entry --> }}<!--
 +
                --> | <!-- no 6th class entry --> }}<!--
 +
              --> | <!-- no 5th class entry --> }}<!--
 +
            --> | <!-- no 4th class entry --> }}<!--
 +
          --> | <!-- no 3rd class entry --> }}<!--
 +
        --> | <!-- no 2nd class entry --> }}<!--
 +
      --> | <!-- no 1st class entry, maybe plain level:
 +
 
 +
        -->{{ #if: {{{nolevelcat|}}} | <!-- unless nolevelcat is also set --> | <!--
 +
 
 +
          -->{{ #if: {{{level|}}} |
 +
[[Category:{{{type|Spells}}} (Level {{{level}}})]] | <!--
 +
 
 +
no level entry supplied
 +
          --> }} <!--
 +
nolevelcat false
 +
        --> }} <!--
 +
class1 not set
 +
      --> }}<!--
 +
noclasscat not set
 +
    --> }}<!--
 +
nocat not set
 +
  --> }}<!--
 +
not template
 +
--> }}<!--
 +
 
 +
--></includeonly><noinclude><!--
 +
 
 +
-->This template is used to create spell (or similar) entries. The syntax is as follows; italics entries are optional.
 +
<nowiki>{{Spell</nowiki>
 +
  | ''type''        = The type of effect being described. Defaults to "Spells";
 +
                  used for categorizing, so use plurals.
 +
  | ''name''        = The spell's name. Defaults to the page's name.
 +
  | ''school''      = The spell's school. If omitted, the School line is omitted
 +
                  (including sub-school and descriptors).
 +
  | ''subschool''  = The spell's sub-school. The parentheses are added by the template.
 +
  | ''desc''        = The spell's descriptor(s). Brackets are added by the template.
 +
  | ''comp''        = The spell's components. Defaults omitted.
 +
  | ''time''        = The spell's casting time. Defaults omitted.
 +
  | ''range''      = The spell's range. Defaults omitted.
 +
  | ''target''      = The spell's target. Defaults omitted.
 +
  | ''area''        = The spell's area. Defaults omitted.
 +
  | ''effect''      = The spell's effect. Defaults omitted.
 +
  | ''dur''        = The spell's duration. Defaults omitted.
 +
  | ''save''        = The spell's saving throw(s). Defaults omitted.
 +
  | ''SR''          = "yes" or "no" to whether SR applies. Defaults omitted.
 +
  | ''class1''      = The first class that can use the spell. Defaults omitted,
 +
                  and omits all classes and levels below.
 +
  | ''class1level'' = The spell's level for the first class
 +
  | ''class2''      = Second class
 +
  | ''class2level'' = Second class's spell level
 +
  ...
 +
  | ''class9''      = Ninth class
 +
  | ''class9level'' = Ninth class's spell level
 +
  | ''classX''      = Tenth class; template only supports 10 classes
 +
  | ''classXlevel'' = Tenth class's spell level
 +
  | ''level''      = Spell level, not tied to a class.
 +
                  Used only if no classes are used.
 +
  | ''nocat''      = If set at all, page with this template is
 +
                  not categorized at all.
 +
  | ''noclasscat''  = If set at all, page with this template is
 +
                  not added to each class's categories.
 +
  | ''nolevelcat''  = If set at all, page with this template is
 +
                  not added to each level's categories.
 +
}}
 +
 
 +
Any time <tt>class#</tt> is used, the corresponding <tt>class#level</tt> '''must''' also be assigned. The <tt>level</tt> parameter is ignored if <tt>class1</tt> is set, '''unless''' <tt>noclasscat</tt> is set and <tt>nolevelcat</tt> is not, in which case it may be used for categorization. If any <tt>class#</tt> is not set, all greater numbers are ignored.
 +
 
 +
This template assigns pages to the [[:Category:Spells]] category (assuming <tt>type</tt> is left to default), and to the individual categories given by "<tt>class#</tt> Spells" and "<tt>class#</tt> Spells (Level <tt>class#level</tt>)". To remove this behavior, use <tt>nocat</tt>, <tt>noclasscat</tt>, and/or <tt>nolevelcat</tt> (primarily used when a page has a list of spells and to use these categories would insert the page in ''every'' level's category). Templates are never categorized in this manner.
 +
 
 +
== Example ==
 +
<pre>{{Spell
 +
  | name = Magic Missile
 +
  | school = Evocation
 +
  | desc = Force
 +
  | class1 = Sorcerer
 +
  | class1level = 1
 +
  | class2 = Wizard
 +
  | class2level = 1
 +
  | comp = V, S
 +
  | time = 1 standard action
 +
  | range = Medium (100 ft. + 10 ft./level)
 +
  | target = Up to five creatures, no two of which can be more than 15 ft. apart
 +
  | dur = Instantaneous
 +
  | save = None
 +
  | SR = Yes
 +
}}</pre>
 +
 
 +
{{Spell
 +
  | name = Magic Missile
 +
  | school = Evocation
 +
  | desc = Force
 +
  | class1 = Sorcerer
 +
  | class1level = 1
 +
  | class2 = Wizard
 +
  | class2level = 1
 +
  | comp = V, S
 +
  | time = 1 standard action
 +
  | range = Medium (100 ft. + 10 ft./level)
 +
  | target = Up to five creatures, no two of which can be more than 15 ft. apart
 +
  | dur = Instantaneous
 +
  | save = None
 +
  | SR = Yes
 +
}}
 +
 
 +
== See Also ==
 +
 
 +
* {{[[:Template:Power|Power]]}}
 +
* {{[[:Template:Maneuver|Maneuver]]}}
 +
 
 +
[[Category:Wiki Templates]]
 +
</noinclude>

Current revision as of 05:10, 11 October 2010

Personal tools
Google AdSense