Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] helicopters no longer lose HP
Home

Re: [Freeciv-Dev] helicopters no longer lose HP

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel_Burrows@xxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] helicopters no longer lose HP
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 18 Feb 1999 10:22:02 +1100

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

[Prev in Thread] Current Thread [Next in Thread]