From a7fa60e1c3c309925be011ef519f6600e1b20fa9 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sat, 11 Jun 2011 11:25:16 +0000
Subject: [PATCH] Farportal exits are correctly displayed as & in ascii mode

git-svn-id: http://svn.net-core.org/repos/t-engine4@3624 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/zones/shertul-fortress/grids.lua | 3 ++-
 game/modules/tome/dialogs/debug/DebugMain.lua           | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/game/modules/tome/data/zones/shertul-fortress/grids.lua b/game/modules/tome/data/zones/shertul-fortress/grids.lua
index fc4cc4a000..cf58febf08 100644
--- a/game/modules/tome/data/zones/shertul-fortress/grids.lua
+++ b/game/modules/tome/data/zones/shertul-fortress/grids.lua
@@ -102,7 +102,8 @@ It should automatically create a portal back, but it might not be near your arri
 			boss.explo_portal_on_die = boss.on_die
 			boss.on_die = function(self, ...)
 				local x, y = self.x or game.player.x, self.y or game.player.y
-				local g = game.zone:makeEntityByName(game.level, "terrain", game.zone.basic_floor)
+				local g = game.zone:makeEntityByName(game.level, "terrain", game.zone.basic_floor):clone()
+				g._mo = nil
 				g.nice_tiler = nil
 				g.show_tooltip = true
 				g.name = "Exploratory Farportal exit"
diff --git a/game/modules/tome/dialogs/debug/DebugMain.lua b/game/modules/tome/dialogs/debug/DebugMain.lua
index 8ee463a736..db40dc87c9 100644
--- a/game/modules/tome/dialogs/debug/DebugMain.lua
+++ b/game/modules/tome/dialogs/debug/DebugMain.lua
@@ -89,6 +89,9 @@ function _M:use(item)
 		game:registerDialog(GetQuantity.new("Zone: "..game.zone.name, "Level 1-"..game.zone.max_level, game.level.level, game.zone.max_level, function(qty)
 			game:changeLevel(qty)
 		end), 1)
+	elseif act == "shertul-energy" then
+		game.player:grantQuest("shertul-fortress")
+		game.player:hasQuest("shertul-fortress"):gain_energy(1000)
 	end
 end
 
@@ -104,6 +107,7 @@ function _M:generateList()
 	list[#list+1] = {name="Summon Creature", dialog="SummonCreature"}
 	list[#list+1] = {name="Create Item", dialog="CreateItem"}
 	list[#list+1] = {name="Alter Faction", dialog="AlterFaction"}
+	list[#list+1] = {name="Give Sher'tul fortress energy", action="shertul-energy"}
 
 	local chars = {}
 	for i, v in ipairs(list) do
-- 
GitLab