Difference between revisions of "Template:E"
From Tales of Maj'Eyal
(adds saving throws) |
(adds 'Effects on Hit') |
||
Line 1: | Line 1: | ||
+ | <!-- Needs a way to reuse the switch type. Currently it's just manual copy-and-paste. --> | ||
<includeonly><onlyinclude>{{#switch: {{{1}}} | <includeonly><onlyinclude>{{#switch: {{{1}}} | ||
− | | | + | | resists = Changes resistances: + ({{{4}}}-{{#expr:{{{4}}}+{{{3}}}}})% {{#switch: {{{2}}} |
+ | | all = all | ||
+ | | acid = {{acid}} | ||
+ | | arcane = {{arcane}} | ||
+ | | blight = {{blight}} | ||
+ | | cold = {{cold}} | ||
+ | | darkness = {{darkness}} | ||
+ | | fire = {{fire}} | ||
+ | | light = {{light}} | ||
+ | | lightning = {{lightning}} | ||
+ | | mind = {{mind}} | ||
+ | | nature = {{nature}} | ||
+ | | physical = {{physical}} | ||
+ | | temporal = {{temporal}} | ||
+ | | ?? }} | ||
+ | | on_melee_hit = Damage when hit (Melee): + ({{{4}}}-{{#expr:{{{4}}}+{{{3}}}}}) {{#switch: {{{2}}} | ||
| all = all | | all = all | ||
| acid = {{acid}} | | acid = {{acid}} | ||
Line 23: | Line 39: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
− | This template is designed to | + | This template is designed to match item effects descriptions and their lua code, to ensure consistency, intuitive conversion, and keep the wording in line with their in-game description.{{source|game/modules/mod/class/Object.lua}} |
− | == Damage | + | == Damage types: increases, resistances and so forth == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Supported damage types: | Supported damage types: | ||
* all | * all | ||
Line 52: | Line 58: | ||
* temporal | * temporal | ||
− | == | + | === Resistances === |
− | === | + | The lua code specifying an ego's effect on fire resistance is |
+ | <pre>resists={[DamageType.FIRE] = resolvers.mbonus_material(15, 15)}</pre> | ||
− | The | + | Convert it with this template as |
− | <pre> | + | <pre>{{e|resists|fire|15|15}}</pre> |
+ | |||
+ | To produces the following text: {{e|resists|fire|15|15}} | ||
+ | |||
+ | === Effects on Hit === | ||
+ | The lua code specifying an ego's effect when the wearer is hit is | ||
+ | <pre>on_melee_hit={[DamageType.PHYSICAL] = resolvers.mbonus_material(10, 10)}</pre> | ||
Convert it with this template as | Convert it with this template as | ||
− | <pre>{{e| | + | <pre>{{e|on_melee_hit|physical|10|10}}</pre> |
− | To produces the following text: | + | To produces the following text: {{e|on_melee_hit|physical|10|10}} |
− | + | == Stats beginning with combat_ in LUA code == | |
− | + | ||
Supported combat stats: | Supported combat stats: | ||
* physresist (physical save) | * physresist (physical save) | ||
* spellresist (spell save) | * spellresist (spell save) | ||
* mentalresist (mental save) | * mentalresist (mental save) | ||
+ | |||
+ | === Saving throws === | ||
+ | |||
+ | The lua code for an ego's effect on physical save is | ||
+ | <pre>combat_physresist = resolvers.mbonus_material(15, 10)</pre> | ||
+ | |||
+ | Convert it with this template as | ||
+ | <pre>{{e|combat|physresist|15|10}}</pre> | ||
+ | |||
+ | To produces the following text: {{e|combat|physresist|15|10}} |
Revision as of 12:16, 14 November 2016
This template is designed to match item effects descriptions and their lua code, to ensure consistency, intuitive conversion, and keep the wording in line with their in-game description.
Source:game/modules/mod/class/Object.lua
Contents
Damage types: increases, resistances and so forth
Supported damage types:
- all
- acid
- arcane
- blight
- cold
- darkness
- fire
- light
- lightning
- mind
- nature
- physical
- temporal
Resistances
The lua code specifying an ego's effect on fire resistance is
resists={[DamageType.FIRE] = resolvers.mbonus_material(15, 15)}
Convert it with this template as
{{e|resists|fire|15|15}}
To produces the following text: Changes resistances: + (15-30)% Fire
Effects on Hit
The lua code specifying an ego's effect when the wearer is hit is
on_melee_hit={[DamageType.PHYSICAL] = resolvers.mbonus_material(10, 10)}
Convert it with this template as
{{e|on_melee_hit|physical|10|10}}
To produces the following text: Damage when hit (Melee): + (10-20) Physical
Stats beginning with combat_ in LUA code
Supported combat stats:
- physresist (physical save)
- spellresist (spell save)
- mentalresist (mental save)
Saving throws
The lua code for an ego's effect on physical save is
combat_physresist = resolvers.mbonus_material(15, 10)
Convert it with this template as
{{e|combat|physresist|15|10}}
To produces the following text: ??