diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index d82da5f86e6434236fb3f37b5efceacd7cb6ab66..88e9828c6e77aebaccc86c48730c364f773b4f80 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -3543,6 +3543,7 @@ end -- @param ab the talent (not the id, the table) -- @return true to continue, false to stop function _M:preUseTalent(ab, silent, fake) + if not self:attr("no_talent_fail") then if self:attr("feared") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then if not silent then game.logSeen(self, "%s is too afraid to use %s.", self.name:capitalize(), ab.name) end return false @@ -3743,6 +3744,7 @@ function _M:preUseTalent(ab, silent, fake) if ab.is_heal and (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) then return false end if ab.is_teleport and self:attr("encased_in_ice") then return false end + end if not silent then -- Allow for silent talents if ab.message ~= nil then @@ -4025,11 +4027,13 @@ end --- Force a talent to activate without using energy or such function _M:forceUseTalent(t, def) + if def.no_talent_fail then self:attr("no_talent_fail", 1) end if def.no_equilibrium_fail then self:attr("no_equilibrium_fail", 1) end if def.no_paradox_fail then self:attr("no_paradox_fail", 1) end if def.talent_reuse then self:attr("talent_reuse", 1) end if def.save_cleanup then self:attr("save_cleanup", 1) end local ret = {engine.interface.ActorTalents.forceUseTalent(self, t, def)} + if def.no_talent_fail then self:attr("no_talent_fail", -1) end if def.no_equilibrium_fail then self:attr("no_equilibrium_fail", -1) end if def.no_paradox_fail then self:attr("no_paradox_fail", -1) end if def.talent_reuse then self:attr("talent_reuse", -1) end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 4b046bf574c2951b96d4ef18c71d5683edc92e69..293a3cc40573bd3bf9aa2810870a5001d761dd0f 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -1572,7 +1572,8 @@ function _M:spellCrit(dam, add_chance, crit_power_add) local chance = self:combatSpellCrit() + (add_chance or 0) local crit = false - if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) and not target:canSee(self) then -- bug fix +-- if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) and not target:canSee(self) then -- bug fix + if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) then -- bug fix chance = 100 crit_power_add = crit_power_add + self:callTalent(self.T_SHADOWSTRIKE,"getMultiplier") end @@ -1619,7 +1620,8 @@ function _M:mindCrit(dam, add_chance, crit_power_add) local chance = self:combatMindCrit() + (add_chance or 0) local crit = false - if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) and not target:canSee(self) then -- bug fix +-- if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) and not target:canSee(self) then -- bug fix + if self:attr("stealth") and self:knowTalent(self.T_SHADOWSTRIKE) then -- bug fix chance = 100 crit_power_add = crit_power_add + self:callTalent(self.T_SHADOWSTRIKE,"getMultiplier") end diff --git a/game/modules/tome/data/talents/psionic/distortion.lua b/game/modules/tome/data/talents/psionic/distortion.lua index fb4c425aed9a869a95ce8fdcbb4ac4f8d0bb4873..9e3b3cdd30cb51ec0a17aa1537585f64e0885dd5 100644 --- a/game/modules/tome/data/talents/psionic/distortion.lua +++ b/game/modules/tome/data/talents/psionic/distortion.lua @@ -68,7 +68,7 @@ newTalent{ local distort = DistortionCount(self) return ([[Fire a bolt of distortion that ignores resistance and inflicts %0.2f physical damage. This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. If the bolt comes in contact with a target that's already distorted, a detonation will occur, inflicting 150%% of the base damage in a radius of %d. - Each talent point invested in Distortion Bolt will increase physical redistance reduction from distortion effects by 1%%. + Investing in this talent will increase the physical resistance reduction from all of your distortion effects. At talent level 5, you learn to shape your distortion effects, preventing them from hitting you or your allies. The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), distort, radius) end, @@ -117,7 +117,7 @@ newTalent{ local distort = DistortionCount(self) return ([[Creates a distortion wave in a radius %d cone that deals %0.2f physical damage and knocks back targets in the blast radius. This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. - Each talent point invested in Distortion Wave will increase physical redistance reduction from distortion effects by 1%%. + Investing in this talent will increase the physical resistance reduction from all of your distortion effects. If the target is already distorted, they'll be stunned for %d turns as well. The damage will scale with your Mindpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), distort, power) end, @@ -164,7 +164,7 @@ newTalent{ return ([[Ravages the target with distortion, inflicting %0.2f physical damage each turn for %d turns. This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. If the target is already distorted when Ravage is applied, the damage will be increased by 50%% and the target will lose one beneficial physical effect or sustain each turn. - Each talent point invested in Ravage will increase physical redistance reduction from distortion effects by 1%%. + Investing in this talent will increase the physical resistance reduction from all of your distortion effects. The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), duration, distort) end, } @@ -205,6 +205,7 @@ newTalent{ canAct = false, dam = self:mindCrit(t.getDamage(self, t)), radius = self:getTalentRadius(t), + distortionPower = DistortionCount(self), act = function(self) local tgts = {} local Map = require "engine.Map" @@ -228,7 +229,7 @@ newTalent{ game.logSeen(target.actor, "%s is pulled in by the %s!", target.actor.name:capitalize(), self.name) end DamageType:get(DamageType.PHYSICAL).projector(self.summoner, target.actor.x, target.actor.y, DamageType.PHYSICAL, self.dam) - target.actor:setEffect(target.actor.EFF_DISTORTION, 2, {power=DistortionCount(self)}) + target.actor:setEffect(target.actor.EFF_DISTORTION, 2, {power=self.distortionPower}) end self:useEnergy() @@ -261,7 +262,7 @@ newTalent{ local distort = DistortionCount(self) return ([[Create a powerful maelstorm for %d turns. Each turn, the maelstrom will pull in targets within a radius of %d, and inflict %0.2f physical damage. This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. - Each talent point invested in Maelstrom will increase physical resistance reduction from distortion effects by 1%%. + Investing in this talent will increase the physical resistance reduction from all of your distortion effects. The damage will scale with your Mindpower.]]):format(duration, radius, damDesc(self, DamageType.PHYSICAL, damage), distort) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 8553156f2fcebe49ca11adda765d0500f56d2743..bcda495d84a85ad94f96d74a976d8bd0c0f57956 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -185,9 +185,9 @@ function necroSetupSummon(self, m, x, y, level, no_control, no_decay) m.on_act = function(self) local src = self.summoner local p = src:isTalentActive(src.T_NECROTIC_AURA) - if p and self.x and self.y and not src.dead and src.x and src.y and core.fov.distance(self.x, self.y, src.x, src.y) <= self.summoner.necrotic_aura_radius then return end + if p and self.x and self.y and not src.dead and src.x and src.y and core.fov.distance(self.x, self.y, src.x, src.y) <= src.necrotic_aura_radius then return end - self.life = self.life - self.max_life * (p and p.necrotic_aura_decay or 10) / 100 + self.life = self.life - self.max_life * (src.necrotic_aura_decay or 10) / 100 self.changed = true if self.life <= 0 then game.logSeen(self, "#{bold}#%s decays into a pile of ash!#{normal}#", self.name:capitalize()) diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index f7c9b19c53ad04623092684c699cbe11dd126403..1066fd69f28f430021b5290268340099d7181881 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -440,12 +440,12 @@ function _M:drawDialog(kind, actor_to_compare) local any_esp = false local esps_compare = {} - if actor_to_compare and actor_to_compare.esp_all then + if actor_to_compare and actor_to_compare.esp_all and actor_to_compare.esp_all ~= 0 then esps_compare["All"] = {} esps_compare["All"][1] = v any_esp = true end - if player.esp_all then + if player.esp_all and player.esp_all ~= 0 then esps_compare["All"] = esps_compare["All"] or {} esps_compare["All"][2] = v any_esp = true @@ -520,12 +520,14 @@ function _M:drawDialog(kind, actor_to_compare) if any_esp then h = h + self.font_h self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("Telepathy of: "), w, h, 255, 255, 255, true)) h = h + self.font_h - if not esps_compare["All"] then +-- if not esps_compare["All"] then + if not esps_compare["All"] or not esps_compare["All"][2] or esps_compare["All"][2] == 0 then for type, v in pairs(esps_compare) do self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("%s%s "):format(v[2] and (v[1] and "#GOLD#" or "#00ff00#") or "#ff0000#", type:capitalize()), w, h, 255, 255, 255, true)) h = h + self.font_h end else - self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][1] and "#GOLD#" or "#00ff00#"), w, h, 255, 255, 255, true)) h = h + self.font_h +-- self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][1] and "#GOLD#" or "#00ff00#"), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][2] and (esps_compare["All"][1] and "#GOLD#" or "#00ff00#") or "#ff0000#"), w, h, 255, 255, 255, true)) h = h + self.font_h end end diff --git a/game/modules/tome/dialogs/LevelupDialog.lua b/game/modules/tome/dialogs/LevelupDialog.lua index 26f6a65dd5737bd6634c5acd7f0d451a7633e843..ee10dd00a562a624b9cde51def66ff82de9164db 100644 --- a/game/modules/tome/dialogs/LevelupDialog.lua +++ b/game/modules/tome/dialogs/LevelupDialog.lua @@ -172,8 +172,8 @@ function _M:finish() game.logPlayer(self.actor, txt:format(talents)) end for i, tid in ipairs(reset) do - self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true}) - if self.actor:knowTalent(tid) then self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true, talent_reuse=true}) end + self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_talent_fail=true}) + if self.actor:knowTalent(tid) then self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_talent_fail=true, talent_reuse=true}) end end -- Prodigies