Re: [Freeciv-Dev] helicopters no longer lose HP
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Daniel Burrows wrote:
>
> Ok, this was my fault. I think the attached patch should fix things but
> I don't have a game handy with helicopters. The semantics of
> hitpoint-regeneration with this are:
>
> * The United Nations and helicopter effect are applied regardless of unit
> type.
> * If a unit has moved, hp_gain_coord() returns 0 for it; otherwise it returns
> the normal value.
> * hp_gain_cord() gives a bonus to units on fortresses or cities, regenerates
> units in cities with a barracks/port/airport entirely, and gives a bonus
> to fortified funits.
I would have expected a unit which ends its turn in a Barracks (etc)
to recover hitpoints regardless of movement, but now it only works
if the unit hasn't moved, right? Is that intentional? If so then
the help on Barracks etc should make this clear.
> + pcity=city_list_find_id(&pplayer->cities, game.global_wonders[B_UNITED]);
> + if(pcity && !wonder_obsolete(B_UNITED))
Better (faster) to use
if (player_owns_active_wonder(pplayer, B_UNITED))
-- David
|
|