Template:Resistance: Difference between revisions
Jump to navigation
Jump to search
(Remove links and ARIA labels from icons, just use alt text.) |
(Cleanup & support "immune to non-magical and resistant to magical".) |
||
Line 1: | Line 1: | ||
<includeonly>{{trim| | <includeonly>{{trim| | ||
{{#lvardef: wording | {{#switch: {{{2|}}} | {{#lvardef: wording | {{#switch: {{lc: {{{2|}}} }} | ||
| vuln | |||
| vulnerable | | vulnerable | ||
| vulnerability = Vulnerable to | |||
| vulnerability | | resist | ||
| resistant | | resistant | ||
| | | resist nm | ||
| resistant nm | | resistant nm | ||
| resistance nm = Resistant to non-magical | |||
| resistance nm | |||
| magical | | magical | ||
| | | resist m | ||
| resistant m | | resistant m | ||
| resistance m = Resistant to magical | |||
| resistance m | |||
| double | | double | ||
| full | | full | ||
| | | resist double | ||
| resist full | |||
| resistant double | | resistant double | ||
| resistance double | | resistance double | ||
| resistant full | | resistant full | ||
| resistance full = Resistant to all | |||
| resistance full | |||
| immunity | | immunity | ||
| immune = Immune to all | |||
| immune | |||
| immunity nm | | immunity nm | ||
| | | immune nm = Immune to non-magical | ||
| | | immunity nm plus | ||
| | | immune nm plus = Immune to non-magical and resistant to magical | ||
}} {{{1}}} }} | }} {{{1}}} }} | ||
{{#lvardef: filename | {{{1}}} {{#switch: {{{2|}}} | {{#lvardef: filename | {{{1}}} {{#switch: {{lc: {{{2|}}} }} | ||
| vuln | |||
| vulnerable | | vulnerable | ||
| vulnerability = Vulnerability | |||
| vulnerability | | resist | ||
| | |||
| resistant | | resistant | ||
| | | resistance | ||
| resist nm | |||
| resistant nm | | resistant nm | ||
| resistance nm = Resistance NM | |||
| resistance nm | |||
| magical | | magical | ||
| | | resist m | ||
| resistant m | | resistant m | ||
| resistance m = Resistance M | |||
| resistance m | |||
| double | | double | ||
| full | | full | ||
| | | resist double | ||
| resistant double | | resistant double | ||
| resistance double | | resistance double | ||
| | | resist full | ||
| resistant full | | resistant full | ||
| resistance full = Resistance Full | |||
| resistance full | |||
| immune | | immune | ||
| | | immunity = Immunity | ||
| immune nm | | immune nm | ||
| | | immunity nm = Immunity NM | ||
| immune 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]] | ||
Line 80: | Line 61: | ||
<pre> | <pre> | ||
{{Resistance| | {{Resistance|Acid|vuln}} | ||
{{Resistance|Fire| | {{Resistance|Cold|resist nm}} | ||
{{Resistance| | {{Resistance|Fire|resist m}} | ||
{{Resistance|Force|resist full}} | |||
{{Resistance|Thunder|immune}} | {{Resistance|Thunder|immune}} | ||
{{Resistance| | {{Resistance|Piercing|immune nm}} | ||
{{Resistance|Slashing|immune nm}} | {{Resistance|Slashing|immune nm plus}} | ||
</pre> | </pre> | ||
{{Resistance| | {{Resistance|Acid|vuln}} | ||
{{Resistance|Fire| | {{Resistance|Cold|resist nm}} | ||
{{Resistance| | {{Resistance|Fire|resist m}} | ||
{{Resistance|Force|resist full}} | |||
{{Resistance|Thunder|immune}} | {{Resistance|Thunder|immune}} | ||
{{Resistance| | {{Resistance|Piercing|immunity nm}} | ||
{{Resistance|Slashing|immune nm}} | {{Resistance|Slashing|immune nm plus}} | ||
Here are the "keys" for the resistance/vulnerability/immunity type: | |||
* <code>vuln</code>: Self-explanatory | |||
* <code>resist nm</code>: Resistant to non-magical | |||
* <code>resist m</code>: Resistant to magical only | |||
* <code>resist full</code>: Resistant to all (non-magical and magical) | |||
* <code>immune nm</code>: Immune to non-magical | |||
* <code>immune full</code>: Immune to all (non-magical and magical) | |||
* <code>immune nm plus</code>: 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: | |||
{{InfoBlob|<nowiki>{{Resistance|Acid|immune|40px}}</nowiki>}} | |||
Result: | |||
{{Resistance|Acid|immune|40px}} | |||
== Template data == | == Template data == |
Revision as of 21:34, 2 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 |