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

Add max duration for several effects lacking it #1465

Merged
merged 1 commit into from Apr 19, 2022

Conversation

chaosvolt
Copy link
Member

Summary

SUMMARY: Balance "Assign max duration to various effects that can easily stack to effectively-infinite duration without them"

Purpose of change

It was brought up on the BN discord that certain effects seem to have uncapped durations, which are kinda infamous for being lethal as hell as a consequence. This also ties in with the infamous "deaf for in-game weeks because big boom" issue, which I recall was fixed in DDA at some point by capping duration.

Describe the solution

  1. Added placeholder max_duration of 30 minutes to the blind, stunned, stun, poison, badpoison, paralyzepoison, sap, relax_gas effects. Most of these are effects that can either hypothetically stack up if a source is able to spam them, or more often gets doled out by a field and can thus easily ramp up to functionally infinite duration in a bad situation.
  2. Added a max_duration of 23 hours to food poisoning and deafness effects. These are effects meant to be doled out in fairly long durations it seems, but can hypothetically stack up to absurd durations, with deafness being infamous for this in particular. Realistically it seems temporary hearing loss can take 24-48 hours in some cases to clear up so this would be within that range to an acceptable degree.
  3. Also added a max duration of 60 minutes to spores. It's one of those effects that can stack up due to a field existing, but seems to favor longer durations and steady checks for whether it wants to convert to fungus, so a longer cap on duration than the above placeholders seemed fitting.
  4. Also added max duration of 48 hours to the evil effect. It's another one that can ramp up to uncapped durations (especially since I suspect the effect triggers 6x more often than intended), and while that seems fine for attention and teleglow since their subeffects can shave off parts of the duration, evil has no such ability so the only options are wait it out or use something from a mod.
  5. Misc: Fixed sap field complaining about lack of bodypart via having the field apply the effect to the torso. I'd tell it to apply to the feet instead but then we'd need to tweak the effect to account for it being applied twice, and neither of its effects can be neatly divided by two.

Describe alternatives you've considered

I was tempted to mess with mi-go atmosphere a lil too but I have a separate idea for that I might do in another PR.

Testing

Checked affected files for lint and syntax errors.

Additional context

@chaosvolt
Copy link
Member Author

Uhhh.


00:00:13.619 ERROR DEBUGMSG : D:\a\Cataclysm-BN\Cataclysm-BN\src\npc.cpp:763 [place_on_map] Failed to place NPC in a valid location near (50,7,-1)
00:00:13.619 ERROR DEBUGMSG : D:\a\Cataclysm-BN\Cataclysm-BN\src\npc.cpp:763 [place_on_map] Failed to place NPC in a valid location near (47,7,-1)
00:00:13.619 ERROR DEBUGMSG : D:\a\Cataclysm-BN\Cataclysm-BN\src\npc.cpp:763 [place_on_map] Failed to place NPC in a valid location near (48,6,-1)
00:00:13.620 ERROR DEBUGMSG : D:\a\Cataclysm-BN\Cataclysm-BN\src\npc.cpp:763 [place_on_map] Failed to place NPC in a valid location near (52,7,-1)

@Coolthulhu Coolthulhu self-assigned this Apr 19, 2022
@Coolthulhu Coolthulhu merged commit 6e015ca into cataclysmbnteam:upload Apr 19, 2022
@chaosvolt chaosvolt deleted the duration-capping-stuff branch April 19, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants