Difference between revisions of "Template talk:TypeDefVal"
From Paragon Wiki Archive
m |
|||
Line 1: | Line 1: | ||
+ | == Logic == | ||
Trying to make sense of this template: -[[User:Konoko|Konoko]] | Trying to make sense of this template: -[[User:Konoko|Konoko]] | ||
<pre> | <pre> | ||
Line 5: | Line 6: | ||
{{#ifeq:{{{1|0|}}} | 0 | {{#ifeq:{{{1|0|}}} | 0 | ||
|<!-- True: do nothing, display nothing --> | |<!-- True: do nothing, display nothing --> | ||
− | |<!-- False: Set color of | + | |<!-- False: Set color of text to follow -->{{color|#333333;font-weight: bold|S<!-- |
− | +++ After letter for type of defense, test | + | +++ After letter for type of defense, test for negative value parameter --> |
{{#if: {{{s|}}} | {{#if: {{{s|}}} | ||
|<!-- True, parameter exists: set color for debuff -->{{color|red;font-weight: normal|-'''{{{1|0}}}'''}} | |<!-- True, parameter exists: set color for debuff -->{{color|red;font-weight: normal|-'''{{{1|0}}}'''}} | ||
Line 19: | Line 20: | ||
|{{color|red;font-weight: normal|-'''{{{2|0}}}'''}} | |{{color|red;font-weight: normal|-'''{{{2|0}}}'''}} | ||
|{{{2|0}}} | |{{{2|0}}} | ||
− | |||
}} | }} | ||
+ | }} | ||
}} | }} | ||
− | + | <!-- snip --> | |
+ | ''')''' | ||
</pre><noinclude> | </pre><noinclude> | ||
Revision as of 23:47, 6 January 2009
Logic
Trying to make sense of this template: -Konoko
Def'''(''' <!-- Test if parameter is zero --> {{#ifeq:{{{1|0|}}} | 0 |<!-- True: do nothing, display nothing --> |<!-- False: Set color of text to follow -->{{color|#333333;font-weight: bold|S<!-- +++ After letter for type of defense, test for negative value parameter --> {{#if: {{{s|}}} |<!-- True, parameter exists: set color for debuff -->{{color|red;font-weight: normal|-'''{{{1|0}}}'''}} |<!-- False, parameter does not exist, do not change color, only display number entered -->{{{1|0<!-- zero is defined here... why?-->}}} }} }} }} {{#ifeq:{{{2|0|}}} | 0 | |{{color|#999999;font-weight: bold|L {{#if: {{{l|}}} |{{color|red;font-weight: normal|-'''{{{2|0}}}'''}} |{{{2|0}}} }} }} }} <!-- snip --> ''')'''
Defense Template
This template is meant to show the defense values of a power in a easily visible format.
Use
{{DefVal|10|10|0|0|20|e=-}}
Template:DefVal
- List the defenses in order: Smashing, Lethal, Fire, Cold, Energy, Negative Energy, Psychic.
- Trailing 0s are unneccessary.
- e=- denotes the energy defense as a debuff. The first letter of the defense type is used.