Skip to content
Snippets Groups Projects
Commit 59e13260 authored by dg's avatar dg
Browse files

When a level 5 Lure is killed it will trigger all explosion, poison gaz and future AOE traps

git-svn-id: http://svn.net-core.org/repos/t-engine4@4293 51575b47-30f0-44d4-a5cc-537603b46e54
parent b9e86bf0
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ newTalent{ ...@@ -107,7 +107,7 @@ newTalent{
ai = "summoned", ai_real = "dumb_talented", ai_state = { talent_in=1, }, ai = "summoned", ai_real = "dumb_talented", ai_state = { talent_in=1, },
level_range = {1, 1}, exp_worth = 0, level_range = {1, 1}, exp_worth = 0,
max_life = self.level * 2, max_life = 2,
life_rating = 0, life_rating = 0,
never_move = 1, never_move = 1,
...@@ -124,6 +124,16 @@ newTalent{ ...@@ -124,6 +124,16 @@ newTalent{
summoner = self, summoner_gain_exp=true, summoner = self, summoner_gain_exp=true,
summon_time = 5, summon_time = 5,
} }
if self:getTalentLevel(t) >= 5 then
m.on_die = function(self, src)
if not src or src == self then return end
self:project({type="ball", range=0, radius=2}, self.x, self.y, function(px, py)
local trap = game.level.map(px, py, engine.Map.TRAP)
if not trap or not trap.lure_trigger then return end
trap:trigger(px, py, src)
end)
end
end
m:resolve() m:resolve(nil, true) m:resolve() m:resolve(nil, true)
m:forceLevelup(self.level) m:forceLevelup(self.level)
...@@ -133,6 +143,7 @@ newTalent{ ...@@ -133,6 +143,7 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
return ([[Project a noisy lure that attracts all creatures in a radius %d to it. return ([[Project a noisy lure that attracts all creatures in a radius %d to it.
At level 5, when the lure is destroyed it will trigger some traps in a radius of 2 around it (check individual traps to see if they are triggered).
This can be used while stealthed.]]):format(3 + self:getTalentLevelRaw(t)) This can be used while stealthed.]]):format(3 + self:getTalentLevelRaw(t))
end, end,
} }
...@@ -224,6 +235,7 @@ newTalent{ ...@@ -224,6 +235,7 @@ newTalent{
local t = basetrap(self, t, x, y, 8 + self:getTalentLevel(self.T_TRAP_MASTERY), { local t = basetrap(self, t, x, y, 8 + self:getTalentLevel(self.T_TRAP_MASTERY), {
type = "elemental", name = "explosion trap", color=colors.LIGHT_RED, image = "trap/blast_fire01.png", type = "elemental", name = "explosion trap", color=colors.LIGHT_RED, image = "trap/blast_fire01.png",
dam = dam, dam = dam,
lure_trigger = true,
triggered = function(self, x, y, who) triggered = function(self, x, y, who)
self:project({type="ball", x=x,y=y, radius=2}, x, y, engine.DamageType.FIREBURN, self.dam) self:project({type="ball", x=x,y=y, radius=2}, x, y, engine.DamageType.FIREBURN, self.dam)
game.level.map:particleEmitter(x, y, 2, "fireflash", {radius=2, tx=x, ty=y}) game.level.map:particleEmitter(x, y, 2, "fireflash", {radius=2, tx=x, ty=y})
...@@ -241,7 +253,8 @@ newTalent{ ...@@ -241,7 +253,8 @@ newTalent{
return true return true
end, end,
info = function(self, t) info = function(self, t)
return ([[Lay a simple yet effective trap that explodes on contact, doing %0.2f fire damage over a few turns in a radius of 2.]]): return ([[Lay a simple yet effective trap that explodes on contact, doing %0.2f fire damage over a few turns in a radius of 2.
High level lure can trigger this trap.]]):
format(damDesc(self, DamageType.FIRE, 30 + self:getCun() * 0.8 * self:getTalentLevel(self.T_TRAP_MASTERY))) format(damDesc(self, DamageType.FIRE, 30 + self:getCun() * 0.8 * self:getTalentLevel(self.T_TRAP_MASTERY)))
end, end,
} }
...@@ -464,6 +477,7 @@ newTalent{ ...@@ -464,6 +477,7 @@ newTalent{
type = "elemental", name = "flash bang trap", color=colors.YELLOW, image = "trap/blast_acid01.png", type = "elemental", name = "flash bang trap", color=colors.YELLOW, image = "trap/blast_acid01.png",
dur = math.floor(self:getTalentLevel(self.T_TRAP_MASTERY) + 4), dur = math.floor(self:getTalentLevel(self.T_TRAP_MASTERY) + 4),
check_hit = self:combatAttackDex(), check_hit = self:combatAttackDex(),
lure_trigger = true,
triggered = function(self, x, y, who) triggered = function(self, x, y, who)
self:project({type="ball", x=x,y=y, radius=2}, x, y, function(px, py) self:project({type="ball", x=x,y=y, radius=2}, x, y, function(px, py)
local who = game.level.map(px, py, engine.Map.ACTOR) local who = game.level.map(px, py, engine.Map.ACTOR)
...@@ -491,7 +505,8 @@ newTalent{ ...@@ -491,7 +505,8 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
return ([[Lay a trap that explodes in a radius of 2, blinding or dazing anything caught inside for %d turns. return ([[Lay a trap that explodes in a radius of 2, blinding or dazing anything caught inside for %d turns.
Duration increases with Trap Mastery.]]): Duration increases with Trap Mastery.
High level lure can trigger this trap.]]):
format(math.floor(self:getTalentLevel(self.T_TRAP_MASTERY) + 4)) format(math.floor(self:getTalentLevel(self.T_TRAP_MASTERY) + 4))
end, end,
} }
...@@ -517,6 +532,7 @@ newTalent{ ...@@ -517,6 +532,7 @@ newTalent{
local t = basetrap(self, t, x, y, 8 + self:getTalentLevel(self.T_TRAP_MASTERY), { local t = basetrap(self, t, x, y, 8 + self:getTalentLevel(self.T_TRAP_MASTERY), {
type = "nature", name = "poison gas trap", color=colors.LIGHT_RED, image = "trap/blast_acid01.png", type = "nature", name = "poison gas trap", color=colors.LIGHT_RED, image = "trap/blast_acid01.png",
dam = dam, dam = dam,
lure_trigger = true,
triggered = function(self, x, y, who) triggered = function(self, x, y, who)
-- Add a lasting map effect -- Add a lasting map effect
game.level.map:addEffect(self, game.level.map:addEffect(self,
...@@ -543,7 +559,8 @@ newTalent{ ...@@ -543,7 +559,8 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
return ([[Lay a trap that explodes in a radius of 3, releasing a thick poisonous cloud lasting 4 turns. return ([[Lay a trap that explodes in a radius of 3, releasing a thick poisonous cloud lasting 4 turns.
Each turn the cloud infects all creatures with a poison that deals %0.2f nature damage over 5 turns.]]): Each turn the cloud infects all creatures with a poison that deals %0.2f nature damage over 5 turns.
High level lure can trigger this trap.]]):
format(20 + self:getCun() * 0.5 * self:getTalentLevel(self.T_TRAP_MASTERY)) format(20 + self:getCun() * 0.5 * self:getTalentLevel(self.T_TRAP_MASTERY))
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