mirror of
https://github.com/Lorenzooone/Pokemon-Gen3-to-Gen-X.git
synced 2026-03-21 17:24:39 -05:00
Add option to mantain data for Event Pokémon (Mew/Celebi)
This commit is contained in:
parent
cff5d3a96c
commit
4aca1adaef
|
|
@ -67,6 +67,7 @@ Inside the Cheats menu, you will find Special options which can be useful for va
|
|||
- "Cross-Gen Evo." can be used to allow evolution of Pokémon which would not evolve in the target generation (A Scyther holding Metal Coat from Gen 1 will evolve with this option enabled).
|
||||
- "Tradeless Evo." can be used to execute trade evolutions without a link cable.
|
||||
- "Undistr. Events" can be used to make it so Celebi and Mew from Gen 1 and Gen 2 games will not be Japanese (but they will be illegal).
|
||||
- "Event Pokémon" can be used to make it so Celebi and Mew from Gen 1 and Gen 2 games will not replace OT data (but they will be illegal).
|
||||
- "Fast Hatch Eggs" when enabled reduces the steps incoming eggs will need in order to hatch.
|
||||
- "Give Pokérus to Party", can be used to fix the fact that it's impossible to get Pokérus in Pokémon Fire Red/Leaf Green.
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ void set_single_colour(u8, u8, u8);
|
|||
void set_evolve_without_trade(u8);
|
||||
void set_allow_undistributed_events(u8);
|
||||
void set_fast_hatch_eggs(u8);
|
||||
void set_event_info_replacement(u8);
|
||||
void increase_egg_met_location(void);
|
||||
void decrease_egg_met_location(void);
|
||||
u8 set_applied_ball(u16);
|
||||
|
|
@ -58,6 +59,7 @@ u8 get_allow_undistributed_events(void);
|
|||
u8 get_fast_hatch_eggs(void);
|
||||
u8 get_egg_met_location(void);
|
||||
u16 get_applied_ball(void);
|
||||
u8 get_event_info_replacement(void);
|
||||
const struct version_t* get_version(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#define DEFAULT_ALLOW_UNDISTRIBUTED_EVENTS 0
|
||||
#define DEFAULT_FAST_HATCH_EGGS 0
|
||||
#define DEFAULT_BALL POKEBALL_ID
|
||||
#define DEFAULT_EVENT_INFO_REPLACEMENT 1
|
||||
|
||||
void sanitize_egg_met_location(void);
|
||||
const u8* get_valid_egg_met_locs(void);
|
||||
|
|
@ -40,8 +41,9 @@ static u8 fast_hatch_eggs;
|
|||
static u16 applied_ball;
|
||||
static u8 egg_met_location;
|
||||
static u8 first_set_egg_met_location;
|
||||
static u8 event_info_replacement;
|
||||
|
||||
const struct version_t version = { .main_version = 1, .sub_version = 1, .revision_version = 13, .revision_letter = CONSOLE_LETTER};
|
||||
const struct version_t version = { .main_version = 1, .sub_version = 1, .revision_version = 14, .revision_letter = CONSOLE_LETTER};
|
||||
const u8* egg_valid_met_locations[NUMBER_OF_GAMES+FIRST_VERSION_ID] = {valid_egg_locations_rs_bin, valid_egg_locations_rs_bin, valid_egg_locations_rs_bin, valid_egg_locations_e_bin, valid_egg_locations_frlg_bin, valid_egg_locations_frlg_bin};
|
||||
|
||||
void set_default_settings() {
|
||||
|
|
@ -60,6 +62,7 @@ void set_default_settings() {
|
|||
set_allow_undistributed_events(DEFAULT_ALLOW_UNDISTRIBUTED_EVENTS);
|
||||
set_fast_hatch_eggs(DEFAULT_FAST_HATCH_EGGS);
|
||||
set_applied_ball(DEFAULT_BALL);
|
||||
set_event_info_replacement(DEFAULT_EVENT_INFO_REPLACEMENT);
|
||||
}
|
||||
|
||||
const u8* get_valid_egg_met_locs() {
|
||||
|
|
@ -139,6 +142,10 @@ void set_fast_hatch_eggs(u8 new_val) {
|
|||
fast_hatch_eggs = new_val;
|
||||
}
|
||||
|
||||
void set_event_info_replacement(u8 new_val) {
|
||||
event_info_replacement = new_val;
|
||||
}
|
||||
|
||||
void increase_egg_met_location() {
|
||||
const u8* valid_met_locs = get_valid_egg_met_locs();
|
||||
u8 base_val = egg_met_location;
|
||||
|
|
@ -259,6 +266,10 @@ u16 get_applied_ball() {
|
|||
return applied_ball;
|
||||
}
|
||||
|
||||
u8 get_event_info_replacement() {
|
||||
return event_info_replacement;
|
||||
}
|
||||
|
||||
const struct version_t* get_version() {
|
||||
return &version;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void alter_nature(struct gen3_mon_data_unenc* data_src, u8 wanted_nature) {
|
|||
switch(encounter_type) {
|
||||
case STATIC_ENCOUNTER:
|
||||
case ROAMER_ENCOUNTER:
|
||||
if(species == CELEBI_SPECIES) {
|
||||
if(get_event_info_replacement() && (species == CELEBI_SPECIES)) {
|
||||
generate_generic_genderless_shadow_info_xd(wanted_nature, 0, wanted_ivs, tsv, pid_ptr, ivs_ptr, ability_ptr);
|
||||
is_ability_set = 1;
|
||||
}
|
||||
|
|
@ -729,7 +729,7 @@ void set_origin_pid_iv(struct gen3_mon* dst, struct gen3_mon_data_unenc* data_ds
|
|||
switch(encounter_type) {
|
||||
case STATIC_ENCOUNTER:
|
||||
valid_balls = VALID_POKEBALL_NO_EGG;
|
||||
if(species == CELEBI_SPECIES) {
|
||||
if(get_event_info_replacement() && (species == CELEBI_SPECIES)) {
|
||||
valid_balls = VALID_POKEBALL_CELEBI;
|
||||
chosen_version = R_VERSION_ID;
|
||||
generate_generic_genderless_shadow_info_xd(wanted_nature, 0, wanted_ivs, tsv, &dst->pid, &ivs, &ability);
|
||||
|
|
@ -1045,13 +1045,13 @@ void special_convert_strings_distribution(struct gen3_mon* dst, u16 species) {
|
|||
const u8* mon_name = get_pokemon_name_pure(species, 0, dst->language);
|
||||
const u8* trainer_name = NULL;
|
||||
|
||||
switch(species) {
|
||||
case CELEBI_SPECIES:
|
||||
trainer_name = get_celebi_trainer_name(dst->language);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(species) {
|
||||
case CELEBI_SPECIES:
|
||||
trainer_name = get_celebi_trainer_name(dst->language);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(mon_name)
|
||||
text_gen3_copy(mon_name, dst->nickname, gen3_nickname_cap, gen3_nickname_cap);
|
||||
|
|
@ -1348,7 +1348,7 @@ void set_language_gen12_to_gen3(struct gen3_mon* dst, u16 species, u8 is_egg, co
|
|||
else
|
||||
dst->language = int_language;
|
||||
|
||||
if((species == MEW_SPECIES) || (species == CELEBI_SPECIES)) {
|
||||
if(get_event_info_replacement() && ((species == MEW_SPECIES) || (species == CELEBI_SPECIES))) {
|
||||
if((!get_allow_undistributed_events()) || is_jp)
|
||||
dst->language = JAPANESE_LANGUAGE;
|
||||
else
|
||||
|
|
@ -1367,7 +1367,7 @@ u8 text_handling_gen12_to_gen3(struct gen3_mon* dst, u16 species, u16 swapped_ot
|
|||
set_language_gen12_to_gen3(dst, species, is_egg, ot_name, nickname, is_jp);
|
||||
|
||||
// Specially handle Celebi's event
|
||||
if((species == CELEBI_SPECIES) && (!is_egg)) {
|
||||
if(get_event_info_replacement() && (species == CELEBI_SPECIES) && (!is_egg)) {
|
||||
dst->ot_id = CELEBI_AGATE_OT_ID;
|
||||
special_convert_strings_distribution(dst, species);
|
||||
return no_restrictions;
|
||||
|
|
|
|||
|
|
@ -715,7 +715,7 @@ u8 handle_input_cheats_menu(u16 keys, u8* cursor_y_pos, u8* update) {
|
|||
switch(*cursor_y_pos) {
|
||||
case 0:
|
||||
if(keys & KEY_UP)
|
||||
*cursor_y_pos = 4;
|
||||
*cursor_y_pos = 5;
|
||||
else if(keys & KEY_DOWN)
|
||||
*cursor_y_pos += 1;
|
||||
else if((keys & KEY_RIGHT) || (keys & KEY_A) || (keys & KEY_LEFT)) {
|
||||
|
|
@ -749,11 +749,21 @@ u8 handle_input_cheats_menu(u16 keys, u8* cursor_y_pos, u8* update) {
|
|||
else if(keys & KEY_DOWN)
|
||||
*cursor_y_pos += 1;
|
||||
else if((keys & KEY_RIGHT) || (keys & KEY_A) || (keys & KEY_LEFT)) {
|
||||
set_fast_hatch_eggs(!get_fast_hatch_eggs());
|
||||
set_event_info_replacement(!get_event_info_replacement());
|
||||
*update = 1;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if(keys & KEY_UP)
|
||||
*cursor_y_pos -= 1;
|
||||
else if(keys & KEY_DOWN)
|
||||
*cursor_y_pos += 1;
|
||||
else if((keys & KEY_RIGHT) || (keys & KEY_A) || (keys & KEY_LEFT)) {
|
||||
set_fast_hatch_eggs(!get_fast_hatch_eggs());
|
||||
*update = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if(keys & KEY_A)
|
||||
return 1;
|
||||
else if(keys & KEY_UP)
|
||||
|
|
|
|||
|
|
@ -609,6 +609,11 @@ void print_cheats_menu(u8 update) {
|
|||
PRINT_FUNCTION(" <Enabled>\n\n");
|
||||
else
|
||||
PRINT_FUNCTION(" <Disabled>\n\n");
|
||||
PRINT_FUNCTION(" Event Pok\xE9mon:");
|
||||
if(get_event_info_replacement())
|
||||
PRINT_FUNCTION(" <Legit Data>\n\n");
|
||||
else
|
||||
PRINT_FUNCTION(" <Keep Data>\n\n");
|
||||
PRINT_FUNCTION(" Fast Hatch Eggs:");
|
||||
if(get_fast_hatch_eggs())
|
||||
PRINT_FUNCTION(" <Enabled>\n\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user