Fix some monster attack messaging weirdness #52606
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
Monster special attacks have fancy dynamic messages capable of describing the exact bodypart hit, but they use the same string for hitting monsters as for NPCs, leading to some weirdness like
The wasp stings the spideer in the left arm
. Also, bleeding on monsters referred to bodyparts internally leading to A) some interface wonkyness (flaming eyes bleeding from their left arm and right leg, for example) and slightly messing with the bleed chances.Describe the solution
_msg_npc
entry in vanilla special attacks and the default value- AdjustedThis turned out to make clang-tidy very disappointed in me. I'll see if I can do this properly, but the message part is good to go.monster::make_bleed
to add the bleeding effect without targeting a bodypartDescribe alternatives you've considered
Add a third variant string to special attacks to handle hitting monsters, but that felt slightly too bloaty.
Testing
Messages show up as expected,
every monster gets a single bleed effect that gets displayed without bodypart suffixes.Additional context
This is a slight buff to bleed damage (the effect checksx_in_y(intensity, max_intensity)
to see if it does damage on any given round), but the balance impact should be minimal as bleeds do a single point of damage a turn anyway. Should it become a problem it's trivial to tweakbleed_rate
to compensate.