-
Notifications
You must be signed in to change notification settings - Fork 806
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 Hatch_*_STEPS constants #1121
Conversation
This reverts commit 892d0af.
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.
Sorry, I don't think this change is a good idea. "Steps taken to hatch" is a meaningfully numeric quantity, just like "base stat values" or "PP" or so on. "This Pokemon takes a 'slower' number of steps to hatch" is not informative.
Contrast that with the growth rate constants, which are sequential identifiers for formulas in a lookup table. Or the gender constants, which are also numeric data, but are named after it (so GENDER_F25
is 63, aka 25 percent
female). (And even for the gender constants, I could see just using raw percentage values, except GENDER_UNKNOWN
would still be special.)
Anyway. I could maybe see having self-explanatory constants, like DEF HATCH_1280 EQU 5
, DEF HATCH_2560 EQU 10
, etc (since one step cycle is 256 steps). But I also think just having the raw numbers is okay.
Thank you for your first contribution! We really appreciate people making a conscious effort to not only spot wrinkles in code style/names/etc but also fix them. That said, with any sort of constants the question is: does the value make more sense as a number, or does that numer have some kind of hidden meaning? In this case, an "egg cycle" is a multiple of 256 steps, and I think the numbers make sense on their own. The I'll leave this up for others to opine on, but to me it looks a bit unnecessary. EDIT: whoops, didn't see rangi's comment before submitting. |
Thanks for the feedback, both of you. I went ahead and renamed the constants to how many steps they equal and added some comments to clarify intent. |
I feel constants here are limiting, because I could make a Pokémon hatch in, let's say, 14 cycles, and that's a value a lot of romhackers would want to change for existing or even some fakemon. |
Adds
HATCH_*_STEPS
constants for the various hatch step cycle count values. Updates alldata/pokemon/base_stats/*
files to use the appropriate constant as well as the odd eggs indata/events/odd_eggs.asm
.