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

Fixed killing NPCs with special death scripts on the fearscape

git-svn-id: http://svn.net-core.org/repos/t-engine4@4958 51575b47-30f0-44d4-a5cc-537603b46e54
parent f062a51c
No related branches found
No related tags found
No related merge requests found
......@@ -193,15 +193,21 @@ newTalent{
target.demon_plane_on_die = target.on_die
target.on_die = function(self, ...)
self.demon_plane_trapper:forceUseTalent(self.T_DEMON_PLANE, {ignore_energy=true})
if self.demon_plane_on_die then self:demon_plane_on_die(...) end
self.on_die, self.demon_plane_on_die = self.demon_plane_on_die, nil
local args = {...}
game:onTickEnd(function()
if self.demon_plane_on_die then self:demon_plane_on_die(unpack(args)) end
self.on_die, self.demon_plane_on_die = self.demon_plane_on_die, nil
end)
end
self.demon_plane_on_die = self.on_die
self.on_die = function(self, ...)
self:forceUseTalent(self.T_DEMON_PLANE, {ignore_energy=true})
if self.demon_plane_on_die then self:demon_plane_on_die(...) end
self.on_die, self.demon_plane_on_die = self.demon_plane_on_die, nil
local args = {...}
game:onTickEnd(function()
if self.demon_plane_on_die then self:demon_plane_on_die(unpack(args)) end
self.on_die, self.demon_plane_on_die = self.demon_plane_on_die, nil
end)
end
game.logPlayer(game.player, "#LIGHT_RED#You are taken to the Fearscape!")
......@@ -217,6 +223,7 @@ newTalent{
end,
deactivate = function(self, t, p)
game:onTickEnd(function()
game.log("===exiting===")
-- Collect objects
local objs = {}
for i = 0, game.level.map.w - 1 do for j = 0, game.level.map.h - 1 do
......
......@@ -149,7 +149,7 @@ newTalent{
self:project(tg, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target or target == self then return end
self:attackTargetWith(target, shield.special_combat, nil, self:combatTalentWeaponDamage(t, 1.3, 2.6), true)
self:attackTargetWith(target, shield.special_combat, nil, self:combatTalentWeaponDamage(t, 1.3, 2.6))
end)
return true
......
......@@ -1233,8 +1233,8 @@ newEffect{
return true
else
DamageType:get(DamageType.PHYSICAL).projector(eff.src or self, self.x, self.y, DamageType.PHYSICAL, eff.dam)
if eff.src:knowTalent(eff.src.T_ELDRITCH_VINE) then
local l = eff.src:getTalentLevel(eff.src.T_ELDRITCH_VINE)
if eff.src:knowTalent(eff.src.T_ELDRITCH_VINES) then
local l = eff.src:getTalentLevel(eff.src.T_ELDRITCH_VINES)
eff.src:incEquilibrium(-l / 4)
eff.src:incMana(l / 3)
end
......
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