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 fab37ca979
commit ac0962e029

View file

@ -1301,7 +1301,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)