Template:Resistances

From bg3.wiki
Revision as of 09:03, 30 January 2023 by Majesstic (talk | contribs) (DRAFT-WIP)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WORK IN PROGRESS - TESTING

Would like to get this template to work without HTML tags, but mediawiki markup is not playing nice with displaying rows conditionally, even with liberal use of the {{!}} magic word.

Examples

Usage example 1:

{{Resistances|Slashing=Resistant|Fire=Immune|Cold=Vulnerable}}

Result:

Resistances
Slashing Damage Icon.png SlashingResistant
Cold Damage Icon.png ColdVulnerable
Fire Damage Icon.png FireImmune

Usage example 2 (all possible damage types, accepts damage types in any order):

{{Resistances|Bludgeoning=Immune|Slashing=Immune|Piercing=Resistant|Acid=Resistant|Cold=Resistant|Fire=Resistant|Force=Vulnerable|Lightning=Resistant|Necrotic=Resistant|Poison=Resistant|Radiant=Resistant|Thunder=Resistant|Psychic=Resistant}}

Result:

Resistances
Bludgeoning Damage Icon.png BludgeoningImmune
Piercing Damage Icon.png PiercingResistant
Slashing Damage Icon.png SlashingImmune
Acid Damage Icon.png AcidResistant
Cold Damage Icon.png ColdResistant
Fire Damage Icon.png FireResistant
Force Damage Icon.png ForceVulnerable
Lightning Damage Icon.png LightningResistant
Necrotic Damage Icon.png NecroticResistant
Poison Damage Icon.png PoisonResistant
Radiant Damage Icon.png RadiantResistant
Thunder Damage Icon.png ThunderResistant
Psychic Damage Icon.png PsychicResistant