-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Removes Crit Chance preproc #5520
base: upcoming
Are you sure you want to change the base?
Conversation
added assumes back where needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Alex, the only comment I had on initial skim in the car this morning was on the ASSUMEs, I think a few got missed but this seems pretty much ready to go to me :)
I'll take care of everything tomorrow. I'm not sure about the Chansey thing but wouldn't mind changing it. I only really did the change because the macro was so long ( |
Completely agree on the macro -> function front I find them much more readable and as a result much easier for users to change themselves :) |
Ready for review. I've made a singular function for both leek and lucky punch. Should be easy to extend without duplicating to much code. Hope that's a fine solution. |
did some more refactoring but for some reason the test I will continue work on this tomorrow but I wouldn't mind feedback for the current state. I personally think it is much better now since all users will have to do now is edit the |
f48db3b
to
c202394
Compare
force push because I made constant changes that changed one var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the GetHoldEffectCritChanceIncrease
change! Just think we need to either use it for all the gen 1 items or none of them.
If you got that test sorted, I think this is the last feedback I'll have :)
return sCriticalHitOdds[critChance]; | ||
} | ||
|
||
#define GEN_1_FARFETCHED_LEEK_SCALER 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to handle Gen 1 Leek with this function, I think we should also handle Gen 1 Lucky Punch and Scope Lens, have similar defines for them, and use this function in the Gen 1 version also.
Or we don't use this function in the gen 1 version at all, if you don't want to have 3 defines here. I don't like the idea of using this function for some gen 1 held items but not all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point! will work out a solution tomorrow
I was not able to find the problem because the recording was fine. |
Oh I just assumed you had it sorted because it doesn't fail with the CI. That is very strange. Would you say that's blocking in your opinion? It's odd to me that it doesn't fail here but does on your machine. |
I added a |
Introduces the function
GetCritHitOdds
to switch between generational critical hits.Also I turned the macro
BENEFITS_FROM_LEEK
into an inline function for better readability and removedASSUME(B_CRIT_CHANCE >= GEN_7);
fromcrit_chance.c
. Correct me if I'm wrong but it seems to me that it isn't needed by any current tests. If I'm wrong I can add it back to the specific tests which would need it.