|
|
| Line 148: |
Line 148: |
|
| |
|
| <!-- ========================================================= --> | | <!-- ========================================================= --> |
| <!-- === AUTOMATIC TOOLTIP LINK GENERATION STARTS HERE ====== --> | | <!-- === AUTOMATIC TOOLTIP LINK GENERATION (using Template:Attribute) --> |
| <!-- ========================================================= --> | | <!-- ========================================================= --> |
|
| |
|
| <!-- Attribute tooltip dictionary -->
| | {{#if:{{{name_1|}}} | {{Attribute|name={{{name_1}}}}} }} |
| {{#define:attr-tooltip|
| | {{#if:{{{name_2|}}} | {{Attribute|name={{{name_2}}}}} }} |
| {{#switch: {{{1}}}
| | {{#if:{{{name_3|}}} | {{Attribute|name={{{name_3}}}}} }} |
| |Intelligence = Increases intelligence (mages and druids only).
| | {{#if:{{{name_4|}}} | {{Attribute|name={{{name_4}}}}} }} |
| |Intellect = Increases total mana point pool.
| | {{#if:{{{name_5|}}} | {{Attribute|name={{{name_5}}}}} }} |
| |Presence of Mind = Increases your mana regeneration.
| | {{#if:{{{name_6|}}} | {{Attribute|name={{{name_6}}}}} }} |
| |Mana Absorb = 10% chance to absorb magical damage and convert it into mana.
| | {{#if:{{{name_7|}}} | {{Attribute|name={{{name_7}}}}} }} |
| |Superior = Increases the armor of an item.
| |
| |Fortitude = Increases your health regeneration.
| |
| |Vitality = Increases total health points.
| |
| |Strength = Increases strength (knights only).
| |
| |#default =
| |
| }}
| |
| }}
| |
| | |
| <!-- Attribute detection + link builder (no #pos, no expr!) -->
| |
| {{#define:linkify|
| |
| <!-- Intelligence -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Intelligence|}}|{{{1}}}| |[[Attributes#Intelligence|{{#tip-text: Intelligence| {{#invoke:var|attr-tooltip|Intelligence}} }}]] }}
| |
| | |
| <!-- Intellect -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Intellect|}}|{{{1}}}| |+ [[Attributes#Intellect|{{#tip-text: Intellect| {{#invoke:var|attr-tooltip|Intellect}} }}]] }}
| |
| | |
| <!-- Presence of Mind -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Presence of Mind|}}|{{{1}}}| |+ [[Attributes#Presence_of_Mind|{{#tip-text: Presence of Mind| {{#invoke:var|attr-tooltip|Presence of Mind}} }}]] }}
| |
| | |
| <!-- Mana Absorb -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Mana Absorb|}}|{{{1}}}| |+ [[Attributes#Mana_Absorb|{{#tip-text: Mana Absorb| {{#invoke:var|attr-tooltip|Mana Absorb}} }}]] }}
| |
| | |
| <!-- Superior -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Superior|}}|{{{1}}}| |+ [[Attributes#Superior|{{#tip-text: Superior| {{#invoke:var|attr-tooltip|Superior}} }}]] }}
| |
| | |
| <!-- Fortitude -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Fortitude|}}|{{{1}}}| |+ [[Attributes#Fortitude|{{#tip-text: Fortitude| {{#invoke:var|attr-tooltip|Fortitude}} }}]] }}
| |
| | |
| <!-- Vitality -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Vitality|}}|{{{1}}}| |+ [[Attributes#Vitality|{{#tip-text: Vitality| {{#invoke:var|attr-tooltip|Vitality}} }}]] }}
| |
| | |
| <!-- Strength -->
| |
| {{#ifeq:{{#replace:{{{1}}}|Strength|}}|{{{1}}}| |+ [[Attributes#Strength|{{#tip-text: Strength| {{#invoke:var|attr-tooltip|Strength}} }}]] }}
| |
| }}
| |
| | |
| '''LINKED:'''
| |
| {{#if: {{{name_1|}}} | {{#invoke:var|linkify|{{{name_1}}}}} }} | |
| {{#if: {{{name_2|}}} | {{#invoke:var|linkify|{{{name_2}}}}} }} | |
| {{#if: {{{name_3|}}} | {{#invoke:var|linkify|{{{name_3}}}}} }} | |
| {{#if: {{{name_4|}}} | {{#invoke:var|linkify|{{{name_4}}}}} }} | |
| {{#if: {{{name_5|}}} | {{#invoke:var|linkify|{{{name_5}}}}} }} | |
| {{#if: {{{name_6|}}} | {{#invoke:var|linkify|{{{name_6}}}}} }} | |
| {{#if: {{{name_7|}}} | {{#invoke:var|linkify|{{{name_7}}}}} }} | |