Difference between revisions of "Template:Skill range"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
}} {{#ifexpr:{{#var:range d}} != 0 and {{#var:range d}} = {{#var:range h}} and {{#var:range h}} = {{#var:range v}} |in a {{#var:range d}} square radius | }} {{#ifexpr:{{#var:range d}} != 0 and {{#var:range d}} = {{#var:range h}} and {{#var:range h}} = {{#var:range v}} |in a {{#var:range d}} square radius | ||
|{{#ifexpr: {{#var:range h}} != 0 and {{#var:range h}} = {{#var:range v}} |{{#switch:{{#var:range h|}} | |{{#ifexpr: {{#var:range h}} != 0 and {{#var:range h}} = {{#var:range v}} |{{#switch:{{#var:range h|}} | ||
| | | 1 = directly adjacent, | ||
| #default = {{#var:range h}} squares away horizontally and vertically, | | #default = {{#var:range h}} squares away horizontally and vertically, | ||
}}|{{#switch:{{#var:range h|}} | }}|{{#switch:{{#var:range h|}} |
Revision as of 22:04, 27 December 2018
Description
Parses a string in the format of [distance] [horizontal] [vertical] [diagonal] into something mostly human readable.
Examples
{{Skill range|0 0 0 0}}
at target.
{{Skill range|1 0 0 2}}
1 square(s) in front of target, 2 squares diagonally.
{{Skill range|-2 0 0 1}}
2 square(s) behind target, diagonally.
{{Skill range|1 0 1 0}}
1 square(s) in front of target, vertically adjacent.
{{Skill range|-2 1 0 0}}
2 square(s) behind target, horizontally adjacent.
{{Skill range|0 1 1 0}}
at target, directly adjacent.
{{Skill range|0 2 2 0}}
at target, 2 squares away horizontally and vertically.
{{Skill range|0 1 1 1}}
at target, in a 1 square radius