Template:Spell: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
mNo edit summary
(numerous upgrades on incomplete handling, catagorization and multiple guild spells)
Line 1: Line 1:
<includeonly><!--Adds to the Articles That Are Incomplete category if any non-optional information is missing, unless the spell is planned -->
<includeonly><!--Adds to the Articles That Are Incomplete category if any non-optional information is missing, unless the spell is planned -->{{#if:{{#ask:[[{{FULLPAGENAME}}]] [[missing::~Infobox*]]}}|{{Incomplete|Some information is missing from the spell infobox below.|}}</includeonly>
{{#if:
{{#switch: {{lc:{{{planned|}}}}} | yes |y= 1 |
}}| {{PlannedSpell|{{{name|This spell}}}}} |
{{#if:
{{#if:{{{name|}}}|
{{#if:{{{minprep|}}}|
{{#if:{{{castcap|}}}|
{{#if:{{{validtarget|}}}|
<!-- for "guild" field test only: return non-empty if spellbook = Analogous Patterns; else continue tests-->
{{#ifeq:{{lc:{{{guild}}}}}|bard|
{{#if:{{{enchantebook|}}}|1
}}|
{{#ifeq: {{{spellbook|}}} | Analogous Patterns | 1 |
{{#if:{{{guild|}}}| 1
}}
}}
}}
}}
}}
}}
}}
||{{Incomplete|Some information is missing from the spell infobox below.}}
}}
}}
</includeonly>

{| style="float:right"
{| style="float:right"
|{{GuildThumb |{{{guild|}}} }}
|{{#arraymaptemplate:{{{guild}}} |Template:GuildThumb|,|}}
|}
|}
{| class=wikitable width=60%
{| class=wikitable width=60%
|-
|-
! width=20% style="background: #B9B59C;border-right: hidden;height: 35px"|
! width=20% style="background: #B9B59C;border-right: hidden;height: 35px"|
! align="center" style="background:#B9B59C;font-size:150%;border-right:hidden"|'''{{{name|Spell Infobox}}}'''
! align="center" style="background:#B9B59C;font-size:150%;border-right:hidden"|'''[[pretty name is::{{{name|{{PAGENAME}}}]] Infobox'''
! valign="middle" width=20% style="background:#B9B59C;border-left:hidden"| {{
! valign="middle" width=20% style="background:#B9B59C;border-left:hidden"| {{#switch: {{lc:{{{scroll|}}}}} | yes | y=[[Image:miniscroll.jpg | Scroll-only Spell]][[scroll-only spell::true| ]]|[[scroll-only spell::false| ]]}} {{#switch: {{lc:{{{target|}}}}} | yes | y=[[Image:minitarget.jpg|Targeted Magic Spell]][[targeted magic spell::true| ]]|[[targeted magic spell::false| ]]}} {{#switch: {{lc:{{{held|}}}}} | yes | y=[[Image:miniheld.jpg|Held Mana spell]][[held mana spell::true| ]]|held mana spell::false| }}
#switch: {{lc:{{{scroll|}}}}} |
yes | y=[[Image:miniscroll.jpg | Scroll-only Spell]][[scroll-only spell::true| ]]|
[[scroll-only spell::false| ]]}} {{
#switch: {{lc:{{{target|}}}}} |
yes | y=[[Image:minitarget.jpg|Targeted Magic Spell]][[targeted magic spell::true| ]]|
[[targeted magic spell::false| ]]}} {{
#switch: {{lc:{{{held|}}}}} |
yes | y=[[Image:miniheld.jpg|Held Mana spell]][[held mana spell::true| ]]|
held mana spell::false| }}
|-
|-
! style="text-align:left"|'''Abbreviation:'''
! style="text-align:left"|'''Abbreviation:'''
| colspan=2 {{#ifeq: {{{abbrev|}}} | none | | {{#if:{{{abbrev|}}} | style="font-size:125%"}}}} | {{#if:{{{abbrev|}}} | {{#ifeq: {{{abbrev}}} | none | None | '''{{uc:<tt>{{{abbrev|}}}</tt>}}'''}} | ''Unknown''}}
| colspan=2 {{#ifeq: {{{abbrev|}}} | none | | {{#if:{{{abbrev|}}} | style="font-size:125%"}}}} | {{#if:{{{abbrev|}}} | {{#ifeq: {{{abbrev}}} | none | None | '''{{uc:<tt>{{{abbrev|}}}</tt>}}'''}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on abbreviation|''Unknown'']]</includeonly>}}}}
|-
|-
! style="text-align:left"|'''Prerequisites:'''
! style="text-align:left"|'''Prerequisites:'''
| colspan=2|{{#if:{{{prereqs|}}} | {{{prereqs}}} | ''Unknown''}}
| colspan=2|{{#if:{{{prereqs|}}} | {{{prereqs}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on prerequisits|''Unknown'']]</includeonly>}}}}
|-
|-
! style="text-align:left"|'''Minimum Prep:'''
! style="text-align:left"|'''Minimum Prep:'''
| colspan=2|{{#if:{{{minprep|}}} | [[minimum prep is::{{{minprep}}}]] | ''Unknown''}}
| colspan=2|{{#if:{{{minprep|}}} | [[minimum prep is::{{{minprep}}}]] | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on minimum prepare|''Unknown'']]</includeonly>}}}}
|-
|-
! style="text-align:left"|'''Casting Cap:'''
! style="text-align:left"|'''Casting Cap:'''
| colspan=2|{{#if:{{{castcap|}}} | {{#ifeq: {{{castcap}}} | - | Unlimited | [[casting cap is::{{{castcap}}}]] }} | ''Unknown''}}
| colspan=2|{{#if:{{{castcap|}}} | {{#ifeq: {{{castcap}}} | - | Unlimited | [[casting cap is::{{{castcap}}}]] }} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on casting cap|''Unknown'']]</includeonly>}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Performance Type:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Performance Type:'''
{{!}}colspan=2{{!}}{{#if: {{{performtype|}}} | {{{performtype|}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on performance type|''Unknown'']]</includeonly>}}}}}}
{{!}}colspan=2{{!}}{{{performtype|}}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard||! style="text-align:left"{{!}}'''Valid Spell Target:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard||! style="text-align:left"{{!}}'''Valid Spell Target:'''
{{!}}colspan=2{{!}}{{#if:{{{validtarget|}}} | {{{validtarget}}} | ''Unknown''}}}}
{{!}}colspan=2{{!}}{{#if:{{{validtarget|}}} | {{{validtarget}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on valid target|''Unknown'']]</includeonly>}}}}}}
|-
|-
! style="text-align:left"|'''Description:'''
! style="text-align:left"|'''Description:'''
| colspan=2|{{#if:{{{desc|}}} | {{{desc}}} | ''Unknown''}}
| colspan=2|{{#if:{{{desc|}}} | {{{desc}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on description|''Unknown'']]</includeonly>}}}}
|-
|-
! style="text-align:left"|'''Example Messaging:'''
! style="text-align:left"|'''Example Messaging:'''
| colspan=2|{{#if:{{{messaging|}}} | {{{messaging}}} | ''Unknown''}}
| colspan=2|{{#if:{{{messaging|}}} | {{{messaging}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on messaging|''Unknown'']]</includeonly>}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Enchante Structure:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Enchante Structure:'''
{{!}}colspan=2{{!}}{{#if:{{{struct|}}} | {{{struct}}} | ''Unknown''}}}}
{{!}}colspan=2{{!}}{{#if:{{{struct|}}} | {{{struct}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on enchante structure|''Unknown'']]</includeonly>}}}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Prep Time:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Prep Time:'''
{{!}}colspan=2{{!}}{{#if:{{{prep|}}} | {{{prep}}} | ''Unknown''}}}}
{{!}}colspan=2{{!}}{{#if:{{{prep|}}} | {{{prep}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on prep time|''Unknown'']]</includeonly>}}}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Pulse Timing:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Pulse Timing:'''
{{!}}colspan=2{{!}}{{#if:{{{pulse|}}} | {{{pulse}}} | ''Unknown''}}}}
{{!}}colspan=2{{!}}{{#if:{{{pulse|}}} | {{{pulse}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on pulse timing|''Unknown'']]</includeonly>}}}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Enchante Duration:'''
{{#ifeq:{{lc:{{{guild}}}}}|bard|! style="text-align:left"{{!}}'''Enchante Duration:'''
{{!}}colspan=2{{!}}{{#if:{{{duration|}}} | {{{duration}}} | ''Unknown''}}}}
{{!}}colspan=2{{!}}{{#if:{{{duration|}}} | {{{duration}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= ''Unknown'' |<includeonly>[[missing::Infobox entry on enchante duration|''Unknown'']]</includeonly>}}}}}}
|}
|}
<includeonly>
<includeonly>
<!-- Categories -->
<!-- Categories -->
[[page type is::spell| ]]{{#if:{{{guild|}}}|{{#switch:{{lc:{{{guild}}}}}|none=|any=[[guild association is::bard| ]][[guild association is::cleric| ]][[guild association is::empath| ]][[guild association is::moon mage| ]][[guild association is::paladin| ]][[guild association is::ranger| ]][[guild association is::warrior mage| ]]|[[guild association is::{{lc:{{{guild}}}}}| ]]}}}}{{#ifeq:{{lc:{{{guild}}}}}|bard|[[has default form::Form:Enchante| ]]}}
[[page type is::spell| ]]{{#if:{{{guild|}}}|{{#switch:{{lc:{{{guild}}}}}|none=|any=[[guild association is::bard| ]][[guild association is::cleric| ]][[guild association is::empath| ]][[guild association is::moon mage| ]][[guild association is::paladin| ]][[guild association is::ranger| ]][[guild association is::warrior mage| ]]|{{#arraymap:{{lc:{{{guild}}}}}|,|x|[[guild association is::x| ]]}}}}{{#ifeq:{{lc:{{{guild}}}}}|bard|[[has default form::Form:Enchante| ]]}}
<!--do not add categories if it is a planned spell -->
<!--do not add categories if it is a planned spell -->
{{#ifeq:{{lc:{{{guild}}}}}|bard|[[Category:Bard Enchantes|{{PAGENAME}}]]|[[Category:Spells|{{PAGENAME}}]]
{{#ifeq:{{lc:{{{guild}}}}}|bard|{{cat|Bard Enchantes}}|{{cat|Spells}}
}}
}}
{{#switch: {{lc:{{{planned|}}}}}
{{#switch: {{lc:{{{planned|}}}}}
Line 81: Line 64:
{{#if: {{{guild|}}} |
{{#if: {{{guild|}}} |
{{#switch:{{lc:{{{guild}}}}}
{{#switch:{{lc:{{{guild}}}}}
|bard=[[Category:Planned Bard Enchantes|{{PAGENAME}}]]
|bard={{Cat|Planned Bard Enchantes}}
|none=
|none=
|[[Category:Planned {{{guild|}}} Spells|{{PAGENAME}}]]
|{{cat|Planned {{{guild|}}} Spells}}
}}
}}
}}
}}
Line 89: Line 72:
{{#switch:{{lc:{{{guild}}}}}
{{#switch:{{lc:{{{guild}}}}}
|none=
|none=
|bard=[[Category:Bard Enchantes|{{PAGENAME}}]]
|bard={{cat|Bard Enchantes}}
|any=
|any=
|[[Category:{{{guild}}} Spells|{{PAGENAME}}]]
|{{cat|{{{guild}}} Spells}}
}}
}}
}}
}}
Line 98: Line 81:
| protection=
| protection=
{{#switch: {{lc:{{{guild|}}}}}
{{#switch: {{lc:{{{guild|}}}}}
| empath= [[Category:Protection Spellbook (Empath)|{{PAGENAME}}]]
| empath= {{Cat|Protection Spellbook (Empath)}}
| ranger= [[Category:Protection Spellbook (Ranger)|{{PAGENAME}}]]
| ranger= {{cat|Protection Spellbook (Ranger)}}
}}
}}
| [[Category:{{{spellbook}}} Spellbook]]
| {{cat|{{{spellbook}}} Spellbook}}
}}
}}
}}
}}
{{#if: {{{enchantebook|}}}
{{#if: {{{enchantebook|}}}
| [[Category:{{{enchantebook}}}]]
| {{cat|{{{enchantebook}}}}}
}}
{{#if: {{{spelltype|}}} |[[Category:{{{spelltype}}} Spells|{{PAGENAME}}]][[spell type is::{{{spelltype}}}| ]]
}}
{{#if: {{{spelltype2|}}} |[[Category:{{{spelltype2}}} Spells|{{PAGENAME}}]][[spell type is::{{{spelltype2}}}| ]]
}}
{{#if: {{{spelltype3|}}} |[[Category:{{{spelltype3}}} Spells|{{PAGENAME}}]][[spell type is::{{{spelltype3}}}| ]]
}}
}}
{{#arraymap:{{lc:{{#if: {{{spelltype|}}} | {{{spelltype}}} | {{#switch: {{lc:{{{planned|}}}}} | yes |y= |<includeonly>[[missing::Infobox entry on spell type| ]]</includeonly>}}}}{{#if: {{{spelltype2|}}} | ,{{{spelltype2}}}}}{{#if: {{{spelltype3|}}} | ,{{{spelltype3}}}}}}} | , | x | [[Category:x Spells]][[spell type is::x| ]]}}
{{#switch: {{lc:{{{held}}}}} | yes | y=[[Category:Held Mana Spells|{{PAGENAME}}]]
{{#switch: {{lc:{{{held}}}}} | yes | y={{cat|Held Mana Spells}}
}}
}}
{{#switch: {{lc:{{{target}}}}} | yes | y=[[Category:Targeted Spells|{{PAGENAME}}]]
{{#switch: {{lc:{{{target}}}}} | yes | y={{cat|Targeted Spells}}
}}
}}
{{#switch: {{lc:{{{scroll}}}}} | yes | y=[[Category:Scroll Spells|{{PAGENAME}}]]
{{#switch: {{lc:{{{scroll}}}}} | yes | y={{cat|Scroll Spells}}
}}
}}
{{#switch: {{lc:{{{tier}}}}} | first | 1=[[Category:First Tier Spells|{{PAGENAME}}]][[spell tier is::1| ]] | second | 2=[[Category:Second Tier Spells|{{PAGENAME}}]][[spell tier is::2| ]] | third | 3=[[Category:Third Tier Spells|{{PAGENAME}}]][[spell tier is::3| ]] | fourth |4=[[Category:Fourth Tier Spells|{{PAGENAME}}]][[spell tier is::4| ]] | fifth | 5=[[Category:Fifth Tier Spells|{{PAGENAME}}]][[spell tier is::5| ]]
{{#switch: {{lc:{{{tier}}}}} | first | 1={{cat|First Tier Spells}}[[spell tier is::1| ]] | second | 2={{Cat|Second Tier Spells}}[[spell tier is::2| ]] | third | 3={{cat|Third Tier Spells}}[[spell tier is::3| ]] | fourth |4={{cat|Fourth Tier Spells}}[[spell tier is::4| ]] | fifth | 5={{cat|Fifth Tier Spells}}[[spell tier is::5| ]]
}}
}}
}}
}}

Revision as of 16:20, 10 February 2009


Spell} Infobox , | x |"x" is not in the list (area of effect, cyclic, defense ignoring, shield ignoring, armor ignoring, armor piercing, glyph, healing, heavy offensive, instinct, ...) of allowed values for the "Ability type is" property.}}



}}

</includeonly> This template provides an infobox for spell articles. Notes and commentary should be added on the individual spell articles via normal article editing.

Usage

When making a new spell article, copy the text below into the edit window and fill in the parameter values as appropriate.

{{spell
|name=
|abbrev= 
|prereqs= <!--manually add links to other spells, if needed-->
|minprep=
|castcap= <!--if unlimited, put "-" -->
|validtarget= ignore for enchantes
|desc=
|messaging=
|guild=
|spellbook= ignore for enchantes
|spelltype=
|struct= for enchantes
|prep= for enchantes
|pulse= for enchantes
|duration= for enchantes
|performtype= for enchantes <!--Chanted, sung, instrument type--> 
|enchantebook=for enchantes
|target= yes/no
|held= yes/no
|scroll= yes/no
|planned= yes/no
|tier=first/second/third/fourth/fifth
}}