From 3c2a33b9b25b3bba33c29a10e66d5256b10c537d Mon Sep 17 00:00:00 2001 From: SphericalIce Date: Thu, 7 Jan 2021 22:13:14 +0000 Subject: Use constants for max IVs & the random IV generation flag --- include/constants/pokemon.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index bac914fec..d4f6e5684 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -232,6 +232,9 @@ #define STATUS_PRIMARY_POKERUS 6 #define STATUS_PRIMARY_FAINTED 7 +#define MAX_PER_STAT_IVS 31 +#define MAX_IV_MASK 31 +#define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) #define MAX_PER_STAT_EVS 255 #define MAX_TOTAL_EVS 510 #define EV_ITEM_RAISE_LIMIT 100 -- cgit v1.2.3 From 8634710996fc440105d8be6dc354b1e9fef303b1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Feb 2021 14:54:11 -0500 Subject: Document PokemonUseItemEffects --- include/constants/pokemon.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index d4f6e5684..006a17c21 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -290,6 +290,12 @@ #define EVOS_PER_MON 5 +// Evolution 'modes,' for GetEvolutionTargetSpecies +#define EVO_MODE_NORMAL 0 +#define EVO_MODE_TRADE 1 +#define EVO_MODE_ITEM_USE 2 +#define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve + #define NUM_MALE_LINK_FACILITY_CLASSES 8 #define NUM_FEMALE_LINK_FACILITY_CLASSES 8 -- cgit v1.2.3 From b89c3e901e1de2f3513d74fa548373d82d3f26d0 Mon Sep 17 00:00:00 2001 From: Deokishisu <6993375+Deokishisu@users.noreply.github.com> Date: Mon, 15 Feb 2021 11:40:16 -0500 Subject: Fix giftRibbons Field in SaveBlock1 & Relabel Gift Ribbons in pokemon.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The giftRibbons field has been split out into proper subfields. The new ExternalEvent structs deal with interconnectivity between external games/peripherals and Emerald, such as PokéCoupon storage and the flag for receiving Wishmaker Jirachi. The giftRibbon fields in `PokemonSubstruct3` have also been renamed to their appropriate ribbons, and commented with distribution info if applicable. The previous `fatefulEncounter` field was actually filler, and relabeled as such, while the obedient bit was renamed `fatefulEncounter`. All relevant constants and functions dealing with the Pokémon data structure were renamed with these changes in mind. --- include/constants/pokemon.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index d4f6e5684..18791e926 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -164,15 +164,15 @@ #define MON_DATA_VICTORY_RIBBON 69 #define MON_DATA_ARTIST_RIBBON 70 #define MON_DATA_EFFORT_RIBBON 71 -#define MON_DATA_GIFT_RIBBON_1 72 -#define MON_DATA_GIFT_RIBBON_2 73 -#define MON_DATA_GIFT_RIBBON_3 74 -#define MON_DATA_GIFT_RIBBON_4 75 -#define MON_DATA_GIFT_RIBBON_5 76 -#define MON_DATA_GIFT_RIBBON_6 77 -#define MON_DATA_GIFT_RIBBON_7 78 -#define MON_DATA_FATEFUL_ENCOUNTER 79 -#define MON_DATA_OBEDIENCE 80 +#define MON_DATA_MARINE_RIBBON 72 +#define MON_DATA_LAND_RIBBON 73 +#define MON_DATA_SKY_RIBBON 74 +#define MON_DATA_COUNTRY_RIBBON 75 +#define MON_DATA_NATIONAL_RIBBON 76 +#define MON_DATA_EARTH_RIBBON 77 +#define MON_DATA_WORLD_RIBBON 78 +#define MON_DATA_FILLER 79 +#define MON_DATA_FATEFUL_ENCOUNTER 80 #define MON_DATA_KNOWN_MOVES 81 #define MON_DATA_RIBBON_COUNT 82 #define MON_DATA_RIBBONS 83 -- cgit v1.2.3 From 7b2bf8c7e2249f66a04eabdbaeb2a8018855955f Mon Sep 17 00:00:00 2001 From: Deokishisu <6993375+Deokishisu@users.noreply.github.com> Date: Mon, 15 Feb 2021 14:54:35 -0500 Subject: Rename obedient/fatefulEncounter to eventLegal Per discussion on pret, `obedient`/`fatefulEncounter` has been renamed to `eventLegal`, and all related functions and constants have been modified with this in mind. Additionally, fixed some whitespace alignment issues in `script_cmd_table.h`, `pokemon.h`, and `tv.c` from the last commit. --- include/constants/pokemon.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 18791e926..e32ddf496 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -165,14 +165,14 @@ #define MON_DATA_ARTIST_RIBBON 70 #define MON_DATA_EFFORT_RIBBON 71 #define MON_DATA_MARINE_RIBBON 72 -#define MON_DATA_LAND_RIBBON 73 -#define MON_DATA_SKY_RIBBON 74 -#define MON_DATA_COUNTRY_RIBBON 75 -#define MON_DATA_NATIONAL_RIBBON 76 -#define MON_DATA_EARTH_RIBBON 77 -#define MON_DATA_WORLD_RIBBON 78 -#define MON_DATA_FILLER 79 -#define MON_DATA_FATEFUL_ENCOUNTER 80 +#define MON_DATA_LAND_RIBBON 73 +#define MON_DATA_SKY_RIBBON 74 +#define MON_DATA_COUNTRY_RIBBON 75 +#define MON_DATA_NATIONAL_RIBBON 76 +#define MON_DATA_EARTH_RIBBON 77 +#define MON_DATA_WORLD_RIBBON 78 +#define MON_DATA_FILLER 79 +#define MON_DATA_EVENT_LEGAL 80 #define MON_DATA_KNOWN_MOVES 81 #define MON_DATA_RIBBON_COUNT 82 #define MON_DATA_RIBBONS 83 -- cgit v1.2.3 From e059c4fdfa0fe36aceac4b283176825ad759fe5d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Feb 2021 14:11:45 -0500 Subject: Use new gift ribbons size, label unused ribbons --- include/constants/pokemon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index e32ddf496..3d757bed1 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -171,7 +171,7 @@ #define MON_DATA_NATIONAL_RIBBON 76 #define MON_DATA_EARTH_RIBBON 77 #define MON_DATA_WORLD_RIBBON 78 -#define MON_DATA_FILLER 79 +#define MON_DATA_UNUSED_RIBBONS 79 #define MON_DATA_EVENT_LEGAL 80 #define MON_DATA_KNOWN_MOVES 81 #define MON_DATA_RIBBON_COUNT 82 -- cgit v1.2.3 From 02c1fbd733da15e82687ec2d346b8151ca00ccf8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Feb 2021 09:59:24 -0500 Subject: Document ribbon TV show, add new ribbon IDs/size --- include/constants/pokemon.h | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 3d757bed1..af603d789 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -182,6 +182,55 @@ #define MON_DATA_SPATK2 87 #define MON_DATA_SPDEF2 88 +// Ribbon IDs used by TV and Pokénav +#define CHAMPION_RIBBON 0 +#define COOL_RIBBON_NORMAL 1 +#define COOL_RIBBON_SUPER 2 +#define COOL_RIBBON_HYPER 3 +#define COOL_RIBBON_MASTER 4 +#define BEAUTY_RIBBON_NORMAL 5 +#define BEAUTY_RIBBON_SUPER 6 +#define BEAUTY_RIBBON_HYPER 7 +#define BEAUTY_RIBBON_MASTER 8 +#define CUTE_RIBBON_NORMAL 9 +#define CUTE_RIBBON_SUPER 10 +#define CUTE_RIBBON_HYPER 11 +#define CUTE_RIBBON_MASTER 12 +#define SMART_RIBBON_NORMAL 13 +#define SMART_RIBBON_SUPER 14 +#define SMART_RIBBON_HYPER 15 +#define SMART_RIBBON_MASTER 16 +#define TOUGH_RIBBON_NORMAL 17 +#define TOUGH_RIBBON_SUPER 18 +#define TOUGH_RIBBON_HYPER 19 +#define TOUGH_RIBBON_MASTER 20 +#define WINNING_RIBBON 21 +#define VICTORY_RIBBON 22 +#define ARTIST_RIBBON 23 +#define EFFORT_RIBBON 24 +#define MARINE_RIBBON 25 +#define LAND_RIBBON 26 +#define SKY_RIBBON 27 +#define COUNTRY_RIBBON 28 +#define NATIONAL_RIBBON 29 +#define EARTH_RIBBON 30 +#define WORLD_RIBBON 31 + +#define FIRST_GIFT_RIBBON MARINE_RIBBON +#define LAST_GIFT_RIBBON WORLD_RIBBON +#define NUM_GIFT_RIBBONS (1 + LAST_GIFT_RIBBON - FIRST_GIFT_RIBBON) + +// The above gift ribbons (Marine - World) are +// special distribution ribbons that correspond to +// 1 bit each in the Pokémon struct. Gen 4 hard-codes +// each of these to the given name. In Gen 3 they're +// used to get an index into giftRibbons in the save block, +// which can have a value 0-64 (0 is 'no ribbon') that +// corresponds to one of the special ribbons listed +// in gGiftRibbonDescriptionPointers. Most of these were +// never distributed +#define MAX_GIFT_RIBBON 64 + #define MIN_LEVEL 1 #define MAX_LEVEL 100 -- cgit v1.2.3 From 1cac608dbedeaaccd2446891c38a71f10230bfc0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 20 Feb 2021 15:15:38 -0500 Subject: Document mail --- include/constants/pokemon.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index a0bb2c7ce..11a7c7fc5 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -288,8 +288,6 @@ #define MAX_TOTAL_EVS 510 #define EV_ITEM_RAISE_LIMIT 100 -#define UNOWN_FORM_COUNT 28 - // Battle move flags #define FLAG_MAKES_CONTACT (1 << 0) #define FLAG_PROTECT_AFFECTED (1 << 1) -- cgit v1.2.3 From 62968895ca220cf5b6f7c066e9061cf45fe7913e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 29 Mar 2021 09:38:19 -0400 Subject: Add MON_PIC_SIZE constant --- include/constants/pokemon.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/constants/pokemon.h') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 11a7c7fc5..51ef0c015 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -346,4 +346,6 @@ #define NUM_MALE_LINK_FACILITY_CLASSES 8 #define NUM_FEMALE_LINK_FACILITY_CLASSES 8 +#define MON_PIC_SIZE (64 * 64 / 2) + #endif // GUARD_CONSTANTS_POKEMON_H -- cgit v1.2.3