Difference between revisions of "Template:Skill range"
Jump to navigation
Jump to search
SurtrFan8511 (talk | contribs) (Fixed center suffixes) |
SurtrFan8511 (talk | contribs) |
||
Line 64: | Line 64: | ||
}}}}}} | }}}}}} | ||
-->{{#vardefine:center| | -->{{#vardefine:center| | ||
centered {{#vardefineecho:adjust|{{#ifeq:{{#var:range o}}|0| | centered {{#vardefineecho:adjust|{{#ifeq:{{#var:range o}}|0|target|{{#ifexpr:{{#var:range o}} > 0 | ||
|<!--front-->{{#ifeq:{{#var:range o}}|1|in front of target|{{#var:range o}} squares in front of target}} | |<!--front-->{{#ifeq:{{#var:range o}}|1|in front of target|{{#var:range o}} squares in front of target}} | ||
|<!--back-->{{#ifeq:{{#var:range o}}|-1|behind target|{{#expr: -{{#var:range o}}}} squares behind target}}}} | |<!--back-->{{#ifeq:{{#var:range o}}|-1|behind target|{{#expr: -{{#var:range o}}}} squares behind target}}}} |
Revision as of 10:22, 11 August 2020
Description
Parses a string in the format of [distance] [horizontal] [vertical] [diagonal] into something human readable.
Examples
{{Skill range|0 0 0 0 0}}
{{Skill range|1 0 0 2 0}}
2 squares diagonally away from in front of target
{{Skill range|-2 0 0 1 0}}
1 squares diagonally away from 2 squares behind target
{{Skill range|1 0 1 0 0}}
in a Thrust range
{{Skill range|-2 1 0 0 0}}
in a 3-square horizontal line centered 2 squares behind target
{{Skill range|0 1 1 0 0}}
directly adjacent to target
{{Skill range|0 2 2 0 0}}
in a 2-square cross radius centered target
{{Skill range|0 1 1 1 0}}
1 square around target
{{Skill range|5 6 7 8 0}}
6 squares horizontally, 7 squares vertically, 8 squares diagonally away from 5 squares in front of target