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

better

git-svn-id: http://svn.net-core.org/repos/t-engine4@5373 51575b47-30f0-44d4-a5cc-537603b46e54
parent 559296a6
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ newEntity{ base = "TRAP_COMPLEX",
game.level:addEntity(self)
self.on_added = nil
end,
dam = resolvers.mbonus_level(300, 15),
dam = resolvers.mbonus_level(450, 30),
triggered = function(self, x, y, who)
self:firePoison()
return true
......@@ -157,6 +157,7 @@ newEntity{ base = "TRAP_COMPLEX",
end,
canAct = false,
energy = {value=0},
nb = 3,
firePoison = function(self)
-- Add a lasting map effect
game.level.map:addEffect(self,
......@@ -168,9 +169,11 @@ newEntity{ base = "TRAP_COMPLEX",
nil, 0, 0
)
self:useEnergy(game.energy_to_act * 7)
self.nb = self.nb - 1
end,
act = function(self)
if game.level.map(self.x, self.y, engine.Map.TRAP) ~= self then game.level:removeEntity(self, true) return end
if self.nb <= 0 then game.level:removeEntity(self, true) print("The poison spore looks somewhat drained.") return end
local ok = false
local tg = {type="ball", radius=self.rad, friendlyfire=false}
......@@ -215,7 +218,7 @@ newEntity{ base = "TRAP_COMPLEX",
return true
end,
canAct = false,
energy = {value=0, mod=0.25},
energy = {value=0, mod=0.20},
act = function(self)
local tg = {type="ball", radius=1, friendlyfire=false}
for i, d in ipairs(self.points) do
......
......@@ -282,10 +282,11 @@ function _M:display(x, y, nb_keyframes, screen_x, screen_y)
local tal = tree.nodes[j]
tal.entity:toScreen(self.tiles, dx+x + self.icon_offset, dy+y + self.icon_offset, self.icon_size, self.icon_size)
if util.getval(tal.do_shadow, tal) then core.display.drawQuad(dx+x + self.icon_offset, dy+y + self.icon_offset, self.icon_size, self.icon_size, 0, 0, 0, 200) end
local do_shadow = util.getval(tal.do_shadow, tal) and 3 or 1
if do_shadow > 1 then core.display.drawQuad(dx+x + self.icon_offset, dy+y + self.icon_offset, self.icon_size, self.icon_size, 0, 0, 0, 200) end
local rgb = tal:color()
self:drawFrame(self.talent_frame, dx+x, dy+y, rgb[1]/255, rgb[2]/255, rgb[3]/255, 1)
self:drawFrame(self.talent_frame, dx+x, dy+y, rgb[1]/255 / do_shadow, rgb[2]/255 / do_shadow, rgb[3]/255 / do_shadow, 1)
if tal.text_status then
local key = tal.text_status
......
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