mirror of
https://github.com/Lorenzooone/Pokemon-Gen3-to-Gen-X.git
synced 2026-04-26 08:37:40 -05:00
Fix bad Max PPs for Gen1/2
This commit is contained in:
parent
5f6927b0ad
commit
d230e487c1
|
|
@ -156,6 +156,7 @@
|
|||
|
||||
#define GEN2_EGG 253
|
||||
#define GEN2_NO_MON 255
|
||||
#define GEN12_MAX_MOVE_PP 40
|
||||
|
||||
#define CELEBI_AGATE_OT_ID 31121
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static u16 applied_ball;
|
|||
static u8 egg_met_location;
|
||||
static u8 first_set_egg_met_location;
|
||||
|
||||
const struct version_t version = { .main_version = 1, .sub_version = 1, .revision_version = 10, .revision_letter = CONSOLE_LETTER};
|
||||
const struct version_t version = { .main_version = 1, .sub_version = 1, .revision_version = 11, .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() {
|
||||
|
|
|
|||
|
|
@ -205,9 +205,10 @@ u8 convert_moves_of_gen3(struct gen3_mon_attacks* attacks, u8 pp_bonuses, u8* mo
|
|||
if(!found) {
|
||||
u8 bonus_pp = (pp_bonuses>>(2*i))&3;
|
||||
u8 base_pp = get_pp_of_move(move, bonus_pp, last_valid_move);
|
||||
// Limit the PP to its maximum of 61
|
||||
if(base_pp > 61)
|
||||
base_pp = 61;
|
||||
// Limit the PP to the real maximum
|
||||
u8 max_gen12_move_pps = GEN12_MAX_MOVE_PP + (((GEN12_MAX_MOVE_PP / 5) - 1) * bonus_pp);
|
||||
if(base_pp >= max_gen12_move_pps)
|
||||
base_pp = max_gen12_move_pps;
|
||||
base_pp |= (bonus_pp << 6);
|
||||
pps[used_slots] = base_pp;
|
||||
moves[used_slots++] = move;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user