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

Left/Middle click bound talents must be known to be used

git-svn-id: http://svn.net-core.org/repos/t-engine4@5986 51575b47-30f0-44d4-a5cc-537603b46e54
parent 7db6c2e9
No related branches found
No related tags found
No related merge requests found
......@@ -1723,7 +1723,7 @@ function _M:mouseLeftClick(mx, my)
local target_dist = core.fov.distance(p.x, p.y, a.x, a.y)
if p:enoughEnergy() and p:reactionToward(a) < 0 and not p:isTalentCoolingDown(t) and p:preUseTalent(t, true, true) and target_dist <= p:getTalentRange(t) and p:canProject({type="hit"}, a.x, a.y) then
if p:enoughEnergy() and p:reactionToward(a) < 0 and p:knowTalent(t) and not p:isTalentCoolingDown(t) and p:preUseTalent(t, true, true) and target_dist <= p:getTalentRange(t) and p:canProject({type="hit"}, a.x, a.y) then
p:useTalent(t.id, nil, nil, nil, a)
return true
end
......@@ -1742,7 +1742,7 @@ function _M:mouseMiddleClick(mx, my)
local target_dist = core.fov.distance(p.x, p.y, a.x, a.y)
if p:enoughEnergy() and p:reactionToward(a) < 0 and not p:isTalentCoolingDown(t) and p:preUseTalent(t, true, true) and target_dist <= p:getTalentRange(t) and p:canProject({type="hit"}, a.x, a.y) then
if p:enoughEnergy() and p:reactionToward(a) < 0 and p:knowTalent(t) and not p:isTalentCoolingDown(t) and p:preUseTalent(t, true, true) and target_dist <= p:getTalentRange(t) and p:canProject({type="hit"}, a.x, a.y) then
p:useTalent(t.id, nil, nil, nil, a)
return true
end
......
......@@ -157,7 +157,7 @@ newTalent{
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.POISON, {dam=self:mindCrit(self:combatTalentStatDamage(t, "wil", 30, 460), apply_power=self:combatMindpower()}))
self:project(tg, x, y, DamageType.POISON, {dam=self:mindCrit(self:combatTalentStatDamage(t, "wil", 30, 460)), apply_power=self:combatMindpower()})
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_slime", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
......
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