From 13f6d6938e1c8600ae0101b8e5076af46a08bfff Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 20 Mar 2024 16:51:39 +0200
Subject: [PATCH 35/35] Granularity: Add Iron

- Add tech Iron Working
- Add terrain Mountains
- Add resource Iron
- Move also tech Herbs to correct alphabetic position

See RM #329

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 data/granularity/effects.ruleset | 10 +++++
 data/granularity/techs.ruleset   | 35 +++++++++------
 data/granularity/terrain.ruleset | 74 +++++++++++++++++++++++++++++++-
 3 files changed, 106 insertions(+), 13 deletions(-)

diff --git a/data/granularity/effects.ruleset b/data/granularity/effects.ruleset
index 2fa8aa4794..cadeba19a6 100644
--- a/data/granularity/effects.ruleset
+++ b/data/granularity/effects.ruleset
@@ -237,6 +237,16 @@ reqs	=
       "OutputType", "Food",              "Local"
     }
 
+[effect_iron]
+type    = "Output_Add_Tile"
+value   = 200
+reqs	=
+    { "type",       "name",         "range"
+      "Extra",      "Iron",         "Tile"
+      "Tech",       "Iron Working", "Player"
+      "OutputType", "Shield",       "Local"
+    }
+
 [effect_rock_pile_capital]
 type    = "Capital_City"
 value	= 1
diff --git a/data/granularity/techs.ruleset b/data/granularity/techs.ruleset
index 0015e6e225..8d93470734 100644
--- a/data/granularity/techs.ruleset
+++ b/data/granularity/techs.ruleset
@@ -304,18 +304,6 @@ graphic     = "a.food_preservation"
 graphic_alt = "-"
 ;helptext    =
 
-[advance_herbs]
-name        = _("Herbs")
-req1        = "Rituals"
-req2        = "None"
-flags       = ""
-graphic     = "a.herbs"
-graphic_alt = "-"
-helptext    = _("\
-Makes units that do not move during the turn to heal additional 10% of their maximum hitpoints. \
-Outside cities that might be the only healing they do.\
-")
-
 [advance_geometry]
 name        = _("Geometry")
 req1        = "Masonry"
@@ -334,6 +322,29 @@ graphic     = "a.government"
 graphic_alt = "-"
 ;helptext    =
 
+[advance_herbs]
+name        = _("Herbs")
+req1        = "Rituals"
+req2        = "None"
+flags       = ""
+graphic     = "a.herbs"
+graphic_alt = "-"
+helptext    = _("\
+Makes units that do not move during the turn to heal additional 10% of their maximum hitpoints. \
+Outside cities that might be the only healing they do.\
+")
+
+[advance_iron_working]
+name        = _("Iron Working")
+req1        = "Plow"
+req2        = "Bronze Weapons"
+flags       = ""
+graphic     = "a.iron_working"
+graphic_alt = "-"
+helptext    = _("\
+Make iron available.\
+")
+
 [advance_horseback_riding]
 name        = _("Horseback Riding")
 req1        = "Animal Taming"
diff --git a/data/granularity/terrain.ruleset b/data/granularity/terrain.ruleset
index eb8d81c838..5977697994 100644
--- a/data/granularity/terrain.ruleset
+++ b/data/granularity/terrain.ruleset
@@ -308,6 +308,53 @@ helptext	     = _("\
 Forest provides easily harvested resources.\
 ")
 
+[terrain_mountains]
+name                 = _("Mountains")
+graphic              = "mountains"
+graphic_alt	     = "-"
+graphic_alt2         = "-"
+identifier	     = "m"
+class                = "Land"
+movement_cost        = 50
+defense_bonus        = 100
+food                 = 0
+shield               = 100
+trade                = 0
+resources            = "Iron"
+road_food_incr_pct   = 0
+road_shield_incr_pct = 0
+road_trade_incr_pct  = 0
+base_time            = 5
+road_time            = 5
+cultivate_result     = "no"
+cultivate_time       = 0
+plant_result         = "no"
+plant_time           = 0
+irrigation_food_incr = 0
+irrigation_time      = 0
+mining_shield_incr   = 0
+mining_time          = 20
+transform_result     = "no"
+transform_time       = 0
+placing_time         = 5
+pillage_time         = 1
+extra_settings       =
+    { "extra", "removal_time"
+    }
+animal               = "None"
+warmer_wetter_result = "no"
+warmer_drier_result  = "no"
+cooler_wetter_result = "no"
+cooler_drier_result  = "no"
+native_to            = "Land"
+flags                = "CanHaveRiver"
+property_mountainous = 75
+color.r              = 129
+color.g              = 127
+color.b              = 118
+helptext	     = _("\
+Hard to farm. Hard to develop. Hard to pass.\
+")
 
 [terrain_plains]
 name                 = _("Plains")
@@ -475,6 +522,13 @@ Deep Ocean usually exist further away from the land.\
 ;
 ; */ <-- avoid gettext warnings
 
+[resource_iron]
+extra       = "Iron"
+food        = 0
+shield      = 0
+trade       = 0
+identifier  = "/"
+
 [resource_generic]
 extra       = "Generic Resource"
 food        = 0
@@ -482,7 +536,6 @@ shield      = 0
 trade       = 100
 identifier  = "g"
 
-
 [extraui]
 
 ; Player visible names of the base gui types.
@@ -765,6 +818,25 @@ Any land terrain type may have a River on it.\
  Land units may move along a River (but not diagonally) for fast travel.\
 ")
 
+[extra_iron]
+name           = _("Iron")
+category       = "Resource"
+causes         = "Resource"
+;rmcauses       = ""
+visibility_req = "Iron Working"
+graphic        = "ts.iron"
+graphic_alt    = "-"
+activity_gfx   = "None"
+act_gfx_alt    = "-"
+act_gfx_alt2   = "-"
+rmact_gfx      = "None"
+rmact_gfx_alt  = "-"
+rmact_gfx_alt2 = "-"
+helptext       = _("\
+Adds +200 to the tile shield output. \
+Becomes visible and usable by the Iron Working tech.\
+")
+
 [extra_gresource]
 name           = _("Generic Resource")
 category       = "Resource"
-- 
2.43.0

