diff --git a/game/modules/tome/data/general/npcs/horror.lua b/game/modules/tome/data/general/npcs/horror.lua index 0a14809d55d4353f1c375db9c7edce18ab3c8c9c..2bdf4f71d822e7654d7c75bce67bc2c9d1c704dc 100644 --- a/game/modules/tome/data/general/npcs/horror.lua +++ b/game/modules/tome/data/general/npcs/horror.lua @@ -559,6 +559,7 @@ newEntity{ base = "BASE_NPC_HORROR", on_move = function(self) local DamageType = require "engine.DamageType" + local MapEffect = require "engine.MapEffect" local duration = 10 local radius = 0 local dam = 25 @@ -568,7 +569,7 @@ newEntity{ base = "BASE_NPC_HORROR", engine.DamageType.SLIME, 25, radius, 5, nil, - engine.Entity.new{alpha=100, display='', color_br=25, color_bg=140, color_bb=40}, + MapEffect.new{color_br=25, color_bg=140, color_bb=40, effect_shader="shader_images/retch_effect.png"}, function(e) e.radius = e.radius return true diff --git a/game/modules/tome/data/talents/misc/horrors.lua b/game/modules/tome/data/talents/misc/horrors.lua index 93e2da54ea5bedaea8c4650f3c825d18cb3f3ba7..18e0f9705917a85d0622860a6eb059fcce295f03 100644 --- a/game/modules/tome/data/talents/misc/horrors.lua +++ b/game/modules/tome/data/talents/misc/horrors.lua @@ -544,7 +544,7 @@ newTalent{ DamageType.SLIME, {dam=t.getDamage(self, t), power=0.15, x=self.x, y=self.y}, 1, 5, nil, - engine.Entity.new{alpha=100, display='', color_br=30, color_bg=200, color_bb=60}, + MapEffect.new{color_br=30, color_bg=200, color_bb=60, effect_shader="shader_images/retch_effect.png"}, function(e) e.radius = e.radius + 0.5 return true diff --git a/game/modules/tome/data/talents/techniques/2hweapon.lua b/game/modules/tome/data/talents/techniques/2hweapon.lua index 49c80d3e750cfe1ba5ef00dde40fc8234aadbb12..2a4ac3b66d9772a9431d401e0b368f2dd297f2b9 100644 --- a/game/modules/tome/data/talents/techniques/2hweapon.lua +++ b/game/modules/tome/data/talents/techniques/2hweapon.lua @@ -261,6 +261,7 @@ newTalent{ requires_target = true, tactical = { ATTACK = { weapon = 2 }, DISABLE = { stun = 2 } }, on_pre_use = function(self, t, silent) if not self:hasTwoHandedWeapon() then if not silent then game.logPlayer(self, "You require a two handed weapon to use this talent.") end return false end return true end, + getShatter = function(self, t) return self:combatTalentLimit(t, 100, 10, 85) end, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 5, 9)) end, getArmorReduc = function(self, t) return self:combatTalentScale(t, 5, 25, 0.75) end, action = function(self, t) @@ -279,14 +280,37 @@ newTalent{ -- Try to Sunder ! if hit then target:setEffect(target.EFF_SUNDER_ARMOUR, t.getDuration(self, t), {power=t.getArmorReduc(self,t), apply_power=self:combatPhysicalpower()}) + + if rng.percent(t.getShatter(self, t)) then + local effs = {} + + -- Go through all shield effects + for eff_id, p in pairs(target.tmp) do + local e = target.tempeffect_def[eff_id] + if e.status == "beneficial" and e.subtype and e.subtype.shield then + effs[#effs+1] = {"effect", eff_id} + end + end + + for i = 1, 1 do + if #effs == 0 then break end + local eff = rng.tableRemove(effs) + + if eff[1] == "effect" then + game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self.name:capitalize(), target.name) + target:removeEffect(eff[2]) + end + end + end end return true end, info = function(self, t) - return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target's Armour is reduced by %d for %d turns. + return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target's armour and saves are reduced by %d for %d turns. + Also if the target is protected by a temporary damage shield there is %d%% chance to shatter it. Armor reduction chance increases with your Physical Power.]]) - :format( 100 * self:combatTalentWeaponDamage(t, 1, 1.5),t.getArmorReduc(self, t), t.getDuration(self, t)) + :format(100 * self:combatTalentWeaponDamage(t, 1, 1.5),t.getArmorReduc(self, t), t.getDuration(self, t), t.getShatter(self, t)) end, } diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index 5b3714a4dd6fc3802a7783ea88e23a28f5b33e5b..93b03df912e483c59425130a523f51b4e7b57f17 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -1019,7 +1019,7 @@ newEffect{ desc = "Providence", long_desc = function(self, eff) return ("The target is under protection and its life regeneration is boosted by %d."):format(eff.power) end, type = "magical", - subtype = { light=true }, + subtype = { light=true, shield=true }, status = "beneficial", parameters = {}, on_timeout = function(self, eff) @@ -1348,7 +1348,7 @@ newEffect{ desc = "Bone Shield", long_desc = function(self, eff) return ("Any attacks doing more than %d%% of your life is reduced to %d%%."):format(eff.power, eff.power) end, type = "magical", - subtype = { arcane=true }, + subtype = { arcane=true, shield=true }, status = "beneficial", parameters = { power=30 }, on_gain = function(self, err) return "#Target# protected by flying bones.", "+Bone Shield" end, diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index df286ddb6b7e6828539c73d06ba375a602a43558..144cf6115a4a4a080316b5f05fc09915c04605b4 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -752,16 +752,16 @@ newEffect{ newEffect{ name = "SUNDER_ARMOUR", image = "talents/sunder_armour.png", desc = "Sunder Armour", - long_desc = function(self, eff) return ("The target's armour is broken, reducing it by %d."):format(eff.power) end, + long_desc = function(self, eff) return ("The target's armour and saves are broken, reducing them by %d."):format(eff.power) end, type = "physical", subtype = { sunder=true }, status = "detrimental", parameters = { power=10 }, activate = function(self, eff) - eff.tmpid = self:addTemporaryValue("combat_armor", -eff.power) - end, - deactivate = function(self, eff) - self:removeTemporaryValue("combat_armor", eff.tmpid) + self:effectTemporaryValue(eff, "combat_armor", -eff.power) + self:effectTemporaryValue(eff, "combat_physresist", -eff.power) + self:effectTemporaryValue(eff, "combat_spellresist", -eff.power) + self:effectTemporaryValue(eff, "combat_mentalresist", -eff.power) end, }