--- server/unithand.c.orig Tue Dec 14 19:46:01 1999 +++ server/unithand.c Tue Dec 14 19:57:57 1999 @@ -514,6 +514,7 @@ int o; struct packet_unit_combat combat; struct unit *plooser, *pwinner; + struct unit old_punit = *punit; /* Used for new ship algorithm. -GJW */ struct city *pcity; struct city *incity, *nearcity1, *nearcity2; incity = map_get_city(pdefender->x, pdefender->y); @@ -552,8 +553,19 @@ /* Adjust attackers moves_left _after_ unit_versus_unit() so that * the movement attack modifier is correct! --dwp + * + * And for greater Civ2 compatibility (and ship balance issues), ships + * use a different algorithm. Recompute a new total MP based on the HP + * the ship has left after being damaged, and subtract out all of the MP + * that had been used so far this turn (plus the points used in the attack + * itself). -GJW */ - punit->moves_left-=3; + if (is_sailing_unit (punit)) { + int moves_used = unit_move_rate (&old_punit) - old_punit.moves_left; + punit->moves_left = unit_move_rate (punit) - moves_used - 3; + } else { + punit->moves_left-=3; + } if(punit->moves_left<0) punit->moves_left=0;