Skip to content
Snippets Groups Projects
Commit a289bf42 authored by dg's avatar dg
Browse files

Fix bug with the Eternal Night set

git-svn-id: http://svn.net-core.org/repos/t-engine4@5017 51575b47-30f0-44d4-a5cc-537603b46e54
parent 86a4e8d1
No related branches found
No related tags found
No related merge requests found
......@@ -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."},
......
......@@ -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)
......
......@@ -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")
......
......@@ -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
......
......@@ -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)})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment