Template:Action calculation: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{#switch: {{{action_type|}}}  
{{#switch: {{{action_type|}}}  
| melee attack = {{var|Melee Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, reach {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| melee attack = {{var|Melee Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, reach {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| ranged attack = {{var|Ranged Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, range {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| ranged attack = {{var|Ranged Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, range {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_condition|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| melee spell attack = {{var|Melee Spell Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, reach {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| melee spell attack = {{var|Melee Spell Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, reach {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}. {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| ranged spell attack = {{var|Ranged Spell Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, range {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}.  {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| ranged spell attack = {{var|Ranged Spell Attack}}: {{{action_attack|{{#expr: {{#switch: {{{action_attack_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#if: {{{action_attack_proficient|}}} | {{#lvar:proficiencybonus}} }} {{#if: {{{action_mode|}}} | +2}}}}}}} to hit, range {{{action_range|1.5 m (5 ft)}}}, {{{action_target|}}}. {{var|Hit}}: {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage}}}.  {{#if: {{{action_conditions|}}} | On a successful hit, {{#if: {{{action_save_outcome|}}} | target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}), or gain |target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| spell = {{var|Spell}}: Target {{{action_target|}}}, range {{{action_range|}}}. {{#if: {{{action_save_outcome|}}} | Target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}),}} {{#if: {{{action_damage_type|}}} | {{#if: {{{action_save_outcome|}}} | or take | Target takes}} {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage.}}}}} {{#if: {{{action_condition|}}} | {{#if: {{{action_save_outcome|}}} | or gain | Target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| spell = {{var|Spell}}: Target {{{action_target|}}}, range {{{action_range|}}}. {{#if: {{{action_save_outcome|}}} | Target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}),}} {{#if: {{{action_damage_type|}}} | {{#if: {{{action_save_outcome|}}} | or take | Target takes}} {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage.}}}}} {{#if: {{{action_condition|}}} | {{#if: {{{action_save_outcome|}}} | or gain | Target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}
| action = {{var|Action}}: Target {{{action_target|}}}, range {{{action_range|}}}. {{#if: {{{action_save_outcome|}}} | Target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}),}} {{#if: {{{action_damage_type|}}} | {{#if: {{{action_save_outcome|}}} | or take | Target takes}} {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage.}}}}} {{#if: {{{action_condition|}}} | {{#if: {{{action_save_outcome|}}} | or gain | Target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}}}<noinclude>{{documentation}}
| action = {{var|Action}}: Target {{{action_target|}}}, range {{{action_range|}}}. {{#if: {{{action_save_outcome|}}} | Target must make a successful {{{action_save_ability|}}} save (DC {{{action_save_dc|{{#expr: {{#switch: {{{action_dc_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}} {{#lvar:proficiencybonus}}}}.}}}),}} {{#if: {{{action_damage_type|}}} | {{#if: {{{action_save_outcome|}}} | or take | Target takes}} {{{action_damage| {{{action_damage_dice|}}} +{{#expr: {{#switch: {{{action_damage_ability|}}} | str = {{#lvar:strmod}} | dex = {{#lvar:dexmod}} | con = {{#lvar:conmod}} | int = {{#lvar:intmod}} | wis = {{#lvar:wismod}} | cha = {{#lvar:chamod}}}}}} {{damage color|{{{action_damage_type|}}}}} damage.}}}}} {{#if: {{{action_condition|}}} | {{#if: {{{action_save_outcome|}}} | or gain | Target gains}} {{{action_condition|}}} for {{{action_condition_duration|}}}.}} {{#if: {{{action_save_outcome|}}} | On a successful save, {{{action_save_outcome|}}}.}} {{#if: {{{action_resources|}}} | Uses {{{action_resources|}}}.}} {{#if: {{{action_gain|}}} | Gain {{{action_gain_|}}}}}{{{action_description|}}}}}<noinclude>{{documentation}}