Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Helicopters Civ 2 Style (PR#1372)
Home

[Freeciv-Dev] Helicopters Civ 2 Style (PR#1372)

[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] Helicopters Civ 2 Style (PR#1372)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sat, 13 Apr 2002 01:46:16 -0700 (PDT)

On page 105 of Civ 2 Manual it states

When a Fighter or Stealth Fighter attacks a helicopter unit, the helicopter's
disadvantage is represented by reducing its firepower to one and reducing its
defense factor by 50 percent. 

Tested: April 08 CVS
Compiles cleanly.

__________________________________________________
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 Wed Apr 10 13:54:24 2002
+++ freeciv/common/combat.c     Sat Apr 13 18:27:17 2002
@@ -118,6 +118,10 @@
   /* pearl harbour */
   if (is_sailing_unit(defender) && map_get_city(defender->x, defender->y))
     *def_fp = 1;
+  
+  /* When attacked by fighters, helicopters have their firepower reduced to 1*/
+  if (is_heli_unit(defender) && unit_flag(attacker, F_FIGHTER))
+    *def_fp = 1;
 
   /* In land bombardment both units have their firepower reduced to 1 */
   if (is_sailing_unit(attacker)
@@ -331,6 +335,11 @@
       defensepower *= 5;
     }
 
+    if (unit_type_flag(att_type, F_FIGHTER) 
+    && is_heli_unittype(def_type)) {
+      defensepower /= 2;
+    }
+         
     if (is_air_unittype(att_type) && pcity) {
       if (city_got_building(pcity, B_SAM)) {
        defensepower *= 2;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Helicopters Civ 2 Style (PR#1372), Raahul Kumar <=