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

Preventthe Grand Corruptor from being stuck in your own fearscape

git-svn-id: http://svn.net-core.org/repos/t-engine4@6086 51575b47-30f0-44d4-a5cc-537603b46e54
parent f23071a0
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,8 @@ Let us join forces and crush the fools!]],
answers = {
{"Magic shall triumph!", jump="quest3", action=function(npc, player)
if npc:isTalentActive(npc.T_DEMON_PLANE) then npc:forceUseTalent(npc.T_DEMON_PLANE, {ignore_energy=true}) end
if player:isTalentActive(player.T_DEMON_PLANE) then player:forceUseTalent(player.T_DEMON_PLANE, {ignore_energy=true}) end
if player:hasEffect(player.EFF_DREAMSCAPE) then player:removeEffect(player.EFF_DREAMSCAPE, true) end
end},
{"Magic has a purpose. Those men are wrong, but you seem much worse.", quick_reply="Then you must leave... THIS WORLD! DIE!"},
}
......
......@@ -141,10 +141,6 @@ newTalent{
game.logPlayer(self, "This spell can not be cast here.")
return
end
if not self:canBe("planechange") or target.summon_time or target.summon then
game.logPlayer(self, "The spell fizzles...")
return
end
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -157,6 +153,11 @@ newTalent{
if target == self then return end
if target:attr("negative_status_effect_immune") or target:attr("status_effect_immune") then return nil end
if not self:canBe("planechange") or target.summon_time or target.summon then
game.logPlayer(self, "The spell fizzles...")
return
end
game:playSoundNear(self, "talents/flame")
local dam = self:combatTalentSpellDamage(t, 12, 140)
......
......@@ -139,10 +139,6 @@ newTalent{
game.logPlayer(self, "This talent can not be used here.")
return
end
if not self:canBe("planechange") or target.summon_time or target.summon then
game.logPlayer(self, "The spell fizzles...")
return
end
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -154,6 +150,12 @@ newTalent{
if not (target.player and target.game_ender) and not (self.player and self.game_ender) then return nil end
if target == self then return end
if target:attr("negative_status_effect_immune") or target:attr("status_effect_immune") then return nil end
if not self:canBe("planechange") or target.summon_time or target.summon then
game.logPlayer(self, "The spell fizzles...")
return
end
if not (target and target:attr("sleep")) then
game.logPlayer(self, "Your target must be sleeping in order to enter it's dreamscape.")
return nil
......
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