70,311
editsAd placeholder
Template:Damage info: Difference between revisions
Jump to navigation
Jump to search
Slightly better parsing to avoid catching on 'd's when specifying a non-die value
HiddenDragon (talk | contribs) (Tighten up the check for flat value) |
HiddenDragon (talk | contribs) (Slightly better parsing to avoid catching on 'd's when specifying a non-die value) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{1}}} | <includeonly>{{#lvardef: die | {{{die|}}} }}{{#lvardef: count | {{{count|}}} }}{{#if: {{#pos: {{lc:{{{1|}}}}} | d20}} | {{#lvardef: die | 20}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d20}} }} }} | {{#if: {{#pos: {{lc:{{{1|}}}}} | d12}} | {{#lvardef: die | 12}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d12}} }} }} | {{#if: {{#pos: {{lc:{{{1|}}}}} | d10}} | {{#lvardef: die | 10}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d10}} }} }} | {{#if: {{#pos: {{lc:{{{1|}}}}} | d8}} | {{#lvardef: die | 8}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d8}} }} }} | {{#if: {{#pos: {{lc:{{{1|}}}}} | d6}} | {{#lvardef: die | 6}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d6}} }} }} | {{#if: {{#pos: {{lc:{{{1|}}}}} | d4}} | {{#lvardef: die | 4}}{{#lvardef: count | {{#sub: {{{1}}} | 0 | {{#pos: {{lc:{{{1|}}}}} | d4}} }} }} | }} }} }} }} }} }}{{#switch: {{{1}}} | ||
| unarmed = {{InfoBlob | [[Unarmed Strike|Unarmed damage]] {{DamageType|Bludgeoning}} }} | | unarmed = {{InfoBlob | [[Unarmed Strike|Unarmed damage]] {{DamageType|Bludgeoning}} }} | ||
| weapon = {{InfoBlob | Normal weapon damage }} | | weapon = {{InfoBlob | Normal weapon damage }} | ||
Line 10: | Line 10: | ||
| proficiency = proficiency | | proficiency = proficiency | ||
| #default = | | #default = | ||
{{#if: {{# | {{#if: {{#lvar: die }} | ||
| <!--nothing--> | | <!--nothing--> | ||
| {{{1|}}} | | {{{1|}}} | ||
}} | }} | ||
}} | }} | ||
| count = | | count = {{#lvar: count }} | ||
| die = {{#lvar: die }} | |||
| die = | |||
| plus = {{{plus | | | plus = {{{plus | | ||
{{#if: {{#pos: {{{1}}} | + }} | {{#if: {{#pos: {{{1}}} | + }} |