Skip to content
Snippets Groups Projects
Commit 006ca3bb authored by dg's avatar dg
Browse files

Cunning / Lethality talent category

new talent Deadly Strikes


git-svn-id: http://svn.net-core.org/repos/t-engine4@412 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2e051220
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ newBirthDescriptor{
["cunning/stealth"]={true, 0.3},
["cunning/traps"]={false, 0.3},
["cunning/dirty"]={true, 0.3},
["cunning/lethality"]={true, 0.3},
["cunning/survival"]={true, 0.3},
},
talents = {
......@@ -74,6 +75,7 @@ newBirthDescriptor{
["technique/combat-training"]={true, 0.2},
["cunning/stealth"]={false, 0.3},
["cunning/survival"]={true, 0.1},
["cunning/lethality"]={true, 0.3},
["cunning/dirty"]={true, 0.3},
},
talents = {
......
......@@ -2,6 +2,7 @@
newTalentType{ type="cunning/stealth", name = "stealth", description = "Allows the user to enter stealth." }
newTalentType{ type="cunning/trapping", name = "trapping", description = "The knowledge of trap laying." }
newTalentType{ type="cunning/dirty", name = "dirty fighting", description = "Teaches various talents to criple your foes." }
newTalentType{ type="cunning/lethality", name = "lethality", description = "How to make your foes feel the pain." }
newTalentType{ type="cunning/survival", name = "survival", description = "The knowledge of the dangers of the world, and how to best avoid them." }
-- Generic requires for cunning based on talent level
......@@ -28,5 +29,6 @@ cuns_req5 = {
load("/data/talents/cunning/stealth.lua")
load("/data/talents/cunning/traps.lua")
load("/data/talents/cunning/survival.lua")
load("/data/talents/cunning/dirty.lua")
load("/data/talents/cunning/lethality.lua")
load("/data/talents/cunning/survival.lua")
newTalent{
name = "Lethality",
type = {"cunning/dirty", 1},
mode = "passive",
points = 5,
require = cuns_req1,
info = function(self, t)
return ([[You have learned to find and hit the weak spots. Your strikes have %0.2f%% more chances to be critical hits.
Also when using knives you now use your cunning score instead of your strength for bonus damage.]]):format(1 + self:getTalentLevel(t) * 1.3)
end,
}
newTalent{
name = "Lethality",
type = {"cunning/lethality", 1},
mode = "passive",
points = 5,
require = cuns_req1,
info = function(self, t)
return ([[You have learned to find and hit the weak spots. Your strikes have %0.2f%% more chances to be critical hits.
Also when using knives you now use your cunning score instead of your strength for bonus damage.]]):format(1 + self:getTalentLevel(t) * 1.3)
end,
}
newTalent{
name = "Deadly Strikes",
type = {"cunning/lethality", 2},
points = 5,
cooldown = 12,
stamina = 15,
require = cuns_req2,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
local hitted = self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 10, true)
if hitted then
local dur = 5 + math.ceil(self:getTalentLevel(t))
local power = 4 + (self:getTalentLevel(t) * self:getCun()) / 20
self:setEffect(self.EFF_DEADLY_STRIKES, dur, {power=power})
end
return true
end,
info = function(self, t)
return ([[You hit your target doing %d%% damage. If your attack hits you gain %d armour penetration for %d turns
The APR will increase with Cunning.]]):
format(100 * (0.8 + self:getTalentLevel(t) / 10), 4 + (self:getTalentLevel(t) * self:getCun()) / 20, 5 + math.ceil(self:getTalentLevel(t)))
end,
}
\ No newline at end of file
......@@ -451,6 +451,22 @@ newEffect{
end,
}
newEffect{
name = "DEADLY_STRIKES",
desc = "Deadly Strikes",
type = "physical",
status = "beneficial",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# aims carefully." end,
on_lose = function(self, err) return "#Target# aims less carefully." end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("combat_apr", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_apr", eff.tmpid)
end,
}
newEffect{
name = "ROTTING_DISEASE",
desc = "Rotting Disease",
......
......@@ -78,11 +78,11 @@ function _M:drawDialog(s)
end
for i, o in ipairs(self.actor:getInven(self.actor.INVEN_OFFHAND)) do
if o.combat then
s:drawColorString(self.font, ("Attack(Off Hand): #00ff00#%3d"):format(game.player:combatAttack(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Damage(Off Hand): #00ff00#%3d"):format(game.player:combatDamage(o.combat) * offmult), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("APR (Off Hand): #00ff00#%3d"):format(game.player:combatAPR(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Crit (Off Hand): #00ff00#%3d%%"):format(game.player:combatCrit(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Speed (Off Hand): #00ff00#%0.2f"):format(game.player:combatSpeed(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Attack (Off Hand): #00ff00#%3d"):format(game.player:combatAttack(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Damage (Off Hand): #00ff00#%3d"):format(game.player:combatDamage(o.combat) * offmult), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("APR (Off Hand): #00ff00#%3d"):format(game.player:combatAPR(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Crit (Off Hand): #00ff00#%3d%%"):format(game.player:combatCrit(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
s:drawColorString(self.font, ("Speed (Off Hand): #00ff00#%0.2f"):format(game.player:combatSpeed(o.combat)), w, h, 255, 255, 255) h = h + self.font_h
end
end
end
......
No preview for this file type
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