Author: jtn
Date: Wed May 27 23:53:51 2015
New Revision: 29130

URL: http://svn.gna.org/viewcvs/freeciv?rev=29130&view=rev
Log:
civ2civ3: Prevent building farmland on desert without food bonus.
It would provide no bonus, and prevent Super Highways bonus.

See gna bug #23609.

Modified:
    trunk/data/civ2civ3/effects.ruleset
    trunk/data/civ2civ3/terrain.ruleset

Modified: trunk/data/civ2civ3/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/effects.ruleset?rev=29130&r1=29129&r2=29130&view=diff
==============================================================================
--- trunk/data/civ2civ3/effects.ruleset (original)
+++ trunk/data/civ2civ3/effects.ruleset Wed May 27 23:53:51 2015
@@ -2750,7 +2750,7 @@
 
 ; City center tiles only get the trade bonus if they aren't benefiting from
 ; 'automatic' farmland (the following clauses duplicate terms from
-; Supermarket rules)
+; Supermarket and Irrig_Possible rules)
 
 ; City without Supermarket doesn't get farmland bonus => can get trade bonus
 [effect_super_highways_city_center_1]
@@ -2797,6 +2797,7 @@
     }
 
 ; Otherwise, it can't get farmland bonus if terrain can't be irrigated
+; (desert terrain can be irrigated so will not match this clause)
 [effect_super_highways_city_center_4]
 type    = "Output_Inc_Tile"
 value   = 1
@@ -2810,6 +2811,26 @@
       "Extra", "Mine", "Local", FALSE
       "Extra", "Oil Well", "Local", FALSE
       "TerrainAlter", "CanIrrigate", "Local", FALSE
+      "Extra", "Farmland", "Local", FALSE
+    }
+
+; Otherwise, it can't get farmland bonus if underlying terrain is bare
+; desert on which building farmland is prohibited (see Irrig_Possible rules)
+[effect_super_highways_city_center_5]
+type    = "Output_Inc_Tile"
+value   = 1
+reqs    =
+    { "type", "name", "range", "present"
+      "Extra", "Road", "Local", TRUE
+      "Building", "Super Highways", "City", TRUE
+      "OutputType", "Trade", "Local", TRUE
+      "CityTile", "Center", "Local", TRUE
+      "Building", "Supermarket", "City", TRUE
+      "Terrain", "Desert", "Local", TRUE
+      "Resource", "Oasis", "Local", FALSE
+      "Extra", "River", "Local", FALSE
+      ; Desert cannot have mine, only oil well
+      "Extra", "Oil Well", "Local", FALSE
       "Extra", "Farmland", "Local", FALSE
     }
 
@@ -3739,6 +3760,24 @@
       "UnitClass", "Sea", "Local", FALSE
     }
 
+; Prevent building farmland on bare deserts. It does not yield any bonus
+; over irrigation, and prevents any Super Highways trade bonus, so it
+; would be a waste of time.
+; (Note that it is still possible to end up with farmland on such terrain
+; through climate change.)
+; Deserts with food bonuses _are_ allowed farmland (hence exceptions).
+; -4 counterbalances all the above positive Irrig_Possible effects
+[effect_no_desert_farmland_1]
+type    = "Irrig_Possible"
+value   = -4
+reqs    =
+    { "type", "name", "range", "present"
+      "Terrain", "Desert", "Local", TRUE
+      "Extra", "Irrigation", "Local", TRUE
+      "Resource", "Oasis", "Local", FALSE
+      "Extra", "River", "Local", FALSE
+    }
+
 [effect_mining]
 type    = "Mining_Possible"
 value   = 1

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=29130&r1=29129&r2=29130&view=diff
==============================================================================
--- trunk/data/civ2civ3/terrain.ruleset (original)
+++ trunk/data/civ2civ3/terrain.ruleset Wed May 27 23:53:51 2015
@@ -1208,6 +1208,8 @@
 act_gfx_alt    = "unit.irrigate"
 rmact_gfx      = "None"
 rmact_gfx_alt  = "-"
+; Note, there are extra restrictions on where farmland can be built
+; through Irrig_Possible effects
 reqs           =
     { "type", "name", "range"
       "Tech", "Refrigeration", "Player"


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

Reply via email to