Skip to content

Conversation

FosterProgramming
Copy link
Collaborator

@FosterProgramming FosterProgramming commented Sep 13, 2025

Updated Pokerus to be able to config between different generations of Pokerus (This PR include test engine changes)

Description

I wanted to make the pokerus more readable/ easier to modify. To that effect, I did the following

  • Moved the Pokerus functions to their own file
  • Added 2 MON_DATA key to directly access the pokerus nibbles corresponding to the strain and numbers of days left
  • Modified the random strain distribution to use a randomWeighted (the probabilities of each strain should be the same as before)
  • All pokerus related functions have been refactores
  • Tests have been added for all pokerus functions
  • CHANGES TO THE TEST ENGINE were made to allow the pokerus tests to run

I also added new config to account for pokerus behavior in different generations based on the info in:
https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9rus

  • a config to get infected by Pokerus while you have a pokemon with pokerus in your party (gen 2)
  • a config to disable all pokerus effects similar (gen 9)
  • a config for pokerus party spread to affect one pokemon at a time instead of two (gen 2)
  • a config to choose the strain distriution of pokerus to match any generation
  • a config to decide if pokerus gets a fresh timer when it spread in the player party (gen 2)
  • a flag that can toggle pokerus infections (similar to gen 2 where pokerus can only infect pokemon after visiting goldenrod)
  • configs to change spread and infection odds
  • a config to disable pokemon having received pokerus reducing the odds of never infected pokemon catching pokerus
  • a config to disable a rare case where pokerus timer can be overwritten by a pokemon having a different strain of pokerus
  • a config to allow eggs to be infected or not

Media

Issue(s) that this PR fixes

#3908

Feature(s) this PR does NOT handle:

Features considered but not implemented in this PR:

  • a config to choose if the pokemon center should tell the player about the pokerus (vanilla, she tells the player once, possibility to add option to never or always tell)
  • a config to remove pokerus from the pokemon data/savebloock

Discord contact info

Jamie (foster_harmony)

Copy link
Collaborator

@AlexOn1ine AlexOn1ine left a comment

Choose a reason for hiding this comment

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

I don't know much about Pokerus so it's just a code review. Hope someone else takes over from here.

@AlexOn1ine AlexOn1ine added feature-request Requests a new feature General Doesn't fit under other labels labels Sep 14, 2025
@FosterProgramming FosterProgramming added the category: battle-tests Related to the automated test environment label Sep 16, 2025
@FosterProgramming FosterProgramming marked this pull request as ready for review September 16, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-tests Related to the automated test environment feature-request Requests a new feature General Doesn't fit under other labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants