Skip to content
Snippets Groups Projects
Commit 33544afd authored by dg's avatar dg
Browse files

Skeletons talents have been improved; Sharp Bones have been replaced with Resilient Bones

git-svn-id: http://svn.net-core.org/repos/t-engine4@3296 51575b47-30f0-44d4-a5cc-537603b46e54
parent 391e47e1
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,7 @@ function _M:setEffect(eff_id, dur, p, silent)
if not p[k] then p[k] = e end
end
p.dur = dur
self:check("on_set_temporary_effect", eff_id, _M.tempeffect_def[eff_id], p)
-- If we already have it, we check if it knows how to "merge", or else we remove it and re-add it
if self:hasEffect(eff_id) then
......
......@@ -2439,6 +2439,13 @@ function _M:updateEffectDuration(dur, what)
return dur
end
--- Adjust temporary effects
function _M:on_set_temporary_effect(eff_id, e, p)
if e.status == "detrimental" and self:knowTalent(self.T_RESILIENT_BONES) then
p.dur = math.ceil(p.dur * (1 - (self:getTalentLevel(self.T_RESILIENT_BONES) / 12)))
end
end
--- Called when we are projected upon
-- This is used to do spell reflection, antimagic, ...
function _M:on_project(tx, ty, who, t, x, y, damtype, dam, particles)
......
......@@ -41,61 +41,33 @@ newTalent{
}
newTalent{
name = "Sharp Bones",
name = "Bone Armour",
type = {"undead/skeleton", 2},
require = undeads_req2,
points = 5,
cooldown = 15,
tactical = { ATTACK = 2 },
range = 1,
requires_target = true,
cooldown = 30,
tactical = { DEFEND = 2 },
action = function(self, t)
local x, y = self.x, self.y
if game.level.map(x, y, game.level.map.TRAP) then
game.logPlayer(self, "There is already a trap here!")
return
end
local dam = (10 + self:getStr(20)) * self:getTalentLevel(t)
local e = require("mod.class.Trap").new{
type = "physical", subtype="sharp", id_by_type=true, unided_name = "trap", identified=true,
name = "sharp bones",
display = '^', color=colors.ANTIQUE_WHITE,
dam = dam,
triggered = function(self, x, y, who)
self:project({type="hit",x=x,y=y}, x, y, engine.DamageType.BLEED, self.dam)
return true, true
end,
summoner_gain_exp = true,
summoner = self,
}
game.zone:addEntity(game.level, e, "trap", x, y)
game:playSoundNear(self, "talents/earth")
self:setEffect(self.EFF_DAMAGE_SHIELD, 10, {power=50 + 70 * self:getTalentLevel(t) + self:getDex(350)})
return true
end,
info = function(self, t)
return ([[Lay down some sharpened bones to make a simple trap that will cause anyone stepping on it to bleed for %d damage.]]):
format(damDesc(self, DamageType.PHYSICAL, (10 + self:getStr(20)) * self:getTalentLevel(t)))
return ([[Creates a shield of bones absorbing %d damage. Lasts for 10 turns.
The damage absorbed increases with dexterity.]]):
format(50 + 70 * self:getTalentLevel(t) + self:getDex(350))
end,
}
newTalent{
name = "Bone Armour",
name = "Resilient Bones",
type = {"undead/skeleton", 3},
require = undeads_req3,
points = 5,
cooldown = 30,
tactical = { DEFEND = 2 },
action = function(self, t)
self:setEffect(self.EFF_DAMAGE_SHIELD, 10, {power=(8 + self:getDex(20)) * self:getTalentLevel(t)})
return true
end,
mode = "passive",
range = 1,
info = function(self, t)
return ([[Creates a shield of bones absorbing %d damage. Lasts for 10 turns.
The damage absorbed increases with dexterity.]]):
format((5 + self:getDex(20)) * self:getTalentLevel(t))
return ([[Your undead bones are very resilient, reducing the duration of all detrimental effects on you by %d%%.]]):
format(100 * (self:getTalentLevel(self.T_RESILIENT_BONES) / 12))
end,
}
......@@ -104,7 +76,7 @@ newTalent{ short_name = "SKELETON_REASSEMBLE",
type = {"undead/skeleton",4},
require = undeads_req4,
points = 5,
cooldown = 45,
cooldown = function(self, t) return 45 - self:getTalentLevelRaw(t) * 4 end,
tactical = { HEAL = 2 },
on_learn = function(self, t)
if self:getTalentLevelRaw(t) == 5 then
......@@ -117,13 +89,13 @@ newTalent{ short_name = "SKELETON_REASSEMBLE",
end
end,
action = function(self, t)
self:heal(self:getTalentLevel(t) * self.level * 2.5, self)
self:heal(100 * self:getTalentLevel(t), self)
game:playSoundNear(self, "talents/heal")
return true
end,
info = function(self, t)
return ([[Re-position some of your bones, healing yourself for %d.
At level 5 you will gain the ability to completely re-assemble your body should it be destroyed (can only be used once)]]):
format(self:getTalentLevel(t) * self.level * 2.5)
format(100 * self:getTalentLevel(t))
end,
}
......@@ -488,7 +488,7 @@ local racials = {
skeleton = {
T_BONE_ARMOUR = {last=30, base=0, every=4, max=5},
T_SKELETON_REASSEMBLE = {last=40, base=0, every=4, max=5},
T_SHARP_BONES = {last=20, base=0, every=4, max=5},
T_RESILIENT_BONES = {last=20, base=0, every=4, max=5},
T_SKELETON = {last=10, base=0, every=4, max=5},
},
ghoul = {
......
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