Dugy / Legend_of_the_Invincibles

An add-on campaign for the Battle for Wesnoth game
GNU General Public License v3.0
39 stars 22 forks source link

Firecast blocks murderlust and evisceration from working #710

Closed arobinson closed 5 months ago

arobinson commented 6 months ago

When a unit with firecast kills a unit via a melee attack, murderlust and evisceration do not proc

Reproducible in this save game with Eloic (the prophet unit)

LotI2-Jungle Hell-Auto-Save33.gz

Dugy commented 6 months ago

I am told that the save file is invalid. Is it incompatible with 1.16 or something?

arobinson commented 6 months ago

I'm using it on 1.16.11 on a mac without issues Maybe this one works better? LotI2-Tunnels of Cruelty.gz

Dugy commented 5 months ago

I was observing a different behaviour. Killing the enemy with a triggered spell caused murderlust not to trigger. Delivering a killing blow with a melee weapon caused firecast to trigger a spell on the enemy that should have been dead at that point, so that he was again killed by the spell and murderlust didn't trigger. This isn't correct behaviour, but it's not what you've been describing.

Did I reproduce your problem?

arobinson commented 5 months ago

Yes, the triggering of the spell, blocked the other trigger spells (murderlust & evisceration). But using a normal ranged attack did trigger murdurlust & evisceration as firecast was not in use

Dugy commented 5 months ago

Okay, I have found the problem. The lua code used to damage the unit didn't assign any unit as the killer in case the target died.

This fix will have side effects, as it will make AoE attacks trigger on kill abilities. Explosive and whirlwind may become too good with murderlust.