Template:Resistance: Difference between revisions
Jump to navigation
Jump to search
(Cleanup & support "immune to non-magical and resistant to magical".) |
(Change upper/lowercase usage.) |
||
Line 1: | Line 1: | ||
<includeonly>{{trim| | <includeonly>{{trim| | ||
{{#lvardef: element | {{ucfirst: {{lc: {{{1}}} }} }} }} | |||
{{#lvardef: wording | {{#switch: {{lc: {{{2|}}} }} | {{#lvardef: wording | {{#switch: {{lc: {{{2|}}} }} | ||
| vuln | | vuln | ||
Line 8: | Line 11: | ||
| resist nm | | resist nm | ||
| resistant nm | | resistant nm | ||
| resistance nm = Resistant to | | resistance nm = Resistant to Non-Magical | ||
| magical | | magical | ||
| resist m | | resist m | ||
| resistant m | | resistant m | ||
| resistance m = Resistant to | | resistance m = Resistant to Magical | ||
| double | | double | ||
| full | | full | ||
Line 24: | Line 27: | ||
| immune = Immune to all | | immune = Immune to all | ||
| immunity nm | | immunity nm | ||
| immune nm = Immune to | | immune nm = Immune to Non-Magical | ||
| immunity nm plus | | immunity nm plus | ||
| immune nm plus = Immune to | | immune nm plus = Immune to Non-Magical and Resistant to Magical | ||
}} {{ | }} {{#lvar:element}} }} | ||
{{#lvardef: filename | {{ | |||
{{#lvardef: filename | {{#lvar:element}} {{#switch: {{lc: {{{2|}}} }} | |||
| vuln | | vuln | ||
| vulnerable | | vulnerable | ||
Line 57: | Line 61: | ||
| immunity nm plus = Immunity NM Plus | | immunity nm plus = Immunity NM Plus | ||
}}.png }} | }}.png }} | ||
}}[[File:{{#lvar:filename}}|link=|{{{3|28px}}}|{{#lvar:wording}}]]{{#if:{{{nocat|}}}||{{Main only|[[Category:{{#lvar:wording}}]]}}}}</includeonly><noinclude>[[Category:Templates]] | }}[[File:{{#lvar:filename}}|link=|{{{3|28px}}}|{{#lvar:wording}}]]{{#if:{{{nocat|}}}||{{Main only|[[Category:{{#lvar:wording}}]]}}}}</includeonly><noinclude>[[Category:Templates]] | ||
Example: | Example: | ||
<pre> | <pre> | ||
{{ | {{resistance|acid|vuln}} | ||
{{ | {{resistance|cold|resist nm}} | ||
{{ | {{resistance|fire|resist m}} | ||
{{ | {{resistance|force|resist full}} | ||
{{ | {{resistance|thunder|immune}} | ||
{{ | {{resistance|piercing|immune nm}} | ||
{{ | {{resistance|slashing|immune nm plus}} | ||
</pre> | </pre> | ||
{{ | {{resistance|acid|vuln}} | ||
{{ | {{resistance|cold|resist nm}} | ||
{{ | {{resistance|fire|resist m}} | ||
{{ | {{resistance|force|resist full}} | ||
{{ | {{resistance|thunder|immune}} | ||
{{ | {{resistance|piercing|immunity nm}} | ||
{{ | {{resistance|slashing|immune nm plus}} | ||
Here are the "keys" for the resistance/vulnerability/immunity type: | Here are the "keys" for the resistance/vulnerability/immunity type: | ||
Line 92: | Line 97: | ||
You can also make the icon bigger like so: | You can also make the icon bigger like so: | ||
{{InfoBlob|<nowiki>{{ | {{InfoBlob|<nowiki>{{resistance|acid|immune|40px}}</nowiki>}} | ||
Result: | Result: | ||
{{ | {{resistance|acid|immune|40px}} | ||
== Template data == | == Template data == | ||
Line 113: | Line 118: | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ | "suggestedvalues": [ | ||
" | "vuln", | ||
" | "resist nm", | ||
" | "resist m", | ||
" | "resist full", | ||
"immune nm", | |||
"immune full", | |||
"immune nm plus" | |||
], | ], | ||
"required": true | "required": true |
Revision as of 19:01, 16 June 2024
Example:
{{resistance|acid|vuln}} {{resistance|cold|resist nm}} {{resistance|fire|resist m}} {{resistance|force|resist full}} {{resistance|thunder|immune}} {{resistance|piercing|immune nm}} {{resistance|slashing|immune nm plus}}
Here are the "keys" for the resistance/vulnerability/immunity type:
vuln
: Self-explanatoryresist nm
: Resistant to non-magicalresist m
: Resistant to magical onlyresist full
: Resistant to all (non-magical and magical)immune nm
: Immune to non-magicalimmune full
: Immune to all (non-magical and magical)immune nm plus
: Immune to non-magical and resistant to magical
The abbreviations "vuln", "resist", and "immune" can be written out in full as well, like "vulnerable", "vulnerability", "resistant", "resistance", or "immunity". The template will recognize all ways to write these words.
You can also make the icon bigger like so:
{{resistance|acid|immune|40px}}
Result:
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
type | 1 | The damage type | String | required |
resistance | 2 | How resistant?
| String | required |
size | 3 | Size of the icon.
| Number | optional |
nocat | nocat | If specified, does not insert categories. | Unknown | optional |