diff --git a/game/engines/default/engine/interface/ActorTalents.lua b/game/engines/default/engine/interface/ActorTalents.lua index 6d029b0d34a693814372f7dc05bc7e39745d45aa..8655414e6b4c94a8c47a7cc499713123014b612a 100644 --- a/game/engines/default/engine/interface/ActorTalents.lua +++ b/game/engines/default/engine/interface/ActorTalents.lua @@ -138,15 +138,15 @@ function _M:useTalent(id, who, force_level, ignore_cd, force_target, silent, no_ end if not self:preUseTalent(ab, silent) then return end local old_level - local old_target + local old_target, old_target_set = nil, false if force_level then old_level = who.talents[id]; who.talents[id] = force_level end - if ab.onAIGetTarget and not self.player then old_target = rawget(who, "getTarget"); who.getTarget = function() return ab.onAIGetTarget(self, ab) end end - if force_target and not old_target then old_target = rawget(who, "getTarget"); who.getTarget = function(a) return force_target.x, force_target.y, not force_target.__no_self and force_target end end + if ab.onAIGetTarget and not who.player then old_target_set = true; old_target = rawget(who, "getTarget"); who.getTarget = function() return ab.onAIGetTarget(self, ab) end end + if force_target and not old_target then old_target_set = true; old_target = rawget(who, "getTarget"); who.getTarget = function(a) return force_target.x, force_target.y, not force_target.__no_self and force_target end end self.__talent_running = ab local ok, ret, special = xpcall(function() return ab.action(who, ab) end, debug.traceback) self.__talent_running = nil - if old_target then who.getTarget = old_target end + if old_target_set then who.getTarget = old_target end if force_level then who.talents[id] = old_level end if not ok then error(ret) end diff --git a/game/modules/tome/data/general/objects/whips.lua b/game/modules/tome/data/general/objects/whips.lua index 09c2a11199494bee7dc87e6e88aa3bdcda0df660..3004bd4a295a1844ccc3de68b9712e669b8450f4 100644 --- a/game/modules/tome/data/general/objects/whips.lua +++ b/game/modules/tome/data/general/objects/whips.lua @@ -27,7 +27,7 @@ newEntity{ encumber = 3, rarity = 5, metallic = true, - combat = { talented = "whip", accuracy_effect = "whip", damrange = 1.1, physspeed = 0.8, sound = "actions/whip_hit", sound_miss = "actions/whip_miss",}, + combat = { talented = "whip", accuracy_effect = "sword", damrange = 1.1, physspeed = 0.8, sound = "actions/whip_hit", sound_miss = "actions/whip_miss",}, desc = [[Sharp, long and deadly.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, diff --git a/game/modules/tome/data/talents/gifts/ooze.lua b/game/modules/tome/data/talents/gifts/ooze.lua index ff813739a7d97238ec4ab8b5eb5eb3f02e6600d6..aeb948a8467bca786920176ba2a45b9be5562b60 100644 --- a/game/modules/tome/data/talents/gifts/ooze.lua +++ b/game/modules/tome/data/talents/gifts/ooze.lua @@ -117,7 +117,7 @@ newTalent{ getDam = function(self, t) return self:combatTalentMindDamage(t, 15, 200) end, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 4, 8)) end, on_pre_use = function(self, t) - if not game.level then return false end + if not game.level or not self.x or not self.y then return false end for _, coor in pairs(util.adjacentCoords(self.x, self.y)) do local act = game.level.map(coor[1], coor[2], Map.ACTOR) if act and act.summoner == self and act.bloated_ooze then diff --git a/game/modules/tome/data/talents/techniques/pugilism.lua b/game/modules/tome/data/talents/techniques/pugilism.lua index 177cedc442354fd7a0a0b252a1d7f0646d2faa7f..dc9dcdea0c0435e4e7a697496311f3b688be25b4 100644 --- a/game/modules/tome/data/talents/techniques/pugilism.lua +++ b/game/modules/tome/data/talents/techniques/pugilism.lua @@ -167,7 +167,7 @@ newTalent{ requires_target = true, getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.0, 1.7) + getStrikingStyle(self, dam) end, action = function(self, t) - local tg = {type="hit", range=self:getTalentRange(t)} + local tg = {type="bolt", 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) > self:getTalentRange(t) then return nil end