[Freeciv-Dev] Re: (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] Re: (PR#10109) Add Eiffel tower |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Tue, 14 Sep 2004 12:58:38 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10109 >
Yet a new patch. Forgot the add one file containing vital AI building
support. Also increased reputation recovery by 1, as requested by Mateusz.
- 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 = 100
upkeep = 0
sabotage = 0
+effect =
+ { "name", "range", "value"
+ "Regen_Reputation", "Player", 2
+ "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")
Index: doc/README.effects
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/README.effects,v
retrieving revision 1.3
diff -u -r1.3 README.effects
--- doc/README.effects 13 Sep 2004 15:54:53 -0000 1.3
+++ doc/README.effects 14 Sep 2004 19:41:34 -0000
@@ -148,6 +148,9 @@
"Air_Vet_Combat"- Increases the chance of units of this type becoming veteran
after combat by AMOUNT percent
+"Gain_AI_Love" - Increase AI's love for you by AMOUNT points per turn
+"Regen_Reputation" - Increase your reputation by AMOUNT points per turn
+
.range may be one of:
"None", "Local", "City", "Continent", "Player", "World"
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.163
diff -u -r1.163 aicity.c
--- ai/aicity.c 13 Sep 2004 15:54:49 -0000 1.163
+++ ai/aicity.c 14 Sep 2004 19:56:56 -0000
@@ -438,6 +442,20 @@
- game.incite_cost.unit_factor * 5, 0);
}
break;
+ case EFT_REGEN_REPUTATION:
+ v += (GAME_MAX_REPUTATION - pplayer->reputation) / 15;
+ break;
+ case EFT_GAIN_AI_LOVE:
+ players_iterate(aplayer) {
+ if (aplayer->ai.control) {
+ if (ai_handicap(pplayer, H_DEFENSIVE)) {
+ v += 4;
+ } else {
+ v += 2;
+ }
+ }
+ } players_iterate_end;
+ break;
case EFT_LAST:
freelog(LOG_ERROR, "Bad effect type.");
break;
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Per I. Mathisen, 2004/09/14
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower,
Per I. Mathisen <=
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Per I. Mathisen, 2004/09/14
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Jason Short, 2004/09/14
- [Freeciv-Dev] (PR#10109) Add Eiffel tower, Gregory Berkolaiko, 2004/09/15
- [Freeciv-Dev] (PR#10109) Add Eiffel tower, Jason Short, 2004/09/17
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Jason Short, 2004/09/17
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Mateusz Stefek, 2004/09/17
- [Freeciv-Dev] (PR#10109) Add Eiffel tower, Mateusz Stefek, 2004/09/19
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Mike Kaufman, 2004/09/19
- [Freeciv-Dev] Re: (PR#10109) Add Eiffel tower, Per I. Mathisen, 2004/09/20
- [Freeciv-Dev] (PR#10109) Add Eiffel tower, Mateusz Stefek, 2004/09/20
|
|