Difference between revisions of "Template:Skill range"
Jump to navigation
Jump to search
SurtrFan8511 (talk | contribs) (Added 2 more special cases) |
SurtrFan8511 (talk | contribs) (Oniwaka why are you like this) |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><!--keywords:center, adjust, target (get replaced at the end with proper strings)-->{{#vardefine:range o|{{#explode:{{{1|0}}}| |0}}}}{{#vardefine:range h|{{#explode:{{{1}}}| |1}}}}{{#vardefine:range v|{{#explode:{{{1}}}| |2}}}}{{#vardefine:range d|{{#explode:{{{1}}}| |3}}}}{{#vardefine:range s|{{#explode:{{{1}}}| |4}}}}{{#vardefine:range| | <includeonly><onlyinclude><!--keywords:center, adjust, target (get replaced at the end with proper strings)-->{{#if:{{#var:disable ranges}}|{{#vardefine:disable ranges|}}|{{#vardefine:range o|{{#explode:{{{1|0}}}| |0}}}}{{#vardefine:range h|{{#explode:{{{1}}}| |1}}}}{{#vardefine:range v|{{#explode:{{{1}}}| |2}}}}{{#vardefine:range d|{{#explode:{{{1}}}| |3}}}}{{#vardefine:range s|{{#explode:{{{1}}}| |4}}}}{{#vardefine:range| | ||
<!--matching targets and ranges-->{{#switch:{{#var:target definition}} {{{1}}} | <!--matching targets and ranges-->{{#switch:{{#var:target definition}} {{{1}}} | ||
| {{#var:self target}} 1 1 0 0 0 = in a Slash range | | {{#var:self target}} 1 1 0 0 0 = in a Slash range | ||
Line 82: | Line 82: | ||
#vardefine:range|{{#replace:{{#var:range}}|horizontally|<abbr title='to the sides of'>horizontally</abbr>}}}}{{ | #vardefine:range|{{#replace:{{#var:range}}|horizontally|<abbr title='to the sides of'>horizontally</abbr>}}}}{{ | ||
#vardefine:range|{{#replace:{{#var:range}}|vertically|<abbr title='in front of and behind'>vertically</abbr>}}}}{{ | #vardefine:range|{{#replace:{{#var:range}}|vertically|<abbr title='in front of and behind'>vertically</abbr>}}}}{{ | ||
#var:range}}{{#vardefine:hit form|hit}}</onlyinclude></includeonly><noinclude>{{Documentation}}</noinclude> | #var:range}}{{#vardefine:hit form|hit}}}}</onlyinclude></includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 12:38, 11 August 2020
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}}target
{{Skill range|1 0 0 0 2 0}}in a 1x1 area centered in front of target
{{Skill range|-2 0 0 0 1 0}}in a 1x1 area centered 2 squares behind target
{{Skill range|1 0 0 1 0 0}}1 squares diagonally away from in front of target
{{Skill range|-2 0 1 0 0 0}}in a 3-square vertical line centered 2 squares behind target
{{Skill range|0 0 1 1 0 0}}1 squares 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 centered around target
{{Skill range|5 0 6 7 8 0}}in a 1x13 area centered 5 squares in front of target
{{Skill range|0 1 1 1 1 0}}in a 3x3 area centered around target
The above documentation is transcluded from Template:Skill range/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |