Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#5079) mighty howitzers
Home

[Freeciv-Dev] Re: (PR#5079) mighty howitzers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5079) mighty howitzers
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Aug 2003 13:48:33 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Christian Knoke wrote:
> CVS 13 AUG 2003 GTK 1
> 
> My alpine troops (veteran) have an attack chance of 28% against howitzers
> (veteran status unknown) on pure plains terrain, according to the popup.
> 
> Alpine Troops: Attack: 5 Hitpoints: 20
> 
> Howitzer:      Defense: 2 Hitpoints: 30
> 
> Default ruleset.
> 
> I cannot believe that. Also, I rather loose these battles.

Try this patch.  What's the output?

jason

Index: common/combat.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/combat.c,v
retrieving revision 1.31
diff -u -r1.31 combat.c
--- common/combat.c     2003/06/04 20:05:40     1.31
+++ common/combat.c     2003/08/13 20:31:58
@@ -270,8 +270,18 @@
   int def_fp, att_fp;
   get_modified_firepower(attacker, defender, &att_fp, &def_fp);
 
+  freelog(LOG_NORMAL, "Calculating win chance:");
+  freelog(LOG_NORMAL, "  %s:\tA: %d, HP: %d, FP: %d",
+         get_unit_type(attacker->type)->name,
+         att_power, attacker->hp, att_fp);
+  freelog(LOG_NORMAL, "  %s:\tD: %d, HP: %d, FP: %d",
+         get_unit_type(defender->type)->name,
+         def_power, defender->hp, def_fp);
+
   chance = win_chance(att_power, attacker->hp, att_fp,
                      def_power, defender->hp, def_fp);
+
+  freelog(LOG_NORMAL, "  Calculated win chance as %f.", chance);
 
   return chance;
 }

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