[Freeciv-Dev] (PR#8754) effects patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#8754) effects patch |
From: |
"Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx> |
Date: |
Wed, 19 May 2004 17:16:41 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8754 >
> [vasc - Wed May 19 22:57:42 2004]:
>
> Here is the patch for using equiv_range in city_affected_by_wonder.
Turns out Hoover and Bach's only is continent wide in Civ1. Thanks go to
Jason for spotting it. The bonus is this makes the patch smaller...
diff -Nurd -X diff_ignore fc/common/city.c freeciv/common/city.c
--- fc/common/city.c 2004-05-19 23:49:13.536725376 +0100
+++ freeciv/common/city.c 2004-05-20 00:00:06.439469072 +0100
@@ -1080,47 +1080,18 @@
* Otherwise the player who owns the city needs to have it to
* get the effect.
*/
- if (id==B_MANHATTEN)
- return (game.global_wonders[id] != 0);
-
tmp = player_find_city_by_id(city_owner(pcity), game.global_wonders[id]);
if (!tmp)
return FALSE;
- switch (id) {
- case B_ASMITHS:
- case B_APOLLO:
- case B_CURE:
- case B_GREAT:
- case B_WALL:
- case B_HANGING:
- case B_ORACLE:
- case B_UNITED:
- case B_WOMENS:
- case B_DARWIN:
- case B_LIGHTHOUSE:
- case B_MAGELLAN:
- case B_MICHELANGELO:
- case B_SETI:
- case B_PYRAMIDS:
- case B_LIBERTY:
- case B_SUNTZU:
- return TRUE;
- case B_ISAAC:
- case B_COPERNICUS:
- case B_SHAKESPEARE:
- case B_COLLOSSUS:
- case B_RICHARDS:
- return FALSE;
- case B_HOOVER:
- case B_BACH:
- if (improvement_variant(id)==1) {
+
+ switch (get_improvement_type(id)->equiv_range) {
+ case IR_PLAYER:
+ return TRUE;
+ case IR_ISLAND:
return (map_get_continent(tmp->x, tmp->y) ==
map_get_continent(pcity->x, pcity->y));
- } else {
- return TRUE;
- }
- default:
- return FALSE;
+ default:
+ return FALSE;
}
}
- [Freeciv-Dev] Re: (PR#8754) effects patch, Per Inge Mathisen, 2004/05/17
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/17
- [Freeciv-Dev] Re: (PR#8754) effects patch (2), Per Inge Mathisen, 2004/05/17
- [Freeciv-Dev] Re: (PR#8754) effects patch, Jason Short, 2004/05/17
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/19
- [Freeciv-Dev] (PR#8754) effects patch v2, Vasco Alexandre da Silva Costa, 2004/05/19
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/19
- [Freeciv-Dev] (PR#8754) effects patch,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] (PR#8754) fix civ1 ruleset equiv_range for Hoover and Bach, Vasco Alexandre da Silva Costa, 2004/05/19
- [Freeciv-Dev] (PR#8754) effects patch: everlasting wonders, Vasco Alexandre da Silva Costa, 2004/05/19
- [Freeciv-Dev] Re: (PR#8754) effects patch: everlasting wonders, Per Inge Mathisen, 2004/05/20
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/20
- [Freeciv-Dev] (PR#8754) effects patch v3, Vasco Alexandre da Silva Costa, 2004/05/21
- [Freeciv-Dev] (PR#8754) effects patch, Jason Short, 2004/05/26
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/28
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/28
- [Freeciv-Dev] (PR#8754) effects patch, Vasco Alexandre da Silva Costa, 2004/05/29
- [Freeciv-Dev] (PR#8754) effects patch, Marcelo Burda, 2004/05/31
|
|