Difference between revisions of "Template:Attributes"

From Medivia Online Wiki
Tag: Reverted
Tag: Reverted
Line 151: Line 151:
<!-- ========================================================= -->
<!-- ========================================================= -->


<!-- Tooltip dictionary -->
<!-- Attribute tooltip dictionary -->
{{#define:attr-tooltip|
{{#define:attr-tooltip|
{{#switch: {{{1}}}
{{#switch: {{{1}}}
|Intelligence = Increases intelligence (mages and druids only).
|Intellect = Increases total mana point pool.
|Presence of Mind = Increases your mana regeneration.
|Mana Absorb = 10% chance to absorb magical damage and convert it into mana.
  |Superior = Increases the armor of an item.
  |Superior = Increases the armor of an item.
  |Fortitude = Increases your health regeneration by X amount per X regen ticks (regen tick length depends on vocation/promotion).
  |Fortitude = Increases your health regeneration.
  |Vitality = Increases total health point pool (knights/archers/mages).
  |Vitality = Increases total health points.
  |Strength = Increases strength (knights only).
  |Strength = Increases strength (knights only).
|Intelligence = Increases intelligence (mages and druids only).
|Intellect = Increases total mana point pool.
|Presence of Mind = Increases mana regeneration per 16 regen turns.
|Mana Absorb = 10% chance to absorb damage and convert it to mana.
  |#default =
  |#default =
}}
}}
}}
}}


<!-- Scanner for attributes inside text -->
<!-- Attribute detection + link builder (no #pos, no expr!) -->
{{#define:linkify|
{{#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 -->
<!-- Superior -->
{{#ifexpr: {{#pos: {{{1}}} | Superior }} > -1 |
{{#ifeq:{{#replace:{{{1}}}|Superior|}}|{{{1}}}| |+ [[Attributes#Superior|{{#tip-text: Superior| {{#invoke:var|attr-tooltip|Superior}} }}]] }}
  [[Attributes#Superior|{{#tip-text: Superior| {{#invoke:var|attr-tooltip|Superior}} }}]]
 
}}
<!-- Fortitude -->
<!-- Fortitude -->
{{#ifexpr: {{#pos: {{{1}}} | Fortitude }} > -1 |
{{#ifeq:{{#replace:{{{1}}}|Fortitude|}}|{{{1}}}| |+ [[Attributes#Fortitude|{{#tip-text: Fortitude| {{#invoke:var|attr-tooltip|Fortitude}} }}]] }}
+ [[Attributes#Fortitude|{{#tip-text: Fortitude| {{#invoke:var|attr-tooltip|Fortitude}} }}]]
 
}}
<!-- Vitality -->
<!-- Vitality -->
{{#ifexpr: {{#pos: {{{1}}} | Vitality }} > -1 |
{{#ifeq:{{#replace:{{{1}}}|Vitality|}}|{{{1}}}| |+ [[Attributes#Vitality|{{#tip-text: Vitality| {{#invoke:var|attr-tooltip|Vitality}} }}]] }}
+ [[Attributes#Vitality|{{#tip-text: Vitality| {{#invoke:var|attr-tooltip|Vitality}} }}]]
 
}}
<!-- Strength -->
<!-- Strength -->
{{#ifexpr: {{#pos: {{{1}}} | Strength }} > -1 |
{{#ifeq:{{#replace:{{{1}}}|Strength|}}|{{{1}}}| |+ [[Attributes#Strength|{{#tip-text: Strength| {{#invoke:var|attr-tooltip|Strength}} }}]] }}
+ [[Attributes#Strength|{{#tip-text: Strength| {{#invoke:var|attr-tooltip|Strength}} }}]]
}}
<!-- Intelligence -->
{{#ifexpr: {{#pos: {{{1}}} | Intelligence }} > -1 |
+ [[Attributes#Intelligence|{{#tip-text: Intelligence| {{#invoke:var|attr-tooltip|Intelligence}} }}]]
}}
<!-- Intellect -->
{{#ifexpr: {{#pos: {{{1}}} | Intellect }} > -1 |
+ [[Attributes#Intellect|{{#tip-text: Intellect| {{#invoke:var|attr-tooltip|Intellect}} }}]]
}}
<!-- Presence of Mind -->
{{#ifexpr: {{#pos: {{{1}}} | Presence of Mind }} > -1 |
+ [[Attributes#Presence_of_Mind|{{#tip-text: Presence of Mind| {{#invoke:var|attr-tooltip|Presence of Mind}} }}]]
}}
<!-- Mana Absorb -->
{{#ifexpr: {{#pos: {{{1}}} | Mana Absorb }} > -1 |
+ [[Attributes#Mana_Absorb|{{#tip-text: Mana Absorb| {{#invoke:var|attr-tooltip|Mana Absorb}} }}]]
}}
}}
}}


'''LINKED:'''
{{#if: {{{name_1|}}} | {{#invoke:var|linkify|{{{name_1}}}}} }}
{{#if: {{{name_1|}}} | {{#invoke:var|linkify|{{{name_1}}}}} }}
{{#if: {{{name_2|}}} | {{#invoke:var|linkify|{{{name_2}}}}} }}
{{#if: {{{name_2|}}} | {{#invoke:var|linkify|{{{name_2}}}}} }}

Revision as of 21:56, 22 November 2025


{{#define:attr-tooltip|

}}

{{#define:linkify|








}}

LINKED: