Range

The range of weapons etc. is based on the following table. It is kind of counter intuitive because if you want to reach the tile which is two tiles up you need a range of three. The advantage is that it allows far more options than an intuitive correct mapping from range to tiles, e.g. you can have a weapon with a very short range which disallows directional attacks.

141210878101214
1210865681012
10864346810
864212468
753101357
864212468
10864346810
1210865681012
141210878101214

Range formula

Here is the formula which is used to calculate the range:

x = |PosX1 – PosX2|

y = |PosY1 – PosY2|

(y * 2) -1 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2
(y * 2) -1 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2
(y * 2) -1 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2
(y * 2) -1 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2 (x + y) * 2 – 2
0 (x * 2) -1 (x * 2) -1 (x * 2) -1 (x * 2) -1