Handle mon_null
in monster upgrade groups
#61672
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
Describe the solution
When a monster upgrade selects a group entry of
mon_null
, spawn nothing (as-in, the original monster disappears).This behaviour can be adjusted slightly with
"despawn_when_null"
:If true, the monster disappears without a trace, otherwise the monster "dies" naturally leaving behind whatever it would if it was killed. (defaults to false)
Describe alternatives you've considered
Originally I interpreted getting
mon_null
as leaving the monster as-is.Testing
Added a few assertions to the
mongroup_multi_spawn_restrictions
test:Also tested in-game using Venera3's branch: https://github.com/Venera3/Cataclysm-DDA/tree/meat_cocoon
Additional context