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

Shed Skin chance fix #5558

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

Pawkkie
Copy link
Collaborator

@Pawkkie Pawkkie commented Oct 22, 2024

Description

This is maybe the pettiest looking PR I've ever made, but I realized this was "broken" while writing tests for the sleep clause branch iriv and I are working on.

Shed Skin triggers 30% of the time in Gen 4, and 1/3 of the time otherwise, according to Bulbapedia. As is, it triggers 30% of the time with configs set to Gen 4 or higher.

Gotta get that sweet sweet 3% proc chance and fix my sleep clause test

Discord contact info

Pawkkie

@@ -5019,7 +5019,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
break;
case ABILITY_SHED_SKIN:
if ((gBattleMons[battler].status1 & STATUS1_ANY)
&& (B_ABILITY_TRIGGER_CHANCE >= GEN_4 ? RandomPercentage(RNG_SHED_SKIN, 30) : RandomChance(RNG_SHED_SKIN, 1, 3)))
&& (B_ABILITY_TRIGGER_CHANCE == GEN_4 ? RandomPercentage(RNG_SHED_SKIN, 30) : RandomPercentage(RNG_SHED_SKIN, 33)))
Copy link
Collaborator

@AlexOn1ine AlexOn1ine Oct 23, 2024

Choose a reason for hiding this comment

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

Isn't 1 in 3 more accurate then 33%?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh sure I suppose it is, I will revert that part :)

@AlexOn1ine AlexOn1ine merged commit b892ad4 into rh-hideout:master Oct 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants