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

Bugfixes Fungal infection and antifungal drug effects broken #52050

Closed
wants to merge 1 commit into from

Conversation

jim-huynh
Copy link
Contributor

@jim-huynh jim-huynh commented Oct 2, 2021

Summary

Bugfixes "Fungal infection and antifungal drug effects broken"

Purpose of change

Fixes #51939
Fixes #52040

Update player_hardcoded_effects.cpp to account for the changes to fungicide and antifungal drug mechanics made in #42388. Previously those drugs removed the effect directly, but after the change, fungal infections and its removal is time based.

The fungal infection code previously was set to permanent which meant that any infection would not get removed with this new mechanic.

Describe the solution

Updated player_hardcoded_effects.cpp to make it so that spore caused fungal infection has an initial fungal infection of 15 minutes, and the teleglow fungal infection has an initial infection of 1 hour. Both infection methods are now not permanent.

Updated the static void eff_fun_fungus method to use add_effects with a timescale rather than mod_duration which did not seem to work.

If the player resists the infection due to poison resist or fungicide, then the fungal infection duration is reduced by 4 extra seconds (for a total of 5 seconds reduction per second elapsed). If the player does not resist, then the fungal infection duration is increased by 2 seconds (for an effective increase of 1 second of fungal infection duration).

This means that after 5:45 hours (for 1 spore based infection), they'll start to feel the effects of 2nd tier effects. If they get infected multiple times with spores, it'll be slightly quicker.

Describe alternatives you've considered

N/A

Testing

Created a new character and infected them with spores. Stepped into the new spore effect to guarantee fungal infection. Checked that the fungal infection duration is correct, and did a few steps to see that the duration went up. Waited until 6 hours for the second tier events happened. Took antifungal and waited an hour to see that the effect is gone.

Additional context

@jim-huynh jim-huynh closed this Oct 2, 2021
@jim-huynh jim-huynh deleted the fungal_infection_fix branch June 28, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant