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

Disease infrastructure #35843

Merged
merged 16 commits into from
Apr 4, 2020
Merged

Disease infrastructure #35843

merged 16 commits into from
Apr 4, 2020

Conversation

Fris0uman
Copy link
Contributor

@Fris0uman Fris0uman commented Dec 3, 2019

Summary

SUMMARY: Infrastructure "Add basic infrastructure for diseases"

Purpose of change

Add basic infrastructure to define diseases
Add a system for foodborne disease, improved from #35829

Describe the solution

  • Implement new class disease_type
  • Add expose_to_disease() function to Character
  • Add foodborne disease support
  • Documentation
  • some json content

Describe alternatives you've considered

Testing

Drink gallon jug of raw milk
Get sick after drinking 2/3 of it

Put health to 100
Drink gallon jug
No sickness

Mispell bad_food in raw_milk definition
Get error on load

Additional context

This is a very basic implementation, it only affect food contamination and is only used by raw milk currently

It could be expended to other disease and health could affect the probability to get and sick and the intensity of the effects instead of being an on/off threshold.

@Davi-DeGanne
Copy link
Contributor

Thank you for doing this! I look forward to using it to rework water-borne pathogens.

@ZhilkinSerg ZhilkinSerg added 0.E Feature Freeze [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mechanics: Character / Player Character / Player mechanics Mechanics: Effects / Skills / Stats Effects / Skills / Stats labels Dec 4, 2019
@Fris0uman Fris0uman marked this pull request as ready for review March 24, 2020 11:13
doc/JSON_INFO.md Outdated Show resolved Hide resolved
Fris0uman and others added 2 commits March 25, 2020 18:37
Co-Authored-By: Anton Burmistrov <Night_Pryanik@mail.ru>
src/character.h Outdated
@@ -21,6 +21,7 @@
#include "character_id.h"
#include "character_martial_arts.h"
#include "creature.h"
#include "disease.h"
Copy link
Member

@kevingranade kevingranade Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to include this here, it needs to be in character.cpp and consumption.cpp

@kevingranade kevingranade merged commit 2bfe097 into CleverRaven:master Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mechanics: Character / Player Character / Player mechanics Mechanics: Effects / Skills / Stats Effects / Skills / Stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants