BrogueCE icon indicating copy to clipboard operation
BrogueCE copied to clipboard

Some messages appear out-of-order

Open tmewett opened this issue 3 years ago • 4 comments

https://cdn.discordapp.com/attachments/647802299783184384/866146554141474856/unknown.png

Messages show 1) corpse explosion followed by 2) ally death then 3) explosive monster death, when it should be 3-1-2.

tmewett avatar Jul 18 '21 17:07 tmewett

This seems like it's absolutely ubiquitous with monster death messages, that the message for the effect of the monster death shows up before the message for the monster death. So you get "The bloat bursts, leaving behind an expanding cloud of caustic gas! The dart killed the bloat."

The difference here is that the monster death effect kills another monster (ally), so you get two messages for the death effect before you get the monster death message itself. And it seems especially weird since the ally death message winds up before the death of the monster it killed. (I wonder what would happen if an explosive monster kills another explosive monster....)

I think it'd be great to fix this, but I figure it's pretty hard to do or the bloat message would have been fixed a while ago.

MattWeiner avatar Aug 20 '21 22:08 MattWeiner

I think this is just a recent outstanding bug from #278 , due to the way combat messages fold? The messages themselves fire in the correct order.

tmewett avatar Aug 22 '21 14:08 tmewett

Perhaps related: in this screenshot, stealth range is hidden, but the most recent (and most prominent) message says otherwise:

Screenshot (2)

It would be less confusing if only consecutive messages were merged, i.e last message can fold into the previous one but not into earlier ones.

ghost avatar Dec 01 '21 06:12 ghost

There's at least two separate issues here: the issue where messages can be merged with non-consecutive duplicate messages, and the issue with message ordering when a monster dies. The latter happens because inflictDamage processes the monster's death, including things like bloats bursting and printing the associated message, before returning a boolean for whether the monster died, which the calling function then uses to print messages like "the dart killed the bloat". The easiest way to fix that is likely to split inflictDamage into two parts, so that the code that calls it can print messages before processing the monster's death. I'm working on a PR for that.

nstoddard avatar Aug 03 '22 01:08 nstoddard

I'm going to close this as the main reported problem is fixed, we can open another one for merging if that's still a big problem

tmewett avatar Nov 05 '23 18:11 tmewett