Template:Cl

From Tales of Maj'Eyal
Revision as of 08:23, 16 August 2014 by Vyn (Talk | contribs) (Basic Example: Fixed example)

Jump to: navigation, search


Introduction

This template is used to denote talent parameters that scale by the combatLimit function.

The template accepts six parameters, corresponding to those in the LUA code: x, limit, y_low, x_low, y_high, x_high. It is assumed that these parameters will be fed to the template in the order specified above.

All six parameters are required.

Basic Example

The LUA code for the chance to activate Arcane Combat is

self:combatLimit(self:getTalentLevel(t) * (1 + self:getCun(9, true)), 100, 20, 0, 70, 50)

which requires some interpretation of the first parameter to produce the following wiki markup

{{CL|( (1 + 0.09 * Cun) * Talent Level )|100%|20|0|70%|50}}

and will in turn produce the following text

20–70%cL:100% as ( (1 + 0.09 * Cun) * Talent Level ) varies from 0–50

Note that any percentage signs must be inserted manually with the parameters.

Be aware that since this template produces a rather long string of text, you may have to rewrite other parts of a talent's description in order to make the whole thing legible.