Adding Mudkip, fixing bug with pp.

This commit is contained in:
Sergiotarxz 2023-11-01 20:29:46 +01:00
parent 2c597cd4b2
commit f2e420c151
6 changed files with 536 additions and 42 deletions

View File

@ -7,9 +7,9 @@ use warnings;
use feature 'signatures'; use feature 'signatures';
use Rsaves use Rsaves
qw/read_save check_correct_size get_saves find_current_save_index check_correct_size find_pokemon_substruct change_gender read_pc_storage save_pc_changes enable_eon_ticket save_changes pokemon_set_shiny read_pkm_file_box enable_mirage_island_for_pokemon parse_version_name/; qw/read_save check_correct_size get_saves find_current_save_index check_correct_size find_pokemon_substruct change_gender read_pc_storage save_pc_changes enable_eon_ticket save_changes pokemon_set_shiny read_pkm_file_box enable_mirage_island_for_pokemon parse_version_name pokemon_fill_pp/;
use Rsaves::Constants::Global use Rsaves::Constants::Global
qw/$MOVE_SPIKES $MOVE_DRILL_PECK $MOVE_HIDDEN_POWER $MOVE_TAUNT $MOVE_THUNDERBOLT $MOVE_ROAR $MOVE_THUNDER_WAVE $ITEM_LEFTOVERS $MOVE_DRAGON_DANCE $MOVE_ROCK_SLIDE $MOVE_EARTHQUAKE $MOVE_TAUNT $MOVE_FLAMETHROWER $MOVE_WILL_O_WISP/; qw/$MOVE_SPIKES $MOVE_DRILL_PECK $MOVE_HIDDEN_POWER $MOVE_TAUNT $MOVE_THUNDERBOLT $MOVE_ROAR $MOVE_THUNDER_WAVE $ITEM_LEFTOVERS $MOVE_DRAGON_DANCE $MOVE_ROCK_SLIDE $MOVE_EARTHQUAKE $MOVE_TAUNT $MOVE_FLAMETHROWER $MOVE_WILL_O_WISP $MOVE_HYDRO_PUMP $MOVE_ICE_BEAM $MOVE_FOCUS_PUNCH/;
use Rsaves::Constants::Ruby::Global qw/$MALE $FEMALE/; use Rsaves::Constants::Ruby::Global qw/$MALE $FEMALE/;
@ -25,37 +25,85 @@ sub start {
my $current_save_index = find_current_save_index(@saves); my $current_save_index = find_current_save_index(@saves);
my $save = $saves[$current_save_index]; my $save = $saves[$current_save_index];
my $pc = read_pc_storage($save); my $pc = read_pc_storage($save);
my $skarmory = $pc->{boxes}[0][5]; my $skarmory = $pc->{boxes}[0][5];
my $jolteon = $pc->{boxes}[0][4]; my $jolteon = $pc->{boxes}[0][4];
my $moltres = $pc->{boxes}[0][3]; my $moltres = $pc->{boxes}[0][3];
my $larvitar = $pc->{boxes}[0][2]; my $larvitar = $pc->{boxes}[0][2];
my $mudkip = $pc->{boxes}[0][0];
modifySkarmory($skarmory); modifySkarmory($skarmory);
modifyJolteon($jolteon); modifyJolteon($jolteon);
modifyLarvitar($larvitar); modifyLarvitar($larvitar);
modifyMoltres($moltres); modifyMoltres($moltres);
modifyMudkip($mudkip);
pokemon_fill_pp($skarmory);
pokemon_fill_pp($jolteon);
pokemon_fill_pp($larvitar);
pokemon_fill_pp($moltres);
pokemon_fill_pp($mudkip);
save_pc_changes( $save, $pc ); save_pc_changes( $save, $pc );
save_changes( @saves, $extra, $output ); save_changes( @saves, $extra, $output );
} }
sub _hihalf_u32 { sub modifyMudkip ($pokemon) {
my $n = shift; print Data::Dumper::Dumper $pokemon;
return ( ( $n & 0xFFFF0000 ) >> 16 ); $pokemon->{personality} = 0x6BB2770A;
my $ivs_egg_status_and_ability =
$pokemon->{substructures}[3]{ivs_egg_status_and_ability};
say _hihalf_u32( $pokemon->{otid} );
say _lowhalf_u32( $pokemon->{otid} );
my $ability = $ivs_egg_status_and_ability >> 31 & 1;
my $egg = $ivs_egg_status_and_ability >> 30 & 1;
my $iv_special_defense = $ivs_egg_status_and_ability >> 25 & 0x1F;
my $iv_special_attack = $ivs_egg_status_and_ability >> 20 & 0x1F;
my $iv_speed = $ivs_egg_status_and_ability >> 15 & 0x1F;
my $iv_defense = $ivs_egg_status_and_ability >> 10 & 0x1F;
my $iv_attack = $ivs_egg_status_and_ability >> 5 & 0x1F;
my $iv_hp = $ivs_egg_status_and_ability >> 0 & 0x1F;
(
$iv_hp, $iv_attack, $iv_defense, $iv_special_attack,
$iv_special_defense, $iv_speed, $ability
) = ( 31, 29, 30, 30, 31, 31, 0 );
$ivs_egg_status_and_ability = 0;
$ivs_egg_status_and_ability |= ( ( $ability & 1 ) << 31 );
$ivs_egg_status_and_ability |= ( ( $egg & 1 ) << 30 );
$ivs_egg_status_and_ability |= ( ( $iv_special_defense & 0x1F ) << 25 );
$ivs_egg_status_and_ability |= ( ( $iv_special_attack & 0x1F ) << 20 );
$ivs_egg_status_and_ability |= ( ( $iv_speed & 0x1F ) << 15 );
$ivs_egg_status_and_ability |= ( ( $iv_defense & 0x1F ) << 10 );
$ivs_egg_status_and_ability |= ( ( $iv_attack & 0x1F ) << 5 );
$ivs_egg_status_and_ability |= ( ( $iv_hp & 0x1F ) );
$pokemon->{substructures}[3]{ivs_egg_status_and_ability} =
$ivs_egg_status_and_ability;
$pokemon->{substructures}[2]{hp_ev} = 0;
$pokemon->{substructures}[2]{attack_ev} = 0;
$pokemon->{substructures}[2]{defense_ev} = 0;
$pokemon->{substructures}[2]{speed_ev} = 0;
$pokemon->{substructures}[2]{special_attack_ev} = 0;
$pokemon->{substructures}[2]{special_defense_ev} = 0;
$pokemon->{substructures}[1]{movements}[0] = $MOVE_HYDRO_PUMP;
$pokemon->{substructures}[1]{movements}[1] = $MOVE_EARTHQUAKE;
$pokemon->{substructures}[1]{movements}[2] = $MOVE_ICE_BEAM;
$pokemon->{substructures}[1]{movements}[3] = $MOVE_FOCUS_PUNCH;
$pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS;
print Data::Dumper::Dumper $pokemon;
} }
sub _lowhalf_u32 { sub modifyMoltres ($pokemon) {
my $n = shift;
return ( $n & 0xFFFF );
}
sub modifyMoltres($pokemon) {
print Data::Dumper::Dumper $pokemon; print Data::Dumper::Dumper $pokemon;
$pokemon->{personality} = 0x336E4D34; $pokemon->{personality} = 0x336E4D34;
my $ivs_egg_status_and_ability = my $ivs_egg_status_and_ability =
$pokemon->{substructures}[3]{ivs_egg_status_and_ability}; $pokemon->{substructures}[3]{ivs_egg_status_and_ability};
say _hihalf_u32($pokemon->{otid}); say _hihalf_u32( $pokemon->{otid} );
say _lowhalf_u32($pokemon->{otid}); say _lowhalf_u32( $pokemon->{otid} );
my $ability = $ivs_egg_status_and_ability >> 31 & 1; my $ability = $ivs_egg_status_and_ability >> 31 & 1;
my $egg = $ivs_egg_status_and_ability >> 30 & 1; my $egg = $ivs_egg_status_and_ability >> 30 & 1;
my $iv_special_defense = $ivs_egg_status_and_ability >> 25 & 0x1F; my $iv_special_defense = $ivs_egg_status_and_ability >> 25 & 0x1F;
@ -82,22 +130,32 @@ sub modifyMoltres($pokemon) {
$pokemon->{substructures}[3]{ivs_egg_status_and_ability} = $pokemon->{substructures}[3]{ivs_egg_status_and_ability} =
$ivs_egg_status_and_ability; $ivs_egg_status_and_ability;
$pokemon->{substructures}[2]{hp_ev} = 0; $pokemon->{substructures}[2]{hp_ev} = 0;
$pokemon->{substructures}[2]{attack_ev} = 0; $pokemon->{substructures}[2]{attack_ev} = 0;
$pokemon->{substructures}[2]{defense_ev} = 0; $pokemon->{substructures}[2]{defense_ev} = 0;
$pokemon->{substructures}[2]{speed_ev} = 0; $pokemon->{substructures}[2]{speed_ev} = 0;
$pokemon->{substructures}[2]{special_attack_ev} = 0; $pokemon->{substructures}[2]{special_attack_ev} = 0;
$pokemon->{substructures}[2]{special_defense_ev} = 0; $pokemon->{substructures}[2]{special_defense_ev} = 0;
$pokemon->{substructures}[1]{movements}[0] = $MOVE_FLAMETHROWER; $pokemon->{substructures}[1]{movements}[0] = $MOVE_FLAMETHROWER;
$pokemon->{substructures}[1]{movements}[1] = $MOVE_HIDDEN_POWER; $pokemon->{substructures}[1]{movements}[1] = $MOVE_HIDDEN_POWER;
$pokemon->{substructures}[1]{movements}[2] = $MOVE_WILL_O_WISP; $pokemon->{substructures}[1]{movements}[2] = $MOVE_WILL_O_WISP;
$pokemon->{substructures}[1]{movements}[3] = $MOVE_ROAR; $pokemon->{substructures}[1]{movements}[3] = $MOVE_ROAR;
$pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS; $pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS;
print Data::Dumper::Dumper $pokemon; print Data::Dumper::Dumper $pokemon;
} }
sub modifyLarvitar($pokemon) { sub _hihalf_u32 {
my $n = shift;
return ( ( $n & 0xFFFF0000 ) >> 16 );
}
sub _lowhalf_u32 {
my $n = shift;
return ( $n & 0xFFFF );
}
sub modifyLarvitar ($pokemon) {
$pokemon->{personality} = 0x9CF2063B; $pokemon->{personality} = 0x9CF2063B;
my $ivs_egg_status_and_ability = my $ivs_egg_status_and_ability =
$pokemon->{substructures}[3]{ivs_egg_status_and_ability}; $pokemon->{substructures}[3]{ivs_egg_status_and_ability};
@ -128,18 +186,18 @@ sub modifyLarvitar($pokemon) {
$pokemon->{substructures}[3]{ivs_egg_status_and_ability} = $pokemon->{substructures}[3]{ivs_egg_status_and_ability} =
$ivs_egg_status_and_ability; $ivs_egg_status_and_ability;
$pokemon->{substructures}[2]{hp_ev} = 0; $pokemon->{substructures}[2]{hp_ev} = 0;
$pokemon->{substructures}[2]{attack_ev} = 0; $pokemon->{substructures}[2]{attack_ev} = 0;
$pokemon->{substructures}[2]{defense_ev} = 0; $pokemon->{substructures}[2]{defense_ev} = 0;
$pokemon->{substructures}[2]{speed_ev} = 0; $pokemon->{substructures}[2]{speed_ev} = 0;
$pokemon->{substructures}[2]{special_attack_ev} = 0; $pokemon->{substructures}[2]{special_attack_ev} = 0;
$pokemon->{substructures}[2]{special_defense_ev} = 0; $pokemon->{substructures}[2]{special_defense_ev} = 0;
$pokemon->{substructures}[1]{movements}[0] = $MOVE_DRAGON_DANCE; $pokemon->{substructures}[1]{movements}[0] = $MOVE_DRAGON_DANCE;
$pokemon->{substructures}[1]{movements}[1] = $MOVE_ROCK_SLIDE; $pokemon->{substructures}[1]{movements}[1] = $MOVE_ROCK_SLIDE;
$pokemon->{substructures}[1]{movements}[2] = $MOVE_EARTHQUAKE; $pokemon->{substructures}[1]{movements}[2] = $MOVE_EARTHQUAKE;
$pokemon->{substructures}[1]{movements}[3] = $MOVE_TAUNT; $pokemon->{substructures}[1]{movements}[3] = $MOVE_TAUNT;
$pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS; $pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS;
} }
sub modifyJolteon ($pokemon) { sub modifyJolteon ($pokemon) {
@ -173,18 +231,18 @@ sub modifyJolteon ($pokemon) {
$pokemon->{substructures}[3]{ivs_egg_status_and_ability} = $pokemon->{substructures}[3]{ivs_egg_status_and_ability} =
$ivs_egg_status_and_ability; $ivs_egg_status_and_ability;
$pokemon->{substructures}[2]{hp_ev} = 0; $pokemon->{substructures}[2]{hp_ev} = 0;
$pokemon->{substructures}[2]{attack_ev} = 0; $pokemon->{substructures}[2]{attack_ev} = 0;
$pokemon->{substructures}[2]{defense_ev} = 0; $pokemon->{substructures}[2]{defense_ev} = 0;
$pokemon->{substructures}[2]{speed_ev} = 0; $pokemon->{substructures}[2]{speed_ev} = 0;
$pokemon->{substructures}[2]{special_attack_ev} = 0; $pokemon->{substructures}[2]{special_attack_ev} = 0;
$pokemon->{substructures}[2]{special_defense_ev} = 0; $pokemon->{substructures}[2]{special_defense_ev} = 0;
$pokemon->{substructures}[1]{movements}[0] = $MOVE_THUNDERBOLT; $pokemon->{substructures}[1]{movements}[0] = $MOVE_THUNDERBOLT;
$pokemon->{substructures}[1]{movements}[1] = $MOVE_HIDDEN_POWER; $pokemon->{substructures}[1]{movements}[1] = $MOVE_HIDDEN_POWER;
$pokemon->{substructures}[1]{movements}[2] = $MOVE_THUNDER_WAVE; $pokemon->{substructures}[1]{movements}[2] = $MOVE_THUNDER_WAVE;
$pokemon->{substructures}[1]{movements}[3] = $MOVE_ROAR; $pokemon->{substructures}[1]{movements}[3] = $MOVE_ROAR;
$pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS; $pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS;
} }
sub modifySkarmory ($pokemon) { sub modifySkarmory ($pokemon) {
@ -218,17 +276,17 @@ sub modifySkarmory ($pokemon) {
$pokemon->{substructures}[3]{ivs_egg_status_and_ability} = $pokemon->{substructures}[3]{ivs_egg_status_and_ability} =
$ivs_egg_status_and_ability; $ivs_egg_status_and_ability;
$pokemon->{substructures}[2]{hp_ev} = 0; $pokemon->{substructures}[2]{hp_ev} = 0;
$pokemon->{substructures}[2]{attack_ev} = 0; $pokemon->{substructures}[2]{attack_ev} = 0;
$pokemon->{substructures}[2]{defense_ev} = 0; $pokemon->{substructures}[2]{defense_ev} = 0;
$pokemon->{substructures}[2]{speed_ev} = 0; $pokemon->{substructures}[2]{speed_ev} = 0;
$pokemon->{substructures}[2]{special_attack_ev} = 0; $pokemon->{substructures}[2]{special_attack_ev} = 0;
$pokemon->{substructures}[2]{special_defense_ev} = 0; $pokemon->{substructures}[2]{special_defense_ev} = 0;
$pokemon->{substructures}[1]{movements}[0] = $MOVE_SPIKES; $pokemon->{substructures}[1]{movements}[0] = $MOVE_SPIKES;
$pokemon->{substructures}[1]{movements}[1] = $MOVE_DRILL_PECK; $pokemon->{substructures}[1]{movements}[1] = $MOVE_DRILL_PECK;
$pokemon->{substructures}[1]{movements}[2] = $MOVE_HIDDEN_POWER; $pokemon->{substructures}[1]{movements}[2] = $MOVE_HIDDEN_POWER;
$pokemon->{substructures}[1]{movements}[3] = $MOVE_TAUNT; $pokemon->{substructures}[1]{movements}[3] = $MOVE_TAUNT;
$pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS; $pokemon->{substructures}[0]{held_item} = $ITEM_LEFTOVERS;
} }
start; start;

View File

@ -5,6 +5,8 @@ use v5.34.1;
use strict; use strict;
use warnings; use warnings;
use feature 'signatures';
use Data::Dumper; use Data::Dumper;
use Rsaves::Constants::Ruby::Flags use Rsaves::Constants::Ruby::Flags
@ -15,6 +17,7 @@ use Rsaves::Constants::Global
use Rsaves::Constants::Firered::Flags qw/$FLAG_RECEIVED_AURORA_TICKET $FLAG_ENABLE_SHIP_BIRTH_ISLAND $FLAG_FOUGHT_DEOXYS $FLAG_DEOXYS_FLEW_AWAY/; use Rsaves::Constants::Firered::Flags qw/$FLAG_RECEIVED_AURORA_TICKET $FLAG_ENABLE_SHIP_BIRTH_ISLAND $FLAG_FOUGHT_DEOXYS $FLAG_DEOXYS_FLEW_AWAY/;
use Rsaves::Constants::Firered::Vars qw/$VAR_MAP_SCENE_CERULEAN_CITY_RIVAL/; use Rsaves::Constants::Firered::Vars qw/$VAR_MAP_SCENE_CERULEAN_CITY_RIVAL/;
use Rsaves::Constants::MoveAttributes qw/get_move_attributes/;
use Exporter; use Exporter;
use parent 'Exporter'; use parent 'Exporter';
@ -26,7 +29,7 @@ our @EXPORT_OK = (
read_pkm_file_box calculate_shiny_personality pokemon_set_shiny read_pkm_file_box calculate_shiny_personality pokemon_set_shiny
get_first_super_data set_first_super_data enable_rematch_main_legendary get_first_super_data set_first_super_data enable_rematch_main_legendary
check_flag_id enable_mirage_island_for_pokemon parse_version_name check_flag_id enable_mirage_island_for_pokemon parse_version_name
enable_deoxys_firered match_again_rival_firered_cerulean/ enable_deoxys_firered match_again_rival_firered_cerulean pokemon_fill_pp/
); );
my $SAVE_SIZE = 57344; my $SAVE_SIZE = 57344;
@ -109,6 +112,15 @@ sub parse_version_name {
) or die "Unsupported version"; ) or die "Unsupported version";
} }
sub pokemon_fill_pp($pokemon) {
# Not taking pp bonuses in account, work for other day.
for my $number_movement (0..3) {
my $movement_id = $pokemon->{substructures}[1]{movements}[$number_movement];
my $pp = get_move_attributes($movement_id)->{'pp'};
$pokemon->{substructures}[1]{pp}[$number_movement] = $pp;
}
}
sub pokemon_set_shiny { sub pokemon_set_shiny {
my $pokemon = shift; my $pokemon = shift;
$pokemon->{personality} = $pokemon->{personality} =

View File

@ -0,0 +1,370 @@
package Rsaves::Constants::MoveAttributes;
use v5.36.0;
use strict;
use warnings;
use Rsaves::Constants::Global;
use parent 'Exporter';
my $move_attributes = [];
$move_attributes->[$Rsaves::Constants::Global::MOVE_NONE]{pp} = 0;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POUND]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_KARATE_CHOP]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DOUBLE_SLAP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_COMET_PUNCH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEGA_PUNCH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PAY_DAY]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FIRE_PUNCH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ICE_PUNCH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THUNDER_PUNCH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SCRATCH]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_VICE_GRIP]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GUILLOTINE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RAZOR_WIND]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWORDS_DANCE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CUT]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GUST]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WING_ATTACK]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WHIRLWIND]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLY]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BIND]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLAM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_VINE_WHIP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STOMP]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DOUBLE_KICK]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEGA_KICK]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_JUMP_KICK]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROLLING_KICK]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SAND_ATTACK]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HEADBUTT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HORN_ATTACK]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FURY_ATTACK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HORN_DRILL]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TACKLE]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BODY_SLAM]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WRAP]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TAKE_DOWN]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THRASH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DOUBLE_EDGE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TAIL_WHIP]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POISON_STING]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TWINEEDLE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PIN_MISSILE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LEER]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BITE]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GROWL]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROAR]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SING]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUPERSONIC]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SONIC_BOOM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DISABLE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ACID]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EMBER]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLAMETHROWER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIST]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WATER_GUN]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYDRO_PUMP]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SURF]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ICE_BEAM]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BLIZZARD]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PSYBEAM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BUBBLE_BEAM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AURORA_BEAM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYPER_BEAM]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PECK]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DRILL_PECK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUBMISSION]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LOW_KICK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_COUNTER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SEISMIC_TOSS]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STRENGTH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ABSORB]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEGA_DRAIN]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LEECH_SEED]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GROWTH]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RAZOR_LEAF]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SOLAR_BEAM]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POISON_POWDER]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STUN_SPORE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLEEP_POWDER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PETAL_DANCE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STRING_SHOT]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DRAGON_RAGE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FIRE_SPIN]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THUNDER_SHOCK]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THUNDERBOLT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THUNDER_WAVE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THUNDER]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROCK_THROW]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EARTHQUAKE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FISSURE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DIG]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TOXIC]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CONFUSION]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PSYCHIC]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYPNOSIS]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEDITATE]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AGILITY]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_QUICK_ATTACK]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RAGE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TELEPORT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_NIGHT_SHADE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIMIC]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SCREECH]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DOUBLE_TEAM]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RECOVER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HARDEN]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MINIMIZE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SMOKESCREEN]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CONFUSE_RAY]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WITHDRAW]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DEFENSE_CURL]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BARRIER]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LIGHT_SCREEN]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HAZE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_REFLECT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FOCUS_ENERGY]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BIDE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_METRONOME]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIRROR_MOVE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SELF_DESTRUCT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EGG_BOMB]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LICK]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SMOG]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLUDGE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BONE_CLUB]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FIRE_BLAST]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WATERFALL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CLAMP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWIFT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SKULL_BASH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPIKE_CANNON]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CONSTRICT]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AMNESIA]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_KINESIS]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SOFT_BOILED]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HI_JUMP_KICK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GLARE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DREAM_EATER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POISON_GAS]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BARRAGE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LEECH_LIFE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LOVELY_KISS]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SKY_ATTACK]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TRANSFORM]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BUBBLE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DIZZY_PUNCH]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPORE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLASH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PSYWAVE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPLASH]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ACID_ARMOR]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CRABHAMMER]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EXPLOSION]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FURY_SWIPES]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BONEMERANG]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_REST]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROCK_SLIDE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYPER_FANG]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SHARPEN]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CONVERSION]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TRI_ATTACK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUPER_FANG]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLASH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUBSTITUTE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STRUGGLE]{pp} = 1;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SKETCH]{pp} = 1;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TRIPLE_KICK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_THIEF]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPIDER_WEB]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIND_READER]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_NIGHTMARE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLAME_WHEEL]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SNORE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CURSE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLAIL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CONVERSION_2]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AEROBLAST]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_COTTON_SPORE]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_REVERSAL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPITE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POWDER_SNOW]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PROTECT]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MACH_PUNCH]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SCARY_FACE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FAINT_ATTACK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWEET_KISS]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BELLY_DRUM]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLUDGE_BOMB]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MUD_SLAP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_OCTAZOOKA]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPIKES]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ZAP_CANNON]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FORESIGHT]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DESTINY_BOND]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PERISH_SONG]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ICY_WIND]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DETECT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BONE_RUSH]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LOCK_ON]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_OUTRAGE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SANDSTORM]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GIGA_DRAIN]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ENDURE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CHARM]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROLLOUT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FALSE_SWIPE]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWAGGER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MILK_DRINK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPARK]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FURY_CUTTER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STEEL_WING]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEAN_LOOK]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ATTRACT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLEEP_TALK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HEAL_BELL]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RETURN]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PRESENT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FRUSTRATION]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SAFEGUARD]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PAIN_SPLIT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SACRED_FIRE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MAGNITUDE]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DYNAMIC_PUNCH]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEGAHORN]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DRAGON_BREATH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BATON_PASS]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ENCORE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PURSUIT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RAPID_SPIN]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWEET_SCENT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_IRON_TAIL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_METAL_CLAW]{pp} = 35;
$move_attributes->[$Rsaves::Constants::Global::MOVE_VITAL_THROW]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MORNING_SUN]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SYNTHESIS]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MOONLIGHT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HIDDEN_POWER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CROSS_CHOP]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TWISTER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RAIN_DANCE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUNNY_DAY]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CRUNCH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIRROR_COAT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PSYCH_UP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EXTREME_SPEED]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ANCIENT_POWER]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SHADOW_BALL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FUTURE_SIGHT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROCK_SMASH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WHIRLPOOL]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BEAT_UP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FAKE_OUT]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_UPROAR]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_STOCKPILE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SPIT_UP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SWALLOW]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HEAT_WAVE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HAIL]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TORMENT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FLATTER]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WILL_O_WISP]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MEMENTO]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FACADE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FOCUS_PUNCH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SMELLING_SALT]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FOLLOW_ME]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_NATURE_POWER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CHARGE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TAUNT]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HELPING_HAND]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TRICK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROLE_PLAY]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WISH]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ASSIST]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_INGRAIN]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SUPERPOWER]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MAGIC_COAT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_RECYCLE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_REVENGE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BRICK_BREAK]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_YAWN]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_KNOCK_OFF]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ENDEAVOR]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ERUPTION]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SKILL_SWAP]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_IMPRISON]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_REFRESH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GRUDGE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SNATCH]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SECRET_POWER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DIVE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ARM_THRUST]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CAMOUFLAGE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TAIL_GLOW]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LUSTER_PURGE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MIST_BALL]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FEATHER_DANCE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TEETER_DANCE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BLAZE_KICK]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MUD_SPORT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ICE_BALL]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_NEEDLE_ARM]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SLACK_OFF]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYPER_VOICE]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POISON_FANG]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CRUSH_CLAW]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BLAST_BURN]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HYDRO_CANNON]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_METEOR_MASH]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ASTONISH]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WEATHER_BALL]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AROMATHERAPY]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FAKE_TEARS]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AIR_CUTTER]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_OVERHEAT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ODOR_SLEUTH]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROCK_TOMB]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SILVER_WIND]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_METAL_SOUND]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_GRASS_WHISTLE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_TICKLE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_COSMIC_POWER]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WATER_SPOUT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SIGNAL_BEAM]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SHADOW_PUNCH]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_EXTRASENSORY]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SKY_UPPERCUT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SAND_TOMB]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SHEER_COLD]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MUDDY_WATER]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BULLET_SEED]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_AERIAL_ACE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ICICLE_SPEAR]{pp} = 30;
$move_attributes->[$Rsaves::Constants::Global::MOVE_IRON_DEFENSE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BLOCK]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_HOWL]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DRAGON_CLAW]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_FRENZY_PLANT]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BULK_UP]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_BOUNCE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MUD_SHOT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_POISON_TAIL]{pp} = 25;
$move_attributes->[$Rsaves::Constants::Global::MOVE_COVET]{pp} = 40;
$move_attributes->[$Rsaves::Constants::Global::MOVE_VOLT_TACKLE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_MAGICAL_LEAF]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WATER_SPORT]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_CALM_MIND]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_LEAF_BLADE]{pp} = 15;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DRAGON_DANCE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_ROCK_BLAST]{pp} = 10;
$move_attributes->[$Rsaves::Constants::Global::MOVE_SHOCK_WAVE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_WATER_PULSE]{pp} = 20;
$move_attributes->[$Rsaves::Constants::Global::MOVE_DOOM_DESIRE]{pp} = 5;
$move_attributes->[$Rsaves::Constants::Global::MOVE_PSYCHO_BOOST]{pp} = 5;
sub get_move_attributes ($move_identifier) {
return $move_attributes->[$move_identifier];
}
our @EXPORT_OK = (qw/get_move_attributes/);

BIN
mudkip.gba Normal file

Binary file not shown.

BIN
mudkip.sav Normal file

Binary file not shown.

54
populate_moves.pl Normal file
View File

@ -0,0 +1,54 @@
#!/usr/bin/env perl
use v5.36.0;
use strict;
use warnings;
use feature 'signatures';
use Path::Tiny;
my $is_on_move = 0;
my $current_directory = path(__FILE__)->parent;
my $output_file = $current_directory->child('lib/Rsaves/Constants/MoveAttributes.pm');
open my $output, '>', $output_file;
open my $fh, '<', '/home/sergio/pokeruby/src/data/battle_moves.c';
my $move;
print $output <<'EOF';
package Rsaves::Constants::MoveAttributes;
use v5.36.0;
use strict;
use warnings;
use Rsaves::Constants::Global;
use parent 'Exporter';
my $move_attributes = [];
EOF
while (my $line = <$fh>) {
if ($line =~ /\[(\w+)\]\s+=\s+\{/) {
$is_on_move = 1;
$move = $1;
next;
}
next if !$is_on_move;
if ($line =~ /\.pp = (\d+)/) {
print $output "\$move_attributes->[\$Rsaves::Constants::Global::${move}]{pp} = $1;\n";
}
}
close $fh;
print $output <<'EOF';
sub get_move_attributes($move_identifier) {
return $move_attributes->[$move_identifier];
}
our @EXPORT_OK = (qw/get_move_attributes/);
EOF
close $output;
system 'perltidy', '-b', $output_file;