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
Branches minmay-bugfixes
No related tags found
No related merge requests found
...@@ -169,6 +169,8 @@ function _M:receiveKey(sym, ctrl, shift, alt, meta, unicode, isup) ...@@ -169,6 +169,8 @@ function _M:receiveKey(sym, ctrl, shift, alt, meta, unicode, isup)
if isup then return end 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) 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]) -- 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 if self.binds[ks] and self.virtuals[self.binds[ks]] then
......
...@@ -459,10 +459,13 @@ end ...@@ -459,10 +459,13 @@ end
function _M:setupCommands() function _M:setupCommands()
self.targetmode_key = engine.KeyBind.new() 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 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() ACCEPT = function()
self:targetMode(false, false) self:targetMode(false, false)
self.tooltip_x, self.tooltip_y = nil, nil self.tooltip_x, self.tooltip_y = nil, nil
......
...@@ -21,8 +21,9 @@ ...@@ -21,8 +21,9 @@
local forks = {{}, {}} local forks = {{}, {}}
local m1 = forks[1] local m1 = forks[1]
local m2 = forks[2] local m2 = forks[2]
local tx = tx * 32 local tiles = math.ceil(math.sqrt(tx*tx+ty*ty))
local ty = ty * 32 local tx = tx * engine.Map.tile_w
local ty = ty * engine.Map.tile_h
local breakdir = math.rad(rng.range(-8, 8)) local breakdir = math.rad(rng.range(-8, 8))
m1.bx = 0 m1.bx = 0
m1.by = 0 m1.by = 0
...@@ -76,7 +77,7 @@ end, }, ...@@ -76,7 +77,7 @@ end, },
function(self) function(self)
self.nb = (self.nb or 0) + 1 self.nb = (self.nb or 0) + 1
if self.nb < 4 then if self.nb < 4 then
self.ps:emit(1000) self.ps:emit(230*tiles)
end end
end, end,
4000 4*230*tiles
...@@ -35,7 +35,7 @@ newTalent{ ...@@ -35,7 +35,7 @@ newTalent{
if not x or not y then return nil end 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)) 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) 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") game:playSoundNear(self, "talents/lightning")
return true return true
end, end,
...@@ -101,7 +101,7 @@ newTalent{ ...@@ -101,7 +101,7 @@ newTalent{
local tgr = {type="beam", range=self:getTalentRange(t), talent=t, x=sx, y=sy} 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) 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)) 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 sx, sy = actor.x, actor.y
end end
...@@ -193,7 +193,7 @@ newTalent{ ...@@ -193,7 +193,7 @@ newTalent{
table.remove(tgts, id) 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)) 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") game:playSoundNear(self, "talents/lightning")
end end
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