From 73d7f3cc5eb19168234ef82a18dc0d235e699401 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 Jun 2020 10:58:09 -0400 Subject: Define gender ratio as floats in personal.json --- include/constants/pokemon.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/constants') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 4a2647d6..1af59830 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -269,9 +269,15 @@ #define MON_DATA_SPECIES_NAME 178 #define MON_RATIO_MALE 0 +#define MON_RATIO_EIGHTH 31 +#define MON_RATIO_QUARTER 63 +#define MON_RATIO_HALF 127 +#define MON_RATIO_THREEQUARTER 191 #define MON_RATIO_FEMALE 254 #define MON_RATIO_UNKNOWN 255 +#define GENDER_RATIO(frac) ( (frac) <= 1 ? (u8)((frac) * 254.75) : 255 ) + enum MonGender { MON_MALE = 0, -- cgit v1.2.3