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

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@4175 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1e47a8ef
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,10 @@ function _M:receiveMouse(button, x, y, isup, force_name, extra)
self.status[button] = not isup
if not isup then return end
if _M.drag then return self:endDrag(x, y) end
if _M.drag then
if _M.drag.predrag then _M.drag = nil
else return self:endDrag(x, y) end
end
for i, m in ipairs(self.areas) do
if (not m.mode or m.mode.button) and (x >= m.x1 and x < m.x2 and y >= m.y1 and y < m.y2) and (not force_name or force_name == m.name) then
......@@ -98,13 +101,17 @@ function _M:reset()
end
function _M:startDrag(x, y, cursor, payload, on_done)
if _M.drag then return end
if _M.drag then
if math.max(math.abs(_M.drag.x - x), math.abs(_M.drag.y - y)) > 6 then
end
return
end
_M.drag = {start_x=x, start_y=y, payload=payload, on_done=on_done}
_M.drag = {start_x=x, start_y=y, payload=payload, on_done=on_done, prestart=true}
if cursor then
game:setMouseCursor(cursor, nil, 0, 0)
end
print("[MOUSE] starting drag'n'drop")
print("[MOUSE] pre starting drag'n'drop")
end
function _M:endDrag(x, y)
......
......@@ -28,7 +28,7 @@ Rokzz krilt copru.]],
answers = {
{"[Examine the orb]", jump="examine", cond=has_rod},
-- {"[Fly the fortress]", action=function(npc, player) player:hasQuest("shertul-fortress"):fly() end},
{"[Begin the Lichform ceremory]", cond=function(npc, player) local q = player:hasQuest("lichform") return player:hasQuest("lichform"):check_lichform(player) end, action=function(npc, player) player:setQuestStatus("lichform", engine.Quest.COMPLETED) end},
{"[Begin the Lichform ceremory]", cond=function(npc, player) local q = player:hasQuest("lichform") return q and q:check_lichform(player) end, action=function(npc, player) player:setQuestStatus("lichform", engine.Quest.COMPLETED) end},
{"[Leave the orb alone]"},
}
}
......
......@@ -577,6 +577,8 @@ function getAdvancedMinionChances(self)
end
local function getMinionChances(self)
do return { ghoul=30, ghast=30, ghoulking=40 } end
local cl = math.floor(self:getTalentLevel(self.T_CREATE_MINIONS))
if cl <= 1 then
return { d_skel_warrior=55, skel_warrior=10, a_skel_warrior=0, skel_archer=10, skel_m_archer=0, skel_mage=5, ghoul=20, ghast=0, ghoulking=0 }
......
......@@ -26,7 +26,7 @@ newEntity{ define_as = "RING_MASTER",
name = "Blood Master",
display = "@", color=colors.VIOLET,
blood_color = colors.BLUE,
desc = [[This small humanoid is covered in silky white fur. Its buldging eyes stares deep into your mind.]],
desc = [[This small humanoid is covered in silky white fur. Its bulging eyes stare deep into your mind.]],
level_range = {14, nil}, exp_worth = 2,
max_life = 150, life_rating = 12, fixed_rating = true,
rank = 3.5,
......
......@@ -66,7 +66,7 @@ return {
if nb_keyframes > 10 then return end
local Map = require "engine.Map"
if not level.eagle then
if nb_keyframes > 0 and rng.chance(200 / nb_keyframes) then
if nb_keyframes > 0 and rng.chance(800 / nb_keyframes) then
local dir = -math.rad(rng.float(310, 340))
local dirv = math.rad(rng.float(-0.1, 0.1))
local y = rng.range(0, level.map.w / 2 * Map.tile_w)
......@@ -77,7 +77,7 @@ return {
local dx, dy = level.map:getScreenUpperCorner() -- Display at map border, always, so it scrolls with the map
if level.eagle then level.eagle.ps:toScreen(dx, dy, true, 1) end
if level.eagle_s then level.eagle_s.ps:toScreen(dx + 100, dy + 120, true, 1) end
if nb_keyframes > 0 and rng.chance(400 / nb_keyframes) then game:playSound("actions/eagle_scream") end
if nb_keyframes > 0 and rng.chance(1000 / nb_keyframes) then game:playSound("actions/eagle_scream") end
if level.eagle and not level.eagle.ps:isAlive() then level.eagle = nil end
if level.eagle_s and not level.eagle_s.ps:isAlive() then level.eagle_s = nil 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