Author: cazfi
Date: Mon Jun 27 09:47:43 2016
New Revision: 33061

URL: http://svn.gna.org/viewcvs/freeciv?rev=33061&view=rev
Log:
Added Hermit's Place extra to sandbox ruleset.

See patch #6616

Modified:
    trunk/data/sandbox/script.lua
    trunk/data/sandbox/terrain.ruleset

Modified: trunk/data/sandbox/script.lua
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/script.lua?rev=33061&r1=33060&r2=33061&view=diff
==============================================================================
--- trunk/data/sandbox/script.lua       (original)
+++ trunk/data/sandbox/script.lua       Mon Jun 27 09:47:43 2016
@@ -23,6 +23,24 @@
 end
 
 signal.connect("city_destroyed", "city_destroyed_callback")
+
+-- Unit enters Hermit's Nest
+function hermit_nest(unit)
+  if unit.tile:has_extra("Hermit") then
+    local chance = random(0, 5)
+
+    notify.event(unit.owner, unit.tile, E.SCRIPT,
+                 _("You found Hermit's Place."))
+
+    if chance <= 3 then
+      local tech = unit.owner:give_technology(nil, 20, "hut")
+    end
+
+    return false
+  end
+end
+
+signal.connect("hut_enter", "hermit_nest")
 
 -- Add random labels to the map.
 function place_map_labels()

Modified: trunk/data/sandbox/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/terrain.ruleset?rev=33061&r1=33060&r2=33061&view=diff
==============================================================================
--- trunk/data/sandbox/terrain.ruleset  (original)
+++ trunk/data/sandbox/terrain.ruleset  Mon Jun 27 09:47:43 2016
@@ -1212,6 +1212,34 @@
 by other aircraft will cause the villagers to take fright and disband.\
 ")
 
+[extra_hermit]
+name             = _("Hermit's Place")
+rule_name        = "Hermit"
+category         = "Bonus"
+causes           = "Appear"
+;rmcauses         = ""
+graphic          = "tx.hermit"
+graphic_alt      = "tx.village"
+activity_gfx     = "None"
+act_gfx_alt      = "-"
+rmact_gfx        = "None"
+rmact_gfx_alt    = "-"
+appearance_reqs  =
+    { "type", "name", "range", "present"
+      "TerrainClass", "Land", "Local", TRUE
+      "MinYear", "1000", "World", FALSE
+      "CityTile", "Center", "Local", FALSE
+      "Extra", "Hut", "Local", FALSE
+    }
+appearance_chance = 1
+helptext = _("\
+One can explore Hermit's Places once the philosopher has abandoned them. In 
most \
+cases one can learn some of the wisdom of the former inhabitant, with the cost 
\
+of 20% of the normal price. \
+After year 1000 there's no more such individuals figuring entire technologies \
+out in the solitude. \
+")
+
 [extra_farmland]
 name           = _("Farmland")
 category       = "Infra"


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

Reply via email to