wmlunits: Units may have movement cost == max mp and be able to move

This applies to the Walking Corpse in particular, which has 4 MP and 4
movement cost to enter shallow water. In practice this means that it can
move into shallow water only if it's not slowed and hasn't spent any
movement points this turn, and then it cannot move any further until the
next turn.

Closes #5689.
This commit is contained in:
Iris Morelle 2021-04-08 18:05:54 -04:00
parent 9f7d6b104b
commit 8a2faf24e3

View file

@ -1327,7 +1327,7 @@ class HTMLOutput:
classes_cost.append('rating-' + cost_rating)
if defense_rating:
classes_defense.append('rating-' + defense_rating)
if move_cost == '-' or int_fallback(total_movement) <= int_fallback(move_cost, 99):
if move_cost == '-' or int_fallback(total_movement) < int_fallback(move_cost, 99):
move_cost = HTML_ENTITY_FIGURE_DASH
else:
move_cost = cleantext(move_cost, quote=False)