summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2017-10-20 14:43:57 +0200
committernsensfel <SpamShield0@noot-noot.org>2017-10-20 14:43:57 +0200
commitc185856591d072479333693abdc18968139f639b (patch)
tree0fc25cb04cabc38a36a483c72a07d76027c55f20 /src/battlemap
parent9942e31832d785e3b9a102c79583da1ceccb199e (diff)
Welp, it's fixed. I don't really know why.
Diffstat (limited to 'src/battlemap')
-rw-r--r--src/battlemap/src/Battlemap/Navigator/RangeIndicator.elm28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/battlemap/src/Battlemap/Navigator/RangeIndicator.elm b/src/battlemap/src/Battlemap/Navigator/RangeIndicator.elm
index 3b2495b..3e73e1e 100644
--- a/src/battlemap/src/Battlemap/Navigator/RangeIndicator.elm
+++ b/src/battlemap/src/Battlemap/Navigator/RangeIndicator.elm
@@ -161,19 +161,21 @@ handle_neighbors loc dist atk_dist indicator remaining directions =
then
(Dict.insert
(Battlemap.Location.get_ref neighbor_loc)
- if (new_dist > dist)
- then
- {neighbor |
- distance = dist,
- range = new_range,
- path = (head :: indicator.path)
- }
- else
- {neighbor |
- distance = new_dist,
- range = 0,
- path = (head :: indicator.path)
- }
+ (
+ if (new_dist > dist)
+ then
+ {neighbor |
+ distance = (dist + 1),
+ range = new_range,
+ path = (head :: indicator.path)
+ }
+ else
+ {neighbor |
+ distance = new_dist,
+ range = 0,
+ path = (head :: indicator.path)
+ }
+ )
remaining
)
else