Template:Damage colour: Difference between revisions
Jump to navigation
Jump to search
(add piercing, bludgeoning, and slashing cases to the switch function) |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{color|{{#switch: {{{1}}} | <includeonly>{{color|{{#switch: {{{1}}} | ||
| Acid = #cccc00 | | Acid = #cccc00 | ||
| Cold = #3399cc | | Cold = #3399cc | ||
| Fire = #ff6600 | | Fire = #ff6600 | ||
| Force = #cc3333 | | Force = #cc3333 | ||
| Lightning = #3366cc | | Healing = #33cccc | ||
| Necrotic = #66cc66 | | Lightning = #3366cc | ||
| Poison = #99cc00 | | Necrotic = #66cc66 | ||
| Radiant = #ffcc00 | | Poison = #99cc00 | ||
| Thunder = #663399 | | Radiant = #ffcc00 | ||
| Psychic = #ff99cc | | Thunder = #663399 | ||
| Psychic = #ff99cc | |||
| Piercing = #a9a9a9 | | Piercing = #a9a9a9 | ||
| Bludgeoning = #a9a9a9 | | Bludgeoning = #a9a9a9 | ||
| Slashing = #a9a9a9 | | Slashing = #a9a9a9 | ||
}}|{{{2}}}}}</includeonly><noinclude> | }}|{{{2}}}}}</includeonly><noinclude> | ||
You can use this like so: | You can use this like so: | ||
Line 22: | Line 22: | ||
{{DamageColor|Force|That's a lotta damage.}} | {{DamageColor|Force|That's a lotta damage.}} | ||
Or for healing, actually: | |||
{{code|<nowiki>{{DamageColor|Healing|Feels good man.}}</nowiki>}} | |||
Result: | |||
{{DamageColor|Healing|Feels good man.}} | |||
</noinclude> | </noinclude> |
Revision as of 05:49, 26 January 2023
You can use this like so:
{{DamageColor|Force|That's a lotta damage.}}
Result:
That's a lotta damage.
Or for healing, actually:
{{DamageColor|Healing|Feels good man.}}
Result:
Feels good man.