Enforce parent-child age gap in adoption events #3080
Merged
+2
−0
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.
About The Pull Request
Added limitation according to suggestions in the issue, m_c has to be older than 14 + the oldest kitten age for adoption events so that they are at least 14 years older than any kitten created by the event. Adds age check to filter_possible_events.
Why This Is Good For ClanGen
This keeps the adoption event outcomes consistent with the limits imposed on the player. Otherwise, if the parent is unset accidentally the player isn't able to fix it in game.
Linked Issues
#2152
Proof of Testing
Before:
Adoption events available for 12 moon old cat:
After:
Adoption events are no longer present in final_events for same 12 moon old cat:
(The events do still work for cats 14 years older than the kittens)
Changelog/Credits