From cee2b77b5824fe67790b7feed81e67bf6bf2b13b Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Mon, 10 Dec 2012 11:17:09 +0000
Subject: [PATCH] The ruined dungeon now has all orbs put near the gate, but
 they are inactive. In their old places lies 6 guardians which must be
 defeated to allow interraction with them

git-svn-id: http://svn.net-core.org/repos/t-engine4@6033 51575b47-30f0-44d4-a5cc-537603b46e54
---
 .../tome/data/maps/zones/ruined-dungeon.lua   | 45 +++++++++-------
 .../tome/data/talents/spells/water.lua        |  1 +
 .../tome/data/zones/ruined-dungeon/grids.lua  |  6 +++
 tiled-maps/infinite-ruins.tmx                 | 52 ++++++-------------
 4 files changed, 50 insertions(+), 54 deletions(-)

diff --git a/game/modules/tome/data/maps/zones/ruined-dungeon.lua b/game/modules/tome/data/maps/zones/ruined-dungeon.lua
index fbd28d2147..4a918ab33b 100644
--- a/game/modules/tome/data/maps/zones/ruined-dungeon.lua
+++ b/game/modules/tome/data/maps/zones/ruined-dungeon.lua
@@ -35,15 +35,22 @@ defineTile(".", "OLD_FLOOR")
 defineTile("1", "LORE1")
 defineTile("!", "GENERIC_LEVER_DOOR")
 defineTile("2", "LORE2")
+defineTile(" ", "OLD_FLOOR", nil, {random_filter={random_elite={name_scheme="#rng# the Guardian", on_die=function(self)
+	local spot = game.level:pickSpotRemove{type="portal", subtype="portal"}
+	if spot then
+		game.level.map(spot.x, spot.y, engine.Map.TERRAIN).orb_allowed = true
+		require("engine.ui.Dialog"):simplePopup("Guardian", "You can ear a magical trigger firing off.")
+	end
+end}, add_levels=5}})
 
 -- addSpot section
-addSpot({42, 8}, "portal", "portal")
-addSpot({45, 27}, "portal", "portal")
-addSpot({46, 34}, "portal", "portal")
-addSpot({3, 37}, "portal", "portal")
-addSpot({3, 13}, "portal", "portal")
-addSpot({1, 27}, "portal", "portal")
+addSpot({18, 11}, "portal", "portal")
+addSpot({19, 11}, "portal", "portal")
+addSpot({20, 11}, "portal", "portal")
 addSpot({21, 8}, "door", "sealed")
+addSpot({22, 11}, "portal", "portal")
+addSpot({23, 11}, "portal", "portal")
+addSpot({24, 11}, "portal", "portal")
 
 -- addZone section
 addZone({16, 0, 26, 8}, "no-teleport", "no-teleport")
@@ -58,17 +65,17 @@ return [[
 ################&.........&#######################
 ################&&.......&&###########.......#####
 #################&&.....&&############.......#####
-##################&&&!&&&######......+....*..#####
+##################&&&!&&&######......+.... ..#####
 ######..#############.#######...######.......#####
-#####.....###########.#######.########.......#####
-####.......##########.#######.####################
-####...#...+........+.+..####.####################
-###*..#....##########.##.####.####################
-###..#....###########.##.###..####################
-####....#############.##.###.#####################
-####..###############.##.....#####################
-#####################.############################
-#####################.############################
+#####.....#######.........###.########.......#####
+####.......######.***.***.###.####################
+####...#...+...##.........###.####################
+### ..#....###.######.#######.####################
+###..#....####.######.######..####################
+####....######.######.######.#####################
+####..########.######.######.#####################
+##############.######.######.#####################
+##############......+.+......#####################
 #####################.############################
 #####################.############################
 ################....#.#....#######################
@@ -77,17 +84,17 @@ return [[
 #.....#######.##....#.#....###.###################
 #......######.##....#.#....###.#######.....#######
 #.&&&....####.#######.########.######........#####
-#*&&&&........#######.########.........&&&&..*####
+# &&&&........#######.########.........&&&&.. ####
 #.&&&....####.#######.########.######........#####
 #......######.#######.########.#######.....#######
 #.....#######.###...#.#...####.###################
 #############.###...#.#...####.###################
 #############.......+.+........##############..###
 #################...#.#...##################....##
-#################...#.#...#############.......*.##
+#################...#.#...#############....... .##
 ##...################.#############.....#####...##
 #.....###############.############..#########..###
-#..*..###############.############.###############
+#.. ..###############.############.###############
 #.....###############.###########2.###############
 ##.##################.###########..###############
 ##.#...#...#....#####.###########.################
diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua
index e7fbbaa1ed..414e170e2f 100644
--- a/game/modules/tome/data/talents/spells/water.lua
+++ b/game/modules/tome/data/talents/spells/water.lua
@@ -150,6 +150,7 @@ newTalent{
 	tactical = { BUFF = 3, ATTACKAREA = { COLD = 0.5, PHYSICAL = 0.5 }, DISABLE = { knockback = 1 } },
 	direct_hit = true,
 	range = 10,
+	no_energy = true,
 	requires_target = true,
 	getDuration = function(self, t) return 4 + math.ceil(self:getTalentLevel(t)) end,
 	getPower = function(self, t) return util.bound(50 + self:combatTalentSpellDamage(t, 50, 450), 0, 500) / 500 end,
diff --git a/game/modules/tome/data/zones/ruined-dungeon/grids.lua b/game/modules/tome/data/zones/ruined-dungeon/grids.lua
index f0a391fe77..3e26533034 100644
--- a/game/modules/tome/data/zones/ruined-dungeon/grids.lua
+++ b/game/modules/tome/data/zones/ruined-dungeon/grids.lua
@@ -78,6 +78,12 @@ newEntity{
 	block_move = function(self, x, y, who, act, couldpass)
 		if not who or not who.player or not act then return true end
 		if not game.level.data.touch_orb then return true end
+
+		if not self.orb_allowed then
+			require("engine.ui.Dialog"):simplePopup("Strange Orb", "The orb looks inactive.")
+			return true
+		end
+
 		local text = "???"
 		if self.portal_type == "water" then text = "The orb seems to drip water."
 		elseif self.portal_type == "earth" then text = "The orb is covered in dust."
diff --git a/tiled-maps/infinite-ruins.tmx b/tiled-maps/infinite-ruins.tmx
index a023f4a767..3cfa70c6f7 100644
--- a/tiled-maps/infinite-ruins.tmx
+++ b/tiled-maps/infinite-ruins.tmx
@@ -38,6 +38,12 @@
     <property name="value" value="&quot;PORTAL&quot;"/>
    </properties>
   </tile>
+  <tile id="60">
+   <properties>
+    <property name="display" value="&amp;"/>
+    <property name="value" value="&quot;GUARDIAN&quot;"/>
+   </properties>
+  </tile>
   <tile id="70">
    <properties>
     <property name="display" value="&gt;"/>
@@ -88,45 +94,15 @@
   </tile>
  </tileset>
  <layer name="Terrain" width="50" height="50">
-  <data encoding="base64" compression="gzip">
-   H4sIAAAAAAAAA+2YS27DMAxEla1XOUPPUMBHyCaHb5MLFV4EMBRT/MxQagwtCMeGJfFxSErOpZRyAex+YDfhObJOtm3+fRtsckwOlON5Eo5P1UNjifSr1nwjWKI9dwTHnmWzr2LbNyQ/l4Nna5ADYdfGWWLL0APV0sKRnVesOKAcqNV+a3kr5fZSZP5sjrqWGHqM4GAwaBw9eifqv5Ujm4EVr5qj5z7GjsVoHybH5PgPdlTDjN49OeK+a+cS9LyG+KW9j+rRi6O1Tg+OiH7bO/vvN228R6/IO9F8XMv7f5hIbls5NJN8Wk+uB1IfGRxIfSB5Y6nzCGu2nYlDsh77IDrewmXVgxXDT+BoabkK8zIZmX5b4uYdn8nhWbfVO/ZajeJg5MFIPX5JHKx4ROdi9h6px7TuW3U4OobWa2t9r1+LUzdLDC3Xo99ejsgez+TQNIn6xOCQ9mKLDvt5X2eqh8On+psH5dB08dRGzdWymsMyRuOQdPH2qqy8stRcJPbomlGOH0cMmXHycHjyarNrgm8j7Q9PRrZcECcAAA==
+  <data encoding="base64" compression="zlib">
+   eJztmE1uAyEMhck2q56hZ6jU1ay7yeH7c6GKRSREwLznHwijLKzJTAL487MNk0tK6WKwW8O+Os8t60Rb9u8DsBfHi8PK8XcSjl31GLFo+pU03woWbc9dwVGyZHtP2L7R8/PaeHYoOSzso3FIbD30YMcidc5wenBoxufvPgtr3bMcVqv9lvI2Ug+L1bWk9QXJwxlajBgsHDN6J+K/B0c0AxOvZ+dgeM/CIe3FrT15Vm3M0Gon25GjlTNo734m25lDOn8gdR7Fxa4hna1QPWZxoHtAFIdGv/yb8v3NcrZCY42cwdj4HunxP0xLbqMcI+v5dJxcD0t9RHBY6sOSN0ida1ij7UwcPZuxD1rHI1yoHl4x3IFD0vLozOvJ6Ok3Ejd2fCQHs67UO0qtVnF45MFKPX6cOLzioZ3Ls/f0eox0L9Xh6hiiV2l91q8rqRsSQ+Ta+sxyaPZ4T46RJlqfPDh6ezGiQznv/Uz1S/hUv/NYOUa6MLVRc0lWcyBjRhw9XdheFZVXSM1pYm9dU8vxTcTQM04MB5NX2d4CfFtp/xYOmS0=
   </data>
  </layer>
  <objectgroup name="addSpot" width="50" height="50">
-  <object name="Portal" x="1349" y="261" width="21" height="21">
-   <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
-   </properties>
-  </object>
-  <object name="Portal" x="1446" y="869" width="21" height="21">
-   <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
-   </properties>
-  </object>
-  <object name="Portal" x="1476" y="1093" width="21" height="21">
-   <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
-   </properties>
-  </object>
-  <object name="Portal" x="100" y="1188" width="21" height="21">
-   <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
-   </properties>
-  </object>
-  <object name="Portal" x="100" y="420" width="21" height="21">
+  <object name="Portal" x="587" y="358" width="78" height="21">
    <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
-   </properties>
-  </object>
-  <object name="Portal" x="36" y="871" width="21" height="21">
-   <properties>
-    <property name="subtype" value="portal"/>
-    <property name="type" value="portal"/>
+    <property name="subtype" value="&quot;portal&quot;"/>
+    <property name="type" value="&quot;portal&quot;"/>
    </properties>
   </object>
   <object name="Sealed door" x="677" y="261" width="22" height="22">
@@ -135,6 +111,12 @@
     <property name="type" value="&quot;door&quot;"/>
    </properties>
   </object>
+  <object name="Portal" x="712" y="358" width="78" height="21">
+   <properties>
+    <property name="subtype" value="&quot;portal&quot;"/>
+    <property name="type" value="&quot;portal&quot;"/>
+   </properties>
+  </object>
  </objectgroup>
  <objectgroup name="addZone" width="50" height="50" visible="0">
   <object name="no teleport" x="518" y="5" width="339" height="278">
-- 
GitLab