From a289bf422e313ed1e9fd4530ec085c50acdf5b1d Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sat, 31 Mar 2012 10:35:40 +0000
Subject: [PATCH] Fix bug with the Eternal Night set

git-svn-id: http://svn.net-core.org/repos/t-engine4@5017 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/chats/last-hope-melinda-father.lua | 2 +-
 game/modules/tome/data/maps/vaults/paladin-vs-vampire.lua | 4 ++--
 game/modules/tome/data/talents/gifts/call.lua             | 2 +-
 game/modules/tome/data/talents/misc/races.lua             | 2 +-
 game/modules/tome/data/talents/techniques/grappling.lua   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/game/modules/tome/data/chats/last-hope-melinda-father.lua b/game/modules/tome/data/chats/last-hope-melinda-father.lua
index 38cba2421d..4cc153dee5 100644
--- a/game/modules/tome/data/chats/last-hope-melinda-father.lua
+++ b/game/modules/tome/data/chats/last-hope-melinda-father.lua
@@ -63,7 +63,7 @@ newChat{ id="melinda",
 	text = [[@playername@! #LIGHT_GREEN#*She jumps for joy and hugs you while her father returns to his shop.*#WHITE#]],
 	answers = {
 		{"I am glad to see you are fine. It seems your scars are healing quite well.", jump="scars", cond=function(npc, player)
-			if player.undead then return false end
+			if player:attr("undead") then return false end
 			return true
 		end,},
 		{"I am glad to see you well. Take care."},
diff --git a/game/modules/tome/data/maps/vaults/paladin-vs-vampire.lua b/game/modules/tome/data/maps/vaults/paladin-vs-vampire.lua
index 95a883a021..e84c7f5c28 100644
--- a/game/modules/tome/data/maps/vaults/paladin-vs-vampire.lua
+++ b/game/modules/tome/data/maps/vaults/paladin-vs-vampire.lua
@@ -33,8 +33,8 @@ defineTile('~', mod.class.Grid.new{
 	on_stand = function(self, x, y, who)
 		local DT = engine.DamageType
 		local dam = DT:get(DT.RETCH).projector(self, x, y, DT.RETCH, rng.range(self.mindam, self.maxdam))
-		if not who.undead then game.logPlayer(who, "Dark energies course upwards through the lava.") end
-		if who.dead and not who.undead then
+		if not who:attr("undead") then game.logPlayer(who, "Dark energies course upwards through the lava.") end
+		if who.dead and not who:attr("undead") then
 			--add undead
 			local m = game.zone:makeEntityByName(game.level, "actor", "RISEN_CORPSE")
 			game.zone:addEntity(game.level, m, "actor", x, y)
diff --git a/game/modules/tome/data/talents/gifts/call.lua b/game/modules/tome/data/talents/gifts/call.lua
index 3e7d0a672a..98656f887d 100644
--- a/game/modules/tome/data/talents/gifts/call.lua
+++ b/game/modules/tome/data/talents/gifts/call.lua
@@ -85,7 +85,7 @@ newTalent{ short_name = "NATURE_TOUCH",
 		local x, y, target = self:getTarget(tg)
 		if not x or not y or not target then return nil end
 		if core.fov.distance(self.x, self.y, x, y) > 1 then return nil end
-		if not target.undead then
+		if not target:attr("undead") then
 			target:heal(20 + self:combatTalentMindDamage(t, 20, 500))
 		end
 		game:playSoundNear(self, "talents/heal")
diff --git a/game/modules/tome/data/talents/misc/races.lua b/game/modules/tome/data/talents/misc/races.lua
index 06c065c5fd..239f06c823 100644
--- a/game/modules/tome/data/talents/misc/races.lua
+++ b/game/modules/tome/data/talents/misc/races.lua
@@ -683,7 +683,7 @@ newTalent{
 		self:project(tg, x, y, function(px, py)
 			local target = game.level.map(px, py, Map.ACTOR)
 			if not target or target.dead then return end
-			if not target:canBe("instakill") or target.rank > 2 or target.undead or not target:checkHit(self:getWil(20, true) + self.level * 1.5, target.level) then
+			if not target:canBe("instakill") or target.rank > 2 or target:attr("undead") or not target:checkHit(self:getWil(20, true) + self.level * 1.5, target.level) then
 				game.logSeen(target, "%s resists the mental assault!", target.name:capitalize())
 				return
 			end
diff --git a/game/modules/tome/data/talents/techniques/grappling.lua b/game/modules/tome/data/talents/techniques/grappling.lua
index d46a3c41cd..6caa619fc3 100644
--- a/game/modules/tome/data/talents/techniques/grappling.lua
+++ b/game/modules/tome/data/talents/techniques/grappling.lua
@@ -110,7 +110,7 @@ newTalent{
 		-- do crushing hold or strangle if we're already grappling the target
 		if hit and self:knowTalent(self.T_CRUSHING_HOLD) then
 			local t = self:getTalentFromId(self.T_CRUSHING_HOLD)
-			if grappled and not target.no_breath and not target.undead and target:canBe("silence") then
+			if grappled and not target.no_breath and not target:attr("undead") and target:canBe("silence") then
 				target:setEffect(target.EFF_STRANGLE_HOLD, duration, {src=self, power=t.getDamage(self, t) * 1.5})
 			else
 				target:setEffect(target.EFF_CRUSHING_HOLD, duration, {src=self, power=t.getDamage(self, t)})
-- 
GitLab