Skip to content
Snippets Groups Projects
Commit b765b38a authored by Otowa Kotori's avatar Otowa Kotori
Browse files

weapon_recurse bugfix

This is the cause of an interaction between Flexible Combat and weapon attack_recurse that may cause infinite recursive attack
parent ead3c516
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -660,7 +660,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
self:attr("silent_heal", -1)
end
if self.__attacktargetwith_recursing or (weapon and weapon.attack_recurse) then
if weapon and weapon.attack_recurse then
if self.__attacktargetwith_recursing then
self.__attacktargetwith_recursing = self.__attacktargetwith_recursing - 1
else
......@@ -698,6 +698,7 @@ function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult,
end
if self:attr("unharmed_attack_on_hit") then
game.log("unharmed_attack_on_hit")
local v = self:attr("unharmed_attack_on_hit")
self:attr("unharmed_attack_on_hit", -v)
if rng.percent(50) then self:attackTarget(target, nil, 1, true, true) end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment