Skip to content
Snippets Groups Projects
Commit 2f4f0219 authored by dg's avatar dg
Browse files

Spinning beam trap has a max damage and will not trigger from pets

git-svn-id: http://svn.net-core.org/repos/t-engine4@5303 51575b47-30f0-44d4-a5cc-537603b46e54
parent bfc92788
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ newEntity{ base = "TRAP_COMPLEX",
on_added = function(self, level, x, y)
self.x, self.y = x, y
self.rad = rng.range(2, 8)
self.max_dam = self.dam * 2.5
local tries = {}
local list = {i=1}
local sa = rng.range(0, 359)
......@@ -96,7 +97,7 @@ newEntity{ base = "TRAP_COMPLEX",
all_know = true,
dam = resolvers.mbonus_level(300, 5),
triggered = function(self, x, y, who)
if self:reactionToward(who) < 0 then self.dam = self.dam * 1.5 end
if self:reactionToward(who) < 0 and not who.summoner then self.dam = math.min(self.dam * 1.5, self.max_dam) end
return true
end,
disarmed = function(self, x, y, who)
......
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