inferno8 / wesnoth-Era_of_Magic

add-on for Battle for Wesnoth
GNU General Public License v2.0
10 stars 4 forks source link

Triple strike lua error on 1.17.22 #65

Closed inferno8 closed 10 months ago

inferno8 commented 10 months ago

When killing third party with triple strike, the following lua error appears on 1.17.22 (-d --log-debug=wml): 2023-11-04 130916

Context: Raging Hydra attacked one of two Bronze Warriors. The primary target's HP was initially full, while the other unit had only 1HP (debug). When the bystander was successfully killed, the lua error appeared. This also happens during defense and in TLU.

The error does not appear on 1.16.x.

On the other hand, the similar "All around" weapon special works fine.

I am not a lua expert but it looks like [harm_unit] tries to access a non-existing unit in an array at the given index. @ProditorMagnus Any ideas on how to fix this?

ProditorMagnus commented 10 months ago

In general to investigate such issues I add breakpoints between wml actions in order to find which specific tag triggers it. Downloading 1.17.22.

ProditorMagnus commented 10 months ago

modificationUnitTest confirms the issue, that makes it easier.

ProditorMagnus commented 10 months ago

No need to change anything here, will be solved by https://github.com/wesnoth/wesnoth/issues/8019

inferno8 commented 10 months ago

Ok, thanks!