diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index 94a7d8f8e784a82195a03560e585b24719f54a63..61f3f6ff00240afe4b22a8700413632eadf5ad9e 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -73,7 +73,7 @@ newEntity{ base = "BASE_INFUSION", inscription_kind = "protect", inscription_data = { - cooldown = 20, + cooldown = 18, dur = 6, power = 10, use_stat_mod = 0.1, @@ -804,7 +804,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", wielder = { combat_def = 10, combat_armor = 15, - combat_armor_hardiness = 40, + combat_armor_hardiness = 30, inc_stats = { [Stats.STAT_CON] = 5, [Stats.STAT_WIL] = 4, }, combat_mindpower = 10, combat_mindcrit = 5, diff --git a/game/modules/tome/data/gfx/talents/axe_kick.png b/game/modules/tome/data/gfx/talents/axe_kick.png new file mode 100644 index 0000000000000000000000000000000000000000..ed14c95a9cb4e4604616ee921aca294d6142016c Binary files /dev/null and b/game/modules/tome/data/gfx/talents/axe_kick.png differ diff --git a/game/modules/tome/data/gfx/talents/reflex_defense.png b/game/modules/tome/data/gfx/talents/reflex_defense.png new file mode 100644 index 0000000000000000000000000000000000000000..f7b7c42cb1d13578dff72b87f2b8fb74f9beeef3 Binary files /dev/null and b/game/modules/tome/data/gfx/talents/reflex_defense.png differ diff --git a/game/modules/tome/data/gfx/talents/unified_body.png b/game/modules/tome/data/gfx/talents/unified_body.png new file mode 100644 index 0000000000000000000000000000000000000000..a98a8cb4286664b676b0502120b4bd29470444cc Binary files /dev/null and b/game/modules/tome/data/gfx/talents/unified_body.png differ diff --git a/game/modules/tome/data/sound/actions/punch1.ogg b/game/modules/tome/data/sound/actions/punch1.ogg index a627234cb74aaf73432d076a0ac7c2f18b3cf581..419fb07f8bc18350ccf54e8bc2b72ac8495bd84e 100644 Binary files a/game/modules/tome/data/sound/actions/punch1.ogg and b/game/modules/tome/data/sound/actions/punch1.ogg differ diff --git a/game/modules/tome/data/sound/actions/punch2.ogg b/game/modules/tome/data/sound/actions/punch2.ogg index e04f96785bdba9a3e460b396eaae41f8a438bb3d..1af136f9851ca1c4b365c303c71ace24147aead1 100644 Binary files a/game/modules/tome/data/sound/actions/punch2.ogg and b/game/modules/tome/data/sound/actions/punch2.ogg differ diff --git a/game/modules/tome/data/sound/actions/punch3.ogg b/game/modules/tome/data/sound/actions/punch3.ogg index effec0ff03e836a6e685b963e85a624976513b21..be1eeac3c1b3b57b1ed114862e94ec47a0a2321b 100644 Binary files a/game/modules/tome/data/sound/actions/punch3.ogg and b/game/modules/tome/data/sound/actions/punch3.ogg differ diff --git a/game/modules/tome/data/sound/actions/punch4.ogg b/game/modules/tome/data/sound/actions/punch4.ogg index 808ea280de7601dba2acb8858b0438c56ed72667..1696d687053f42daf1fb0fcfbcbd439457357154 100644 Binary files a/game/modules/tome/data/sound/actions/punch4.ogg and b/game/modules/tome/data/sound/actions/punch4.ogg differ diff --git a/game/modules/tome/data/sound/actions/whip_hit.ogg b/game/modules/tome/data/sound/actions/whip_hit.ogg index 6939c150541618011813ea21ba8826d9afb3586a..f080220fd30ca6dab6dd7e0c8539dde73fb59684 100644 Binary files a/game/modules/tome/data/sound/actions/whip_hit.ogg and b/game/modules/tome/data/sound/actions/whip_hit.ogg differ diff --git a/game/modules/tome/data/sound/actions/whip_miss.ogg b/game/modules/tome/data/sound/actions/whip_miss.ogg index 08eecf42f070f838c1696d70ab09c2c167fa054d..70d18f02189e860e1f49ed26087700d75c5ae920 100644 Binary files a/game/modules/tome/data/sound/actions/whip_miss.ogg and b/game/modules/tome/data/sound/actions/whip_miss.ogg differ diff --git a/game/modules/tome/data/talents/misc/npcs.lua b/game/modules/tome/data/talents/misc/npcs.lua index 36c3c76bb70b1e8d62972954fc0b9c16c827badf..53458c08d7107e85be30498bf3358350a71a0c28 100644 --- a/game/modules/tome/data/talents/misc/npcs.lua +++ b/game/modules/tome/data/talents/misc/npcs.lua @@ -2126,3 +2126,51 @@ newTalent{ :format(damage, drain, daze, dazemax) end, } + +newTalent{ + name = "Relentless Strikes", + type = {"technique/other", 1}, + points = 5, + mode = "passive", + getStamina = function(self, t) return self:combatTalentScale(t, 1/4, 5/4, 0.75) end, + getCooldownReduction = function(self, t) return self:combatTalentLimit(t, 0.67, 0.09, 1/3) end, -- Limit < 67% + info = function(self, t) + local stamina = t.getStamina(self, t) + local cooldown = t.getCooldownReduction(self, t) + return ([[Reduces the cooldown on all your Pugilism talents by %d%%. Additionally, every time you earn a combo point, you will regain %0.2f stamina. + Note that stamina gains from combo points occur before any talent stamina costs.]]) + :format(cooldown * 100, stamina) + end, +} + +newTalent{ + name = "Combo String", + type = {"technique/other", 1}, + mode = "passive", + points = 5, + getDuration = function(self, t) return math.ceil(self:combatTalentScale(t, 0.3, 2.3)) end, + getChance = function(self, t) return self:combatLimit(self:getTalentLevel(t) * (5 + self:getCun(5, true)), 100, 0, 0, 50, 50) end, -- Limit < 100% + info = function(self, t) + local duration = t.getDuration(self, t) + local chance = t.getChance(self, t) + return ([[When gaining a combo point, you have a %d%% chance to gain an extra combo point. Additionally, your combo points will last %d turns longer before expiring. + The chance of building a second combo point will improve with your Cunning.]]): + format(chance, duration) + end, +} + +newTalent{ + name = "Steady Mind", + type = {"technique/other", 1}, + mode = "passive", + points = 5, + getDefense = function(self, t) return self:combatTalentStatDamage(t, "dex", 5, 35) end, + getMental = function(self, t) return self:combatTalentStatDamage(t, "cun", 5, 35) end, + info = function(self, t) + local defense = t.getDefense(self, t) + local saves = t.getMental(self, t) + return ([[Superior cunning and training allows you to outthink and outwit your opponents' physical and mental assaults. Increases Defense by %d and Mental Save by %d. + The Defense bonus will scale with your Dexterity, and the save bonus with your Cunning.]]): + format(defense, saves) + end, +} diff --git a/game/modules/tome/data/talents/techniques/conditioning.lua b/game/modules/tome/data/talents/techniques/conditioning.lua index f57156cb96c1227255be32fe8b554dcde3c43729..571f7caad333623b5022aae9c61831c0b2be1b80 100644 --- a/game/modules/tome/data/talents/techniques/conditioning.lua +++ b/game/modules/tome/data/talents/techniques/conditioning.lua @@ -42,9 +42,53 @@ newTalent{ } newTalent{ - name = "Daunting Presence", + name = "Unflinching Resolve", type = {"technique/conditioning", 2}, require = techs_con_req2, + mode = "passive", + points = 5, + getChance = function(self, t) return self:combatStatLimit("con", 1, .28, .745)*self:combatTalentLimit(t,100, 28,74.8) end, -- Limit < 100% + do_unflinching_resolve = function(self, t) + local effs = {} + -- Go through all spell effects + for eff_id, p in pairs(self.tmp) do + local e = self.tempeffect_def[eff_id] + if e.status == "detrimental" then + if e.subtype.stun then + effs[#effs+1] = {"effect", eff_id} + elseif e.subtype.blind and self:getTalentLevel(t) >=2 then + effs[#effs+1] = {"effect", eff_id} + elseif e.subtype.confusion and self:getTalentLevel(t) >=3 then + effs[#effs+1] = {"effect", eff_id} + elseif e.subtype.pin and self:getTalentLevel(t) >=4 then + effs[#effs+1] = {"effect", eff_id} + elseif e.subtype.slow and self:getTalentLevel(t) >=5 then + effs[#effs+1] = {"effect", eff_id} + end + end + end + + if #effs > 0 then + local eff = rng.tableRemove(effs) + if eff[1] == "effect" and rng.percent(t.getChance(self, t)) then + self:removeEffect(eff[2]) + game.logSeen(self, "%s has recovered!", self.name:capitalize()) + end + end + end, + info = function(self, t) + local chance = t.getChance(self, t) + return ([[You've learned to recover quickly from effects that would disable you. Each turn, you have a %d%% chance to recover from a single stun effect. + At talent level 2 you may also recover from blindness, at level 3 confusion, level 4 pins, and level 5 slows. + Only one effect may be recovered from each turn, and the chance to recover from an effect scales with your Constitution.]]): + format(chance) + end, +} + +newTalent{ + name = "Daunting Presence", + type = {"technique/conditioning", 3}, + require = techs_con_req3, points = 5, mode = "sustained", sustain_stamina = 20, @@ -89,50 +133,6 @@ newTalent{ end, } -newTalent{ - name = "Unflinching Resolve", - type = {"technique/conditioning", 3}, - require = techs_con_req3, - mode = "passive", - points = 5, - getChance = function(self, t) return self:combatStatLimit("con", 1, .28, .745)*self:combatTalentLimit(t,100, 28,74.8) end, -- Limit < 100% - do_unflinching_resolve = function(self, t) - local effs = {} - -- Go through all spell effects - for eff_id, p in pairs(self.tmp) do - local e = self.tempeffect_def[eff_id] - if e.status == "detrimental" then - if e.subtype.stun then - effs[#effs+1] = {"effect", eff_id} - elseif e.subtype.blind and self:getTalentLevel(t) >=2 then - effs[#effs+1] = {"effect", eff_id} - elseif e.subtype.confusion and self:getTalentLevel(t) >=3 then - effs[#effs+1] = {"effect", eff_id} - elseif e.subtype.pin and self:getTalentLevel(t) >=4 then - effs[#effs+1] = {"effect", eff_id} - elseif e.subtype.slow and self:getTalentLevel(t) >=5 then - effs[#effs+1] = {"effect", eff_id} - end - end - end - - if #effs > 0 then - local eff = rng.tableRemove(effs) - if eff[1] == "effect" and rng.percent(t.getChance(self, t)) then - self:removeEffect(eff[2]) - game.logSeen(self, "%s has recovered!", self.name:capitalize()) - end - end - end, - info = function(self, t) - local chance = t.getChance(self, t) - return ([[You've learned to recover quickly from effects that would disable you. Each turn, you have a %d%% chance to recover from a single stun effect. - At talent level 2 you may also recover from blindness, at level 3 confusion, level 4 pins, and level 5 slows. - Only one effect may be recovered from each turn, and the chance to recover from an effect scales with your Constitution.]]): - format(chance) - end, -} - newTalent{ name = "Adrenaline Surge", -- no stamina cost; it's main purpose is to give the player an alternative means of using stamina based talents type = {"technique/conditioning", 4}, diff --git a/game/modules/tome/data/talents/techniques/finishing-moves.lua b/game/modules/tome/data/talents/techniques/finishing-moves.lua index f4d65e3d6ad14a32b1f634b39c8b1c774e9f71fa..f1e1d104796f533e3d8c2e327cd686a5a56d3c1e 100644 --- a/game/modules/tome/data/talents/techniques/finishing-moves.lua +++ b/game/modules/tome/data/talents/techniques/finishing-moves.lua @@ -30,7 +30,7 @@ newTalent{ requires_target = true, --on_pre_use = function(self, t, silent) if not self:hasEffect(self.EFF_COMBO) then if not silent then game.logPlayer(self, "You must have a combo going to use this ability.") end return false end return true end, getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.1, 1.8) + getStrikingStyle(self, dam) end, - getDuration = function(self, t, comb) return math.ceil(self:combatTalentScale(t, 1, 5) * (0.25 + comb/5)) end, + getDuration = function(self, t, comb) return 2 + math.ceil(self:combatTalentScale(t, 1, 5) * (0.25 + comb/5)) end, action = function(self, t) local tg = {type="hit", range=self:getTalentRange(t)} local x, y, target = self:getTarget(tg) @@ -199,7 +199,7 @@ newTalent{ tactical = { ATTACK = { weapon = 2 } }, requires_target = true, --on_pre_use = function(self, t, silent) if not self:hasEffect(self.EFF_COMBO) then if not silent then game.logPlayer(self, "You must have a combo going to use this ability.") end return false end return true end, - getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 2, 3.5) + getStrikingStyle(self, dam) end, + getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1, 2.8) + getStrikingStyle(self, dam) end, getBonusDamage = function(self, t) return self:getCombo(combo)/5 end, -- shift more of the damage to CP getStamina = function(self, t, comb) return self:combatLimit((self:getTalentLevel(t) + comb), 0.5, 0, 0, 0.2, 10) * self.max_stamina diff --git a/game/modules/tome/data/talents/techniques/pugilism.lua b/game/modules/tome/data/talents/techniques/pugilism.lua index 7d837e5744c951d93e8f74798374c916a5086d2a..c2bf107b3e7c472816fa3d5cadaa6a2d116b9ec6 100644 --- a/game/modules/tome/data/talents/techniques/pugilism.lua +++ b/game/modules/tome/data/talents/techniques/pugilism.lua @@ -39,23 +39,26 @@ newTalent{ no_unlearn_last = true, getAttack = function(self, t) return self:getDex(25, true) end, getDamage = function(self, t) return self:combatStatScale("dex", 5, 50) end, + getFlatReduction = function(self, t) return self:combatStatLimit("str", 20, 1, 12) end, -- limit because high flat reduction can fuck melee players activate = function(self, t) cancelStances(self) local ret = { atk = self:addTemporaryValue("combat_atk", t.getAttack(self, t)), + flat = self:addTemporaryValue("flat_damage_armor", {all = t.getFlatReduction(self, t)}) } return ret end, deactivate = function(self, t, p) self:removeTemporaryValue("combat_atk", p.atk) + self:removeTemporaryValue("flat_damage_armor", p.flat) return true end, info = function(self, t) local attack = t.getAttack(self, t) local damage = t.getDamage(self, t) - return ([[Increases your Accuracy by %d, and the damage multiplier of your striking talents (Pugilism and Finishing Moves) by %d%%. - The bonuses will scale with your Dexterity.]]): - format(attack, damage) + return ([[Increases your Accuracy by %d, the damage multiplier of your striking talents (Pugilism and Finishing Moves) by %d%%, and reduces all damage taken by %d. + The offensive bonuses scale with your Dexterity and the damage reduction with your Strength.]]): + format(attack, damage, t.getFlatReduction(self, t)) end, } @@ -65,11 +68,12 @@ newTalent{ require = techs_dex_req1, points = 5, random_ego = "attack", - cooldown = function(self, t) return math.ceil(3 * getRelentless(self, cd)) end, + --cooldown = function(self, t) return math.ceil(3 * getRelentless(self, cd)) end, + cooldown = 3, message = "@Source@ throws two quick punches.", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, - getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.1, 0.8) + getStrikingStyle(self, dam) end, + getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.5, 0.8) + getStrikingStyle(self, dam) end, -- Learn the appropriate stance on_learn = function(self, t) if not self:knowTalent(self.T_STRIKING_STANCE) then @@ -134,31 +138,16 @@ newTalent{ end, } + + newTalent{ - name = "Relentless Strikes", + name = "Spinning Backhand", type = {"technique/pugilism", 2}, require = techs_dex_req2, points = 5, - random_ego = "utility", - mode = "passive", - getStamina = function(self, t) return self:combatTalentScale(t, 1/4, 5/4, 0.75) end, - getCooldownReduction = function(self, t) return self:combatTalentLimit(t, 0.67, 0.09, 1/3) end, -- Limit < 67% - info = function(self, t) - local stamina = t.getStamina(self, t) - local cooldown = t.getCooldownReduction(self, t) - return ([[Reduces the cooldown on all your Pugilism talents by %d%%. Additionally, every time you earn a combo point, you will regain %0.2f stamina. - Note that stamina gains from combo points occur before any talent stamina costs.]]) - :format(cooldown * 100, stamina) - end, -} - -newTalent{ - name = "Spinning Backhand", - type = {"technique/pugilism", 3}, - require = techs_dex_req3, - points = 5, random_ego = "attack", - cooldown = function(self, t) return math.ceil(12 * getRelentless(self, cd)) end, + --cooldown = function(self, t) return math.ceil(12 * getRelentless(self, cd)) end, + cooldown = 8, stamina = 12, range = function(self, t) return math.ceil(2 + self:combatTalentScale(t, 2.2, 4.3)) end, -- being able to use this over rush without massive investment is much more fun chargeBonus = function(self, t, dist) return self:combatScale(dist, 0.15, 1, 0.50, 5) end, @@ -254,18 +243,74 @@ newTalent{ end, } +-- If kick, normal attack+small kick effect? +newTalent{ + name = "Axe Kick", + type = {"technique/pugilism", 3}, + require = techs_dex_req3, + points = 5, + stamina = 20, + random_ego = "attack", + cooldown = function(self, t) + return 20 + end, + getDuration = function(self, t) + --return self:combatTalentScale(t, 1, 3) + return self:combatTalentLimit(t, 5, 1, 4) + end, + message = "@Source@ raises their leg and snaps it downward in a devastating axe kick.", + tactical = { ATTACK = { weapon = 2 } }, + requires_target = true, + getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.8, 2) + getStrikingStyle(self, dam) end, -- low damage scaling, investment gets the extra CP + 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 core.fov.distance(self.x, self.y, x, y) > 1 then return nil end + + -- breaks active grapples if the target is not grappled + if target:isGrappled(self) then + grappled = true + else + self:breakGrapples() + end + + local hit1 = false + + hit1 = self:attackTarget(target, nil, t.getDamage(self, t), true) + + if hit1 then + target:setEffect(target.EFF_DELIRIOUS_CONCUSSION, t.getDuration(self, t), {}) + end + + -- build combo points + if hit1 then + self:buildCombo() + self:buildCombo() + end + return true + + end, + info = function(self, t) + local damage = t.getDamage(self, t) * 100 + return ([[Deliver a devastating axe kick dealing %d%% damage. If the blow connects your target is brain damaged, causing all talents to fail for %d turns and earning 2 combo points.]]) + :format(damage, t.getDuration(self, t)) + end, +} + newTalent{ name = "Flurry of Fists", type = {"technique/pugilism", 4}, require = techs_dex_req4, points = 5, random_ego = "attack", - cooldown = function(self, t) return math.ceil(24 * getRelentless(self, cd)) end, + --cooldown = function(self, t) return math.ceil(24 * getRelentless(self, cd)) end, + cooldown = 16, stamina = 15, message = "@Source@ lashes out with a flurry of fists.", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, - getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.4, 1.1) + getStrikingStyle(self, dam) end, + getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.4, 0.8) + getStrikingStyle(self, dam) end, action = function(self, t) local tg = {type="hit", range=self:getTalentRange(t)} local x, y, target = self:getTarget(tg) @@ -317,4 +362,3 @@ newTalent{ :format(damage) end, } - diff --git a/game/modules/tome/data/talents/techniques/unarmed-training.lua b/game/modules/tome/data/talents/techniques/unarmed-training.lua index e3e6952f5370307ea9d12ef5de017a022e554213..a22b788ff74359003150932d55bf69a6db00689e 100644 --- a/game/modules/tome/data/talents/techniques/unarmed-training.lua +++ b/game/modules/tome/data/talents/techniques/unarmed-training.lua @@ -60,8 +60,9 @@ newTalent{ points = 5, require = { stat = { cun=function(level) return 12 + level * 6 end }, }, mode = "passive", - getDamage = function(self, t) return self:getTalentLevel(t) * 10 end, - getPercentInc = function(self, t) return math.sqrt(self:getTalentLevel(t) / 5) / 2 end, + --getDamage = function(self, t) return self:getTalentLevel(t) * 10 end, + getDamage = function(self, t) return self:combatTalentScale(t, 10, 30, 0.25) end, + getPercentInc = function(self, t) return math.sqrt(self:getTalentLevel(t) / 5) / 4 end, info = function(self, t) local damage = t.getDamage(self, t) local inc = t.getPercentInc(self, t) @@ -72,20 +73,30 @@ newTalent{ } newTalent{ - name = "Steady Mind", + name = "Unified Body", type = {"technique/unarmed-training", 2}, - mode = "passive", - points = 5, require = techs_cun_req2, - getDefense = function(self, t) return self:combatTalentStatDamage(t, "dex", 5, 35) end, - getMental = function(self, t) return self:combatTalentStatDamage(t, "cun", 5, 35) end, - info = function(self, t) - local defense = t.getDefense(self, t) - local saves = t.getMental(self, t) - return ([[Superior cunning and training allows you to outthink and outwit your opponents' physical and mental assaults. Increases Defense by %d and Mental Save by %d. - The Defense bonus will scale with your Dexterity, and the save bonus with your Cunning.]]): - format(defense, saves) + mode = "sustained", + points = 5, + --sustain_stamina = 50, + cooldown = 18, + tactical = { BUFF = 2 }, + getStr = function(self, t) return math.ceil(self:combatTalentScale(t, 1.5, 7.5, 0.75) + self:combatTalentStatDamage(t, "cun", 2, 10)) end, + getCon = function(self, t) return math.ceil(self:combatTalentScale(t, 1.5, 7.5, 0.75) + self:combatTalentStatDamage(t, "dex", 5, 20)) end, + activate = function(self, t) + return { + stat1 = self:addTemporaryValue("inc_stats", {[self.STAT_CON] = t.getCon(self, t)}), + stat2 = self:addTemporaryValue("inc_stats", {[self.STAT_STR] = t.getStr(self, t)}), + } end, + deactivate = function(self, t, p) + self:removeTemporaryValue("inc_stats", p.stat1) + self:removeTemporaryValue("inc_stats", p.stat2) + return true + end, + info = function(self, t) + return ([[Your mastery of unarmed combat unifies your body. Increases your Strength by %d based on Cunning and your Constitution by %d based on Dexterity.]]):format(t.getStr(self, t), t.getCon(self, t)) + end } newTalent{ @@ -106,18 +117,41 @@ newTalent{ } newTalent{ - name = "Combo String", + name = "Reflex Defense", type = {"technique/unarmed-training", 4}, - require = techs_cun_req4, - mode = "passive", + require = techs_cun_req4, -- bit icky since this is clearly dex, but whatever, cun turns defense special *handwave* points = 5, - getDuration = function(self, t) return math.ceil(self:combatTalentScale(t, 0.3, 2.3)) end, - getChance = function(self, t) return self:combatLimit(self:getTalentLevel(t) * (5 + self:getCun(5, true)), 100, 0, 0, 50, 50) end, -- Limit < 100% + mode = "sustained", + cooldown = 10, + no_energy = true, -- annoying when sustains take energy without a good reason + tactical = { BUFF = 2 }, + getDefensePct = function(self, t) + return self:combatTalentLimit(t, 1, 0.05, 0.9) -- ugly, fix later + end, + getDamageReduction = function(self, t) + return t.getDefensePct(self, t) * self:combatDefense() / 100 + end, + getDamagePct = function(self, t) + return 0.2 + end, + activate = function(self, t) + + return {} + end, + deactivate = function(self, t, p) + return true + end, + callbackOnHit = function(self, t, cb) + if ( cb.value > (t.getDamagePct(self, t) * self.max_life) ) then + local damageReduction = cb.value * t.getDamageReduction(self, t) + cb.value = cb.value - damageReduction + game.logPlayer(self, "#GREEN#You twist your body in complex ways mitigating the blow by " .. math.ceil(damageReduction) .. ".") + end + return cb.value + end, info = function(self, t) - local duration = t.getDuration(self, t) - local chance = t.getChance(self, t) - return ([[When gaining a combo point, you have a %d%% chance to gain an extra combo point. Additionally, your combo points will last %d turns longer before expiring. - The chance of building a second combo point will improve with your Cunning.]]): - format(chance, duration) + return ([[Your understanding of physiology allows you to apply your reflexes in new ways. Whenever you receive damage greater than %d%% of your maximum life you reduce that damage by %d%% based on your defense.]]): + format(t.getDamagePct(self, t)*100, t.getDamageReduction(self, t)*100 ) end, } + diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index 671d34e15827e516f361e2825ccb3afc8837c258..17deb21e79061d02e43143b2cb7e7d6adcec8a6e 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -24,6 +24,26 @@ local Chat = require "engine.Chat" local Map = require "engine.Map" local Level = require "engine.Level" + + +newEffect{ + name = "DELIRIOUS_CONCUSSION", image = "talents/slippery_moss.png", + desc = "Concussion", + long_desc = function(self, eff) return ("The target can't think straight, causing their actions to fail."):format() end, + type = "physical", + subtype = { mental=true }, + status = "detrimental", + parameters = {}, + on_gain = function(self, err) return "#Target#'s brain isn't quite working right!", "+Concussion" end, + on_lose = function(self, err) return "#Target# regains their concentration.", "-Concussion" end, + activate = function(self, eff) + eff.tmpid = self:addTemporaryValue("talent_fail_chance", 100) + end, + deactivate = function(self, eff) + self:removeTemporaryValue("talent_fail_chance", eff.tmpid) + end, +} + newEffect{ name = "CUT", image = "effects/cut.png", desc = "Bleeding",