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 xp interaction with almost leveled unit #29

Closed ProditorMagnus closed 3 years ago

ProditorMagnus commented 3 years ago

Aim of this task is to ensure https://forums.wesnoth.org/viewtopic.php?f=4&t=54731 does not happen with 1.15.15.

ProditorMagnus commented 3 years ago

Confirmed that xp is not working properly - advancement animation and dialog is displayed multiple times. However, did not replicate actual advancement happening multiple times - such as multiple hp increases.

inferno8 commented 3 years ago

The fix introduced in 0d37579c6b7e439f122f32793f46733d01720f4f breaks "triple strike" completely - the harmed units hp resets to what it was before the fight. I suspect it has something to do with the new EoMa_remove_array_duplicates function. See this post and the attached replay: https://forums.wesnoth.org/viewtopic.php?p=667254#p667254

ProditorMagnus commented 3 years ago

Dont see it being related, but since I was lazy and did testing with :unit invulnerable=yes will have to check it out.

ProditorMagnus commented 3 years ago

Should be caused by https://github.com/inferno8/wesnoth-Era_of_Magic/blob/0d37579c6b7e439f122f32793f46733d01720f4f/utils/allaround.cfg#L36-L39

ProditorMagnus commented 3 years ago

Is it intentional that triple strike does not give kill xp? Unit is stored into expfreeze after harm_unit, so it might be already dead.

ProditorMagnus commented 3 years ago

Not related to this task, so not autoclosing with commit, but just linking commit.