Skip to content
Snippets Groups Projects
Commit 16bcf0e9 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'GenericTrees' into 'master'

Generic trees

- Removed the Dual Weapon Training, Acrobatics and Field Control trees from players. These are still present for backwards compatibility. Escorts no longer grant these trees or talents from them
- Heightened Senses now grants see invis/stealth and damage reduction against unseen. Trap effects have been removed
- Track is now present in Tier 2 Survival
- Charm Mastery has been renamed Device Mastery, and grants the Trap effects of the old Heightened Senses
- Danger Sense has been added to T4 Survival. Grants a large damage reduction effect on falling below a life threshold. Has a cooldown
- Piercing Sight and Evasion have been removed from Survival
- Mobility has been restructured with the following talents (in order): Disengage, Tumble, Trained Reacions, Evasion
- Disengage now also grants a movespeed boost and reload effect, as well as 1 turn of evasion
- Tumble now has a shorter cooldown and no cost, but causes the cost to rapidly increase if used repeatedly
- Trained Reactions costs less and scales off Defense
- Evasion has a stamina cost and scales off Dexterity only
- Parry has been renamed to Dual Weapon Mastery, and also grants offhand damage and slightly increased parry chance
- Duelist's Focus and Feint have had their effects increased
- Marauder now gains Duelist
- Total Thuggery now drains 6 stamina each turn rather than 12-6 stamina each hit
- Lethality grants critical strike damage bonus
- Coup de Grace resets the cooldown on Stealth on kill
- Increased the effect of Soothing Darkness
- Fixed a few typos
- Added Light Armour Training to Combat Training. This grants defense and armor hardiness when wearing light armor, and on moving into a tile adjacent to an enemy will grant a brief boost to % defense and stamina regeneration
- Antimagic Anorithil escort now grants Feedback rather than Field Control

See merge request !363
parents 135c5b84 83487b08
No related branches found
No related tags found
No related merge requests found
Showing
with 147 additions and 121 deletions
......@@ -1324,8 +1324,8 @@ function _M:move(x, y, force)
self.did_energy = nil
-- Try to detect traps
if not force and self:knowTalent(self.T_HEIGHTENED_SENSES) then
local power = self:callTalent(self.T_HEIGHTENED_SENSES,"trapPower")
if not force and self:knowTalent(self.T_DEVICE_MASTERY) then
local power = self:callTalent(self.T_DEVICE_MASTERY,"trapPower")
local grids = core.fov.circle_grids(self.x, self.y, 1, true)
for x, yy in pairs(grids) do for y, _ in pairs(yy) do
local trap = game.level.map(x, y, Map.TRAP)
......@@ -1572,7 +1572,7 @@ end
-- param power detection power (optional)
-- @return the trap @ x, y if present and detected
function _M:detectTrap(trap, x, y, power)
power = power or self:callTalent(self.T_HEIGHTENED_SENSES, "trapPower")
power = power or self:callTalent(self.T_DEVICE_MASTERY, "trapPower")
if power <= 0 then return end
trap = trap or game.level.map(x, y, Map.TRAP)
if trap then
......
......@@ -164,8 +164,8 @@ function _M:canDisarm(x, y, who)
if not engine.Trap.canDisarm(self, x, y, who) then return false end
-- do we know how to disarm?
if (who:getTalentLevel(who.T_HEIGHTENED_SENSES) >= 3) or who:attr("can_disarm") then
local th = who:getTalentFromId(who.T_HEIGHTENED_SENSES)
if (who:getTalentLevel(who.T_DEVICE_MASTERY) >= 1) or who:attr("can_disarm") then
local th = who:getTalentFromId(who.T_DEVICE_MASTERY)
local power = th.trapPower(who, th) + (who:attr("disarm_bonus") or 0)
if who:checkHitOld(power, self.disarm_power) and (not self.faction or who:reactionToward(self) < 0) then
return true
......@@ -193,7 +193,7 @@ function _M:onDisarm(x, y, who)
--table.set(game, "debug", "last_trap_disarmed", self) -- debugging
-- The player may unlock a trap talent when disarming a (similar) trap (uses Trap Mastery)
if self.unlock_talent_on_disarm and who.player and who:knowTalent(who.T_TRAP_MASTERY) and core.fov.distance(x, y, who.x, who.y) <= 1 and not game.state:unlockTalentCheck(self.unlock_talent_on_disarm.tid, who) then
local hit, chance = who:checkHit(who:callTalent(who.T_TRAP_MASTERY, "getPower") + who:callTalent(who.T_HEIGHTENED_SENSES, "trapPower")*.25, self.disarm_power)
local hit, chance = who:checkHit(who:callTalent(who.T_TRAP_MASTERY, "getPower") + who:callTalent(who.T_DEVICE_MASTERY, "trapPower")*.25, self.disarm_power)
local t = who:getTalentFromId(self.unlock_talent_on_disarm.tid)
if t and hit and chance > 20 and (not self.unlock_talent_on_disarm.chance or rng.percent(self.unlock_talent_on_disarm.chance)) and next(who:spotHostiles()) == nil then
local diff_level = (t.trap_mastery_level or 5)
......
......@@ -1176,6 +1176,9 @@ function _M:combatDefenseBase(fake)
if self:hasDualWeapon() and self:knowTalent(self.T_DUAL_WEAPON_DEFENSE) then
add = add + self:callTalent(self.T_DUAL_WEAPON_DEFENSE,"getDefense")
end
if self:hasLightArmor() and self:knowTalent(self.T_LIGHT_ARMOUR_TRAINING) then
add = add + self:callTalent(self.T_LIGHT_ARMOUR_TRAINING,"getDefense")
end
if not fake then
add = add + (self:checkOnDefenseCall("defense") or 0)
end
......@@ -1201,6 +1204,11 @@ function _M:combatDefenseBase(fake)
if self:hasLightArmor() and self:knowTalent(self.T_MOBILE_DEFENCE) then
mult = mult + self:callTalent(self.T_MOBILE_DEFENCE,"getDef")
end
if self:hasLightArmor() and self:hasEffect(self.EFF_MOBILE_DEFENCE) then
local eff = self:hasEffect(self.EFF_MOBILE_DEFENCE)
mult = mult + (eff.power/100)
end
return math.max(0, d * mult + add) -- Add bonuses last to avoid compounding defense multipliers from talents
end
......@@ -1264,6 +1272,9 @@ function _M:combatArmorHardiness()
if self:hasLightArmor() and self:knowTalent(self.T_MOBILE_DEFENCE) then
add = add + self:callTalent(self.T_MOBILE_DEFENCE, "getHardiness")
end
if self:hasLightArmor() and self:knowTalent(self.T_LIGHT_ARMOUR_TRAINING) then
add = add + self:callTalent(self.T_LIGHT_ARMOUR_TRAINING, "getArmorHardiness")
end
if self:knowTalent(self.T_ARMOUR_OF_SHADOWS) and not game.level.map.lites(self.x, self.y) then
add = add + 50
end
......@@ -1724,10 +1735,13 @@ end
function _M:getOffHandMult(combat, mult)
if combat and combat.range and not combat.dam then return mult or 1 end --no penalty for ranged shooters
local offmult = 1/2
-- Take the bigger multiplier from Dual weapon training and Corrupted Strength
-- Take the bigger multiplier from Dual weapon training, Dual Weapon Mastery and Corrupted Strength
if self:knowTalent(Talents.T_DUAL_WEAPON_TRAINING) then
offmult = math.max(offmult,self:callTalent(Talents.T_DUAL_WEAPON_TRAINING,"getoffmult"))
end
if self:knowTalent(Talents.T_DUAL_WEAPON_MASTERY) then
offmult = math.max(offmult,self:callTalent(Talents.T_DUAL_WEAPON_MASTERY,"getoffmult"))
end
if self:knowTalent(Talents.T_CORRUPTED_STRENGTH) then
offmult = math.max(offmult,self:callTalent(Talents.T_CORRUPTED_STRENGTH,"getoffmult"))
end
......
......@@ -55,12 +55,10 @@ newBirthDescriptor{
stats = { dex=3, str=1, cun=5, },
talents_types = {
["technique/dualweapon-attack"]={true, 0.3},
["technique/dualweapon-training"]={true, 0.3},
["technique/duelist"]={true, 0.3},
["technique/combat-techniques-active"]={false, 0.3},
["technique/combat-training"]={true, 0.3},
["technique/field-control"]={false, 0},
["technique/acrobatics"]={true, 0.3},
["technique/mobility"]={true, 0.3},
["technique/throwing-knives"]={true, 0.3},
["technique/assassination"]={false, 0.3},
["cunning/stealth"]={true, 0.3},
......@@ -77,7 +75,7 @@ newBirthDescriptor{
talents = {
[ActorTalents.T_SHOOT] = 1,
[ActorTalents.T_STEALTH] = 1,
[ActorTalents.T_PARRY] = 1,
[ActorTalents.T_DUAL_WEAPON_MASTERY] = 1,
[ActorTalents.T_LETHALITY] = 1,
[ActorTalents.T_DUAL_STRIKE] = 1,
[ActorTalents.T_KNIFE_MASTERY] = 1,
......@@ -119,7 +117,7 @@ newBirthDescriptor{
["spell/divination"]={false, 0},
["spell/conveyance"]={true, 0},
["technique/dualweapon-attack"]={true, 0.2},
["technique/dualweapon-training"]={true, 0.2},
["technique/duelist"]={true, 0.2},
["technique/combat-techniques-active"]={true, 0.3},
["technique/combat-techniques-passive"]={false, 0.3},
["technique/combat-training"]={true, 0.2},
......@@ -165,12 +163,10 @@ newBirthDescriptor{
stats = { dex=4, str=4, cun=1, },
talents_types = {
["technique/dualweapon-attack"]={true, 0.2},
["technique/dualweapon-training"]={true, 0.2},
["technique/duelist"]={false, 0.2},
["technique/duelist"]={true, 0.2},
["technique/combat-techniques-active"]={true, 0.3},
["technique/combat-techniques-passive"]={true, 0.0},
["technique/combat-training"]={true, 0.3},
["technique/field-control"]={true, 0.3},
["technique/battle-tactics"]={false, 0.2},
["technique/mobility"]={true, 0.3},
["technique/thuggery"]={true, 0.3},
......@@ -225,10 +221,9 @@ newBirthDescriptor{
["cunning/called-shots"]={true, 0.3},
["technique/tireless-combatant"]={true, 0.3},
["cunning/trapping"]={false, 0.1},
["technique/mobility"]={true, 0.3},
-- generic
["technique/acrobatics"]={true, 0.3},
["technique/mobility"]={true, 0.3},
["cunning/survival"]={true, 0.3},
["technique/combat-training"]={true, 0.3},
["technique/field-control"]={false, 0.1},
......
......@@ -67,7 +67,6 @@ newBirthDescriptor{
["technique/conditioning"]={true, 0.3},
["technique/superiority"]={false, 0.3},
["technique/warcries"]={false, 0.3},
["technique/field-control"]={false, 0},
["technique/bloodthirst"]={false, 0.2},
["cunning/survival"]={true, 0},
["cunning/dirty"]={false, 0},
......@@ -115,7 +114,6 @@ newBirthDescriptor{
["technique/superiority"]={false, 0.3},
["technique/warcries"]={false, 0.3},
["technique/battle-tactics"]={false, 0.3},
["technique/field-control"]={false, 0},
["cunning/survival"]={true, 0},
["cunning/dirty"]={false, 0},
},
......@@ -162,7 +160,7 @@ newBirthDescriptor{
["technique/combat-techniques-active"]={false, -0.1},
["technique/combat-techniques-passive"]={true, -0.1},
["technique/combat-training"]={true, 0.3},
["technique/field-control"]={true, 0},
["technique/mobility"]={true, 0},
["cunning/trapping"]={false, 0.2},
["cunning/survival"]={true, 0},
["cunning/dirty"]={false, 0},
......@@ -288,9 +286,8 @@ newBirthDescriptor{
talents_types = {
["cunning/dirty"]={false, 0},
["cunning/tactical"]={true, 0.3},
["cunning/survival"]={false, 0},
["cunning/survival"]={true, 0},
["technique/combat-training"]={true, 0.1},
["technique/field-control"]={true, 0},
["technique/combat-techniques-active"]={true, 0.1},
["technique/combat-techniques-passive"]={true, 0.1},
["technique/pugilism"]={true, 0.3},
......
......@@ -98,8 +98,8 @@ local reward_types = {
},
talents = {
[Talents.T_HEIGHTENED_SENSES] = 1,
[Talents.T_CHARM_MASTERY] = 1,
[Talents.T_PIERCING_SIGHT] = 1,
[Talents.T_DEVICE_MASTERY] = 1,
[Talents.T_TRACK] = 1,
},
stats = {
[Stats.STAT_DEX] = 2,
......@@ -123,8 +123,8 @@ local reward_types = {
["technique/mobility"] = 0.8,
},
talents = {
[Talents.T_HACK_N_BACK] = 1,
[Talents.T_LIGHT_OF_FOOT] = 1,
[Talents.T_DISENGAGE] = 1,
[Talents.T_EVASION] = 1,
},
saves = { spell = 4, phys = 4 },
stats = {
......@@ -147,11 +147,11 @@ local reward_types = {
},
antimagic = {
types = {
["technique/field-control"] = 0.8,
["technique/feedback"] = 0.8,
},
talents = {
[Talents.T_TRACK] = 1,
[Talents.T_HEAVE] = 1,
[Talents.T_BIOFEEDBACK] = 1,
[Talents.T_CONVERSION] = 1,
},
saves = { spell = 4, mental = 4 },
stats = {
......
......@@ -205,7 +205,7 @@ newEntity{ base = "BASE_NPC_SKELETON",
resolvers.inscriptions(1, "rune"),
resolvers.talents{
[Talents.T_PARRY]={base=1, every=10, max=7},
[Talents.T_DUAL_WEAPON_MASTERY]={base=1, every=10, max=7},
[Talents.T_TEMPO]={base=1, every=10, max=7},
[Talents.T_FLURRY]={base=1, every=10, max=7},
[Talents.T_DIRTY_FIGHTING]={base=1, every=10, max=7},
......
......@@ -145,7 +145,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN",
resolvers.talents{
[Talents.T_STEALTH]={base=3, every=6, max=7},
[Talents.T_EXPOSE_WEAKNESS]={base=3, every=6, max=7},
[Talents.T_PARRY]={base=2, every=6, max=6},
[Talents.T_DUAL_WEAPON_MASTERY]={base=2, every=6, max=6},
[Talents.T_TEMPO]={base=2, every=6, max=6},
[Talents.T_DUAL_STRIKE]={base=1, every=6, max=6},
[Talents.T_COUP_DE_GRACE]={base=1, every=6, max=6},
......@@ -167,7 +167,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN",
combat_armor = 3, combat_def = 10,
resolvers.talents{
[Talents.T_STEALTH]={base=3, every=5, max=8},
[Talents.T_PARRY]={base=2, every=6, max=6},
[Talents.T_DUAL_WEAPON_MASTERY]={base=2, every=6, max=6},
[Talents.T_TEMPO]={base=2, every=6, max=6},
[Talents.T_DUAL_STRIKE]={base=1, every=6, max=6},
[Talents.T_SHADOWSTRIKE]={base=2, every=6, max=6},
......@@ -204,7 +204,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_SAPPER",
[Talents.T_TRAP_MASTERY]={base=3, every=6, max=7},
[Talents.T_TRAP_LAUNCHER]={base=1, every=8, max=5},
[Talents.T_TRAP_PRIMING]={base=-1, every=8, max=5},
[Talents.T_PARRY]={base=1, every=8, max=5},
[Talents.T_DUAL_WEAPON_MASTERY]={base=1, every=8, max=5},
[Talents.T_TEMPO]={base=1, every=8, max=5},
[Talents.T_DUAL_STRIKE]={base=1, every=6, max=6},
[Talents.T_DISARM]={base=1, every=6, max=6},
......
game/modules/tome/data/gfx/talents/danger_sense.png

6.92 KiB

game/modules/tome/data/gfx/talents/device_mastery.png

4.61 KiB

game/modules/tome/data/gfx/talents/disengage.png

2.77 KiB | W: | H:

game/modules/tome/data/gfx/talents/disengage.png

2.43 KiB | W: | H:

game/modules/tome/data/gfx/talents/disengage.png
game/modules/tome/data/gfx/talents/disengage.png
game/modules/tome/data/gfx/talents/disengage.png
game/modules/tome/data/gfx/talents/disengage.png
  • 2-up
  • Swipe
  • Onion skin
game/modules/tome/data/gfx/talents/evasion.png

5.8 KiB | W: | H:

game/modules/tome/data/gfx/talents/evasion.png

2.96 KiB | W: | H:

game/modules/tome/data/gfx/talents/evasion.png
game/modules/tome/data/gfx/talents/evasion.png
game/modules/tome/data/gfx/talents/evasion.png
game/modules/tome/data/gfx/talents/evasion.png
  • 2-up
  • Swipe
  • Onion skin
game/modules/tome/data/gfx/talents/light_armour_training.png

7.7 KiB

game/modules/tome/data/gfx/talents/track.png

3.85 KiB | W: | H:

game/modules/tome/data/gfx/talents/track.png

5.78 KiB | W: | H:

game/modules/tome/data/gfx/talents/track.png
game/modules/tome/data/gfx/talents/track.png
game/modules/tome/data/gfx/talents/track.png
game/modules/tome/data/gfx/talents/track.png
  • 2-up
  • Swipe
  • Onion skin
game/modules/tome/data/gfx/talents/trained_reactions.png

3.33 KiB

game/modules/tome/data/gfx/talents/tumble.png

2.12 KiB

......@@ -23,12 +23,18 @@ newTalent{
mode = "passive",
points = 5,
require = cuns_req1,
critpower = function(self, t) return self:combatTalentScale(t, 7.5, 20, 0.75) end,
-- called by _M:combatCrit in mod.class.interface.Combat.lua
getCriticalChance = function(self, t) return self:combatTalentScale(t, 2.3, 7.5, 0.75) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "combat_critical_power", t.critpower(self, t))
end,
info = function(self, t)
local critchance = t.getCriticalChance(self, t)
return ([[You are trained to strike critical areas when fighting, and have a %d%% increased critical strike chance.
Also, when using knives, you use your Cunning instead of your Strength for bonus damage.]]):
format(critchance)
local power = t.critpower(self, t)
return ([[You have learned to find and hit weak spots. All your strikes have a %0.2f%% greater chance to be critical hits, and your critical hits do %0.1f%% more damage.
Also, when using knives, you now use your Cunning instead of your Strength for bonus damage.]]):
format(critchance, power)
end,
}
......@@ -118,7 +124,7 @@ newTalent{
end,
info = function(self, t)
return ([[Become a whirling storm of blades, increasing attack speed by %d%% and causing melee attacks to strike an additional adjacent target other than your primary target for %d%% weapon damage.
This talent is exhausting to use, draining -6 stamina each turn.]]):format(t.getSpeed(self, t)*100, t.getDamage(self,t)*100)
This talent is exhausting to use, draining 6 stamina each turn.]]):format(t.getSpeed(self, t)*100, t.getDamage(self,t)*100)
end,
}
......
......@@ -152,7 +152,7 @@ newTalent{
info = function(self, t)
local multiplier = t.getMultiplier(self, t)
return ([[When striking from stealth, the attack is automatically critical if the target does not notice you just before you land it. Spell and mind crits always critically strike, regardless of whether the target can see you.
In addition, the surprise caused by your assault increases your critical multiplier by %d%%. This effect persists for 3 turns after exiting stealth, or 4 turns at talent level 3 and above.]]):
In addition, the surprise caused by your assault increases your critical multiplier by %d%%. This effect persists for 2 turns after exiting stealth, or 3 turns at talent level 3 and above.]]):
format(multiplier)
end,
}
......@@ -163,15 +163,15 @@ newTalent{
require = cuns_req3,
points = 5,
mode = "passive",
getLife = function(self, t) return self:combatTalentScale(t, 1, 3) end,
getStamina = function(self, t) return self:combatTalentScale(t, 0.5, 2) end,
getReduction = function(self, t) return self:combatTalentStatDamage(t, "cun", 5, 25) end,
getLife = function(self, t) return self:combatTalentScale(t, 2, 10) end, --12 @TL5, mostly useful for out of combat as this won't do much in a fight
getStamina = function(self, t) return self:combatTalentScale(t, 1, 2.5) end, --2.9 @TL5
getReduction = function(self, t) return self:combatTalentStatDamage(t, "cun", 10, 35) end, --29 @100 Cun, effectively about 40% weaker than Automated Cloak Tesselation with less uptime
getDuration = function(self,t) if self:getTalentLevel(t) >= 3 then return 3 else return 2 end end,
info = function(self, t)
return ([[You have a special affinity for darkness.
When standing in an unlit grid, enemies observing you will not prevent you from entering stealth.
While stealted, and for %d turns thereafter, all damage against you is reduced by %d, your life regeneration is increased by %0.1f, and your stamina regeneration is increased %0.1f]]):
format(t.getDuration(self, t), t.getReduction(self,t), t.getLife(self,t), t.getStamina(self,t))
While stealthed, all damage against you is reduced by %d, your life regeneration is increased by %0.1f, and your stamina regeneration is increased %0.1f. This effect persists for 2 turns after exiting stealth, or 3 turns at talent level 3 and above.]]):
format(t.getReduction(self,t), t.getLife(self,t), t.getStamina(self,t))
end,
}
......
......@@ -24,27 +24,108 @@ newTalent{
mode = "passive",
points = 5,
sense = function(self, t) return math.floor(self:combatTalentScale(t, 5, 9)) end,
trapPower = function(self, t) return self:combatScale(self:getTalentLevel(t) * self:getCun(25, true), 0, 0, 90, 125) end, -- ~90 at TL5, 100 cunning
seePower = function(self, t) return self:combatScale(self:getCun(15, true)*self:getTalentLevel(t), 5, 0, 80, 75) end, --I5
getResists = function(self, t) return self:combatTalentLimit(t, 40, 5, 25) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "heightened_senses", t.sense(self, t))
self:talentTemporaryValue(p, "see_invisible", t.seePower(self, t))
self:talentTemporaryValue(p, "see_stealth", t.seePower(self, t))
if self:getTalentLevel(t) >= 3 then
self:talentTemporaryValue(p, "resist_unseen", t.getResists(self, t))
end
end,
info = function(self, t)
return ([[You notice the small things others do not notice, allowing you to "see" creatures in a %d radius even outside of light radius.
This is not telepathy, however, and it is still limited to line of sight.
Also, your attention to detail increases stealth detection and invisibility detection by %d.
At level 3, you are able to react quickly to stealthed and invisible enemies attacking you, reducing the damage they deal by %d%%.
The detection power improves with your Cunning.]]):
format(t.sense(self,t), t.seePower(self,t), t.getResists(self,t))
end,
}
newTalent{
name = "Track",
type = {"cunning/survival", 2},
require = cuns_req2,
points = 5,
random_ego = "utility",
cooldown = 20,
radius = function(self, t) return math.floor(self:combatScale(self:getCun(10, true) * self:getTalentLevel(t), 5, 0, 55, 50)) end,
no_npc_use = true,
action = function(self, t)
local rad = self:getTalentRadius(t)
self:setEffect(self.EFF_SENSE, 3 + self:getTalentLevel(t), {
range = rad,
actor = 1,
})
return true
end,
info = function(self, t)
local rad = self:getTalentRadius(t)
return ([[Sense foes around you in a radius of %d for %d turns.
The radius will increase with your Cunning.]]):format(rad, 3 + self:getTalentLevel(t))
end,
}
newTalent{
name = "Device Mastery",
type = {"cunning/survival", 3},
require = cuns_req3,
mode = "passive",
points = 5,
cdReduc = function(tl)
if tl <=0 then return 0 end
return math.floor(100*tl/(tl+7.5)) -- Limit < 100%
end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "use_object_cooldown_reduce", t.cdReduc(self:getTalentLevel(t)))
end,
on_learn = function(self, t)
if self:getTalentLevel(t) >= 3 and not self:knowTalent(self.T_DISARM_TRAP) then
if not self:knowTalent(self.T_DISARM_TRAP) then
self:learnTalent(self.T_DISARM_TRAP, true, 1)
end
end,
on_unlearn = function(self, t)
if self:getTalentLevel(t) < 3 and self:knowTalent(self.T_DISARM_TRAP) then
if self:getTalentLevel(t) < 1 and self:knowTalent(self.T_DISARM_TRAP) then
self:unlearnTalent(self.T_DISARM_TRAP, 1)
end
end,
trapPower = function(self, t) return self:combatScale(self:getTalentLevel(t) * self:getCun(25, true), 0, 0, 125, 125) end,
info = function(self, t)
return ([[You notice the small things others do not notice, allowing you to "see" creatures in a %d radius even outside of light radius.
This is not telepathy, however, and it is still limited to line of sight.
Also, your attention to detail allows you to detect traps around you (%d detection 'power').
At level 3, you learn to disarm known traps (%d disarm 'power').
The trap detection and disarming ability improves with your Cunning.]]):
format(t.sense(self,t),t.trapPower(self,t),t.trapPower(self,t))
return ([[Your cunning manipulations allow you to use charms (wands, totems and torques) more efficiently, reducing their cooldowns and the power cost of all usable items by %d%%.
In addition, your knowledge of devices allows you to detect traps around you and disarm known traps (%d detection and disarm 'power').
The trap detection and disarming ability improves with your Cunning. ]]):
format(t.cdReduc(self:getTalentLevel(t)), t.trapPower(self,t)) --I5
end,
}
newTalent{
name = "Danger Sense",
type = {"cunning/survival", 4},
require = cuns_req4,
points = 5,
mode = "passive",
getTrigger = function(self, t) return self:combatTalentScale(t, 0.15, 0.40, 0.5) end,
cooldown = function(self, t) return 30 end,
no_npc_use = true,
getReduction = function(self, t)
return self:combatTalentLimit(t, 75, 25, 65)
end,
callbackOnHit = function(self, t, cb, src)
if self.life > self.max_life*t.getTrigger(self,t) and self.life - cb.value <= self.max_life*t.getTrigger(self,t) and not self:isTalentCoolingDown(t) then
self:setEffect("EFF_DANGER_SENSE", 1, {reduce = t.getReduction(self, t)})
local eff = self:hasEffect("EFF_DANGER_SENSE")
eff.dur = eff.dur - 1
cb.value = cb.value * (100-t.getReduction(self, t)) / 100
self:startTalentCooldown(t)
end
return cb.value
end,
info = function(self, t)
return ([[You react quickly when in danger - on falling below %d%% life, all damage you take from the attack and all further damage that turn is reduced by %d%%.
This talent has a cooldown.]]):
format(t.getTrigger(self,t)*100, t.getReduction(self,t) )
end,
}
......@@ -88,77 +169,10 @@ newTalent{
return true
end,
info = function(self, t)
local ths = self:getTalentFromId(self.T_HEIGHTENED_SENSES)
local ths = self:getTalentFromId(self.T_DEVICE_MASTERY)
local power = ths.trapPower(self,ths)
return ([[You search an adjacent grid for a hidden trap (%d detection 'power') and attempt to disarm it (%d disarm 'power').
To disarm a trap, you must be able to enter its grid to manipulate it, even though you stay in your current location.
Success depends on your skill in the %s talent and your Cunning, and failing to disarm a trap may trigger it.]]):format(power, power + (self:attr("disarm_bonus") or 0), ths.name)
end,
}
newTalent{
name = "Charm Mastery",
type = {"cunning/survival", 2},
require = cuns_req2,
mode = "passive",
points = 5,
cdReduc = function(tl)
if tl <=0 then return 0 end
return math.floor(100*tl/(tl+7.5)) -- Limit < 100%
end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "use_object_cooldown_reduce", t.cdReduc(self:getTalentLevel(t)))
end,
-- on_unlearn = function(self, t)
-- end,
info = function(self, t)
return ([[Your cunning manipulations allow you to use charms (wands, totems and torques) more efficiently, reducing their cooldowns by %d%%.]]):
format(t.cdReduc(self:getTalentLevel(t)))
end,
}
newTalent{
name = "Piercing Sight",
type = {"cunning/survival", 3},
require = cuns_req3,
mode = "passive",
points = 5,
-- called by functions _M:combatSeeStealth and _M:combatSeeInvisible functions mod\class\interface\Combat.lua
seePower = function(self, t) return self:combatScale(self:getCun(15, true)*self:getTalentLevel(t), 5, 0, 80, 75) end, --I5
info = function(self, t)
return ([[You look at your surroundings with more intensity than most people, allowing you to see stealthed or invisible creatures.
Increases stealth detection by %d and invisibility detection by %d.
The detection power increases with your Cunning.]]):
format(t.seePower(self,t), t.seePower(self,t))
end,
}
newTalent{
name = "Evasion",
type = {"cunning/survival", 4},
points = 5,
require = cuns_req4,
random_ego = "defensive",
tactical = { ESCAPE = 2, DEFEND = 2 },
cooldown = 30,
getDur = function(self) return math.floor(self:combatStatLimit("wil", 30, 6, 15)) end, -- Limit < 30
getChanceDef = function(self, t)
if self.perfect_evasion then return 100, 0 end
return self:combatLimit(5*self:getTalentLevel(t) + self:getCun(25,true) + self:getDex(25,true), 50, 10, 10, 37.5, 75),
self:combatScale(self:getTalentLevel(t) * (self:getCun(25, true) + self:getDex(25, true)), 0, 0, 55, 250, 0.75)
-- Limit evasion chance < 50%, defense bonus ~= 55 at level 50
end,
speed = "combat",
action = function(self, t)
local dur = t.getDur(self)
local chance, def = t.getChanceDef(self,t)
self:setEffect(self.EFF_EVASION, dur, {chance=chance, defense = def})
return true
end,
info = function(self, t)
local chance, def = t.getChanceDef(self,t)
return ([[Your quick wit allows you to see attacks before they land, granting you a %d%% chance to completely evade them and granting you %d defense for %d turns.
Duration increases with Willpower, and chance to evade and defense with Cunning and Dexterity.]]):
format(chance, def,t.getDur(self))
end,
}
}
\ No newline at end of file
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