From c6272a53f964ae0606417cbee3c0b54dd9d9b213 Mon Sep 17 00:00:00 2001 From: Recaiden <mlwatts45@gmail.com> Date: Wed, 17 Jul 2019 20:23:14 -0500 Subject: [PATCH] Allowed `nowarning=true skills to be autoaccepted and fixed Rush's targeting. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rush doesn’t need nowarning as it’s impossible to rush yourself because you don’t meet the minimum distance. Rush doesn’t need nolock as it's no longer free-targeted but can only target creatures. If the automatically calculated target *is* the player, the ability is almost certain to be a heal, buff, or other thing that makes sense to apply to an ally, and the autotargeting should proceed. If the automatically calculated target *is not* the player, no self-target warning would trigger anyway, and the autotargeting should proceed. --- game/engines/default/engine/interface/GameTargeting.lua | 2 +- game/modules/tome/data/talents/techniques/combat-techniques.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/engines/default/engine/interface/GameTargeting.lua b/game/engines/default/engine/interface/GameTargeting.lua index c68e055512..2b136e3e65 100644 --- a/game/engines/default/engine/interface/GameTargeting.lua +++ b/game/engines/default/engine/interface/GameTargeting.lua @@ -308,7 +308,7 @@ function _M:targetGetForPlayer(typ) msg = typ.msg end self:targetMode("exclusive", msg, coroutine.running(), typ) - if self.target.target.x and config.settings.auto_accept_target and not typ.immediate_keys and not typ.nolock and not typ.nowarning and not typ.no_restrict then + if self.target.target.x and config.settings.auto_accept_target and not typ.immediate_keys and not typ.nolock and not typ.no_restrict then self.target_co = nil self:targetMode(false, false) self.tooltip_x, self.tooltip_y = nil, nil return self.target.target.x, self.target.target.y, self.target.target.entity diff --git a/game/modules/tome/data/talents/techniques/combat-techniques.lua b/game/modules/tome/data/talents/techniques/combat-techniques.lua index eb6f7ab805..95681a6ced 100644 --- a/game/modules/tome/data/talents/techniques/combat-techniques.lua +++ b/game/modules/tome/data/talents/techniques/combat-techniques.lua @@ -32,7 +32,7 @@ newTalent{ tactical = { ATTACK = { weapon = 1, stun = 1 }, CLOSEIN = 3 }, requires_target = true, is_melee = true, - target = function(self, t) return {type="bolt", range=self:getTalentRange(t), nolock=true, nowarning=true, requires_knowledge=false, stop__block=true} end, + target = function(self, t) return {type="bolt", range=self:getTalentRange(t), requires_knowledge=false, stop__block=true} end, range = function(self, t) return math.floor(self:combatTalentScale(t, 6, 10)) end, on_pre_use = function(self, t) if self:attr("never_move") then return false end -- GitLab