Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Patch correcting win_cnace
Home

[Freeciv-Dev] Patch correcting win_cnace

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Patch correcting win_cnace
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxxx>
Date: Sun, 15 Jul 2001 19:15:38 +0300 (IDT)

Err, should we also check for afp == 0 and dfp == 0 ?

Best,
G.

On Sun, 15 Jul 2001, Gregory Berkolaiko wrote:

> 2. There is a dormant mistake in win_chance.  Line 39 of combat.c should
> be 
> int def_N_lose = (dhp+afp-1)/afp;
> As it is now, it will work if no unit has got firepower > 2.  But, for
> example, the number of hits a musketeer (20HP) will survive from a 3FP
> unit is 7, not 
>     20/3 + 20%3 = 8
> as it is now.  Same thing on line 38.

Attachment: win_chance_patch
Description: Text document


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