FANDOM


Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Effects/doc to edit this documentation. (How does this work?)

Purpose

This Template:Effects is a layer between the wiki markup parser and the Lua script Module:Effects. It just delegates all calls to the module which works with the Effect data found in Module:Effects/data.

For maintenance purposes it is recommended to use this template and not to invoke the Module function directly. If a function changes or the "interface" changes you can yu can add a category like [[Category:Effects script usage]] to the template to find all pages that use the Lua script.

Note: Wrong ids and arguments or missing arguments can result in a script error. You have to look at the source of the generated HTML page. There you will find hints what went wrong.

The Module:Effects/test offers the function checkEffects to check the data for typos, missing attributes, etc. You can call it from the debug console (edit the module) or invoke it on any page by adding

{{#invoke:Effects/test|checkEffects}}

Usage

(This can be subject to change. This documentation should be updated then as well.)

The Module:Effects offers 2 functions:

  • get|<effect id>|<attribute>
  • ids|<filter>

Function get (Retrieving the data)

1st agument for the template is the function name: get

2nd argument (=1st argument/parameter for the function) is the effect id as defined in Module:Effects/data.
Note: all ids are written in lower case, do not add spaces! The id is the adjective form, not the verb form (daze -> dazed, frostbite -> frostbitten, frozen, etc) as displayed in-game.

3rd argument is an attribute (key) of the effect (table). Available attributes are:

  • name (of the effect),
  • type (this is one of the following keywords: buff, debuff or effect),
  • image (the name of the image, e.g. Dazed Icon.png),
  • description (of the effect).

Note: A special attribute is heroes. This returns a list of heroes that have the given effect in one of their abilities or traits.

Example

Example 1
get the image name of an effect you can write

{{Effects|get|dazed|image}}

returns the image name of the Dazed effect:

Dazed Icon.png

Use it with the File wiki tag to show the image:

[[File:{{Effects|get|dazed|image}}|50px]] '''{{Effects|get|dazed|name}}'''<br>
{{Effects|get|dazed|description}} 

displays:


Dazed Icon Dazed
Target has an increased chance to Miss when attacking.


Example 2
to get all heroes that can Daze you write

{{Effects|get|dazed|heroes}}

and it returns:

Script error


Function ids (List of the ids)

Use the template with ids for the 2nd argument and a type keyword (buff, debuff or effect) as 3rd argument to filter the ids by the given type:

{{Effects|ids|<type>}}

Note/known bug omitting the filter does not work proper with the template. Call the Module:Effects ids function directly by

{{#invoke:Effects|ids}}

to get all ids unfiltered.

Example

to get all effect ids of type buff use

{{Effects|ids|buff}}

This returns the list of all ids:

accelerated/aegis shield/agile/atk boosted/aversion/bestial rage/blending in/bone armor/burning skin/burning touch/chilling skin/chilling touch/cleansing regeneration/cloned/command/crit boosted/damage reflection/damage up/def boosted/devils iou/disease skin/diseased touch/divine intervention/electric skin/empowered/enlightenment/enraged/ethereal spirit/evading/field dressing/foresight/freezing skin/frostbite taunt/gift of flight/graniteform/growth/guaranteed crit/haste/health surge/hive mind/ice block/impervious/invincibility/invulnerable/magic prism/momentum/oak form/overclocked/party fever/perpetual flame/phoenix feather/phoenix finale/playing tricks/poison skin/poison touch/possessed/primed/pumped/pyromaniac/rage/reflective plate/regeneration/shocking touch/shrouded/skl boosted/snow day/soul ledger/soul tether/spirit linked/stealth/storm power/stout team/swamped/taunt/unbreakable heart/various buffs/voodoo chant/weak spot

(Documentation ends here)
Community content is available under CC-BY-SA unless otherwise noted.