Difference between revisions of "Template:Skill range"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
m
Line 71: Line 71:
-->{{#vardefine:adjust|{{#switch:{{#expr:abs({{#var:range o}})}}
-->{{#vardefine:adjust|{{#switch:{{#expr:abs({{#var:range o}})}}
| 0 = target
| 0 = target
| 1 = {{#ifeq:{{#var:range o}}|1|the front of|behind}} target
| 1 = {{#ifeq:{{#var:range o}}|1|the front of|the back of}} target
| 2 = the 2nd square {{#ifeq:{{#var:range o}}|2|in front of|behind}} target
| 2 = the 2nd square {{#ifeq:{{#var:range o}}|2|in front of|behind}} target
| 3 = the 3rd square {{#ifeq:{{#var:range o}}|3|in front of|behind}} target
| 3 = the 3rd square {{#ifeq:{{#var:range o}}|3|in front of|behind}} target

Revision as of 10:52, 16 August 2020

Template documentation[view] [edit] [history] [purge]

Description

Parses a string in the format of [distance] [horizonal distance] [horizontal] [vertical] [diagonal] [is-square] into something human readable.

Examples

{{Skill range|0 0 0 0 0 0}}
at target
{{Skill range|1 0 0 0 2 0}}
in a 1x1 area around the front of target
{{Skill range|-2 0 0 0 1 0}}
in a 1x1 area around the 2nd square behind target
{{Skill range|1 0 0 1 0 0}}
1 square diagonally away from the front of target
{{Skill range|-2 0 1 0 0 0}}
in a 3-square vertical line around the 2nd square behind target
{{Skill range|0 0 1 1 0 0}}
1 square diagonally away from target
{{Skill range|0 0 2 2 0 0}}
2 squares diagonally away from target
{{Skill range|0 0 1 1 1 0}}
in a 1x3 area around target
{{Skill range|5 0 6 7 8 0}}
in a 1x13 area around the 5th square in front of target
{{Skill range|0 1 1 1 1 0}}
in a 3x3 area around target