Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] [PATCH]: Civ 2 Style Fighters
Home

[Freeciv-Dev] [PATCH]: Civ 2 Style Fighters

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [PATCH]: Civ 2 Style Fighters
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sun, 7 Apr 2002 20:22:12 -0700 (PDT)

According to the Civ 2 Manual:

When a Fighter or Stealth Fighter is stationed in a city that is attacked by
air units other than a fighter, the defending units scramble, gaining a defence
factor four times their normal value. However, they gain no additional
protection from SAM Missile Batteries(because the SAMs don't want to down their
own planes).

This patch implements Civ 2 style fighters.

__________________________________________________
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 Mon Apr  8 09:22:50 2002
+++ freeciv/common/combat.c     Mon Apr  8 09:19:47 2002
@@ -330,8 +330,14 @@
        (is_air_unittype(att_type) || is_heli_unittype(att_type))) {
       defensepower *= 5;
     }
+    
+    if (unit_type_flag(def_type, F_FIGHTER) &&
+       (is_air_unittype(att_type) || is_heli_unittype(att_type))) {
+      defensepower *= 4;
+    }
 
-    if (is_air_unittype(att_type) && pcity) {
+    if (is_air_unittype(att_type) && pcity && 
+    !(unit_type_flag(def_type, F_FIGHTER)) {
       if (city_got_building(pcity, B_SAM)) {
        defensepower *= 2;
       }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [PATCH]: Civ 2 Style Fighters, Raahul Kumar <=