Author: sveinung
Date: Fri Mar 21 15:31:03 2014
New Revision: 24705

URL: http://svn.gna.org/viewcvs/freeciv?rev=24705&view=rev
Log:
Replace the No_Incite effect with the Incite City action enabler.

Rules to prevent inciting a city can be expressed using target requirements in
the action enablers of the Incite City action. The No_Incite effect is
therefore redundant. Remove it for the sake of simplicity. Port all rules in the
bundled rulesets from No_incite to Incite City.

See patch #4624

Modified:
    trunk/ai/default/aicity.c
    trunk/client/helpdata.c
    trunk/common/effects.h
    trunk/data/alien/effects.ruleset
    trunk/data/alien/game.ruleset
    trunk/data/civ1/effects.ruleset
    trunk/data/civ1/game.ruleset
    trunk/data/civ2/effects.ruleset
    trunk/data/civ2/game.ruleset
    trunk/data/civ2civ3/effects.ruleset
    trunk/data/civ2civ3/game.ruleset
    trunk/data/classic/effects.ruleset
    trunk/data/classic/game.ruleset
    trunk/data/multiplayer/effects.ruleset
    trunk/data/multiplayer/game.ruleset
    trunk/doc/README.effects
    trunk/doc/README.ruleset_civ2civ3
    trunk/server/advisors/advdata.c
    trunk/server/cityturn.c
    trunk/server/diplomats.c

Modified: trunk/ai/default/aicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/ai/default/aicity.c   (original)
+++ trunk/ai/default/aicity.c   Fri Mar 21 15:31:03 2014
@@ -1471,14 +1471,6 @@
           v += amount / (!ai->threats.igwall ? (15 - capital * 5) : 15);
         }
       }
-    }
-    break;
-  case EFT_NO_INCITE:
-    if (get_city_bonus(pcity, EFT_NO_INCITE) <= 0) {
-      v += MAX((game.server.diplchance * 2
-                - game.server.incite_total_factor) / 2
-               - game.server.incite_improvement_factor * 5
-               - game.server.incite_unit_factor * 5, 0);
     }
     break;
   case EFT_GAIN_AI_LOVE:

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Fri Mar 21 15:31:03 2014
@@ -3273,12 +3273,6 @@
           cat_snprintf(buf, bufsz, "\n");
         }
         break;
-      case EFT_NO_INCITE:
-        if (playerwide && net_value > 0) {
-          CATLSTR(buf, bufsz, _("* Your cities cannot be incited to "
-                                "revolt.\n"));
-        }
-        break;
       case EFT_REVOLUTION_UNHAPPINESS:
         if (playerwide) {
           cat_snprintf(buf, bufsz,

Modified: trunk/common/effects.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/effects.h?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/common/effects.h      (original)
+++ trunk/common/effects.h      Fri Mar 21 15:31:03 2014
@@ -138,8 +138,8 @@
 /* Interacts with F_BADWALLATTACKER, ignored by F_IGWALL */
 #define SPECENUM_VALUE47 EFT_DEFEND_BONUS
 #define SPECENUM_VALUE47NAME "Defend_Bonus"
-#define SPECENUM_VALUE48 EFT_NO_INCITE
-#define SPECENUM_VALUE48NAME "No_Incite"
+#define SPECENUM_VALUE48 EFT_TRADEROUTE_PCT
+#define SPECENUM_VALUE48NAME "Traderoute_Pct"
 #define SPECENUM_VALUE49 EFT_GAIN_AI_LOVE
 #define SPECENUM_VALUE49NAME "Gain_AI_Love"
 #define SPECENUM_VALUE50 EFT_TURN_YEARS
@@ -254,8 +254,6 @@
 #define SPECENUM_VALUE97NAME "Performance"
 #define SPECENUM_VALUE98 EFT_HISTORY
 #define SPECENUM_VALUE98NAME "History"
-#define SPECENUM_VALUE99 EFT_TRADEROUTE_PCT
-#define SPECENUM_VALUE99NAME "Traderoute_Pct"
 /* keep this last */
 #define SPECENUM_COUNT EFT_COUNT
 #include "specenum_gen.h"

Modified: trunk/data/alien/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/alien/effects.ruleset    (original)
+++ trunk/data/alien/effects.ruleset    Fri Mar 21 15:31:03 2014
@@ -529,14 +529,6 @@
       "Building", "Hospital", "City"
     }
 
-[effect_bunker_noincite]
-type    = "No_Incite"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Bunker", "City"
-    }
-
 [effect_headquarters_capital]
 type    = "Capital_City"
 value  = 1
@@ -547,14 +539,6 @@
 
 [effect_headquarters_gc]
 type    = "Gov_Center"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Headquarters", "City"
-    }
-
-[effect_headquarters_2]
-type    = "No_Incite"
 value  = 1
 reqs   =
     { "type", "name", "range"

Modified: trunk/data/alien/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/alien/game.ruleset       (original)
+++ trunk/data/alien/game.ruleset       Fri Mar 21 15:31:03 2014
@@ -223,6 +223,11 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs    =
+    { "type",   "name", "range", "present"
+      "Building", "Bunker", "City", FALSE
+      "Building", "Headquarters", "City", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/data/civ1/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ1/effects.ruleset     (original)
+++ trunk/data/civ1/effects.ruleset     Fri Mar 21 15:31:03 2014
@@ -485,14 +485,6 @@
 
 [effect_rapture_grow_1]
 type    = "Rapture_Grow"
-value   = 1
-reqs    =
-    { "type",       "name",      "range"
-      "Gov", "Democracy", "Player"
-    }
-
-[effect_democracy_0]
-type    = "No_Incite"
 value   = 1
 reqs    =
     { "type",       "name",      "range"
@@ -819,14 +811,6 @@
     }
 
 [effect_palace_3]
-type    = "No_Incite"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Palace", "City"
-    }
-
-[effect_palace_4]
 type    = "Capital_City"
 value  = 1
 reqs   =

Modified: trunk/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ1/game.ruleset        (original)
+++ trunk/data/civ1/game.ruleset        Fri Mar 21 15:31:03 2014
@@ -208,6 +208,11 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs  =
+    { "type",   "name", "range", "present"
+      "Gov", "Democracy", "Player", FALSE
+      "Building", "Palace", "City", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/data/civ2/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ2/effects.ruleset     (original)
+++ trunk/data/civ2/effects.ruleset     Fri Mar 21 15:31:03 2014
@@ -736,14 +736,6 @@
       "Gov", "Democracy", "Player"
     }
 
-[effect_democracy_0]
-type    = "No_Incite"
-value   = 1
-reqs    =
-    { "type",       "name",      "range"
-      "Gov", "Democracy", "Player"
-    }
-
 [effect_communism_0]
 type    = "Veteran_Build"
 value   = 1
@@ -1343,14 +1335,6 @@
     }
 
 [effect_palace_3]
-type    = "No_Incite"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Palace", "City"
-    }
-
-[effect_palace_4]
 type    = "Capital_City"
 value  = 1
 reqs   =

Modified: trunk/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ2/game.ruleset        (original)
+++ trunk/data/civ2/game.ruleset        Fri Mar 21 15:31:03 2014
@@ -236,6 +236,11 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs  =
+    { "type",   "name", "range", "present"
+      "Gov", "Democracy", "Player", FALSE
+      "Building", "Palace", "City", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/data/civ2civ3/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ2civ3/effects.ruleset (original)
+++ trunk/data/civ2civ3/effects.ruleset Fri Mar 21 15:31:03 2014
@@ -1409,22 +1409,6 @@
       "Gov", "Democracy", "Player"
     }
 
-[effect_incite_federation]
-type    = "No_Incite"
-value   = 1
-reqs    =
-    { "type", "name", "range"
-      "Gov", "Federation", "Player"
-    }
-
-[effect_incite_democracy]
-type    = "No_Incite"
-value   = 1
-reqs    =
-    { "type", "name", "range"
-      "Gov", "Democracy", "Player"
-    }
-
 [effect_senate_federation]
 type    = "Has_Senate"
 value   = 1
@@ -2236,14 +2220,6 @@
     }
 
 [effect_palace_3]
-type    = "No_Incite"
-value   = 1
-reqs    =
-    { "type", "name", "range"
-      "Building", "Palace", "City"
-    }
-
-[effect_palace_4]
 type    = "Capital_City"
 value   = 1
 reqs    =
@@ -3065,14 +3041,6 @@
       "Building", "Mausoleum of Mausolos", "Player"
     }
 
-[effect_mausoleum_of_mausolos_2]
-type    = "No_Incite"
-value   = 1
-reqs    =
-    { "type", "name", "range"
-      "Building", "Mausoleum of Mausolos", "Player"
-    }
-
 [effect_statue_of_zeus]
 type    = "Make_Content_Mil"
 value   = 1

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/civ2civ3/game.ruleset    (original)
+++ trunk/data/civ2civ3/game.ruleset    Fri Mar 21 15:31:03 2014
@@ -277,6 +277,13 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs  =
+    { "type",   "name", "range", "present"
+      "Gov", "Federation", "Player", FALSE
+      "Gov", "Democracy", "Player", FALSE
+      "Building", "Palace", "City", FALSE
+      "Building", "Mausoleum of Mausolos", "Player", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/data/classic/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/classic/effects.ruleset  (original)
+++ trunk/data/classic/effects.ruleset  Fri Mar 21 15:31:03 2014
@@ -572,14 +572,6 @@
 [effect_rapture_grow_1]
 type    = "Rapture_Grow"
 value   = 3
-reqs   =
-    { "type",       "name",      "range"
-      "Gov", "Democracy", "Player"
-    }
-
-[effect_democracy_0]
-type    = "No_Incite"
-value   = 1
 reqs   =
     { "type",       "name",      "range"
       "Gov", "Democracy", "Player"
@@ -1261,14 +1253,6 @@
     }
 
 [effect_palace_3]
-type    = "No_Incite"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Palace", "City"
-    }
-
-[effect_palace_4]
 type    = "Capital_City"
 value  = 1
 reqs   =

Modified: trunk/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/classic/game.ruleset     (original)
+++ trunk/data/classic/game.ruleset     Fri Mar 21 15:31:03 2014
@@ -269,6 +269,11 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs  =
+    { "type",   "name", "range", "present"
+      "Gov", "Democracy", "Player", FALSE
+      "Building", "Palace", "City", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/data/multiplayer/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/effects.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/multiplayer/effects.ruleset      (original)
+++ trunk/data/multiplayer/effects.ruleset      Fri Mar 21 15:31:03 2014
@@ -577,14 +577,6 @@
       "Gov", "Democracy", "Player"
     }
 
-[effect_democracy_0]
-type    = "No_Incite"
-value   = 1
-reqs   =
-    { "type",       "name",      "range"
-      "Gov", "Democracy", "Player"
-    }
-
 [effect_communism_0]
 type    = "Veteran_Build"
 value   = 1
@@ -1209,14 +1201,6 @@
     }
 
 [effect_palace_3]
-type    = "No_Incite"
-value  = 1
-reqs   =
-    { "type", "name", "range"
-      "Building", "Palace", "City"
-    }
-
-[effect_palace_4]
 type    = "Capital_City"
 value  = 1
 reqs   =

Modified: trunk/data/multiplayer/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/data/multiplayer/game.ruleset (original)
+++ trunk/data/multiplayer/game.ruleset Fri Mar 21 15:31:03 2014
@@ -273,6 +273,11 @@
     { "type",   "name", "range", "present"
       "DiplRel", "Alliance", "Local", FALSE
       "DiplRel", "Team", "Local", FALSE
+    }
+target_reqs  =
+    { "type",   "name", "range", "present"
+      "Gov", "Democracy", "Player", FALSE
+      "Building", "Palace", "City", FALSE
     }
 
 [actionenabler_bribe_unit]

Modified: trunk/doc/README.effects
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.effects?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/doc/README.effects    (original)
+++ trunk/doc/README.effects    Fri Mar 21 15:31:03 2014
@@ -273,9 +273,6 @@
 attackers with "IgWall" flag. Attackers with "BadWallAttacker" flag will have
 their firepower set to 1.
 
-No_Incite
-    City cannot be incited.
-
 Gain_AI_Love
     Gain amount points of "AI love" with AI(s).
 

Modified: trunk/doc/README.ruleset_civ2civ3
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.ruleset_civ2civ3?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/doc/README.ruleset_civ2civ3   (original)
+++ trunk/doc/README.ruleset_civ2civ3   Fri Mar 21 15:31:03 2014
@@ -197,7 +197,7 @@
 - "Martial Law": Max 3 units can apply Martial Law (was max 20 for Despotism 
and Anarchy).
 
 - The bonus "+1 Trade" under Republic and Democracy does not affect oceanic 
tiles. This way, oceanic tiles are more even to land tiles under any government.
-- Republic receives Revolution_When_Unhappy and has unbribable units, 
Federation receives Has_senate and No_Incite (Democracy receives all them).
+- Republic receives Revolution_When_Unhappy and has unbribable units, 
Federation receives Has_senate and has unincitable cities (Democracy receives 
all them).
 - Under Tribal government, every Military Land unit gains an additional 
movement point. They are tribal warriors, maintained with Shields instead of 
Gold.
 - Under Communism you do not pay upkeep for buildings that cost 1 Gold. 
Communism cancels the bonus from Mysticism and Theology (to Temples and 
Cathedrals).
 - Under Fundamentalism you receive extra Gold from Tithes, but -50% to Science.

Modified: trunk/server/advisors/advdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/advisors/advdata.c?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/server/advisors/advdata.c     (original)
+++ trunk/server/advisors/advdata.c     Fri Mar 21 15:31:03 2014
@@ -830,9 +830,6 @@
       bonus += get_player_bonus(pplayer, EFT_VETERAN_BUILD) > 0 ? 3 : 0;
       if (action_immune_government(gov, ACTION_SPY_INCITE_CITY)) {
         bonus += 4;
-      } else {
-        /* Don't give the same bonus twice */
-        bonus += get_player_bonus(pplayer, EFT_NO_INCITE) > 0 ? 4 : 0;
       }
       if (action_immune_government(gov, ACTION_SPY_BRIBE_UNIT)) {
         bonus += 2;

Modified: trunk/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/server/cityturn.c     (original)
+++ trunk/server/cityturn.c     Fri Mar 21 15:31:03 2014
@@ -2312,10 +2312,6 @@
   int dist, size;
   double cost; /* Intermediate values can get very large */
 
-  if (get_city_bonus(pcity, EFT_NO_INCITE) > 0) {
-    return INCITE_IMPOSSIBLE_COST;
-  }
-
   /* Gold factor */
   cost = city_owner(pcity)->economic.gold + game.server.base_incite_cost;
 

Modified: trunk/server/diplomats.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/diplomats.c?rev=24705&r1=24704&r2=24705&view=diff
==============================================================================
--- trunk/server/diplomats.c    (original)
+++ trunk/server/diplomats.c    Fri Mar 21 15:31:03 2014
@@ -654,15 +654,6 @@
   }
 
   log_debug("incite: unit: %d", pdiplomat->id);
-
-  /* See if the city is subvertable. */
-  if (get_city_bonus(pcity, EFT_NO_INCITE) > 0) {
-    notify_player(pplayer, city_tile(pcity),
-                  E_MY_DIPLOMAT_FAILED, ftc_server,
-                  _("You can't subvert this city."));
-    log_debug("incite: city is protected");
-    return;
-  }
 
   /* Get incite cost, ignoring any previously saved value. */
   revolt_cost = city_incite_cost(pplayer, pcity);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to