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

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@692 51575b47-30f0-44d4-a5cc-537603b46e54
parent e87d5637
No related branches found
No related tags found
No related merge requests found
......@@ -169,6 +169,8 @@ function _M:receiveKey(sym, ctrl, shift, alt, meta, unicode, isup)
if isup then return end
if self.any_key then self.any_key(sym, ctrl, shift, alt, meta, unicode, isup) end
local ks, us = self:makeKeyString(sym, ctrl, shift, alt, meta, unicode)
-- print("[BIND]", sym, ctrl, shift, alt, meta, unicode, " :=: ", ks, us, " ?=? ", self.binds[ks], us and self.binds[us])
if self.binds[ks] and self.virtuals[self.binds[ks]] then
......
......@@ -459,10 +459,13 @@ end
function _M:setupCommands()
self.targetmode_key = engine.KeyBind.new()
self.targetmode_key:addCommands{ _SPACE=function() self:targetMode(false, false) end, }
self.targetmode_key:addCommands{ _SPACE=function() self:targetMode(false, false) self.tooltip_x, self.tooltip_y = nil, nil end, }
self.targetmode_key:addBinds
{
TACTICAL_DISPLAY = function() self:targetMode(false, false) end,
TACTICAL_DISPLAY = function()
self:targetMode(false, false)
self.tooltip_x, self.tooltip_y = nil, nil
end,
ACCEPT = function()
self:targetMode(false, false)
self.tooltip_x, self.tooltip_y = nil, nil
......
......@@ -21,8 +21,9 @@
local forks = {{}, {}}
local m1 = forks[1]
local m2 = forks[2]
local tx = tx * 32
local ty = ty * 32
local tiles = math.ceil(math.sqrt(tx*tx+ty*ty))
local tx = tx * engine.Map.tile_w
local ty = ty * engine.Map.tile_h
local breakdir = math.rad(rng.range(-8, 8))
m1.bx = 0
m1.by = 0
......@@ -76,7 +77,7 @@ end, },
function(self)
self.nb = (self.nb or 0) + 1
if self.nb < 4 then
self.ps:emit(1000)
self.ps:emit(230*tiles)
end
end,
4000
4*230*tiles
......@@ -35,7 +35,7 @@ newTalent{
if not x or not y then return nil end
self:project(tg, x, y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), 3))
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(self.x, self.y, 1, "lightning", {tx=x-self.x, ty=y-self.y})
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "lightning", {tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/lightning")
return true
end,
......@@ -101,7 +101,7 @@ newTalent{
local tgr = {type="beam", range=self:getTalentRange(t), talent=t, x=sx, y=sy}
print("[Chain lightning] jumping from", sx, sy, "to", actor.x, actor.y)
self:project(tgr, actor.x, actor.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), 5))
game.level.map:particleEmitter(sx, sy, 1, "lightning", {tx=actor.x-sx, ty=actor.y-sy})
game.level.map:particleEmitter(sx, sy, math.max(math.abs(actor.x-sx), math.abs(actor.y-sy)), "lightning", {tx=actor.x-sx, ty=actor.y-sy})
sx, sy = actor.x, actor.y
end
......@@ -193,7 +193,7 @@ newTalent{
table.remove(tgts, id)
self:project(tg, a.x, a.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.2) * self:getTalentLevel(t)), 3))
game.level.map:particleEmitter(self.x, self.y, 1, "lightning", {tx=a.x-self.x, ty=a.y-self.y})
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(a.x-self.x), math.abs(a.y-self.y)), "lightning", {tx=a.x-self.x, ty=a.y-self.y})
game:playSoundNear(self, "talents/lightning")
end
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