Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Pearl Harbour (PR#1373)
Home

[Freeciv-Dev] Pearl Harbour (PR#1373)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Pearl Harbour (PR#1373)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sat, 13 Apr 2002 05:27:59 -0700 (PDT)

There is a bug that Pearl Harbour scenario in combat.c does not increase the
attackers firepower by 2 as it should. Patch attached fixes this. It's a
oneliner, it would be quicker to read the patch than the description.

Tested: Apr 12 CVS. Compiles.

Civ 2 Manual quote - P 107 - Pearl Harbour

When air units or ground units attack ships in port(naval units defend a city
against air units), the attackers firepower is doubled against the defending
units and defenders' firepower is reduced to one, to represent the defenders
vulnerability.

Bomb those yanks ;-). I suggest yelling "Banzai" as you do so.

Aloha,
RK.

Over the centuries, mankind has tried many ways of combating the forces of
evil... prayer, fasting, good works and so on. Up until Doom, no one seemed to
have thought about the double-barrel shotgun. Eat leaden death, demon...
{on Usenet group alt.fan.pratchett, Terry Pratchett}

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
diff -ruN -Xdiff_ignore cvs-freeciv/common/combat.c freeciv/common/combat.c
--- cvs-freeciv/common/combat.c Thu Apr  4 02:11:33 2002
+++ freeciv/common/combat.c     Sat Apr 13 22:11:21 2002
@@ -115,10 +115,12 @@
   *att_fp = unit_type(attacker)->firepower;
   *def_fp = unit_type(defender)->firepower;
 
-  /* pearl harbour */
-  if (is_sailing_unit(defender) && map_get_city(defender->x, defender->y))
+  /* pearl harbour - defenders firepower is reduced to one, attackers is  
+   multiplied by two */
+  if (is_sailing_unit(defender) && map_get_city(defender->x, defender->y)){
+    *att_fp *= 2;
     *def_fp = 1;
-
+  }
   /* In land bombardment both units have their firepower reduced to 1 */
   if (is_sailing_unit(attacker)
       && map_get_terrain(defender->x, defender->y) != T_OCEAN

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