(not a bug) Retaliation from beyond the grave?

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
kaypy
Craftsman
Posts: 113
Joined: 19-Jan-14 06:11

(not a bug) Retaliation from beyond the grave?

Post by kaypy » 27-Sep-16 16:04

It's hard to be 100% certain, but it sure seems that certain creatures are sometimes getting a retaliatory strike in response to the blow that kills them...

I think rats are the main culprits here, but that could just be that they have a more obvious attack sound...

User avatar
Sophia
Concise and Honest
Posts: 3909
Joined: 12-Sep-02 19:50
Location: Nowhere in particular
Contact:

Re: Retaliation from beyond the grave?

Post by Sophia » 27-Sep-16 18:47

There is a check on monster_retaliate (which governs a counterattack after being struck) that prevents the function from being called if the monster would end up with 0 hp after the attack, so I don't think it's actually happening that way.

I think what's happening is that the monster gets to attack, which is resolved instantly, the party member kills them on the next frame, but their attack sound takes some finite amount of time so it's still playing when the monster is dead.

kaypy
Craftsman
Posts: 113
Joined: 19-Jan-14 06:11

Re: Retaliation from beyond the grave?

Post by kaypy » 28-Sep-16 15:25

That makes sense

Post Reply