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

Demon Plane can only be cast on or by the player

git-svn-id: http://svn.net-core.org/repos/t-engine4@2060 51575b47-30f0-44d4-a5cc-537603b46e54
parent d09be55b
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ local Savefile = require "engine.Savefile"
local Dialog = require "engine.ui.Dialog"
local Map = require "engine.Map"
local Astar = require "engine.Astar"
--local print = function() end
local print = function() end
--- Defines a zone: a set of levels, with depth, nps, objects, level generator, ...
module(..., package.seeall, class.make)
......
......@@ -124,7 +124,7 @@ newTalent{
local pid = table.remove(p.particles)
if pid then self:removeParticles(pid) end
if #p.particles <= 0 then
if self:isTalentActive(t) then self:forceUseTalent(t.id, {ignore_energy=true}) end
if self:isTalentActive(t.id) then self:forceUseTalent(t.id, {ignore_energy=true}) end
end
end,
activate = function(self, t)
......
......@@ -133,6 +133,7 @@ newTalent{
if not tx or not ty or not target then return nil end
target = game.level.map(tx, ty, Map.ACTOR)
if not tx or not ty or not target then return nil end
if not target.player and not self.player then return nil end
game:playSoundNear(self, "talents/flame")
local dam = self:combatTalentSpellDamage(t, 12, 140)
......
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