Difference between revisions of "Template:Skill range"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
| 0 = at target, | | 0 = at target, | ||
|#default = {{#expr:abs({{#var:range o|}})}} square(s) {{#ifexpr: {{#var:range o|}} > 0 |in front of|behind}} target, | |#default = {{#expr:abs({{#var:range o|}})}} square(s) {{#ifexpr: {{#var:range o|}} > 0 |in front of|behind}} target, | ||
}} {{#switch:{{#var:range h|}} | }} {{#ifexpr:{{#var:range d}} = {{#var:range h}} and {{#var:range h}} = {{#var:range v}} |in a {{#var:range d}} square radius|{{#switch:{{#var:range h|}} | ||
| 0 = | | 0 = | ||
| 1 = horizontally adjacent, | | 1 = horizontally adjacent, | ||
Line 14: | Line 14: | ||
| 1 = diagonally. | | 1 = diagonally. | ||
|#default = {{#var:range d|}} squares diagonally. | |#default = {{#var:range d|}} squares diagonally. | ||
}}}}{{ | }}}}}}{{ | ||
#vardefine:range|{{#replace:{{#var:range}}|, .|.}}}}{{ | #vardefine:range|{{#replace:{{#var:range}}|, .|.}}}}{{ | ||
#vardefine:range|{{#replace:{{#var:range}}|,.|.}}}}{{ | #vardefine:range|{{#replace:{{#var:range}}|,.|.}}}}{{ |
Revision as of 21:56, 27 December 2018
Examples
{{Skill range|0 0 0 0}}
at target, in a 0 square radius
{{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 1}}
at target, in a 1 square radius