Template:Infobox creature: Difference between revisions

Jump to navigation Jump to search
Improve handling of initiative parameter (empty if neither initiative nor DEX specified).
(Remove wrapping div because we modify PortableInfobox to do this properly.)
(Improve handling of initiative parameter (empty if neither initiative nor DEX specified).)
Line 17: Line 17:
{{#lvardef: wis_mod | {{#ifexpr: {{{wis}}} > 11 | + }}{{#expr: floor({{{wis}}} / 2) - 5 }} }}
{{#lvardef: wis_mod | {{#ifexpr: {{{wis}}} > 11 | + }}{{#expr: floor({{{wis}}} / 2) - 5 }} }}
{{#lvardef: cha_mod | {{#ifexpr: {{{cha}}} > 11 | + }}{{#expr: floor({{{cha}}} / 2) - 5 }} }}
{{#lvardef: cha_mod | {{#ifexpr: {{{cha}}} > 11 | + }}{{#expr: floor({{{cha}}} / 2) - 5 }} }}
<!-- Initiative -->
{{#lvardef: initiative | {{{initiative | {{#if: {{{dex|}}} | {{#lvar:dex_mod}} }} }}} }}


<!-- Proficiency bonus -->
<!-- Proficiency bonus -->
Line 71: Line 74:
{{#lvardef: e_cha_mod | {{#ifexpr: {{#lvar:e_cha}} > 11 | + }}{{#expr: floor({{#lvar:e_cha}} / 2) - 5 }} }}
{{#lvardef: e_cha_mod | {{#ifexpr: {{#lvar:e_cha}} > 11 | + }}{{#expr: floor({{#lvar:e_cha}} / 2) - 5 }} }}


{{#lvardef: e_initiative | {{{e initiative | {{#lvar:e_dex_mod}} }}} }}
<!-- Explorer initiative -->
{{#lvardef: e_initiative | {{{e initiative | {{#if: {{#lvar:e_dex}} | {{#lvar:e_dex_mod}} }} }}} }}


<!-- Explorer level -->
<!-- Explorer level -->
Line 143: Line 147:
{{#lvardef: t_cha_mod | {{#ifexpr: {{#lvar:t_cha}} > 11 | + }}{{#expr: floor({{#lvar:t_cha}} / 2) - 5 }} }}
{{#lvardef: t_cha_mod | {{#ifexpr: {{#lvar:t_cha}} > 11 | + }}{{#expr: floor({{#lvar:t_cha}} / 2) - 5 }} }}


{{#lvardef: t_initiative | {{{t initiative | {{#lvar:t_dex_mod}} }}} }}
<!-- Tactician initiative -->
{{#lvardef: t_initiative | {{{t initiative | {{#if: {{#lvar:t_dex}} | {{#lvar:t_dex_mod}} }} }}} }}


<!-- Tactician level -->
<!-- Tactician level -->
Line 215: Line 220:
{{#lvardef: h_cha_mod | {{#ifexpr: {{#lvar:h_cha}} > 11 | + }}{{#expr: floor({{#lvar:h_cha}} / 2) - 5 }} }}
{{#lvardef: h_cha_mod | {{#ifexpr: {{#lvar:h_cha}} > 11 | + }}{{#expr: floor({{#lvar:h_cha}} / 2) - 5 }} }}


{{#lvardef: h_initiative | {{{h initiative | {{#lvar:t_initiative}} }}} }}
<!-- Honour initiative -->
{{#lvardef: h_initiative | {{{h initiative | {{#if: {{#lvar:h_dex}} | {{#lvar:t_initiative}} }} }}} }}


<!-- Honour level -->
<!-- Honour level -->
Line 277: Line 283:
| hp = {{{hp|}}}
| hp = {{{hp|}}}
| ac = {{{ac|}}}
| ac = {{{ac|}}}
| initiative = {{{initiative|{{#lvar:dex_mod}}}}}
| initiative = {{#lvar:initiative}}
| prof bonus = {{#lvar:prof_bonus}}
| prof bonus = {{#lvar:prof_bonus}}
| movement m = {{{movement m|}}}
| movement m = {{{movement m|}}}

Navigation menu