- newTalent{
- name = "Swashbuckling",
- type = {"cunning/misdirection", 1},
- mode = "sustained",
- points = 5,
- require = techs_cun_req1,
- no_energy = true,
- cooldown = 15,
- sustain_stamina = 20,
- tactical = { BUFF = 2 },
- on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require two weapons to use this talent.") end return false end return true
- activate = function(self, t)
- local weapon, offweapon = self:hasDualWeapon()
- if not weapon then
- game.logPlayer(self, "You cannot use Swashbuckling without dual wielding!")
- return nil
- end
- return {
- apr = self:addTemporaryValue("combat_apr", 2 + (self:getTalentLevel(t) * self:getCun()) / 30),
- cp = self:addTemporaryValue("combat_critical_power", 10 + (self:getTalentLevel(t) * self:getCun()) / 20),
- def = self:addTemporaryValue("combat_def", 8 + self:getTalentLevel(t) * self:getCun()) / 30,
- crit = self:addTemporaryValue("combat_physcrit", (10 + (self:getTalentLevel(t) * 3),
- }
- end,
- deactivate = function(self, t, p)
- self:removeTemporaryValue("combat_apr", p.apr),
- self:removeTemporaryValue("combat_critical_power", p.cp),
- self:removeTemporaryValue("combat_def", p.def),
- self:removeTemporaryValue("combat_physcrit", p.crit),
- return true
- end,
- info = function(self, t)
- return ([[Utilize your offhand weapon in a flamboyant way, in order to distract your enemy for killing blows with your mainhand weapon. Your critical hit rate is raised by %d%%, your critical hit damage modifier is raised by %d%%, your armor penetration by %d and your Defense is raised by %d. However, your offhand damage is reduced 90%, as you are forced to sacrifice killing blows for distraction value. All bonuses will increase with the user's Cunning.]]):format(10 + (self:getTalentLevel(t) * 3),("combat_critical_power", 10 + (self:getTalentLevel(t) * self:getCun()) / 20),(2 + (self:getTalentLevel(t) * self:getCun()) / 30),("combat_def", (8 + self:getTalentLevel(t) * self:getCun()) / 30)
- end,
- }
- In tome/class/interface/combat.lua:
- --- Gets the off hand multiplier
- if self:isTalentActive(self.T_SWASHBUCKLING) then
- offmult = offmult / 10
- end
- newTalent{
- name = "Weakening Strikes",
- type = {"cunning/misdirection", 2},
- mode = "passive",
- points = 5,
- require = techs_cun_req2,
- mode = "passive",
- do_cut = function(self, t, target, dam)
- if target:canBe("cut") and rng.percent(10+(getTalentLevel(t)*8)) then
- dam = dam * self:combatTalentWeaponDamage(t, 0.2, 0.5)
- if self:getTalentLevel(t) >= 5 then
- target:setEffect(target.EFF_SLOWING_WOUND, 10, {power=dam / 10, speed=(self:getTalentLevel(t)*3), apply_power=self:combatAttack()})
- else
- target:setEffect(target.EFF_BLEEDING, 10, {power=dam / 10, apply_power=self:combatAttack()})
- end
- end,
- info = function(self, t)
- return ([[Rend your foe with every attack you do. All attacks now have a %d%% chance of inflicting %d%% of your mainhand weapon's damage in Bleeding damage, over ten turns.
- At Talent Level 5, you instead inflict Slowing Wounds that reduce the target's speed by %d%%.]]):
- format(10+(getTalentLevel(t)*8)),(self:combatTalentWeaponDamage(t, 0.2, 0.5) * 100),(self:getTalentLevel(t)*3)
- end,
- }
- In tome/class/interface/combat.lua:
- -- Weakening Strikes
- if hitted and not target.dead and self:knowTalent(self.T_WEAKENING_STRIKES) then
- local t = self:getTalentFromId(self.T_WEAKENING_STRIKES)
- t.do_cut(self, t, target, dam)
- end
- In tome / data / timed_effects / physical.lua
- newEffect{
- name = "SLOWING_WOUND", image = "talents/bleeding_edge.png",
- desc = "Slowing Wound",
- long_desc = function(self, eff) return ("Carefully placed hampering wound that bleeds, doing %0.2f physical damage per turn, and decreases global speed by %d%%."):format(eff.power, eff.heal_factor) end,
- type = "physical",
- subtype = { wound=true, cut=true },
- status = "detrimental",
- parameters = {power=10, speed=15},
- on_gain = function(self, err) return "#Target# starts to bleed and slows down.", "+Slowing Wound" end,
- on_lose = function(self, err) return "#Target# stops bleeding and speeds up.", "-Slowing Wound" end,
- on_merge = function(self, old_eff, new_eff)
- -- Merge the flames! Wait.
- local olddam = old_eff.power * old_eff.dur
- local newdam = new_eff.power * new_eff.dur
- local dur = math.ceil((old_eff.dur + new_eff.dur) / 2)
- old_eff.dur = dur
- old_eff.power = (olddam + newdam) / dur
- return old_eff
- end,
- activate = function(self, eff)
- eff.tmpid = self:addTemporaryValue("global_speed_add", -eff.speed)
- end,
- on_timeout = function(self, eff)
- DamageType:get(DamageType.PHYSICAL).projector(eff.src or self, self.x, self.y, DamageType.PHYSICAL, eff.power)
- end,
- deactivate = function(self, eff)
- self:removeTemporaryValue("global_speed_add", eff.tmpid)
- end,
- }
- newTalent{
- name = "Nimble Movements",
- type = {"cunning/misdirection", 3},
- message = "@Source@ dashes quickly!",
- no_break_stealth = true,
- require = techs_cun_req3,
- points = 5,
- random_ego = "attack",
- stamina = 12,
- cooldown = function(self, t) return math.floor(30 - self:getTalentLevel(t) * 3) end,
- tactical = { CLOSEIN = 3 },
- requires_target = true,
- range = function(self, t) return math.floor(7 + self:getTalentLevel(t) * 0.5) end,
- action = function(self, t)
- if self:attr("never_move") then game.logPlayer(self, "You can not do that currently.") return end
- local tg = {type="hit", range=self:getTalentRange(t)}
- local x, y, target = self:getTarget(tg)
- if not x or not y then return nil end
- if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end
- local block_actor = function(_, bx, by) return game.level.map:checkEntity(bx, by, Map.TERRAIN, "block_move", self) end
- local l = self:lineFOV(x, y, block_actor)
- local lx, ly, is_corner_blocked = l:step()
- if is_corner_blocked or game.level.map:checkAllEntities(lx, ly, "block_move", self) then
- game.logPlayer(self, "You cannot dash through that!")
- return
- end
- local tx, ty = lx, ly
- lx, ly, is_corner_blocked = l:step()
- while lx and ly do
- if is_corner_blocked or game.level.map:checkAllEntities(lx, ly, "block_move", self) then break end
- tx, ty = lx, ly
- lx, ly, is_corner_blocked = l:step()
- end
- local ox, oy = self.x, self.y
- self:move(tx, ty, true)
- if config.settings.tome.smooth_move > 0 then
- self:resetMoveAnim()
- self:setMoveAnim(ox, oy, 8, 5)
- end
- return true
- end,
- info = function(self, t)
- return ([[Quickly and quietly dash your way to the target square, if it is not blocked by enemies or obstacles in the way. This talent will not break Stealth.]])
- end,
- }
- newTalent{
- name = "Misdirection",
- type = {"cunning/misdirection", 4},
- mode = "passive",
- points = 5,
- require = techs_cun_req4,
- mode = "passive",
- on_learn = function(self, t)
- self.projectile_evasion = (self.projectile_evasion or 0) + 3
- self.projectile_evasion_spread = (self.projectile_evasion_spread or 0) + 1
- end,
- on_unlearn = function(self, t)
- self.projectile_evasion = (self.projectile_evasion or 0) - 3
- self.projectile_evasion_spread = (self.projectile_evasion_spread or 0) - 1
- end,
- info = function(self, t)
- return ([[Your abilities sowing confusion and chaos have reached their peak. Now even your most simple moves confuse your enemies, rendering their offense less effective. Your Defense increases by %d%%, and enemies have a %d%% chance of targetting a random square within %d squares of you. Your bonus percent to Defense will increase with Cunning.]]):
- format(self:getTalentLevel(self.T_MISDIRECTION) * (0.02 * (1 + self:getCun / 200),self:getTalentLevelRaw(t) * 3 ,self:getTalentLevelRaw(t) * 1)
- end,
- }
- In tome/class/interface/combat.lua:
- if self:knowTalent(self.T_MISDIRECTION) then
- d = d * (1 + self:getTalentLevel(self.T_MISDIRECTION) * (0.02 * (1 + self:getCun / 200))
- end