wmlunits: Mark terrains with high movement costs properly

This commit is contained in:
Ignacio R. Morelle 2017-08-15 01:31:36 -03:00
parent 73857622fc
commit 3ba7c64010

View file

@ -1254,7 +1254,8 @@ class HTMLOutput:
if defense == '-':
defense = 100
cost_rating = mvtcost_rating_color_class(move_cost, uval('movement'))
total_movement = uval('movement')
cost_rating = mvtcost_rating_color_class(move_cost, total_movement)
try:
defense = int(defense)
@ -1272,7 +1273,7 @@ class HTMLOutput:
classes_cost.append('rating-' + cost_rating)
if defense_rating:
classes_defense.append('rating-' + defense_rating)
if move_cost == '-':
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)