Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle mon_null in monster upgrade groups #61672

Merged

Conversation

dseguin
Copy link
Member

@dseguin dseguin commented Oct 13, 2022

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":

"upgrades": {
  "half_life": 1,
  "into_group": "mongroup_with_mon_null",
  "despawn_when_null": true
}

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:

./tests/cata_test --rng-seed time mongroup_multi_spawn_restrictions

Also tested in-game using Venera3's branch: https://github.com/Venera3/Cataclysm-DDA/tree/meat_cocoon

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON [Markdown] Markdown issues and PRs Code: Tests Measurement, self-control, statistics, balancing. <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 13, 2022
@dseguin dseguin force-pushed the mongroup_upgrade_russian_roulette branch from 8ecbf96 to 6232ad6 Compare October 14, 2022 00:26
@dseguin dseguin force-pushed the mongroup_upgrade_russian_roulette branch from 6232ad6 to 7d46750 Compare October 14, 2022 06:20
@dseguin dseguin marked this pull request as ready for review October 14, 2022 06:21
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Oct 14, 2022
@Fris0uman Fris0uman merged commit 75e21e1 into CleverRaven:master Oct 14, 2022
@dseguin dseguin deleted the mongroup_upgrade_russian_roulette branch October 15, 2022 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mon_null from nested mongroups spawns invisible "human" enemies
2 participants