BrogueCE
BrogueCE copied to clipboard
Some messages appear out-of-order
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.
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.
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.
Perhaps related: in this screenshot, stealth range is hidden, but the most recent (and most prominent) message says otherwise:
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.
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.
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