Template:Resistance: Difference between revisions
Jump to navigation
Jump to search
(backwards compatibility) |
mNo edit summary |
||
(39 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{trim| | ||
</includeonly><noinclude>[[Category:Templates]] | |||
{{#lvardef: element | {{ucfirst: {{lc: {{{1}}} }} }} }} | |||
{{#lvardef: wording | {{#switch: {{lc: {{{2|}}} }} | |||
| vuln | |||
| vulnerable | |||
| vulnerability = Vulnerable to | |||
| resist | |||
| resistant | |||
| resist nm | |||
| resistant nm | |||
| resistance nm = Resistant to Non-Magical | |||
| magical | |||
| resist m | |||
| resistant m | |||
| resistance m = Resistant to Magical | |||
| double | |||
| full | |||
| resist double | |||
| resist full | |||
| resistant double | |||
| resistance double | |||
| resistant full | |||
| resistance full = Resistant to all | |||
| immunity | |||
| immune | |||
| immunity full | |||
| immune full = Immune to all | |||
| immunity nm | |||
| immune nm = Immune to Non-Magical | |||
| immunity nm plus | |||
| immune nm plus = Immune to Non-Magical and Resistant to Magical | |||
}} {{#lvar:element}} }} | |||
{{#lvardef: filename | {{#lvar:element}} {{#switch: {{lc: {{{2|}}} }} | |||
| vuln | |||
| vulnerable | |||
| vulnerability = Vulnerability | |||
| resist | |||
| resistant | |||
| resistance | |||
| resist nm | |||
| resistant nm | |||
| resistance nm = Resistance NM | |||
| magical | |||
| resist m | |||
| resistant m | |||
| resistance m = Resistance M | |||
| double | |||
| full | |||
| resist double | |||
| resistant double | |||
| resistance double | |||
| resist full | |||
| resistant full | |||
| resistance full = Resistance Full | |||
| immune | |||
| immunity = Immunity | |||
| immune nm | |||
| immunity nm = Immunity NM | |||
| immune nm plus | |||
| immunity nm plus = Immunity NM Plus | |||
}}.png }} | |||
}}[[File:{{#lvar:filename}}|link=|{{{3|28px}}}|{{#lvar:wording}}]]{{#if:{{{nocat|}}}||{{Main only|[[Category:{{#lvar:wording}}]]}}}}</includeonly><noinclude>[[Category:Templates]] | |||
Example: | Example: | ||
You can also | <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> | |||
{{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: | |||
* <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 == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "type", | |||
"description": "The damage type", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "resistance", | |||
"description": "How resistant?", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"vuln", | |||
"resist nm", | |||
"resist m", | |||
"resist full", | |||
"immune nm", | |||
"immune full", | |||
"immune nm plus" | |||
], | |||
"required": true | |||
}, | |||
"3": { | |||
"label": "size", | |||
"description": "Size of the icon.", | |||
"type": "number", | |||
"default": "28" | |||
}, | |||
"nocat": { | |||
"description": "If specified, does not insert categories." | |||
} | |||
}, | |||
"format": "inline" | |||
} | |||
</templatedata></noinclude> |
Latest revision as of 20:44, 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 |