Skip to content

Commit

Permalink
Fix #841
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugy committed Dec 19, 2024
1 parent 3752ee0 commit 7f057e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/inventory/retaliation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ local function onshow(dialog, unit)
for _, disable_record in ipairs(wml.array_access.get("disabled_defences", unit)) do
-- Note when comparing: "index" is Lua array index (starts with 1),
-- while order is C++ array index (starts with 0).
if disable_record.order + 1 == index then
-- Moreover, status.lua uses only the name, don't check if disable_record.order + 1 == index
if attack.name == disable_record.name then
attack_only = false
break
end
Expand Down

0 comments on commit 7f057e1

Please sign in to comment.