Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10109) Add Eiffel tower
Home

[Freeciv-Dev] (PR#10109) Add Eiffel tower

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10109) Add Eiffel tower
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 14 Sep 2004 12:33:22 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10109 >

This adds the Eiffel tower to the default ruleset. This is a nice newbie
wonder. Makes AIs love your more and your reputation recover faster. If
having trouble with AIs hating you, this might be your thing.

I did not test it a whole lot.

Update mandatory capability string before committing.

It is not the same as the Civ2 wonder by the same name. AFAICT the civ2
Eiffel tower works differently (one time benefit).

  - Per

Index: ai/advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.38
diff -u -r1.38 advdiplomacy.c
--- ai/advdiplomacy.c   14 Sep 2004 09:09:22 -0000      1.38
+++ ai/advdiplomacy.c   14 Sep 2004 19:26:55 -0000
@@ -740,6 +740,10 @@
       MIN(player_in_territory(pplayer, aplayer),
           pplayers_allied(aplayer, pplayer) ? 
            ai->diplomacy.love_incr - 1 : 50) * 10;
+
+    /* Eiffel tower is so large it clouds AIs' vision. */
+    pplayer->ai.love[aplayer->player_no] += get_player_bonus(aplayer, 
+                                                             EFT_GAIN_AI_LOVE);
          
     /* Massage our numbers to keep love and its opposite on the ground. 
      * Gravitate towards zero. */
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.192
diff -u -r1.192 srv_main.c
--- server/srv_main.c   14 Sep 2004 03:48:01 -0000      1.192
+++ server/srv_main.c   14 Sep 2004 19:26:56 -0000
@@ -48,6 +48,7 @@
 #include "capstr.h"
 #include "city.h"
 #include "dataio.h"
+#include "effects.h"
 #include "events.h"
 #include "fciconv.h"
 #include "fcintl.h"
@@ -437,7 +438,9 @@
        }
         }
     } players_iterate_end;
-    player1->reputation = MIN(player1->reputation + GAME_REPUTATION_INCR,
+    player1->reputation = MIN(get_player_bonus(player1, EFT_REGEN_REPUTATION)
+                              + player1->reputation 
+                              + GAME_REPUTATION_INCR,
                              GAME_MAX_REPUTATION);
   } players_iterate_end;
 }
Index: common/effects.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.c,v
retrieving revision 1.10
diff -u -r1.10 effects.c
--- common/effects.c    13 Sep 2004 18:14:19 -0000      1.10
+++ common/effects.c    14 Sep 2004 19:26:56 -0000
@@ -127,7 +127,9 @@
   "Air_Defend",
   "Missile_Defend",
   "No_Upkeep",
-  "No_Incite"
+  "No_Incite",
+  "Regen_Reputation",
+  "Gain_AI_Love"
 };
 
 /**************************************************************************
Index: common/effects.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.h,v
retrieving revision 1.7
diff -u -r1.7 effects.h
--- common/effects.h    13 Sep 2004 15:54:51 -0000      1.7
+++ common/effects.h    14 Sep 2004 19:26:56 -0000
@@ -114,6 +114,8 @@
   EFT_MISSILE_DEFEND,
   EFT_NO_UPKEEP,
   EFT_NO_INCITE,
+  EFT_REGEN_REPUTATION,
+  EFT_GAIN_AI_LOVE,
   EFT_LAST     /* keep this last */
 };
 
Index: data/default/buildings.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/buildings.ruleset,v
retrieving revision 1.52
diff -u -r1.52 buildings.ruleset
--- data/default/buildings.ruleset      13 Sep 2004 15:54:53 -0000      1.52
+++ data/default/buildings.ruleset      14 Sep 2004 19:26:56 -0000
@@ -1523,7 +1522,7 @@
 
 [building_eiffel_tower]
 name           = _("Eiffel Tower")
-tech_req       = "Never"               ; "Steam Engine"
+tech_req       = "Steam Engine"
 bldg_req       = "None"
 graphic        = "b.eiffel_tower"
 graphic_alt    = "-"
@@ -1534,18 +1533,22 @@
 ;equiv_repl    =
 obsolete_by    = "None"
 is_wonder      = 1
-build_cost     = 300
+build_cost     = 150
 upkeep         = 0
 sabotage       = 0
+effect         =
+    { "name", "range", "value"
+      "Regen_Reputation", "Player", 1
+      "Gain_AI_Love", "Player", 20
+    }
 sound          = "w_eiffel_tower"
 sound_alt      = "w_generic"
 ; /* xgettext:no-c-format */
 helptext       = _("\
-When built, every civilization's attitude toward you is improved\
- by 25%.\
+Your reputation and goodwill among other nations is increased\
+ while you possess this wonder.  Reputation is recovered 50%
+ faster than it would otherwise.\
 ")
-; NOTE:
-; Not implemented.
 
 [building_great_library]
 name           = _("Great Library")

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10109) Add Eiffel tower, Per I. Mathisen <=