Skip to content

Feature: Added Canon Disease & Bioweapon Support; Added Disease Glossary Entry; Added Herd Immunity Mechanics; Added Ageranium's Disease & Dobrowski Depression-A Syndrome Flaws#8476

Merged
HammerGS merged 20 commits into
MegaMek:mainfrom
IllianiBird:canonicalDiseases
Jan 6, 2026

Conversation

@IllianiBird

@IllianiBird IllianiBird commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

Requires Task: Added Data Support for Ageranium's Disease & Dobrowski Depression-A Syndrome Flaws

This PR introduces support for around 50 canonical diseases and bioweapon attacks.

It also expands our disease mechanics to include herd immunity. Once a character has been infected with a disease they cannot be reinfected. This means players can risk skipping inoculations and gamble that any infections that occur will be mild. This also ensures that players don't find themselves in a situation where their campaign breaks down because they don't have enough money to pay for medication.

Finally, it adds support for two hereditary diseases. Dobrowski Depression-A Syndrome, and the Kaer Pathogen bioweapon. The latter of which includes its' canonical infliction of birth defects in the offspring of characters infected with the disease.

@IllianiBird IllianiBird self-assigned this Dec 12, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner December 12, 2025 20:34
@IllianiBird IllianiBird added the Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature label Dec 12, 2025
@IllianiBird IllianiBird marked this pull request as draft December 12, 2025 20:35
Comment thread MekHQ/src/mekhq/campaign/CampaignNewDayManager.java Fixed
@codecov

codecov Bot commented Dec 12, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.25202% with 913 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.61%. Comparing base (37c7f9e) to head (dd83b30).
⚠️ Report is 61 commits behind head on main.

Files with missing lines Patch % Lines
...advancedMedicalAlternate/CanonicalDiseaseType.java 0.00% 304 Missing ⚠️
...medical/advancedMedicalAlternate/Inoculations.java 0.00% 170 Missing ⚠️
MekHQ/src/mekhq/gui/view/PlanetViewPanel.java 0.00% 68 Missing ⚠️
...personnel/medical/advancedMedical/InjuryTypes.java 0.00% 65 Missing ⚠️
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 41 Missing ⚠️
MekHQ/src/mekhq/campaign/personnel/Person.java 9.09% 39 Missing and 1 partial ⚠️
...ekHQ/src/mekhq/campaign/CampaignNewDayManager.java 0.00% 34 Missing ⚠️
MekHQ/src/mekhq/campaign/CurrentLocation.java 0.00% 29 Missing ⚠️
.../personnel/medical/advancedMedical/InjuryUtil.java 0.00% 29 Missing ⚠️
...mekhq/gui/campaignOptions/CampaignOptionsPane.java 0.00% 25 Missing ⚠️
... and 21 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8476      +/-   ##
============================================
+ Coverage     12.48%   12.61%   +0.12%     
- Complexity     7553     7563      +10     
============================================
  Files          1294     1295       +1     
  Lines        166215   167265    +1050     
  Branches      25055    25165     +110     
============================================
+ Hits          20758    21100     +342     
- Misses       143455   144165     +710     
+ Partials       2002     2000       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces comprehensive support for ~50 canonical diseases and bioweapon attacks in the BattleTech universe, along with herd immunity mechanics and two hereditary disease flaws (Ageranium's Disease and Dobrowski Depression-A Syndrome). The implementation refactors fatigue tracking to distinguish between direct and adjusted values, updates the injury removal system to track recovery dates for immunity purposes, and adds extensive disease-specific inoculation mechanics.

Key changes:

  • Fatigue system split into getFatigueDirect() and getAdjustedFatigue() to handle disease/flaw modifiers
  • Injury removal now requires a date parameter to track when characters develop antibodies
  • New canonical disease system with time-based outbreaks, cures, and system-specific tracking
  • Herd immunity prevents reinfection once recovered from a disease

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Person.java Added adjusted fatigue calculation, canonical disease inoculation tracking, and immunity system
Inoculations.java Expanded inoculation system for canonical diseases with cure availability tracking
CanonicalDiseaseType.java New enum defining ~50 diseases with outbreak dates, locations, and cure availability
AlternateInjuries.java Added disease/bioweapon injury type implementations
AbstractProcreation.java Added hereditary disease transmission to offspring
InjurySubType.java Added DISEASE_CANON_GENERIC and DISEASE_CANON_BIOWEAPON subtypes
Multiple test files Updated to use getFatigueDirect() instead of getFatigue()
Multiple GUI files Updated fatigue displays to use getAdjustedFatigue()
Resource files Added disease descriptions, glossary entries, and dialog text

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MekHQ/src/mekhq/campaign/personnel/Person.java Outdated
Comment thread MekHQ/src/mekhq/campaign/personnel/procreation/AbstractProcreation.java Outdated
Comment thread MekHQ/src/mekhq/campaign/CampaignNewDayManager.java Outdated
IllianiBird and others added 16 commits December 12, 2025 14:57
…rnate/Inoculations.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rnate/Inoculations.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tion.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rnate/Inoculations.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rnate/Inoculations.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	MekHQ/src/mekhq/campaign/personnel/Person.java
#	MekHQ/src/mekhq/gui/campaignOptions/CampaignOptionsPane.java
# Conflicts:
#	MekHQ/src/mekhq/campaign/personnel/medical/advancedMedical/InjuryTypes.java
# Conflicts:
#	MekHQ/src/mekhq/campaign/personnel/medical/advancedMedical/InjuryTypes.java
#	MekHQ/src/mekhq/campaign/personnel/medical/advancedMedicalAlternate/AlternateInjuries.java
@IllianiBird IllianiBird marked this pull request as ready for review December 30, 2025 20:35
@IllianiBird

Copy link
Copy Markdown
Collaborator Author

This is now ready for review

@Sleet01 Sleet01 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@HammerGS HammerGS merged commit 47a8355 into MegaMek:main Jan 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants