Template:Resistance: Difference between revisions

From bg3.wiki
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
| Vulnerable
| vulnerability = Vulnerable to
| vulnerability
| resist
| Vulnerability = Vulnerable to
| resistant
| resistant
| Resistant
| resist nm
| resistant nm
| resistant nm
| Resistant NM
| resistance nm = Resistant to non-magical
| resistance nm
| Resistance NM = Resistant to non-magical
| magical
| magical
| Magical
| resist m
| resistant m
| resistant m
| Resistant M
| resistance m = Resistant to magical
| resistance m
| Resistance M = Resistant to magical
| double
| double
| Double
| full
| full
| Full
| resist double
| resist full
| resistant double
| resistant double
| Resistant Double
| resistance double
| resistance double
| Resistance Double
| resistant full
| resistant full
| Resistant Full
| resistance full = Resistant to all
| resistance full
| Resistance Full = Resistant to all
| immunity
| immunity
| Immunity
| immune = Immune to all
| immune
| Immune = Immune to all
| immunity nm
| immunity nm
| Immunity NM
| immune nm = Immune to non-magical
| immune nm
| immunity nm plus
| Immune NM = Immune to non-magical
| 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
| Vulnerable
| vulnerability = Vulnerability
| vulnerability
| resist
| Vulnerability = Vulnerability
| resistant
| resistant
| Resistant
| resistance
| resist nm
| resistant nm
| resistant nm
| Resistant NM
| resistance nm = Resistance NM
| resistance nm
| Resistance NM = Resistance NM
| magical
| magical
| Magical
| resist m
| resistant m
| resistant m
| Resistant M
| resistance m = Resistance M
| resistance m
| Resistance M = Resistance M
| double
| double
| Double
| full
| full
| Full
| resist double
| resistant double
| resistant double
| Resistant Double
| resistance double
| resistance double
| Resistance Double
| resist full
| resistant full
| resistant full
| Resistant Full
| resistance full = Resistance Full
| resistance full
| Resistance Full = Resistance Full
| immunity
| Immunity
| immune
| immune
| Immune = Immunity
| immunity = Immunity
| immunity nm
| Immunity NM
| immune nm
| immune nm
| Immune NM = Immunity 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|Psychic|resistant}}
{{Resistance|Acid|vuln}}
{{Resistance|Fire|double}}
{{Resistance|Cold|resist nm}}
{{Resistance|Magic|magical}}
{{Resistance|Fire|resist m}}
{{Resistance|Force|resist full}}
{{Resistance|Thunder|immune}}
{{Resistance|Thunder|immune}}
{{Resistance|Radiant|vulnerable}}
{{Resistance|Piercing|immune nm}}
{{Resistance|Slashing|immune nm}}
{{Resistance|Slashing|immune nm plus}}
</pre>
</pre>


{{Resistance|Psychic|resistant}}
{{Resistance|Acid|vuln}}
{{Resistance|Fire|double}}
{{Resistance|Cold|resist nm}}
{{Resistance|Magic|magical}}
{{Resistance|Fire|resist m}}
{{Resistance|Force|resist full}}
{{Resistance|Thunder|immune}}
{{Resistance|Thunder|immune}}
{{Resistance|Radiant|vulnerable}}
{{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>}}


The <code>immune nm</code> stands for non-magical immunity which e.g. [[Werewolf|werewolves]] have.
Result:


You can also use {{InfoBlob|<nowiki>{{Resistance|Acid|immune|40px}}</nowiki>}} to make it bigger {{Resistance|Acid|immune|40px}}
{{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}}

Vulnerable to Acid Resistant to non-magical Cold Resistant to magical Fire Resistant to all Force Immune to all Thunder Immune to non-magical Piercing Immune to non-magical and resistant to magical Slashing

Here are the "keys" for the resistance/vulnerability/immunity type:

  • vuln: Self-explanatory
  • resist nm: Resistant to non-magical
  • resist m: Resistant to magical only
  • resist full: Resistant to all (non-magical and magical)
  • immune nm: Immune to non-magical
  • immune 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:

Immune to all Acid

Template data

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
type1

The damage type

Stringrequired
resistance2

How resistant?

Suggested values
immune magic vulnerable resistant
Stringrequired
size3

Size of the icon.

Default
28
Numberoptional
nocatnocat

If specified, does not insert categories.

Unknownoptional