You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f6b5334
Browse filesBrowse the repository at this point in the historyBrowse files
// special handling for short ranges and diagonals
1032
-
if (outOfRange && action->actor->directionTo(action->target) % 2 == 1)
1033
+
if (outOfRange)
1033
1034
{
1034
-
// special handling for maxRange 1: allow it to target diagonally adjacent tiles, even though they are technically 2 tiles away.
1035
-
if (weapon->getMaxRange() == 1
1036
-
&& distance == 2)
1035
+
// special handling for maxRange 1: allow it to target diagonally adjacent tiles (one diagonal move)
1036
+
if (weapon->getMaxRange() == 1 && distanceSq <= 3)
1037
1037
{
1038
1038
outOfRange = false;
1039
1039
}
1040
-
// special handling for maxRange 2: allow it to target diagonally adjacent tiles on a level above/below, even though they are technically 3 tiles away.
1041
-
elseif (weapon->getMaxRange() == 2
1042
-
&& distance == 3
1043
-
&& itZ != action->actor->getPosition().z)
1040
+
// special handling for maxRange 2: allow it to target diagonally adjacent tiles (one diagonal move + one straight move)
if (distanceSq > weapon->getRules()->getMaxRangeSq())
149
149
{
150
150
// special handling for short ranges and diagonals
151
-
if (_action.actor->directionTo(_action.target) % 2 == 1)
152
151
{
153
-
// special handling for maxRange 1: allow it to target diagonally adjacent tiles, even though they are technically 2 tiles away.
154
-
if (weapon->getRules()->getMaxRange() == 1
155
-
&& distance == 2)
152
+
// special handling for maxRange 1: allow it to target diagonally adjacent tiles (one diagonal move)
153
+
if (weapon->getRules()->getMaxRange() == 1 && distanceSq <= 3)
156
154
{
157
155
break;
158
156
}
159
-
// special handling for maxRange 2: allow it to target diagonally adjacent tiles on a level above/below, even though they are technically 3 tiles away.
0 commit comments