diff --git a/game/modules/tome/data/talents/gifts/earthen-power.lua b/game/modules/tome/data/talents/gifts/earthen-power.lua index b5d696e434cac6455b4dce52dfc8e4333cbfb2f3..2d3b76976d1f78fb3df83a726674d7636e4996e6 100644 --- a/game/modules/tome/data/talents/gifts/earthen-power.lua +++ b/game/modules/tome/data/talents/gifts/earthen-power.lua @@ -118,7 +118,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Creates a shield of impenetrable stone around you for 7 turns, absorbing up to %d damage. Your equilibrium will increase by twice the damage absorbed. - When the effect ends, all equilibrium above minimum will be converted to mana in a storm of arcane energy. + When the effect ends, all equilibrium above minimum will be converted to mana in a storm of arcane energy and the cooldown of your Block is reset. The storm inflicts Arcane damage equal to the converted equilibrium (maximum %d) against everyone around you in a radius %d. Also while resting you will passively regenerate %0.2f mana each turn. The shield strength will increase with Willpower]]):format(power, t.maxDamage(self, t), radius, t.manaRegen(self, t)) diff --git a/game/modules/tome/data/talents/spells/eldritch-shield.lua b/game/modules/tome/data/talents/spells/eldritch-shield.lua index 7deef16bdae78ba374f89b8f536f429753fabda7..e4029f1fdd4e7a6c38e7643cc4a406c85d4180c8 100644 --- a/game/modules/tome/data/talents/spells/eldritch-shield.lua +++ b/game/modules/tome/data/talents/spells/eldritch-shield.lua @@ -49,13 +49,14 @@ newTalent{ else game.logSeen(target, "%s resists the stun!", target.name:capitalize()) end + self:forceUseTalent(self.T_BLOCK, {ignore_cooldown=true, ignore_energy=true}) end return true end, info = function(self, t) return ([[Channel eldritch forces into a melee attack, hitting the target with your weapon and shield for %d%% arcane damage. - If either attack hits, the target will be stunned for %d turns. + If either attack hits, the target will be stunned for %d turns and you automatically Block. The chance for the attack to stun increases with your Physical Power, but it is considered a magical attack and thus is resisted with spell save, rather than physical save. Damage increases with Spellpower.]]) :format(100 * self:combatTalentWeaponDamage(t, 0.6, (100 + self:combatTalentSpellDamage(t, 50, 300)) / 100), t.getDuration(self, t)) @@ -73,27 +74,31 @@ newTalent{ cooldown = 30, tactical = { ATTACK = 3, BUFF = 2 }, getDamage = function(self, t) return self:combatTalentSpellDamage(t, 15, 40) end, + getBlockCD = function(self, t) return math.floor(self:combatTalentLimit(t, 5, 0, 2)) end, on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a shield to use this talent.") end return false end return true end, activate = function(self, t) local dam = t.getDamage(self, t) - return { - proj = self:addTemporaryValue("melee_project", {[DamageType.ARCANE]=dam}), - onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.ARCANE]=dam * 0.7}), - } + local block_cd = t.getBlockCD(self, t) + + local ret = {} + self:talentTemporaryValue(ret, "allow_incomplete_blocks", 1) + self:talentTemporaryValue(ret, "talent_cd_reduction", {[self.T_BLOCK]=block_cd}) + self:talentTemporaryValue(ret, "melee_project", {[DamageType.ARCANE]=dam}) + self:talentTemporaryValue(ret, "on_melee_hit", {[DamageType.ARCANE]=dam * 0.7}) + return ret end, deactivate = function(self, t, p) - self:removeTemporaryValue("melee_project", p.proj) - self:removeTemporaryValue("on_melee_hit", p.onhit) return true end, info = function(self, t) local dam = t.getDamage(self, t) return ([[Imbues your shields with arcane power, dealing %0.2f arcane damage with each melee strike and %0.2f arcane damage when hit. + Allows counterstrikes after incomplete blocks and the cooldown of Block is reduced by %d turns. The damage will increase with Spellpower.]]): - format(damDesc(self, DamageType.ARCANE, dam), damDesc(self, DamageType.ARCANE, dam * 0.7)) + format(damDesc(self, DamageType.ARCANE, dam), damDesc(self, DamageType.ARCANE, dam * 0.7), t.getBlockCD(self, t)) end, } @@ -128,13 +133,14 @@ newTalent{ else game.logSeen(target, "%s resists the dazing blows!", target.name:capitalize()) end + self:alterTalentCoolingdown(self.T_BLOCK, -1000) end return true end, info = function(self, t) return ([[Channel eldritch forces into a ferocious melee attack, hitting the target three times with your shields doing %d%% Nature damage. - If any of the attacks hit, the target will be dazed for %d turns. + If any of the attacks hit, the target will be dazed for %d turns and your Block cooldown is reset. The chance for the attack to daze increases with you Physical Power, but it is considered a magical attack and thus is resisted with spell save, rather than physical save.]]) :format(100 * self:combatTalentWeaponDamage(t, 0.6, 1.6), t.getDuration(self, t)) end, @@ -158,8 +164,16 @@ newTalent{ self:project(tg, self.x, self.y, function(px, py) local target = game.level.map(px, py, Map.ACTOR) if not target or target == self then return end - self:attackTarget(target, DamageType.ARCANE, self:combatTalentWeaponDamage(t, 1.3, 2.6), true) + local hit = self:attackTarget(target, DamageType.ARCANE, self:combatTalentWeaponDamage(t, 1.3, 2.6), true) + if hit then + target:setEffect(target.EFF_COUNTERSTRIKE, 2, {power=self:callTalent(self.T_BLOCK, "getBlockValue"), no_ct_effect=true, src=self, crit_inc=0, nb=1}) + end end) + + if self:getTalentLevel(t) >= 5 then + self:alterTalentCoolingdown(self.T_BLOCK, -1000) + end + game.level.map:particleEmitter(self.x, self.y, tg.radius, "shieldstorm", {radius=tg.radius}) game:playSoundNear(self, "talents/icestorm") @@ -167,7 +181,9 @@ newTalent{ end, info = function(self, t) return ([[Slam your shield on the ground creating a shockwave. - You perform a melee attack for %d%% Arcane damage against everyone within radius %d.]]) + You perform a melee attack for %d%% arcane damage against everyone within radius %d. + Any creature hit by the attack will be submitted to a Counterstrike effect for 3 turns, as if you had blocked against them. + At level 5 your Block cooldown is reset.]]) :format(100 * self:combatTalentWeaponDamage(t, 1.3, 2.6), self:getTalentRadius(t)) end, } diff --git a/game/modules/tome/data/talents/techniques/weaponshield.lua b/game/modules/tome/data/talents/techniques/weaponshield.lua index 51794c92b4842cac976d789da90452fe0b24cf33..810e7cf765febed44a56bc362d3d593217d15fad 100644 --- a/game/modules/tome/data/talents/techniques/weaponshield.lua +++ b/game/modules/tome/data/talents/techniques/weaponshield.lua @@ -82,6 +82,9 @@ newTalent{ getCritInc = function(self, t) return self:combatTalentIntervalDamage(t, "dex", 10, 50) end, + passives = function(self, t, p) + self:talentTemporaryValue(p, "allow_incomplete_blocks", 1) + end, info = function(self, t) local inc = t.getDurInc(self, t) return ([[Improves your ability to perform counterstrikes after blocks in the following ways: diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index 1d15aac5a351584d7c7400d5ddb10ff846833f48..df5383c57d33adc1c4b80d51862b039de927a313 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -4177,6 +4177,7 @@ newEffect{ local equi = self:getEquilibrium() - self:getMinEquilibrium() if equi > 0 then + self:alterTalentCoolingdown(self.T_BLOCK, -1000) self:incMana(equi) self:incEquilibrium(-equi) self:project({type="ball", radius=eff.radius, friendlyfire=false}, self.x, self.y, DamageType.ARCANE, math.min(equi, eff.maxdam)) diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index c0c2f1c6a561ca13c646025a46f2b605bd0fcf02..af6295ba76bcf66535b907db87a12511de16847f 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -2344,7 +2344,7 @@ newEffect{ end if eff.properties.ref and src.life then DamageType.defaultProjector(src, src.x, src.y, type, blocked, tmp, true) end local full = false - if (self:knowTalent(self.T_RIPOSTE) or amt == 0) and not eff.did_counterstrike and src.life then + if (self:attr("allow_incomplete_blocks") or amt == 0) and not eff.did_counterstrike and src.life then full = true if not self:knowTalent(self.T_ETERNAL_GUARD) then eff.did_counterstrike = true end src:setEffect(src.EFF_COUNTERSTRIKE, 2, {power=eff.power, no_ct_effect=true, src=self, crit_inc=crit_inc, nb=nb})