From 4baa7cd0fdf934e5608388dba16c86823f80a7d8 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 6 May 2012 21:05:01 +0000
Subject: [PATCH] Fungus tree is now offered by Myssil after finishing a quest
 for her

git-svn-id: http://svn.net-core.org/repos/t-engine4@5090 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/chats/myssil.lua | 23 +++++++++++++++++++++++
 src/map.h                               |  2 +-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/game/modules/tome/data/chats/myssil.lua b/game/modules/tome/data/chats/myssil.lua
index 15bff0ea85..9146ea436d 100644
--- a/game/modules/tome/data/chats/myssil.lua
+++ b/game/modules/tome/data/chats/myssil.lua
@@ -36,6 +36,7 @@ newChat{ id="welcome",
 I am Protector Myssil. Welcome to Zigur.]],
 	answers = {
 		{"I require all the help I can get, not for my sake but for the town of Derth, to the northeast of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-entrance") and not q:isStatus(q.DONE) end},
+		{"Protector, I have dispatched the Tempest as you commanded.", jump="tempest-dead", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("tempest-entrance") and not q:isCompleted("antimagic-reward") and q:isStatus(q.DONE) end},
 		{"Nothing for now. Sorry to have taken your time. Farewell, Protector."},
 	}
 }
@@ -52,4 +53,26 @@ Erase him.]],
 	}
 }
 
+newChat{ id="tempest-dead",
+	text = [[So have I heard, @playername@. You prove worthy of your training, go with the blessing and nature @playername@ of Zigur.
+#LIGHT_GREEN#*She touches your skin, you can feel nature infusing your very being.*#WHITE#
+This shall help your on your travels. Farewell!]],
+	answers = {
+		{"Thank you Protector.", action=function(npc, player)
+			player:hasQuest("lightning-overload"):create_entrance()
+			if player:knowTalentType("wild-gift/fungus") then
+				player:setTalentTypeMastery("wild-gift/fungus", player:getTalentTypeMastery("wild-gift/fungus") + 0.1)
+			elseif player:knowTalentType("wild-gift/fungus") == false then
+				player:learnTalentType("wild-gift/fungus", true)
+			else
+				player:learnTalentType("wild-gift/fungus", false)
+			end
+			-- Make sure a previous amulet didnt bug it out
+			if player:getTalentTypeMastery("wild-gift/fungus") == 0 then player:setTalentTypeMastery("wild-gift/fungus", 1) end
+			game.logPlayer(player, "#00FF00#You gain the fungus talents school.")
+			player:hasQuest("lightning-overload"):setStatus(engine.Quest.COMPLETED, "antimagic-reward")
+		end},
+	}
+}
+
 return "welcome"
diff --git a/src/map.h b/src/map.h
index 4f4740a098..ae807c2f47 100644
--- a/src/map.h
+++ b/src/map.h
@@ -34,7 +34,7 @@ struct s_map_object {
 	int cur_x, cur_y;
 	float dx, dy, scale;
 	float animdx, animdy;
-	int dw, dh;
+	float dw, dh;
 	float tint_r;
 	float tint_g;
 	float tint_b;
-- 
GitLab