diff --git a/INSTALL.md b/INSTALL.md index b3ea173aa..25e4deda0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -236,13 +236,19 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for > This guide installs libpng via Homebrew as it is the easiest method, however advanced users can install libpng through other means if they so desire. +
+ Note for Apple Silicon (M1) Mac users... + +> Currently, Homebrew and libng must be installed via Rosetta on Apple Silicon Macs. Before continuing, create a [Terminal shell profile with Rosetta](https://www.astroworldcreations.com/blog/apple-silicon-and-legacy-command-line-software). Be sure to run the commands corresponding to Apple Silicon (M1). +
1. Open the Terminal. 2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website. 3. Run the following command to install libpng. ```bash - brew install libpng + brew install libpng # Intel Macs + /usr/local/bin/brew install libpng # Apple Silicon (M1) Macs ``` libpng is now installed. @@ -265,11 +271,14 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for ```bash export DEVKITPRO=/opt/devkitpro - echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc + echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc # Intel Macs + echo "export DEVKITPRO=$DEVKITPRO" >> ~/.zshrc # Apple Silicon (M1) Macs export DEVKITARM=$DEVKITPRO/devkitARM - echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc + echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc # Intel Macs + echo "export DEVKITARM=$DEVKITARM" >> ~/.zshrc # Apple Silicon (M1) Macs - echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile + echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile # Intel Macs + echo "if [ -f ~/.zshrc ]; then . ~/.zshrc; fi" >> ~/.zprofile # Apple Silicon (M1) Macs ``` ### Choosing where to store pokefirered (macOS) diff --git a/asm/macros.inc b/asm/macros.inc index 0e53dc2a2..ac7f5681f 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -1,7 +1,6 @@ .include "asm/macros/asm.inc" .include "asm/macros/function.inc" .include "asm/macros/movement.inc" - .include "asm/macros/pokemon_data.inc" .include "asm/macros/ec.inc" .include "asm/macros/map.inc" .include "asm/macros/m4a.inc" diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 612d45efa..0135bc26d 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1576,15 +1576,15 @@ .4byte \value .endm - @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party. - .macro setmoneventlegal slot:req + @ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party. + .macro setmonmodernfatefulencounter slot:req .byte 0xcd .2byte \slot .endm - @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, + @ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, @ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. - .macro checkmoneventlegal slot:req + .macro checkmonmodernfatefulencounter slot:req .byte 0xce .2byte \slot .endm @@ -1849,10 +1849,10 @@ call EventScript_BrailleCursorWaitButton .endm - @ Creates an "event legal" Pokémon for an encounter + @ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter .macro seteventmon species:req, level:req, item=ITEM_NONE setvar VAR_0x8004, \species setvar VAR_0x8005, \level setvar VAR_0x8006, \item - special CreateEventLegalEnemyMon + special CreateEnemyEventMon .endm diff --git a/asm/macros/map.inc b/asm/macros/map.inc index ceaa383b4..83ef472c9 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -75,6 +75,12 @@ inc _num_traps .endm + @ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL. + @ NOTE: In FRLG, the weather handling functions are dummied out. See src/coord_event_weather.c + .macro coord_weather_event x:req, y:req, elevation:req, weather:req + coord_event \x, \y, \elevation, \weather, 0, NULL + .endm + @ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h @ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h). @ 'arg6' is used differently depending on the bg event type. 'arg7' and 'arg8' are only used by bg_hidden_item_event. diff --git a/asm/macros/pokemon_data.inc b/asm/macros/pokemon_data.inc deleted file mode 100644 index b0a5f22e3..000000000 --- a/asm/macros/pokemon_data.inc +++ /dev/null @@ -1,57 +0,0 @@ - .macro pokedex_entry pokemon_name, height, weight, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset - .2byte \height @ in decimeters - .2byte \weight @ in hectograms - .4byte DexDescription_\pokemon_name\()_1 - .4byte DexDescription_\pokemon_name\()_2 - .2byte 0 @ unused - .2byte \pokemon_scale - .2byte \pokemon_offset - .2byte \trainer_scale - .2byte \trainer_offset - .2byte 0 @ padding - .endm - - .macro base_stats hp, attack, defense, speed, sp_attack, sp_defense - .byte \hp - .byte \attack - .byte \defense - .byte \speed - .byte \sp_attack - .byte \sp_defense - .endm - - .macro ev_yield hp, attack, defense, speed, sp_attack, sp_defense - .2byte (\sp_defense << 10) | (\sp_attack << 8) | (\speed << 6) | (\defense << 4) | (\attack << 2) | \hp - .endm - - .macro level_up_move level, move - .2byte (\level << 9) | \move - .endm - - .macro evo_entry method, parameter, target_species - .2byte \method - .2byte \parameter - .2byte \target_species - .2byte 0 @ padding - .endm - - .macro empty_evo_entries count - .fill 8 * \count, 1, 0 - .endm - - .macro egg_moves_begin species - .2byte 20000 + \species - .endm - -@ If the min level equals the max level, only one level argument is needed. - .macro wild_mon species, min_level, max_level - .byte \min_level - - .ifb \max_level - .byte \min_level - .else - .byte \max_level - .endif - - .2byte SPECIES_\species - .endm diff --git a/data/mystery_event_msg.s b/data/mystery_event_msg.s index d4fe7faf2..535c530f1 100644 --- a/data/mystery_event_msg.s +++ b/data/mystery_event_msg.s @@ -7,6 +7,7 @@ #include "constants/species.h" #include "constants/vars.h" #include "constants/items.h" +#include "constants/region_map_sections.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .include "constants/constants.inc" @@ -67,8 +68,8 @@ SurfPichu_FullParty: SurfPichu_GiveEgg: giveegg SPECIES_PICHU - setmoneventlegal VAR_EVENT_PICHU_SLOT - setmonmetlocation VAR_EVENT_PICHU_SLOT, 0xff + setmonmodernfatefulencounter VAR_EVENT_PICHU_SLOT + setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER vgoto_if_eq VAR_EVENT_PICHU_SLOT, 1, SurfPichu_Slot1 vgoto_if_eq VAR_EVENT_PICHU_SLOT, 2, SurfPichu_Slot2 vgoto_if_eq VAR_EVENT_PICHU_SLOT, 3, SurfPichu_Slot3 diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index c73c0bb87..6cb2bed8f 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -1,219 +1,219 @@ .align 2 gScriptCmdTable:: - .4byte ScrCmd_nop @ 0x00 - .4byte ScrCmd_nop1 @ 0x01 - .4byte ScrCmd_end @ 0x02 - .4byte ScrCmd_return @ 0x03 - .4byte ScrCmd_call @ 0x04 - .4byte ScrCmd_goto @ 0x05 - .4byte ScrCmd_goto_if @ 0x06 - .4byte ScrCmd_call_if @ 0x07 - .4byte ScrCmd_gotostd @ 0x08 - .4byte ScrCmd_callstd @ 0x09 - .4byte ScrCmd_gotostd_if @ 0x0a - .4byte ScrCmd_callstd_if @ 0x0b - .4byte ScrCmd_returnram @ 0x0c - .4byte ScrCmd_endram @ 0x0d - .4byte ScrCmd_setmysteryeventstatus @ 0x0e - .4byte ScrCmd_loadword @ 0x0f - .4byte ScrCmd_loadbyte @ 0x10 - .4byte ScrCmd_setptr @ 0x11 - .4byte ScrCmd_loadbytefromptr @ 0x12 - .4byte ScrCmd_setptrbyte @ 0x13 - .4byte ScrCmd_copylocal @ 0x14 - .4byte ScrCmd_copybyte @ 0x15 - .4byte ScrCmd_setvar @ 0x16 - .4byte ScrCmd_addvar @ 0x17 - .4byte ScrCmd_subvar @ 0x18 - .4byte ScrCmd_copyvar @ 0x19 - .4byte ScrCmd_setorcopyvar @ 0x1a - .4byte ScrCmd_compare_local_to_local @ 0x1b - .4byte ScrCmd_compare_local_to_value @ 0x1c - .4byte ScrCmd_compare_local_to_ptr @ 0x1d - .4byte ScrCmd_compare_ptr_to_local @ 0x1e - .4byte ScrCmd_compare_ptr_to_value @ 0x1f - .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 - .4byte ScrCmd_compare_var_to_value @ 0x21 - .4byte ScrCmd_compare_var_to_var @ 0x22 - .4byte ScrCmd_callnative @ 0x23 - .4byte ScrCmd_gotonative @ 0x24 - .4byte ScrCmd_special @ 0x25 - .4byte ScrCmd_specialvar @ 0x26 - .4byte ScrCmd_waitstate @ 0x27 - .4byte ScrCmd_delay @ 0x28 - .4byte ScrCmd_setflag @ 0x29 - .4byte ScrCmd_clearflag @ 0x2a - .4byte ScrCmd_checkflag @ 0x2b - .4byte ScrCmd_initclock @ 0x2c - .4byte ScrCmd_dotimebasedevents @ 0x2d - .4byte ScrCmd_gettime @ 0x2e - .4byte ScrCmd_playse @ 0x2f - .4byte ScrCmd_waitse @ 0x30 - .4byte ScrCmd_playfanfare @ 0x31 - .4byte ScrCmd_waitfanfare @ 0x32 - .4byte ScrCmd_playbgm @ 0x33 - .4byte ScrCmd_savebgm @ 0x34 - .4byte ScrCmd_fadedefaultbgm @ 0x35 - .4byte ScrCmd_fadenewbgm @ 0x36 - .4byte ScrCmd_fadeoutbgm @ 0x37 - .4byte ScrCmd_fadeinbgm @ 0x38 - .4byte ScrCmd_warp @ 0x39 - .4byte ScrCmd_warpsilent @ 0x3a - .4byte ScrCmd_warpdoor @ 0x3b - .4byte ScrCmd_warphole @ 0x3c - .4byte ScrCmd_warpteleport @ 0x3d - .4byte ScrCmd_setwarp @ 0x3e - .4byte ScrCmd_setdynamicwarp @ 0x3f - .4byte ScrCmd_setdivewarp @ 0x40 - .4byte ScrCmd_setholewarp @ 0x41 - .4byte ScrCmd_getplayerxy @ 0x42 - .4byte ScrCmd_getpartysize @ 0x43 - .4byte ScrCmd_additem @ 0x44 - .4byte ScrCmd_removeitem @ 0x45 - .4byte ScrCmd_checkitemspace @ 0x46 - .4byte ScrCmd_checkitem @ 0x47 - .4byte ScrCmd_checkitemtype @ 0x48 - .4byte ScrCmd_addpcitem @ 0x49 - .4byte ScrCmd_checkpcitem @ 0x4a - .4byte ScrCmd_adddecoration @ 0x4b - .4byte ScrCmd_removedecoration @ 0x4c - .4byte ScrCmd_checkdecor @ 0x4d - .4byte ScrCmd_checkdecorspace @ 0x4e - .4byte ScrCmd_applymovement @ 0x4f - .4byte ScrCmd_applymovementat @ 0x50 - .4byte ScrCmd_waitmovement @ 0x51 - .4byte ScrCmd_waitmovementat @ 0x52 - .4byte ScrCmd_removeobject @ 0x53 - .4byte ScrCmd_removeobjectat @ 0x54 - .4byte ScrCmd_addobject @ 0x55 - .4byte ScrCmd_addobjectat @ 0x56 - .4byte ScrCmd_setobjectxy @ 0x57 - .4byte ScrCmd_showobjectat @ 0x58 - .4byte ScrCmd_hideobjectat @ 0x59 - .4byte ScrCmd_faceplayer @ 0x5a - .4byte ScrCmd_turnobject @ 0x5b - .4byte ScrCmd_trainerbattle @ 0x5c - .4byte ScrCmd_dotrainerbattle @ 0x5d - .4byte ScrCmd_gotopostbattlescript @ 0x5e - .4byte ScrCmd_gotobeatenscript @ 0x5f - .4byte ScrCmd_checktrainerflag @ 0x60 - .4byte ScrCmd_settrainerflag @ 0x61 - .4byte ScrCmd_cleartrainerflag @ 0x62 - .4byte ScrCmd_setobjectxyperm @ 0x63 - .4byte ScrCmd_copyobjectxytoperm @ 0x64 - .4byte ScrCmd_setobjectmovementtype @ 0x65 - .4byte ScrCmd_waitmessage @ 0x66 - .4byte ScrCmd_message @ 0x67 - .4byte ScrCmd_closemessage @ 0x68 - .4byte ScrCmd_lockall @ 0x69 - .4byte ScrCmd_lock @ 0x6a - .4byte ScrCmd_releaseall @ 0x6b - .4byte ScrCmd_release @ 0x6c - .4byte ScrCmd_waitbuttonpress @ 0x6d - .4byte ScrCmd_yesnobox @ 0x6e - .4byte ScrCmd_multichoice @ 0x6f - .4byte ScrCmd_multichoicedefault @ 0x70 - .4byte ScrCmd_multichoicegrid @ 0x71 - .4byte ScrCmd_drawbox @ 0x72 - .4byte ScrCmd_erasebox @ 0x73 - .4byte ScrCmd_drawboxtext @ 0x74 - .4byte ScrCmd_showmonpic @ 0x75 - .4byte ScrCmd_hidemonpic @ 0x76 - .4byte ScrCmd_showcontestpainting @ 0x77 - .4byte ScrCmd_braillemessage @ 0x78 - .4byte ScrCmd_givemon @ 0x79 - .4byte ScrCmd_giveegg @ 0x7a - .4byte ScrCmd_setmonmove @ 0x7b - .4byte ScrCmd_checkpartymove @ 0x7c - .4byte ScrCmd_bufferspeciesname @ 0x7d - .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e - .4byte ScrCmd_bufferpartymonnick @ 0x7f - .4byte ScrCmd_bufferitemname @ 0x80 - .4byte ScrCmd_bufferdecorationname @ 0x81 - .4byte ScrCmd_buffermovename @ 0x82 - .4byte ScrCmd_buffernumberstring @ 0x83 - .4byte ScrCmd_bufferstdstring @ 0x84 - .4byte ScrCmd_bufferstring @ 0x85 - .4byte ScrCmd_pokemart @ 0x86 - .4byte ScrCmd_pokemartdecoration @ 0x87 - .4byte ScrCmd_pokemartdecoration2 @ 0x88 - .4byte ScrCmd_playslotmachine @ 0x8 - .4byte ScrCmd_setberrytree @ 0x8a - .4byte ScrCmd_choosecontestmon @ 0x8b - .4byte ScrCmd_startcontest @ 0x8c - .4byte ScrCmd_showcontestresults @ 0x8d - .4byte ScrCmd_contestlinktransfer @ 0x8e - .4byte ScrCmd_random @ 0x8f - .4byte ScrCmd_addmoney @ 0x90 - .4byte ScrCmd_removemoney @ 0x91 - .4byte ScrCmd_checkmoney @ 0x92 - .4byte ScrCmd_showmoneybox @ 0x93 - .4byte ScrCmd_hidemoneybox @ 0x94 - .4byte ScrCmd_updatemoneybox @ 0x95 - .4byte ScrCmd_getpokenewsactive @ 0x96 - .4byte ScrCmd_fadescreen @ 0x97 - .4byte ScrCmd_fadescreenspeed @ 0x98 - .4byte ScrCmd_setflashlevel @ 0x99 - .4byte ScrCmd_animateflash @ 0x9a - .4byte ScrCmd_messageautoscroll @ 0x9b - .4byte ScrCmd_dofieldeffect @ 0x9c - .4byte ScrCmd_setfieldeffectargument @ 0x9d - .4byte ScrCmd_waitfieldeffect @ 0x9e - .4byte ScrCmd_setrespawn @ 0x9f - .4byte ScrCmd_checkplayergender @ 0xa0 - .4byte ScrCmd_playmoncry @ 0xa1 - .4byte ScrCmd_setmetatile @ 0xa2 - .4byte ScrCmd_resetweather @ 0xa3 - .4byte ScrCmd_setweather @ 0xa4 - .4byte ScrCmd_doweather @ 0xa5 - .4byte ScrCmd_setstepcallback @ 0xa6 - .4byte ScrCmd_setmaplayoutindex @ 0xa7 - .4byte ScrCmd_setobjectsubpriority @ 0xa8 - .4byte ScrCmd_resetobjectsubpriority @ 0xa9 - .4byte ScrCmd_createvobject @ 0xaa - .4byte ScrCmd_turnvobject @ 0xab - .4byte ScrCmd_opendoor @ 0xac - .4byte ScrCmd_closedoor @ 0xad - .4byte ScrCmd_waitdooranim @ 0xae - .4byte ScrCmd_setdooropen @ 0xaf - .4byte ScrCmd_setdoorclosed @ 0xb0 - .4byte ScrCmd_addelevmenuitem @ 0xb1 - .4byte ScrCmd_showelevmenu @ 0xb2 - .4byte ScrCmd_checkcoins @ 0xb3 - .4byte ScrCmd_addcoins @ 0xb4 - .4byte ScrCmd_removecoins @ 0xb5 - .4byte ScrCmd_setwildbattle @ 0xb6 - .4byte ScrCmd_dowildbattle @ 0xb7 - .4byte ScrCmd_setvaddress @ 0xb8 - .4byte ScrCmd_vgoto @ 0xb9 - .4byte ScrCmd_vcall @ 0xba - .4byte ScrCmd_vgoto_if @ 0xbb - .4byte ScrCmd_vcall_if @ 0xbc - .4byte ScrCmd_vmessage @ 0xbd - .4byte ScrCmd_vbuffermessage @ 0xbe - .4byte ScrCmd_vbufferstring @ 0xbf - .4byte ScrCmd_showcoinsbox @ 0xc0 - .4byte ScrCmd_hidecoinsbox @ 0xc1 - .4byte ScrCmd_updatecoinsbox @ 0xc2 - .4byte ScrCmd_incrementgamestat @ 0xc3 - .4byte ScrCmd_setescapewarp @ 0xc4 - .4byte ScrCmd_waitmoncry @ 0xc5 - .4byte ScrCmd_bufferboxname @ 0xc6 - .4byte ScrCmd_textcolor @ 0xc7 - .4byte ScrCmd_loadhelp @ 0xc8 - .4byte ScrCmd_unloadhelp @ 0xc9 - .4byte ScrCmd_signmsg @ 0xca - .4byte ScrCmd_normalmsg @ 0xcb - .4byte ScrCmd_comparestat @ 0xcc - .4byte ScrCmd_setmoneventlegal @ 0xcd - .4byte ScrCmd_checkmoneventlegal @ 0xce - .4byte ScrCmd_trywondercardscript @ 0xcf - .4byte ScrCmd_setworldmapflag @ 0xd0 - .4byte ScrCmd_warpspinenter @ 0xd1 - .4byte ScrCmd_setmonmetlocation @ 0xd2 - .4byte ScrCmd_getbraillestringwidth @ 0xd3 - .4byte ScrCmd_bufferitemnameplural @ 0xd4 + .4byte ScrCmd_nop @ 0x00 + .4byte ScrCmd_nop1 @ 0x01 + .4byte ScrCmd_end @ 0x02 + .4byte ScrCmd_return @ 0x03 + .4byte ScrCmd_call @ 0x04 + .4byte ScrCmd_goto @ 0x05 + .4byte ScrCmd_goto_if @ 0x06 + .4byte ScrCmd_call_if @ 0x07 + .4byte ScrCmd_gotostd @ 0x08 + .4byte ScrCmd_callstd @ 0x09 + .4byte ScrCmd_gotostd_if @ 0x0a + .4byte ScrCmd_callstd_if @ 0x0b + .4byte ScrCmd_returnram @ 0x0c + .4byte ScrCmd_endram @ 0x0d + .4byte ScrCmd_setmysteryeventstatus @ 0x0e + .4byte ScrCmd_loadword @ 0x0f + .4byte ScrCmd_loadbyte @ 0x10 + .4byte ScrCmd_setptr @ 0x11 + .4byte ScrCmd_loadbytefromptr @ 0x12 + .4byte ScrCmd_setptrbyte @ 0x13 + .4byte ScrCmd_copylocal @ 0x14 + .4byte ScrCmd_copybyte @ 0x15 + .4byte ScrCmd_setvar @ 0x16 + .4byte ScrCmd_addvar @ 0x17 + .4byte ScrCmd_subvar @ 0x18 + .4byte ScrCmd_copyvar @ 0x19 + .4byte ScrCmd_setorcopyvar @ 0x1a + .4byte ScrCmd_compare_local_to_local @ 0x1b + .4byte ScrCmd_compare_local_to_value @ 0x1c + .4byte ScrCmd_compare_local_to_ptr @ 0x1d + .4byte ScrCmd_compare_ptr_to_local @ 0x1e + .4byte ScrCmd_compare_ptr_to_value @ 0x1f + .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 + .4byte ScrCmd_compare_var_to_value @ 0x21 + .4byte ScrCmd_compare_var_to_var @ 0x22 + .4byte ScrCmd_callnative @ 0x23 + .4byte ScrCmd_gotonative @ 0x24 + .4byte ScrCmd_special @ 0x25 + .4byte ScrCmd_specialvar @ 0x26 + .4byte ScrCmd_waitstate @ 0x27 + .4byte ScrCmd_delay @ 0x28 + .4byte ScrCmd_setflag @ 0x29 + .4byte ScrCmd_clearflag @ 0x2a + .4byte ScrCmd_checkflag @ 0x2b + .4byte ScrCmd_initclock @ 0x2c + .4byte ScrCmd_dotimebasedevents @ 0x2d + .4byte ScrCmd_gettime @ 0x2e + .4byte ScrCmd_playse @ 0x2f + .4byte ScrCmd_waitse @ 0x30 + .4byte ScrCmd_playfanfare @ 0x31 + .4byte ScrCmd_waitfanfare @ 0x32 + .4byte ScrCmd_playbgm @ 0x33 + .4byte ScrCmd_savebgm @ 0x34 + .4byte ScrCmd_fadedefaultbgm @ 0x35 + .4byte ScrCmd_fadenewbgm @ 0x36 + .4byte ScrCmd_fadeoutbgm @ 0x37 + .4byte ScrCmd_fadeinbgm @ 0x38 + .4byte ScrCmd_warp @ 0x39 + .4byte ScrCmd_warpsilent @ 0x3a + .4byte ScrCmd_warpdoor @ 0x3b + .4byte ScrCmd_warphole @ 0x3c + .4byte ScrCmd_warpteleport @ 0x3d + .4byte ScrCmd_setwarp @ 0x3e + .4byte ScrCmd_setdynamicwarp @ 0x3f + .4byte ScrCmd_setdivewarp @ 0x40 + .4byte ScrCmd_setholewarp @ 0x41 + .4byte ScrCmd_getplayerxy @ 0x42 + .4byte ScrCmd_getpartysize @ 0x43 + .4byte ScrCmd_additem @ 0x44 + .4byte ScrCmd_removeitem @ 0x45 + .4byte ScrCmd_checkitemspace @ 0x46 + .4byte ScrCmd_checkitem @ 0x47 + .4byte ScrCmd_checkitemtype @ 0x48 + .4byte ScrCmd_addpcitem @ 0x49 + .4byte ScrCmd_checkpcitem @ 0x4a + .4byte ScrCmd_adddecoration @ 0x4b + .4byte ScrCmd_removedecoration @ 0x4c + .4byte ScrCmd_checkdecor @ 0x4d + .4byte ScrCmd_checkdecorspace @ 0x4e + .4byte ScrCmd_applymovement @ 0x4f + .4byte ScrCmd_applymovementat @ 0x50 + .4byte ScrCmd_waitmovement @ 0x51 + .4byte ScrCmd_waitmovementat @ 0x52 + .4byte ScrCmd_removeobject @ 0x53 + .4byte ScrCmd_removeobjectat @ 0x54 + .4byte ScrCmd_addobject @ 0x55 + .4byte ScrCmd_addobjectat @ 0x56 + .4byte ScrCmd_setobjectxy @ 0x57 + .4byte ScrCmd_showobjectat @ 0x58 + .4byte ScrCmd_hideobjectat @ 0x59 + .4byte ScrCmd_faceplayer @ 0x5a + .4byte ScrCmd_turnobject @ 0x5b + .4byte ScrCmd_trainerbattle @ 0x5c + .4byte ScrCmd_dotrainerbattle @ 0x5d + .4byte ScrCmd_gotopostbattlescript @ 0x5e + .4byte ScrCmd_gotobeatenscript @ 0x5f + .4byte ScrCmd_checktrainerflag @ 0x60 + .4byte ScrCmd_settrainerflag @ 0x61 + .4byte ScrCmd_cleartrainerflag @ 0x62 + .4byte ScrCmd_setobjectxyperm @ 0x63 + .4byte ScrCmd_copyobjectxytoperm @ 0x64 + .4byte ScrCmd_setobjectmovementtype @ 0x65 + .4byte ScrCmd_waitmessage @ 0x66 + .4byte ScrCmd_message @ 0x67 + .4byte ScrCmd_closemessage @ 0x68 + .4byte ScrCmd_lockall @ 0x69 + .4byte ScrCmd_lock @ 0x6a + .4byte ScrCmd_releaseall @ 0x6b + .4byte ScrCmd_release @ 0x6c + .4byte ScrCmd_waitbuttonpress @ 0x6d + .4byte ScrCmd_yesnobox @ 0x6e + .4byte ScrCmd_multichoice @ 0x6f + .4byte ScrCmd_multichoicedefault @ 0x70 + .4byte ScrCmd_multichoicegrid @ 0x71 + .4byte ScrCmd_drawbox @ 0x72 + .4byte ScrCmd_erasebox @ 0x73 + .4byte ScrCmd_drawboxtext @ 0x74 + .4byte ScrCmd_showmonpic @ 0x75 + .4byte ScrCmd_hidemonpic @ 0x76 + .4byte ScrCmd_showcontestpainting @ 0x77 + .4byte ScrCmd_braillemessage @ 0x78 + .4byte ScrCmd_givemon @ 0x79 + .4byte ScrCmd_giveegg @ 0x7a + .4byte ScrCmd_setmonmove @ 0x7b + .4byte ScrCmd_checkpartymove @ 0x7c + .4byte ScrCmd_bufferspeciesname @ 0x7d + .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e + .4byte ScrCmd_bufferpartymonnick @ 0x7f + .4byte ScrCmd_bufferitemname @ 0x80 + .4byte ScrCmd_bufferdecorationname @ 0x81 + .4byte ScrCmd_buffermovename @ 0x82 + .4byte ScrCmd_buffernumberstring @ 0x83 + .4byte ScrCmd_bufferstdstring @ 0x84 + .4byte ScrCmd_bufferstring @ 0x85 + .4byte ScrCmd_pokemart @ 0x86 + .4byte ScrCmd_pokemartdecoration @ 0x87 + .4byte ScrCmd_pokemartdecoration2 @ 0x88 + .4byte ScrCmd_playslotmachine @ 0x8 + .4byte ScrCmd_setberrytree @ 0x8a + .4byte ScrCmd_choosecontestmon @ 0x8b + .4byte ScrCmd_startcontest @ 0x8c + .4byte ScrCmd_showcontestresults @ 0x8d + .4byte ScrCmd_contestlinktransfer @ 0x8e + .4byte ScrCmd_random @ 0x8f + .4byte ScrCmd_addmoney @ 0x90 + .4byte ScrCmd_removemoney @ 0x91 + .4byte ScrCmd_checkmoney @ 0x92 + .4byte ScrCmd_showmoneybox @ 0x93 + .4byte ScrCmd_hidemoneybox @ 0x94 + .4byte ScrCmd_updatemoneybox @ 0x95 + .4byte ScrCmd_getpokenewsactive @ 0x96 + .4byte ScrCmd_fadescreen @ 0x97 + .4byte ScrCmd_fadescreenspeed @ 0x98 + .4byte ScrCmd_setflashlevel @ 0x99 + .4byte ScrCmd_animateflash @ 0x9a + .4byte ScrCmd_messageautoscroll @ 0x9b + .4byte ScrCmd_dofieldeffect @ 0x9c + .4byte ScrCmd_setfieldeffectargument @ 0x9d + .4byte ScrCmd_waitfieldeffect @ 0x9e + .4byte ScrCmd_setrespawn @ 0x9f + .4byte ScrCmd_checkplayergender @ 0xa0 + .4byte ScrCmd_playmoncry @ 0xa1 + .4byte ScrCmd_setmetatile @ 0xa2 + .4byte ScrCmd_resetweather @ 0xa3 + .4byte ScrCmd_setweather @ 0xa4 + .4byte ScrCmd_doweather @ 0xa5 + .4byte ScrCmd_setstepcallback @ 0xa6 + .4byte ScrCmd_setmaplayoutindex @ 0xa7 + .4byte ScrCmd_setobjectsubpriority @ 0xa8 + .4byte ScrCmd_resetobjectsubpriority @ 0xa9 + .4byte ScrCmd_createvobject @ 0xaa + .4byte ScrCmd_turnvobject @ 0xab + .4byte ScrCmd_opendoor @ 0xac + .4byte ScrCmd_closedoor @ 0xad + .4byte ScrCmd_waitdooranim @ 0xae + .4byte ScrCmd_setdooropen @ 0xaf + .4byte ScrCmd_setdoorclosed @ 0xb0 + .4byte ScrCmd_addelevmenuitem @ 0xb1 + .4byte ScrCmd_showelevmenu @ 0xb2 + .4byte ScrCmd_checkcoins @ 0xb3 + .4byte ScrCmd_addcoins @ 0xb4 + .4byte ScrCmd_removecoins @ 0xb5 + .4byte ScrCmd_setwildbattle @ 0xb6 + .4byte ScrCmd_dowildbattle @ 0xb7 + .4byte ScrCmd_setvaddress @ 0xb8 + .4byte ScrCmd_vgoto @ 0xb9 + .4byte ScrCmd_vcall @ 0xba + .4byte ScrCmd_vgoto_if @ 0xbb + .4byte ScrCmd_vcall_if @ 0xbc + .4byte ScrCmd_vmessage @ 0xbd + .4byte ScrCmd_vbuffermessage @ 0xbe + .4byte ScrCmd_vbufferstring @ 0xbf + .4byte ScrCmd_showcoinsbox @ 0xc0 + .4byte ScrCmd_hidecoinsbox @ 0xc1 + .4byte ScrCmd_updatecoinsbox @ 0xc2 + .4byte ScrCmd_incrementgamestat @ 0xc3 + .4byte ScrCmd_setescapewarp @ 0xc4 + .4byte ScrCmd_waitmoncry @ 0xc5 + .4byte ScrCmd_bufferboxname @ 0xc6 + .4byte ScrCmd_textcolor @ 0xc7 + .4byte ScrCmd_loadhelp @ 0xc8 + .4byte ScrCmd_unloadhelp @ 0xc9 + .4byte ScrCmd_signmsg @ 0xca + .4byte ScrCmd_normalmsg @ 0xcb + .4byte ScrCmd_comparestat @ 0xcc + .4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd + .4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce + .4byte ScrCmd_trywondercardscript @ 0xcf + .4byte ScrCmd_setworldmapflag @ 0xd0 + .4byte ScrCmd_warpspinenter @ 0xd1 + .4byte ScrCmd_setmonmetlocation @ 0xd2 + .4byte ScrCmd_getbraillestringwidth @ 0xd3 + .4byte ScrCmd_bufferitemnameplural @ 0xd4 gScriptCmdTableEnd:: .4byte ScrCmd_nop diff --git a/data/specials.inc b/data/specials.inc index be6e3d575..059f29015 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -451,5 +451,5 @@ gSpecials:: def_special InitElevatorFloorSelectMenuPos def_special UpdateLoreleiDollCollection def_special LoopWingFlapSound - def_special CreateEventLegalEnemyMon + def_special CreateEnemyEventMon gSpecialsEnd:: diff --git a/graphics/unknown/unknown_E7CFB0.bin b/graphics/battle_anims/backgrounds/solarbeam.bin similarity index 100% rename from graphics/unknown/unknown_E7CFB0.bin rename to graphics/battle_anims/backgrounds/solarbeam.bin diff --git a/graphics/battle_anims/masks/unknown_D2EC24.bin b/graphics/battle_anims/masks/unused_level_up.bin similarity index 100% rename from graphics/battle_anims/masks/unknown_D2EC24.bin rename to graphics/battle_anims/masks/unused_level_up.bin diff --git a/graphics/battle_anims/masks/unknown_D2EC24.png b/graphics/battle_anims/masks/unused_level_up.png similarity index 100% rename from graphics/battle_anims/masks/unknown_D2EC24.png rename to graphics/battle_anims/masks/unused_level_up.png diff --git a/graphics/battle_anims/sprites/black_ball.pal b/graphics/battle_anims/sprites/black_ball.pal new file mode 100644 index 000000000..57e320140 --- /dev/null +++ b/graphics/battle_anims/sprites/black_ball.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 205 98 +156 205 98 +156 205 98 +131 205 131 +156 205 0 +24 0 106 +156 8 98 +0 213 131 +24 197 0 +164 8 106 +156 8 98 +164 8 106 +156 205 131 +24 213 98 +156 8 106 +164 205 98 diff --git a/graphics/battle_anims/unk_83E6C18.pal b/graphics/battle_anims/unused/flying.pal similarity index 100% rename from graphics/battle_anims/unk_83E6C18.pal rename to graphics/battle_anims/unused/flying.pal diff --git a/graphics/unknown/unknown_D1BE74.bin b/graphics/battle_anims/unused/lights.bin similarity index 100% rename from graphics/unknown/unknown_D1BE74.bin rename to graphics/battle_anims/unused/lights.bin diff --git a/graphics/unknown/unknown_D1BE74.png b/graphics/battle_anims/unused/lights.png similarity index 100% rename from graphics/unknown/unknown_D1BE74.png rename to graphics/battle_anims/unused/lights.png diff --git a/graphics/unused/line_sketch_2.bin b/graphics/battle_anims/unused/line_sketch_2.bin similarity index 100% rename from graphics/unused/line_sketch_2.bin rename to graphics/battle_anims/unused/line_sketch_2.bin diff --git a/graphics/battle_anims/unused/line_sketch_2.pal b/graphics/battle_anims/unused/line_sketch_2.pal new file mode 100644 index 000000000..17cce5c65 --- /dev/null +++ b/graphics/battle_anims/unused/line_sketch_2.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 255 +0 255 255 +148 255 255 +148 205 255 +148 156 255 +0 0 0 +0 0 0 +0 0 0 +255 0 8 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 diff --git a/graphics/unused/line_sketch_2.png b/graphics/battle_anims/unused/line_sketch_2.png similarity index 100% rename from graphics/unused/line_sketch_2.png rename to graphics/battle_anims/unused/line_sketch_2.png diff --git a/graphics/unknown/unknown_D06D80.png b/graphics/battle_anims/unused/spinning_ball.png similarity index 100% rename from graphics/unknown/unknown_D06D80.png rename to graphics/battle_anims/unused/spinning_ball.png diff --git a/graphics/unknown/unknown_D06D80_2.pal b/graphics/battle_anims/unused/spinning_ball_2.pal similarity index 100% rename from graphics/unknown/unknown_D06D80_2.pal rename to graphics/battle_anims/unused/spinning_ball_2.pal diff --git a/graphics/battle_anims/unk_83FF33C.pal b/graphics/battle_anims/unused/unknown.pal similarity index 100% rename from graphics/battle_anims/unk_83FF33C.pal rename to graphics/battle_anims/unused/unknown.pal diff --git a/graphics/unknown/unknown_D0CA04.bin b/graphics/battle_anims/unused/unknown_1.bin similarity index 100% rename from graphics/unknown/unknown_D0CA04.bin rename to graphics/battle_anims/unused/unknown_1.bin diff --git a/graphics/unknown/unknown_D0CA28.bin b/graphics/battle_anims/unused/unknown_2.bin similarity index 100% rename from graphics/unknown/unknown_D0CA28.bin rename to graphics/battle_anims/unused/unknown_2.bin diff --git a/graphics/unknown/unknown_D0CA4C.bin b/graphics/battle_anims/unused/unknown_3.bin similarity index 100% rename from graphics/unknown/unknown_D0CA4C.bin rename to graphics/battle_anims/unused/unknown_3.bin diff --git a/graphics/unknown/unknown_D0CD0C.bin b/graphics/battle_anims/unused/unknown_4.bin similarity index 100% rename from graphics/unknown/unknown_D0CD0C.bin rename to graphics/battle_anims/unused/unknown_4.bin diff --git a/graphics/battle_anims/unk_83E4874.bin b/graphics/battle_anims/unused/water.bin similarity index 100% rename from graphics/battle_anims/unk_83E4874.bin rename to graphics/battle_anims/unused/water.bin diff --git a/graphics/battle_anims/unk_83E44F4.png b/graphics/battle_anims/unused/water.png similarity index 100% rename from graphics/battle_anims/unk_83E44F4.png rename to graphics/battle_anims/unused/water.png diff --git a/graphics/berry_fix/gba_small.pal b/graphics/berry_fix/gba_small.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_small.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_small.png b/graphics/berry_fix/gba_small.png index 63f79cb49..f11146c4e 100644 Binary files a/graphics/berry_fix/gba_small.png and b/graphics/berry_fix/gba_small.png differ diff --git a/graphics/berry_fix/gba_transfer.pal b/graphics/berry_fix/gba_transfer.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_transfer.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_transfer.png b/graphics/berry_fix/gba_transfer.png index f8d49db21..920bd504f 100644 Binary files a/graphics/berry_fix/gba_transfer.png and b/graphics/berry_fix/gba_transfer.png differ diff --git a/graphics/berry_fix/gba_transfer_error.pal b/graphics/berry_fix/gba_transfer_error.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_transfer_error.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_transfer_error.png b/graphics/berry_fix/gba_transfer_error.png index 6c5f69ff5..389fa8cab 100644 Binary files a/graphics/berry_fix/gba_transfer_error.png and b/graphics/berry_fix/gba_transfer_error.png differ diff --git a/graphics/berry_fix/gba_transfer_highlight.pal b/graphics/berry_fix/gba_transfer_highlight.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_transfer_highlight.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_transfer_highlight.png b/graphics/berry_fix/gba_transfer_highlight.png index e763bd62b..1c98f1d70 100644 Binary files a/graphics/berry_fix/gba_transfer_highlight.png and b/graphics/berry_fix/gba_transfer_highlight.png differ diff --git a/graphics/berry_fix/logo.pal b/graphics/berry_fix/logo.pal deleted file mode 100644 index 4c76f3f9a..000000000 --- a/graphics/berry_fix/logo.pal +++ /dev/null @@ -1,51 +0,0 @@ -JASC-PAL -0100 -48 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 -0 0 0 -255 255 255 -238 238 238 -222 222 230 -205 205 222 -197 197 205 -180 180 197 -164 164 189 -156 156 172 -139 139 164 -123 123 156 -115 115 139 -98 98 131 -82 82 123 -74 74 115 -32 32 32 diff --git a/graphics/berry_fix/logo.png b/graphics/berry_fix/logo.png index 120dd0f52..5c9c45995 100644 Binary files a/graphics/berry_fix/logo.png and b/graphics/berry_fix/logo.png differ diff --git a/graphics/berry_fix/window.pal b/graphics/berry_fix/window.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/window.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/window.png b/graphics/berry_fix/window.png index 0ba517a6b..8f39d3574 100644 Binary files a/graphics/berry_fix/window.png and b/graphics/berry_fix/window.png differ diff --git a/graphics/unused/old_contest_2.bin b/graphics/contest/audience.bin similarity index 100% rename from graphics/unused/old_contest_2.bin rename to graphics/contest/audience.bin diff --git a/graphics/unknown/unknown_D17AB8.bin b/graphics/contest/curtain.bin similarity index 100% rename from graphics/unknown/unknown_D17AB8.bin rename to graphics/contest/curtain.bin diff --git a/graphics/unknown/unknown_D172A8.bin b/graphics/contest/interface.bin similarity index 100% rename from graphics/unknown/unknown_D172A8.bin rename to graphics/contest/interface.bin diff --git a/graphics/unused/old_contest_2.pal b/graphics/contest/interface.pal similarity index 100% rename from graphics/unused/old_contest_2.pal rename to graphics/contest/interface.pal diff --git a/graphics/contest/misc.png b/graphics/contest/interface.png similarity index 100% rename from graphics/contest/misc.png rename to graphics/contest/interface.png diff --git a/graphics/unknown/unknown_D17654.bin b/graphics/contest/japanese/audience.bin similarity index 100% rename from graphics/unknown/unknown_D17654.bin rename to graphics/contest/japanese/audience.bin diff --git a/graphics/unused/old_contest_2_2.png b/graphics/contest/japanese/audience.png similarity index 100% rename from graphics/unused/old_contest_2_2.png rename to graphics/contest/japanese/audience.png diff --git a/graphics/unused/old_contest.bin b/graphics/contest/japanese/bg.bin similarity index 100% rename from graphics/unused/old_contest.bin rename to graphics/contest/japanese/bg.bin diff --git a/graphics/unused/old_contest_classes.png b/graphics/contest/japanese/classes.png similarity index 100% rename from graphics/unused/old_contest_classes.png rename to graphics/contest/japanese/classes.png diff --git a/graphics/unused/old_contest_floor.png b/graphics/contest/japanese/floor.png similarity index 100% rename from graphics/unused/old_contest_floor.png rename to graphics/contest/japanese/floor.png diff --git a/graphics/unused/old_contest_frame_1.png b/graphics/contest/japanese/frame_1.png similarity index 100% rename from graphics/unused/old_contest_frame_1.png rename to graphics/contest/japanese/frame_1.png diff --git a/graphics/unused/old_contest_frame_2.png b/graphics/contest/japanese/frame_2.png similarity index 100% rename from graphics/unused/old_contest_frame_2.png rename to graphics/contest/japanese/frame_2.png diff --git a/graphics/unknown/unknown_D17548.bin b/graphics/contest/japanese/interface.bin similarity index 100% rename from graphics/unknown/unknown_D17548.bin rename to graphics/contest/japanese/interface.bin diff --git a/graphics/unused/old_contest_2_1.png b/graphics/contest/japanese/interface.png similarity index 100% rename from graphics/unused/old_contest_2_1.png rename to graphics/contest/japanese/interface.png diff --git a/graphics/unused/old_contest_meter.png b/graphics/contest/japanese/meter.png similarity index 100% rename from graphics/unused/old_contest_meter.png rename to graphics/contest/japanese/meter.png diff --git a/graphics/unused/numbers.png b/graphics/contest/japanese/numbers.png similarity index 100% rename from graphics/unused/numbers.png rename to graphics/contest/japanese/numbers.png diff --git a/graphics/unused/old_contest_numbers.png b/graphics/contest/japanese/numbers_2.png similarity index 100% rename from graphics/unused/old_contest_numbers.png rename to graphics/contest/japanese/numbers_2.png diff --git a/graphics/unused/old_contest.pal b/graphics/contest/japanese/palette.pal similarity index 100% rename from graphics/unused/old_contest.pal rename to graphics/contest/japanese/palette.pal diff --git a/graphics/contest/misc_2.png b/graphics/contest/japanese/results.png similarity index 100% rename from graphics/contest/misc_2.png rename to graphics/contest/japanese/results.png diff --git a/graphics/unused/old_contest_symbols.png b/graphics/contest/japanese/symbols.png similarity index 100% rename from graphics/unused/old_contest_symbols.png rename to graphics/contest/japanese/symbols.png diff --git a/graphics/unknown/unknown_D196E4.png b/graphics/contest/japanese/voltage.png similarity index 100% rename from graphics/unknown/unknown_D196E4.png rename to graphics/contest/japanese/voltage.png diff --git a/graphics/unknown/unknown_D15BE8.bin b/graphics/contest/japanese/windows.bin similarity index 100% rename from graphics/unknown/unknown_D15BE8.bin rename to graphics/contest/japanese/windows.bin diff --git a/graphics/contest/misc.pal b/graphics/contest/results.pal similarity index 100% rename from graphics/contest/misc.pal rename to graphics/contest/results.pal diff --git a/graphics/contest/misc_2_tilemap_3.bin b/graphics/contest/results_bg.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_3.bin rename to graphics/contest/results_bg.bin diff --git a/graphics/contest/misc_2_tilemap_2.bin b/graphics/contest/results_interface.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_2.bin rename to graphics/contest/results_interface.bin diff --git a/graphics/contest/misc_2_tilemap_1.bin b/graphics/contest/results_winner_banner.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_1.bin rename to graphics/contest/results_winner_banner.bin diff --git a/graphics/contest/heart.png b/graphics/contest/slider_heart.png similarity index 100% rename from graphics/contest/heart.png rename to graphics/contest/slider_heart.png diff --git a/graphics/credits/blastoise_1.png b/graphics/credits/blastoise_1.png new file mode 100644 index 000000000..b212fbcc1 Binary files /dev/null and b/graphics/credits/blastoise_1.png differ diff --git a/graphics/credits/blastoise_2.png b/graphics/credits/blastoise_2.png new file mode 100644 index 000000000..33e581341 Binary files /dev/null and b/graphics/credits/blastoise_2.png differ diff --git a/graphics/credits/charizard_1.png b/graphics/credits/charizard_1.png new file mode 100644 index 000000000..3208cb111 Binary files /dev/null and b/graphics/credits/charizard_1.png differ diff --git a/graphics/credits/charizard_2.png b/graphics/credits/charizard_2.png new file mode 100644 index 000000000..749b4c542 Binary files /dev/null and b/graphics/credits/charizard_2.png differ diff --git a/graphics/credits/unk_8EAE548.bin b/graphics/credits/copyright.bin similarity index 100% rename from graphics/credits/unk_8EAE548.bin rename to graphics/credits/copyright.bin diff --git a/graphics/credits/copyright.png b/graphics/credits/copyright.png new file mode 100644 index 000000000..3e5f0fac3 Binary files /dev/null and b/graphics/credits/copyright.png differ diff --git a/graphics/credits/unk_8413DB8.png b/graphics/credits/ground_city.png similarity index 100% rename from graphics/credits/unk_8413DB8.png rename to graphics/credits/ground_city.png diff --git a/graphics/credits/unk_8413874.png b/graphics/credits/ground_dirt.png similarity index 100% rename from graphics/credits/unk_8413874.png rename to graphics/credits/ground_dirt.png diff --git a/graphics/credits/unk_8413338.png b/graphics/credits/ground_grass.png similarity index 100% rename from graphics/credits/unk_8413338.png rename to graphics/credits/ground_grass.png diff --git a/graphics/credits/pikachu_1.png b/graphics/credits/pikachu_1.png new file mode 100644 index 000000000..8ea65cd49 Binary files /dev/null and b/graphics/credits/pikachu_1.png differ diff --git a/graphics/credits/pikachu_2.png b/graphics/credits/pikachu_2.png new file mode 100644 index 000000000..f31020c90 Binary files /dev/null and b/graphics/credits/pikachu_2.png differ diff --git a/graphics/credits/unk_8411C18.png b/graphics/credits/player_female.png similarity index 100% rename from graphics/credits/unk_8411C18.png rename to graphics/credits/player_female.png diff --git a/graphics/credits/unk_8410E30.png b/graphics/credits/player_male.png similarity index 100% rename from graphics/credits/unk_8410E30.png rename to graphics/credits/player_male.png diff --git a/graphics/credits/unk_8EAB30C.bin b/graphics/credits/pokeball.bin similarity index 100% rename from graphics/credits/unk_8EAB30C.bin rename to graphics/credits/pokeball.bin diff --git a/graphics/credits/unk_8EAAB98.png b/graphics/credits/pokeball.png similarity index 100% rename from graphics/credits/unk_8EAAB98.png rename to graphics/credits/pokeball.png diff --git a/graphics/credits/blastoise.pal b/graphics/credits/pokeball_blastoise.pal similarity index 100% rename from graphics/credits/blastoise.pal rename to graphics/credits/pokeball_blastoise.pal diff --git a/graphics/credits/charizard.pal b/graphics/credits/pokeball_charizard.pal similarity index 100% rename from graphics/credits/charizard.pal rename to graphics/credits/pokeball_charizard.pal diff --git a/graphics/credits/pikachu.pal b/graphics/credits/pokeball_pikachu.pal similarity index 100% rename from graphics/credits/pikachu.pal rename to graphics/credits/pokeball_pikachu.pal diff --git a/graphics/credits/venusaur.pal b/graphics/credits/pokeball_venusaur.pal similarity index 100% rename from graphics/credits/venusaur.pal rename to graphics/credits/pokeball_venusaur.pal diff --git a/graphics/credits/unk_84129C0.png b/graphics/credits/rival.png similarity index 100% rename from graphics/credits/unk_84129C0.png rename to graphics/credits/rival.png diff --git a/graphics/credits/unk_8410B20.bin b/graphics/credits/the_end.bin similarity index 100% rename from graphics/credits/unk_8410B20.bin rename to graphics/credits/the_end.bin diff --git a/graphics/credits/unk_8410B20.png b/graphics/credits/the_end.png similarity index 100% rename from graphics/credits/unk_8410B20.png rename to graphics/credits/the_end.png diff --git a/graphics/credits/unk_840CB8C.bin b/graphics/credits/unk_840CB8C.bin deleted file mode 100644 index 3dd1c74a0..000000000 Binary files a/graphics/credits/unk_840CB8C.bin and /dev/null differ diff --git a/graphics/credits/unk_840D228.bin b/graphics/credits/unk_840D228.bin deleted file mode 100644 index f6c336c01..000000000 Binary files a/graphics/credits/unk_840D228.bin and /dev/null differ diff --git a/graphics/credits/unk_840DC0C.bin b/graphics/credits/unk_840DC0C.bin deleted file mode 100644 index a52ea8056..000000000 Binary files a/graphics/credits/unk_840DC0C.bin and /dev/null differ diff --git a/graphics/credits/unk_840E158.bin b/graphics/credits/unk_840E158.bin deleted file mode 100644 index 2d9128634..000000000 Binary files a/graphics/credits/unk_840E158.bin and /dev/null differ diff --git a/graphics/credits/unk_840E904.bin b/graphics/credits/unk_840E904.bin deleted file mode 100644 index 4887c1e7e..000000000 Binary files a/graphics/credits/unk_840E904.bin and /dev/null differ diff --git a/graphics/credits/unk_840F240.bin b/graphics/credits/unk_840F240.bin deleted file mode 100644 index 285a468b6..000000000 Binary files a/graphics/credits/unk_840F240.bin and /dev/null differ diff --git a/graphics/credits/unk_840F944.bin b/graphics/credits/unk_840F944.bin deleted file mode 100644 index ba2cdab77..000000000 Binary files a/graphics/credits/unk_840F944.bin and /dev/null differ diff --git a/graphics/credits/unk_8410198.bin b/graphics/credits/unk_8410198.bin deleted file mode 100644 index f7b3a02a5..000000000 Binary files a/graphics/credits/unk_8410198.bin and /dev/null differ diff --git a/graphics/credits/unk_84105B4.bin b/graphics/credits/unk_84105B4.bin deleted file mode 100644 index d173e611e..000000000 Binary files a/graphics/credits/unk_84105B4.bin and /dev/null differ diff --git a/graphics/credits/unk_8410E10.pal b/graphics/credits/unk_8410E10.pal deleted file mode 100644 index 5667181bd..000000000 --- a/graphics/credits/unk_8410E10.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -57 57 123 -172 123 65 -255 197 148 -222 148 115 -123 65 65 -82 106 156 -57 57 123 -115 164 197 -123 123 131 -238 238 255 -180 180 213 -255 106 74 -197 57 57 -255 222 90 -213 180 74 -0 0 0 diff --git a/graphics/credits/unk_8411BF8.pal b/graphics/credits/unk_8411BF8.pal deleted file mode 100644 index 5667181bd..000000000 --- a/graphics/credits/unk_8411BF8.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -57 57 123 -172 123 65 -255 197 148 -222 148 115 -123 65 65 -82 106 156 -57 57 123 -115 164 197 -123 123 131 -238 238 255 -180 180 213 -255 106 74 -197 57 57 -255 222 90 -213 180 74 -0 0 0 diff --git a/graphics/credits/unk_84129A0.pal b/graphics/credits/unk_84129A0.pal deleted file mode 100644 index ac601cddf..000000000 --- a/graphics/credits/unk_84129A0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -49 49 49 -255 222 205 -238 180 148 -197 139 106 -106 74 74 -222 164 74 -197 123 8 -49 65 82 -205 139 255 -115 82 131 -156 106 172 -106 123 131 -197 205 180 -238 74 24 -255 255 255 -0 0 0 diff --git a/graphics/credits/unk_8413318.pal b/graphics/credits/unk_8413318.pal deleted file mode 100644 index 284b70b77..000000000 --- a/graphics/credits/unk_8413318.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -131 197 0 -74 139 0 -32 115 0 -0 82 0 -106 172 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/credits/unk_8413854.pal b/graphics/credits/unk_8413854.pal deleted file mode 100644 index 46d4f48dd..000000000 --- a/graphics/credits/unk_8413854.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -189 180 98 -172 164 74 -156 148 49 -123 115 24 -222 213 131 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -255 0 255 diff --git a/graphics/credits/unk_8413D98.pal b/graphics/credits/unk_8413D98.pal deleted file mode 100644 index a3476d0d4..000000000 --- a/graphics/credits/unk_8413D98.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -131 197 0 -74 139 0 -32 115 0 -0 82 0 -106 172 0 -189 180 98 -172 164 74 -156 148 49 -123 115 24 -222 213 131 -222 222 222 -205 205 205 -189 189 189 -238 238 238 -131 131 131 diff --git a/graphics/credits/unk_8EAE548.png b/graphics/credits/unk_8EAE548.png deleted file mode 100644 index 297827436..000000000 Binary files a/graphics/credits/unk_8EAE548.png and /dev/null differ diff --git a/graphics/credits/venusaur_1.png b/graphics/credits/venusaur_1.png new file mode 100644 index 000000000..7bfb3e703 Binary files /dev/null and b/graphics/credits/venusaur_1.png differ diff --git a/graphics/credits/venusaur_2.png b/graphics/credits/venusaur_2.png new file mode 100644 index 000000000..22b78305c Binary files /dev/null and b/graphics/credits/venusaur_2.png differ diff --git a/graphics/credits/venusaur_unused.png b/graphics/credits/venusaur_unused.png new file mode 100644 index 000000000..3b1b8ea14 Binary files /dev/null and b/graphics/credits/venusaur_unused.png differ diff --git a/graphics/credits/unk_840CA54.bin b/graphics/credits/white_circle.bin similarity index 100% rename from graphics/credits/unk_840CA54.bin rename to graphics/credits/white_circle.bin diff --git a/graphics/credits/unk_840C630.pal b/graphics/credits/white_circle.pal similarity index 100% rename from graphics/credits/unk_840C630.pal rename to graphics/credits/white_circle.pal diff --git a/graphics/credits/unk_840C650.png b/graphics/credits/white_circle.png similarity index 100% rename from graphics/credits/unk_840C650.png rename to graphics/credits/white_circle.png diff --git a/graphics/misc/evolution_sprite_841EEA4.png b/graphics/evolution_scene/sparkle.png similarity index 100% rename from graphics/misc/evolution_sprite_841EEA4.png rename to graphics/evolution_scene/sparkle.png diff --git a/graphics/field_specials/unk_83F5F50.pal b/graphics/field_specials/champion_room_lighting_0.pal similarity index 100% rename from graphics/field_specials/unk_83F5F50.pal rename to graphics/field_specials/champion_room_lighting_0.pal diff --git a/graphics/field_specials/unk_83F60F0.pal b/graphics/field_specials/champion_room_lighting_1.pal similarity index 100% rename from graphics/field_specials/unk_83F60F0.pal rename to graphics/field_specials/champion_room_lighting_1.pal diff --git a/graphics/field_specials/unk_83F6110.pal b/graphics/field_specials/champion_room_lighting_2.pal similarity index 100% rename from graphics/field_specials/unk_83F6110.pal rename to graphics/field_specials/champion_room_lighting_2.pal diff --git a/graphics/field_specials/unk_83F6130.pal b/graphics/field_specials/champion_room_lighting_3.pal similarity index 100% rename from graphics/field_specials/unk_83F6130.pal rename to graphics/field_specials/champion_room_lighting_3.pal diff --git a/graphics/field_specials/unk_83F6150.pal b/graphics/field_specials/champion_room_lighting_4.pal similarity index 100% rename from graphics/field_specials/unk_83F6150.pal rename to graphics/field_specials/champion_room_lighting_4.pal diff --git a/graphics/field_specials/unk_83F6170.pal b/graphics/field_specials/champion_room_lighting_5.pal similarity index 100% rename from graphics/field_specials/unk_83F6170.pal rename to graphics/field_specials/champion_room_lighting_5.pal diff --git a/graphics/field_specials/unk_83F6190.pal b/graphics/field_specials/champion_room_lighting_6.pal similarity index 100% rename from graphics/field_specials/unk_83F6190.pal rename to graphics/field_specials/champion_room_lighting_6.pal diff --git a/graphics/field_specials/unk_83F61B0.pal b/graphics/field_specials/champion_room_lighting_7.pal similarity index 100% rename from graphics/field_specials/unk_83F61B0.pal rename to graphics/field_specials/champion_room_lighting_7.pal diff --git a/graphics/field_specials/unk_83F60B0.pal b/graphics/field_specials/champion_room_lighting_8.pal similarity index 100% rename from graphics/field_specials/unk_83F60B0.pal rename to graphics/field_specials/champion_room_lighting_8.pal diff --git a/graphics/field_specials/unk_83F6206.pal b/graphics/field_specials/deoxys_rock_0.pal similarity index 100% rename from graphics/field_specials/unk_83F6206.pal rename to graphics/field_specials/deoxys_rock_0.pal diff --git a/graphics/field_specials/unk_83F6226.pal b/graphics/field_specials/deoxys_rock_1.pal similarity index 100% rename from graphics/field_specials/unk_83F6226.pal rename to graphics/field_specials/deoxys_rock_1.pal diff --git a/graphics/field_specials/unk_83F6346.pal b/graphics/field_specials/deoxys_rock_10.pal similarity index 100% rename from graphics/field_specials/unk_83F6346.pal rename to graphics/field_specials/deoxys_rock_10.pal diff --git a/graphics/field_specials/unk_83F6246.pal b/graphics/field_specials/deoxys_rock_2.pal similarity index 100% rename from graphics/field_specials/unk_83F6246.pal rename to graphics/field_specials/deoxys_rock_2.pal diff --git a/graphics/field_specials/unk_83F6266.pal b/graphics/field_specials/deoxys_rock_3.pal similarity index 100% rename from graphics/field_specials/unk_83F6266.pal rename to graphics/field_specials/deoxys_rock_3.pal diff --git a/graphics/field_specials/unk_83F6286.pal b/graphics/field_specials/deoxys_rock_4.pal similarity index 100% rename from graphics/field_specials/unk_83F6286.pal rename to graphics/field_specials/deoxys_rock_4.pal diff --git a/graphics/field_specials/unk_83F62A6.pal b/graphics/field_specials/deoxys_rock_5.pal similarity index 100% rename from graphics/field_specials/unk_83F62A6.pal rename to graphics/field_specials/deoxys_rock_5.pal diff --git a/graphics/field_specials/unk_83F62C6.pal b/graphics/field_specials/deoxys_rock_6.pal similarity index 100% rename from graphics/field_specials/unk_83F62C6.pal rename to graphics/field_specials/deoxys_rock_6.pal diff --git a/graphics/field_specials/unk_83F62E6.pal b/graphics/field_specials/deoxys_rock_7.pal similarity index 100% rename from graphics/field_specials/unk_83F62E6.pal rename to graphics/field_specials/deoxys_rock_7.pal diff --git a/graphics/field_specials/unk_83F6306.pal b/graphics/field_specials/deoxys_rock_8.pal similarity index 100% rename from graphics/field_specials/unk_83F6306.pal rename to graphics/field_specials/deoxys_rock_8.pal diff --git a/graphics/field_specials/unk_83F6326.pal b/graphics/field_specials/deoxys_rock_9.pal similarity index 100% rename from graphics/field_specials/unk_83F6326.pal rename to graphics/field_specials/deoxys_rock_9.pal diff --git a/graphics/field_specials/unk_83F60D0.pal b/graphics/field_specials/elite_four_lighting_0.pal similarity index 100% rename from graphics/field_specials/unk_83F60D0.pal rename to graphics/field_specials/elite_four_lighting_0.pal diff --git a/graphics/field_specials/unk_83F5F70.pal b/graphics/field_specials/elite_four_lighting_1.pal similarity index 100% rename from graphics/field_specials/unk_83F5F70.pal rename to graphics/field_specials/elite_four_lighting_1.pal diff --git a/graphics/field_specials/unk_83F6090.pal b/graphics/field_specials/elite_four_lighting_10.pal similarity index 100% rename from graphics/field_specials/unk_83F6090.pal rename to graphics/field_specials/elite_four_lighting_10.pal diff --git a/graphics/field_specials/unk_83F61D0.pal b/graphics/field_specials/elite_four_lighting_11.pal similarity index 100% rename from graphics/field_specials/unk_83F61D0.pal rename to graphics/field_specials/elite_four_lighting_11.pal diff --git a/graphics/field_specials/unk_83F5F90.pal b/graphics/field_specials/elite_four_lighting_2.pal similarity index 100% rename from graphics/field_specials/unk_83F5F90.pal rename to graphics/field_specials/elite_four_lighting_2.pal diff --git a/graphics/field_specials/unk_83F5FB0.pal b/graphics/field_specials/elite_four_lighting_3.pal similarity index 100% rename from graphics/field_specials/unk_83F5FB0.pal rename to graphics/field_specials/elite_four_lighting_3.pal diff --git a/graphics/field_specials/unk_83F5FD0.pal b/graphics/field_specials/elite_four_lighting_4.pal similarity index 100% rename from graphics/field_specials/unk_83F5FD0.pal rename to graphics/field_specials/elite_four_lighting_4.pal diff --git a/graphics/field_specials/unk_83F5FF0.pal b/graphics/field_specials/elite_four_lighting_5.pal similarity index 100% rename from graphics/field_specials/unk_83F5FF0.pal rename to graphics/field_specials/elite_four_lighting_5.pal diff --git a/graphics/field_specials/unk_83F6010.pal b/graphics/field_specials/elite_four_lighting_6.pal similarity index 100% rename from graphics/field_specials/unk_83F6010.pal rename to graphics/field_specials/elite_four_lighting_6.pal diff --git a/graphics/field_specials/unk_83F6030.pal b/graphics/field_specials/elite_four_lighting_7.pal similarity index 100% rename from graphics/field_specials/unk_83F6030.pal rename to graphics/field_specials/elite_four_lighting_7.pal diff --git a/graphics/field_specials/unk_83F6050.pal b/graphics/field_specials/elite_four_lighting_8.pal similarity index 100% rename from graphics/field_specials/unk_83F6050.pal rename to graphics/field_specials/elite_four_lighting_8.pal diff --git a/graphics/field_specials/unk_83F6070.pal b/graphics/field_specials/elite_four_lighting_9.pal similarity index 100% rename from graphics/field_specials/unk_83F6070.pal rename to graphics/field_specials/elite_four_lighting_9.pal diff --git a/graphics/interface/blank2.pal b/graphics/interface/blank2.pal deleted file mode 100644 index 4b0812f09..000000000 --- a/graphics/interface/blank2.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/party_menu_hpbar.png b/graphics/interface/hpbar_unused.png similarity index 100% rename from graphics/interface/party_menu_hpbar.png rename to graphics/interface/hpbar_unused.png diff --git a/graphics/interface/party_menu_misc.pal b/graphics/interface/party_menu_misc.pal deleted file mode 100644 index d6d7e4185..000000000 --- a/graphics/interface/party_menu_misc.pal +++ /dev/null @@ -1,179 +0,0 @@ -JASC-PAL -0100 -176 -123 156 115 -255 255 255 -106 106 106 -0 0 0 -65 205 255 -0 139 189 -49 189 238 -255 156 148 -189 90 82 -222 123 115 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -139 148 123 -74 74 98 -65 156 148 -32 106 98 -74 172 164 -57 139 139 -82 65 74 -32 16 24 -255 0 255 -255 0 255 -255 255 255 -123 205 180 -57 148 123 -255 0 255 -255 0 255 -115 90 180 -139 148 123 -255 115 49 -65 156 148 -32 106 98 -74 172 164 -57 139 139 -82 65 74 -82 82 90 -255 0 255 -255 0 255 -255 255 255 -123 205 180 -57 148 123 -255 0 255 -255 0 255 -164 115 246 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -131 197 222 -57 148 222 -41 123 180 -131 197 222 -41 123 180 -115 255 172 -90 213 131 -65 205 255 -0 98 148 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -213 197 90 -197 164 24 -156 156 32 -213 197 90 -156 156 32 -255 230 57 -205 172 8 -255 156 148 -156 65 57 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -213 164 32 -197 106 16 -164 74 0 -213 164 32 -164 74 0 -255 115 49 -197 57 0 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -255 115 49 -115 115 115 -255 255 255 -180 255 164 -123 222 131 -123 156 98 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -172 238 255 -123 213 238 -74 172 205 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -246 246 148 -246 230 98 -222 197 32 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -255 213 222 -255 189 148 -238 164 131 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 255 115 -115 115 115 -255 255 255 -180 255 164 -123 222 131 -131 172 106 -255 255 115 -255 255 115 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 diff --git a/graphics/interface/party_menu_misc.png b/graphics/interface/party_menu_misc.png deleted file mode 100644 index c58f3aae9..000000000 Binary files a/graphics/interface/party_menu_misc.png and /dev/null differ diff --git a/graphics/interface/pokesummary_unk_8463B00.pal b/graphics/interface/pokesummary_unk_8463B00.pal deleted file mode 100644 index 61af05b25..000000000 --- a/graphics/interface/pokesummary_unk_8463B00.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 164 164 -106 106 106 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/pokesummary_unk_8463B44.pal b/graphics/interface/pokesummary_unk_8463B44.pal deleted file mode 100644 index 37aafef66..000000000 --- a/graphics/interface/pokesummary_unk_8463B44.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 213 82 -189 148 16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/trainer_memo_pal2.pal b/graphics/interface/trainer_memo_pal2.pal deleted file mode 100644 index 22efdfee5..000000000 --- a/graphics/interface/trainer_memo_pal2.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 0 255 -255 255 255 -230 230 238 -106 230 230 -98 106 123 -90 213 213 -230 205 255 -205 172 238 -255 0 255 -255 0 255 -255 255 255 -213 213 213 -222 222 222 -230 230 230 -246 246 246 -246 246 246 diff --git a/graphics/interface/trainer_memo_pal3.pal b/graphics/interface/trainer_memo_pal3.pal deleted file mode 100644 index 7f6927b5f..000000000 --- a/graphics/interface/trainer_memo_pal3.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 0 255 -0 123 197 -230 222 156 -230 205 255 -0 74 148 -123 156 156 -197 189 115 -106 197 205 -106 230 230 -90 213 213 -205 172 238 -180 139 213 -255 180 0 -123 131 148 -255 255 255 -98 106 123 diff --git a/graphics/item_menu/bag_tilemap1.bin b/graphics/item_menu/bg.bin similarity index 100% rename from graphics/item_menu/bag_tilemap1.bin rename to graphics/item_menu/bg.bin diff --git a/graphics/item_menu/bag_tiles.png b/graphics/item_menu/bg.png similarity index 100% rename from graphics/item_menu/bag_tiles.png rename to graphics/item_menu/bg.png diff --git a/graphics/item_menu/bag_tilemap2.bin b/graphics/item_menu/bg_item_pc.bin similarity index 100% rename from graphics/item_menu/bag_tilemap2.bin rename to graphics/item_menu/bg_item_pc.bin diff --git a/graphics/link/gba.pal b/graphics/link/gba.pal deleted file mode 100644 index 64a442293..000000000 --- a/graphics/link/gba.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -222 230 238 -189 205 230 -156 180 222 -131 131 139 -98 98 123 -65 74 106 -41 49 90 -230 230 230 -205 205 205 -180 180 180 -156 156 156 -213 180 106 -205 156 82 -49 255 106 diff --git a/graphics/main_menu/unk_8234648.pal b/graphics/main_menu/bg.pal similarity index 100% rename from graphics/main_menu/unk_8234648.pal rename to graphics/main_menu/bg.pal diff --git a/graphics/main_menu/unk_8234668.pal b/graphics/main_menu/textbox.pal similarity index 100% rename from graphics/main_menu/unk_8234668.pal rename to graphics/main_menu/textbox.pal diff --git a/graphics/link_games/unk_847a348.png b/graphics/misc/minigame_countdown.png similarity index 100% rename from graphics/link_games/unk_847a348.png rename to graphics/misc/minigame_countdown.png diff --git a/graphics/misc/unk_83cc2e4.pal b/graphics/misc/option_menu.pal similarity index 100% rename from graphics/misc/unk_83cc2e4.pal rename to graphics/misc/option_menu.pal diff --git a/graphics/misc/unk_8.pal b/graphics/misc/unk_8.pal deleted file mode 100644 index d7d8f43b7..000000000 --- a/graphics/misc/unk_8.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 24 0 -0 131 213 -32 205 255 -115 106 164 -74 156 49 -16 106 65 -238 8 8 -16 164 16 -32 32 205 -74 65 90 -139 0 74 -90 32 49 -0 115 0 -255 90 65 -24 172 164 -246 106 49 diff --git a/graphics/interface/party_menu_misc.bin b/graphics/party_menu/bg.bin similarity index 100% rename from graphics/interface/party_menu_misc.bin rename to graphics/party_menu/bg.bin diff --git a/graphics/party_menu/bg.png b/graphics/party_menu/bg.png new file mode 100644 index 000000000..ed9f8a599 Binary files /dev/null and b/graphics/party_menu/bg.png differ diff --git a/graphics/interface/party_menu_cancel_button.bin b/graphics/party_menu/cancel_button.bin similarity index 100% rename from graphics/interface/party_menu_cancel_button.bin rename to graphics/party_menu/cancel_button.bin diff --git a/graphics/interface/party_menu_confirm_button.bin b/graphics/party_menu/confirm_button.bin similarity index 100% rename from graphics/interface/party_menu_confirm_button.bin rename to graphics/party_menu/confirm_button.bin diff --git a/graphics/interface/hold_icons.png b/graphics/party_menu/hold_icons.png similarity index 100% rename from graphics/interface/hold_icons.png rename to graphics/party_menu/hold_icons.png diff --git a/graphics/interface/party_menu_pokeball.png b/graphics/party_menu/pokeball.png similarity index 100% rename from graphics/interface/party_menu_pokeball.png rename to graphics/party_menu/pokeball.png diff --git a/graphics/interface/party_menu_pokeball_small.png b/graphics/party_menu/pokeball_small.png similarity index 100% rename from graphics/interface/party_menu_pokeball_small.png rename to graphics/party_menu/pokeball_small.png diff --git a/graphics/party_menu/slot_main.bin b/graphics/party_menu/slot_main.bin new file mode 100755 index 000000000..2f3e729f6 Binary files /dev/null and b/graphics/party_menu/slot_main.bin differ diff --git a/graphics/party_menu/slot_main_no_hp.bin b/graphics/party_menu/slot_main_no_hp.bin new file mode 100755 index 000000000..653ad1a64 Binary files /dev/null and b/graphics/party_menu/slot_main_no_hp.bin differ diff --git a/graphics/party_menu/slot_wide.bin b/graphics/party_menu/slot_wide.bin new file mode 100755 index 000000000..c88b73bf7 Binary files /dev/null and b/graphics/party_menu/slot_wide.bin differ diff --git a/graphics/party_menu/slot_wide_empty.bin b/graphics/party_menu/slot_wide_empty.bin new file mode 100755 index 000000000..3592178b3 Binary files /dev/null and b/graphics/party_menu/slot_wide_empty.bin differ diff --git a/graphics/party_menu/slot_wide_no_hp.bin b/graphics/party_menu/slot_wide_no_hp.bin new file mode 100755 index 000000000..8f662da0a Binary files /dev/null and b/graphics/party_menu/slot_wide_no_hp.bin differ diff --git a/graphics/pokedex/caught_marker.png b/graphics/pokedex/caught_marker.png index 74f43ec80..dd2deb125 100644 Binary files a/graphics/pokedex/caught_marker.png and b/graphics/pokedex/caught_marker.png differ diff --git a/data/garbage_8DD2290.bin b/graphics/pokemon/hitmontop/unused_garbage.bin similarity index 100% rename from data/garbage_8DD2290.bin rename to graphics/pokemon/hitmontop/unused_garbage.bin diff --git a/graphics/pokemon_special_anim/unk_845973C.bin b/graphics/pokemon_special_anim/bg.bin similarity index 100% rename from graphics/pokemon_special_anim/unk_845973C.bin rename to graphics/pokemon_special_anim/bg.bin diff --git a/graphics/pokemon_special_anim/unk_845963C.pal b/graphics/pokemon_special_anim/bg.pal similarity index 100% rename from graphics/pokemon_special_anim/unk_845963C.pal rename to graphics/pokemon_special_anim/bg.pal diff --git a/graphics/pokemon_special_anim/unk_845967C.png b/graphics/pokemon_special_anim/bg.png similarity index 100% rename from graphics/pokemon_special_anim/unk_845967C.png rename to graphics/pokemon_special_anim/bg.png diff --git a/graphics/pokemon_special_anim/unk_845965C.pal b/graphics/pokemon_special_anim/bg_tm_hm.pal similarity index 100% rename from graphics/pokemon_special_anim/unk_845965C.pal rename to graphics/pokemon_special_anim/bg_tm_hm.pal diff --git a/graphics/pokemon_special_anim/unk_8459888.png b/graphics/pokemon_special_anim/level_up.png similarity index 100% rename from graphics/pokemon_special_anim/unk_8459888.png rename to graphics/pokemon_special_anim/level_up.png diff --git a/graphics/pokemon_special_anim/unk_8459960.png b/graphics/pokemon_special_anim/outward_spiral_dots.png similarity index 100% rename from graphics/pokemon_special_anim/unk_8459960.png rename to graphics/pokemon_special_anim/outward_spiral_dots.png diff --git a/graphics/pokemon_special_anim/unk_84598C4.png b/graphics/pokemon_special_anim/star.png similarity index 100% rename from graphics/pokemon_special_anim/unk_84598C4.png rename to graphics/pokemon_special_anim/star.png diff --git a/graphics/pokemon_special_anim/unk_8459868.pal b/graphics/pokemon_special_anim/unk_8459868.pal deleted file mode 100644 index 9448351d8..000000000 --- a/graphics/pokemon_special_anim/unk_8459868.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -230 230 255 -213 213 255 -197 197 255 -180 180 255 -164 164 255 -148 148 255 -131 131 255 -115 115 255 -98 98 255 -82 82 255 -65 65 255 -49 49 255 -32 32 255 -16 16 255 diff --git a/graphics/pokemon_special_anim/unk_84598A4.pal b/graphics/pokemon_special_anim/unk_84598A4.pal deleted file mode 100644 index a13a09ed3..000000000 --- a/graphics/pokemon_special_anim/unk_84598A4.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -98 90 8 -197 189 24 -246 246 0 -148 139 16 -246 238 32 -222 213 0 -213 197 0 -180 164 0 -49 41 0 -172 148 32 -189 164 49 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/pokemon_special_anim/unk_8459940.pal b/graphics/pokemon_special_anim/unk_8459940.pal deleted file mode 100644 index 7354e267b..000000000 --- a/graphics/pokemon_special_anim/unk_8459940.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -65 106 255 -255 255 255 -230 230 230 -213 213 213 -197 197 197 -180 180 180 -164 164 164 -148 148 148 -131 131 131 -115 115 115 -98 98 98 -82 82 82 -65 65 65 -49 49 49 -32 32 32 -16 16 16 diff --git a/graphics/slot_machine/digits.png b/graphics/slot_machine/digits.png new file mode 100644 index 000000000..d52754d8d Binary files /dev/null and b/graphics/slot_machine/digits.png differ diff --git a/graphics/slot_machine/unk_84661d4.bin b/graphics/slot_machine/firered/bg.bin similarity index 100% rename from graphics/slot_machine/unk_84661d4.bin rename to graphics/slot_machine/firered/bg.bin diff --git a/graphics/slot_machine/firered/bg.png b/graphics/slot_machine/firered/bg.png new file mode 100644 index 000000000..dddac4d11 Binary files /dev/null and b/graphics/slot_machine/firered/bg.png differ diff --git a/graphics/slot_machine/unk_846653c.png b/graphics/slot_machine/firered/button_pressed.png similarity index 100% rename from graphics/slot_machine/unk_846653c.png rename to graphics/slot_machine/firered/button_pressed.png diff --git a/graphics/slot_machine/unk_846506c.png b/graphics/slot_machine/firered/clefairy.png similarity index 100% rename from graphics/slot_machine/unk_846506c.png rename to graphics/slot_machine/firered/clefairy.png diff --git a/graphics/slot_machine/unk_8466998.bin b/graphics/slot_machine/firered/combos_window.bin similarity index 100% rename from graphics/slot_machine/unk_8466998.bin rename to graphics/slot_machine/firered/combos_window.bin diff --git a/graphics/slot_machine/firered/combos_window.png b/graphics/slot_machine/firered/combos_window.png new file mode 100644 index 000000000..6472e5b25 Binary files /dev/null and b/graphics/slot_machine/firered/combos_window.png differ diff --git a/graphics/slot_machine/unk_84664bc.pal b/graphics/slot_machine/firered/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_84664bc.pal rename to graphics/slot_machine/firered/match_lines.pal diff --git a/graphics/slot_machine/firered/payout_lights.pal b/graphics/slot_machine/firered/payout_lights.pal new file mode 100644 index 000000000..b95e4b5e7 --- /dev/null +++ b/graphics/slot_machine/firered/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +238 172 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 205 32 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/firered/reel_icons.png b/graphics/slot_machine/firered/reel_icons.png new file mode 100644 index 000000000..9ebb2b7a7 Binary files /dev/null and b/graphics/slot_machine/firered/reel_icons.png differ diff --git a/graphics/slot_machine/unk_lg_8465ab8.bin b/graphics/slot_machine/leafgreen/bg.bin similarity index 100% rename from graphics/slot_machine/unk_lg_8465ab8.bin rename to graphics/slot_machine/leafgreen/bg.bin diff --git a/graphics/slot_machine/leafgreen/bg.png b/graphics/slot_machine/leafgreen/bg.png new file mode 100644 index 000000000..97ff62b09 Binary files /dev/null and b/graphics/slot_machine/leafgreen/bg.png differ diff --git a/graphics/slot_machine/leafgreen/button_pressed.png b/graphics/slot_machine/leafgreen/button_pressed.png new file mode 100644 index 000000000..f913eab9a Binary files /dev/null and b/graphics/slot_machine/leafgreen/button_pressed.png differ diff --git a/graphics/slot_machine/unk_lg_8464a3c.png b/graphics/slot_machine/leafgreen/clefairy.png similarity index 100% rename from graphics/slot_machine/unk_lg_8464a3c.png rename to graphics/slot_machine/leafgreen/clefairy.png diff --git a/graphics/slot_machine/unk_lg_8466278.bin b/graphics/slot_machine/leafgreen/combos_window.bin similarity index 100% rename from graphics/slot_machine/unk_lg_8466278.bin rename to graphics/slot_machine/leafgreen/combos_window.bin diff --git a/graphics/slot_machine/leafgreen/combos_window.png b/graphics/slot_machine/leafgreen/combos_window.png new file mode 100644 index 000000000..ce9f5cf76 Binary files /dev/null and b/graphics/slot_machine/leafgreen/combos_window.png differ diff --git a/graphics/slot_machine/unk_lg_8465d9c.pal b/graphics/slot_machine/leafgreen/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_lg_8465d9c.pal rename to graphics/slot_machine/leafgreen/match_lines.pal diff --git a/graphics/slot_machine/leafgreen/payout_lights.pal b/graphics/slot_machine/leafgreen/payout_lights.pal new file mode 100644 index 000000000..8e0f65ee2 --- /dev/null +++ b/graphics/slot_machine/leafgreen/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +139 222 82 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +197 246 139 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/leafgreen/reel_icons.png b/graphics/slot_machine/leafgreen/reel_icons.png new file mode 100644 index 000000000..ceb9b739a Binary files /dev/null and b/graphics/slot_machine/leafgreen/reel_icons.png differ diff --git a/graphics/slot_machine/unk_8464974.pal b/graphics/slot_machine/unk_8464974.pal deleted file mode 100644 index 6bc8bed9a..000000000 --- a/graphics/slot_machine/unk_8464974.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 255 255 -65 65 65 -255 246 0 -255 172 0 -246 246 255 -255 246 213 -246 213 156 -238 222 0 -98 98 98 -131 98 41 -255 106 0 -222 57 0 -213 180 0 -222 222 230 -0 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_8464994.pal b/graphics/slot_machine/unk_8464994.pal deleted file mode 100644 index 8dee9dd3e..000000000 --- a/graphics/slot_machine/unk_8464994.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -123 255 255 -65 65 65 -246 246 255 -246 74 0 -205 65 0 -255 205 189 -222 222 230 -0 0 0 -255 238 238 -164 32 0 -205 123 24 -255 222 115 -123 82 0 -255 246 0 -230 205 0 -164 123 41 diff --git a/graphics/slot_machine/unk_84649b4.pal b/graphics/slot_machine/unk_84649b4.pal deleted file mode 100644 index d54cfc65f..000000000 --- a/graphics/slot_machine/unk_84649b4.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -115 255 139 -65 65 65 -255 0 0 -255 255 255 -255 131 0 -255 205 0 -0 0 255 -0 131 255 -0 205 255 -156 238 74 -205 205 230 -222 0 0 -0 156 0 -131 131 148 -164 164 189 -180 0 0 diff --git a/graphics/slot_machine/unk_84649d4.pal b/graphics/slot_machine/unk_84649d4.pal deleted file mode 100644 index d06616c5d..000000000 --- a/graphics/slot_machine/unk_84649d4.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 156 230 -57 65 65 -255 246 213 -246 213 123 -255 205 172 -255 172 115 -172 156 90 -246 246 255 -213 98 41 -222 222 230 -148 148 156 -238 172 255 -246 131 180 -197 74 106 -148 74 197 -205 131 255 diff --git a/graphics/slot_machine/unk_84649f4.pal b/graphics/slot_machine/unk_84649f4.pal deleted file mode 100644 index ef5e9a7ae..000000000 --- a/graphics/slot_machine/unk_84649f4.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 230 115 -57 65 65 -106 115 115 -197 205 205 -230 238 238 -246 246 255 -164 172 172 -255 90 65 -65 90 255 -189 213 255 -255 213 189 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_8464a14.png b/graphics/slot_machine/unk_8464a14.png deleted file mode 100644 index be8dfb6e8..000000000 Binary files a/graphics/slot_machine/unk_8464a14.png and /dev/null differ diff --git a/graphics/slot_machine/unk_8465524.pal b/graphics/slot_machine/unk_8465524.pal deleted file mode 100644 index b8cf64bae..000000000 --- a/graphics/slot_machine/unk_8465524.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -98 98 90 -255 255 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 255 0 diff --git a/graphics/slot_machine/unk_8465544.png b/graphics/slot_machine/unk_8465544.png deleted file mode 100644 index 0e3154f61..000000000 Binary files a/graphics/slot_machine/unk_8465544.png and /dev/null differ diff --git a/graphics/slot_machine/unk_8465930.pal b/graphics/slot_machine/unk_8465930.pal deleted file mode 100644 index f2c377a3f..000000000 --- a/graphics/slot_machine/unk_8465930.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -57 57 49 -230 230 230 -255 255 255 -238 172 0 -197 74 24 -205 90 0 -255 205 32 -222 123 32 -255 164 41 -57 148 255 -164 222 255 -0 49 123 -139 0 0 -98 98 90 -0 0 0 diff --git a/graphics/slot_machine/unk_8465950.pal b/graphics/slot_machine/unk_8465950.pal deleted file mode 100644 index 634aa770d..000000000 --- a/graphics/slot_machine/unk_8465950.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_8465970.pal b/graphics/slot_machine/unk_8465970.pal deleted file mode 100644 index 1d932206e..000000000 --- a/graphics/slot_machine/unk_8465970.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -74 74 213 -115 172 255 -115 164 74 -156 238 74 -255 90 0 -255 164 41 -255 238 32 -222 41 0 -189 189 189 -156 156 156 -123 123 123 -90 90 90 -65 65 65 -0 0 0 diff --git a/graphics/slot_machine/unk_8465990.pal b/graphics/slot_machine/unk_8465990.pal deleted file mode 100644 index 2c2b3d843..000000000 --- a/graphics/slot_machine/unk_8465990.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -238 172 0 -172 106 106 -222 156 156 -148 82 82 -197 131 131 -8 123 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -222 123 32 -255 205 32 -205 90 0 diff --git a/graphics/slot_machine/unk_84659b0.pal b/graphics/slot_machine/unk_84659b0.pal deleted file mode 100644 index 742063525..000000000 --- a/graphics/slot_machine/unk_84659b0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -213 57 0 -205 90 0 -255 255 255 -238 172 0 -0 0 197 -180 65 0 -180 65 0 -0 106 0 -0 106 0 -82 123 255 -246 156 0 -246 156 0 -41 180 82 -41 180 82 -0 0 0 diff --git a/graphics/slot_machine/unk_84659d0.png b/graphics/slot_machine/unk_84659d0.png deleted file mode 100644 index 5223d0d3f..000000000 Binary files a/graphics/slot_machine/unk_84659d0.png and /dev/null differ diff --git a/graphics/slot_machine/unk_84664dc.pal b/graphics/slot_machine/unk_84664dc.pal deleted file mode 100644 index 12dfa2b28..000000000 --- a/graphics/slot_machine/unk_84664dc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -255 90 0 -222 41 0 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_84664fc.pal b/graphics/slot_machine/unk_84664fc.pal deleted file mode 100644 index fe26d000a..000000000 --- a/graphics/slot_machine/unk_84664fc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_846651c.pal b/graphics/slot_machine/unk_846651c.pal deleted file mode 100644 index 339886b3b..000000000 --- a/graphics/slot_machine/unk_846651c.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 90 0 -222 41 0 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_84665c0.pal b/graphics/slot_machine/unk_84665c0.pal deleted file mode 100644 index 362860109..000000000 --- a/graphics/slot_machine/unk_84665c0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -230 189 230 -65 65 65 -255 255 255 -139 238 255 -172 255 255 -106 205 222 -246 222 123 -255 230 180 -213 189 90 -222 49 0 -255 238 0 -246 205 115 -213 156 41 -246 49 0 -222 255 205 -255 230 230 diff --git a/graphics/slot_machine/unk_84665e0.pal b/graphics/slot_machine/unk_84665e0.pal deleted file mode 100644 index 758d58497..000000000 --- a/graphics/slot_machine/unk_84665e0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -197 255 255 -65 65 65 -246 246 246 -255 82 82 -49 180 255 -65 213 255 -255 156 82 -0 156 0 -156 238 74 -164 164 189 -255 238 0 -255 246 164 -197 164 57 -238 222 0 -222 255 205 -255 230 230 diff --git a/graphics/slot_machine/unk_8466600.pal b/graphics/slot_machine/unk_8466600.pal deleted file mode 100644 index bf0a84def..000000000 --- a/graphics/slot_machine/unk_8466600.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -197 255 255 -65 65 65 -246 246 246 -123 131 131 -197 205 205 -255 139 115 -90 123 255 -213 131 255 -148 74 197 -189 90 65 -255 180 172 -246 230 106 -246 74 0 -197 255 255 -222 255 205 -255 230 230 diff --git a/graphics/slot_machine/unk_8466620.png b/graphics/slot_machine/unk_8466620.png deleted file mode 100644 index 73b5d1046..000000000 Binary files a/graphics/slot_machine/unk_8466620.png and /dev/null differ diff --git a/graphics/slot_machine/unk_lg_8464434.png b/graphics/slot_machine/unk_lg_8464434.png deleted file mode 100644 index f7c3b0d7c..000000000 Binary files a/graphics/slot_machine/unk_lg_8464434.png and /dev/null differ diff --git a/graphics/slot_machine/unk_lg_84652bc.pal b/graphics/slot_machine/unk_lg_84652bc.pal deleted file mode 100644 index bd983ff0e..000000000 --- a/graphics/slot_machine/unk_lg_84652bc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -57 57 49 -230 230 230 -255 255 255 -139 222 82 -65 156 41 -90 164 57 -197 246 139 -115 180 82 -255 164 41 -238 148 0 -255 205 65 -172 82 0 -24 98 24 -98 98 90 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_84652dc.pal b/graphics/slot_machine/unk_lg_84652dc.pal deleted file mode 100644 index 59ab3dc37..000000000 --- a/graphics/slot_machine/unk_lg_84652dc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_84652fc.pal b/graphics/slot_machine/unk_lg_84652fc.pal deleted file mode 100644 index c5c5d623e..000000000 --- a/graphics/slot_machine/unk_lg_84652fc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -65 156 41 -139 222 82 -115 164 74 -156 238 74 -230 65 24 -255 164 41 -255 238 32 -139 222 82 -189 189 189 -156 156 156 -123 123 123 -90 90 90 -65 65 65 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_846531c.pal b/graphics/slot_machine/unk_lg_846531c.pal deleted file mode 100644 index f2965936f..000000000 --- a/graphics/slot_machine/unk_lg_846531c.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -139 222 82 -139 106 106 -189 156 156 -115 82 82 -164 131 131 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -131 197 98 -115 180 82 -197 246 139 -90 164 57 diff --git a/graphics/slot_machine/unk_lg_846533c.pal b/graphics/slot_machine/unk_lg_846533c.pal deleted file mode 100644 index 848e6f9bf..000000000 --- a/graphics/slot_machine/unk_lg_846533c.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -65 156 41 -90 164 57 -255 255 255 -139 222 82 -0 0 197 -180 65 0 -180 65 0 -0 106 0 -0 106 0 -82 123 255 -246 156 0 -246 156 0 -41 180 82 -41 180 82 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_846535c.png b/graphics/slot_machine/unk_lg_846535c.png deleted file mode 100644 index dc1799f37..000000000 Binary files a/graphics/slot_machine/unk_lg_846535c.png and /dev/null differ diff --git a/graphics/slot_machine/unk_lg_8465dbc.pal b/graphics/slot_machine/unk_lg_8465dbc.pal deleted file mode 100644 index 790cb6b64..000000000 --- a/graphics/slot_machine/unk_lg_8465dbc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -255 90 0 -222 41 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465ddc.pal b/graphics/slot_machine/unk_lg_8465ddc.pal deleted file mode 100644 index 32932dfb2..000000000 --- a/graphics/slot_machine/unk_lg_8465ddc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465dfc.pal b/graphics/slot_machine/unk_lg_8465dfc.pal deleted file mode 100644 index 82eae667f..000000000 --- a/graphics/slot_machine/unk_lg_8465dfc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 90 0 -222 41 0 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465f00.png b/graphics/slot_machine/unk_lg_8465f00.png deleted file mode 100644 index 56ce87fce..000000000 Binary files a/graphics/slot_machine/unk_lg_8465f00.png and /dev/null differ diff --git a/graphics/interface/trainer_memo_pal1.pal b/graphics/summary_screen/bg.pal similarity index 71% rename from graphics/interface/trainer_memo_pal1.pal rename to graphics/summary_screen/bg.pal index 44fe49317..a574f8c50 100644 --- a/graphics/interface/trainer_memo_pal1.pal +++ b/graphics/summary_screen/bg.pal @@ -1,6 +1,6 @@ JASC-PAL 0100 -80 +112 255 0 255 0 123 197 230 222 156 @@ -81,3 +81,35 @@ JASC-PAL 123 131 148 255 255 255 98 106 123 +255 0 255 +255 255 255 +230 230 238 +106 230 230 +98 106 123 +90 213 213 +230 205 255 +205 172 238 +255 0 255 +255 0 255 +255 255 255 +213 213 213 +222 222 222 +230 230 230 +246 246 246 +246 246 246 +255 0 255 +0 123 197 +230 222 156 +230 205 255 +0 74 148 +123 156 156 +197 189 115 +106 197 205 +106 230 230 +90 213 213 +205 172 238 +180 139 213 +255 180 0 +123 131 148 +255 255 255 +98 106 123 diff --git a/graphics/interface/trainer_memo.png b/graphics/summary_screen/bg.png similarity index 100% rename from graphics/interface/trainer_memo.png rename to graphics/summary_screen/bg.png diff --git a/graphics/interface/summary_exp_bar.png b/graphics/summary_screen/exp_bar.png similarity index 100% rename from graphics/interface/summary_exp_bar.png rename to graphics/summary_screen/exp_bar.png diff --git a/graphics/interface/summary_hp_bar.png b/graphics/summary_screen/hp_bar.png similarity index 100% rename from graphics/interface/summary_hp_bar.png rename to graphics/summary_screen/hp_bar.png diff --git a/graphics/interface/pokesummary_unk_8463ACC.pal b/graphics/summary_screen/hp_bar_red.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463ACC.pal rename to graphics/summary_screen/hp_bar_red.pal diff --git a/graphics/interface/pokesummary_unk_8463AAC.pal b/graphics/summary_screen/hp_bar_yellow.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463AAC.pal rename to graphics/summary_screen/hp_bar_yellow.pal diff --git a/graphics/interface/pokesummary_unk_84636E0.pal b/graphics/summary_screen/marking.pal similarity index 100% rename from graphics/interface/pokesummary_unk_84636E0.pal rename to graphics/summary_screen/marking.pal diff --git a/graphics/interface/pokesummary_unk_8463720.pal b/graphics/summary_screen/move_selection_cursor.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463720.pal rename to graphics/summary_screen/move_selection_cursor.pal diff --git a/graphics/interface/pokesummary_unk_8463740.png b/graphics/summary_screen/move_selection_cursor_left.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463740.png rename to graphics/summary_screen/move_selection_cursor_left.png diff --git a/graphics/interface/pokesummary_unk_846386C.png b/graphics/summary_screen/move_selection_cursor_right.png similarity index 100% rename from graphics/interface/pokesummary_unk_846386C.png rename to graphics/summary_screen/move_selection_cursor_right.png diff --git a/graphics/interface/pokesummary_unk_8463B88.bin b/graphics/summary_screen/moves_info_page.bin similarity index 100% rename from graphics/interface/pokesummary_unk_8463B88.bin rename to graphics/summary_screen/moves_info_page.bin diff --git a/graphics/interface/pokesummary_unk_8463C80.bin b/graphics/summary_screen/moves_page.bin similarity index 100% rename from graphics/interface/pokesummary_unk_8463C80.bin rename to graphics/summary_screen/moves_page.bin diff --git a/graphics/interface/trainer_memo_5.bin b/graphics/summary_screen/page_egg.bin similarity index 100% rename from graphics/interface/trainer_memo_5.bin rename to graphics/summary_screen/page_egg.bin diff --git a/graphics/interface/trainer_memo.bin b/graphics/summary_screen/page_info.bin similarity index 100% rename from graphics/interface/trainer_memo.bin rename to graphics/summary_screen/page_info.bin diff --git a/graphics/interface/trainer_memo_3.bin b/graphics/summary_screen/page_moves.bin similarity index 100% rename from graphics/interface/trainer_memo_3.bin rename to graphics/summary_screen/page_moves.bin diff --git a/graphics/interface/trainer_memo_4.bin b/graphics/summary_screen/page_moves_info.bin similarity index 100% rename from graphics/interface/trainer_memo_4.bin rename to graphics/summary_screen/page_moves_info.bin diff --git a/graphics/interface/trainer_memo_2.bin b/graphics/summary_screen/page_skills.bin similarity index 100% rename from graphics/interface/trainer_memo_2.bin rename to graphics/summary_screen/page_skills.bin diff --git a/graphics/interface/pokesummary_unk_8463B20.png b/graphics/summary_screen/pokerus_cured.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463B20.png rename to graphics/summary_screen/pokerus_cured.png diff --git a/graphics/interface/pokesummary_unk_8463B64.png b/graphics/summary_screen/shiny_star.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463B64.png rename to graphics/summary_screen/shiny_star.png diff --git a/graphics/interface/status_ailment_icons.png b/graphics/summary_screen/status_ailment_icons.png similarity index 100% rename from graphics/interface/status_ailment_icons.png rename to graphics/summary_screen/status_ailment_icons.png diff --git a/graphics/interface/pokesummary_unk_84636C0.pal b/graphics/summary_screen/text_header.pal similarity index 100% rename from graphics/interface/pokesummary_unk_84636C0.pal rename to graphics/summary_screen/text_header.pal diff --git a/graphics/interface/pokesummary_unk_8463700.pal b/graphics/summary_screen/text_moves.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463700.pal rename to graphics/summary_screen/text_moves.pal diff --git a/graphics/teachy_tv/border.png b/graphics/teachy_tv/border.png new file mode 100644 index 000000000..08fa27da6 Binary files /dev/null and b/graphics/teachy_tv/border.png differ diff --git a/graphics/link/gba.png b/graphics/trade/gba.png similarity index 100% rename from graphics/link/gba.png rename to graphics/trade/gba.png diff --git a/graphics/link/gba_pal2.pal b/graphics/trade/gba_pal2.pal similarity index 100% rename from graphics/link/gba_pal2.pal rename to graphics/trade/gba_pal2.pal diff --git a/graphics/interface/union_room_chat.bin b/graphics/union_room_chat/bg.bin similarity index 100% rename from graphics/interface/union_room_chat.bin rename to graphics/union_room_chat/bg.bin diff --git a/graphics/interface/union_room_chat.png b/graphics/union_room_chat/bg.png similarity index 100% rename from graphics/interface/union_room_chat.png rename to graphics/union_room_chat/bg.png diff --git a/graphics/union_room_chat/unk_845AED8.png b/graphics/union_room_chat/character_select_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AED8.png rename to graphics/union_room_chat/character_select_cursor.png diff --git a/graphics/interface/union_room_chat_icons.png b/graphics/union_room_chat/icons.png similarity index 100% rename from graphics/interface/union_room_chat_icons.png rename to graphics/union_room_chat/icons.png diff --git a/graphics/union_room_chat/unk_845AA64.pal b/graphics/union_room_chat/messages.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA64.pal rename to graphics/union_room_chat/messages.pal diff --git a/graphics/union_room_chat/unk_845AC14.pal b/graphics/union_room_chat/objects.pal similarity index 100% rename from graphics/union_room_chat/unk_845AC14.pal rename to graphics/union_room_chat/objects.pal diff --git a/graphics/interface/union_room_chat_panel.bin b/graphics/union_room_chat/panel.bin similarity index 100% rename from graphics/interface/union_room_chat_panel.bin rename to graphics/union_room_chat/panel.bin diff --git a/graphics/interface/union_room_chat_panel.png b/graphics/union_room_chat/panel.png similarity index 100% rename from graphics/interface/union_room_chat_panel.png rename to graphics/union_room_chat/panel.png diff --git a/graphics/union_room_chat/unk_845AF04.png b/graphics/union_room_chat/r_button.png similarity index 100% rename from graphics/union_room_chat/unk_845AF04.png rename to graphics/union_room_chat/r_button.png diff --git a/graphics/union_room_chat/unk_845AC34.png b/graphics/union_room_chat/selector_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AC34.png rename to graphics/union_room_chat/selector_cursor.png diff --git a/graphics/union_room_chat/unk_845AA24.pal b/graphics/union_room_chat/text_entry.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA24.pal rename to graphics/union_room_chat/text_entry.pal diff --git a/graphics/union_room_chat/unk_845AEB8.png b/graphics/union_room_chat/text_entry_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AEB8.png rename to graphics/union_room_chat/text_entry_cursor.png diff --git a/graphics/union_room_chat/unk_845AA44.pal b/graphics/union_room_chat/unused.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA44.pal rename to graphics/union_room_chat/unused.pal diff --git a/graphics/unknown/unknown_D035A0.png b/graphics/unknown/unknown_D035A0.png deleted file mode 100644 index 0b2ae80f9..000000000 Binary files a/graphics/unknown/unknown_D035A0.png and /dev/null differ diff --git a/graphics/unknown/unknown_D0CAC8.bin b/graphics/unknown/unknown_D0CAC8.bin deleted file mode 100644 index 15379a9ce..000000000 Binary files a/graphics/unknown/unknown_D0CAC8.bin and /dev/null differ diff --git a/graphics/unknown/unknown_D12A44.png b/graphics/unknown/unknown_D12A44.png deleted file mode 100644 index 96c49a992..000000000 Binary files a/graphics/unknown/unknown_D12A44.png and /dev/null differ diff --git a/graphics/unknown/unknown_D12A64.png b/graphics/unknown/unknown_D12A64.png deleted file mode 100644 index 1a82e117e..000000000 Binary files a/graphics/unknown/unknown_D12A64.png and /dev/null differ diff --git a/graphics/unknown/unknown_E861A8.bin b/graphics/unknown/unknown_E861A8.bin deleted file mode 100644 index deae79449..000000000 Binary files a/graphics/unknown/unknown_E861A8.bin and /dev/null differ diff --git a/graphics/unknown/unknown_EAFF60.pal b/graphics/unknown/unknown_EAFF60.pal deleted file mode 100644 index ea7e6ddbf..000000000 --- a/graphics/unknown/unknown_EAFF60.pal +++ /dev/null @@ -1,51 +0,0 @@ -JASC-PAL -0100 -48 -0 0 0 -148 222 164 -164 230 172 -180 238 189 -197 246 205 -213 255 222 -238 255 238 -255 255 255 -189 65 255 -255 255 255 -123 123 123 -255 0 255 -246 238 205 -139 123 74 -180 189 189 -255 255 255 -0 0 255 -164 172 172 -98 106 115 -123 131 139 -139 148 156 -115 156 189 -156 189 222 -148 222 164 -180 164 115 -205 189 148 -213 205 172 -230 222 189 -246 238 205 -139 123 74 -74 131 189 -65 74 90 -98 172 180 -41 41 57 -213 213 222 -205 205 205 -238 238 238 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/unknown/unused_window.png b/graphics/unknown/unused_window.png deleted file mode 100644 index 73086d4d2..000000000 Binary files a/graphics/unknown/unused_window.png and /dev/null differ diff --git a/graphics/unknown/unknown_E87010.pal b/graphics/unused/gray_palette.pal similarity index 100% rename from graphics/unknown/unknown_E87010.pal rename to graphics/unused/gray_palette.pal diff --git a/graphics/unknown/unknown_E9BD08.pal b/graphics/unused/red_palette.pal similarity index 100% rename from graphics/unknown/unknown_E9BD08.pal rename to graphics/unused/red_palette.pal diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 591847f43..2b3f4ea83 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -2,6 +2,7 @@ TILESETGFXDIR := data/tilesets FONTGFXDIR := graphics/fonts FAMECHECKERGFXDIR := graphics/fame_checker INTERFACEGFXDIR := graphics/interface +PARTYMENUGFXDIR := graphics/party_menu BTLANMSPRGFXDIR := graphics/battle_anims/sprites UNUSEDGFXDIR := graphics/unused UNKNOWNGFXDIR := graphics/unknown @@ -17,7 +18,6 @@ EVENTOBJGFXDIR := graphics/object_events FIELDEFFECTSGFXDIR := graphics/field_effects MISCGFXDIR := graphics/misc TEXTWINDOWGFXDIR := graphics/text_window -SLOTMACHINEGFXDIR := graphics/slot_machine TEACHYTVGFXDIR := graphics/teachy_tv SSANNEGFXDIR := graphics/ss_anne ITEMPCGFXDIR := graphics/item_pc @@ -31,6 +31,7 @@ HALLOFFAMEGFXDIR := graphics/hall_of_fame MAPPREVIEWGFXDIR := graphics/map_preview NAMINGGFXDIR := graphics/naming_screen WALLPAPERGFXDIR := graphics/pokemon_storage/wallpapers +JPCONTESTGFXDIR := graphics/contest/japanese types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -158,20 +159,20 @@ $(BATINTGFXDIR)/level_up_banner.4bpp: %.4bpp: %.png $(BATINTGFXDIR)/textbox.gbapal: $(BATINTGFXDIR)/textbox1.gbapal $(BATINTGFXDIR)/textbox2.gbapal cat $^ > $@ -$(UNUSEDGFXDIR)/old_contest.4bpp: $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_floor.4bpp \ - $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp \ - $(UNUSEDGFXDIR)/old_contest_symbols.4bpp \ - $(UNUSEDGFXDIR)/old_contest_meter.4bpp \ - $(UNUSEDGFXDIR)/old_contest_classes.4bpp \ - $(UNUSEDGFXDIR)/old_contest_numbers.4bpp +$(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \ + $(JPCONTESTGFXDIR)/floor.4bpp \ + $(JPCONTESTGFXDIR)/frame_2.4bpp \ + $(JPCONTESTGFXDIR)/symbols.4bpp \ + $(JPCONTESTGFXDIR)/meter.4bpp \ + $(JPCONTESTGFXDIR)/classes.4bpp \ + $(JPCONTESTGFXDIR)/numbers_2.4bpp @cat $^ >$@ -$(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_2_2.4bpp +$(JPCONTESTGFXDIR)/composite_2.4bpp: $(JPCONTESTGFXDIR)/interface.4bpp \ + $(JPCONTESTGFXDIR)/audience.4bpp @cat $^ >$@ -$(UNKNOWNGFXDIR)/unknown_D196E4.4bpp: %.4bpp: %.png +$(JPCONTESTGFXDIR)/voltage.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(BTLANMSPRGFXDIR)/ice_crystals.4bpp: $(BTLANMSPRGFXDIR)/ice_crystals_0.4bpp \ @@ -193,13 +194,13 @@ $(BTLANMSPRGFXDIR)/spark.4bpp: $(BTLANMSPRGFXDIR)/spark_0.4bpp \ $(BTLANMSPRGFXDIR)/spark_1.4bpp @cat $^ >$@ -$(MASKSGFXDIR)/unknown_D2EC24.4bpp: %.4bpp: %.png +$(MASKSGFXDIR)/unused_level_up.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 14 -Wnum_tiles $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 16 -Wnum_tiles -$(INTERFACEGFXDIR)/party_menu_misc.4bpp: %.4bpp: %.png +$(PARTYMENUGFXDIR)/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 62 -Wnum_tiles $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) @@ -245,10 +246,6 @@ $(ROULETTEGFXDIR)/poke_icons2.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \ $(ROULETTEGFXDIR)/makuhita.4bpp @cat $^ >$@ -$(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu.4bpp \ - $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp - @cat $^ >$@ - $(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 822 -Wnum_tiles @@ -462,12 +459,15 @@ graphics/link/321start.4bpp: %.4bpp: %.png $(TEXTWINDOWGFXDIR)/signpost.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 19 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_8466620.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/combos_window.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 66 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_84659d0.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 138 -Wnum_tiles +$(SLOTMACHINEGFXDIR)/leafgreen/bg.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 134 -Wnum_tiles + $(TEACHYTVGFXDIR)/tiles.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 233 -Wnum_tiles @@ -483,9 +483,6 @@ $(TITLESCREENGFXDIR)/firered/box_art_mon.4bpp: %.4bpp: %.png $(TITLESCREENGFXDIR)/leafgreen/box_art_mon.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 123 -Wnum_tiles -$(CREDITSGFXDIR)/unk_8EAE548.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 77 -Wnum_tiles - POKEDEXAREAMARKERSDATADIR := graphics/pokedex/area_markers POKEDEXAREAMARKERFILES := \ @@ -506,7 +503,7 @@ graphics/pokemon/heracross/unk_icon.4bpp: %.4bpp: %.png graphics/misc/emoticons.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 2 -$(ITEMMENUGFXDIR)/bag_tiles.4bpp: %.4bpp: %.png +$(ITEMMENUGFXDIR)/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 55 -Wnum_tiles $(INTROGFXDIR)/scene_1/grass.4bpp: %.4bpp: %.png diff --git a/include/battle.h b/include/battle.h index 507809d01..55871b70c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -518,7 +518,7 @@ struct BattleScripting u8 pursuitDoublesAttacker; u8 reshowMainState; u8 reshowHelperState; - u8 field_23; + u8 levelUpHP; }; struct BattleSpriteInfo diff --git a/include/config.h b/include/config.h index 78651f023..956858e2d 100644 --- a/include/config.h +++ b/include/config.h @@ -13,6 +13,28 @@ // Fire Red likely forgot to define NDEBUG/NOAGBPRN before release, leading // to the inclusion of asserts in the retail ROM. +#ifndef NDEBUG +#define PRETTY_PRINT_OFF (0) +#define PRETTY_PRINT_MINI_PRINTF (1) +#define PRETTY_PRINT_LIBC (2) + +#define LOG_HANDLER_AGB_PRINT (0) +#define LOG_HANDLER_NOCASH_PRINT (1) +#define LOG_HANDLER_MGBA_PRINT (2) + +// Use this switch to choose a handler for pretty printing. +// NOTE: mini_printf supports a custom pretty printing formatter to display preproc encoded strings. (%S) +// some libc distributions (especially dkp arm-libc) will fail to link pretty printing. +#define PRETTY_PRINT_HANDLER (PRETTY_PRINT_OFF) + +// Use this switch to choose a handler for printf output. +// NOTE: These will only work on the respective emulators and should not be used in a productive environment. +// Some emulators or real hardware might (and is allowed to) crash if they are used. +// AGB_PRINT is supported on respective debug units. + +#define LOG_HANDLER (LOG_HANDLER_AGB_PRINT) +#endif // NDEBUG + // Define the game version for use elsewhere #if defined(FIRERED) #define GAME_VERSION VERSION_FIRE_RED diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index b653f5a92..5853f1708 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -28,7 +28,7 @@ #define HOLD_EFFECT_MACHO_BRACE 24 #define HOLD_EFFECT_EXP_SHARE 25 #define HOLD_EFFECT_QUICK_CLAW 26 -#define HOLD_EFFECT_HAPPINESS_UP 27 +#define HOLD_EFFECT_FRIENDSHIP_UP 27 #define HOLD_EFFECT_CURE_ATTRACT 28 #define HOLD_EFFECT_CHOICE_BAND 29 #define HOLD_EFFECT_FLINCH 30 diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h index a5bb77035..888cb6853 100644 --- a/include/constants/item_effects.h +++ b/include/constants/item_effects.h @@ -3,7 +3,7 @@ // field 0 masks #define ITEM0_X_ATTACK 0x0F -#define ITEM0_HIGH_CRIT 0x30 // For Dire Hit, works the same way as move Focus Energy. +#define ITEM0_DIRE_HIT 0x30 // Works the same way as move Focus Energy. #define ITEM0_SACRED_ASH 0x40 #define ITEM0_INFATUATION 0x80 @@ -23,7 +23,7 @@ #define ITEM3_POISON 0x10 #define ITEM3_SLEEP 0x20 #define ITEM3_LEVEL_UP 0x40 -#define ITEM3_MIST 0x80 // For Guard Specs, works the same way as move Mist. +#define ITEM3_GUARD_SPEC 0x80 // Works the same way as the move Mist. #define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP) @@ -50,6 +50,19 @@ #define ITEM5_FRIENDSHIP_ALL (ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID | ITEM5_FRIENDSHIP_HIGH) // fields 6 and onwards are item-specific arguments +#define ITEM_EFFECT_ARG_START 6 + +// Special HP recovery amounts for ITEM4_HEAL_HP +#define ITEM6_HEAL_HP_FULL ((u8) -1) +#define ITEM6_HEAL_HP_HALF ((u8) -2) +#define ITEM6_HEAL_HP_LVL_UP ((u8) -3) + +// Special PP recovery amounts for ITEM4_HEAL_PP +#define ITEM6_HEAL_PP_FULL 0x7F + +// Amount of EV modified by ITEM4_EV_HP, ITEM4_EV_ATK, ITEM5_EV_DEF, ITEM5_EV_SPEED, ITEM5_EV_SPDEF and ITEM5_EV_SPATK +#define ITEM6_ADD_EV 10 +#define ITEM6_SUBTRACT_EV -10 // Used for GetItemEffectType. #define ITEM_EFFECT_X_ITEM 0 diff --git a/include/constants/menu.h b/include/constants/menu.h index aed98dec4..f6ac73efb 100644 --- a/include/constants/menu.h +++ b/include/constants/menu.h @@ -70,6 +70,8 @@ #define MULTICHOICE_JOIN_OR_LEAD 63 #define MULTICHOICE_TRAINER_TOWER_MODE 64 +#define MULTICHOICE_NONE 255 + #define LISTMENU_BADGES 0 #define LISTMENU_SILPHCO_FLOORS 1 #define LISTMENU_ROCKET_HIDEOUT_FLOORS 2 diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 4816800fe..86873cbf4 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -1,298 +1,298 @@ #ifndef GUARD_METATILE_LABELS_H #define GUARD_METATILE_LABELS_H -// gTileset_General -#define METATILE_General_Plain_Mowed 0x001 -#define METATILE_General_ThinTreeTop_Grass 0x00A -#define METATILE_General_WideTreeTopLeft_Grass 0x00B -#define METATILE_General_WideTreeTopRight_Grass 0x00C -#define METATILE_General_Plain_Grass 0x00D -#define METATILE_General_WideTreeTopLeft_Mowed 0x00E -#define METATILE_General_WideTreeTopRight_Mowed 0x00F -#define METATILE_General_ThinTreeTop_Mowed 0x013 -#define METATILE_General_CalmWater 0x12B -#define METATILE_General_Door 0x03D -#define METATILE_General_SlidingSingleDoor 0x062 -#define METATILE_General_SlidingDoubleDoor 0x15B - // gTileset_Building -#define METATILE_Building_PCOff 0x062 -#define METATILE_Building_PCOn 0x063 - -// gTileset_GenericBuilding1 -#define METATILE_GenericBuilding1_PlayersPCOn 0x28A -#define METATILE_GenericBuilding1_PlayersPCOff 0x28F - -// gTileset_Mart -#define METATILE_Mart_CounterMid_Top 0x2BF -#define METATILE_Mart_CounterMid_Bottom 0x2C0 - -// gTileset_PokemonCenter -#define METATILE_PokemonCenter_Floor_ShadeLeft 0x2C5 -#define METATILE_PokemonCenter_CounterBarrier 0x2F9 -#define METATILE_PokemonCenter_NetworkMachine_ScreenLeft_On 0x35A -#define METATILE_PokemonCenter_NetworkMachine_ScreenRight_On 0x35B -#define METATILE_PokemonCenter_NetworkMachine_Ruby 0x35D -#define METATILE_PokemonCenter_NetworkMachine_Sapphire 0x35F -#define METATILE_PokemonCenter_Escalator_Top_Normal 0x2E4 -#define METATILE_PokemonCenter_Escalator_Top_Transition1 0x317 -#define METATILE_PokemonCenter_Escalator_Top_Transition2 0x315 -#define METATILE_PokemonCenter_Escalator_TopNext_Normal 0x2E3 -#define METATILE_PokemonCenter_Escalator_TopNext_Transition1 0x316 -#define METATILE_PokemonCenter_Escalator_TopNext_Transition2 0x314 -#define METATILE_PokemonCenter_Escalator_TopNextRail_Normal 0x2EB -#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition1 0x31E -#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition2 0x31C -#define METATILE_PokemonCenter_Escalator_Bottom_Normal 0x2D9 -#define METATILE_PokemonCenter_Escalator_Bottom_Transition1 0x313 -#define METATILE_PokemonCenter_Escalator_Bottom_Transition2 0x311 -#define METATILE_PokemonCenter_Escalator_BottomRail_Normal 0x2D1 -#define METATILE_PokemonCenter_Escalator_BottomRail_Transition1 0x30B -#define METATILE_PokemonCenter_Escalator_BottomRail_Transition2 0x309 -#define METATILE_PokemonCenter_Escalator_BottomNext_Normal 0x2D8 -#define METATILE_PokemonCenter_Escalator_BottomNext_Transition1 0x312 -#define METATILE_PokemonCenter_Escalator_BottomNext_Transition2 0x310 -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Normal 0x2D0 -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition1 0x30A -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition2 0x308 -#define METATILE_PokemonCenter_CableClubDoor 0x2DE +#define METATILE_Building_PCOff 0x062 +#define METATILE_Building_PCOn 0x063 // gTileset_Cave -#define METATILE_Cave_Floor_Ledge_Top 0x2D1 -#define METATILE_Cave_Floor_Ledge_Bottom 0x2E1 -#define METATILE_Cave_RockBarrier_Top 0x307 -#define METATILE_Cave_RockBarrier_Bottom 0x317 +#define METATILE_Cave_Floor_Ledge_Bottom 0x2E1 +#define METATILE_Cave_Floor_Ledge_Top 0x2D1 +#define METATILE_Cave_RockBarrier_Bottom 0x317 +#define METATILE_Cave_RockBarrier_Top 0x307 -// gTileset_PalletTown -#define METATILE_PalletTown_Door 0x2A3 -#define METATILE_PalletTown_OaksLabDoor 0x2AC - -// gTileset_ViridianCity -#define METATILE_ViridianCity_Door 0x299 - -// gTileset_ViridianForest -#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 -#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 - -// gTileset_PewterCity -#define METATILE_PewterCity_Door 0x2CE +// gTileset_CeladonCity +#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 +#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E +#define METATILE_CeladonCity_DeptStoreDoor 0x294 // gTileset_CeruleanCity -#define METATILE_CeruleanCity_Door 0x298 - -// gTileset_SeaCottage -#define METATILE_SeaCottage_Teleporter_Light_Green 0x28A -#define METATILE_SeaCottage_Teleporter_Light_Yellow 0x2B5 -#define METATILE_SeaCottage_Teleporter_Light_Red 0x2B6 -#define METATILE_SeaCottage_Teleporter_Cable_Top 0x285 -#define METATILE_SeaCottage_Teleporter_Cable_Bottom 0x2B4 -#define METATILE_SeaCottage_Teleporter_CableBall_Top 0x2B9 -#define METATILE_SeaCottage_Teleporter_CableBall_Bottom 0x2BA -#define METATILE_SeaCottage_Teleporter_Door 0x296 -#define METATILE_SeaCottage_Teleporter_Door_HalfGlowing 0x2B7 -#define METATILE_SeaCottage_Teleporter_Door_FullGlowing 0x2B8 - -// gTileset_VermilionCity -#define METATILE_VermilionCity_Door 0x29E -#define METATILE_VermilionCity_SSAnneWarp 0x2E1 - -// gTileset_VermilionGym -#define METATILE_VermilionGym_Floor 0x281 -#define METATILE_VermilionGym_Beam_MidTop 0x285 -#define METATILE_VermilionGym_Beam_MidBottom 0x28D -#define METATILE_VermilionGym_Beam_Node_TopLeft_Off 0x293 -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_Off 0x294 -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_Off 0x295 -#define METATILE_VermilionGym_Beam_Node_TopRight_Off 0x296 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Off 0x29B -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_Off 0x29C -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_Off 0x29D -#define METATILE_VermilionGym_Beam_Node_BottomRight_Off 0x29E -#define METATILE_VermilionGym_Beam_Node_TopLeft_On 0x2A9 -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_On 0x2AA -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_On 0x2AB -#define METATILE_VermilionGym_Beam_Node_TopRight_On 0x2AC -#define METATILE_VermilionGym_Beam_Node_BottomLeft_On 0x2B1 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_On 0x2B2 -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_On 0x2B3 -#define METATILE_VermilionGym_Beam_Node_BottomRight_On 0x2B4 -#define METATILE_VermilionGym_Beam_Node_TopLeft_HalfOn 0x2BB -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_HalfOn 0x2BC -#define METATILE_VermilionGym_Beam_MidTop_HalfOn 0x2BD -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_HalfOn 0x2BE -#define METATILE_VermilionGym_Beam_Node_TopRight_HalfOn 0x2BF -#define METATILE_VermilionGym_Beam_Node_BottomLeft_HalfOn 0x2C3 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_HalfOn 0x2C4 -#define METATILE_VermilionGym_Beam_MidBottom_HalfOn 0x2C5 -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_HalfOn 0x2C6 -#define METATILE_VermilionGym_Beam_Node_BottomRight_HalfOn 0x2C7 - -// gTileset_SSAnne -#define METATILE_SSAnne_Door 0x281 - -// gTileset_LavenderTown -#define METATILE_LavenderTown_Door 0x2A2 - -// gTilset_CeladonCity -#define METATILE_CeladonCity_DeptStoreDoor 0x294 -#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 -#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E - -// gTileset_DepartmentStore -#define METATILE_DepartmentStore_ElevatorDoor 0x28D - -// gTileset_GameCorner -#define METATILE_GameCorner_Floor_ShadeFull 0x292 -#define METATILE_GameCorner_Floor_StairsTop 0x29D -#define METATILE_GameCorner_StairsTop 0x29E -#define METATILE_GameCorner_StairsBottom 0x29F -#define METATILE_GameCorner_PurpleWall_Floor 0x2CF -#define METATILE_GameCorner_PurpleWall_StairsTop 0x2A6 -#define METATILE_GameCorner_PurpleWall_stairsBottom 0x2A7 -#define METATILE_GameCorner_CheckeredFloor_ShadeLeft 0x2E1 -#define METATILE_GameCorner_CounterBarrier 0x2F7 - -// gTileset_SaffronCity -#define METATILE_SaffronCity_Door 0x284 -#define METATILE_SaffronCity_SilphCoDoor 0x2BC - -// gTileset_SilphCo Includes Silph Co, Rocket Hideout/Warehouse, and all Elevators -#define METATILE_SilphCo_HideoutFloor 0x281 -#define METATILE_SilphCo_HideoutFloor_ShadeFull 0x282 -#define METATILE_SilphCo_Arrow_Up 0x2A0 -#define METATILE_SilphCo_Arrow_Left 0x2A1 -#define METATILE_SilphCo_Arrow_Down 0x2A8 -#define METATILE_SilphCo_Arrow_Right 0x2A9 -#define METATILE_SilphCo_HideoutBarrier_TopLeft_Wall 0x2C6 -#define METATILE_SilphCo_HideoutBarrier_TopRight_Wall 0x2C7 -#define METATILE_SilphCo_HideoutBarrier_TopLeft_Floor 0x2CE -#define METATILE_SilphCo_HideoutBarrier_TopRight_Floor 0x2CF -#define METATILE_SilphCo_HideoutBarrier_BottomLeft 0x2D6 -#define METATILE_SilphCo_HideoutBarrier_BottomRight 0x2D7 -#define METATILE_SilphCo_HideoutElevatorDoor 0x2AB -#define METATILE_SilphCo_ElevatorDoor 0x2E2 -#define METATILE_SilphCo_ElevatorWindow_Top0 0x2E8 -#define METATILE_SilphCo_ElevatorWindow_Top1 0x2E9 -#define METATILE_SilphCo_ElevatorWindow_Top2 0x2EA -#define METATILE_SilphCo_ElevatorWindow_Mid0 0x2F0 -#define METATILE_SilphCo_ElevatorWindow_Mid1 0x2F1 -#define METATILE_SilphCo_ElevatorWindow_Mid2 0x2F2 -#define METATILE_SilphCo_ElevatorWindow_Bottom0 0x2F8 -#define METATILE_SilphCo_ElevatorWindow_Bottom1 0x2F9 -#define METATILE_SilphCo_ElevatorWindow_Bottom2 0x2FA -#define METATILE_SilphCo_Floor 0x334 -#define METATILE_SilphCo_Floor_ShadeFull 0x335 -#define METATILE_SilphCo_Floor_WallLeftCorner 0x339 -#define METATILE_SilphCo_Floor_WallRightCorner 0x33A -#define METATILE_SilphCo_Wall_RightEdge 0x346 -#define METATILE_SilphCo_Wall_LeftEdge 0x347 -#define METATILE_SilphCo_HorizontalBarrier_TopLeft 0x3B0 -#define METATILE_SilphCo_HorizontalBarrier_TopRight 0x3B1 -#define METATILE_SilphCo_HorizontalBarrier_BottomLeft 0x3B8 -#define METATILE_SilphCo_HorizontalBarrier_BottomRight 0x3B9 -#define METATILE_SilphCo_VerticalBarrier_TopLeft 0x3C0 -#define METATILE_SilphCo_VerticalBarrier_TopRight 0x3C1 -#define METATILE_SilphCo_VerticalBarrier_MidLeft 0x3C2 -#define METATILE_SilphCo_VerticalBarrier_MidRight 0x3C3 -#define METATILE_SilphCo_VerticalBarrier_BottomLeft 0x3C4 -#define METATILE_SilphCo_VerticalBarrier_BottomRight 0x3C5 - -// gTileset_FuchsiaCity -#define METATILE_FuchsiaCity_Door 0x2BF -#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2 -#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 -#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 -#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 -#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 -#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 -#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 - -// gTileset_CinnabarIsland -#define METATILE_CinnabarIsland_LabDoor 0x2AD +#define METATILE_CeruleanCity_Door 0x298 // gTileset_CinnabarGym #define METATILE_CinnabarGym_Floor 0x281 #define METATILE_CinnabarGym_Floor_ShadeDiagonal 0x282 #define METATILE_CinnabarGym_Floor_ShadeFull 0x289 -#define METATILE_CinnabarGym_Floor_WallRightCorner 0x2C6 #define METATILE_CinnabarGym_Floor_WallLeftCorner 0x2C7 -#define METATILE_CinnabarGym_Floor_WallRightEdge 0x2CE #define METATILE_CinnabarGym_Floor_WallLeftEdge 0x2CF +#define METATILE_CinnabarGym_Floor_WallRightCorner 0x2C6 +#define METATILE_CinnabarGym_Floor_WallRightEdge 0x2CE #define METATILE_CinnabarGym_Wall_RetractedBarrier 0x2D1 -// gTileset_PokemonMansion -#define METATILE_PokemonMansion_Floor 0x284 -#define METATILE_PokemonMansion_Floor_ShadeFull 0x285 -#define METATILE_PokemonMansion_BasementFloor 0x286 -#define METATILE_PokemonMansion_BasementFloor_ShadeFull 0x287 -#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5 -#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD -#define METATILE_PokemonMansion_Wall_EndCap_Basement 0x2B0 -#define METATILE_PokemonMansion_Wall_EndCap 0x2B5 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopLeft 0x2F8 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopMid 0x2F9 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopRight 0x2FA -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft 0x300 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid 0x301 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight 0x302 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft_Basement 0x354 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid_Basement 0x355 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight_Basement 0x356 -#define METATILE_PokemonMansion_Barrier_Vertical_TopWall 0x350 -#define METATILE_PokemonMansion_Barrier_Vertical_TopBase 0x358 -#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow 0x360 -#define METATILE_PokemonMansion_Barrier_Vertical_Mid 0x368 -#define METATILE_PokemonMansion_Barrier_Vertical_Bottom 0x370 -#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow_Basement 0x362 -#define METATILE_PokemonMansion_Barrier_Vertical_Mid_Basement 0x36A -#define METATILE_PokemonMansion_Barrier_Vertical_Bottom_Basement 0x372 -#define METATILE_PokemonMansion_Statue_BlackEyes 0x314 -#define METATILE_PokemonMansion_Statue_BlackEyes_Shade 0x315 -#define METATILE_PokemonMansion_Statue_BlackEyes_Basement 0x316 -#define METATILE_PokemonMansion_Statue_RedEyes 0x34D -#define METATILE_PokemonMansion_Statue_RedEyes_Shade 0x34E -#define METATILE_PokemonMansion_Statue_RedEyes_Basement 0x34F +// gTileset_CinnabarIsland +#define METATILE_CinnabarIsland_LabDoor 0x2AD -// gTileset_PokemonLeague -#define METATILE_PokemonLeague_Door_Top_Open 0x28E -#define METATILE_PokemonLeague_Door_Mid_Open 0x296 -#define METATILE_PokemonLeague_Entry_TopLeft_Closed 0x29D -#define METATILE_PokemonLeague_Entry_TopMid_Closed 0x29E -#define METATILE_PokemonLeague_Entry_TopRight_Closed 0x29F -#define METATILE_PokemonLeague_Entry_BottomLeft_Closed 0x2A5 -#define METATILE_PokemonLeague_Entry_BottomMid_Closed 0x2A6 -#define METATILE_PokemonLeague_Entry_BottomRight_Closed 0x2A7 -#define METATILE_PokemonLeague_Floor_ShadeFull_Lance 0x311 +// gTileset_DepartmentStore +#define METATILE_DepartmentStore_ElevatorDoor 0x28D + +// gTileset_FuchsiaCity +#define METATILE_FuchsiaCity_Door 0x2BF +#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 + +// gTileset_GameCorner +#define METATILE_GameCorner_CheckeredFloor_ShadeLeft 0x2E1 +#define METATILE_GameCorner_CounterBarrier 0x2F7 +#define METATILE_GameCorner_Floor_ShadeFull 0x292 +#define METATILE_GameCorner_Floor_StairsTop 0x29D +#define METATILE_GameCorner_PurpleWall_Floor 0x2CF +#define METATILE_GameCorner_PurpleWall_StairsTop 0x2A6 +#define METATILE_GameCorner_PurpleWall_stairsBottom 0x2A7 +#define METATILE_GameCorner_StairsBottom 0x29F +#define METATILE_GameCorner_StairsTop 0x29E + +// gTileset_General +#define METATILE_General_CalmWater 0x12B +#define METATILE_General_Door 0x03D +#define METATILE_General_Plain_Grass 0x00D +#define METATILE_General_Plain_Mowed 0x001 +#define METATILE_General_SlidingDoubleDoor 0x15B +#define METATILE_General_SlidingSingleDoor 0x062 +#define METATILE_General_ThinTreeTop_Grass 0x00A +#define METATILE_General_ThinTreeTop_Mowed 0x013 +#define METATILE_General_WideTreeTopLeft_Grass 0x00B +#define METATILE_General_WideTreeTopLeft_Mowed 0x00E +#define METATILE_General_WideTreeTopRight_Grass 0x00C +#define METATILE_General_WideTreeTopRight_Mowed 0x00F + +// gTileset_GenericBuilding1 +#define METATILE_GenericBuilding1_PlayersPCOff 0x28F +#define METATILE_GenericBuilding1_PlayersPCOn 0x28A + +// gTileset_LavenderTown +#define METATILE_LavenderTown_Door 0x2A2 + +// gTileset_Mart +#define METATILE_Mart_CounterMid_Bottom 0x2C0 +#define METATILE_Mart_CounterMid_Top 0x2BF // gTileset_MtEmber #define METATILE_MtEmber_CaveEntrance 0x346 -// gTileset_SeafoamIslands -#define METATILE_SeafoamIslands_SlidingIce 0x34B -#define METATILE_SeafoamIslands_UncrackedIce 0x359 -#define METATILE_SeafoamIslands_CrackedIce 0x35A -#define METATILE_SeafoamIslands_IceHole 0x35B +// gTileset_PalletTown +#define METATILE_PalletTown_Door 0x2A3 +#define METATILE_PalletTown_OaksLabDoor 0x2AC -// gTileset_TrainerTower -#define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 -#define METATILE_TrainerTower_CounterBarrier 0x2B4 -#define METATILE_TrainerTower_LobbyElevatorDoor 0x2C3 -#define METATILE_TrainerTower_RoofElevatorDoor 0x356 +// gTileset_PewterCity +#define METATILE_PewterCity_Door 0x2CE + +// gTileset_PokemonCenter +#define METATILE_PokemonCenter_CableClubDoor 0x2DE +#define METATILE_PokemonCenter_CounterBarrier 0x2F9 +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Normal 0x2D0 +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition1 0x30A +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition2 0x308 +#define METATILE_PokemonCenter_Escalator_BottomNext_Normal 0x2D8 +#define METATILE_PokemonCenter_Escalator_BottomNext_Transition1 0x312 +#define METATILE_PokemonCenter_Escalator_BottomNext_Transition2 0x310 +#define METATILE_PokemonCenter_Escalator_BottomRail_Normal 0x2D1 +#define METATILE_PokemonCenter_Escalator_BottomRail_Transition1 0x30B +#define METATILE_PokemonCenter_Escalator_BottomRail_Transition2 0x309 +#define METATILE_PokemonCenter_Escalator_Bottom_Normal 0x2D9 +#define METATILE_PokemonCenter_Escalator_Bottom_Transition1 0x313 +#define METATILE_PokemonCenter_Escalator_Bottom_Transition2 0x311 +#define METATILE_PokemonCenter_Escalator_TopNextRail_Normal 0x2EB +#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition1 0x31E +#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition2 0x31C +#define METATILE_PokemonCenter_Escalator_TopNext_Normal 0x2E3 +#define METATILE_PokemonCenter_Escalator_TopNext_Transition1 0x316 +#define METATILE_PokemonCenter_Escalator_TopNext_Transition2 0x314 +#define METATILE_PokemonCenter_Escalator_Top_Normal 0x2E4 +#define METATILE_PokemonCenter_Escalator_Top_Transition1 0x317 +#define METATILE_PokemonCenter_Escalator_Top_Transition2 0x315 +#define METATILE_PokemonCenter_Floor_ShadeLeft 0x2C5 +#define METATILE_PokemonCenter_NetworkMachine_Ruby 0x35D +#define METATILE_PokemonCenter_NetworkMachine_Sapphire 0x35F +#define METATILE_PokemonCenter_NetworkMachine_ScreenLeft_On 0x35A +#define METATILE_PokemonCenter_NetworkMachine_ScreenRight_On 0x35B + +// gTileset_PokemonLeague +#define METATILE_PokemonLeague_Door_Mid_Open 0x296 +#define METATILE_PokemonLeague_Door_Top_Open 0x28E +#define METATILE_PokemonLeague_Entry_BottomLeft_Closed 0x2A5 +#define METATILE_PokemonLeague_Entry_BottomMid_Closed 0x2A6 +#define METATILE_PokemonLeague_Entry_BottomRight_Closed 0x2A7 +#define METATILE_PokemonLeague_Entry_TopLeft_Closed 0x29D +#define METATILE_PokemonLeague_Entry_TopMid_Closed 0x29E +#define METATILE_PokemonLeague_Entry_TopRight_Closed 0x29F +#define METATILE_PokemonLeague_Floor_ShadeFull_Lance 0x311 + +// gTileset_PokemonMansion +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft 0x300 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft_Basement 0x354 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid 0x301 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid_Basement 0x355 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight 0x302 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight_Basement 0x356 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopLeft 0x2F8 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopMid 0x2F9 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopRight 0x2FA +#define METATILE_PokemonMansion_Barrier_Vertical_Bottom 0x370 +#define METATILE_PokemonMansion_Barrier_Vertical_Bottom_Basement 0x372 +#define METATILE_PokemonMansion_Barrier_Vertical_Mid 0x368 +#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow 0x360 +#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow_Basement 0x362 +#define METATILE_PokemonMansion_Barrier_Vertical_Mid_Basement 0x36A +#define METATILE_PokemonMansion_Barrier_Vertical_TopBase 0x358 +#define METATILE_PokemonMansion_Barrier_Vertical_TopWall 0x350 +#define METATILE_PokemonMansion_BasementFloor 0x286 +#define METATILE_PokemonMansion_BasementFloor_ShadeFull 0x287 +#define METATILE_PokemonMansion_Floor 0x284 +#define METATILE_PokemonMansion_Floor_ShadeFull 0x285 +#define METATILE_PokemonMansion_Statue_BlackEyes 0x314 +#define METATILE_PokemonMansion_Statue_BlackEyes_Basement 0x316 +#define METATILE_PokemonMansion_Statue_BlackEyes_Shade 0x315 +#define METATILE_PokemonMansion_Statue_RedEyes 0x34D +#define METATILE_PokemonMansion_Statue_RedEyes_Basement 0x34F +#define METATILE_PokemonMansion_Statue_RedEyes_Shade 0x34E +#define METATILE_PokemonMansion_Wall_EndCap 0x2B5 +#define METATILE_PokemonMansion_Wall_EndCap_Basement 0x2B0 +#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD +#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5 + +// gTileset_SSAnne +#define METATILE_SSAnne_Door 0x281 + +// gTileset_SaffronCity +#define METATILE_SaffronCity_Door 0x284 +#define METATILE_SaffronCity_SilphCoDoor 0x2BC + +// gTileset_SeaCottage +#define METATILE_SeaCottage_Teleporter_CableBall_Bottom 0x2BA +#define METATILE_SeaCottage_Teleporter_CableBall_Top 0x2B9 +#define METATILE_SeaCottage_Teleporter_Cable_Bottom 0x2B4 +#define METATILE_SeaCottage_Teleporter_Cable_Top 0x285 +#define METATILE_SeaCottage_Teleporter_Door 0x296 +#define METATILE_SeaCottage_Teleporter_Door_FullGlowing 0x2B8 +#define METATILE_SeaCottage_Teleporter_Door_HalfGlowing 0x2B7 +#define METATILE_SeaCottage_Teleporter_Light_Green 0x28A +#define METATILE_SeaCottage_Teleporter_Light_Red 0x2B6 +#define METATILE_SeaCottage_Teleporter_Light_Yellow 0x2B5 + +// gTileset_SeafoamIslands +#define METATILE_SeafoamIslands_CrackedIce 0x35A +#define METATILE_SeafoamIslands_IceHole 0x35B +#define METATILE_SeafoamIslands_SlidingIce 0x34B +#define METATILE_SeafoamIslands_UncrackedIce 0x359 // gTileset_SeviiIslands123 -#define METATILE_SeviiIslands123_Door 0x297 -#define METATILE_SeviiIslands123_GameCornerDoor 0x29B -#define METATILE_SeviiIslands123_PokeCenterDoor 0x2EB +#define METATILE_SeviiIslands123_Door 0x297 +#define METATILE_SeviiIslands123_GameCornerDoor 0x29B +#define METATILE_SeviiIslands123_PokeCenterDoor 0x2EB // gTileset_SeviiIslands45 -#define METATILE_SeviiIslands45_Door 0x29A -#define METATILE_SeviiIslands45_DayCareDoor 0x2B9 -#define METATILE_SeviiIslands45_RocketWarehouseDoor_Locked 0x30B -#define METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked 0x2AF +#define METATILE_SeviiIslands45_DayCareDoor 0x2B9 +#define METATILE_SeviiIslands45_Door 0x29A +#define METATILE_SeviiIslands45_RocketWarehouseDoor_Locked 0x30B +#define METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked 0x2AF // gTileset_SeviiIslands67 #define METATILE_SeviiIslands67_Door 0x30C #define METATILE_SeviiIslands67_DottedHoleDoor_Closed 0x357 #define METATILE_SeviiIslands67_DottedHoleDoor_Open 0x358 +// gTileset_SilphCo +#define METATILE_SilphCo_Arrow_Down 0x2A8 +#define METATILE_SilphCo_Arrow_Left 0x2A1 +#define METATILE_SilphCo_Arrow_Right 0x2A9 +#define METATILE_SilphCo_Arrow_Up 0x2A0 +#define METATILE_SilphCo_ElevatorDoor 0x2E2 +#define METATILE_SilphCo_ElevatorWindow_Bottom0 0x2F8 +#define METATILE_SilphCo_ElevatorWindow_Bottom1 0x2F9 +#define METATILE_SilphCo_ElevatorWindow_Bottom2 0x2FA +#define METATILE_SilphCo_ElevatorWindow_Mid0 0x2F0 +#define METATILE_SilphCo_ElevatorWindow_Mid1 0x2F1 +#define METATILE_SilphCo_ElevatorWindow_Mid2 0x2F2 +#define METATILE_SilphCo_ElevatorWindow_Top0 0x2E8 +#define METATILE_SilphCo_ElevatorWindow_Top1 0x2E9 +#define METATILE_SilphCo_ElevatorWindow_Top2 0x2EA +#define METATILE_SilphCo_Floor 0x334 +#define METATILE_SilphCo_Floor_ShadeFull 0x335 +#define METATILE_SilphCo_Floor_WallLeftCorner 0x339 +#define METATILE_SilphCo_Floor_WallRightCorner 0x33A +#define METATILE_SilphCo_HideoutBarrier_BottomLeft 0x2D6 +#define METATILE_SilphCo_HideoutBarrier_BottomRight 0x2D7 +#define METATILE_SilphCo_HideoutBarrier_TopLeft_Floor 0x2CE +#define METATILE_SilphCo_HideoutBarrier_TopLeft_Wall 0x2C6 +#define METATILE_SilphCo_HideoutBarrier_TopRight_Floor 0x2CF +#define METATILE_SilphCo_HideoutBarrier_TopRight_Wall 0x2C7 +#define METATILE_SilphCo_HideoutElevatorDoor 0x2AB +#define METATILE_SilphCo_HideoutFloor 0x281 +#define METATILE_SilphCo_HideoutFloor_ShadeFull 0x282 +#define METATILE_SilphCo_HorizontalBarrier_BottomLeft 0x3B8 +#define METATILE_SilphCo_HorizontalBarrier_BottomRight 0x3B9 +#define METATILE_SilphCo_HorizontalBarrier_TopLeft 0x3B0 +#define METATILE_SilphCo_HorizontalBarrier_TopRight 0x3B1 +#define METATILE_SilphCo_VerticalBarrier_BottomLeft 0x3C4 +#define METATILE_SilphCo_VerticalBarrier_BottomRight 0x3C5 +#define METATILE_SilphCo_VerticalBarrier_MidLeft 0x3C2 +#define METATILE_SilphCo_VerticalBarrier_MidRight 0x3C3 +#define METATILE_SilphCo_VerticalBarrier_TopLeft 0x3C0 +#define METATILE_SilphCo_VerticalBarrier_TopRight 0x3C1 +#define METATILE_SilphCo_Wall_LeftEdge 0x347 +#define METATILE_SilphCo_Wall_RightEdge 0x346 + +// gTileset_TrainerTower +#define METATILE_TrainerTower_CounterBarrier 0x2B4 +#define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 +#define METATILE_TrainerTower_LobbyElevatorDoor 0x2C3 +#define METATILE_TrainerTower_RoofElevatorDoor 0x356 + +// gTileset_VermilionCity +#define METATILE_VermilionCity_Door 0x29E +#define METATILE_VermilionCity_SSAnneWarp 0x2E1 + +// gTileset_VermilionGym +#define METATILE_VermilionGym_Beam_MidBottom 0x28D +#define METATILE_VermilionGym_Beam_MidBottom_HalfOn 0x2C5 +#define METATILE_VermilionGym_Beam_MidTop 0x285 +#define METATILE_VermilionGym_Beam_MidTop_HalfOn 0x2BD +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_HalfOn 0x2C4 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_Off 0x29C +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_On 0x2B2 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_HalfOn 0x2C3 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Off 0x29B +#define METATILE_VermilionGym_Beam_Node_BottomLeft_On 0x2B1 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_HalfOn 0x2C6 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_Off 0x29D +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_On 0x2B3 +#define METATILE_VermilionGym_Beam_Node_BottomRight_HalfOn 0x2C7 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Off 0x29E +#define METATILE_VermilionGym_Beam_Node_BottomRight_On 0x2B4 +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_HalfOn 0x2BC +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_Off 0x294 +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_On 0x2AA +#define METATILE_VermilionGym_Beam_Node_TopLeft_HalfOn 0x2BB +#define METATILE_VermilionGym_Beam_Node_TopLeft_Off 0x293 +#define METATILE_VermilionGym_Beam_Node_TopLeft_On 0x2A9 +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_HalfOn 0x2BE +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_Off 0x295 +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_On 0x2AB +#define METATILE_VermilionGym_Beam_Node_TopRight_HalfOn 0x2BF +#define METATILE_VermilionGym_Beam_Node_TopRight_Off 0x296 +#define METATILE_VermilionGym_Beam_Node_TopRight_On 0x2AC +#define METATILE_VermilionGym_Floor 0x281 + +// gTileset_ViridianCity +#define METATILE_ViridianCity_Door 0x299 + +// gTileset_ViridianForest +#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 +#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 + #endif // GUARD_METATILE_LABELS_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 83d7ecb2d..21c678744 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -2,95 +2,95 @@ #define GUARD_CONSTANTS_POKEMON_H // For (Set|Get)(Box)?MonData -#define MON_DATA_PERSONALITY 0 -#define MON_DATA_OT_ID 1 -#define MON_DATA_NICKNAME 2 -#define MON_DATA_LANGUAGE 3 -#define MON_DATA_SANITY_IS_BAD_EGG 4 -#define MON_DATA_SANITY_HAS_SPECIES 5 -#define MON_DATA_SANITY_IS_EGG 6 -#define MON_DATA_OT_NAME 7 -#define MON_DATA_MARKINGS 8 -#define MON_DATA_CHECKSUM 9 -#define MON_DATA_ENCRYPT_SEPARATOR 10 -#define MON_DATA_SPECIES 11 -#define MON_DATA_HELD_ITEM 12 -#define MON_DATA_MOVE1 13 -#define MON_DATA_MOVE2 14 -#define MON_DATA_MOVE3 15 -#define MON_DATA_MOVE4 16 -#define MON_DATA_PP1 17 -#define MON_DATA_PP2 18 -#define MON_DATA_PP3 19 -#define MON_DATA_PP4 20 -#define MON_DATA_PP_BONUSES 21 -#define MON_DATA_COOL 22 -#define MON_DATA_BEAUTY 23 -#define MON_DATA_CUTE 24 -#define MON_DATA_EXP 25 -#define MON_DATA_HP_EV 26 -#define MON_DATA_ATK_EV 27 -#define MON_DATA_DEF_EV 28 -#define MON_DATA_SPEED_EV 29 -#define MON_DATA_SPATK_EV 30 -#define MON_DATA_SPDEF_EV 31 -#define MON_DATA_FRIENDSHIP 32 -#define MON_DATA_SMART 33 -#define MON_DATA_POKERUS 34 -#define MON_DATA_MET_LOCATION 35 -#define MON_DATA_MET_LEVEL 36 -#define MON_DATA_MET_GAME 37 -#define MON_DATA_POKEBALL 38 -#define MON_DATA_HP_IV 39 -#define MON_DATA_ATK_IV 40 -#define MON_DATA_DEF_IV 41 -#define MON_DATA_SPEED_IV 42 -#define MON_DATA_SPATK_IV 43 -#define MON_DATA_SPDEF_IV 44 -#define MON_DATA_IS_EGG 45 -#define MON_DATA_ABILITY_NUM 46 -#define MON_DATA_TOUGH 47 -#define MON_DATA_SHEEN 48 -#define MON_DATA_OT_GENDER 49 -#define MON_DATA_COOL_RIBBON 50 -#define MON_DATA_BEAUTY_RIBBON 51 -#define MON_DATA_CUTE_RIBBON 52 -#define MON_DATA_SMART_RIBBON 53 -#define MON_DATA_TOUGH_RIBBON 54 -#define MON_DATA_STATUS 55 -#define MON_DATA_LEVEL 56 -#define MON_DATA_HP 57 -#define MON_DATA_MAX_HP 58 -#define MON_DATA_ATK 59 -#define MON_DATA_DEF 60 -#define MON_DATA_SPEED 61 -#define MON_DATA_SPATK 62 -#define MON_DATA_SPDEF 63 -#define MON_DATA_MAIL 64 -#define MON_DATA_SPECIES2 65 -#define MON_DATA_IVS 66 -#define MON_DATA_CHAMPION_RIBBON 67 -#define MON_DATA_WINNING_RIBBON 68 -#define MON_DATA_VICTORY_RIBBON 69 -#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_UNUSED_RIBBONS 79 -#define MON_DATA_EVENT_LEGAL 80 -#define MON_DATA_KNOWN_MOVES 81 -#define MON_DATA_RIBBON_COUNT 82 -#define MON_DATA_RIBBONS 83 -#define MON_DATA_ATK2 84 -#define MON_DATA_DEF2 85 -#define MON_DATA_SPEED2 86 -#define MON_DATA_SPATK2 87 -#define MON_DATA_SPDEF2 88 +#define MON_DATA_PERSONALITY 0 +#define MON_DATA_OT_ID 1 +#define MON_DATA_NICKNAME 2 +#define MON_DATA_LANGUAGE 3 +#define MON_DATA_SANITY_IS_BAD_EGG 4 +#define MON_DATA_SANITY_HAS_SPECIES 5 +#define MON_DATA_SANITY_IS_EGG 6 +#define MON_DATA_OT_NAME 7 +#define MON_DATA_MARKINGS 8 +#define MON_DATA_CHECKSUM 9 +#define MON_DATA_ENCRYPT_SEPARATOR 10 +#define MON_DATA_SPECIES 11 +#define MON_DATA_HELD_ITEM 12 +#define MON_DATA_MOVE1 13 +#define MON_DATA_MOVE2 14 +#define MON_DATA_MOVE3 15 +#define MON_DATA_MOVE4 16 +#define MON_DATA_PP1 17 +#define MON_DATA_PP2 18 +#define MON_DATA_PP3 19 +#define MON_DATA_PP4 20 +#define MON_DATA_PP_BONUSES 21 +#define MON_DATA_COOL 22 +#define MON_DATA_BEAUTY 23 +#define MON_DATA_CUTE 24 +#define MON_DATA_EXP 25 +#define MON_DATA_HP_EV 26 +#define MON_DATA_ATK_EV 27 +#define MON_DATA_DEF_EV 28 +#define MON_DATA_SPEED_EV 29 +#define MON_DATA_SPATK_EV 30 +#define MON_DATA_SPDEF_EV 31 +#define MON_DATA_FRIENDSHIP 32 +#define MON_DATA_SMART 33 +#define MON_DATA_POKERUS 34 +#define MON_DATA_MET_LOCATION 35 +#define MON_DATA_MET_LEVEL 36 +#define MON_DATA_MET_GAME 37 +#define MON_DATA_POKEBALL 38 +#define MON_DATA_HP_IV 39 +#define MON_DATA_ATK_IV 40 +#define MON_DATA_DEF_IV 41 +#define MON_DATA_SPEED_IV 42 +#define MON_DATA_SPATK_IV 43 +#define MON_DATA_SPDEF_IV 44 +#define MON_DATA_IS_EGG 45 +#define MON_DATA_ABILITY_NUM 46 +#define MON_DATA_TOUGH 47 +#define MON_DATA_SHEEN 48 +#define MON_DATA_OT_GENDER 49 +#define MON_DATA_COOL_RIBBON 50 +#define MON_DATA_BEAUTY_RIBBON 51 +#define MON_DATA_CUTE_RIBBON 52 +#define MON_DATA_SMART_RIBBON 53 +#define MON_DATA_TOUGH_RIBBON 54 +#define MON_DATA_STATUS 55 +#define MON_DATA_LEVEL 56 +#define MON_DATA_HP 57 +#define MON_DATA_MAX_HP 58 +#define MON_DATA_ATK 59 +#define MON_DATA_DEF 60 +#define MON_DATA_SPEED 61 +#define MON_DATA_SPATK 62 +#define MON_DATA_SPDEF 63 +#define MON_DATA_MAIL 64 +#define MON_DATA_SPECIES_OR_EGG 65 +#define MON_DATA_IVS 66 +#define MON_DATA_CHAMPION_RIBBON 67 +#define MON_DATA_WINNING_RIBBON 68 +#define MON_DATA_VICTORY_RIBBON 69 +#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_UNUSED_RIBBONS 79 +#define MON_DATA_MODERN_FATEFUL_ENCOUNTER 80 +#define MON_DATA_KNOWN_MOVES 81 +#define MON_DATA_RIBBON_COUNT 82 +#define MON_DATA_RIBBONS 83 +#define MON_DATA_ATK2 84 +#define MON_DATA_DEF2 85 +#define MON_DATA_SPEED2 86 +#define MON_DATA_SPATK2 87 +#define MON_DATA_SPDEF2 88 // Pokemon types #define TYPE_NONE 255 @@ -115,21 +115,21 @@ #define NUMBER_OF_MON_TYPES 18 // Pokemon egg groups -#define EGG_GROUP_NONE 0 -#define EGG_GROUP_MONSTER 1 -#define EGG_GROUP_WATER_1 2 -#define EGG_GROUP_BUG 3 -#define EGG_GROUP_FLYING 4 -#define EGG_GROUP_FIELD 5 -#define EGG_GROUP_FAIRY 6 -#define EGG_GROUP_GRASS 7 -#define EGG_GROUP_HUMAN_LIKE 8 -#define EGG_GROUP_WATER_3 9 -#define EGG_GROUP_MINERAL 10 -#define EGG_GROUP_AMORPHOUS 11 -#define EGG_GROUP_WATER_2 12 -#define EGG_GROUP_DITTO 13 -#define EGG_GROUP_DRAGON 14 +#define EGG_GROUP_NONE 0 +#define EGG_GROUP_MONSTER 1 +#define EGG_GROUP_WATER_1 2 +#define EGG_GROUP_BUG 3 +#define EGG_GROUP_FLYING 4 +#define EGG_GROUP_FIELD 5 +#define EGG_GROUP_FAIRY 6 +#define EGG_GROUP_GRASS 7 +#define EGG_GROUP_HUMAN_LIKE 8 +#define EGG_GROUP_WATER_3 9 +#define EGG_GROUP_MINERAL 10 +#define EGG_GROUP_AMORPHOUS 11 +#define EGG_GROUP_WATER_2 12 +#define EGG_GROUP_DITTO 13 +#define EGG_GROUP_DRAGON 14 #define EGG_GROUP_UNDISCOVERED 15 #define EGG_GROUPS_PER_MON 2 @@ -184,23 +184,29 @@ // Shiny odds #define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536 +#define MAX_LEVEL 100 + +#define OT_ID_PLAYER_ID 0 +#define OT_ID_PRESET 1 +#define OT_ID_RANDOM_NO_SHINY 2 + +#define MON_GIVEN_TO_PARTY 0 +#define MON_GIVEN_TO_PC 1 +#define MON_CANT_GIVE 2 + +#define PLAYER_HAS_TWO_USABLE_MONS 0 +#define PLAYER_HAS_ONE_MON 1 +#define PLAYER_HAS_ONE_USABLE_MON 2 + // Learning moves #define MON_ALREADY_KNOWS_MOVE 0xFFFE #define MON_HAS_MAX_MOVES 0xFFFF -#define PLAYER_HAS_TWO_USABLE_MONS 0x0 -#define PLAYER_HAS_ONE_MON 0x1 -#define PLAYER_HAS_ONE_USABLE_MON 0x2 +#define LEVEL_UP_MOVE_ID 0x01FF +#define LEVEL_UP_MOVE_LV 0xFE00 +#define LEVEL_UP_END 0xFFFF -#define MAX_LEVEL 100 - -#define OT_ID_RANDOM_NO_SHINY 2 -#define OT_ID_PRESET 1 -#define OT_ID_PLAYER_ID 0 - -#define MON_GIVEN_TO_PARTY 0x0 -#define MON_GIVEN_TO_PC 0x1 -#define MON_CANT_GIVE 0x2 +#define MAX_LEVEL_UP_MOVES 20 #define MON_MALE 0x00 #define MON_FEMALE 0xFE @@ -217,6 +223,10 @@ #define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 8 #define FRIENDSHIP_EVENT_FAINT_LARGE 9 +#define MAX_FRIENDSHIP 255 +#define MAX_SHEEN 255 +#define MAX_CONDITION 255 + #define MAX_PER_STAT_IVS 31 #define MAX_IV_MASK 31 #define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) @@ -224,8 +234,52 @@ #define MAX_TOTAL_EVS 510 #define EV_ITEM_RAISE_LIMIT 100 -#define PARTY_SIZE 6 -#define BOX_NAME_LENGTH 8 +// Battle move flags +#define FLAG_MAKES_CONTACT (1 << 0) +#define FLAG_PROTECT_AFFECTED (1 << 1) +#define FLAG_MAGIC_COAT_AFFECTED (1 << 2) +#define FLAG_SNATCH_AFFECTED (1 << 3) +#define FLAG_MIRROR_MOVE_AFFECTED (1 << 4) +#define FLAG_KINGS_ROCK_AFFECTED (1 << 5) + +// Growth rates +#define GROWTH_MEDIUM_FAST 0 +#define GROWTH_ERRATIC 1 +#define GROWTH_FLUCTUATING 2 +#define GROWTH_MEDIUM_SLOW 3 +#define GROWTH_FAST 4 +#define GROWTH_SLOW 5 + +// Body colors for pokedex search +#define BODY_COLOR_RED 0 +#define BODY_COLOR_BLUE 1 +#define BODY_COLOR_YELLOW 2 +#define BODY_COLOR_GREEN 3 +#define BODY_COLOR_BLACK 4 +#define BODY_COLOR_BROWN 5 +#define BODY_COLOR_PURPLE 6 +#define BODY_COLOR_GRAY 7 +#define BODY_COLOR_WHITE 8 +#define BODY_COLOR_PINK 9 + +// Evolution types +#define EVO_FRIENDSHIP 1 // Pokémon levels up with friendship ≥ 220 +#define EVO_FRIENDSHIP_DAY 2 // Pokémon levels up during the day with friendship ≥ 220 +#define EVO_FRIENDSHIP_NIGHT 3 // Pokémon levels up at night with friendship ≥ 220 +#define EVO_LEVEL 4 // Pokémon reaches the specified level +#define EVO_TRADE 5 // Pokémon is traded +#define EVO_TRADE_ITEM 6 // Pokémon is traded while it's holding the specified item +#define EVO_ITEM 7 // specified item is used on Pokémon +#define EVO_LEVEL_ATK_GT_DEF 8 // Pokémon reaches the specified level with attack > defense +#define EVO_LEVEL_ATK_EQ_DEF 9 // Pokémon reaches the specified level with attack = defense +#define EVO_LEVEL_ATK_LT_DEF 10 // Pokémon reaches the specified level with attack < defense +#define EVO_LEVEL_SILCOON 11 // Pokémon reaches the specified level with a Silcoon personality value +#define EVO_LEVEL_CASCOON 12 // Pokémon reaches the specified level with a Cascoon personality value +#define EVO_LEVEL_NINJASK 13 // Pokémon reaches the specified level (special value for Ninjask) +#define EVO_LEVEL_SHEDINJA 14 // Pokémon reaches the specified level (special value for Shedinja) +#define EVO_BEAUTY 15 // Pokémon levels up with beauty ≥ specified value + +#define EVOS_PER_MON 5 #define EVO_MODE_NORMAL 0 #define EVO_MODE_TRADE 1 @@ -236,6 +290,11 @@ #define MON_PIC_HEIGHT 64 #define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) +// Most pokemon have 1 frame. There are 2 exceptions: +// - Castform has 4 frames, 1 for each form +// - Deoxys has 2 frames, 1 for each form +#define MAX_MON_PIC_FRAMES 4 + // used by ShouldIgnoreDeoxysForm #define DEOXYS_CHECK_BATTLE_SPRITE 1 #define DEOXYS_CHECK_TRADE_MAIN 3 diff --git a/include/field_specials.h b/include/field_specials.h index 7bc1e6ad1..b5d1f5c7f 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -3,14 +3,6 @@ #include "global.h" -enum HiddenItemAttr -{ - HIDDEN_ITEM_ID = 0, - HIDDEN_ITEM_FLAG, - HIDDEN_ITEM_QUANTITY, - HIDDEN_ITEM_UNDERFOOT -}; - u8 GetLeadMonIndex(void); s32 CountDigits(s32 number); void TV_PrintIntToStringVar(u8 varidx, s32 number); diff --git a/include/fieldmap.h b/include/fieldmap.h index 65ab57a1e..a23b6c428 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -33,8 +33,8 @@ void GetCameraCoords(u16 *, u16 *); bool8 MapGridGetCollisionAt(s32, s32); s32 GetMapBorderIdAt(s32, s32); bool32 CanCameraMoveInDirection(s32); -const struct MapHeader * GetMapHeaderFromConnection(struct MapConnection * connection); -struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); +const struct MapHeader * GetMapHeaderFromConnection(const struct MapConnection * connection); +const struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); void ApplyGlobalTintToPaletteSlot(u8 slot, u8 count); void SaveMapView(void); u32 ExtractMetatileAttribute(u32 attributes, u8 attributeType); diff --git a/include/gba/isagbprint.h b/include/gba/isagbprint.h index 7808b174c..de14b289e 100644 --- a/include/gba/isagbprint.h +++ b/include/gba/isagbprint.h @@ -1,55 +1,69 @@ #ifndef GUARD_GBA_ISAGBPRINT_H #define GUARD_GBA_ISAGBPRINT_H +#include "gba/types.h" + +#define MGBA_LOG_FATAL (0) +#define MGBA_LOG_ERROR (1) +#define MGBA_LOG_WARN (2) +#define MGBA_LOG_INFO (3) +#define MGBA_LOG_DEBUG (4) + #ifdef NDEBUG +#define DebugPrintf(pBuf, ...) +#define DebugPrintfLevel(level, pBuf, ...) +#define MgbaOpen() +#define MgbaClose() #define AGBPrintInit() -#define AGBPutc(cChr) -#define AGBPrint(pBuf) -#define AGBPrintf(pBuf, ...) -#define AGBPrintFlush1Block() -#define AGBPrintFlush() -#define AGBAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) #else -void AGBPrintInit(void); -void AGBPutc(const char cChr); -void AGBPrint(const char *pBuf); + +bool32 MgbaOpen(void); +void MgbaClose(void); +void MgbaPrintf(s32 level, const char *pBuf, ...); +void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram); +void NoCashGBAPrintf(const char *pBuf, ...); +void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram); void AGBPrintf(const char *pBuf, ...); -void AGBPrintFlush1Block(void); -void AGBPrintFlush(void); void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram); +void AGBPrintInit(void); + +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) + +#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__) + +#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT) + +#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__) + +#else // Default to AGBPrint + +#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__) + #endif - -#undef AGB_ASSERT -#ifdef NDEBUG -#define AGB_ASSERT(exp) -#else -#define AGB_ASSERT(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 1); -#endif - -#undef AGB_WARNING -#ifdef NDEBUG -#define AGB_WARNING(exp) -#else -#define AGB_WARNING(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 0); -#endif - -// for matching purposes - -#if MODERN -#define AGB_ASSERT_EX(exp, file, line) AGB_ASSERT(exp) -#define AGB_WARNING_EX(exp, file, line) AGB_WARNING(exp) -#else -#ifdef NDEBUG -#define AGB_ASSERT_EX(exp, file, line) -#else -#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 1); #endif #ifdef NDEBUG -#define AGB_WARNING_EX(exp, file, line) + +#define AGB_ASSERT(exp) +#define AGB_WARNING(exp) +#define AGB_ASSERT_EX(exp, file, line) +#define AGB_WARNING_EX(exp, file, line) + #else -#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 0); -#endif + +#define AGB_ASSERT(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, TRUE) +#define AGB_WARNING(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, FALSE) + +#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, FALSE); +#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, TRUE); + #endif #endif // GUARD_GBA_ISAGBPRINT_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 079b0a4b6..e2828ec0c 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -50,6 +50,31 @@ enum TILE_TERRAIN_WATERFALL, }; +// Identifiers for the hidden item data stored in BgEvent's u32 hiddenItem +enum +{ + HIDDEN_ITEM_ITEM, + HIDDEN_ITEM_FLAG, + HIDDEN_ITEM_QUANTITY, + HIDDEN_ITEM_UNDERFOOT +}; + +// Masks/shifts to read the data above from the u32 hiddenItem, calculated from size. +#define HIDDEN_ITEM_ITEM_BITS 16 +#define HIDDEN_ITEM_FLAG_BITS 8 +#define HIDDEN_ITEM_QUANTITY_BITS 7 +#define HIDDEN_ITEM_UNDERFOOT_BITS 1 + +#define HIDDEN_ITEM_ITEM_SHIFT 0 +#define HIDDEN_ITEM_FLAG_SHIFT (HIDDEN_ITEM_ITEM_SHIFT + HIDDEN_ITEM_ITEM_BITS) +#define HIDDEN_ITEM_QUANTITY_SHIFT (HIDDEN_ITEM_FLAG_SHIFT + HIDDEN_ITEM_FLAG_BITS) +#define HIDDEN_ITEM_UNDERFOOT_SHIFT (HIDDEN_ITEM_QUANTITY_SHIFT + HIDDEN_ITEM_QUANTITY_BITS) + +#define GET_HIDDEN_ITEM_ITEM(raw) (((raw) >> HIDDEN_ITEM_ITEM_SHIFT) & ((1 << HIDDEN_ITEM_ITEM_BITS) - 1)) +#define GET_HIDDEN_ITEM_FLAG(raw) (((raw) >> HIDDEN_ITEM_FLAG_SHIFT) & ((1 << HIDDEN_ITEM_FLAG_BITS) - 1)) +#define GET_HIDDEN_ITEM_QUANTITY(raw) (((raw) >> HIDDEN_ITEM_QUANTITY_SHIFT) & ((1 << HIDDEN_ITEM_QUANTITY_BITS) - 1)) +#define GET_HIDDEN_ITEM_UNDERFOOT(raw)(((raw) >> HIDDEN_ITEM_UNDERFOOT_SHIFT) & ((1 << HIDDEN_ITEM_UNDERFOOT_BITS) - 1)) + typedef void (*TilesetCB)(void); struct Tileset @@ -67,10 +92,10 @@ struct MapLayout { /*0x00*/ s32 width; /*0x04*/ s32 height; - /*0x08*/ u16 *border; - /*0x0c*/ u16 *map; - /*0x10*/ struct Tileset *primaryTileset; - /*0x14*/ struct Tileset *secondaryTileset; + /*0x08*/ const u16 *border; + /*0x0c*/ const u16 *map; + /*0x10*/ const struct Tileset *primaryTileset; + /*0x14*/ const struct Tileset *secondaryTileset; /*0x18*/ u8 borderWidth; /*0x19*/ u8 borderHeight; }; @@ -123,7 +148,7 @@ struct CoordEvent u8 elevation; u16 trigger; u16 index; - u8 *script; + const u8 *script; }; struct BgEvent @@ -132,14 +157,8 @@ struct BgEvent u8 elevation; u8 kind; // The "kind" field determines how to access bgUnion union below. union { - u8 *script; - struct { - u32 itemId:16; - u32 hiddenItemId:8; // flag offset to determine flag lookup - u32 quantity:7; - u32 isUnderfoot:1; - } hiddenItemStr; - u32 hiddenItem; + const u8 *script; + u32 hiddenItem; // Contains all the hidden item data. See GET_HIDDEN_ITEM_* defines further up } bgUnion; }; @@ -149,10 +168,10 @@ struct MapEvents u8 warpCount; u8 coordEventCount; u8 bgEventCount; - struct ObjectEventTemplate *objectEvents; - struct WarpEvent *warps; - struct CoordEvent *coordEvents; - struct BgEvent *bgEvents; + const struct ObjectEventTemplate *objectEvents; + const struct WarpEvent *warps; + const struct CoordEvent *coordEvents; + const struct BgEvent *bgEvents; }; struct MapConnection @@ -166,7 +185,7 @@ struct MapConnection struct MapConnections { s32 count; - struct MapConnection *connections; + const struct MapConnection *connections; }; struct MapHeader diff --git a/include/graphics.h b/include/graphics.h index e81098e0c..eceb39598 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2751,113 +2751,6 @@ extern const u16 gFireRedMenuElements2_Pal[]; extern const u8 gItemIcon_QuestionMark[]; extern const u8 gItemIconPalette_QuestionMark[]; -extern const u8 gUnknown_08DB7AA0[]; -extern const u8 gUnknown_08DB7B34[]; -extern const u8 gUnknown_08DB7B5C[]; -extern const u8 gUnknown_08DB7BEC[]; -extern const u8 gUnknown_08DB7C08[]; -extern const u8 gUnknown_08DB7CE8[]; -extern const u8 gUnknown_08DB7D08[]; -extern const u8 gUnknown_08DB7DCC[]; -extern const u8 gUnknown_08DB7DF4[]; -extern const u8 gUnknown_08DB7EA0[]; -extern const u8 gUnknown_08DB7EC4[]; -extern const u8 gUnknown_08DB7F60[]; -extern const u8 gUnknown_08DB7F7C[]; -extern const u8 gUnknown_08DB8070[]; -extern const u8 gUnknown_08DB808C[]; -extern const u8 gUnknown_08DB8138[]; -extern const u8 gUnknown_08DB8160[]; -extern const u8 gUnknown_08DB8218[]; -extern const u8 gUnknown_08DB823C[]; -extern const u8 gUnknown_08DB8300[]; -extern const u8 gUnknown_08DB8328[]; -extern const u8 gUnknown_08DB8430[]; -extern const u8 gUnknown_08DB8458[]; -extern const u8 gUnknown_08DB8528[]; -extern const u8 gUnknown_08DB854C[]; -extern const u8 gUnknown_08DB862C[]; -extern const u8 gUnknown_08DB8654[]; -extern const u8 gUnknown_08DB86C4[]; -extern const u8 gUnknown_08DB86E0[]; -extern const u8 gUnknown_08DB8750[]; -extern const u8 gUnknown_08DB876C[]; -extern const u8 gUnknown_08DB87DC[]; -extern const u8 gUnknown_08DB87F8[]; -extern const u8 gUnknown_08DB88D8[]; -extern const u8 gUnknown_08DB8900[]; -extern const u8 gUnknown_08DB89E0[]; -extern const u8 gUnknown_08DB8A08[]; -extern const u8 gUnknown_08DB8A68[]; -extern const u8 gUnknown_08DB8A84[]; -extern const u8 gUnknown_08DB8B40[]; -extern const u8 gUnknown_08DB8B68[]; -extern const u8 gUnknown_08DB8C40[]; -extern const u8 gUnknown_08DB8C5C[]; -extern const u8 gUnknown_08DB8CF4[]; -extern const u8 gUnknown_08DB8D18[]; -extern const u8 gUnknown_08DB8DB0[]; -extern const u8 gUnknown_08DB8DD4[]; -extern const u8 gUnknown_08DB8E80[]; -extern const u8 gUnknown_08DB8EA0[]; -extern const u8 gUnknown_08DB8F58[]; -extern const u8 gUnknown_08DB8F7C[]; -extern const u8 gUnknown_08DB9038[]; -extern const u8 gUnknown_08DB9058[]; -extern const u8 gUnknown_08DB9130[]; -extern const u8 gUnknown_08DB9154[]; -extern const u8 gUnknown_08DB9218[]; -extern const u8 gUnknown_08DB9234[]; -extern const u8 gUnknown_08DB92FC[]; -extern const u8 gUnknown_08DB931C[]; -extern const u8 gUnknown_08DB93E8[]; -extern const u8 gUnknown_08DB940C[]; -extern const u8 gUnknown_08DB94CC[]; -extern const u8 gUnknown_08DB94E8[]; -extern const u8 gUnknown_08DB95AC[]; -extern const u8 gUnknown_08DB95D0[]; -extern const u8 gUnknown_08DB96C4[]; -extern const u8 gUnknown_08DB96EC[]; -extern const u8 gUnknown_08DB97F4[]; -extern const u8 gUnknown_08DB981C[]; -extern const u8 gUnknown_08DB9908[]; -extern const u8 gUnknown_08DB9930[]; -extern const u8 gUnknown_08DB9A54[]; -extern const u8 gUnknown_08DB9A7C[]; -extern const u8 gUnknown_08DB9B7C[]; -extern const u8 gUnknown_08DB9BA4[]; -extern const u8 gUnknown_08DB9CB0[]; -extern const u8 gUnknown_08DB9CD8[]; -extern const u8 gUnknown_08DB9DAC[]; -extern const u8 gUnknown_08DB9DD4[]; -extern const u8 gUnknown_08DB9EE4[]; -extern const u8 gUnknown_08DB9F08[]; -extern const u8 gUnknown_08DB9FFC[]; -extern const u8 gUnknown_08DBA020[]; -extern const u8 gUnknown_08DBA12C[]; -extern const u8 gUnknown_08DCC05C[]; -extern const u16 gUnknown_08DCC01C[]; -extern const u16 gUnknown_08DCC03C[]; -extern const u8 gUnknown_08DCC648[]; -extern const u8 gUnknown_08DCC908[]; -extern const u8 gUnknown_08DD87C0[]; -extern const u8 gUnknown_08DD8EE0[]; -extern const u16 gUnknown_08DD8780[]; -extern const u8 gUnknown_08DD90E0[]; -extern const u8 gUnknown_08DD9718[]; -extern const u16 gUnknown_08DD9080[]; -extern const u8 gUnknown_08DD98B4[]; -extern const u8 gUnknown_08DD9E58[]; -extern const u16 gUnknown_08DD9874[]; -extern const u8 gUnknown_08DDA02C[]; -extern const u8 gUnknown_08DDA63C[]; -extern const u16 gUnknown_08DD9FEC[]; -extern const u8 gUnknown_08DDA840[]; -extern const u8 gUnknown_08DDAE40[]; -extern const u16 gUnknown_08DDA800[]; -extern const u8 gUnknown_08DDB020[]; -extern const u8 gUnknown_08DDB2C4[]; -extern const u16 gUnknown_08DDAFE0[]; // fame_checker extern const u16 gFameCheckerBgPals[0x30]; @@ -4343,12 +4236,12 @@ extern const u32 gPartyMenuBg_Tilemap[]; extern const u32 gPartyMenuBg_Pal[]; // credits -extern const u32 gCreditsPokeballBgGfxTiles[]; -extern const u32 gCreditsPokeballBgGfxMap[]; -extern const u16 gCreditsMonBackdropPals[][16]; -extern const u16 gCreditsAllRightsReservedGfxPal[]; -extern const u8 gCreditsAllRightsReservedGfxTiles[]; -extern const u8 gCreditsAllRightsReservedGfxMap[]; +extern const u32 gCreditsMonPokeball_Tiles[]; +extern const u32 gCreditsMonPokeball_Tilemap[]; +extern const u16 gCreditsMonPokeball_Pals[][16]; +extern const u16 gCreditsCopyright_Pal[]; +extern const u8 gCreditsCopyright_Tiles[]; +extern const u8 gCreditsCopyright_Tilemap[]; // berry_pouch extern const u32 gBerryPouchSpriteTiles[]; @@ -4837,9 +4730,9 @@ extern const u32 gFile_graphics_misc_confetti_sheet[]; extern const u32 gFile_graphics_misc_confetti_palette[]; // learn_move -extern const u16 gUnknown_8E97DDC[]; -extern const u32 gUnknown_8E97DFC[]; -extern const u32 gUnknown_8E97EC4[]; +extern const u16 gMoveRelearner_Pal[]; +extern const u32 gMoveRelearner_Gfx[]; +extern const u32 gMoveRelearner_Tilemap[]; // shop menu extern const u32 gBuyMenuFrame_Gfx[]; @@ -4866,22 +4759,22 @@ extern const u16 gBattleInterface_Healthbox_Pal[]; extern const u16 gBattleInterface_Healthbar_Pal[]; // item_menu -extern const u32 gUnknown_8E830CC[]; -extern const u32 gUnknown_8E832C0[]; -extern const u32 gUnknown_8E83444[]; +extern const u32 gBagBg_Gfx[]; +extern const u32 gBagBg_Tilemap[]; +extern const u32 gBagBg_ItemPC_Tilemap[]; extern const u32 gBagBgPalette[]; extern const u32 gBagBgPalette_FemaleOverride[]; // union_room_chat_display -extern const u16 gUnionRoomChatPanelBgPal_7[]; -extern const u32 gUnionRoomChatPanelBgTiles[]; -extern const u32 gUnionRoomChatPanelBgMap[]; -extern const u16 gLinkMiscMenu_Pal[]; -extern const u32 gLinkMiscMenu_Gfx[]; -extern const u32 gLinkMiscMenu_Tilemap[]; +extern const u16 gUnionRoomChat_Panel_Pal[]; +extern const u32 gUnionRoomChat_Panel_Gfx[]; +extern const u32 gUnionRoomChat_Panel_Tilemap[]; +extern const u16 gUnionRoomChat_Bg_Pal[]; +extern const u32 gUnionRoomChat_Bg_Gfx[]; +extern const u32 gUnionRoomChat_Bg_Tilemap[]; // union_room_chat_objects -extern const u32 gUnionRoomChatIcons[]; +extern const u32 gUnionRoomChat_Icons_Gfx[]; // battle_bg extern const u32 gFile_graphics_battle_transitions_vs_frame_sheet[]; diff --git a/include/malloc.h b/include/malloc.h index ae66aecb1..bf89badc5 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -14,6 +14,8 @@ ptr = NULL; \ } +#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr) + extern u8 gHeap[]; void *Alloc(u32 size); void *AllocZeroed(u32 size); diff --git a/include/mini_printf.h b/include/mini_printf.h new file mode 100644 index 000000000..a891327cc --- /dev/null +++ b/include/mini_printf.h @@ -0,0 +1,52 @@ +/* + * The Minimal snprintf() implementation + * + * Copyright (c) 2013 Michal Ludvig + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the auhor nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Courtey of https://github.com/mludvig/mini-printf + * stripped to reduce file size for agb needs + */ + +#ifndef __MINI_PRINTF__ +#define __MINI_PRINTF__ + +#include +#include "gba/types.h" + +#ifdef NDEBUG + +#define mini_vsnprintf(buffer, buffer_len, fmt, va) +#define mini_vpprintf(buf, fmt, va) + +#else + +s32 mini_vsnprintf(char* buffer, u32 buffer_len, const char *fmt, va_list va); +s32 mini_vpprintf(void* buf, const char *fmt, va_list va); + +#endif +#endif diff --git a/include/pokemon.h b/include/pokemon.h index 825683fd5..897abe383 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -4,7 +4,6 @@ #include "global.h" #include "sprite.h" #include "constants/pokemon.h" -#include "pokemon_storage_system.h" struct PokemonSubstruct0 { @@ -13,12 +12,13 @@ struct PokemonSubstruct0 u32 experience; u8 ppBonuses; u8 friendship; + u16 filler; }; struct PokemonSubstruct1 { - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; }; struct PokemonSubstruct2 @@ -56,34 +56,50 @@ struct PokemonSubstruct3 /* 0x07 */ u32 isEgg:1; /* 0x07 */ u32 abilityNum:1; - /* 0x08 */ u32 coolRibbon:3; - /* 0x08 */ u32 beautyRibbon:3; - /* 0x08 */ u32 cuteRibbon:3; - /* 0x09 */ u32 smartRibbon:3; - /* 0x09 */ u32 toughRibbon:3; - /* 0x09 */ u32 championRibbon:1; - /* 0x0A */ u32 winningRibbon:1; - /* 0x0A */ u32 victoryRibbon:1; - /* 0x0A */ u32 artistRibbon:1; - /* 0x0A */ u32 effortRibbon:1; - /* 0x0A */ u32 marineRibbon:1; // never distributed - /* 0x0A */ u32 landRibbon:1; // never distributed - /* 0x0A */ u32 skyRibbon:1; // never distributed - /* 0x0A */ u32 countryRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 nationalRibbon:1; - /* 0x0B */ u32 earthRibbon:1; - /* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 unusedRibbons:4; // discarded in Gen 4 - /* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in FRLG & Gen 4+ summary screens; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness. + /* 0x08 */ u32 coolRibbon:3; // Stores the highest contest rank achieved in the Cool category. + /* 0x08 */ u32 beautyRibbon:3; // Stores the highest contest rank achieved in the Beauty category. + /* 0x08 */ u32 cuteRibbon:3; // Stores the highest contest rank achieved in the Cute category. + /* 0x09 */ u32 smartRibbon:3; // Stores the highest contest rank achieved in the Smart category. + /* 0x09 */ u32 toughRibbon:3; // Stores the highest contest rank achieved in the Tough category. + /* 0x09 */ u32 championRibbon:1; // Given when defeating the Champion. Because both RSE and FRLG use it, later generations don't specify from which region it comes from. + /* 0x0A */ u32 winningRibbon:1; // Given at the Battle Tower's Level 50 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 victoryRibbon:1; // Given at the Battle Tower's Level 100 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 artistRibbon:1; // Given at the Contest Hall by winning a Master Rank contest with at least 800 points, and agreeing to have the Pokémon's portrait placed in the museum after being offered. + /* 0x0A */ u32 effortRibbon:1; // Given at Slateport's market to Pokémon with maximum EVs. + /* 0x0A */ u32 marineRibbon:1; // Never distributed. + /* 0x0A */ u32 landRibbon:1; // Never distributed. + /* 0x0A */ u32 skyRibbon:1; // Never distributed. + /* 0x0A */ u32 countryRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 nationalRibbon:1; // Given to purified Shadow Pokémon in Colosseum/XD. + /* 0x0B */ u32 earthRibbon:1; // Given to teams that have beaten Mt. Battle's 100-battle challenge in Colosseum/XD. + /* 0x0B */ u32 worldRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 unusedRibbons:4; // Discarded in Gen 4. + + // The functionality of this bit changed in FRLG: + // In RS, this bit does nothing, is never set, & is accidentally unset when hatching Eggs. + // In FRLG & Emerald, this controls Mew & Deoxys obedience and whether they can be traded. + // If set, a Pokémon is a fateful encounter in FRLG's summary screen if hatched & for all Pokémon in Gen 4+ summary screens. + // Set for in-game event island legendaries, events distributed after a certain date, & Pokémon from XD: Gale of Darkness. + // Not to be confused with METLOC_FATEFUL_ENCOUNTER. + /* 0x0B */ u32 modernFatefulEncounter:1; }; +// Number of bytes in the largest Pokémon substruct. +// They are assumed to be the same size, and will be padded to +// the largest size by the union. +// By default they are all 12 bytes. +#define NUM_SUBSTRUCT_BYTES (max(sizeof(struct PokemonSubstruct0), \ + max(sizeof(struct PokemonSubstruct1), \ + max(sizeof(struct PokemonSubstruct2), \ + sizeof(struct PokemonSubstruct3))))) + union PokemonSubstruct { struct PokemonSubstruct0 type0; struct PokemonSubstruct1 type1; struct PokemonSubstruct2 type2; struct PokemonSubstruct3 type3; - u16 raw[6]; + u16 raw[NUM_SUBSTRUCT_BYTES / 2]; // /2 because it's u16, not u8 }; struct BoxPokemon @@ -103,7 +119,7 @@ struct BoxPokemon union { - u32 raw[12]; + u32 raw[(NUM_SUBSTRUCT_BYTES * 4) / 4]; // *4 because there are 4 substructs, /4 because it's u32, not u8 union PokemonSubstruct substructs[4]; } secure; }; @@ -123,19 +139,11 @@ struct Pokemon u16 spDefense; }; -struct PokemonStorage -{ - /*0x0000*/ u8 currentBox; - /*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]; - /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][BOX_NAME_LENGTH + 1]; - /*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT]; -}; - struct BattleTowerPokemon { /*0x00*/ u16 species; /*0x02*/ u16 heldItem; - /*0x04*/ u16 moves[4]; + /*0x04*/ u16 moves[MAX_MON_MOVES]; /*0x0C*/ u8 level; /*0x0D*/ u8 ppBonuses; /*0x0E*/ u8 hpEV; @@ -154,12 +162,10 @@ struct BattleTowerPokemon u32 gap:1; u32 abilityNum:1; /*0x1C*/ u32 personality; - /*0x20*/ u8 nickname[11]; + /*0x20*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x2B*/ u8 friendship; }; -#define BATTLE_STATS_NO 8 - struct BattlePokemon { /*0x00*/ u16 species; @@ -168,7 +174,7 @@ struct BattlePokemon /*0x06*/ u16 speed; /*0x08*/ u16 spAttack; /*0x0A*/ u16 spDefense; - /*0x0C*/ u16 moves[4]; + /*0x0C*/ u16 moves[MAX_MON_MOVES]; /*0x14*/ u32 hpIV:5; /*0x14*/ u32 attackIV:5; /*0x15*/ u32 defenseIV:5; @@ -177,12 +183,12 @@ struct BattlePokemon /*0x17*/ u32 spDefenseIV:5; /*0x17*/ u32 isEgg:1; /*0x17*/ u32 abilityNum:1; - /*0x18*/ s8 statStages[BATTLE_STATS_NO]; + /*0x18*/ s8 statStages[NUM_BATTLE_STATS]; /*0x20*/ u8 ability; /*0x21*/ u8 type1; /*0x22*/ u8 type2; /*0x23*/ u8 unknown; - /*0x24*/ u8 pp[4]; + /*0x24*/ u8 pp[MAX_MON_MOVES]; /*0x28*/ u16 hp; /*0x2A*/ u8 level; /*0x2B*/ u8 friendship; @@ -190,7 +196,7 @@ struct BattlePokemon /*0x2E*/ u16 item; /*0x30*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x3B*/ u8 ppBonuses; - /*0x3C*/ u8 otName[8]; + /*0x3C*/ u8 otName[PLAYER_NAME_LENGTH + 1]; /*0x44*/ u32 experience; /*0x48*/ u32 personality; /*0x4C*/ u32 status1; @@ -198,7 +204,7 @@ struct BattlePokemon /*0x54*/ u32 otId; }; -struct BaseStats +struct SpeciesInfo { /* 0x00 */ u8 baseHP; /* 0x01 */ u8 baseAttack; @@ -206,8 +212,7 @@ struct BaseStats /* 0x03 */ u8 baseSpeed; /* 0x04 */ u8 baseSpAttack; /* 0x05 */ u8 baseSpDefense; - /* 0x06 */ u8 type1; - /* 0x07 */ u8 type2; + /* 0x06 */ u8 types[2]; /* 0x08 */ u8 catchRate; /* 0x09 */ u8 expYield; /* 0x0A */ u16 evYield_HP:2; @@ -216,14 +221,13 @@ struct BaseStats /* 0x0A */ u16 evYield_Speed:2; /* 0x0B */ u16 evYield_SpAttack:2; /* 0x0B */ u16 evYield_SpDefense:2; - /* 0x0C */ u16 item1; - /* 0x0E */ u16 item2; + /* 0x0C */ u16 itemCommon; + /* 0x0E */ u16 itemRare; /* 0x10 */ u8 genderRatio; /* 0x11 */ u8 eggCycles; /* 0x12 */ u8 friendship; /* 0x13 */ u8 growthRate; - /* 0x14 */ u8 eggGroup1; - /* 0x15 */ u8 eggGroup2; + /* 0x14 */ u8 eggGroups[2]; /* 0x16 */ u8 abilities[2]; /* 0x18 */ u8 safariZoneFleeRate; /* 0x19 */ u8 bodyColor : 7; @@ -243,20 +247,13 @@ struct BattleMove u8 flags; }; -extern const struct BattleMove gBattleMoves[]; - -// Battle move flags -#define FLAG_MAKES_CONTACT (1 << 0) -#define FLAG_PROTECT_AFFECTED (1 << 1) -#define FLAG_MAGIC_COAT_AFFECTED (1 << 2) -#define FLAG_SNATCH_AFFECTED (1 << 3) -#define FLAG_MIRROR_MOVE_AFFECTED (1 << 4) -#define FLAG_KINGS_ROCK_AFFECTED (1 << 5) +#define SPINDA_SPOT_WIDTH 16 +#define SPINDA_SPOT_HEIGHT 16 struct SpindaSpot { u8 x, y; - u16 image[16]; + u16 image[SPINDA_SPOT_HEIGHT]; }; struct __attribute__((packed)) LevelUpMove @@ -265,46 +262,6 @@ struct __attribute__((packed)) LevelUpMove u16 level:7; }; -enum -{ - GROWTH_MEDIUM_FAST, - GROWTH_ERRATIC, - GROWTH_FLUCTUATING, - GROWTH_MEDIUM_SLOW, - GROWTH_FAST, - GROWTH_SLOW -}; - -enum -{ - BODY_COLOR_RED, - BODY_COLOR_BLUE, - BODY_COLOR_YELLOW, - BODY_COLOR_GREEN, - BODY_COLOR_BLACK, - BODY_COLOR_BROWN, - BODY_COLOR_PURPLE, - BODY_COLOR_GRAY, - BODY_COLOR_WHITE, - BODY_COLOR_PINK -}; - -#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220 -#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220 -#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220 -#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level -#define EVO_TRADE 0x0005 // Pokémon is traded -#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item -#define EVO_ITEM 0x0007 // specified item is used on Pokémon -#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense -#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense -#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense -#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value -#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value -#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask) -#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja) -#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value - struct Evolution { u16 method; @@ -312,8 +269,6 @@ struct Evolution u16 targetSpecies; }; -#define EVOS_PER_MON 5 - #define NUM_UNOWN_FORMS 28 #define GET_UNOWN_LETTER(personality) (( \ @@ -323,11 +278,14 @@ struct Evolution | (((personality) & 0x00000003) >> 0) \ ) % NUM_UNOWN_FORMS) +#define GET_SHINY_VALUE(otId, personality) (HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality)) + +extern const struct BattleMove gBattleMoves[]; extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; extern u8 gEnemyPartyCount; extern struct Pokemon gEnemyParty[PARTY_SIZE]; -extern const struct BaseStats gBaseStats[]; +extern const struct SpeciesInfo gSpeciesInfo[]; extern const u8 *const gItemEffectTable[]; extern const u8 gStatStageRatios[][2]; extern struct SpriteTemplate gMultiuseSpriteTemplate; @@ -459,11 +417,11 @@ bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId); void SetDeoxysStats(void); u16 GetUnionRoomTrainerPic(void); u16 GetUnionRoomTrainerClass(void); -void CreateEventLegalEnemyMon(void); +void CreateEnemyEventMon(void); void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 bank); -struct OakSpeechNidoranFStruct *OakSpeechNidoranFSetup(u8 battlePosition, bool8 enable); -void OakSpeechNidoranFFreeResources(void); -void *OakSpeechNidoranFGetBuffer(u8 bufferId); +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 battlePosition, u8 mode); +void DestroyMonSpritesGfxManager(void); +u8 *MonSpritesGfxManager_GetSpritePtr(u8 bufferId); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 388d3dba5..745e9d8b7 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -2,11 +2,13 @@ #define GUARD_POKEMON_STORAGE_SYSTEM_H #include "global.h" +#include "pokemon.h" #define TOTAL_BOXES_COUNT 14 #define IN_BOX_ROWS 5 // Number of rows, 6 Pokémon per row #define IN_BOX_COLUMNS 6 // Number of columns, 5 Pokémon per column #define IN_BOX_COUNT (IN_BOX_ROWS * IN_BOX_COLUMNS) +#define BOX_NAME_LENGTH 8 /* COLUMNS @@ -39,6 +41,14 @@ enum }; #define MAX_DEFAULT_WALLPAPER WALLPAPER_SAVANNA +struct PokemonStorage +{ + /*0x0000*/ u8 currentBox; + /*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]; + /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][BOX_NAME_LENGTH + 1]; + /*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT]; +}; + u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 253f03c02..4df9977bc 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1113,8 +1113,8 @@ static void Cmd_count_alive_pokemon(void) { if (i != battlerOnField1 && i != battlerOnField2 && GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { AI_THINKING_STRUCT->funcResult++; } @@ -1165,25 +1165,25 @@ static void Cmd_get_ability(void) return; } - if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) + if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) { - if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) + if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) { // AI has no knowledge of opponent, so it guesses which ability. if (Random() % 2) - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; else - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; } else { - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; } } else { // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; } } else diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index f459a9eb1..73c013cfa 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -54,8 +54,8 @@ static bool8 ShouldSwitchIfWonderGuard(void) for (i = 0; i < PARTY_SIZE; ++i) { if (GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0 - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG || i == gBattlerPartyIndexes[gActiveBattler]) continue; GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); // Unused return value. @@ -120,8 +120,8 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) u8 monAbility; if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -129,9 +129,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) continue; species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - monAbility = gBaseStats[species].abilities[1]; + monAbility = gSpeciesInfo[species].abilities[1]; else - monAbility = gBaseStats[species].abilities[0]; + monAbility = gSpeciesInfo[species].abilities[0]; if (absorbingTypeAbility == monAbility && Random() & 1) { // we found a mon @@ -265,8 +265,8 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) u8 monAbility; if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -274,9 +274,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) continue; species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - monAbility = gBaseStats[species].abilities[1]; + monAbility = gSpeciesInfo[species].abilities[1]; else - monAbility = gBaseStats[species].abilities[0]; + monAbility = gSpeciesInfo[species].abilities[0]; moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility); if (moveFlags & flags) { @@ -330,8 +330,8 @@ static bool8 ShouldSwitch(void) for (i = 0; i < PARTY_SIZE; ++i) { if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -472,8 +472,8 @@ u8 GetMostSuitableMonToSwitchInto(void) && i != *(gBattleStruct->monToSwitchIntoId + battlerIn1) && i != *(gBattleStruct->monToSwitchIntoId + battlerIn2)) { - u8 type1 = gBaseStats[species].type1; - u8 type2 = gBaseStats[species].type2; + u8 type1 = gSpeciesInfo[species].types[0]; + u8 type2 = gSpeciesInfo[species].types[1]; u8 typeDmg = 10; ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type1, type1, type2, &typeDmg); ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type2, type1, type2, &typeDmg); @@ -551,9 +551,9 @@ static u8 GetAI_ItemType(u8 itemId, const u8 *itemEffect) // NOTE: should take u return AI_ITEM_HEAL_HP; else if (itemEffect[3] & ITEM3_STATUS_ALL) return AI_ITEM_CURE_CONDITION; - else if (itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0) + else if (itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0) return AI_ITEM_X_STAT; - else if (itemEffect[3] & ITEM3_MIST) + else if (itemEffect[3] & ITEM3_GUARD_SPEC) return AI_ITEM_GUARD_SPECS; else return AI_ITEM_NOT_RECOGNIZABLE; @@ -567,8 +567,8 @@ static bool8 ShouldUseItem(void) for (i = 0; i < PARTY_SIZE; ++i) if (GetMonData(&gEnemyParty[i], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) ++validMons; for (i = 0; i < MAX_TRAINER_ITEMS; ++i) { @@ -650,7 +650,7 @@ static bool8 ShouldUseItem(void) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; if (itemEffects[2] & ITEM2_X_ACCURACY) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; - if (itemEffects[0] & ITEM0_HIGH_CRIT) + if (itemEffects[0] & ITEM0_DIRE_HIT) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80; shouldUse = TRUE; break; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index d0493ef96..9ae958193 100644 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -706,7 +706,7 @@ const struct SpriteTemplate gSweetScentPetalSpriteTemplate = .callback = AnimSweetScentPetal, }; -static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unk_83FF33C.gbapal"); //Unused +static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unused/unknown.gbapal"); static const union AnimCmd sPainSplitAnimCmds[] = { diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 0bc84e523..371aa631e 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -177,7 +177,7 @@ const struct SpriteTemplate gFallingFeatherSpriteTemplate = .callback = AnimFallingFeather, }; -static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unk_83E6C18.gbapal"); +static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unused/flying.gbapal"); static const struct SpriteTemplate sUnusedBubbleThrowSpriteTemplate = { diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 03d65358d..390ab38f3 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -53,8 +53,8 @@ static void AnimTask_WaterSport_Step(u8); static void CreateWaterSportDroplet(struct Task *); static void CreateWaterPulseRingBubbles(struct Sprite *, s32, s32); -static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unk_83E44F4.4bpp"); -static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unk_83E4874.bin"); +static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water.4bpp"); +static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin"); static const union AnimCmd sAnim_RainDrop[] = { diff --git a/src/battle_controller_oak_old_man.c b/src/battle_controller_oak_old_man.c index cf9ef722a..0e0fd8784 100644 --- a/src/battle_controller_oak_old_man.c +++ b/src/battle_controller_oak_old_man.c @@ -470,7 +470,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -512,11 +512,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -548,7 +548,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 64a47823f..c9afab61f 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1031,7 +1031,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -1073,11 +1073,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -1109,7 +1109,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controller_pokedude.c b/src/battle_controller_pokedude.c index 3b1084aa4..ca052a025 100644 --- a/src/battle_controller_pokedude.c +++ b/src/battle_controller_pokedude.c @@ -451,7 +451,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -493,11 +493,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -529,7 +529,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controllers.c b/src/battle_controllers.c index e877a1c08..a2662c39a 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -302,8 +302,8 @@ static void SetBattlePartyIds(void) if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER) { if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0 - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG)) { gBattlerPartyIndexes[i] = j; @@ -313,8 +313,8 @@ static void SetBattlePartyIds(void) else { if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG)) { gBattlerPartyIndexes[i] = j; @@ -328,7 +328,7 @@ static void SetBattlePartyIds(void) { if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0 && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2. - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) && gBattlerPartyIndexes[i - 2] != j) { @@ -339,8 +339,8 @@ static void SetBattlePartyIds(void) else { if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) && gBattlerPartyIndexes[i - 2] != j) { diff --git a/src/battle_interface.c b/src/battle_interface.c index 22dc43acb..feb590f5b 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1811,9 +1811,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem species = GetMonData(mon, MON_DATA_SPECIES); level = GetMonData(mon, MON_DATA_LEVEL); exp = GetMonData(mon, MON_DATA_EXP); - currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level]; + currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; currExpBarValue = exp - currLevelExp; - maxExpBarValue = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLevelExp; + maxExpBarValue = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLevelExp; SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles); MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0); } diff --git a/src/battle_main.c b/src/battle_main.c index 40a797e2a..bb34635b4 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -715,33 +715,33 @@ static void CB2_InitBattleInternal(void) gBattleCommunication[MULTIUSE_STATE] = 0; } -#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ - for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ - { \ - u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \ - u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ - u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ - \ - if (species == SPECIES_NONE) \ - continue; \ - \ - /* Is healthy mon? */ \ - if (species != SPECIES_EGG && hp != 0 && status == 0) \ - (flags) |= 1 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is Egg or statused? */ \ - if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ - (flags) |= 2 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is fainted? */ \ - if (species != SPECIES_EGG && hp == 0) \ - (flags) |= 3 << (i) * 2; \ +#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ + for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ + { \ + u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \ + u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ + u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ + \ + if (species == SPECIES_NONE) \ + continue; \ + \ + /* Is healthy mon? */ \ + if (species != SPECIES_EGG && hp != 0 && status == 0) \ + (flags) |= 1 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is Egg or statused? */ \ + if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ + (flags) |= 2 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is fainted? */ \ + if (species != SPECIES_EGG && hp == 0) \ + (flags) |= 3 << (i) * 2; \ } // For Vs Screen at link battle start @@ -2277,8 +2277,8 @@ static void BattleStartClearSetData(void) gBattleStruct->runTries = 0; gBattleStruct->safariRockThrowCounter = 0; gBattleStruct->safariBaitThrowCounter = 0; - *(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; - *(&gBattleStruct->safariEscapeFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275; + *(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; + *(&gBattleStruct->safariEscapeFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275; if (gBattleStruct->safariEscapeFactor <= 1) gBattleStruct->safariEscapeFactor = 2; gBattleStruct->wildVictorySong = 0; @@ -2508,8 +2508,8 @@ void FaintClearSetData(void) *(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; } gBattleResources->flags->flags[gActiveBattler] = 0; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; } static void BattleIntroGetMonsData(void) @@ -2573,8 +2573,8 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) for (i = 0; i < sizeof(struct BattlePokemon); i++) ptr[i] = gBattleBufferB[gActiveBattler][4 + i]; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)]; *hpOnSwitchout = gBattleMons[gActiveBattler].hp; @@ -2651,8 +2651,8 @@ static void BattleIntroDrawPartySummaryScreens(void) { for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -2669,8 +2669,8 @@ static void BattleIntroDrawPartySummaryScreens(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -2695,8 +2695,8 @@ static void BattleIntroDrawPartySummaryScreens(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -4337,7 +4337,7 @@ static void HandleAction_WatchesCarefully(void) --gBattleStruct->safariRockThrowCounter; if (gBattleStruct->safariRockThrowCounter == 0) { - *(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275; + *(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MON_WATCHING; } else diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 23b3d4649..e48fc4afa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1514,7 +1514,7 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility) { s32 i = 0; u8 flags = 0; - u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2; + u8 type1 = gSpeciesInfo[targetSpecies].types[0], type2 = gSpeciesInfo[targetSpecies].types[1]; u8 moveType; if (move == MOVE_STRUGGLE) @@ -3163,7 +3163,7 @@ static void Cmd_getexp(void) viaExpShare++; } - calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7; + calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7; if (viaExpShare) // at least one mon is getting exp via exp share { @@ -4480,8 +4480,8 @@ static void Cmd_switchindataupdate(void) for (i = 0; i < sizeof(struct BattlePokemon); i++) monData[i] = gBattleBufferB[gActiveBattler][4 + i]; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); // check knocked off item @@ -5453,8 +5453,8 @@ static void Cmd_drawpartystatussummary(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatuses[i].hp = 0xFFFF; hpStatuses[i].status = 0; @@ -6168,7 +6168,7 @@ static void Cmd_various(void) } for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); abilityNum = GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM); status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); if (species != SPECIES_NONE @@ -6188,7 +6188,7 @@ static void Cmd_various(void) monToCheck = 0; for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG); abilityNum = GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM); status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS); @@ -8041,7 +8041,7 @@ static void Cmd_healpartystatus(void) for (i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM); if (species != SPECIES_NONE && species != SPECIES_EGG) @@ -8587,8 +8587,8 @@ static void Cmd_trydobeatup(void) for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++) { if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS)) break; } @@ -8598,10 +8598,10 @@ static void Cmd_trydobeatup(void) gBattlescriptCurrInstr += 9; - gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; + gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; gBattleMoveDamage *= gBattleMoves[gCurrentMove].power; gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2); - gBattleMoveDamage /= gBaseStats[gBattleMons[gBattlerTarget].species].baseDefense; + gBattleMoveDamage /= gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseDefense; gBattleMoveDamage = (gBattleMoveDamage / 50) + 2; if (gProtectStructs[gBattlerAttacker].helpingHand) gBattleMoveDamage = gBattleMoveDamage * 15 / 10; @@ -9104,9 +9104,9 @@ static void Cmd_assistattackselect(void) { if (monId == gBattlerPartyIndexes[gBattlerAttacker]) continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE) + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) continue; for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) @@ -9267,12 +9267,12 @@ static void Cmd_pickup(void) for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - ability = gBaseStats[species].abilities[1]; + ability = gSpeciesInfo[species].abilities[1]; else - ability = gBaseStats[species].abilities[0]; + ability = gSpeciesInfo[species].abilities[0]; if (ability == ABILITY_PICKUP && species != SPECIES_NONE && species != SPECIES_EGG && heldItem == ITEM_NONE && !(Random() % 10)) { s32 random = Random() % 100; @@ -9496,7 +9496,7 @@ static void Cmd_handleballthrow(void) if (gLastUsedItem == ITEM_SAFARI_BALL) catchRate = gBattleStruct->safariCatchFactor * 1275 / 100; else - catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate; + catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate; if (gLastUsedItem > ITEM_SAFARI_BALL) { diff --git a/src/battle_setup.c b/src/battle_setup.c index 36f4d860a..18b2a7acb 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -545,7 +545,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons) for (i = 0; i < PARTY_SIZE; ++i) { - u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0) { diff --git a/src/battle_tower.c b/src/battle_tower.c index 9586b2dee..e6e4f2472 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -796,7 +796,7 @@ void CheckPartyBattleTowerBanlist(void) for (i = 0; i < PARTY_SIZE; i++) { - species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); diff --git a/src/battle_util.c b/src/battle_util.c index be2422ff7..f28afe05f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1560,8 +1560,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) break; } return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); @@ -1589,8 +1589,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && i != partyIdBattlerOn1 && i != partyIdBattlerOn2 && i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId]) break; @@ -3130,14 +3130,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget) return targetBattler; } -static bool32 IsMonEventLegal(u8 battlerId) +static bool32 IsBattlerModernFatefulEncounter(u8 battlerId) { if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT) return TRUE; if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS && GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW) return TRUE; - return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL); + return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); } u8 IsMonDisobedient(void) @@ -3151,7 +3151,7 @@ u8 IsMonDisobedient(void) if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT) return 0; - if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys + if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys { if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName)) return 0; diff --git a/src/credits.c b/src/credits.c index 6b76be688..dda43e691 100644 --- a/src/credits.c +++ b/src/credits.c @@ -133,6 +133,11 @@ enum CreditsMap CREDITS_MAP_ROUTE21_NORTH }; +enum { + GFXTAG_CHARACTER = 0x2000, // Player/Rival + GFXTAG_GROUND, +}; + struct CreditsResources { u8 mainseqno; @@ -160,9 +165,9 @@ struct CreditsScrcmd struct CreditsTextHeader { - const u8 * unk_0; - const u8 * unk_4; - bool8 unk_8; + const u8 * title; + const u8 * names; + bool8 unused; }; struct CompressedGraphicsHeader @@ -175,12 +180,12 @@ struct CompressedGraphicsHeader struct CreditsTaskData { u8 spriteMoveCmd; - u8 playerSpriteId; - u16 playerTilesTag; - u16 field_04; + u8 characterSpriteId; // Player or rival + u16 characterTilesTag; + u16 characterPalTag; u8 groundSpriteId; u16 groundTilesTag; - u16 field_0A; + u16 groundPalTag; }; static EWRAM_DATA struct CreditsResources * sCreditsMgr = NULL; @@ -223,144 +228,148 @@ static const struct BgTemplate sBgTemplates_MonSceneOrTheEnd[] = { static const struct WindowTemplate sWindowTemplates_Charizard[] = { { - .bg = 0x00, - .tilemapLeft = 0x0b, - .tilemapTop = 0x06, - .width = 0x08, - .height = 0x08, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 11, + .tilemapTop = 6, + .width = 8, + .height = 8, + .paletteNum = 10, .baseBlock = 0x0008 }, { - .bg = 0x00, - .tilemapLeft = 0x0a, - .tilemapTop = 0x05, - .width = 0x0a, - .height = 0x0a, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 5, + .width = 10, + .height = 10, + .paletteNum = 10, .baseBlock = 0x0048 }, { - .bg = 0x00, - .tilemapLeft = 0x09, - .tilemapTop = 0x03, - .width = 0x0c, - .height = 0x0d, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 9, + .tilemapTop = 3, + .width = 12, + .height = 13, + .paletteNum = 10, .baseBlock = 0x00ac }, DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sWindowTemplates_Venusaur[] = { { - .bg = 0x00, - .tilemapLeft = 0x0b, - .tilemapTop = 0x06, - .width = 0x08, - .height = 0x08, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 11, + .tilemapTop = 6, + .width = 8, + .height = 8, + .paletteNum = 10, .baseBlock = 0x0008 }, { - .bg = 0x00, - .tilemapLeft = 0x0a, - .tilemapTop = 0x05, - .width = 0x0a, - .height = 0x0a, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 5, + .width = 10, + .height = 10, + .paletteNum = 10, .baseBlock = 0x0048 }, { - .bg = 0x00, - .tilemapLeft = 0x09, - .tilemapTop = 0x05, - .width = 0x0c, - .height = 0x0a, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 9, + .tilemapTop = 5, + .width = 12, + .height = 10, + .paletteNum = 10, .baseBlock = 0x00ac }, DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sWindowTemplates_Blastoise[] = { { - .bg = 0x00, - .tilemapLeft = 0x0b, - .tilemapTop = 0x06, - .width = 0x08, - .height = 0x08, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 11, + .tilemapTop = 6, + .width = 8, + .height = 8, + .paletteNum = 10, .baseBlock = 0x0008 }, { - .bg = 0x00, - .tilemapLeft = 0x0a, - .tilemapTop = 0x05, - .width = 0x0a, - .height = 0x0a, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 5, + .width = 10, + .height = 10, + .paletteNum = 10, .baseBlock = 0x0048 }, { - .bg = 0x00, - .tilemapLeft = 0x0a, - .tilemapTop = 0x04, - .width = 0x0a, - .height = 0x0c, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 4, + .width = 10, + .height = 12, + .paletteNum = 10, .baseBlock = 0x00ac }, DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sWindowTemplates_Pikachu[] = { { - .bg = 0x00, - .tilemapLeft = 0x0b, - .tilemapTop = 0x06, - .width = 0x08, - .height = 0x08, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 11, + .tilemapTop = 6, + .width = 8, + .height = 8, + .paletteNum = 10, .baseBlock = 0x0008 }, { - .bg = 0x00, - .tilemapLeft = 0x0a, - .tilemapTop = 0x05, - .width = 0x0a, - .height = 0x0a, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 5, + .width = 10, + .height = 10, + .paletteNum = 10, .baseBlock = 0x0048 }, { - .bg = 0x00, - .tilemapLeft = 0x09, - .tilemapTop = 0x04, - .width = 0x0c, - .height = 0x0c, - .paletteNum = 0x0a, + .bg = 0, + .tilemapLeft = 9, + .tilemapTop = 4, + .width = 12, + .height = 12, + .paletteNum = 10, .baseBlock = 0x00ac }, DUMMY_WIN_TEMPLATE }; -static const u16 sPalette_OneBlackThenAllWhite[] = INCBIN_U16("graphics/credits/unk_840C630.gbapal"); -static const u32 sAffineCircleGfx[] = INCBIN_U32("graphics/credits/unk_840C650.8bpp.lz"); -static const u32 sAffineCircleMap[] = INCBIN_U32("graphics/credits/unk_840CA54.bin.lz"); -static const u32 sWindow1Map_Charizard[] = INCBIN_U32("graphics/credits/unk_840CB8C.bin.lz"); -static const u32 sWindow2Map_Charizard[] = INCBIN_U32("graphics/credits/unk_840D228.bin.lz"); -static const u32 sUnusedTilemap[] = INCBIN_U32("graphics/credits/unk_840DC0C.bin.lz"); -static const u32 sWindow1Map_Venusaur[] = INCBIN_U32("graphics/credits/unk_840E158.bin.lz"); -static const u32 sWindow2Map_Venusaur[] = INCBIN_U32("graphics/credits/unk_840E904.bin.lz"); -static const u32 sWindow1Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F240.bin.lz"); -static const u32 sWindow2Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F944.bin.lz"); -static const u32 sWindow1Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_8410198.bin.lz"); -static const u32 sWindow2Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_84105B4.bin.lz"); +static const u16 sCreditsMonCircle_Pal[] = INCBIN_U16("graphics/credits/white_circle.gbapal"); +static const u32 sCreditsMonCircle_Tiles[] = INCBIN_U32("graphics/credits/white_circle.8bpp.lz"); +static const u32 sCreditsMonCircle_Tilemap[] = INCBIN_U32("graphics/credits/white_circle.bin.lz"); + +static const u32 sCharizard1_Tiles[] = INCBIN_U32("graphics/credits/charizard_1.4bpp.lz"); +static const u32 sCharizard2_Tiles[] = INCBIN_U32("graphics/credits/charizard_2.4bpp.lz"); + +static const u32 sVenusaurUnused_Tiles[] = INCBIN_U32("graphics/credits/venusaur_unused.4bpp.lz"); +static const u32 sVenusaur1_Tiles[] = INCBIN_U32("graphics/credits/venusaur_1.4bpp.lz"); +static const u32 sVenusaur2_Tiles[] = INCBIN_U32("graphics/credits/venusaur_2.4bpp.lz"); + +static const u32 sBlastoise1_Tiles[] = INCBIN_U32("graphics/credits/blastoise_1.4bpp.lz"); +static const u32 sBlastoise2_Tiles[] = INCBIN_U32("graphics/credits/blastoise_2.4bpp.lz"); + +static const u32 sPikachu1_Tiles[] = INCBIN_U32("graphics/credits/pikachu_1.4bpp.lz"); +static const u32 sPikachu2_Tiles[] = INCBIN_U32("graphics/credits/pikachu_2.4bpp.lz"); static const u32 sUnused = 0xF0; -static const u16 sTheEndGfxPal[] = INCBIN_U16("graphics/credits/unk_8410B20.gbapal"); -static const u8 sTheEndGfxTiles[] = INCBIN_U8("graphics/credits/unk_8410B20.4bpp.lz"); -static const u8 sTheEndGfxMap[] = INCBIN_U8("graphics/credits/unk_8410B20.bin.lz"); +static const u16 sTheEnd_Pal[] = INCBIN_U16("graphics/credits/the_end.gbapal"); +static const u8 sTheEnd_Tiles[] = INCBIN_U8("graphics/credits/the_end.4bpp.lz"); +static const u8 sTheEnd_Tilemap[] = INCBIN_U8("graphics/credits/the_end.bin.lz"); static const struct CompressedGraphicsHeader sCopyrightOrTheEndGfxHeaders[] = { { - .tiles = gCreditsAllRightsReservedGfxTiles, - .map = gCreditsAllRightsReservedGfxMap, - .palette = gCreditsAllRightsReservedGfxPal + .tiles = gCreditsCopyright_Tiles, + .map = gCreditsCopyright_Tilemap, + .palette = gCreditsCopyright_Pal }, { - .tiles = sTheEndGfxTiles, - .map = sTheEndGfxMap, - .palette = sTheEndGfxPal + .tiles = sTheEnd_Tiles, + .map = sTheEnd_Tilemap, + .palette = sTheEnd_Pal } }; @@ -454,18 +463,18 @@ static const struct WindowTemplate sCreditsWindowTemplate = { .baseBlock = 0x008 }; -static const u16 sMalePlayerSpritePal[] = INCBIN_U16("graphics/credits/unk_8410E10.gbapal"); -static const u32 sMalePlayerSpriteGfx[] = INCBIN_U32("graphics/credits/unk_8410E30.4bpp.lz"); -static const u16 sFemalePlayerSpritePal[] = INCBIN_U16("graphics/credits/unk_8411BF8.gbapal"); -static const u32 sFemalePlayerSpriteGfx[] = INCBIN_U32("graphics/credits/unk_8411C18.4bpp.lz"); -static const u16 sRivalSpritePal[] = INCBIN_U16("graphics/credits/unk_84129A0.gbapal"); -static const u32 sRivalSpriteGfx[] = INCBIN_U32("graphics/credits/unk_84129C0.4bpp.lz"); -static const u16 sGroundSpritePal_Grass[] = INCBIN_U16("graphics/credits/unk_8413318.gbapal"); -static const u32 sGroundSpriteGfx_Grass[] = INCBIN_U32("graphics/credits/unk_8413338.4bpp.lz"); -static const u16 sGroundSpritePal_Dirt[] = INCBIN_U16("graphics/credits/unk_8413854.gbapal"); -static const u32 sGroundSpriteGfx_Dirt[] = INCBIN_U32("graphics/credits/unk_8413874.4bpp.lz"); -static const u16 sGroundSpritePal_City[] = INCBIN_U16("graphics/credits/unk_8413D98.gbapal"); -static const u32 sGroundSpriteGfx_City[] = INCBIN_U32("graphics/credits/unk_8413DB8.4bpp.lz"); +static const u16 sPlayerMale_Pal[] = INCBIN_U16("graphics/credits/player_male.gbapal"); +static const u32 sPlayerMale_Tiles[] = INCBIN_U32("graphics/credits/player_male.4bpp.lz"); +static const u16 sPlayerFemale_Pal[] = INCBIN_U16("graphics/credits/player_female.gbapal"); +static const u32 sPlayerFemale_Tiles[] = INCBIN_U32("graphics/credits/player_female.4bpp.lz"); +static const u16 sRival_Pal[] = INCBIN_U16("graphics/credits/rival.gbapal"); +static const u32 sRival_Tiles[] = INCBIN_U32("graphics/credits/rival.4bpp.lz"); +static const u16 sGround_Grass_Pal[] = INCBIN_U16("graphics/credits/ground_grass.gbapal"); +static const u32 sGround_Grass_Tiles[] = INCBIN_U32("graphics/credits/ground_grass.4bpp.lz"); +static const u16 sGround_Dirt_Pal[] = INCBIN_U16("graphics/credits/ground_dirt.gbapal"); +static const u32 sGround_Dirt_Tiles[] = INCBIN_U32("graphics/credits/ground_dirt.4bpp.lz"); +static const u16 sGround_City_Pal[] = INCBIN_U16("graphics/credits/ground_city.gbapal"); +static const u32 sGround_City_Tiles[] = INCBIN_U32("graphics/credits/ground_city.4bpp.lz"); static const u16 sPlayerRivalSpriteParams[][3] = { { 0, 3, 1 }, @@ -703,7 +712,7 @@ void DoCredits(void) { sCreditsMgr = AllocZeroed(sizeof(*sCreditsMgr)); ResetTasks(); - sCreditsMgr->taskId = 0xFF; + sCreditsMgr->taskId = TASK_NONE; sCreditsMgr->unk_1D = 0; ResetSpriteData(); SetMainCallback2(CB2_Credits); @@ -790,8 +799,8 @@ static bool32 DoOverworldMapScrollScene(u8 whichMon) if (!Overworld_DoScrollSceneForCredits(&sCreditsMgr->ovwldseqno, sOverworldMapScenes[sCreditsMgr->whichMon], QL_TINT_NONE)) return FALSE; CreateCreditsWindow(); - SetGpuReg(REG_OFFSET_WIN0H, 0xF0); - SetGpuReg(REG_OFFSET_WIN0V, 0x247C); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(36, DISPLAY_HEIGHT - 36)); SwitchWin1OffWin0On(); InitBgDarkenEffect(); Menu_LoadStdPalAt(0xF0); @@ -811,8 +820,8 @@ static s32 RollCredits(void) { case CREDITSSCENE_INIT_WIN0: SwitchWin1OffWin0On(); - SetGpuReg(REG_OFFSET_WIN0H, 0xF0); - SetGpuReg(REG_OFFSET_WIN0V, 0x4F51); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(DISPLAY_HEIGHT / 2 - 1, DISPLAY_HEIGHT / 2 + 1)); sCreditsMgr->mainseqno = CREDITSSCENE_SETUP_DARKEN_EFFECT; return 0; case CREDITSSCENE_SETUP_DARKEN_EFFECT: @@ -912,13 +921,13 @@ static s32 RollCredits(void) case CREDITSSCENE_PRINT_ADDPRINTER1: if (gPaletteFade.active) return sCreditsMgr->canSpeedThrough; - win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; // unused - AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_0); + win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused; + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].title); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_ADDPRINTER2; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_ADDPRINTER2: - win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; - AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_4); + win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused; + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].names); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_DELAY; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_DELAY: @@ -1042,29 +1051,29 @@ static void LoadCreditsMonPic(u8 whichMon) InitWindows(sWindowTemplates_Charizard); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_CHARIZARD, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Charizard, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Charizard, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sCharizard1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sCharizard2_Tiles, 0, 0); break; case CREDITSMON_VENUSAUR: InitWindows(sWindowTemplates_Venusaur); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_VENUSAUR, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Venusaur, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Venusaur, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sVenusaur1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sVenusaur2_Tiles, 0, 0); break; case CREDITSMON_BLASTOISE: InitWindows(sWindowTemplates_Blastoise); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_BLASTOISE, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Blastoise, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Blastoise, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sBlastoise1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sBlastoise2_Tiles, 0, 0); break; case CREDITSMON_PIKACHU: InitWindows(sWindowTemplates_Pikachu); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_PIKACHU, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Pikachu, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Pikachu, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sPikachu1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sPikachu2_Tiles, 0, 0); break; } CopyWindowToVram(0, COPYWIN_GFX); @@ -1108,19 +1117,19 @@ static bool32 DoCreditsMonScene(void) ResetBgsAndClearDma3BusyFlags(1); InitBgsFromTemplates(1, sBgTemplates_MonSceneOrTheEnd, NELEMS(sBgTemplates_MonSceneOrTheEnd)); SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); sCreditsMgr->creditsMonTimer = 0; sCreditsMgr->unk_0E = 0; SetBgAffine(2, 0x8000, 0x8000, 0x78, 0x50, sCreditsMgr->creditsMonTimer, sCreditsMgr->creditsMonTimer, 0); - DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxTiles, 0x2000, 0, 0); - DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleGfx, 0x2000, 0, 0); - DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxMap, 0x500, 0, 1); - DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleMap, 0x400, 0, 1); - LoadPalette(gCreditsMonBackdropPals[sCreditsMgr->whichMon], 0, 0x20); - LoadPalette(sPalette_OneBlackThenAllWhite, 0xF0, 0x20); + DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tiles, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tiles, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tilemap, 0x500, 0, 1); + DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tilemap, 0x400, 0, 1); + LoadPalette(gCreditsMonPokeball_Pals[sCreditsMgr->whichMon], 0, 0x20); + LoadPalette(sCreditsMonCircle_Pal, 0xF0, 0x20); LoadCreditsMonPic(sCreditsMgr->whichMon); SetVBlankCallback(VBlankCB); EnableInterrupts(INTR_FLAG_VBLANK); @@ -1236,8 +1245,8 @@ static bool32 DoCopyrightOrTheEndGfxScene(void) ResetTasks(); ResetBgsAndClearDma3BusyFlags(1); InitBgsFromTemplates(0, sBgTemplates_MonSceneOrTheEnd, 1); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].tiles, 0x2000, 0, 0); DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].map, 0x800, 0, 1); LoadPalette(sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].palette, 0x00, 0x200); @@ -1276,9 +1285,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 0: break; case 1: - if (gSprites[data->playerSpriteId].x != 0xD0) + if (gSprites[data->characterSpriteId].x != 0xD0) { - gSprites[data->playerSpriteId].x--; + gSprites[data->characterSpriteId].x--; gSprites[data->groundSpriteId].x--; } else @@ -1289,9 +1298,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 2: if (sCreditsMgr->unk_1D & 1) { - if (gSprites[data->playerSpriteId].y != 0x50) + if (gSprites[data->characterSpriteId].y != 0x50) { - gSprites[data->playerSpriteId].y--; + gSprites[data->characterSpriteId].y--; gSprites[data->groundSpriteId].y--; } else @@ -1303,7 +1312,7 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 3: if (sCreditsMgr->mainseqno == 15) { - gSprites[data->playerSpriteId].x--; + gSprites[data->characterSpriteId].x--; gSprites[data->groundSpriteId].x--; } break; @@ -1312,15 +1321,15 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) static void DestroyPlayerOrRivalSprite(void) { - if (sCreditsMgr->taskId != 0xFF) + if (sCreditsMgr->taskId != TASK_NONE) { struct CreditsTaskData * data = (void *)gTasks[sCreditsMgr->taskId].data; - FreeSpriteTilesByTag(data->playerTilesTag); - DestroySprite(&gSprites[data->playerSpriteId]); + FreeSpriteTilesByTag(data->characterTilesTag); + DestroySprite(&gSprites[data->characterSpriteId]); FreeSpriteTilesByTag(data->groundTilesTag); DestroySprite(&gSprites[data->groundSpriteId]); DestroyTask(sCreditsMgr->taskId); - sCreditsMgr->taskId = 0xFF; + sCreditsMgr->taskId = TASK_NONE; } } @@ -1332,7 +1341,7 @@ static void LoadPlayerOrRivalSprite(u8 whichScene) struct SpriteTemplate sprTemplate; struct CompressedSpriteSheet sprSheet; - if (sCreditsMgr->taskId == 0xFF) + if (sCreditsMgr->taskId == TASK_NONE) { taskId = CreateTask(Task_MovePlayerAndGroundSprites, 0); data = (void *)gTasks[taskId].data; @@ -1341,97 +1350,97 @@ static void LoadPlayerOrRivalSprite(u8 whichScene) { default: case 0: - x = 0xd0; - y = 0x50; + x = DISPLAY_WIDTH - 32; + y = DISPLAY_HEIGHT / 2; break; case 1: - x = 0x110; - y = 0x50; + x = DISPLAY_WIDTH + 32; + y = DISPLAY_HEIGHT / 2; break; case 2: - x = 0xd0; - y = 0xa0; + x = DISPLAY_WIDTH - 32; + y = DISPLAY_HEIGHT; break; } data->spriteMoveCmd = sPlayerRivalSpriteParams[whichScene][2]; - data->playerTilesTag = 0x2000; - data->field_04 = 0xFFFF; + data->characterTilesTag = GFXTAG_CHARACTER; + data->characterPalTag = TAG_NONE; switch (sPlayerRivalSpriteParams[whichScene][0]) { case 0: // Player if (gSaveBlock2Ptr->playerGender == MALE) { - sprSheet.data = sMalePlayerSpriteGfx; + sprSheet.data = sPlayerMale_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sMalePlayerSpritePal, 0x1F0, 0x20); + LoadPalette(sPlayerMale_Pal, 0x1F0, sizeof(sPlayerMale_Pal)); } else { - sprSheet.data = sFemalePlayerSpriteGfx; + sprSheet.data = sPlayerFemale_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sFemalePlayerSpritePal, 0x1F0, 0x20); + LoadPalette(sPlayerFemale_Pal, 0x1F0, sizeof(sPlayerFemale_Pal)); } break; case 1: // Rival - sprSheet.data = sRivalSpriteGfx; + sprSheet.data = sRival_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sRivalSpritePal, 0x1F0, 0x20); + LoadPalette(sRival_Pal, 0x1F0, sizeof(sRival_Pal)); break; } sprTemplate = sPlayerOrRivalSpriteTemplate; - sprTemplate.tileTag = data->playerTilesTag; - data->playerSpriteId = CreateSprite(&sprTemplate, x, y, 0); - gSprites[data->playerSpriteId].oam.paletteNum = 0xF; - gSprites[data->playerSpriteId].subpriority = 0; + sprTemplate.tileTag = data->characterTilesTag; + data->characterSpriteId = CreateSprite(&sprTemplate, x, y, 0); + gSprites[data->characterSpriteId].oam.paletteNum = 15; + gSprites[data->characterSpriteId].subpriority = 0; - data->groundTilesTag = 0x2001; - data->field_0A = 0xFFFF; + data->groundTilesTag = GFXTAG_GROUND; + data->groundPalTag = TAG_NONE; switch (sPlayerRivalSpriteParams[whichScene][1]) { case 0: - sprSheet.data = sGroundSpriteGfx_Grass; + sprSheet.data = sGround_Grass_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20); + LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; case 1: - sprSheet.data = sGroundSpriteGfx_Grass; + sprSheet.data = sGround_Grass_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20); + LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal)); sprTemplate = sGroundSpriteTemplate_Static; break; case 2: - sprSheet.data = sGroundSpriteGfx_Dirt; + sprSheet.data = sGround_Dirt_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Dirt, 0x1E0, 0x20); + LoadPalette(sGround_Dirt_Pal, 0x1E0, sizeof(sGround_Dirt_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; case 3: - sprSheet.data = sGroundSpriteGfx_City; + sprSheet.data = sGround_City_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_City, 0x1E0, 0x20); + LoadPalette(sGround_City_Pal, 0x1E0, sizeof(sGround_City_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; } sprTemplate.tileTag = data->groundTilesTag; - data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 0x26, 0); - gSprites[data->groundSpriteId].oam.paletteNum = 0xE; + data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 38, 0); + gSprites[data->groundSpriteId].oam.paletteNum = 14; gSprites[data->groundSpriteId].subpriority = 1; } } diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index bdf780908..e744f80e0 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -1658,7 +1658,7 @@ const u32 gMonShinyPalette_Hitmontop[] = INCBIN_U32("graphics/pokemon/hitmontop/ const u8 gMonIcon_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/icon.4bpp"); // This might be undefined memory garbage. Its all 00s except for 1 0F. Its also not referenced. -const u32 gUndefined_8DD1E90[] = INCBIN_U32("data/garbage_8DD2290.bin"); +const u32 gUnusedGarbage[] = INCBIN_U32("graphics/pokemon/hitmontop/unused_garbage.bin"); const u8 gMonFootprint_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/footprint.1bpp"); diff --git a/src/data/items.json b/src/data/items.json index 25c9056ff..0a87abbe8 100644 --- a/src/data/items.json +++ b/src/data/items.json @@ -2948,7 +2948,7 @@ "english": "SOOTHE BELL", "itemId": "ITEM_SOOTHE_BELL", "price": 100, - "holdEffect": "HOLD_EFFECT_HAPPINESS_UP", + "holdEffect": "HOLD_EFFECT_FRIENDSHIP_UP", "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA bell with a comforting chime that\\nmakes the holder calm and friendly.", "importance": 0, diff --git a/src/data/party_menu.h b/src/data/party_menu.h index de330200a..6b4ebc1f7 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -108,8 +108,8 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = }, }; -static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); -static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); +static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin"); +static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin"); static const u8 sFontColorTable[][3] = { @@ -549,48 +549,14 @@ static const struct WindowTemplate sFieldMoveDescriptionWindowTemplate = .baseBlock = 0x373, }; -static const u8 sMainSlotTileNums[] = -{ - 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48, -}; - -static const u8 sMainSlotTileNums_Egg[] = -{ - 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48, -}; - -static const u8 sOtherSlotsTileNums[] = -{ - 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, -}; - -static const u8 sOtherSlotsTileNums_Egg[] = -{ - 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, -}; - -static const u8 sEmptySlotTileNums[] = -{ - 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, -}; +// Plain tilemaps for party menu slots. +// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility. +// There is no empty version of the main slot because it shouldn't ever be empty. +static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin"); +static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin"); +static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin"); +static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin"); +static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin"); static const u8 sGenderPalOffsets[] = {11, 12}; @@ -695,8 +661,8 @@ static const u8 *const sFieldMoveDescriptionTable[] = [FIELD_MOVE_SWEET_SCENT] = gText_LureWildPokemon, }; -static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); -static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); +static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp"); +static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal"); static const struct OamData sOamData_HeldItem = { diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 31a78a748..db57298b6 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -1,6 +1,6 @@ static const u8 sItemEffect_Potion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 20, + [6] = 20, // Amount of HP to recover }; static const u8 sItemEffect_Antidote[6] = { @@ -26,22 +26,22 @@ static const u8 sItemEffect_ParalyzeHeal[6] = { static const u8 sItemEffect_FullRestore[7] = { [3] = ITEM3_STATUS_ALL, [4] = ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_MaxPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_HyperPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 200, + [6] = 200, // Amount of HP to recover }; static const u8 sItemEffect_SuperPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 50, + [6] = 50, // Amount of HP to recover }; static const u8 sItemEffect_FullHeal[6] = { @@ -50,87 +50,87 @@ static const u8 sItemEffect_FullHeal[6] = { static const u8 sItemEffect_Revive[7] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -2, + [6] = ITEM6_HEAL_HP_HALF, }; static const u8 sItemEffect_MaxRevive[7] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_FreshWater[7] = { [4] = ITEM4_HEAL_HP, - [6] = 50, + [6] = 50, // Amount of HP to recover }; static const u8 sItemEffect_SodaPop[7] = { [4] = ITEM4_HEAL_HP, - [6] = 60, + [6] = 60, // Amount of HP to recover }; static const u8 sItemEffect_Lemonade[7] = { [4] = ITEM4_HEAL_HP, - [6] = 80, + [6] = 80, // Amount of HP to recover }; static const u8 sItemEffect_MoomooMilk[7] = { [4] = ITEM4_HEAL_HP, - [6] = 100, + [6] = 100, // Amount of HP to recover }; static const u8 sItemEffect_EnergyPowder[10] = { [4] = ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 50, - [7] = -5, - [8] = -5, - [9] = -10, + [6] = 50, // Amount of HP to recover + [7] = -5, // Friendship change, low + [8] = -5, // Friendship change, mid + [9] = -10, // Friendship change, high }; static const u8 sItemEffect_EnergyRoot[10] = { [4] = ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 200, - [7] = -10, - [8] = -10, - [9] = -15, + [6] = 200, // Amount of HP to recover + [7] = -10, // Friendship change, low + [8] = -10, // Friendship change, mid + [9] = -15, // Friendship change, high }; static const u8 sItemEffect_HealPowder[9] = { [3] = ITEM3_STATUS_ALL, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = -5, - [7] = -5, - [8] = -10, + [6] = -5, // Friendship change, low + [7] = -5, // Friendship change, mid + [8] = -10, // Friendship change, high }; static const u8 sItemEffect_RevivalHerb[10] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = -1, - [7] = -15, - [8] = -15, - [9] = -20, + [6] = ITEM6_HEAL_HP_FULL, + [7] = -15, // Friendship change, low + [8] = -15, // Friendship change, mid + [9] = -20, // Friendship change, high }; static const u8 sItemEffect_Ether[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_MaxEther[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 0x7F, + [6] = ITEM6_HEAL_PP_FULL, }; static const u8 sItemEffect_Elixir[7] = { [4] = ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_MaxElixir[7] = { [4] = ITEM4_HEAL_PP_ALL, - [6] = 0x7F, + [6] = ITEM6_HEAL_PP_FULL, }; static const u8 sItemEffect_LavaCookie[6] = { @@ -151,137 +151,121 @@ static const u8 sItemEffect_RedFlute[6] = { static const u8 sItemEffect_BerryJuice[7] = { [4] = ITEM4_HEAL_HP, - [6] = 20, + [6] = 20, // Amount of HP to recover }; static const u8 sItemEffect_SacredAsh[7] = { [0] = ITEM0_SACRED_ASH, [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; +#define VITAMIN_FRIENDSHIP_CHANGE(i) \ + [(i) + 0] = 5, /* Friendship change, low */ \ + [(i) + 1] = 3, /* Friendship change, mid */ \ + [(i) + 2] = 2 /* Friendship change, high */ + static const u8 sItemEffect_HPUp[10] = { [4] = ITEM4_EV_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Protein[10] = { [4] = ITEM4_EV_ATK, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Iron[10] = { [5] = ITEM5_EV_DEF | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Carbos[10] = { [5] = ITEM5_EV_SPEED | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Calcium[10] = { [5] = ITEM5_EV_SPATK | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_RareCandy[10] = { [3] = ITEM3_LEVEL_UP, [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 0xFD, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_HEAL_HP_LVL_UP, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_PPUp[9] = { [4] = ITEM4_PP_UP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 5, - [7] = 3, - [8] = 2, + VITAMIN_FRIENDSHIP_CHANGE(6), }; static const u8 sItemEffect_Zinc[10] = { [5] = ITEM5_EV_SPDEF | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_PPMax[9] = { [5] = ITEM5_PP_MAX | ITEM5_FRIENDSHIP_ALL, - [6] = 5, - [7] = 3, - [8] = 2, + VITAMIN_FRIENDSHIP_CHANGE(6), }; +#define STAT_BOOST_FRIENDSHIP_CHANGE \ + [6] = 1, /* Friendship change, low */ \ + [7] = 1 /* Friendship change, mid */ + static const u8 sItemEffect_GuardSpec[8] = { - [3] = ITEM3_MIST, + [3] = ITEM3_GUARD_SPEC, [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_DireHit[8] = { - [0] = 2 << 4, + [0] = 2 << 4, // ITEM0_DIRE_HIT [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_XAttack[8] = { - [0] = 1, + [0] = 1, // ITEM0_X_ATTACK [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_XDefend[8] = { - [1] = 1 << 4, + [1] = 1 << 4, /// ITEM1_X_DEFEND [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XSpeed[8] = { - [1] = 1, + [1] = 1, // ITEM1_X_SPEED [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XAccuracy[8] = { - [2] = 1 << 4, + [2] = 1 << 4, // ITEM2_X_ACCURACY [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XSpecial[8] = { - [2] = 1, + [2] = 1, // ITEM2_X_SPATK [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_SunStone[6] = { @@ -330,12 +314,12 @@ static const u8 sItemEffect_AspearBerry[6] = { static const u8 sItemEffect_LeppaBerry[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_OranBerry[7] = { [4] = ITEM4_HEAL_HP, - [6] = 10, + [6] = 10, // Amount of HP to recover }; static const u8 sItemEffect_PersimBerry[6] = { @@ -348,73 +332,73 @@ static const u8 sItemEffect_LumBerry[6] = { static const u8 sItemEffect_SitrusBerry[7] = { [4] = ITEM4_HEAL_HP, - [6] = 30, + [6] = 30, // Amount of HP to recover }; const u8 *const gItemEffectTable[] = { - [ITEM_POTION - ITEM_POTION] = sItemEffect_Potion, - [ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote, - [ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal, - [ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal, - [ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening, + [ITEM_POTION - ITEM_POTION] = sItemEffect_Potion, + [ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote, + [ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal, + [ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal, + [ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening, [ITEM_PARALYZE_HEAL - ITEM_POTION] = sItemEffect_ParalyzeHeal, - [ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore, - [ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion, - [ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion, - [ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion, - [ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal, - [ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive, - [ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive, - [ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater, - [ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop, - [ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade, - [ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk, + [ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore, + [ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion, + [ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion, + [ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion, + [ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal, + [ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive, + [ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive, + [ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater, + [ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop, + [ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade, + [ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk, [ITEM_ENERGY_POWDER - ITEM_POTION] = sItemEffect_EnergyPowder, - [ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot, - [ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder, - [ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb, - [ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether, - [ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther, - [ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir, - [ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir, - [ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie, - [ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute, - [ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute, - [ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute, - [ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice, - [ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh, - [ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp, - [ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein, - [ITEM_IRON - ITEM_POTION] = sItemEffect_Iron, - [ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos, - [ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium, - [ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy, - [ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp, - [ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc, - [ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax, - [ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec, - [ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit, - [ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack, - [ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend, - [ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed, - [ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy, - [ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial, - [ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone, - [ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone, - [ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone, + [ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot, + [ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder, + [ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb, + [ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether, + [ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther, + [ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir, + [ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir, + [ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie, + [ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute, + [ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute, + [ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute, + [ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice, + [ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh, + [ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp, + [ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein, + [ITEM_IRON - ITEM_POTION] = sItemEffect_Iron, + [ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos, + [ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium, + [ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy, + [ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp, + [ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc, + [ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax, + [ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec, + [ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit, + [ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack, + [ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend, + [ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed, + [ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy, + [ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial, + [ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone, + [ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone, + [ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone, [ITEM_THUNDER_STONE - ITEM_POTION] = sItemEffect_ThunderStone, - [ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone, - [ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone, - [ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry, - [ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry, - [ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry, - [ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry, - [ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry, - [ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry, - [ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry, - [ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry, - [ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry, - [ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry, - [LAST_BERRY_INDEX - ITEM_POTION] = NULL, + [ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone, + [ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone, + [ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry, + [ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry, + [ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry, + [ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry, + [ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry, + [ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry, + [ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry, + [ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry, + [ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry, + [ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry, + [LAST_BERRY_INDEX - ITEM_POTION] = NULL, }; diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/species_info.h similarity index 71% rename from src/data/pokemon/base_stats.h rename to src/data/pokemon/species_info.h index 2dbde1483..3e36c08ce 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/species_info.h @@ -2,39 +2,37 @@ // 255 (MON_GENDERLESS) is reserved for genderless Pokémon. #define PERCENT_FEMALE(percent) min(254, ((percent * 255) / 100)) -#define OLD_UNOWN_BASE_STATS \ - { \ - .baseHP = 50, \ - .baseAttack = 150, \ - .baseDefense = 50, \ - .baseSpAttack = 150, \ - .baseSpDefense = 50, \ - .baseSpeed = 150, \ - .type1 = TYPE_NORMAL, \ - .type2 = TYPE_NORMAL, \ - .catchRate = 3, \ - .expYield = 1, \ - .evYield_HP = 2, \ - .evYield_Attack = 2, \ - .evYield_Defense = 2, \ - .evYield_Speed = 2, \ - .evYield_SpAttack = 2, \ - .evYield_SpDefense = 2, \ - .item1 = ITEM_NONE, \ - .item2 = ITEM_NONE, \ - .genderRatio = MON_GENDERLESS, \ - .eggCycles = 120, \ - .friendship = 0, \ - .growthRate = GROWTH_MEDIUM_FAST, \ - .eggGroup1 = EGG_GROUP_UNDISCOVERED,\ - .eggGroup2 = EGG_GROUP_UNDISCOVERED,\ - .abilities = {0, 0}, \ - .safariZoneFleeRate = 0, \ - .bodyColor = BODY_COLOR_BLACK, \ - .noFlip = FALSE, \ +#define OLD_UNOWN_SPECIES_INFO \ + { \ + .baseHP = 50, \ + .baseAttack = 150, \ + .baseDefense = 50, \ + .baseSpAttack = 150, \ + .baseSpDefense = 50, \ + .baseSpeed = 150, \ + .types = {TYPE_NORMAL, TYPE_NORMAL}, \ + .catchRate = 3, \ + .expYield = 1, \ + .evYield_HP = 2, \ + .evYield_Attack = 2, \ + .evYield_Defense = 2, \ + .evYield_Speed = 2, \ + .evYield_SpAttack = 2, \ + .evYield_SpDefense = 2, \ + .itemCommon = ITEM_NONE, \ + .itemRare = ITEM_NONE, \ + .genderRatio = MON_GENDERLESS, \ + .eggCycles = 120, \ + .friendship = 0, \ + .growthRate = GROWTH_MEDIUM_FAST, \ + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, \ + .abilities = {ABILITY_NONE, ABILITY_NONE}, \ + .safariZoneFleeRate = 0, \ + .bodyColor = BODY_COLOR_BLACK, \ + .noFlip = FALSE, \ } -const struct BaseStats gBaseStats[] = +const struct SpeciesInfo gSpeciesInfo[] = { [SPECIES_NONE] = {0}, [SPECIES_BULBASAUR] = @@ -45,8 +43,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 64, .evYield_HP = 0, @@ -55,15 +52,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -76,8 +72,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -86,15 +81,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -107,8 +101,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -117,15 +110,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -138,8 +130,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -148,15 +139,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -169,8 +159,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -179,15 +168,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -200,8 +188,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 109, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -210,15 +197,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -231,8 +217,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 50, .baseSpDefense = 64, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 66, .evYield_HP = 0, @@ -241,15 +226,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -262,8 +246,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 58, .baseSpAttack = 65, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -272,15 +255,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -293,8 +275,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 78, .baseSpAttack = 85, .baseSpDefense = 105, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -303,15 +284,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -324,8 +304,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 20, .baseSpDefense = 20, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 255, .expYield = 53, .evYield_HP = 1, @@ -334,15 +313,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -355,8 +333,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 72, .evYield_HP = 0, @@ -365,15 +342,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -386,8 +362,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 160, .evYield_HP = 0, @@ -396,15 +371,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -417,8 +391,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 20, .baseSpDefense = 20, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 255, .expYield = 52, .evYield_HP = 0, @@ -427,15 +400,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -448,8 +420,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 120, .expYield = 71, .evYield_HP = 0, @@ -458,15 +429,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -479,8 +449,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 45, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 45, .expYield = 159, .evYield_HP = 0, @@ -489,15 +458,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -510,8 +478,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 56, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 55, .evYield_HP = 0, @@ -520,15 +487,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -541,8 +507,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 71, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 120, .expYield = 113, .evYield_HP = 0, @@ -551,15 +516,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -572,8 +536,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 91, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 172, .evYield_HP = 0, @@ -582,15 +545,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -603,8 +565,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 72, .baseSpAttack = 25, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 57, .evYield_HP = 0, @@ -613,15 +574,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -634,8 +594,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 97, .baseSpAttack = 50, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 127, .expYield = 116, .evYield_HP = 0, @@ -644,15 +603,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -665,8 +623,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 31, .baseSpDefense = 31, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 58, .evYield_HP = 0, @@ -675,15 +632,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -696,8 +652,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 61, .baseSpDefense = 61, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 90, .expYield = 162, .evYield_HP = 0, @@ -706,15 +661,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -727,8 +681,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 54, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 255, .expYield = 62, .evYield_HP = 0, @@ -737,15 +690,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_SHED_SKIN }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -758,8 +710,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 65, .baseSpDefense = 79, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 90, .expYield = 147, .evYield_HP = 0, @@ -768,15 +719,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_SHED_SKIN }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -789,8 +739,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 50, .baseSpDefense = 40, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 82, .evYield_HP = 0, @@ -799,15 +748,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -820,8 +768,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 90, .baseSpDefense = 80, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 75, .expYield = 122, .evYield_HP = 0, @@ -830,15 +777,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -851,8 +797,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 93, .evYield_HP = 0, @@ -861,15 +806,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -882,8 +826,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 90, .expYield = 163, .evYield_HP = 0, @@ -892,15 +835,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SOFT_SAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -913,8 +855,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 41, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 235, .expYield = 59, .evYield_HP = 1, @@ -923,15 +864,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -944,8 +884,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 56, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 120, .expYield = 117, .evYield_HP = 2, @@ -954,15 +893,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -975,8 +913,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 76, .baseSpAttack = 75, .baseSpDefense = 85, - .type1 = TYPE_POISON, - .type2 = TYPE_GROUND, + .types = {TYPE_POISON, TYPE_GROUND}, .catchRate = 45, .expYield = 194, .evYield_HP = 3, @@ -985,15 +922,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1006,8 +942,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 235, .expYield = 60, .evYield_HP = 0, @@ -1016,15 +951,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1037,8 +971,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 120, .expYield = 118, .evYield_HP = 0, @@ -1047,15 +980,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1068,8 +1000,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_POISON, - .type2 = TYPE_GROUND, + .types = {TYPE_POISON, TYPE_GROUND}, .catchRate = 45, .expYield = 195, .evYield_HP = 0, @@ -1078,15 +1009,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1099,8 +1029,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 60, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 68, .evYield_HP = 2, @@ -1109,15 +1038,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1130,8 +1058,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 90, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 25, .expYield = 129, .evYield_HP = 3, @@ -1140,15 +1067,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1161,8 +1087,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 63, .evYield_HP = 0, @@ -1171,15 +1096,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1192,8 +1116,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 81, .baseSpDefense = 100, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 75, .expYield = 178, .evYield_HP = 0, @@ -1202,15 +1125,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1223,8 +1145,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 45, .baseSpDefense = 25, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 170, .expYield = 76, .evYield_HP = 2, @@ -1233,15 +1154,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1254,8 +1174,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 75, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 50, .expYield = 109, .evYield_HP = 3, @@ -1264,15 +1183,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1285,8 +1203,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 30, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -1295,15 +1212,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1316,8 +1232,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 65, .baseSpDefense = 75, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 90, .expYield = 171, .evYield_HP = 0, @@ -1326,15 +1241,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1347,8 +1261,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 75, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 255, .expYield = 78, .evYield_HP = 0, @@ -1357,15 +1270,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1378,8 +1290,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 120, .expYield = 132, .evYield_HP = 0, @@ -1388,15 +1299,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1409,8 +1319,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 100, .baseSpDefense = 90, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 184, .evYield_HP = 0, @@ -1419,15 +1328,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1440,8 +1348,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_BUG, - .type2 = TYPE_GRASS, + .types = {TYPE_BUG, TYPE_GRASS}, .catchRate = 190, .expYield = 70, .evYield_HP = 0, @@ -1450,15 +1357,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_TINY_MUSHROOM, - .item2 = ITEM_BIG_MUSHROOM, + .itemCommon = ITEM_TINY_MUSHROOM, + .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1471,8 +1377,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 60, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_GRASS, + .types = {TYPE_BUG, TYPE_GRASS}, .catchRate = 75, .expYield = 128, .evYield_HP = 0, @@ -1481,15 +1386,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_TINY_MUSHROOM, - .item2 = ITEM_BIG_MUSHROOM, + .itemCommon = ITEM_TINY_MUSHROOM, + .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1502,8 +1406,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 190, .expYield = 75, .evYield_HP = 0, @@ -1512,15 +1415,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1533,8 +1435,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 90, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 75, .expYield = 138, .evYield_HP = 0, @@ -1543,15 +1444,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1564,8 +1464,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 81, .evYield_HP = 0, @@ -1574,15 +1473,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1595,8 +1493,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 50, .baseSpDefense = 70, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 50, .expYield = 153, .evYield_HP = 0, @@ -1605,15 +1502,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1626,8 +1522,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 69, .evYield_HP = 0, @@ -1636,15 +1531,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NUGGET, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NUGGET, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1657,8 +1551,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 148, .evYield_HP = 0, @@ -1667,15 +1560,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1688,8 +1580,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 65, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 80, .evYield_HP = 0, @@ -1698,15 +1589,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_CLOUD_NINE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1719,8 +1609,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 174, .evYield_HP = 0, @@ -1729,15 +1618,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_CLOUD_NINE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1750,8 +1638,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 190, .expYield = 74, .evYield_HP = 0, @@ -1760,15 +1647,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1781,8 +1667,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 75, .expYield = 149, .evYield_HP = 0, @@ -1791,15 +1676,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1812,8 +1696,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 91, .evYield_HP = 0, @@ -1822,15 +1705,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1843,8 +1725,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 75, .expYield = 213, .evYield_HP = 0, @@ -1853,15 +1734,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1874,8 +1754,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 77, .evYield_HP = 0, @@ -1884,15 +1763,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1905,8 +1783,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 120, .expYield = 131, .evYield_HP = 0, @@ -1915,15 +1792,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1936,8 +1812,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 90, - .type1 = TYPE_WATER, - .type2 = TYPE_FIGHTING, + .types = {TYPE_WATER, TYPE_FIGHTING}, .catchRate = 45, .expYield = 185, .evYield_HP = 0, @@ -1946,15 +1821,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1967,8 +1841,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 105, .baseSpDefense = 55, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 200, .expYield = 73, .evYield_HP = 0, @@ -1977,15 +1850,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1998,8 +1870,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 120, .baseSpDefense = 70, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 100, .expYield = 145, .evYield_HP = 0, @@ -2008,15 +1879,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2029,8 +1899,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 135, .baseSpDefense = 85, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 50, .expYield = 186, .evYield_HP = 0, @@ -2039,15 +1908,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2060,8 +1928,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 180, .expYield = 88, .evYield_HP = 0, @@ -2070,15 +1937,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2091,8 +1957,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 50, .baseSpDefense = 60, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 90, .expYield = 146, .evYield_HP = 0, @@ -2101,15 +1966,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_FOCUS_BAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2122,8 +1986,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 65, .baseSpDefense = 85, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 193, .evYield_HP = 0, @@ -2132,15 +1995,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_FOCUS_BAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2153,8 +2015,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 70, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 255, .expYield = 84, .evYield_HP = 0, @@ -2163,15 +2024,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2184,8 +2044,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 85, .baseSpDefense = 45, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 120, .expYield = 151, .evYield_HP = 0, @@ -2194,15 +2053,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2215,8 +2073,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 100, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 191, .evYield_HP = 0, @@ -2225,15 +2082,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2246,8 +2102,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 50, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 190, .expYield = 105, .evYield_HP = 0, @@ -2256,15 +2111,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2277,8 +2131,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 80, .baseSpDefense = 120, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 60, .expYield = 205, .evYield_HP = 0, @@ -2287,15 +2140,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2308,8 +2160,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 255, .expYield = 86, .evYield_HP = 0, @@ -2318,15 +2169,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2339,8 +2189,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 120, .expYield = 134, .evYield_HP = 0, @@ -2349,15 +2198,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2370,8 +2218,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 177, .evYield_HP = 0, @@ -2380,15 +2227,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2401,8 +2247,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 152, .evYield_HP = 0, @@ -2411,15 +2256,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2432,8 +2276,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 60, .expYield = 192, .evYield_HP = 0, @@ -2442,15 +2285,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2463,8 +2305,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 190, .expYield = 99, .evYield_HP = 1, @@ -2473,15 +2314,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2494,8 +2334,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 75, .expYield = 164, .evYield_HP = 0, @@ -2504,15 +2343,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2525,8 +2363,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 95, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_STEEL, + .types = {TYPE_ELECTRIC, TYPE_STEEL}, .catchRate = 190, .expYield = 89, .evYield_HP = 0, @@ -2535,15 +2372,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_MAGNET_PULL, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2556,8 +2392,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 120, .baseSpDefense = 70, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_STEEL, + .types = {TYPE_ELECTRIC, TYPE_STEEL}, .catchRate = 60, .expYield = 161, .evYield_HP = 0, @@ -2566,15 +2401,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MAGNET, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MAGNET, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_MAGNET_PULL, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2587,8 +2421,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 58, .baseSpDefense = 62, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 94, .evYield_HP = 0, @@ -2597,15 +2430,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_STICK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_STICK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FIELD}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2618,8 +2450,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 190, .expYield = 96, .evYield_HP = 0, @@ -2628,15 +2459,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2649,8 +2479,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 158, .evYield_HP = 0, @@ -2659,15 +2488,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2680,8 +2508,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 45, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 100, .evYield_HP = 0, @@ -2690,15 +2517,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2711,8 +2537,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 75, .expYield = 176, .evYield_HP = 0, @@ -2721,15 +2546,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2742,8 +2566,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 190, .expYield = 90, .evYield_HP = 1, @@ -2752,15 +2575,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_STENCH, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2773,8 +2595,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 100, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 75, .expYield = 157, .evYield_HP = 1, @@ -2783,15 +2604,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_STENCH, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2804,8 +2624,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -2814,15 +2633,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_PEARL, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_PEARL, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2835,8 +2653,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 85, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 60, .expYield = 203, .evYield_HP = 0, @@ -2845,15 +2662,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_PEARL, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_PEARL, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2866,8 +2682,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 35, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 190, .expYield = 95, .evYield_HP = 0, @@ -2876,15 +2691,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2897,8 +2711,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 115, .baseSpDefense = 55, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 90, .expYield = 126, .evYield_HP = 0, @@ -2907,15 +2720,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2928,8 +2740,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 75, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 45, .expYield = 190, .evYield_HP = 0, @@ -2938,15 +2749,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2959,8 +2769,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 30, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 108, .evYield_HP = 0, @@ -2969,15 +2778,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2990,8 +2798,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 42, .baseSpAttack = 43, .baseSpDefense = 90, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 190, .expYield = 102, .evYield_HP = 0, @@ -3000,15 +2807,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3021,8 +2827,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 73, .baseSpDefense = 115, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 75, .expYield = 165, .evYield_HP = 0, @@ -3031,15 +2836,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3052,8 +2856,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 115, .evYield_HP = 0, @@ -3062,15 +2865,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3083,8 +2885,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 206, .evYield_HP = 0, @@ -3093,15 +2894,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -3114,8 +2914,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 103, .evYield_HP = 0, @@ -3124,15 +2923,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_STATIC }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3145,8 +2943,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 140, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 60, .expYield = 150, .evYield_HP = 0, @@ -3155,15 +2952,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_STATIC }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3176,8 +2972,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 45, - .type1 = TYPE_GRASS, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GRASS, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 98, .evYield_HP = 0, @@ -3186,15 +2981,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3207,8 +3001,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 125, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GRASS, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 212, .evYield_HP = 0, @@ -3217,15 +3010,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3238,8 +3030,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 190, .expYield = 87, .evYield_HP = 0, @@ -3248,15 +3039,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_THICK_CLUB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3269,8 +3059,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 50, .baseSpDefense = 80, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 75, .expYield = 124, .evYield_HP = 0, @@ -3279,15 +3068,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_THICK_CLUB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3300,8 +3088,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 87, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 139, .evYield_HP = 0, @@ -3310,15 +3097,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3331,8 +3117,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 76, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 140, .evYield_HP = 0, @@ -3341,15 +3126,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3362,8 +3146,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 127, .evYield_HP = 2, @@ -3372,15 +3155,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3393,8 +3175,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 60, .baseSpDefense = 45, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 190, .expYield = 114, .evYield_HP = 0, @@ -3403,15 +3184,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3424,8 +3204,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 60, .expYield = 173, .evYield_HP = 0, @@ -3434,15 +3213,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3455,8 +3233,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GROUND, - .type2 = TYPE_ROCK, + .types = {TYPE_GROUND, TYPE_ROCK}, .catchRate = 120, .expYield = 135, .evYield_HP = 0, @@ -3465,15 +3242,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3486,8 +3262,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_ROCK, + .types = {TYPE_GROUND, TYPE_ROCK}, .catchRate = 60, .expYield = 204, .evYield_HP = 0, @@ -3496,15 +3271,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3517,8 +3291,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 105, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 30, .expYield = 255, .evYield_HP = 2, @@ -3527,15 +3300,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LUCKY_EGG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LUCKY_EGG, .genderRatio = MON_FEMALE, .eggCycles = 40, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3548,8 +3320,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 100, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 166, .evYield_HP = 0, @@ -3558,15 +3329,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3579,8 +3349,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 80, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 175, .evYield_HP = 2, @@ -3589,15 +3358,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3610,8 +3378,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 83, .evYield_HP = 0, @@ -3620,15 +3387,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3641,8 +3407,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 155, .evYield_HP = 0, @@ -3651,15 +3416,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3672,8 +3436,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 63, .baseSpAttack = 35, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 111, .evYield_HP = 0, @@ -3682,15 +3445,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3703,8 +3465,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 68, .baseSpAttack = 65, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 170, .evYield_HP = 0, @@ -3713,15 +3474,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3734,8 +3494,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 70, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 106, .evYield_HP = 0, @@ -3744,15 +3503,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STARDUST, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STARDUST, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3765,8 +3523,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 100, .baseSpDefense = 85, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 207, .evYield_HP = 0, @@ -3775,15 +3532,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STARDUST, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STARDUST, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3796,8 +3552,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 100, .baseSpDefense = 120, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 136, .evYield_HP = 0, @@ -3806,15 +3561,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3827,8 +3581,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 187, .evYield_HP = 0, @@ -3837,15 +3590,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -3858,8 +3610,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 115, .baseSpDefense = 95, - .type1 = TYPE_ICE, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ICE, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 137, .evYield_HP = 0, @@ -3868,15 +3619,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3889,8 +3639,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 95, .baseSpDefense = 85, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 156, .evYield_HP = 0, @@ -3899,15 +3648,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -3920,8 +3668,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 93, .baseSpAttack = 100, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 167, .evYield_HP = 0, @@ -3930,15 +3677,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_FLAME_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3951,8 +3697,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 70, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -3961,15 +3706,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3982,8 +3726,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 211, .evYield_HP = 0, @@ -3992,15 +3735,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4013,8 +3755,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 15, .baseSpDefense = 20, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 20, .evYield_HP = 0, @@ -4023,15 +3764,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 25, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4044,8 +3784,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 81, .baseSpAttack = 60, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 45, .expYield = 214, .evYield_HP = 0, @@ -4054,15 +3793,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4075,8 +3813,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 45, .expYield = 219, .evYield_HP = 2, @@ -4085,15 +3822,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4106,8 +3842,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 48, .baseSpDefense = 48, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 35, .expYield = 61, .evYield_HP = 1, @@ -4116,15 +3851,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_POWDER, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_DITTO, - .eggGroup2 = EGG_GROUP_DITTO, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DITTO, EGG_GROUP_DITTO}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4137,8 +3871,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 92, .evYield_HP = 0, @@ -4147,15 +3880,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4168,8 +3900,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 110, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 196, .evYield_HP = 2, @@ -4178,15 +3909,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4199,8 +3929,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 110, .baseSpDefense = 95, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -4209,15 +3938,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4230,8 +3958,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 110, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 198, .evYield_HP = 0, @@ -4240,15 +3967,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4261,8 +3987,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 130, .evYield_HP = 0, @@ -4271,15 +3996,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_TRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4292,8 +4016,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 90, .baseSpDefense = 55, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 120, .evYield_HP = 0, @@ -4302,15 +4025,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4323,8 +4045,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 199, .evYield_HP = 0, @@ -4333,15 +4054,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4354,8 +4074,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 55, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 119, .evYield_HP = 0, @@ -4364,15 +4083,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4385,8 +4103,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 65, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 201, .evYield_HP = 0, @@ -4395,15 +4112,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4416,8 +4132,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_ROCK, - .type2 = TYPE_FLYING, + .types = {TYPE_ROCK, TYPE_FLYING}, .catchRate = 45, .expYield = 202, .evYield_HP = 0, @@ -4426,15 +4141,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_PRESSURE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_PRESSURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4447,8 +4161,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 65, .baseSpDefense = 110, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 25, .expYield = 154, .evYield_HP = 2, @@ -4457,15 +4170,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_CHESTO_BERRY, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_CHESTO_BERRY, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_IMMUNITY, ABILITY_THICK_FAT }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_IMMUNITY, ABILITY_THICK_FAT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -4478,8 +4190,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 125, - .type1 = TYPE_ICE, - .type2 = TYPE_FLYING, + .types = {TYPE_ICE, TYPE_FLYING}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -4488,15 +4199,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4509,8 +4219,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 125, .baseSpDefense = 90, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_FLYING, + .types = {TYPE_ELECTRIC, TYPE_FLYING}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -4519,15 +4228,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4540,8 +4248,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 125, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 3, .expYield = 217, .evYield_HP = 0, @@ -4550,15 +4257,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4571,8 +4277,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 67, .evYield_HP = 0, @@ -4581,15 +4286,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 100, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4602,8 +4306,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -4612,15 +4315,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_FANG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4633,8 +4335,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -4643,15 +4344,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_FANG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4664,8 +4364,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 154, .baseSpDefense = 90, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -4674,15 +4373,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4695,8 +4393,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 64, .evYield_HP = 3, @@ -4705,15 +4402,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4726,8 +4422,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 49, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 64, .evYield_HP = 0, @@ -4736,15 +4431,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_LUM_BERRY, - .item2 = ITEM_LUM_BERRY, + .itemCommon = ITEM_LUM_BERRY, + .itemRare = ITEM_LUM_BERRY, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4757,8 +4451,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 63, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -4767,15 +4460,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4788,8 +4480,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 83, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -4798,15 +4489,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4819,8 +4509,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -4829,15 +4518,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4850,8 +4538,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -4860,15 +4547,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4881,8 +4567,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 109, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -4891,15 +4576,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4912,8 +4596,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 44, .baseSpDefense = 48, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 66, .evYield_HP = 0, @@ -4922,15 +4605,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4943,8 +4625,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 58, .baseSpAttack = 59, .baseSpDefense = 63, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -4953,15 +4634,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -4974,8 +4654,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 78, .baseSpAttack = 79, .baseSpDefense = 83, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -4984,15 +4663,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5005,8 +4683,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 57, .evYield_HP = 0, @@ -5015,15 +4692,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_ORAN_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5036,8 +4712,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 116, .evYield_HP = 0, @@ -5046,15 +4721,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5067,8 +4741,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 36, .baseSpDefense = 56, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 58, .evYield_HP = 1, @@ -5077,15 +4750,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5098,8 +4770,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 76, .baseSpDefense = 96, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 90, .expYield = 162, .evYield_HP = 2, @@ -5108,15 +4779,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5129,8 +4799,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -5139,15 +4808,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5160,8 +4828,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 110, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 90, .expYield = 134, .evYield_HP = 0, @@ -5170,15 +4837,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5191,8 +4857,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -5201,15 +4866,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_INSOMNIA }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5222,8 +4886,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 90, .expYield = 134, .evYield_HP = 0, @@ -5232,15 +4895,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_INSOMNIA }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5253,8 +4915,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 90, .expYield = 204, .evYield_HP = 0, @@ -5263,15 +4924,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5284,8 +4944,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 56, .baseSpDefense = 56, - .type1 = TYPE_WATER, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_WATER, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 90, .evYield_HP = 1, @@ -5294,15 +4953,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_YELLOW_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_YELLOW_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5315,8 +4973,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 76, .baseSpDefense = 76, - .type1 = TYPE_WATER, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_WATER, TYPE_ELECTRIC}, .catchRate = 75, .expYield = 156, .evYield_HP = 2, @@ -5325,15 +4982,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_YELLOW_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_YELLOW_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5346,8 +5002,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 42, .evYield_HP = 0, @@ -5356,15 +5011,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5377,8 +5031,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 37, .evYield_HP = 0, @@ -5387,15 +5040,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5408,8 +5060,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 40, .baseSpDefense = 20, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 170, .expYield = 39, .evYield_HP = 1, @@ -5418,15 +5069,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = TRUE, @@ -5439,8 +5089,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 40, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 74, .evYield_HP = 0, @@ -5449,15 +5098,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_HUSTLE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5470,8 +5118,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 80, .baseSpDefense = 105, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 75, .expYield = 114, .evYield_HP = 0, @@ -5480,15 +5127,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_HUSTLE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5501,8 +5147,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 45, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 190, .expYield = 73, .evYield_HP = 0, @@ -5511,15 +5156,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5532,8 +5176,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 95, .baseSpDefense = 70, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 75, .expYield = 171, .evYield_HP = 0, @@ -5542,15 +5185,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5563,8 +5205,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 235, .expYield = 59, .evYield_HP = 0, @@ -5573,15 +5214,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5594,8 +5234,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 80, .baseSpDefense = 60, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 120, .expYield = 117, .evYield_HP = 0, @@ -5604,15 +5243,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5625,8 +5263,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 90, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 194, .evYield_HP = 0, @@ -5635,15 +5272,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5656,8 +5292,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 184, .evYield_HP = 0, @@ -5666,15 +5301,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5687,8 +5321,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 20, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 58, .evYield_HP = 2, @@ -5697,15 +5330,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5718,8 +5350,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 153, .evYield_HP = 3, @@ -5728,15 +5359,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5749,8 +5379,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 65, .expYield = 135, .evYield_HP = 0, @@ -5759,15 +5388,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5780,8 +5408,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 185, .evYield_HP = 0, @@ -5790,15 +5417,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -5811,8 +5437,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 55, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -5821,15 +5446,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5842,8 +5466,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 120, .expYield = 136, .evYield_HP = 0, @@ -5852,15 +5475,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5873,8 +5495,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 55, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 45, .expYield = 176, .evYield_HP = 0, @@ -5883,15 +5504,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5904,8 +5524,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 94, .evYield_HP = 0, @@ -5914,15 +5533,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_PICKUP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_PICKUP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5935,8 +5553,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 235, .expYield = 52, .evYield_HP = 0, @@ -5945,15 +5562,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5966,8 +5582,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 105, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 120, .expYield = 146, .evYield_HP = 0, @@ -5976,15 +5591,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5997,8 +5611,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 75, .baseSpDefense = 45, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 75, .expYield = 147, .evYield_HP = 0, @@ -6007,15 +5620,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6028,8 +5640,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 255, .expYield = 52, .evYield_HP = 1, @@ -6038,15 +5649,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6059,8 +5669,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 90, .expYield = 137, .evYield_HP = 2, @@ -6069,15 +5678,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6090,8 +5698,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 95, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -6100,15 +5707,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6121,8 +5727,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 130, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -6131,15 +5736,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6152,8 +5756,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 91, .baseSpAttack = 85, .baseSpDefense = 42, - .type1 = TYPE_DARK, - .type2 = TYPE_FLYING, + .types = {TYPE_DARK, TYPE_FLYING}, .catchRate = 30, .expYield = 107, .evYield_HP = 0, @@ -6162,15 +5765,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6183,8 +5785,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 100, .baseSpDefense = 110, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 70, .expYield = 164, .evYield_HP = 0, @@ -6193,15 +5794,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6214,8 +5814,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 85, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 45, .expYield = 147, .evYield_HP = 0, @@ -6224,15 +5823,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6245,8 +5843,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 72, .baseSpDefense = 48, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 225, .expYield = 61, .evYield_HP = 0, @@ -6255,15 +5852,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -6276,8 +5872,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 33, .baseSpAttack = 33, .baseSpDefense = 58, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 177, .evYield_HP = 2, @@ -6286,15 +5881,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SHADOW_TAG, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6307,8 +5901,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 90, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_NORMAL, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 149, .evYield_HP = 0, @@ -6317,15 +5910,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PERSIM_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PERSIM_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6338,8 +5930,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 190, .expYield = 60, .evYield_HP = 0, @@ -6348,15 +5939,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6369,8 +5959,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_BUG, - .type2 = TYPE_STEEL, + .types = {TYPE_BUG, TYPE_STEEL}, .catchRate = 75, .expYield = 118, .evYield_HP = 0, @@ -6379,15 +5968,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6400,8 +5988,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 75, .evYield_HP = 1, @@ -6410,15 +5997,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6431,8 +6017,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 35, .baseSpDefense = 65, - .type1 = TYPE_GROUND, - .type2 = TYPE_FLYING, + .types = {TYPE_GROUND, TYPE_FLYING}, .catchRate = 60, .expYield = 108, .evYield_HP = 0, @@ -6441,15 +6026,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6462,8 +6046,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_STEEL, - .type2 = TYPE_GROUND, + .types = {TYPE_STEEL, TYPE_GROUND}, .catchRate = 25, .expYield = 196, .evYield_HP = 0, @@ -6472,15 +6055,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6493,8 +6075,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 63, .evYield_HP = 0, @@ -6503,15 +6084,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_INTIMIDATE, ABILITY_RUN_AWAY }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6524,8 +6104,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 75, .expYield = 178, .evYield_HP = 0, @@ -6534,15 +6113,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_INTIMIDATE, ABILITY_INTIMIDATE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6555,8 +6133,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 45, .expYield = 100, .evYield_HP = 0, @@ -6565,15 +6142,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6586,8 +6162,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_STEEL, + .types = {TYPE_BUG, TYPE_STEEL}, .catchRate = 25, .expYield = 200, .evYield_HP = 0, @@ -6596,15 +6171,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6617,8 +6191,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 5, .baseSpAttack = 10, .baseSpDefense = 230, - .type1 = TYPE_BUG, - .type2 = TYPE_ROCK, + .types = {TYPE_BUG, TYPE_ROCK}, .catchRate = 190, .expYield = 80, .evYield_HP = 0, @@ -6627,15 +6200,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_BERRY_JUICE, - .item2 = ITEM_BERRY_JUICE, + .itemCommon = ITEM_BERRY_JUICE, + .itemRare = ITEM_BERRY_JUICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6648,8 +6220,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 40, .baseSpDefense = 95, - .type1 = TYPE_BUG, - .type2 = TYPE_FIGHTING, + .types = {TYPE_BUG, TYPE_FIGHTING}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -6658,15 +6229,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6679,8 +6249,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 35, .baseSpDefense = 75, - .type1 = TYPE_DARK, - .type2 = TYPE_ICE, + .types = {TYPE_DARK, TYPE_ICE}, .catchRate = 60, .expYield = 132, .evYield_HP = 0, @@ -6689,15 +6258,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -6710,8 +6278,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 124, .evYield_HP = 0, @@ -6720,15 +6287,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -6741,8 +6307,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 75, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 60, .expYield = 189, .evYield_HP = 0, @@ -6751,15 +6316,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6772,8 +6336,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 70, .baseSpDefense = 40, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 78, .evYield_HP = 0, @@ -6782,15 +6345,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6803,8 +6365,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_ROCK, + .types = {TYPE_FIRE, TYPE_ROCK}, .catchRate = 75, .expYield = 154, .evYield_HP = 0, @@ -6813,15 +6374,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6834,8 +6394,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_ICE, - .type2 = TYPE_GROUND, + .types = {TYPE_ICE, TYPE_GROUND}, .catchRate = 225, .expYield = 78, .evYield_HP = 0, @@ -6844,15 +6403,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6865,8 +6423,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_ICE, - .type2 = TYPE_GROUND, + .types = {TYPE_ICE, TYPE_GROUND}, .catchRate = 75, .expYield = 160, .evYield_HP = 1, @@ -6875,15 +6432,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6896,8 +6452,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 85, - .type1 = TYPE_WATER, - .type2 = TYPE_ROCK, + .types = {TYPE_WATER, TYPE_ROCK}, .catchRate = 60, .expYield = 113, .evYield_HP = 0, @@ -6906,15 +6461,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_RED_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_RED_SHARD, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HUSTLE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HUSTLE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6927,8 +6481,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 78, .evYield_HP = 0, @@ -6937,15 +6490,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_HUSTLE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_HUSTLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6958,8 +6510,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 105, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 164, .evYield_HP = 0, @@ -6968,15 +6519,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6989,8 +6539,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_ICE, - .type2 = TYPE_FLYING, + .types = {TYPE_ICE, TYPE_FLYING}, .catchRate = 45, .expYield = 183, .evYield_HP = 0, @@ -6999,15 +6548,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7020,8 +6568,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 80, .baseSpDefense = 140, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 25, .expYield = 168, .evYield_HP = 0, @@ -7030,15 +6577,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7051,8 +6597,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_STEEL, - .type2 = TYPE_FLYING, + .types = {TYPE_STEEL, TYPE_FLYING}, .catchRate = 25, .expYield = 168, .evYield_HP = 0, @@ -7061,15 +6606,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7082,8 +6626,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 80, .baseSpDefense = 50, - .type1 = TYPE_DARK, - .type2 = TYPE_FIRE, + .types = {TYPE_DARK, TYPE_FIRE}, .catchRate = 120, .expYield = 114, .evYield_HP = 0, @@ -7092,15 +6635,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7113,8 +6655,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 110, .baseSpDefense = 80, - .type1 = TYPE_DARK, - .type2 = TYPE_FIRE, + .types = {TYPE_DARK, TYPE_FIRE}, .catchRate = 45, .expYield = 204, .evYield_HP = 0, @@ -7123,15 +6664,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7144,8 +6684,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_DRAGON, + .types = {TYPE_WATER, TYPE_DRAGON}, .catchRate = 45, .expYield = 207, .evYield_HP = 0, @@ -7154,15 +6693,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7175,8 +6713,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 120, .expYield = 124, .evYield_HP = 1, @@ -7185,15 +6722,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7206,8 +6742,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 60, .expYield = 189, .evYield_HP = 0, @@ -7216,15 +6751,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7237,8 +6771,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 105, .baseSpDefense = 95, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 180, .evYield_HP = 0, @@ -7247,15 +6780,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_UP_GRADE, - .item2 = ITEM_UP_GRADE, + .itemCommon = ITEM_UP_GRADE, + .itemRare = ITEM_UP_GRADE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_TRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7268,8 +6800,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 165, .evYield_HP = 0, @@ -7278,15 +6809,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7299,8 +6829,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 20, .baseSpDefense = 45, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 106, .evYield_HP = 0, @@ -7309,15 +6838,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -7330,8 +6858,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 75, .expYield = 91, .evYield_HP = 0, @@ -7340,15 +6867,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7361,8 +6887,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 138, .evYield_HP = 0, @@ -7371,15 +6896,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7392,8 +6916,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_ICE, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ICE, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 87, .evYield_HP = 0, @@ -7402,15 +6925,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7423,8 +6945,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 106, .evYield_HP = 0, @@ -7433,15 +6954,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -7454,8 +6974,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 83, .baseSpAttack = 70, .baseSpDefense = 55, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 117, .evYield_HP = 0, @@ -7464,15 +6983,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_FLAME_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7485,8 +7003,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -7495,15 +7012,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_MOOMOO_MILK, - .item2 = ITEM_MOOMOO_MILK, + .itemCommon = ITEM_MOOMOO_MILK, + .itemRare = ITEM_MOOMOO_MILK, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7516,8 +7032,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 75, .baseSpDefense = 135, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 30, .expYield = 255, .evYield_HP = 2, @@ -7526,15 +7041,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LUCKY_EGG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LUCKY_EGG, .genderRatio = MON_FEMALE, .eggCycles = 40, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7547,8 +7061,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 115, .baseSpDefense = 100, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -7557,15 +7070,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -7578,8 +7090,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 90, .baseSpDefense = 75, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 3, .expYield = 217, .evYield_HP = 1, @@ -7588,15 +7099,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7609,8 +7119,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 90, .baseSpDefense = 115, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -7619,15 +7128,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7640,8 +7148,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 41, .baseSpAttack = 45, .baseSpDefense = 50, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 67, .evYield_HP = 0, @@ -7650,15 +7157,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7671,8 +7177,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 51, .baseSpAttack = 65, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -7681,15 +7186,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7702,8 +7206,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 61, .baseSpAttack = 95, .baseSpDefense = 100, - .type1 = TYPE_ROCK, - .type2 = TYPE_DARK, + .types = {TYPE_ROCK, TYPE_DARK}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -7712,15 +7215,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_SAND_STREAM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7733,8 +7235,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 90, .baseSpDefense = 154, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -7743,15 +7244,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -7764,8 +7264,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 110, .baseSpDefense = 154, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -7774,15 +7273,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7795,8 +7293,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_GRASS, + .types = {TYPE_PSYCHIC, TYPE_GRASS}, .catchRate = 45, .expYield = 64, .evYield_HP = 3, @@ -7805,44 +7302,43 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_LUM_BERRY, - .item2 = ITEM_LUM_BERRY, + .itemCommon = ITEM_LUM_BERRY, + .itemRare = ITEM_LUM_BERRY, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, }, - [SPECIES_OLD_UNOWN_B] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_C] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_D] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_E] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_F] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_G] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_H] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_I] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_J] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_K] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_L] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_M] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_N] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_O] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_P] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_R] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_S] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_T] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_U] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_V] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_W] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_X] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_BASE_STATS, + [SPECIES_OLD_UNOWN_B] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_C] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_D] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_E] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_F] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_G] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_H] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_I] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_J] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_K] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_L] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_M] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_N] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_O] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_P] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_R] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_S] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_T] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_U] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_V] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_W] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_X] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_SPECIES_INFO, [SPECIES_TREECKO] = { .baseHP = 40, @@ -7851,8 +7347,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -7861,15 +7356,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7882,8 +7376,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -7892,15 +7385,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7913,8 +7405,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 105, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -7923,15 +7414,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7944,8 +7434,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 70, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -7954,15 +7443,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7975,8 +7463,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 85, .baseSpDefense = 60, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIRE, TYPE_FIGHTING}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -7985,15 +7472,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8006,8 +7492,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 110, .baseSpDefense = 70, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIRE, TYPE_FIGHTING}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -8016,15 +7501,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8037,8 +7521,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -8047,15 +7530,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8068,8 +7550,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -8078,15 +7559,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8099,8 +7579,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 90, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -8109,15 +7588,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8130,8 +7608,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 255, .expYield = 55, .evYield_HP = 0, @@ -8140,15 +7617,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PECHA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8161,8 +7637,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 127, .expYield = 128, .evYield_HP = 0, @@ -8171,15 +7646,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PECHA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8192,8 +7666,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 30, .baseSpDefense = 41, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 60, .evYield_HP = 0, @@ -8202,15 +7675,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_ORAN_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8223,8 +7695,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 50, .baseSpDefense = 61, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 128, .evYield_HP = 0, @@ -8233,15 +7704,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8254,8 +7724,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 255, .expYield = 54, .evYield_HP = 1, @@ -8264,15 +7733,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8285,8 +7753,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 71, .evYield_HP = 0, @@ -8295,15 +7762,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8316,8 +7782,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 90, .baseSpDefense = 50, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 161, .evYield_HP = 0, @@ -8326,15 +7791,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8347,8 +7811,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 72, .evYield_HP = 0, @@ -8357,15 +7820,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -8378,8 +7840,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 90, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 45, .expYield = 160, .evYield_HP = 0, @@ -8388,15 +7849,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8409,8 +7869,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -8419,15 +7878,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8440,8 +7898,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 120, .expYield = 141, .evYield_HP = 0, @@ -8450,15 +7907,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8471,8 +7927,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 45, .expYield = 181, .evYield_HP = 0, @@ -8481,15 +7936,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8502,8 +7956,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -8512,15 +7965,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8533,8 +7985,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 60, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 120, .expYield = 141, .evYield_HP = 0, @@ -8543,15 +7994,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8564,8 +8014,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 90, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 45, .expYield = 181, .evYield_HP = 0, @@ -8574,15 +8023,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8595,8 +8043,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_GROUND, + .types = {TYPE_BUG, TYPE_GROUND}, .catchRate = 255, .expYield = 65, .evYield_HP = 0, @@ -8605,15 +8052,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8626,8 +8072,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 160, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 120, .expYield = 155, .evYield_HP = 0, @@ -8636,15 +8081,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SPEED_BOOST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8657,8 +8101,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_GHOST, + .types = {TYPE_BUG, TYPE_GHOST}, .catchRate = 45, .expYield = 95, .evYield_HP = 2, @@ -8667,15 +8110,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_WONDER_GUARD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_WONDER_GUARD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8688,8 +8130,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 200, .expYield = 59, .evYield_HP = 0, @@ -8698,15 +8139,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8719,8 +8159,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 125, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 162, .evYield_HP = 0, @@ -8729,15 +8168,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8750,8 +8188,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 40, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 255, .expYield = 65, .evYield_HP = 1, @@ -8760,15 +8197,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8781,8 +8217,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_FIGHTING, + .types = {TYPE_GRASS, TYPE_FIGHTING}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -8791,15 +8226,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8812,8 +8246,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 85, .evYield_HP = 0, @@ -8822,15 +8255,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -8843,8 +8275,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 30, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 190, .expYield = 64, .evYield_HP = 0, @@ -8853,15 +8284,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8874,8 +8304,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 45, .expYield = 164, .evYield_HP = 0, @@ -8884,15 +8313,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8905,8 +8333,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 52, - .type1 = TYPE_BUG, - .type2 = TYPE_WATER, + .types = {TYPE_BUG, TYPE_WATER}, .catchRate = 200, .expYield = 63, .evYield_HP = 0, @@ -8915,15 +8342,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8936,8 +8362,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 80, .baseSpDefense = 82, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 75, .expYield = 128, .evYield_HP = 0, @@ -8946,15 +8371,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_BUG}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8967,8 +8391,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 125, .expYield = 137, .evYield_HP = 1, @@ -8977,15 +8400,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8998,8 +8420,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 90, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 206, .evYield_HP = 2, @@ -9008,15 +8429,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9029,8 +8449,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 65, .evYield_HP = 0, @@ -9039,15 +8458,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LEPPA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LEPPA_BERRY, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9060,8 +8478,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 60, .expYield = 138, .evYield_HP = 1, @@ -9070,15 +8487,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LEPPA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LEPPA_BERRY, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9091,8 +8507,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 120, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 200, .expYield = 132, .evYield_HP = 0, @@ -9101,15 +8516,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_PERSIM_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PERSIM_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_COLOR_CHANGE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_COLOR_CHANGE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9122,8 +8536,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_GROUND, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GROUND, TYPE_PSYCHIC}, .catchRate = 255, .expYield = 58, .evYield_HP = 0, @@ -9132,15 +8545,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9153,8 +8565,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 70, .baseSpDefense = 120, - .type1 = TYPE_GROUND, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GROUND, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 189, .evYield_HP = 0, @@ -9163,15 +8574,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -9184,8 +8594,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 45, .baseSpDefense = 90, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 255, .expYield = 108, .evYield_HP = 0, @@ -9194,15 +8603,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_STURDY, ABILITY_MAGNET_PULL }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_STURDY, ABILITY_MAGNET_PULL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9215,8 +8623,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 90, .expYield = 161, .evYield_HP = 0, @@ -9225,15 +8632,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_WHITE_SMOKE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_WHITE_SMOKE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9246,8 +8652,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_DARK, - .type2 = TYPE_GHOST, + .types = {TYPE_DARK, TYPE_GHOST}, .catchRate = 45, .expYield = 98, .evYield_HP = 0, @@ -9256,15 +8661,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9277,8 +8681,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 46, .baseSpDefense = 41, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 190, .expYield = 92, .evYield_HP = 1, @@ -9287,15 +8690,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9308,8 +8710,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 76, .baseSpDefense = 71, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 75, .expYield = 158, .evYield_HP = 2, @@ -9318,15 +8719,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9339,8 +8739,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 97, .baseSpAttack = 40, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 110, .evYield_HP = 0, @@ -9349,15 +8748,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_HEART_SCALE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_HEART_SCALE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9370,8 +8768,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 50, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 205, .expYield = 111, .evYield_HP = 0, @@ -9380,15 +8777,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9401,8 +8797,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 90, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 155, .expYield = 161, .evYield_HP = 0, @@ -9411,15 +8806,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9432,8 +8826,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 10, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 61, .evYield_HP = 0, @@ -9442,15 +8835,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9463,8 +8855,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 81, .baseSpAttack = 100, .baseSpDefense = 125, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 213, .evYield_HP = 0, @@ -9473,15 +8864,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_MARVEL_SCALE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_MARVEL_SCALE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9494,8 +8884,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 20, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 225, .expYield = 88, .evYield_HP = 0, @@ -9504,15 +8893,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_ROUGH_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9525,8 +8913,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 95, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 60, .expYield = 175, .evYield_HP = 0, @@ -9535,15 +8922,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_ROUGH_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9556,8 +8942,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 10, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 73, .evYield_HP = 0, @@ -9566,15 +8951,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SOFT_SAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9587,8 +8971,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_GROUND, - .type2 = TYPE_DRAGON, + .types = {TYPE_GROUND, TYPE_DRAGON}, .catchRate = 120, .expYield = 126, .evYield_HP = 0, @@ -9597,15 +8980,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_LEVITATE, ABILITY_LEVITATE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9618,8 +9000,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_GROUND, - .type2 = TYPE_DRAGON, + .types = {TYPE_GROUND, TYPE_DRAGON}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -9628,15 +9009,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_LEVITATE, ABILITY_LEVITATE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9649,8 +9029,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 180, .expYield = 87, .evYield_HP = 1, @@ -9659,15 +9038,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_THICK_FAT, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9680,8 +9058,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 60, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 200, .expYield = 184, .evYield_HP = 2, @@ -9690,15 +9067,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_THICK_FAT, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9711,8 +9087,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 40, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 120, .expYield = 104, .evYield_HP = 0, @@ -9721,15 +9096,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9742,8 +9116,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 105, .baseSpDefense = 60, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 168, .evYield_HP = 0, @@ -9752,15 +9125,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9773,8 +9145,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_FIRE, - .type2 = TYPE_GROUND, + .types = {TYPE_FIRE, TYPE_GROUND}, .catchRate = 255, .expYield = 88, .evYield_HP = 0, @@ -9783,15 +9154,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_RAWST_BERRY, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_RAWST_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9804,8 +9174,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 105, .baseSpDefense = 75, - .type1 = TYPE_FIRE, - .type2 = TYPE_GROUND, + .types = {TYPE_FIRE, TYPE_GROUND}, .catchRate = 150, .expYield = 175, .evYield_HP = 0, @@ -9814,15 +9183,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_RAWST_BERRY, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_RAWST_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9835,8 +9203,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 55, .baseSpDefense = 50, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 255, .expYield = 75, .evYield_HP = 1, @@ -9845,15 +9212,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9866,8 +9232,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 75, .baseSpDefense = 70, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 120, .expYield = 128, .evYield_HP = 2, @@ -9876,15 +9241,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9897,8 +9261,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 90, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 45, .expYield = 192, .evYield_HP = 3, @@ -9907,15 +9270,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9928,8 +9290,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 85, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -9938,15 +9299,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9959,8 +9319,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 60, .expYield = 177, .evYield_HP = 0, @@ -9969,15 +9328,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9990,8 +9348,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 190, .expYield = 74, .evYield_HP = 1, @@ -10000,15 +9357,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10021,8 +9377,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 75, .expYield = 187, .evYield_HP = 2, @@ -10031,15 +9386,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10052,8 +9406,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 95, .baseSpDefense = 85, - .type1 = TYPE_ROCK, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ROCK, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 150, .evYield_HP = 0, @@ -10062,15 +9415,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10083,8 +9435,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ROCK, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 150, .evYield_HP = 0, @@ -10093,15 +9444,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SUN_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SUN_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10114,8 +9464,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 20, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 33, .evYield_HP = 1, @@ -10124,15 +9473,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10145,8 +9493,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 255, .expYield = 89, .evYield_HP = 0, @@ -10155,15 +9502,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10176,8 +9522,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 90, .baseSpDefense = 110, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 164, .evYield_HP = 0, @@ -10186,15 +9531,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -10207,8 +9551,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 200, .expYield = 120, .evYield_HP = 0, @@ -10217,15 +9560,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_PLUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_PLUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10238,8 +9580,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 75, .baseSpDefense = 85, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 200, .expYield = 120, .evYield_HP = 0, @@ -10248,15 +9589,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_MINUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_MINUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10269,8 +9609,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_STEEL, - .type2 = TYPE_STEEL, + .types = {TYPE_STEEL, TYPE_STEEL}, .catchRate = 45, .expYield = 98, .evYield_HP = 0, @@ -10279,15 +9618,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10300,8 +9638,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_FIGHTING, TYPE_PSYCHIC}, .catchRate = 180, .expYield = 91, .evYield_HP = 0, @@ -10310,15 +9647,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_PURE_POWER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10331,8 +9667,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_FIGHTING, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 153, .evYield_HP = 0, @@ -10341,15 +9676,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_PURE_POWER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10362,8 +9696,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -10372,15 +9705,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10393,8 +9725,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 70, .baseSpDefense = 105, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 188, .evYield_HP = 0, @@ -10403,15 +9734,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10424,8 +9754,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 23, .baseSpAttack = 23, .baseSpDefense = 48, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 125, .expYield = 44, .evYield_HP = 1, @@ -10434,15 +9763,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SHADOW_TAG, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10455,8 +9783,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 30, .baseSpDefense = 90, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -10465,15 +9792,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10486,8 +9812,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 60, .baseSpDefense = 130, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 90, .expYield = 179, .evYield_HP = 0, @@ -10496,15 +9821,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10517,8 +9841,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 150, .expYield = 152, .evYield_HP = 0, @@ -10527,15 +9850,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_POISON_POINT }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -10548,8 +9870,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 83, .evYield_HP = 1, @@ -10558,15 +9879,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_TRUANT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10579,8 +9899,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 126, .evYield_HP = 0, @@ -10589,15 +9908,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -10610,8 +9928,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 95, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 210, .evYield_HP = 3, @@ -10620,15 +9937,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_TRUANT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10641,8 +9957,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 43, .baseSpDefense = 53, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 225, .expYield = 75, .evYield_HP = 1, @@ -10651,15 +9966,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10672,8 +9986,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 73, .baseSpDefense = 83, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 75, .expYield = 168, .evYield_HP = 2, @@ -10682,15 +9995,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -10703,8 +10015,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 51, .baseSpAttack = 72, .baseSpDefense = 87, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 200, .expYield = 169, .evYield_HP = 2, @@ -10713,15 +10024,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10734,8 +10044,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 28, .baseSpAttack = 51, .baseSpDefense = 23, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 68, .evYield_HP = 1, @@ -10744,15 +10053,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10765,8 +10073,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 71, .baseSpDefense = 43, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 126, .evYield_HP = 2, @@ -10775,15 +10082,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10796,8 +10102,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 68, .baseSpAttack = 91, .baseSpDefense = 63, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 184, .evYield_HP = 3, @@ -10806,15 +10111,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10827,8 +10131,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 32, .baseSpAttack = 74, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 142, .evYield_HP = 0, @@ -10837,15 +10140,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BLUE_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BLUE_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10858,8 +10160,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 52, .baseSpAttack = 94, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 178, .evYield_HP = 0, @@ -10868,15 +10169,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10889,8 +10189,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 52, .baseSpAttack = 114, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 178, .evYield_HP = 0, @@ -10899,15 +10198,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10920,8 +10218,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 75, .baseSpDefense = 60, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 30, .expYield = 174, .evYield_HP = 0, @@ -10930,15 +10227,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -10951,8 +10247,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 63, .baseSpDefense = 33, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 225, .expYield = 97, .evYield_HP = 0, @@ -10961,15 +10256,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10982,8 +10276,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 83, .baseSpDefense = 63, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 45, .expYield = 179, .evYield_HP = 0, @@ -10992,15 +10285,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11013,8 +10305,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 100, .baseSpDefense = 60, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -11023,15 +10314,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -11044,8 +10334,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -11054,15 +10343,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_IMMUNITY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_IMMUNITY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -11075,8 +10363,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_ROCK, + .types = {TYPE_WATER, TYPE_ROCK}, .catchRate = 25, .expYield = 198, .evYield_HP = 1, @@ -11085,15 +10372,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_GREEN_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_GREEN_SHARD, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11106,8 +10392,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 180, .expYield = 96, .evYield_HP = 0, @@ -11116,15 +10401,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11137,8 +10421,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 90, .expYield = 152, .evYield_HP = 0, @@ -11147,15 +10430,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11168,8 +10450,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 45, .expYield = 205, .evYield_HP = 0, @@ -11178,15 +10459,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11199,8 +10479,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 145, .evYield_HP = 1, @@ -11209,15 +10488,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_MYSTIC_WATER, - .item2 = ITEM_MYSTIC_WATER, + .itemCommon = ITEM_MYSTIC_WATER, + .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_FORECAST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_FORECAST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11230,8 +10508,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 47, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 150, .expYield = 146, .evYield_HP = 0, @@ -11240,15 +10517,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_ILLUMINATE, ABILITY_SWARM }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_SWARM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11261,8 +10537,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 73, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 150, .expYield = 146, .evYield_HP = 0, @@ -11271,15 +10546,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -11292,8 +10566,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 23, .baseSpAttack = 61, .baseSpDefense = 87, - .type1 = TYPE_ROCK, - .type2 = TYPE_GRASS, + .types = {TYPE_ROCK, TYPE_GRASS}, .catchRate = 45, .expYield = 121, .evYield_HP = 0, @@ -11302,15 +10575,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -11323,8 +10595,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 81, .baseSpDefense = 107, - .type1 = TYPE_ROCK, - .type2 = TYPE_GRASS, + .types = {TYPE_ROCK, TYPE_GRASS}, .catchRate = 45, .expYield = 201, .evYield_HP = 0, @@ -11333,15 +10604,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11354,8 +10624,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_ROCK, - .type2 = TYPE_BUG, + .types = {TYPE_ROCK, TYPE_BUG}, .catchRate = 45, .expYield = 119, .evYield_HP = 0, @@ -11364,15 +10633,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_BATTLE_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11385,8 +10653,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_ROCK, - .type2 = TYPE_BUG, + .types = {TYPE_ROCK, TYPE_BUG}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -11395,15 +10662,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_BATTLE_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11416,8 +10682,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 35, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 235, .expYield = 70, .evYield_HP = 0, @@ -11426,15 +10691,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11447,8 +10711,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 120, .expYield = 140, .evYield_HP = 0, @@ -11457,15 +10720,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11478,8 +10740,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 125, .baseSpDefense = 115, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -11488,15 +10749,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11509,8 +10769,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 30, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 89, .evYield_HP = 0, @@ -11519,15 +10778,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11540,8 +10798,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -11550,15 +10807,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11571,8 +10827,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 110, .baseSpDefense = 80, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -11581,15 +10836,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11602,8 +10856,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 35, .baseSpDefense = 60, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 103, .evYield_HP = 0, @@ -11612,15 +10865,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11633,8 +10885,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 153, .evYield_HP = 0, @@ -11643,15 +10894,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11664,8 +10914,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 95, .baseSpDefense = 90, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 210, .evYield_HP = 0, @@ -11674,15 +10923,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11695,8 +10943,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 100, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 3, .expYield = 217, .evYield_HP = 0, @@ -11705,15 +10952,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -11726,8 +10972,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 100, .baseSpDefense = 200, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -11736,15 +10981,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11757,8 +11001,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 75, .baseSpDefense = 150, - .type1 = TYPE_STEEL, - .type2 = TYPE_STEEL, + .types = {TYPE_STEEL, TYPE_STEEL}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -11767,15 +11010,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11788,8 +11030,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 150, .baseSpDefense = 140, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 5, .expYield = 218, .evYield_HP = 0, @@ -11798,15 +11039,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_DRIZZLE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_DRIZZLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11819,8 +11059,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 100, .baseSpDefense = 90, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 5, .expYield = 218, .evYield_HP = 0, @@ -11829,15 +11068,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_DROUGHT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_DROUGHT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -11850,8 +11088,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 150, .baseSpDefense = 90, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -11860,15 +11097,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_AIR_LOCK, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_AIR_LOCK, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11881,8 +11117,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 110, .baseSpDefense = 130, - .type1 = TYPE_DRAGON, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_DRAGON, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 211, .evYield_HP = 0, @@ -11891,15 +11126,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 120, .friendship = 90, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -11912,8 +11146,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 110, - .type1 = TYPE_DRAGON, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_DRAGON, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 211, .evYield_HP = 0, @@ -11922,15 +11155,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 120, .friendship = 90, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11943,8 +11175,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 215, .evYield_HP = 3, @@ -11953,15 +11184,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STAR_PIECE, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STAR_PIECE, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SERENE_GRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -11974,8 +11204,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 150, .baseSpAttack = 150, .baseSpDefense = 50, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -11984,15 +11213,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -12005,8 +11233,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 80, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 147, .evYield_HP = 0, @@ -12015,15 +11242,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, diff --git a/src/data/text/nature_names.h b/src/data/text/nature_names.h index d0d217d9b..4c387a64c 100644 --- a/src/data/text/nature_names.h +++ b/src/data/text/nature_names.h @@ -24,8 +24,7 @@ static const u8 sSassyNatureName[] = _("SASSY"); static const u8 sCarefulNatureName[] = _("CAREFUL"); static const u8 sQuirkyNatureName[] = _("QUIRKY"); -const u8 *const gNatureNamePointers[] = -{ +const u8 *const gNatureNamePointers[NUM_NATURES] = { [NATURE_HARDY] = sHardyNatureName, [NATURE_LONELY] = sLonelyNatureName, [NATURE_BRAVE] = sBraveNatureName, diff --git a/src/data/text/species_names.h b/src/data/text/species_names.h index f30fe2969..25f2c9aa2 100644 --- a/src/data/text/species_names.h +++ b/src/data/text/species_names.h @@ -1,414 +1,414 @@ -const u8 gSpeciesNames[][11] = { - _("??????????"), - _("BULBASAUR"), - _("IVYSAUR"), - _("VENUSAUR"), - _("CHARMANDER"), - _("CHARMELEON"), - _("CHARIZARD"), - _("SQUIRTLE"), - _("WARTORTLE"), - _("BLASTOISE"), - _("CATERPIE"), - _("METAPOD"), - _("BUTTERFREE"), - _("WEEDLE"), - _("KAKUNA"), - _("BEEDRILL"), - _("PIDGEY"), - _("PIDGEOTTO"), - _("PIDGEOT"), - _("RATTATA"), - _("RATICATE"), - _("SPEAROW"), - _("FEAROW"), - _("EKANS"), - _("ARBOK"), - _("PIKACHU"), - _("RAICHU"), - _("SANDSHREW"), - _("SANDSLASH"), - _("NIDORAN♀"), - _("NIDORINA"), - _("NIDOQUEEN"), - _("NIDORAN♂"), - _("NIDORINO"), - _("NIDOKING"), - _("CLEFAIRY"), - _("CLEFABLE"), - _("VULPIX"), - _("NINETALES"), - _("JIGGLYPUFF"), - _("WIGGLYTUFF"), - _("ZUBAT"), - _("GOLBAT"), - _("ODDISH"), - _("GLOOM"), - _("VILEPLUME"), - _("PARAS"), - _("PARASECT"), - _("VENONAT"), - _("VENOMOTH"), - _("DIGLETT"), - _("DUGTRIO"), - _("MEOWTH"), - _("PERSIAN"), - _("PSYDUCK"), - _("GOLDUCK"), - _("MANKEY"), - _("PRIMEAPE"), - _("GROWLITHE"), - _("ARCANINE"), - _("POLIWAG"), - _("POLIWHIRL"), - _("POLIWRATH"), - _("ABRA"), - _("KADABRA"), - _("ALAKAZAM"), - _("MACHOP"), - _("MACHOKE"), - _("MACHAMP"), - _("BELLSPROUT"), - _("WEEPINBELL"), - _("VICTREEBEL"), - _("TENTACOOL"), - _("TENTACRUEL"), - _("GEODUDE"), - _("GRAVELER"), - _("GOLEM"), - _("PONYTA"), - _("RAPIDASH"), - _("SLOWPOKE"), - _("SLOWBRO"), - _("MAGNEMITE"), - _("MAGNETON"), - _("FARFETCH'D"), - _("DODUO"), - _("DODRIO"), - _("SEEL"), - _("DEWGONG"), - _("GRIMER"), - _("MUK"), - _("SHELLDER"), - _("CLOYSTER"), - _("GASTLY"), - _("HAUNTER"), - _("GENGAR"), - _("ONIX"), - _("DROWZEE"), - _("HYPNO"), - _("KRABBY"), - _("KINGLER"), - _("VOLTORB"), - _("ELECTRODE"), - _("EXEGGCUTE"), - _("EXEGGUTOR"), - _("CUBONE"), - _("MAROWAK"), - _("HITMONLEE"), - _("HITMONCHAN"), - _("LICKITUNG"), - _("KOFFING"), - _("WEEZING"), - _("RHYHORN"), - _("RHYDON"), - _("CHANSEY"), - _("TANGELA"), - _("KANGASKHAN"), - _("HORSEA"), - _("SEADRA"), - _("GOLDEEN"), - _("SEAKING"), - _("STARYU"), - _("STARMIE"), - _("MR. MIME"), - _("SCYTHER"), - _("JYNX"), - _("ELECTABUZZ"), - _("MAGMAR"), - _("PINSIR"), - _("TAUROS"), - _("MAGIKARP"), - _("GYARADOS"), - _("LAPRAS"), - _("DITTO"), - _("EEVEE"), - _("VAPOREON"), - _("JOLTEON"), - _("FLAREON"), - _("PORYGON"), - _("OMANYTE"), - _("OMASTAR"), - _("KABUTO"), - _("KABUTOPS"), - _("AERODACTYL"), - _("SNORLAX"), - _("ARTICUNO"), - _("ZAPDOS"), - _("MOLTRES"), - _("DRATINI"), - _("DRAGONAIR"), - _("DRAGONITE"), - _("MEWTWO"), - _("MEW"), - _("CHIKORITA"), - _("BAYLEEF"), - _("MEGANIUM"), - _("CYNDAQUIL"), - _("QUILAVA"), - _("TYPHLOSION"), - _("TOTODILE"), - _("CROCONAW"), - _("FERALIGATR"), - _("SENTRET"), - _("FURRET"), - _("HOOTHOOT"), - _("NOCTOWL"), - _("LEDYBA"), - _("LEDIAN"), - _("SPINARAK"), - _("ARIADOS"), - _("CROBAT"), - _("CHINCHOU"), - _("LANTURN"), - _("PICHU"), - _("CLEFFA"), - _("IGGLYBUFF"), - _("TOGEPI"), - _("TOGETIC"), - _("NATU"), - _("XATU"), - _("MAREEP"), - _("FLAAFFY"), - _("AMPHAROS"), - _("BELLOSSOM"), - _("MARILL"), - _("AZUMARILL"), - _("SUDOWOODO"), - _("POLITOED"), - _("HOPPIP"), - _("SKIPLOOM"), - _("JUMPLUFF"), - _("AIPOM"), - _("SUNKERN"), - _("SUNFLORA"), - _("YANMA"), - _("WOOPER"), - _("QUAGSIRE"), - _("ESPEON"), - _("UMBREON"), - _("MURKROW"), - _("SLOWKING"), - _("MISDREAVUS"), - _("UNOWN"), - _("WOBBUFFET"), - _("GIRAFARIG"), - _("PINECO"), - _("FORRETRESS"), - _("DUNSPARCE"), - _("GLIGAR"), - _("STEELIX"), - _("SNUBBULL"), - _("GRANBULL"), - _("QWILFISH"), - _("SCIZOR"), - _("SHUCKLE"), - _("HERACROSS"), - _("SNEASEL"), - _("TEDDIURSA"), - _("URSARING"), - _("SLUGMA"), - _("MAGCARGO"), - _("SWINUB"), - _("PILOSWINE"), - _("CORSOLA"), - _("REMORAID"), - _("OCTILLERY"), - _("DELIBIRD"), - _("MANTINE"), - _("SKARMORY"), - _("HOUNDOUR"), - _("HOUNDOOM"), - _("KINGDRA"), - _("PHANPY"), - _("DONPHAN"), - _("PORYGON2"), - _("STANTLER"), - _("SMEARGLE"), - _("TYROGUE"), - _("HITMONTOP"), - _("SMOOCHUM"), - _("ELEKID"), - _("MAGBY"), - _("MILTANK"), - _("BLISSEY"), - _("RAIKOU"), - _("ENTEI"), - _("SUICUNE"), - _("LARVITAR"), - _("PUPITAR"), - _("TYRANITAR"), - _("LUGIA"), - _("HO-OH"), - _("CELEBI"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("TREECKO"), - _("GROVYLE"), - _("SCEPTILE"), - _("TORCHIC"), - _("COMBUSKEN"), - _("BLAZIKEN"), - _("MUDKIP"), - _("MARSHTOMP"), - _("SWAMPERT"), - _("POOCHYENA"), - _("MIGHTYENA"), - _("ZIGZAGOON"), - _("LINOONE"), - _("WURMPLE"), - _("SILCOON"), - _("BEAUTIFLY"), - _("CASCOON"), - _("DUSTOX"), - _("LOTAD"), - _("LOMBRE"), - _("LUDICOLO"), - _("SEEDOT"), - _("NUZLEAF"), - _("SHIFTRY"), - _("NINCADA"), - _("NINJASK"), - _("SHEDINJA"), - _("TAILLOW"), - _("SWELLOW"), - _("SHROOMISH"), - _("BRELOOM"), - _("SPINDA"), - _("WINGULL"), - _("PELIPPER"), - _("SURSKIT"), - _("MASQUERAIN"), - _("WAILMER"), - _("WAILORD"), - _("SKITTY"), - _("DELCATTY"), - _("KECLEON"), - _("BALTOY"), - _("CLAYDOL"), - _("NOSEPASS"), - _("TORKOAL"), - _("SABLEYE"), - _("BARBOACH"), - _("WHISCASH"), - _("LUVDISC"), - _("CORPHISH"), - _("CRAWDAUNT"), - _("FEEBAS"), - _("MILOTIC"), - _("CARVANHA"), - _("SHARPEDO"), - _("TRAPINCH"), - _("VIBRAVA"), - _("FLYGON"), - _("MAKUHITA"), - _("HARIYAMA"), - _("ELECTRIKE"), - _("MANECTRIC"), - _("NUMEL"), - _("CAMERUPT"), - _("SPHEAL"), - _("SEALEO"), - _("WALREIN"), - _("CACNEA"), - _("CACTURNE"), - _("SNORUNT"), - _("GLALIE"), - _("LUNATONE"), - _("SOLROCK"), - _("AZURILL"), - _("SPOINK"), - _("GRUMPIG"), - _("PLUSLE"), - _("MINUN"), - _("MAWILE"), - _("MEDITITE"), - _("MEDICHAM"), - _("SWABLU"), - _("ALTARIA"), - _("WYNAUT"), - _("DUSKULL"), - _("DUSCLOPS"), - _("ROSELIA"), - _("SLAKOTH"), - _("VIGOROTH"), - _("SLAKING"), - _("GULPIN"), - _("SWALOT"), - _("TROPIUS"), - _("WHISMUR"), - _("LOUDRED"), - _("EXPLOUD"), - _("CLAMPERL"), - _("HUNTAIL"), - _("GOREBYSS"), - _("ABSOL"), - _("SHUPPET"), - _("BANETTE"), - _("SEVIPER"), - _("ZANGOOSE"), - _("RELICANTH"), - _("ARON"), - _("LAIRON"), - _("AGGRON"), - _("CASTFORM"), - _("VOLBEAT"), - _("ILLUMISE"), - _("LILEEP"), - _("CRADILY"), - _("ANORITH"), - _("ARMALDO"), - _("RALTS"), - _("KIRLIA"), - _("GARDEVOIR"), - _("BAGON"), - _("SHELGON"), - _("SALAMENCE"), - _("BELDUM"), - _("METANG"), - _("METAGROSS"), - _("REGIROCK"), - _("REGICE"), - _("REGISTEEL"), - _("KYOGRE"), - _("GROUDON"), - _("RAYQUAZA"), - _("LATIAS"), - _("LATIOS"), - _("JIRACHI"), - _("DEOXYS"), - _("CHIMECHO") +const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = { + [SPECIES_NONE] = _("??????????"), + [SPECIES_BULBASAUR] = _("BULBASAUR"), + [SPECIES_IVYSAUR] = _("IVYSAUR"), + [SPECIES_VENUSAUR] = _("VENUSAUR"), + [SPECIES_CHARMANDER] = _("CHARMANDER"), + [SPECIES_CHARMELEON] = _("CHARMELEON"), + [SPECIES_CHARIZARD] = _("CHARIZARD"), + [SPECIES_SQUIRTLE] = _("SQUIRTLE"), + [SPECIES_WARTORTLE] = _("WARTORTLE"), + [SPECIES_BLASTOISE] = _("BLASTOISE"), + [SPECIES_CATERPIE] = _("CATERPIE"), + [SPECIES_METAPOD] = _("METAPOD"), + [SPECIES_BUTTERFREE] = _("BUTTERFREE"), + [SPECIES_WEEDLE] = _("WEEDLE"), + [SPECIES_KAKUNA] = _("KAKUNA"), + [SPECIES_BEEDRILL] = _("BEEDRILL"), + [SPECIES_PIDGEY] = _("PIDGEY"), + [SPECIES_PIDGEOTTO] = _("PIDGEOTTO"), + [SPECIES_PIDGEOT] = _("PIDGEOT"), + [SPECIES_RATTATA] = _("RATTATA"), + [SPECIES_RATICATE] = _("RATICATE"), + [SPECIES_SPEAROW] = _("SPEAROW"), + [SPECIES_FEAROW] = _("FEAROW"), + [SPECIES_EKANS] = _("EKANS"), + [SPECIES_ARBOK] = _("ARBOK"), + [SPECIES_PIKACHU] = _("PIKACHU"), + [SPECIES_RAICHU] = _("RAICHU"), + [SPECIES_SANDSHREW] = _("SANDSHREW"), + [SPECIES_SANDSLASH] = _("SANDSLASH"), + [SPECIES_NIDORAN_F] = _("NIDORAN♀"), + [SPECIES_NIDORINA] = _("NIDORINA"), + [SPECIES_NIDOQUEEN] = _("NIDOQUEEN"), + [SPECIES_NIDORAN_M] = _("NIDORAN♂"), + [SPECIES_NIDORINO] = _("NIDORINO"), + [SPECIES_NIDOKING] = _("NIDOKING"), + [SPECIES_CLEFAIRY] = _("CLEFAIRY"), + [SPECIES_CLEFABLE] = _("CLEFABLE"), + [SPECIES_VULPIX] = _("VULPIX"), + [SPECIES_NINETALES] = _("NINETALES"), + [SPECIES_JIGGLYPUFF] = _("JIGGLYPUFF"), + [SPECIES_WIGGLYTUFF] = _("WIGGLYTUFF"), + [SPECIES_ZUBAT] = _("ZUBAT"), + [SPECIES_GOLBAT] = _("GOLBAT"), + [SPECIES_ODDISH] = _("ODDISH"), + [SPECIES_GLOOM] = _("GLOOM"), + [SPECIES_VILEPLUME] = _("VILEPLUME"), + [SPECIES_PARAS] = _("PARAS"), + [SPECIES_PARASECT] = _("PARASECT"), + [SPECIES_VENONAT] = _("VENONAT"), + [SPECIES_VENOMOTH] = _("VENOMOTH"), + [SPECIES_DIGLETT] = _("DIGLETT"), + [SPECIES_DUGTRIO] = _("DUGTRIO"), + [SPECIES_MEOWTH] = _("MEOWTH"), + [SPECIES_PERSIAN] = _("PERSIAN"), + [SPECIES_PSYDUCK] = _("PSYDUCK"), + [SPECIES_GOLDUCK] = _("GOLDUCK"), + [SPECIES_MANKEY] = _("MANKEY"), + [SPECIES_PRIMEAPE] = _("PRIMEAPE"), + [SPECIES_GROWLITHE] = _("GROWLITHE"), + [SPECIES_ARCANINE] = _("ARCANINE"), + [SPECIES_POLIWAG] = _("POLIWAG"), + [SPECIES_POLIWHIRL] = _("POLIWHIRL"), + [SPECIES_POLIWRATH] = _("POLIWRATH"), + [SPECIES_ABRA] = _("ABRA"), + [SPECIES_KADABRA] = _("KADABRA"), + [SPECIES_ALAKAZAM] = _("ALAKAZAM"), + [SPECIES_MACHOP] = _("MACHOP"), + [SPECIES_MACHOKE] = _("MACHOKE"), + [SPECIES_MACHAMP] = _("MACHAMP"), + [SPECIES_BELLSPROUT] = _("BELLSPROUT"), + [SPECIES_WEEPINBELL] = _("WEEPINBELL"), + [SPECIES_VICTREEBEL] = _("VICTREEBEL"), + [SPECIES_TENTACOOL] = _("TENTACOOL"), + [SPECIES_TENTACRUEL] = _("TENTACRUEL"), + [SPECIES_GEODUDE] = _("GEODUDE"), + [SPECIES_GRAVELER] = _("GRAVELER"), + [SPECIES_GOLEM] = _("GOLEM"), + [SPECIES_PONYTA] = _("PONYTA"), + [SPECIES_RAPIDASH] = _("RAPIDASH"), + [SPECIES_SLOWPOKE] = _("SLOWPOKE"), + [SPECIES_SLOWBRO] = _("SLOWBRO"), + [SPECIES_MAGNEMITE] = _("MAGNEMITE"), + [SPECIES_MAGNETON] = _("MAGNETON"), + [SPECIES_FARFETCHD] = _("FARFETCH'D"), + [SPECIES_DODUO] = _("DODUO"), + [SPECIES_DODRIO] = _("DODRIO"), + [SPECIES_SEEL] = _("SEEL"), + [SPECIES_DEWGONG] = _("DEWGONG"), + [SPECIES_GRIMER] = _("GRIMER"), + [SPECIES_MUK] = _("MUK"), + [SPECIES_SHELLDER] = _("SHELLDER"), + [SPECIES_CLOYSTER] = _("CLOYSTER"), + [SPECIES_GASTLY] = _("GASTLY"), + [SPECIES_HAUNTER] = _("HAUNTER"), + [SPECIES_GENGAR] = _("GENGAR"), + [SPECIES_ONIX] = _("ONIX"), + [SPECIES_DROWZEE] = _("DROWZEE"), + [SPECIES_HYPNO] = _("HYPNO"), + [SPECIES_KRABBY] = _("KRABBY"), + [SPECIES_KINGLER] = _("KINGLER"), + [SPECIES_VOLTORB] = _("VOLTORB"), + [SPECIES_ELECTRODE] = _("ELECTRODE"), + [SPECIES_EXEGGCUTE] = _("EXEGGCUTE"), + [SPECIES_EXEGGUTOR] = _("EXEGGUTOR"), + [SPECIES_CUBONE] = _("CUBONE"), + [SPECIES_MAROWAK] = _("MAROWAK"), + [SPECIES_HITMONLEE] = _("HITMONLEE"), + [SPECIES_HITMONCHAN] = _("HITMONCHAN"), + [SPECIES_LICKITUNG] = _("LICKITUNG"), + [SPECIES_KOFFING] = _("KOFFING"), + [SPECIES_WEEZING] = _("WEEZING"), + [SPECIES_RHYHORN] = _("RHYHORN"), + [SPECIES_RHYDON] = _("RHYDON"), + [SPECIES_CHANSEY] = _("CHANSEY"), + [SPECIES_TANGELA] = _("TANGELA"), + [SPECIES_KANGASKHAN] = _("KANGASKHAN"), + [SPECIES_HORSEA] = _("HORSEA"), + [SPECIES_SEADRA] = _("SEADRA"), + [SPECIES_GOLDEEN] = _("GOLDEEN"), + [SPECIES_SEAKING] = _("SEAKING"), + [SPECIES_STARYU] = _("STARYU"), + [SPECIES_STARMIE] = _("STARMIE"), + [SPECIES_MR_MIME] = _("MR. MIME"), + [SPECIES_SCYTHER] = _("SCYTHER"), + [SPECIES_JYNX] = _("JYNX"), + [SPECIES_ELECTABUZZ] = _("ELECTABUZZ"), + [SPECIES_MAGMAR] = _("MAGMAR"), + [SPECIES_PINSIR] = _("PINSIR"), + [SPECIES_TAUROS] = _("TAUROS"), + [SPECIES_MAGIKARP] = _("MAGIKARP"), + [SPECIES_GYARADOS] = _("GYARADOS"), + [SPECIES_LAPRAS] = _("LAPRAS"), + [SPECIES_DITTO] = _("DITTO"), + [SPECIES_EEVEE] = _("EEVEE"), + [SPECIES_VAPOREON] = _("VAPOREON"), + [SPECIES_JOLTEON] = _("JOLTEON"), + [SPECIES_FLAREON] = _("FLAREON"), + [SPECIES_PORYGON] = _("PORYGON"), + [SPECIES_OMANYTE] = _("OMANYTE"), + [SPECIES_OMASTAR] = _("OMASTAR"), + [SPECIES_KABUTO] = _("KABUTO"), + [SPECIES_KABUTOPS] = _("KABUTOPS"), + [SPECIES_AERODACTYL] = _("AERODACTYL"), + [SPECIES_SNORLAX] = _("SNORLAX"), + [SPECIES_ARTICUNO] = _("ARTICUNO"), + [SPECIES_ZAPDOS] = _("ZAPDOS"), + [SPECIES_MOLTRES] = _("MOLTRES"), + [SPECIES_DRATINI] = _("DRATINI"), + [SPECIES_DRAGONAIR] = _("DRAGONAIR"), + [SPECIES_DRAGONITE] = _("DRAGONITE"), + [SPECIES_MEWTWO] = _("MEWTWO"), + [SPECIES_MEW] = _("MEW"), + [SPECIES_CHIKORITA] = _("CHIKORITA"), + [SPECIES_BAYLEEF] = _("BAYLEEF"), + [SPECIES_MEGANIUM] = _("MEGANIUM"), + [SPECIES_CYNDAQUIL] = _("CYNDAQUIL"), + [SPECIES_QUILAVA] = _("QUILAVA"), + [SPECIES_TYPHLOSION] = _("TYPHLOSION"), + [SPECIES_TOTODILE] = _("TOTODILE"), + [SPECIES_CROCONAW] = _("CROCONAW"), + [SPECIES_FERALIGATR] = _("FERALIGATR"), + [SPECIES_SENTRET] = _("SENTRET"), + [SPECIES_FURRET] = _("FURRET"), + [SPECIES_HOOTHOOT] = _("HOOTHOOT"), + [SPECIES_NOCTOWL] = _("NOCTOWL"), + [SPECIES_LEDYBA] = _("LEDYBA"), + [SPECIES_LEDIAN] = _("LEDIAN"), + [SPECIES_SPINARAK] = _("SPINARAK"), + [SPECIES_ARIADOS] = _("ARIADOS"), + [SPECIES_CROBAT] = _("CROBAT"), + [SPECIES_CHINCHOU] = _("CHINCHOU"), + [SPECIES_LANTURN] = _("LANTURN"), + [SPECIES_PICHU] = _("PICHU"), + [SPECIES_CLEFFA] = _("CLEFFA"), + [SPECIES_IGGLYBUFF] = _("IGGLYBUFF"), + [SPECIES_TOGEPI] = _("TOGEPI"), + [SPECIES_TOGETIC] = _("TOGETIC"), + [SPECIES_NATU] = _("NATU"), + [SPECIES_XATU] = _("XATU"), + [SPECIES_MAREEP] = _("MAREEP"), + [SPECIES_FLAAFFY] = _("FLAAFFY"), + [SPECIES_AMPHAROS] = _("AMPHAROS"), + [SPECIES_BELLOSSOM] = _("BELLOSSOM"), + [SPECIES_MARILL] = _("MARILL"), + [SPECIES_AZUMARILL] = _("AZUMARILL"), + [SPECIES_SUDOWOODO] = _("SUDOWOODO"), + [SPECIES_POLITOED] = _("POLITOED"), + [SPECIES_HOPPIP] = _("HOPPIP"), + [SPECIES_SKIPLOOM] = _("SKIPLOOM"), + [SPECIES_JUMPLUFF] = _("JUMPLUFF"), + [SPECIES_AIPOM] = _("AIPOM"), + [SPECIES_SUNKERN] = _("SUNKERN"), + [SPECIES_SUNFLORA] = _("SUNFLORA"), + [SPECIES_YANMA] = _("YANMA"), + [SPECIES_WOOPER] = _("WOOPER"), + [SPECIES_QUAGSIRE] = _("QUAGSIRE"), + [SPECIES_ESPEON] = _("ESPEON"), + [SPECIES_UMBREON] = _("UMBREON"), + [SPECIES_MURKROW] = _("MURKROW"), + [SPECIES_SLOWKING] = _("SLOWKING"), + [SPECIES_MISDREAVUS] = _("MISDREAVUS"), + [SPECIES_UNOWN] = _("UNOWN"), + [SPECIES_WOBBUFFET] = _("WOBBUFFET"), + [SPECIES_GIRAFARIG] = _("GIRAFARIG"), + [SPECIES_PINECO] = _("PINECO"), + [SPECIES_FORRETRESS] = _("FORRETRESS"), + [SPECIES_DUNSPARCE] = _("DUNSPARCE"), + [SPECIES_GLIGAR] = _("GLIGAR"), + [SPECIES_STEELIX] = _("STEELIX"), + [SPECIES_SNUBBULL] = _("SNUBBULL"), + [SPECIES_GRANBULL] = _("GRANBULL"), + [SPECIES_QWILFISH] = _("QWILFISH"), + [SPECIES_SCIZOR] = _("SCIZOR"), + [SPECIES_SHUCKLE] = _("SHUCKLE"), + [SPECIES_HERACROSS] = _("HERACROSS"), + [SPECIES_SNEASEL] = _("SNEASEL"), + [SPECIES_TEDDIURSA] = _("TEDDIURSA"), + [SPECIES_URSARING] = _("URSARING"), + [SPECIES_SLUGMA] = _("SLUGMA"), + [SPECIES_MAGCARGO] = _("MAGCARGO"), + [SPECIES_SWINUB] = _("SWINUB"), + [SPECIES_PILOSWINE] = _("PILOSWINE"), + [SPECIES_CORSOLA] = _("CORSOLA"), + [SPECIES_REMORAID] = _("REMORAID"), + [SPECIES_OCTILLERY] = _("OCTILLERY"), + [SPECIES_DELIBIRD] = _("DELIBIRD"), + [SPECIES_MANTINE] = _("MANTINE"), + [SPECIES_SKARMORY] = _("SKARMORY"), + [SPECIES_HOUNDOUR] = _("HOUNDOUR"), + [SPECIES_HOUNDOOM] = _("HOUNDOOM"), + [SPECIES_KINGDRA] = _("KINGDRA"), + [SPECIES_PHANPY] = _("PHANPY"), + [SPECIES_DONPHAN] = _("DONPHAN"), + [SPECIES_PORYGON2] = _("PORYGON2"), + [SPECIES_STANTLER] = _("STANTLER"), + [SPECIES_SMEARGLE] = _("SMEARGLE"), + [SPECIES_TYROGUE] = _("TYROGUE"), + [SPECIES_HITMONTOP] = _("HITMONTOP"), + [SPECIES_SMOOCHUM] = _("SMOOCHUM"), + [SPECIES_ELEKID] = _("ELEKID"), + [SPECIES_MAGBY] = _("MAGBY"), + [SPECIES_MILTANK] = _("MILTANK"), + [SPECIES_BLISSEY] = _("BLISSEY"), + [SPECIES_RAIKOU] = _("RAIKOU"), + [SPECIES_ENTEI] = _("ENTEI"), + [SPECIES_SUICUNE] = _("SUICUNE"), + [SPECIES_LARVITAR] = _("LARVITAR"), + [SPECIES_PUPITAR] = _("PUPITAR"), + [SPECIES_TYRANITAR] = _("TYRANITAR"), + [SPECIES_LUGIA] = _("LUGIA"), + [SPECIES_HO_OH] = _("HO-OH"), + [SPECIES_CELEBI] = _("CELEBI"), + [SPECIES_OLD_UNOWN_B] = _("?"), + [SPECIES_OLD_UNOWN_C] = _("?"), + [SPECIES_OLD_UNOWN_D] = _("?"), + [SPECIES_OLD_UNOWN_E] = _("?"), + [SPECIES_OLD_UNOWN_F] = _("?"), + [SPECIES_OLD_UNOWN_G] = _("?"), + [SPECIES_OLD_UNOWN_H] = _("?"), + [SPECIES_OLD_UNOWN_I] = _("?"), + [SPECIES_OLD_UNOWN_J] = _("?"), + [SPECIES_OLD_UNOWN_K] = _("?"), + [SPECIES_OLD_UNOWN_L] = _("?"), + [SPECIES_OLD_UNOWN_M] = _("?"), + [SPECIES_OLD_UNOWN_N] = _("?"), + [SPECIES_OLD_UNOWN_O] = _("?"), + [SPECIES_OLD_UNOWN_P] = _("?"), + [SPECIES_OLD_UNOWN_Q] = _("?"), + [SPECIES_OLD_UNOWN_R] = _("?"), + [SPECIES_OLD_UNOWN_S] = _("?"), + [SPECIES_OLD_UNOWN_T] = _("?"), + [SPECIES_OLD_UNOWN_U] = _("?"), + [SPECIES_OLD_UNOWN_V] = _("?"), + [SPECIES_OLD_UNOWN_W] = _("?"), + [SPECIES_OLD_UNOWN_X] = _("?"), + [SPECIES_OLD_UNOWN_Y] = _("?"), + [SPECIES_OLD_UNOWN_Z] = _("?"), + [SPECIES_TREECKO] = _("TREECKO"), + [SPECIES_GROVYLE] = _("GROVYLE"), + [SPECIES_SCEPTILE] = _("SCEPTILE"), + [SPECIES_TORCHIC] = _("TORCHIC"), + [SPECIES_COMBUSKEN] = _("COMBUSKEN"), + [SPECIES_BLAZIKEN] = _("BLAZIKEN"), + [SPECIES_MUDKIP] = _("MUDKIP"), + [SPECIES_MARSHTOMP] = _("MARSHTOMP"), + [SPECIES_SWAMPERT] = _("SWAMPERT"), + [SPECIES_POOCHYENA] = _("POOCHYENA"), + [SPECIES_MIGHTYENA] = _("MIGHTYENA"), + [SPECIES_ZIGZAGOON] = _("ZIGZAGOON"), + [SPECIES_LINOONE] = _("LINOONE"), + [SPECIES_WURMPLE] = _("WURMPLE"), + [SPECIES_SILCOON] = _("SILCOON"), + [SPECIES_BEAUTIFLY] = _("BEAUTIFLY"), + [SPECIES_CASCOON] = _("CASCOON"), + [SPECIES_DUSTOX] = _("DUSTOX"), + [SPECIES_LOTAD] = _("LOTAD"), + [SPECIES_LOMBRE] = _("LOMBRE"), + [SPECIES_LUDICOLO] = _("LUDICOLO"), + [SPECIES_SEEDOT] = _("SEEDOT"), + [SPECIES_NUZLEAF] = _("NUZLEAF"), + [SPECIES_SHIFTRY] = _("SHIFTRY"), + [SPECIES_NINCADA] = _("NINCADA"), + [SPECIES_NINJASK] = _("NINJASK"), + [SPECIES_SHEDINJA] = _("SHEDINJA"), + [SPECIES_TAILLOW] = _("TAILLOW"), + [SPECIES_SWELLOW] = _("SWELLOW"), + [SPECIES_SHROOMISH] = _("SHROOMISH"), + [SPECIES_BRELOOM] = _("BRELOOM"), + [SPECIES_SPINDA] = _("SPINDA"), + [SPECIES_WINGULL] = _("WINGULL"), + [SPECIES_PELIPPER] = _("PELIPPER"), + [SPECIES_SURSKIT] = _("SURSKIT"), + [SPECIES_MASQUERAIN] = _("MASQUERAIN"), + [SPECIES_WAILMER] = _("WAILMER"), + [SPECIES_WAILORD] = _("WAILORD"), + [SPECIES_SKITTY] = _("SKITTY"), + [SPECIES_DELCATTY] = _("DELCATTY"), + [SPECIES_KECLEON] = _("KECLEON"), + [SPECIES_BALTOY] = _("BALTOY"), + [SPECIES_CLAYDOL] = _("CLAYDOL"), + [SPECIES_NOSEPASS] = _("NOSEPASS"), + [SPECIES_TORKOAL] = _("TORKOAL"), + [SPECIES_SABLEYE] = _("SABLEYE"), + [SPECIES_BARBOACH] = _("BARBOACH"), + [SPECIES_WHISCASH] = _("WHISCASH"), + [SPECIES_LUVDISC] = _("LUVDISC"), + [SPECIES_CORPHISH] = _("CORPHISH"), + [SPECIES_CRAWDAUNT] = _("CRAWDAUNT"), + [SPECIES_FEEBAS] = _("FEEBAS"), + [SPECIES_MILOTIC] = _("MILOTIC"), + [SPECIES_CARVANHA] = _("CARVANHA"), + [SPECIES_SHARPEDO] = _("SHARPEDO"), + [SPECIES_TRAPINCH] = _("TRAPINCH"), + [SPECIES_VIBRAVA] = _("VIBRAVA"), + [SPECIES_FLYGON] = _("FLYGON"), + [SPECIES_MAKUHITA] = _("MAKUHITA"), + [SPECIES_HARIYAMA] = _("HARIYAMA"), + [SPECIES_ELECTRIKE] = _("ELECTRIKE"), + [SPECIES_MANECTRIC] = _("MANECTRIC"), + [SPECIES_NUMEL] = _("NUMEL"), + [SPECIES_CAMERUPT] = _("CAMERUPT"), + [SPECIES_SPHEAL] = _("SPHEAL"), + [SPECIES_SEALEO] = _("SEALEO"), + [SPECIES_WALREIN] = _("WALREIN"), + [SPECIES_CACNEA] = _("CACNEA"), + [SPECIES_CACTURNE] = _("CACTURNE"), + [SPECIES_SNORUNT] = _("SNORUNT"), + [SPECIES_GLALIE] = _("GLALIE"), + [SPECIES_LUNATONE] = _("LUNATONE"), + [SPECIES_SOLROCK] = _("SOLROCK"), + [SPECIES_AZURILL] = _("AZURILL"), + [SPECIES_SPOINK] = _("SPOINK"), + [SPECIES_GRUMPIG] = _("GRUMPIG"), + [SPECIES_PLUSLE] = _("PLUSLE"), + [SPECIES_MINUN] = _("MINUN"), + [SPECIES_MAWILE] = _("MAWILE"), + [SPECIES_MEDITITE] = _("MEDITITE"), + [SPECIES_MEDICHAM] = _("MEDICHAM"), + [SPECIES_SWABLU] = _("SWABLU"), + [SPECIES_ALTARIA] = _("ALTARIA"), + [SPECIES_WYNAUT] = _("WYNAUT"), + [SPECIES_DUSKULL] = _("DUSKULL"), + [SPECIES_DUSCLOPS] = _("DUSCLOPS"), + [SPECIES_ROSELIA] = _("ROSELIA"), + [SPECIES_SLAKOTH] = _("SLAKOTH"), + [SPECIES_VIGOROTH] = _("VIGOROTH"), + [SPECIES_SLAKING] = _("SLAKING"), + [SPECIES_GULPIN] = _("GULPIN"), + [SPECIES_SWALOT] = _("SWALOT"), + [SPECIES_TROPIUS] = _("TROPIUS"), + [SPECIES_WHISMUR] = _("WHISMUR"), + [SPECIES_LOUDRED] = _("LOUDRED"), + [SPECIES_EXPLOUD] = _("EXPLOUD"), + [SPECIES_CLAMPERL] = _("CLAMPERL"), + [SPECIES_HUNTAIL] = _("HUNTAIL"), + [SPECIES_GOREBYSS] = _("GOREBYSS"), + [SPECIES_ABSOL] = _("ABSOL"), + [SPECIES_SHUPPET] = _("SHUPPET"), + [SPECIES_BANETTE] = _("BANETTE"), + [SPECIES_SEVIPER] = _("SEVIPER"), + [SPECIES_ZANGOOSE] = _("ZANGOOSE"), + [SPECIES_RELICANTH] = _("RELICANTH"), + [SPECIES_ARON] = _("ARON"), + [SPECIES_LAIRON] = _("LAIRON"), + [SPECIES_AGGRON] = _("AGGRON"), + [SPECIES_CASTFORM] = _("CASTFORM"), + [SPECIES_VOLBEAT] = _("VOLBEAT"), + [SPECIES_ILLUMISE] = _("ILLUMISE"), + [SPECIES_LILEEP] = _("LILEEP"), + [SPECIES_CRADILY] = _("CRADILY"), + [SPECIES_ANORITH] = _("ANORITH"), + [SPECIES_ARMALDO] = _("ARMALDO"), + [SPECIES_RALTS] = _("RALTS"), + [SPECIES_KIRLIA] = _("KIRLIA"), + [SPECIES_GARDEVOIR] = _("GARDEVOIR"), + [SPECIES_BAGON] = _("BAGON"), + [SPECIES_SHELGON] = _("SHELGON"), + [SPECIES_SALAMENCE] = _("SALAMENCE"), + [SPECIES_BELDUM] = _("BELDUM"), + [SPECIES_METANG] = _("METANG"), + [SPECIES_METAGROSS] = _("METAGROSS"), + [SPECIES_REGIROCK] = _("REGIROCK"), + [SPECIES_REGICE] = _("REGICE"), + [SPECIES_REGISTEEL] = _("REGISTEEL"), + [SPECIES_KYOGRE] = _("KYOGRE"), + [SPECIES_GROUDON] = _("GROUDON"), + [SPECIES_RAYQUAZA] = _("RAYQUAZA"), + [SPECIES_LATIAS] = _("LATIAS"), + [SPECIES_LATIOS] = _("LATIOS"), + [SPECIES_JIRACHI] = _("JIRACHI"), + [SPECIES_DEOXYS] = _("DEOXYS"), + [SPECIES_CHIMECHO] = _("CHIMECHO"), }; diff --git a/src/daycare.c b/src/daycare.c index 6780bcde4..adf754425 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1092,13 +1092,13 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation) u8 metLocation; u8 isEgg; - CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); metLevel = 0; ball = ITEM_POKE_BALL; language = LANGUAGE_JAPANESE; SetMonData(mon, MON_DATA_POKEBALL, &ball); SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname); - SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles); + SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles); SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); SetMonData(mon, MON_DATA_LANGUAGE, &language); if (setHotSpringsLocation) @@ -1119,13 +1119,13 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare * u8 language; personality = daycare->offspringPersonality | (Random() << 16); - CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); metLevel = 0; ball = ITEM_POKE_BALL; language = LANGUAGE_JAPANESE; SetMonData(mon, MON_DATA_POKEBALL, &ball); SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname); - SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles); + SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles); SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); SetMonData(mon, MON_DATA_LANGUAGE, &language); } @@ -1284,8 +1284,8 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare) trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID); personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY); genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality); - eggGroups[i][0] = gBaseStats[species[i]].eggGroup1; - eggGroups[i][1] = gBaseStats[species[i]].eggGroup2; + eggGroups[i][0] = gSpeciesInfo[species[i]].eggGroups[0]; + eggGroups[i][1] = gSpeciesInfo[species[i]].eggGroups[1]; } // check unbreedable egg group @@ -1594,42 +1594,34 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { u16 species; u32 personality, pokerus; - u8 i, friendship, language, gameMet, markings, isEventLegal; - u16 moves[4]; + u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter; + u16 moves[MAX_MON_MOVES]; u32 ivs[NUM_STATS]; species = GetMonData(egg, MON_DATA_SPECIES); - for (i = 0; i < 4; i++) - { + for (i = 0; i < MAX_MON_MOVES; i++) moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i); - } personality = GetMonData(egg, MON_DATA_PERSONALITY); for (i = 0; i < NUM_STATS; i++) - { ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i); - } // language = GetMonData(egg, MON_DATA_LANGUAGE); gameMet = GetMonData(egg, MON_DATA_MET_GAME); markings = GetMonData(egg, MON_DATA_MARKINGS); pokerus = GetMonData(egg, MON_DATA_POKERUS); - isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL); + isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER); - CreateMon(temp, species, EGG_HATCH_LEVEL, 32, TRUE, personality, 0, 0); + CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); - for (i = 0; i < 4; i++) - { + for (i = 0; i < MAX_MON_MOVES; i++) SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]); - } for (i = 0; i < NUM_STATS; i++) - { SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]); - } language = GAME_LANGUAGE; SetMonData(temp, MON_DATA_LANGUAGE, &language); @@ -1639,7 +1631,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) friendship = 120; SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship); SetMonData(temp, MON_DATA_POKERUS, &pokerus); - SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); *egg = *temp; } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 41d5d6b92..a740bda86 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2914,7 +2914,7 @@ void IsDodrioInParty(void) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES) - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO) { gSpecialVar_Result = TRUE; return; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index f31929824..07c4c07bd 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -67,9 +67,9 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *); static void RemoveObjectEventInternal(struct ObjectEvent *); static u16 GetObjectEventFlagIdByObjectEventId(u8); static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *); -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); static void GetObjectEventMovingCameraOffset(s16 *, s16 *); -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); static void LoadObjectEventPalette(u16); static void RemoveObjectEventIfOutsideView(struct ObjectEvent *); static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y); @@ -84,13 +84,13 @@ static void ObjectCB_CameraObject(struct Sprite *); static void CameraObject_0(struct Sprite *); static void CameraObject_1(struct Sprite *); static void CameraObject_2(struct Sprite *); -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count); +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count); static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *); static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8); -static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *, u8, s16, s16); -static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *, s16, s16); -static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *, s16, s16); -static void SetHideObstacleFlag(struct ObjectEventTemplate *); +static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *, u8, s16, s16); +static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *, s16, s16); +static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *, s16, s16); +static void SetHideObstacleFlag(const struct ObjectEventTemplate *); static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *); static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *); static u8 MovementType_RaiseHandAndStop_Callback(struct ObjectEvent *, struct Sprite *); @@ -1309,7 +1309,7 @@ static u8 GetObjectEventIdByLocalId(u8 localId) return OBJECT_EVENTS_COUNT; } -static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) +static u8 InitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) { struct ObjectEvent *objectEvent; const struct MapHeader *mapHeader; @@ -1388,7 +1388,7 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, return objectEventId; } -static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y) +static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y) { if (isClone && !TemplateIsObstacleAndWithinView(template, x, y)) return FALSE; @@ -1399,7 +1399,7 @@ static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate * return TRUE; } -static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *template, s16 x, s16 y) +static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *template, s16 x, s16 y) { if (template->graphicsId == OBJ_EVENT_GFX_CUT_TREE || template->graphicsId == OBJ_EVENT_GFX_ROCK_SMASH_ROCK) { @@ -1422,7 +1422,7 @@ static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *templat return TRUE; } -static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *template, s16 unused1, s16 unused2) +static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *template, s16 unused1, s16 unused2) { if (IsMapTypeOutdoors(GetCurrentMapType())) { @@ -1459,7 +1459,7 @@ static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTem return TRUE; } -static void SetHideObstacleFlag(struct ObjectEventTemplate *template) +static void SetHideObstacleFlag(const struct ObjectEventTemplate *template) { if (template->flagId >= FLAG_TEMP_11 && template->flagId <= FLAG_TEMP_1F) FlagSet(template->flagId); @@ -1549,7 +1549,7 @@ void Unref_RemoveAllObjectEventsExceptPlayer(void) } } -static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 spriteId; u8 objectEventId; @@ -1599,7 +1599,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl return objectEventId; } -static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 objectEventId; struct SpriteTemplate spriteTemplate; @@ -1653,7 +1653,7 @@ int SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *objectEventTemplate; + const struct ObjectEventTemplate *objectEventTemplate; s16 cameraX, cameraY; objectEventTemplate = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); @@ -1691,7 +1691,7 @@ static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphics CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables); } -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->objUnion.normal.movementType, spriteTemplate, subspriteTables); } @@ -2516,7 +2516,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId) static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); + const struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); #ifdef UBFIX // BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers. if (obj == NULL) @@ -2571,9 +2571,9 @@ u8 GetObjectEventBerryTreeId(u8 objectEventId) return gObjectEvents[objectEventId].trainerRange_berryTreeId; } -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *templates; + const struct ObjectEventTemplate *templates; const struct MapHeader *mapHeader; u8 count; @@ -2591,7 +2591,7 @@ static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 loca return FindObjectEventTemplateByLocalId(localId, templates, count); } -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count) +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count) { u8 i; diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index 3b52e06d1..5bb28ed28 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -29,8 +29,8 @@ static void EvoTask_ShrinkOrExpandEvoSprites(u8 taskId); static void PreEvoInvisible_PostEvoVisible_KillTask(u8 taskId); static void PreEvoVisible_PostEvoInvisible_KillTask(u8 taskId); -static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/misc/evolution_sprite_841EEA4.gbapal"); -static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/misc/evolution_sprite_841EEA4.4bpp.lz"); +static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/evolution_scene/sparkle.gbapal"); +static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/evolution_scene/sparkle.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheet_EvolutionSparkles[] = { { sEvolutionSparklesTileData, 0x20, 1001 }, diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 9a7d55edc..41ef6ab9c 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -495,11 +495,11 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position case 5: case 6: case BG_EVENT_HIDDEN_ITEM: - if (GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_UNDERFOOT) == TRUE) + if (GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_UNDERFOOT) == TRUE) return NULL; - gSpecialVar_0x8005 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_ID); - gSpecialVar_0x8004 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_FLAG); - gSpecialVar_0x8006 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_QUANTITY); + gSpecialVar_0x8005 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_ITEM); + gSpecialVar_0x8004 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_FLAG); + gSpecialVar_0x8006 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_QUANTITY); if (FlagGet(gSpecialVar_0x8004) == TRUE) return NULL; gSpecialVar_Facing = direction; @@ -1008,7 +1008,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8 static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct WarpEvent *warpEvent = mapHeader->events->warps; + const struct WarpEvent *warpEvent = mapHeader->events->warps; u8 warpCount = mapHeader->events->warpCount; for (i = 0; i < warpCount; i++, warpEvent++) @@ -1022,7 +1022,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e return -1; } -static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) +static const u8 *TryRunCoordEventScript(const struct CoordEvent *coordEvent) { if (coordEvent != NULL) { @@ -1045,7 +1045,7 @@ static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct CoordEvent *coordEvents = mapHeader->events->coordEvents; + const struct CoordEvent *coordEvents = mapHeader->events->coordEvents; u8 coordEventCount = mapHeader->events->coordEventCount; for (i = 0; i < coordEventCount; i++) @@ -1101,7 +1101,7 @@ const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { u8 i; - struct BgEvent *bgEvents = mapHeader->events->bgEvents; + const struct BgEvent *bgEvents = mapHeader->events->bgEvents; u8 bgEventCount = mapHeader->events->bgEventCount; for (i = 0; i < bgEventCount; i++) diff --git a/src/field_door.c b/src/field_door.c index c2cd4e6f0..c3be102da 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -6,13 +6,20 @@ #include "constants/songs.h" #include "constants/metatile_labels.h" -#define DOOR_SOUND_NORMAL 0 -#define DOOR_SOUND_SLIDING 1 +enum { + DOOR_SOUND_NORMAL, + DOOR_SOUND_SLIDING, +}; + +enum { + DOOR_SIZE_1x1, + DOOR_SIZE_1x2, +}; struct DoorAnimFrame { u8 duration; - u16 tile; + u16 tileOffset; }; struct DoorGraphics @@ -20,17 +27,17 @@ struct DoorGraphics u16 metatileId; u8 sound; u8 size; - const u8 * tiles; - const u8 * palettes; + const u8 *tiles; + const u8 *paletteNums; }; -static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y); -static void LoadDoorFrameTiles(const u8 *a0); -static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3); -static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2); -static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data); -static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames); -static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y); +static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y); +static void CopyDoorTilesToVram(const u8 *tiles); +static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums); +static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums); +static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data); +static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames); +static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y); static const u8 sDoorAnimTiles_General[] = INCBIN_U8("graphics/door_anims/general.4bpp"); static const u16 sDoorNullPalette1[16] = {}; @@ -173,35 +180,37 @@ static const u16 sDoorNullPalette63[16] = {}; static const u8 sDoorAnimTiles_TrainerTowerRoofElevator[] = INCBIN_U8("graphics/door_anims/trainer_tower_roof_elevator.4bpp"); static const u16 sDoorNullPalette64[16] = {}; +#define CLOSED_DOOR_TILES_OFFSET 0xFFFF + static const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { - {4, 0xFFFF}, - {4, 0x0000}, - {4, 0x0080}, - {4, 0x0100}, + {4, CLOSED_DOOR_TILES_OFFSET}, + {4, 0 * TILE_SIZE_4BPP}, + {4, 4 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { - {4, 0xFFFF}, - {4, 0x0000}, - {4, 0x0100}, - {4, 0x0200}, + {4, CLOSED_DOOR_TILES_OFFSET}, + {4, 0 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 16 * TILE_SIZE_4BPP}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { - {4, 0x0100}, - {4, 0x0080}, - {4, 0x0000}, - {4, 0xFFFF}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 4 * TILE_SIZE_4BPP}, + {4, 0 * TILE_SIZE_4BPP}, + {4, CLOSED_DOOR_TILES_OFFSET}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { - {4, 0x0200}, - {4, 0x0100}, - {4, 0x0000}, - {4, 0xFFFF}, + {4, 16 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 0 * TILE_SIZE_4BPP}, + {4, CLOSED_DOOR_TILES_OFFSET}, {} }; @@ -239,64 +248,60 @@ static const u8 sDoorAnimPalettes_TrainerTowerLobbyElevator[] = {8, 8, 2, 2, 2, static const u8 sDoorAnimPalettes_TrainerTowerRoofElevator[] = {11, 11, 2, 2, 2, 2, 2, 2}; static const struct DoorGraphics sDoorGraphics[] = { - {METATILE_General_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_General, sDoorAnimPalettes_General}, - {METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle}, - {METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble}, - {METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet}, - {METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab}, - {METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian}, - {METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter}, - {METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron}, - {METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo}, - {METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean}, - {METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender}, - {METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion}, + {METATILE_General_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_General, sDoorAnimPalettes_General}, + {METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle}, + {METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble}, + {METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet}, + {METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab}, + {METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian}, + {METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter}, + {METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron}, + {METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo}, + {METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean}, + {METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender}, + {METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion}, /* Below was presumably intended for the door to the Pokemon Fan Club. The metatile is surrounded by metatiles for the fan club building. Its animation tiles are similar to the Vermilion door above, and the building on the map uses that metatile instead. The unused tiles have the pokeball above the door in view, but on the map the pokeball above the door is too high to be in view. The metatile below was subsequently re-used for the warp to enter the SS Anne from the harbor, which has no door. */ - {METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub}, - {METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore}, - {METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia}, - {METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone}, - {METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab}, - {METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123}, - {METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner}, - {METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter}, - {METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45}, - {METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare}, - {METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse}, - {METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67}, - {METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator}, - {METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub}, - {METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator}, - {METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, 1, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne}, - {METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator}, - {METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter}, - {METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator}, - {METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator}, + {METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub}, + {METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore}, + {METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia}, + {METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone}, + {METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab}, + {METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123}, + {METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner}, + {METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter}, + {METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45}, + {METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare}, + {METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse}, + {METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67}, + {METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator}, + {METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub}, + {METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator}, + {METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x2, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne}, + {METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator}, + {METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter}, + {METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator}, + {METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator}, {} }; -static void UpdateDrawDoorFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) +static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y) { - if (frames->tile == 0xFFFF) - { - DrawDoorDefaultImage(gfx, x, y); - } + if (frames->tileOffset == CLOSED_DOOR_TILES_OFFSET) + DrawClosedDoorTiles(gfx, x, y); else { - LoadDoorFrameTiles(&gfx->tiles[frames->tile]); - SetDoorFramePalettes(gfx, x, y, gfx->palettes); + CopyDoorTilesToVram(&gfx->tiles[frames->tileOffset]); + DrawCurrentDoorAnimFrame(gfx, x, y, gfx->paletteNums); } } -static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y) +static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y) { - if (gfx->size == 0) - { + if (gfx->size == DOOR_SIZE_1x1) CurrentMapDrawMetatileAt(x, y); - } else { CurrentMapDrawMetatileAt(x, y); @@ -304,73 +309,91 @@ static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y) } } -static void LoadDoorFrameTiles(const u8 *a0) +// NOTE: The tiles of a door's animation must be copied to VRAM because they are +// not already part of any given tileset. This means that if there are any +// pre-existing tiles in this copied region that are visible when the door +// animation is played, they will be overwritten. +#define DOOR_TILE_START (NUM_TILES_TOTAL - 8) + +static void CopyDoorTilesToVram(const u8 *tiles) { - CpuFastCopy(a0, (void *)(BG_VRAM + 0x7F00), 0x100); + CpuFastCopy(tiles, (void *)(VRAM + TILE_OFFSET_4BPP(DOOR_TILE_START)), 8 * TILE_SIZE_4BPP); } -static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3) +static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums) { - u16 sp00[8]; - if (gfx->size == 0) - { - BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); - } + u16 tiles[8]; + if (gfx->size == DOOR_SIZE_1x1) + BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums); + else { - BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); - DrawDoorMetatileAt(x, y - 1, sp00); - BufferDoorFrameTilesWithPalettes(sp00, 0x3FC, a3 + 4); + BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums); + DrawDoorMetatileAt(x, y - 1, tiles); + BuildDoorTiles(tiles, DOOR_TILE_START + 4, &paletteNums[4]); } - DrawDoorMetatileAt(x, y, sp00); + + DrawDoorMetatileAt(x, y, tiles); } -static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2) +static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums) { int i; u16 tile; + + // Only the first 4 tiles of each metatile (bottom layer) actually use the door tiles for (i = 0; i < 4; i++) { - tile = *(a2++) << 12; - a0[i] = tile | (a1 + i); + tile = *(paletteNums++) << 12; + tiles[i] = tile | (tileNum + i); } + + // The remaining tiles (top layer) always use tile 0 (with the same palette) for (; i < 8; i++) { - tile = *(a2++) << 12; - a0[i] = tile; + tile = *(paletteNums++) << 12; + tiles[i] = tile; } } +#define tFramesHi data[0] +#define tFramesLo data[1] +#define tGfxHi data[2] +#define tGfxLo data[3] +#define tFrameId data[4] +#define tCounter data[5] +#define tX data[6] +#define tY data[7] + static void Task_AnimateDoor(u8 taskId) { - s16 *data = (void *)gTasks[taskId].data; - const struct DoorAnimFrame * frames = (const void *)(((u16)data[0] << 16) | (u16)data[1]); - const struct DoorGraphics * gfx = (const void *)(((u16)data[2] << 16) | (u16)data[3]); - if (!PlayDoorAnimationFrame(gfx, frames, data)) + s16 *data = gTasks[taskId].data; + const struct DoorAnimFrame *frames = (struct DoorAnimFrame *)((u16)tFramesHi << 16 | (u16)tFramesLo); + const struct DoorGraphics *gfx = (struct DoorGraphics *)((u16)tGfxHi << 16 | (u16)tGfxLo); + if (!AnimateDoorFrame(gfx, frames, data)) DestroyTask(taskId); } -static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data) +static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data) { - if (data[5] == 0) + if (tCounter == 0) + DrawDoor(gfx, &frames[tFrameId], tX, tY); + + if (tCounter == frames[tFrameId].duration) { - UpdateDrawDoorFrame(gfx, &frames[data[4]], data[6], data[7]); - } - if (data[5] == frames[data[4]].duration) - { - data[5] = 0; - data[4]++; - if (frames[data[4]].duration == 0) + tCounter = 0; + tFrameId++; + if (frames[tFrameId].duration == 0) // final frame has been reached return FALSE; + else + return TRUE; } - else - { - data[5]++; - } + + tCounter++; return TRUE; } -static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * gfx, u16 id) +static const struct DoorGraphics *GetDoorGraphics(const struct DoorGraphics *gfx, u16 id) { while (gfx->tiles != NULL) { @@ -381,7 +404,7 @@ static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * g return NULL; } -static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) +static s8 StartDoorAnimationTask(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y) { u8 taskId; s16 *data; @@ -391,53 +414,63 @@ static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct D taskId = CreateTask(Task_AnimateDoor, 80); data = gTasks[taskId].data; - data[6] = x; - data[7] = y; - data[1] = (uintptr_t)frames; - data[0] = (uintptr_t)frames >> 16; - data[3] = (uintptr_t)gfx; - data[2] = (uintptr_t)gfx >> 16; + tX = x; + tY = y; + tFramesLo = (uintptr_t)frames; + tFramesHi = (uintptr_t)frames >> 16; + tGfxLo = (uintptr_t)gfx; + tGfxHi = (uintptr_t)gfx >> 16; return taskId; } -static void DrawClosedDoor(const struct DoorGraphics * gfx, int x, int y) +#undef tFramesHi +#undef tFramesLo +#undef tGfxHi +#undef tGfxLo +#undef tFrameId +#undef tCounter +#undef tX +#undef tY + +static void DrawClosedDoor(const struct DoorGraphics *gfx, int x, int y) { - DrawDoorDefaultImage(gfx, x, y); + DrawClosedDoorTiles(gfx, x, y); } -static void DrawOpenedDoor(const struct DoorGraphics * gfx, int x, int y) +static void DrawOpenedDoor(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx != NULL) { - UpdateDrawDoorFrame(gfx, SeekToEndOfDoorAnim(gfx->size == 0 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge), x, y); + const struct DoorAnimFrame *frames = gfx->size == DOOR_SIZE_1x1 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge; + DrawDoor(gfx, GetLastDoorAnimFrame(frames), x, y); } } -static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames) +static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames) { while (frames->duration != 0) frames++; return frames - 1; } -static s8 AnimateDoorOpenInternal(const struct DoorGraphics * gfx, int x, int y) +static s8 AnimateDoorOpenInternal(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) return -1; - else if (gfx->size == 0) + else if (gfx->size == DOOR_SIZE_1x1) return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenSmall, x, y); else return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenLarge, x, y); } -static s8 AnimateDoorCloseInternal(const struct DoorGraphics * gfx, int x, int y) +static s8 StartDoorCloseAnimation(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) return -1; - else if (gfx->size == 0) + else if (gfx->size == DOOR_SIZE_1x1) return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseSmall, x, y); else return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseLarge, x, y); @@ -459,7 +492,7 @@ s8 FieldAnimateDoorClose(int x, int y) { if (!MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) return -1; - return AnimateDoorCloseInternal(sDoorGraphics, x, y); + return StartDoorCloseAnimation(sDoorGraphics, x, y); } s8 FieldAnimateDoorOpen(int x, int y) @@ -482,7 +515,7 @@ u16 GetDoorSoundEffect(int x, int y) return SE_SLIDING_DOOR; } -static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y) +static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) diff --git a/src/field_poison.c b/src/field_poison.c index 34640489e..d44e32b63 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -12,7 +12,7 @@ static bool32 IsMonValidSpecies(struct Pokemon *pokemon) { - u16 species = GetMonData(pokemon, MON_DATA_SPECIES2); + u16 species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_NONE || species == SPECIES_EGG) return FALSE; return TRUE; @@ -62,7 +62,7 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId) { FaintFromFieldPoison(tPartyId); ShowFieldMessage(gText_PkmnFainted3); - data[0]++; + tState++; return; } } diff --git a/src/field_specials.c b/src/field_specials.c index 5a267fb51..c0685ec62 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -199,7 +199,7 @@ bool8 PlayerHasGrassPokemonInParty(void) ) { species = GetMonData(pokemon, MON_DATA_SPECIES); - if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS) + if (gSpeciesInfo[species].types[0] == TYPE_GRASS || gSpeciesInfo[species].types[1] == TYPE_GRASS) return TRUE; } } @@ -423,7 +423,7 @@ bool8 IsStarterFirstStageInParty(void) u8 i; for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == species) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == species) return TRUE; } return FALSE; @@ -515,7 +515,7 @@ u8 GetLeadMonIndex(void) for (i = 0; i < partyCount; i++) { pokemon = &gPlayerParty[i]; - if (GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_NONE) + if (GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE) return i; } return 0; @@ -523,7 +523,7 @@ u8 GetLeadMonIndex(void) u16 GetPartyMonSpecies(void) { - return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL); + return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES_OR_EGG, NULL); } bool8 IsMonOTNameNotPlayers(void) @@ -1718,7 +1718,7 @@ void UpdateTrainerCardPhotoIcons(void) partyCount = CalculatePlayerPartyCount(); for (i = 0; i < partyCount; i++) { - species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL); + species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL); personality[i] = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL); } VarSet(VAR_TRAINER_CARD_MON_ICON_1, SpeciesToMailSpecies(species[0], personality[0])); @@ -1752,15 +1752,15 @@ u16 StickerManGetBragFlags(void) u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr) { - if (attr == 0) - return hiddenItem & 0xFFFF; - else if (attr == 1) - return ((hiddenItem >> 16) & 0xFF) + 1000; - else if (attr == 2) - return (hiddenItem >> 24) & 0x7F; - else if (attr == 3) - return (hiddenItem >> 31) & 0x01; - else + if (attr == HIDDEN_ITEM_ITEM) + return GET_HIDDEN_ITEM_ITEM(hiddenItem); + else if (attr == HIDDEN_ITEM_FLAG) + return GET_HIDDEN_ITEM_FLAG(hiddenItem) + FLAG_HIDDEN_ITEMS_START; + else if (attr == HIDDEN_ITEM_QUANTITY) + return GET_HIDDEN_ITEM_QUANTITY(hiddenItem); + else if (attr == HIDDEN_ITEM_UNDERFOOT) + return GET_HIDDEN_ITEM_UNDERFOOT(hiddenItem); + else // Invalid return 1; } @@ -1770,7 +1770,7 @@ bool8 DoesPlayerPartyContainSpecies(void) u8 i; for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004) return TRUE; } return FALSE; @@ -2079,30 +2079,30 @@ void DaisyMassageServices(void) } static const u16 sEliteFourLightingPalettes[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F5F50.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5F70.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5F90.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FB0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FD0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FF0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6010.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6030.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6050.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6070.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6090.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F60B0.gbapal") + INCBIN_U16("graphics/field_specials/elite_four_lighting_0.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_1.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_2.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_3.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_4.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_5.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_6.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_7.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_8.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_9.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_10.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_11.gbapal") }; static const u16 sChampionRoomLightingPalettes[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F60D0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F60F0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6110.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6130.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6150.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6170.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6190.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F61B0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F61D0.gbapal") + INCBIN_U16("graphics/field_specials/champion_room_lighting_0.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_1.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_2.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_3.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_4.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_5.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_6.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_7.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_8.gbapal") }; static const u8 sEliteFourLightingTimers[] = { @@ -2234,7 +2234,7 @@ bool8 CapeBrinkGetMoveToTeachLeadPokemon(void) gSpecialVar_0x8007 = leadMonSlot; for (i = 0; i < NELEMS(sCapeBrinkCompatibleSpecies); i++) { - if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[i]) + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES_OR_EGG, NULL) == sCapeBrinkCompatibleSpecies[i]) { tutorMonId = i; break; @@ -2321,17 +2321,17 @@ void CutMoveOpenDottedHoleDoor(void) } static const u16 sDeoxysObjectPals[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F6206.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6226.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6246.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6266.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6286.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62A6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62C6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62E6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6306.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6326.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6346.gbapal") + INCBIN_U16("graphics/field_specials/deoxys_rock_0.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_1.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_2.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_3.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_4.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_5.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_6.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_7.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_8.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_9.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_10.gbapal") }; static const u8 sDeoxysCoords[][2] = { @@ -2502,7 +2502,7 @@ bool8 PlayerPartyContainsSpeciesWithPlayerID(void) u8 i; for (i = 0; i < playerCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004 + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004 && GetPlayerTrainerId() == GetMonData(&gPlayerParty[i], MON_DATA_OT_ID, NULL)) return TRUE; } diff --git a/src/fieldmap.c b/src/fieldmap.c index c2362f6b9..e10f1af11 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -24,15 +24,15 @@ EWRAM_DATA u8 gGlobalFieldTintMode = QL_TINT_NONE; static const struct ConnectionFlags sDummyConnectionFlags = {}; static void InitMapLayoutData(struct MapHeader *); -static void InitBackupMapLayoutData(u16 *, u16, u16); +static void InitBackupMapLayoutData(const u16 *, u16, u16); static void InitBackupMapLayoutConnections(struct MapHeader *); static void FillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillWestConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillEastConnection(struct MapHeader const *, struct MapHeader const *, s32); static void LoadSavedMapView(void); -static struct MapConnection *GetIncomingConnection(u8, s32, s32); -static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, struct MapConnection *); +static const struct MapConnection *GetIncomingConnection(u8, s32, s32); +static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, const struct MapConnection *); static bool8 IsCoordInIncomingConnectingMap(s32, s32, s32, s32); static u32 GetAttributeByMetatileIdAndMapLayout(const struct MapLayout *, u16, u8); @@ -82,7 +82,7 @@ static const u8 sMetatileAttrShifts[METATILE_ATTRIBUTE_COUNT] = { [METATILE_ATTRIBUTE_7] = 31 }; -const struct MapHeader * GetMapHeaderFromConnection(struct MapConnection * connection) +const struct MapHeader * GetMapHeaderFromConnection(const struct MapConnection * connection) { return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum); } @@ -112,7 +112,7 @@ static void InitMapLayoutData(struct MapHeader * mapHeader) InitBackupMapLayoutConnections(mapHeader); } -static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) +static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height) { s32 y; u16 *dest = VMap.map; @@ -129,7 +129,7 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; s32 i; gMapConnectionFlags = sDummyConnectionFlags; @@ -173,7 +173,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) static void FillConnection(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x2, s32 y2, s32 width, s32 height) { s32 i; - u16 *src; + const u16 *src; u16 *dest; s32 mapWidth; @@ -628,7 +628,7 @@ bool32 CanCameraMoveInDirection(s32 direction) return TRUE; } -static void SetPositionFromConnection(struct MapConnection *connection, int direction, s32 x, s32 y) +static void SetPositionFromConnection(const struct MapConnection *connection, int direction, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -656,7 +656,7 @@ static void SetPositionFromConnection(struct MapConnection *connection, int dire bool8 CameraMove(s32 x, s32 y) { s32 direction; - struct MapConnection *connection; + const struct MapConnection *connection; s32 old_x, old_y; gCamera.active = FALSE; direction = GetPostCameraMoveMapBorderId(x, y); @@ -683,10 +683,10 @@ bool8 CameraMove(s32 x, s32 y) return gCamera.active; } -struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) +const struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; const struct MapConnections *connections = gMapHeader.connections; s32 i; @@ -705,7 +705,7 @@ struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) } -static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, struct MapConnection *connection) +static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, const struct MapConnection *connection) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -742,7 +742,7 @@ static bool32 IsCoordInConnectingMap(s32 coord, s32 max) return FALSE; } -static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y) +static s32 IsPosInConnectingMap(const struct MapConnection *connection, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -758,10 +758,10 @@ static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y) return FALSE; } -struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) +const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; s32 i; u8 direction; if (!gMapHeader.connections) diff --git a/src/graphics.c b/src/graphics.c index 8a11d58a5..04f431469 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -69,8 +69,7 @@ const u32 gBattleAnimSpriteGfx_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpritePal_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/sprites/black_smoke.gbapal.lz"); const u32 gBattleAnimSpriteGfx_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.4bpp.lz"); - -const u32 gUnknownGfx_8D035A0[] = INCBIN_U32("graphics/unknown/unknown_D035A0.4bpp.lz"); +const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.gbapal.lz"); const u32 gBattleAnimSpritePal_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.4bpp.lz"); @@ -128,9 +127,9 @@ const u32 gBattleAnimSpriteGfx_Lightning2[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_Lightning[] = INCBIN_U32("graphics/battle_anims/sprites/lightning.4bpp.lz"); -const u32 gUnknownGfx_D06D80[] = INCBIN_U32("graphics/unknown/unknown_D06D80.4bpp.lz"); -const u32 gUnknownPal_D06DC4[] = INCBIN_U32("graphics/unknown/unknown_D06D80.gbapal.lz"); -const u32 gUnknownPal_D06DD8[] = INCBIN_U32("graphics/unknown/unknown_D06D80_2.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.4bpp.lz"); +const u32 gBattleAnimSpritePal_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.gbapal.lz"); +const u32 gBattleAnimSpritePal_SpinningBall2[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball_2.gbapal.lz"); // old battle interface data, unused const u32 gOldBattleInterfaceGfx[] = INCBIN_U32("graphics/unused/obi1.4bpp.lz"); @@ -148,7 +147,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz"); const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz"); -const u32 gPartyMenuHpBar_Gfx[] = INCBIN_U32("graphics/interface/party_menu_hpbar.4bpp.lz"); +const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/interface/hpbar_unused.4bpp.lz"); const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz"); @@ -253,12 +252,13 @@ const u32 gBattleAnimSpritePal_Bell2[] = INCBIN_U32("graphics/battle_anims/sprit const u32 gBattleAnimSpriteGfx_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.4bpp.lz"); const u32 gBattleAnimSpritePal_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.gbapal.lz"); -const u16 gUnknown_D0CA04[] = INCBIN_U16("graphics/unknown/unknown_D0CA04.bin"); -const u16 gUnknown_D0CA28[] = INCBIN_U16("graphics/unknown/unknown_D0CA28.bin"); -const u16 gUnknown_D0CA4C[] = INCBIN_U16("graphics/unknown/unknown_D0CA4C.bin"); -const u32 gUnusedGfx8bpp_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.8bpp.lz"); -const u16 gUnknown_D0CAC8[] = INCBIN_U16("graphics/unknown/unknown_D0CAC8.bin"); -const u32 gUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.bin.lz"); +const u16 gBattleAnimUnused_Unknown1[] = INCBIN_U16("graphics/battle_anims/unused/unknown_1.bin"); +const u16 gBattleAnimUnused_Unknown2[] = INCBIN_U16("graphics/battle_anims/unused/unknown_2.bin"); +const u16 gBattleAnimUnused_Unknown3[] = INCBIN_U16("graphics/battle_anims/unused/unknown_3.bin"); + +const u32 gBattleAnimUnusedGfx_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.8bpp.lz"); +const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2.gbapal.lz"); +const u32 gBattleAnimUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.bin.lz"); const u32 gBattleAnimSpriteGfx_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.gbapal.lz"); @@ -274,7 +274,7 @@ const u32 gBattleAnimSpritePal_RedTube[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpritePal_Amnesia[] = INCBIN_U32("graphics/battle_anims/sprites/amnesia.gbapal.lz"); const u32 gBattleAnimSpritePal_String2[] = INCBIN_U32("graphics/battle_anims/sprites/string_2.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D0CD0C[] = INCBIN_U32("graphics/unknown/unknown_D0CD0C.bin.lz"); +const u32 gBattleAnimUnused_Unknown4[] = INCBIN_U32("graphics/battle_anims/unused/unknown_4.bin.lz"); const u32 gBattleAnimSpritePal_Pencil2[] = INCBIN_U32("graphics/battle_anims/sprites/pencil_2.gbapal.lz"); const u32 gBattleAnimSpritePal_Petal[] = INCBIN_U32("graphics/battle_anims/sprites/petal.gbapal.lz"); @@ -413,50 +413,41 @@ const u32 gBattleAnimSpritePal_BlueFlames[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_BlueFlames2[] = INCBIN_U32("graphics/battle_anims/sprites/blue_flames_2.4bpp.lz"); -// Contest +// Contest (unused) -const u32 gUnusedGfx_OldContest[] = INCBIN_U32("graphics/unused/old_contest.4bpp.lz"); -const u32 gUnusedPal_OldContest[] = INCBIN_U32("graphics/unused/old_contest.gbapal.lz"); -const u32 gUnusedTilemap_OldContest[] = INCBIN_U32("graphics/unused/old_contest.bin.lz"); +const u32 gJpContest_Gfx1[] = INCBIN_U32("graphics/contest/japanese/composite_1.4bpp.lz"); +const u32 gJpContest_Pal[] = INCBIN_U32("graphics/contest/japanese/palette.gbapal.lz"); +const u32 gJpContest_Bg_Tilemap[] = INCBIN_U32("graphics/contest/japanese/bg.bin.lz"); +const u32 gJpContest_Windows_Tilemap[] = INCBIN_U32("graphics/contest/japanese/windows.bin.lz"); +const u32 gJpContest_Numbers_Gfx[] = INCBIN_U32("graphics/contest/japanese/numbers.4bpp.lz"); +const u32 gJpContest_Numbers_Pal[] = INCBIN_U32("graphics/contest/japanese/numbers.gbapal.lz"); +const u32 gJpContest_Gfx2[] = INCBIN_U32("graphics/contest/japanese/composite_2.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D15BE8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D15BE8.bin.lz"); +const u32 gContest_Interface_Pal[] = INCBIN_U32("graphics/contest/interface.gbapal.lz"); +const u32 gContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/audience.bin.lz"); +const u32 gContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/interface.bin.lz"); -const u32 gFile_graphics_unused_numbers_sheet[] = INCBIN_U32("graphics/unused/numbers.4bpp.lz"); // From ruby -const u32 gFile_graphics_unused_numbers_palette[] = INCBIN_U32("graphics/unused/numbers.gbapal.lz"); // From ruby +const u32 gJpContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/japanese/interface.bin.lz"); +const u32 gJpContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/japanese/audience.bin.lz"); -const u32 gUnusedGfx_OldContest2[] = INCBIN_U32("graphics/unused/old_contest_2.4bpp.lz"); -const u32 gOldContestPalette[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz"); -const u32 gOldContestGfx[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz"); +const u32 gContest_Curtain_Tilemap[] = INCBIN_U32("graphics/contest/curtain.bin.lz"); +const u32 gContest_Interface_Gfx[] = INCBIN_U32("graphics/contest/interface.4bpp.lz"); +const u32 gContest_Audience_Gfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); +const u32 gContest_Faces_Gfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); +const u32 gContest_JudgeSymbols_Gfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); +const u32 gContest_JudgeSymbols_Pal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); +const u8 gContest_SliderHeart_Gfx[] = INCBIN_U8("graphics/contest/slider_heart.4bpp"); -const u32 gFile_graphics_unknown_unknown_D172A8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D172A8.bin.lz"); +const u32 gJpContest_Voltage_Gfx[] = INCBIN_U32("graphics/contest/japanese/voltage.4bpp.lz"); +const u32 gJpContest_Voltage_Pal[] = INCBIN_U32("graphics/contest/japanese/voltage.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D17548_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17548.bin.lz"); +const u32 gJpContestResults_Gfx[] = INCBIN_U32("graphics/contest/japanese/results.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D17654_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17654.bin.lz"); +const u32 gContestResults_WinnerBanner_Tilemap[] = INCBIN_U32("graphics/contest/results_winner_banner.bin.lz"); +const u32 gContestResults_Interface_Tilemap[] = INCBIN_U32("graphics/contest/results_interface.bin.lz"); +const u32 gContestResults_Bg_Tilemap[] = INCBIN_U32("graphics/contest/results_bg.bin.lz"); +const u32 gContestResults_Pal[] = INCBIN_U32("graphics/contest/results.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D17AB8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17AB8.bin.lz"); - -const u32 gContestMiscGfx[] = INCBIN_U32("graphics/contest/misc.4bpp.lz"); - -const u32 gContestAudienceGfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); - -const u32 gContestFacesSheetGfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); - -const u32 gContestJudgeSymbolsGfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); -const u32 gContestJudgeSymbolsPal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); - -const u8 gContestHeartGfx[] = INCBIN_U8("graphics/contest/heart.4bpp"); - -const u32 gFile_graphics_unknown_unknown_D196E4_sheet[] = INCBIN_U32("graphics/unknown/unknown_D196E4.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D196E4_palette[] = INCBIN_U32("graphics/unknown/unknown_D196E4.gbapal.lz"); - -const u32 gContestMisc2Gfx[] = INCBIN_U32("graphics/contest/misc_2.4bpp.lz"); - -const u32 gContestMiscTilemap1[] = INCBIN_U32("graphics/contest/misc_2_tilemap_1.bin.lz"); -const u32 gContestMiscTilemap2[] = INCBIN_U32("graphics/contest/misc_2_tilemap_2.bin.lz"); -const u32 gContestMiscTilemap3[] = INCBIN_U32("graphics/contest/misc_2_tilemap_3.bin.lz"); - -const u32 gContestMiscPal[] = INCBIN_U32("graphics/contest/misc.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.4bpp.lz"); const u32 gBattleAnimSpritePal_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.gbapal.lz"); @@ -532,9 +523,9 @@ const u32 gBattleAnimSpritePal_RazorLeaf[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.4bpp.lz"); const u32 gBattleAnimSpritePal_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_sheet[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_palette[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.bin.lz"); +const u32 gBattleAnimUnusedGfx_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.4bpp.lz"); +const u32 gBattleAnimUnusedPal_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.gbapal.lz"); +const u32 gBattleAnimUnusedTilemap_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.bin.lz"); const u32 gBattleAnimSpriteGfx_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.gbapal.lz"); @@ -892,8 +883,8 @@ const u32 gBattleAnimSpriteGfx_TagHand[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpriteGfx_NoiseLine[] = INCBIN_U32("graphics/battle_anims/sprites/noise_line.4bpp.lz"); -const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.4bpp.lz"); -const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.bin.lz"); +const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.4bpp.lz"); +const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.bin.lz"); const u32 gBattleAnimSpriteGfx_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.4bpp.lz"); const u32 gBattleAnimSpritePal_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.gbapal.lz"); @@ -1011,8 +1002,7 @@ const u32 gBattleAnimBgTilemap_Ghost[] = INCBIN_U32("graphics/battle_anims/backg const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/sprites/whip_hit.gbapal.lz"); const u32 gBattleAnimBgPalette_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); - -const u32 gFile_graphics_unknown_unknown_E7CFB0_tilemap[] = INCBIN_U32("graphics/unknown/unknown_E7CFB0.bin.lz"); +const u32 gBattleAnimBgTilemap_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused const u32 gFile_graphics_berry_blender_center_sheet[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); @@ -1074,22 +1064,20 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz"); const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz"); -const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_misc.4bpp.lz"); -const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_misc.gbapal.lz"); -const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_misc.bin.lz"); +const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/party_menu/bg.4bpp.lz"); +const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/party_menu/bg.gbapal.lz"); +const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/party_menu/bg.bin.lz"); -const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz"); -const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused -const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/interface/party_menu_pokeball.gbapal.lz"); +const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball.4bpp.lz"); +const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball_small.4bpp.lz"); //unused +const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gbapal.lz"); const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz"); const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz"); -const u32 gUnknown_8E830CC[] = INCBIN_U32("graphics/item_menu/bag_tiles.4bpp.lz"); - -const u32 gUnknown_8E832C0[] = INCBIN_U32("graphics/item_menu/bag_tilemap1.bin.lz"); // bag menu -const u32 gUnknown_8E83444[] = INCBIN_U32("graphics/item_menu/bag_tilemap2.bin.lz"); // PC deposit items - +const u32 gBagBg_Gfx[] = INCBIN_U32("graphics/item_menu/bg.4bpp.lz"); +const u32 gBagBg_Tilemap[] = INCBIN_U32("graphics/item_menu/bg.bin.lz"); +const u32 gBagBg_ItemPC_Tilemap[] = INCBIN_U32("graphics/item_menu/bg_item_pc.bin.lz"); const u32 gBagBgPalette[] = INCBIN_U32("graphics/item_menu/bag_pal1.gbapal.lz"); // palette 1 (Boy + misc Pal) const u32 gBagBgPalette_FemaleOverride[] = INCBIN_U32("graphics/item_menu/bag_pal2.gbapal.lz"); // palette 2 (Girl) @@ -1125,14 +1113,13 @@ const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/shop_menu/shop_tilemap. const u32 gBuyMenuFrame_TmHmTilemap[] = INCBIN_U32("graphics/shop_menu/shop_tm_hm_tilemap.bin.lz"); const u32 gBuyMenuFrame_Pal[] = INCBIN_U32("graphics/shop_menu/shop_menu.gbapal.lz"); -const u32 gUnknown_8E861A8[] = INCBIN_U32("graphics/unknown/unknown_E861A8.bin.lz"); - +const u8 gTeachyTv_Border_Gfx[] = INCBIN_U8("graphics/teachy_tv/border.4bpp.lz"); // Unused const u8 gTeachyTv_Gfx[] = INCBIN_U8("graphics/teachy_tv/tiles.4bpp.lz"); const u8 gTeachyTvScreen_Tilemap[] = INCBIN_U8("graphics/teachy_tv/screen.bin.lz"); const u8 gTeachyTvTitle_Tilemap[] = INCBIN_U8("graphics/teachy_tv/title.bin.lz"); const u32 gTeachyTv_Pal[] = INCBIN_U32("graphics/teachy_tv/tiles.gbapal.lz"); -const u32 gUnknown_8E87010[] = INCBIN_U32("graphics/unknown/unknown_E87010.gbapal.lz"); +const u32 gUnusedGrayPalette[] = INCBIN_U32("graphics/unused/gray_palette.gbapal.lz"); #include "data/graphics/items.h" @@ -1154,9 +1141,9 @@ const u16 gFireRedMenuElements1_Pal[] = INCBIN_U16("graphics/interface/dex_caugh const u16 gFireRedMenuElements2_Pal[] = INCBIN_U16("graphics/interface/pokemon_types.gbapal"); const u8 gFireRedMenuElements_Gfx[] = INCBIN_U8("graphics/interface/dex_caught_pokeball_and_pokemon_types.4bpp"); -const u16 gUnknown_8E97DDC[] = INCBIN_U16("graphics/interface/learn_move.gbapal"); -const u32 gUnknown_8E97DFC[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz"); -const u32 gUnknown_8E97EC4[] = INCBIN_U32("graphics/interface/learn_move.bin.lz"); +const u16 gMoveRelearner_Pal[] = INCBIN_U16("graphics/interface/learn_move.gbapal"); +const u32 gMoveRelearner_Gfx[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz"); +const u32 gMoveRelearner_Tilemap[] = INCBIN_U32("graphics/interface/learn_move.bin.lz"); const u16 gNamingScreenKeyboard_Pal[] = INCBIN_U16("graphics/naming_screen/keyboard.gbapal"); const u16 gNamingScreenRival_Pal[] = INCBIN_U16("graphics/naming_screen/rival.gbapal"); @@ -1204,26 +1191,22 @@ const u16 gEasyChatButtonWindow_Pal[] = INCBIN_U16("graphics/easy_chat/button_wi const u32 gEasyChatButtonWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/button_window.4bpp.lz"); const u32 gEasyChatMode_Gfx[] = INCBIN_U32("graphics/easy_chat/mode.4bpp.lz"); -const u32 gPokeSumBgTiles[] = INCBIN_U32("graphics/interface/trainer_memo.4bpp.lz"); -const u32 gTrainerMemoPal1[] = INCBIN_U32("graphics/interface/trainer_memo_pal1.gbapal"); -const u32 gUnknown_8E9B3B0[] = INCBIN_U32("graphics/interface/trainer_memo_pal2.gbapal"); -const u32 gUnknown_8E9B3D0[] = INCBIN_U32("graphics/interface/trainer_memo_pal3.gbapal"); +const u32 gSummaryScreen_Bg_Gfx[] = INCBIN_U32("graphics/summary_screen/bg.4bpp.lz"); +const u32 gSummaryScreen_Bg_Pal[] = INCBIN_U32("graphics/summary_screen/bg.gbapal"); +const u32 gSummaryScreen_ExpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/exp_bar.4bpp.lz"); +const u32 gSummaryScreen_HpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/hp_bar.4bpp.lz"); +const u16 gSummaryScreen_HpExpBar_Pal[] = INCBIN_U16("graphics/summary_screen/exp_bar.gbapal"); // hp bar uses this too +const u32 gSummaryScreen_PageInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz"); +const u32 gSummaryScreen_PageSkills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz"); +const u32 gSummaryScreen_PageMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves.bin.lz"); +const u32 gSummaryScreen_PageMovesInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves_info.bin.lz"); +const u32 gSummaryScreen_PageEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_egg.bin.lz"); -const u32 gPokeSummary_ExpBarTiles[] = INCBIN_U32("graphics/interface/summary_exp_bar.4bpp.lz"); -const u32 gPokeSummary_HpBarTiles[] = INCBIN_U32("graphics/interface/summary_hp_bar.4bpp.lz"); -const u16 gPokeSummary_ExpBarPals[] = INCBIN_U16("graphics/interface/summary_exp_bar.gbapal"); // hp bar uses this too - -const u32 gBgTilemap_TrainerMemo_Details[] = INCBIN_U32("graphics/interface/trainer_memo.bin.lz"); -const u32 gBgTilemap_TrainerMemo_Stats[] = INCBIN_U32("graphics/interface/trainer_memo_2.bin.lz"); -const u32 gBgTilemap_PokeSum_MovesListForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_3.bin.lz"); -const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_4.bin.lz"); -const u32 gBgTilemap_TrainerMemo_Egg[] = INCBIN_U32("graphics/interface/trainer_memo_5.bin.lz"); - -const u16 gUnknown_8E9BD08[] = INCBIN_U16("graphics/unknown/unknown_E9BD08.gbapal"); +const u16 gUnusedRedPalette[] = INCBIN_U16("graphics/unused/red_palette.gbapal"); const u32 gEasyChatRectangleCursor_Gfx[] = INCBIN_U32("graphics/easy_chat/rectangle_cursor.4bpp.lz"); -const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/status_ailment_icons.gbapal"); -const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/status_ailment_icons.4bpp.lz"); +const u16 gSummaryScreen_StatusAilmentIcon_Pal[] = INCBIN_U16("graphics/summary_screen/status_ailment_icons.gbapal"); +const u32 gSummaryScreen_StatusAilmentIcon_Gfx[] = INCBIN_U32("graphics/summary_screen/status_ailment_icons.4bpp.lz"); const u16 gDexScreen_TopMenuIconPals_AtoZ[] = INCBIN_U16("graphics/pokedex/cat_icon_abc.gbapal"); const u32 gDexScreen_TopMenuIconTiles_AtoZ[] = INCBIN_U32("graphics/pokedex/cat_icon_abc.4bpp.lz"); @@ -1249,10 +1232,10 @@ const u16 gFameCheckerBgTiles[] = INCBIN_U16("graphics/fame_checker/bg.4bpp"); const u16 gFameCheckerBg3Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap3.bin"); const u16 gFameCheckerBg2Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap2.bin"); -const u16 gLinkMiscMenu_Pal[] = INCBIN_U16("graphics/interface/union_room_chat.gbapal"); -const u32 gLinkMiscMenu_Gfx[] = INCBIN_U32("graphics/interface/union_room_chat.4bpp.lz"); -const u32 gLinkMiscMenu_Tilemap[] = INCBIN_U32("graphics/interface/union_room_chat.bin.lz"); -const u32 gUnionRoomChatIcons[] = INCBIN_U32("graphics/interface/union_room_chat_icons.4bpp.lz"); +const u16 gUnionRoomChat_Bg_Pal[] = INCBIN_U16("graphics/union_room_chat/bg.gbapal"); +const u32 gUnionRoomChat_Bg_Gfx[] = INCBIN_U32("graphics/union_room_chat/bg.4bpp.lz"); +const u32 gUnionRoomChat_Bg_Tilemap[] = INCBIN_U32("graphics/union_room_chat/bg.bin.lz"); +const u32 gUnionRoomChat_Icons_Gfx[] = INCBIN_U32("graphics/union_room_chat/icons.4bpp.lz"); const u16 gTilesetPalettes_General[][16] = { @@ -1339,20 +1322,20 @@ const u16 gTilesetPalettes_DepartmentStore[][16] = const u32 gTilesetTiles_DepartmentStore[] = INCBIN_U32("data/tilesets/secondary/department_store/tiles.4bpp.lz"); -const u16 gUnionRoomChatPanelBgPal_7[] = INCBIN_U16("graphics/interface/union_room_chat_panel.gbapal"); -const u32 gUnionRoomChatPanelBgTiles[] = INCBIN_U32("graphics/interface/union_room_chat_panel.4bpp.lz"); -const u32 gUnionRoomChatPanelBgMap[] = INCBIN_U32("graphics/interface/union_room_chat_panel.bin.lz"); +const u16 gUnionRoomChat_Panel_Pal[] = INCBIN_U16("graphics/union_room_chat/panel.gbapal"); +const u32 gUnionRoomChat_Panel_Gfx[] = INCBIN_U32("graphics/union_room_chat/panel.4bpp.lz"); +const u32 gUnionRoomChat_Panel_Tilemap[] = INCBIN_U32("graphics/union_room_chat/panel.bin.lz"); -const u16 gCreditsMonBackdropPals[][16] = +const u16 gCreditsMonPokeball_Pals[][16] = { - INCBIN_U16("graphics/credits/charizard.gbapal"), - INCBIN_U16("graphics/credits/venusaur.gbapal"), - INCBIN_U16("graphics/credits/blastoise.gbapal"), - INCBIN_U16("graphics/credits/pikachu.gbapal"), + INCBIN_U16("graphics/credits/pokeball_charizard.gbapal"), + INCBIN_U16("graphics/credits/pokeball_venusaur.gbapal"), + INCBIN_U16("graphics/credits/pokeball_blastoise.gbapal"), + INCBIN_U16("graphics/credits/pokeball_pikachu.gbapal"), }; -const u32 gCreditsPokeballBgGfxTiles[] = INCBIN_U32("graphics/credits/unk_8EAAB98.4bpp.lz"); -const u32 gCreditsPokeballBgGfxMap[] = INCBIN_U32("graphics/credits/unk_8EAB30C.bin.lz"); +const u32 gCreditsMonPokeball_Tiles[] = INCBIN_U32("graphics/credits/pokeball.4bpp.lz"); +const u32 gCreditsMonPokeball_Tilemap[] = INCBIN_U32("graphics/credits/pokeball.bin.lz"); #ifdef FIRERED const u16 gGraphics_TitleScreen_GameTitleLogoPals[] = INCBIN_U16("graphics/title_screen/firered/game_title_logo.gbapal"); @@ -1382,15 +1365,15 @@ const u16 gTitleScreen_Slash_Pal[] = INCBIN_U16("graphics/title_screen/leafgreen const u32 gTitleScreen_BlankSprite_Tiles[] = INCBIN_U32("graphics/title_screen/blank_sprite.4bpp.lz"); -const u16 gCreditsAllRightsReservedGfxPal[] = INCBIN_U16("graphics/credits/unk_8EAE548.gbapal"); -const u8 gCreditsAllRightsReservedGfxTiles[] = INCBIN_U8("graphics/credits/unk_8EAE548.4bpp.lz"); -const u8 gCreditsAllRightsReservedGfxMap[] = INCBIN_U8("graphics/credits/unk_8EAE548.bin.lz"); +const u16 gCreditsCopyright_Pal[] = INCBIN_U16("graphics/credits/copyright.gbapal"); +const u8 gCreditsCopyright_Tiles[] = INCBIN_U8("graphics/credits/copyright.4bpp.lz"); +const u8 gCreditsCopyright_Tilemap[] = INCBIN_U8("graphics/credits/copyright.bin.lz"); -const u32 gUnknown_8EAEA00[] = INCBIN_U32("graphics/link/gba.gbapal"); -const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/link/gba_pal2.gbapal"); -const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/link/gba.4bpp"); +const u32 gTradeGba_Pal[] = INCBIN_U32("graphics/trade/gba.gbapal"); +const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/trade/gba_pal2.gbapal"); +const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/trade/gba.4bpp"); -const u16 gUnknown_8EAFE80[] = INCBIN_U16("graphics/interface/blank2.gbapal"); +const u16 sEmptyPal[16] = {0}; const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal"); const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 72ba97b47..d408b528e 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -390,7 +390,7 @@ static void Task_Hof_InitMonData(u8 taskId) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE) { - sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); sHofMonPtr[0].mon[i].tid = GetMonData(&gPlayerParty[i], MON_DATA_OT_ID); sHofMonPtr[0].mon[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); sHofMonPtr[0].mon[i].lvl = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); diff --git a/src/isagbprn.c b/src/isagbprn.c index 46195f72f..a038814e7 100644 --- a/src/isagbprn.c +++ b/src/isagbprn.c @@ -2,6 +2,8 @@ #include #include "config.h" #include "gba/gba.h" +#include "malloc.h" +#include "mini_printf.h" #define AGB_PRINT_FLUSH_ADDR 0x9FE209D #define AGB_PRINT_STRUCT_ADDR 0x9FE20F8 @@ -14,6 +16,11 @@ #define NOCASHGBAPRINTADDR1 0x4FFFA10 // automatically adds a newline after the string has finished #define NOCASHGBAPRINTADDR2 0x4FFFA14 // does not automatically add the newline. by default, NOCASHGBAPRINTADDR2 is used. this is used to keep strings consistent between no$gba and VBA-RR, but a user can choose to forgo this. +// hardware extensions for LOG_HANDLER_MGBA_PRINT +#define REG_DEBUG_ENABLE ((vu16*) (0x4FFF780)) // handshake: (w)[0xC0DE] -> (r)[0x1DEA] +#define REG_DEBUG_FLAGS ((vu16*) (0x4FFF700)) +#define REG_DEBUG_STRING ((char*) (0x4FFF600)) + struct AGBPrintStruct { u16 m_nRequest; @@ -26,6 +33,8 @@ typedef void (*LPFN_PRINT_FLUSH)(void); #ifndef NDEBUG +// AGBPrint print functions +#if (LOG_HANDLER == LOG_HANDLER_AGB_PRINT) void AGBPrintFlush1Block(void); void AGBPrintInit(void) @@ -87,7 +96,15 @@ void AGBPrintf(const char *pBuf, ...) char bufPrint[0x100]; va_list vArgv; va_start(vArgv, pBuf); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) vsprintf(bufPrint, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #else + #error "unspecified pretty printing handler." + #endif va_end(vArgv); AGBPrint(bufPrint); } @@ -155,9 +172,10 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP AGBPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s] \n", pFile, nLine, pExpression); } } +#endif -// no$gba print functions, uncomment to use -/* +// no$gba print functions +#if (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT) void NoCashGBAPrint(const char *pBuf) { *(volatile u32 *)NOCASHGBAPRINTADDR2 = (u32)pBuf; @@ -168,10 +186,79 @@ void NoCashGBAPrintf(const char *pBuf, ...) char bufPrint[0x100]; va_list vArgv; va_start(vArgv, pBuf); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) vsprintf(bufPrint, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #else + #error "unspecified pretty printing handler." + #endif va_end(vArgv); NoCashGBAPrint(bufPrint); } -*/ + +void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram) +{ + if (nStopProgram) + { + NoCashGBAPrintf("ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + asm(".hword 0xEFFF"); + } + else + { + NoCashGBAPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + } +} +#endif + +// mgba print functions +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) +#define MGBA_REG_DEBUG_MAX (256) + +bool32 MgbaOpen(void) +{ + *REG_DEBUG_ENABLE = 0xC0DE; + return *REG_DEBUG_ENABLE == 0x1DEA; +} + +void MgbaClose(void) +{ + *REG_DEBUG_ENABLE = 0; +} + +void MgbaPrintf(s32 level, const char* ptr, ...) +{ + va_list args; + + level &= 0x7; + va_start(args, ptr); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) + vsprintf(REG_DEBUG_STRING, ptr, args); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args); + #else + #error "unspecified pretty printing handler." + #endif + va_end(args); + *REG_DEBUG_FLAGS = level | 0x100; +} + +void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram) +{ + if (nStopProgram) + { + MgbaPrintf(MGBA_LOG_ERROR, "ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + asm(".hword 0xEFFF"); + } + else + { + MgbaPrintf(MGBA_LOG_WARN, "WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + } +} +#endif #endif diff --git a/src/item_menu.c b/src/item_menu.c index 95a541b1c..1f7530d06 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -563,16 +563,16 @@ static bool8 DoLoadBagGraphics(void) { case 0: ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(1, gUnknown_8E830CC, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, gBagBg_Gfx, 0, 0, 0); sBagMenuDisplay->data[0]++; break; case 1: if (FreeTempTileDataBuffersIfPossible() != TRUE) { if (gBagMenuState.location != ITEMMENULOCATION_ITEMPC) - LZDecompressWram(gUnknown_8E832C0, sBagBgTilemapBuffer); + LZDecompressWram(gBagBg_Tilemap, sBagBgTilemapBuffer); else - LZDecompressWram(gUnknown_8E83444, sBagBgTilemapBuffer); + LZDecompressWram(gBagBg_ItemPC_Tilemap, sBagBgTilemapBuffer); sBagMenuDisplay->data[0]++; } break; diff --git a/src/item_use.c b/src/item_use.c index 3602a957d..f42eb81f7 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -917,7 +917,7 @@ void ItemUse_SetQuestLogEvent(u8 eventId, struct Pokemon *pokemon, u16 itemId, u data->itemId = itemId; data->itemParam = param; if (pokemon != NULL) - data->species = GetMonData(pokemon, MON_DATA_SPECIES2); + data->species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG); else data->species = 0xFFFF; SetQuestLogEvent(eventId, (void *)data); diff --git a/src/itemfinder.c b/src/itemfinder.c index 551d0d53b..deaa02661 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -242,8 +242,8 @@ static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem) { s16 *data = gTasks[taskId].data; gSpecialVar_0x8004 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_FLAG); - gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ID); - gSpecialVar_0x8006 = 1; + gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ITEM); + gSpecialVar_0x8006 = 1; // Quantity. The 'HIDDEN_ITEM_QUANTITY' data is ignored for underfoot items TV_PrintIntToStringVar(0, gSpecialVar_0x8005); tHiddenItemFound = TRUE; tItemX = 0; @@ -287,7 +287,7 @@ static void SetNormalHiddenItem(u8 taskId) static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y) { u8 bgEventCount = events->bgEventCount; - struct BgEvent * bgEvents = events->bgEvents; + const struct BgEvent * bgEvents = events->bgEvents; u16 eventFlag; int i; @@ -309,7 +309,7 @@ static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y) return FALSE; } -static bool8 HiddenItemInConnectedMapAtPos(struct MapConnection * connection, s32 x, s32 y) +static bool8 HiddenItemInConnectedMapAtPos(const struct MapConnection * connection, s32 x, s32 y) { const struct MapHeader * mapHeader; u16 localX, localY; @@ -372,7 +372,7 @@ static void FindHiddenItemsInConnectedMaps(u8 taskId) || var2 > curY || curY >= height) { - struct MapConnection * conn = GetMapConnectionAtPos(curX, curY); + const struct MapConnection * conn = GetMapConnectionAtPos(curX, curY); if (conn != NULL && HiddenItemInConnectedMapAtPos(conn, curX, curY) == TRUE) RegisterHiddenItemRelativeCoordsIfCloser(taskId, curX - x, curY - y); } diff --git a/src/learn_move.c b/src/learn_move.c index 098f90ea0..7c4f163f4 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -400,9 +400,9 @@ static void MoveRelearnerLoadBgGfx(void) SetBgTilemapBuffer(1, sMoveRelearner->bg1TilemapBuffer); LoadUserWindowGfx(0, 1, 0xE0); ListMenuLoadStdPalAt(0xD0, 1); - LoadPalette(gUnknown_8E97DDC, 0x00, 0x20); - DecompressAndLoadBgGfxUsingHeap(1, gUnknown_8E97DFC, 0, 0, 0); - CopyToBgTilemapBuffer(1, gUnknown_8E97EC4, 0, 0); + LoadPalette(gMoveRelearner_Pal, 0x00, 0x20); + DecompressAndLoadBgGfxUsingHeap(1, gMoveRelearner_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(1, gMoveRelearner_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); SetGpuReg(REG_OFFSET_BG0VOFS, 0); SetGpuReg(REG_OFFSET_BG0HOFS, 0); diff --git a/src/load_save.c b/src/load_save.c index 49c2cec88..4d33ceeb8 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -3,6 +3,7 @@ #include "gba/flash_internal.h" #include "load_save.h" #include "pokemon.h" +#include "pokemon_storage_system.h" #include "random.h" #include "item.h" #include "save_location.h" diff --git a/src/main.c b/src/main.c index 055debc08..6a1679f80 100644 --- a/src/main.c +++ b/src/main.c @@ -70,12 +70,9 @@ u8 gPcmDmaCounter; // These variables are not defined in RS or Emerald, and are never read. // They were likely used to debug the audio engine and VCount interrupt. -// Define NDEBUG in include/config.h to remove these variables. -#ifndef NDEBUG u8 sVcountAfterSound; u8 sVcountAtIntr; u8 sVcountBeforeSound; -#endif static IntrFunc * const sTimerIntrFunc = gIntrTable + 0x7; @@ -146,7 +143,13 @@ void AgbMain() SetNotInSaveFailedScreen(); +#ifndef NDEBUG +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) + (void) MgbaOpen(); +#elif (LOG_HANDLER == LOG_HANDLER_AGB_PRINT) AGBPrintInit(); +#endif +#endif #if REVISION == 1 if (gFlashMemoryPresent != TRUE) diff --git a/src/main_menu.c b/src/main_menu.c index bf772d0d7..ccacbe574 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -120,8 +120,8 @@ static const struct WindowTemplate sWindowTemplate[] = { [MAIN_MENU_WINDOW_COUNT] = DUMMY_WIN_TEMPLATE }; -static const u16 sBgPal00[] = INCBIN_U16("graphics/main_menu/unk_8234648.gbapal"); -static const u16 sBgPal15[] = INCBIN_U16("graphics/main_menu/unk_8234668.gbapal"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/main_menu/bg.gbapal"); +static const u16 sTextbox_Pal[] = INCBIN_U16("graphics/main_menu/textbox.gbapal"); static const u8 sTextColor1[] = { 10, 11, 12 }; @@ -196,8 +196,8 @@ static bool32 MainMenuGpuInit(u8 a0) ChangeBgY(2, 0, 0); InitWindows(sWindowTemplate); DeactivateAllTextPrinters(); - LoadPalette(sBgPal00, 0x00, 0x20); - LoadPalette(sBgPal15, 0xF0, 0x20); + LoadPalette(sBg_Pal, 0x00, 0x20); + LoadPalette(sTextbox_Pal, 0xF0, 0x20); SetGpuReg(REG_OFFSET_WIN0H, 0); SetGpuReg(REG_OFFSET_WIN0V, 0); SetGpuReg(REG_OFFSET_WININ, 0); diff --git a/src/mini_printf.c b/src/mini_printf.c new file mode 100644 index 000000000..1d9b0dffc --- /dev/null +++ b/src/mini_printf.c @@ -0,0 +1,355 @@ +/* + * The Minimal snprintf() implementation + * + * Copyright (c) 2013,2014 Michal Ludvig + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the auhor nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * mini-printf courtesy of https://github.com/mludvig/mini-printf + * stripped to reduce file size for agb needs + */ + +#include "mini_printf.h" +#include "gba/types.h" +#include "gba/defines.h" +#include "config.h" +#include "characters.h" +#include "string_util.h" + +#ifndef NDEBUG +#if (PRETTY_PRINT_HANDLER != PRETTY_PRINT_OFF) + +struct mini_buff +{ + char *buffer, *pbuffer; + u32 buffer_len; +}; + +static inline char mini_pchar_decode(char encoded) +{ + char ret = '?'; + if (encoded >= CHAR_a && encoded <= CHAR_z) + ret = encoded-(CHAR_a-'a'); // lower-case characters + else if (encoded >= CHAR_A && encoded <= CHAR_Z) + ret = encoded-(CHAR_A-'A'); // upper-case characters + else if (encoded >= CHAR_0 && encoded <= CHAR_9) + ret = encoded-(CHAR_0-'0'); // numbers + else if (encoded == CHAR_SPACE) + ret = ' '; // space + else if (encoded == CHAR_EXCL_MARK) + ret = '!'; // exclamation point + else if (encoded == CHAR_QUESTION_MARK) + ret = '?'; // question mark + else if (encoded == CHAR_PERIOD) + ret = '.'; // period + else if (encoded == CHAR_DBL_QUOTE_LEFT || encoded == CHAR_DBL_QUOTE_RIGHT) + ret = '"'; // double quote + else if (encoded == CHAR_SGL_QUOTE_LEFT || encoded == CHAR_SGL_QUOTE_RIGHT) + ret = '\''; // single quote + else if (encoded == CHAR_CURRENCY) + ret = '$'; // currency mark (pokemonies in game, dollar sign in logs) + else if (encoded == CHAR_COMMA) + ret = ','; // comma + else if (encoded == CHAR_MULT_SIGN) + ret = '#'; // pound, hashtag, octothorpe, whatever + else if (encoded == CHAR_SLASH) + ret = '/'; // slash + else if (encoded == CHAR_LESS_THAN) + ret = '<'; // less than sign + else if (encoded == CHAR_GREATER_THAN) + ret = '>'; // greater than sign + else if (encoded == CHAR_PERCENT) + ret = '%'; // percentage + else if (encoded == CHAR_LEFT_PAREN) + ret = '('; // opening parentheses + else if (encoded == CHAR_RIGHT_PAREN) + ret = ')'; // closing parentheses + return ret; +} + +static s32 _putsAscii(char *s, s32 len, void *buf) +{ + char *p0; + s32 i; + struct mini_buff *b; + + if (!buf) + return len; + + b = buf; + p0 = b->buffer; + + /* Copy to buffer */ + for (i = 0; i < len; i++) { + if(b->pbuffer == b->buffer + b->buffer_len - 1) { + break; + } + *(b->pbuffer ++) = s[i]; + } + *(b->pbuffer) = 0; + return b->pbuffer - p0; +} + +static s32 _putsEncoded(char *s, s32 len, void *buf) +{ + char *p0; + s32 i; + struct mini_buff *b; + + if (!buf) + return len; + + b = buf; + p0 = b->buffer; + + /* Copy to buffer */ + for (i = 0; i < len; i++) { + if(b->pbuffer == b->buffer + b->buffer_len - 1) { + break; + } + *(b->pbuffer ++) = mini_pchar_decode(s[i]); + } + *(b->pbuffer) = 0; + return b->pbuffer - p0; +} + +static s32 mini_strlen(const char *s) +{ + s32 len = 0; + while (s[len] != '\0') len++; + return len; +} + +static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) +{ + char *pbuffer = buffer; + s32 negative = 0; + s32 i, len; + + /* No support for unusual radixes. */ + if (radix > 16) + return 0; + + if (value < 0 && !unsig) + { + negative = 1; + value = -value; + } + + /* This builds the string back to front ... */ + do + { + s32 digit = value % radix; + *(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10); + value /= radix; + } while (value > 0); + + if (negative) + *(pbuffer++) = '-'; + + *(pbuffer) = '\0'; + + /* ... now we reverse it (could do it recursively but will + * conserve the stack space) */ + len = (pbuffer - buffer); + for (i = 0; i < len / 2; i++) + { + char j = buffer[i]; + buffer[i] = buffer[len-i-1]; + buffer[len-i-1] = j; + } + + return len; +} + +static s32 mini_pad(char* ptr, s32 len, char pad_char, s32 pad_to, char *buffer) +{ + s32 i; + bool32 overflow = FALSE; + char * pbuffer = buffer; + if(pad_to == 0) + pad_to = len; + if (len > pad_to) { + len = pad_to; + overflow = TRUE; + } + for(i = pad_to - len; i > 0; i --) + { + *(pbuffer++) = pad_char; + } + for(i = len; i > 0; i --) + { + *(pbuffer++) = *(ptr++); + } + len = pbuffer - buffer; + if(overflow) + { + for (i = 0; i < 3 && pbuffer > buffer; i ++) + { + *(pbuffer-- - 1) = '*'; + } + } + return len; +} + +s32 mini_vsnprintf(char *buffer, u32 buffer_len, const char *fmt, va_list va) +{ + struct mini_buff b; + s32 n; + b.buffer = buffer; + b.pbuffer = buffer; + b.buffer_len = buffer_len; + if (buffer_len == 0) + buffer = NULL; + n = mini_vpprintf((buffer != NULL) ? &b : NULL, fmt, va); + if (buffer == NULL) + return n; + return b.pbuffer - b.buffer; +} + +s32 mini_vpprintf(void* buf, const char *fmt, va_list va) +{ + char bf[24]; + char bf2[24]; + char ch; + s32 n; + n = 0; + while ((ch=*(fmt++))) + { + s32 len; + if (ch != '%') + { + len = 1; + len = _putsAscii(&ch, len, buf); + } else + { + char pad_char = ' '; + s32 pad_to = 0; + char l = 0; + char *ptr; + + ch=*(fmt++); + + /* Zero padding requested */ + if (ch == '0') + pad_char = '0'; + while (ch >= '0' && ch <= '9') + { + pad_to = pad_to * 10 + (ch - '0'); + ch= *(fmt++); + } + if(pad_to > (s32) sizeof(bf)) + { + pad_to = sizeof(bf); + } + if (ch == 'l') + { + l = 1; + ch=*(fmt++); + } + + switch (ch) + { + case 0: + goto end; + case 'u': + case 'd': + if(l) + { + len = mini_itoa(va_arg(va, u32), 10, 0, (ch=='u'), bf2); + } else + { + if(ch == 'u') + { + len = mini_itoa((u32) va_arg(va, u32), 10, 0, 1, bf2); + } + else + { + len = mini_itoa((s32) va_arg(va, s32), 10, 0, 0, bf2); + } + } + len = mini_pad(bf2, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 'x': + case 'X': + if(l) + { + len = mini_itoa(va_arg(va, u32), 16, (ch=='X'), 1, bf2); + } + else + { + len = mini_itoa((u32) va_arg(va, u32), 16, (ch=='X'), 1, bf2); + } + len = mini_pad(bf2, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 'c' : + ch = (char)(va_arg(va, s32)); + len = mini_pad(&ch, 1, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 's' : + ptr = va_arg(va, char*); + len = mini_strlen(ptr); + if (pad_to > 0) + { + len = mini_pad(ptr, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + } else + { + len = _putsAscii(ptr, len, buf); + } + break; + case 'S' : // preproc encoded string handler + ptr = va_arg(va, char*); + len = StringLength(ptr); + if (pad_to > 0) + { + len = mini_pad(ptr, len, pad_char, pad_to, bf); + len = _putsEncoded(bf, len, buf); + } else + { + len = _putsEncoded(ptr, len, buf); + } + break; + default: + len = 1; + len = _putsAscii(&ch, len, buf); + break; + } + } + n = n + len; + } +end: + return n; +} + +#endif +#endif diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index b7495c328..e6fd9705c 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -210,8 +210,8 @@ static void SpriteCB_Start(struct Sprite *sprite) } } -static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.gbapal"); -static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.4bpp.lz"); +static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.gbapal"); +static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.4bpp.lz"); static void Load321StartGfx(u16 tilesTag, u16 palTag) { diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index edcbdb722..d50c09484 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -242,7 +242,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) void *mailPtr = (void *)(data + sizeof(struct Pokemon)); pokemon = *(struct Pokemon *)pokemonPtr; - species = GetMonData(&pokemon, MON_DATA_SPECIES2); + species = GetMonData(&pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) StringCopyN(gStringVar1, gText_EggNickname, POKEMON_NAME_LENGTH + 1); diff --git a/src/oak_speech.c b/src/oak_speech.c index d5b2ba7ba..4d2e4ccb8 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -722,7 +722,7 @@ static void Task_NewGameScene(u8 taskId) break; case 1: sOakSpeechResources = AllocZeroed(sizeof(*sOakSpeechResources)); - OakSpeechNidoranFSetup(1, TRUE); + CreateMonSpritesGfxManager(1, 1); break; case 2: SetGpuReg(REG_OFFSET_WIN0H, 0); @@ -1775,7 +1775,7 @@ static void Task_OakSpeech_WaitForFade(u8 taskId) static void Task_OakSpeech_FreeResources(u8 taskId) { FreeAllWindowBuffers(); - OakSpeechNidoranFFreeResources(); + DestroyMonSpritesGfxManager(); Free(sOakSpeechResources); sOakSpeechResources = NULL; gTextFlags.canABSpeedUpPrint = FALSE; @@ -1876,7 +1876,7 @@ static void CreateNidoranFSprite(u8 taskId) { u8 spriteId; - DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], OakSpeechNidoranFGetBuffer(0), SPECIES_NIDORAN_F); + DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], MonSpritesGfxManager_GetSpritePtr(0), SPECIES_NIDORAN_F); LoadCompressedSpritePaletteUsingHeap(&gMonPaletteTable[SPECIES_NIDORAN_F]); SetMultiuseSpriteTemplateToPokemon(SPECIES_NIDORAN_F, 0); spriteId = CreateSprite(&gMultiuseSpriteTemplate, 96, 96, 1); diff --git a/src/option_menu.c b/src/option_menu.c index 7921a1212..9a70614aa 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -130,7 +130,7 @@ static const struct BgTemplate sOptionMenuBgTemplates[] = }, }; -static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/unk_83cc2e4.gbapal"); +static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/option_menu.gbapal"); static const u16 sOptionMenuItemCounts[MENUITEM_COUNT] = {3, 2, 2, 2, 3, 10, 0}; static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] = diff --git a/src/party_menu.c b/src/party_menu.c index a212e79fc..a62fe442e 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -110,7 +110,7 @@ enum struct PartyMenuBoxInfoRects { - void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); + void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); u8 dimensions[24]; u8 descTextLeft; u8 descTextTop; @@ -145,8 +145,8 @@ struct PartyMenuBox u8 statusSpriteId; }; -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); static void CursorCB_Summary(u8 taskId); static void CursorCB_Switch(u8 taskId); static void CursorCB_Cancel1(u8 taskId); @@ -2184,35 +2184,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *tileNums, u8 menuBoxW } } -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 10; height = 7; } - if (!isEgg) - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height); + if (!hideHP) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 18; height = 3; } - if (!isEgg) - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height); + if (!hideHP) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height); } static void DrawEmptySlot(u8 windowId) { - BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3); } #define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ @@ -2652,7 +2652,7 @@ static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *m // If in a multi battle, show partners Deoxys icon as Normal forme if (IsMultiBattle() == TRUE && gMain.inBattle) handleDeoxys = (sMultiBattlePartnersPartyMask[slot] ^ handleDeoxys) ? TRUE : FALSE; - species2 = GetMonData(mon, MON_DATA_SPECIES2); + species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, handleDeoxys); UpdatePartyMonHPBar(menuBox->monSpriteId, mon); } @@ -3357,8 +3357,8 @@ static void SetSwitchedPartyOrderQuestLogEvent(void) { struct QuestLogEvent_SwitchedPartyOrder * data = Alloc(sizeof(*data)); - data->species1 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); - data->species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES2); + data->species1 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); + data->species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES_OR_EGG); SetQuestLogEvent(QL_EVENT_SWITCHED_PARTY_ORDER, (const u16 *)data); Free(data); } @@ -3847,11 +3847,11 @@ static void CursorCB_Store(u8 taskId) // Register mon for the Trading Board in Union Room static void CursorCB_Register(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); - switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal)) + switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter)) { case CANT_REGISTER_MON: StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow); @@ -3874,10 +3874,10 @@ static void CursorCB_Register(u8 taskId) static void CursorCB_Trade1(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); - u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); + u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter); if (stringId != UR_TRADE_MSG_NONE) { @@ -4133,7 +4133,7 @@ static void SetSwappedHeldItemQuestLogEvent(struct Pokemon *mon, u16 item, u16 i { struct QuestLogEvent_SwappedHeldItem *data = Alloc(sizeof(*data)); - data->species = GetMonData(mon, MON_DATA_SPECIES2); + data->species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); data->takenItemId = item; data->givenItemId = item2; if (gPartyMenu.action == PARTY_ACTION_GIVE_PC_ITEM) @@ -4147,7 +4147,7 @@ static void SetUsedFieldMoveQuestLogEvent(struct Pokemon *mon, u8 fieldMove) { struct QuestLogEvent_FieldMove *data = Alloc(sizeof(*data)); - data->species = GetMonData(mon, MON_DATA_SPECIES2); + data->species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); data->fieldMove = fieldMove; switch (data->fieldMove) { @@ -4181,7 +4181,7 @@ void SetUsedFlyQuestLogEvent(const u8 *healLocCtrlData) Free(map); data = Alloc(sizeof(*data)); - data->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES2); + data->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES_OR_EGG); data->fieldMove = FIELD_MOVE_FLY; data->mapSec = mapHeader->regionMapSectionId; SetQuestLogEvent(QL_EVENT_USED_FIELD_MOVE, (const u16 *)data); @@ -5336,7 +5336,7 @@ u8 GetItemEffectType(u16 item) itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect; else itemEffect = gItemEffectTable[item - ITEM_POTION]; - if ((itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_MIST)) + if ((itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_GUARD_SPEC)) return ITEM_EFFECT_X_ITEM; else if (itemEffect[0] & ITEM0_SACRED_ASH) return ITEM_EFFECT_SACRED_ASH; diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 6a3f5d884..53a6485d8 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -1555,10 +1555,10 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y) if (caught) { BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y); - type1 = gBaseStats[species].type1; + type1 = gSpeciesInfo[species].types[0]; BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y); - if (type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gBaseStats[species].type2 + 1, 0x98, y); + if (type1 != gSpeciesInfo[species].types[1]) + BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gSpeciesInfo[species].types[1] + 1, 0x98, y); } } @@ -3091,9 +3091,9 @@ u8 DexScreen_DrawMonAreaPage(void) if (monIsCaught) { - BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type1, 0, 1); - if (gBaseStats[species].type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type2, 32, 1); + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[0], 0, 1); + if (gSpeciesInfo[species].types[0] != gSpeciesInfo[species].types[1]) + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[1], 32, 1); } PutWindowTilemap(sPokedexScreenData->windowIds[12]); CopyWindowToVram(sPokedexScreenData->windowIds[12], COPYWIN_GFX); diff --git a/src/pokemon.c b/src/pokemon.c index 172f51ad5..330ae3dea 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -23,6 +23,7 @@ #include "overworld.h" #include "party_menu.h" #include "field_specials.h" +#include "berry.h" #include "constants/items.h" #include "constants/item_effects.h" #include "constants/hoenn_cries.h" @@ -40,16 +41,16 @@ #define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name #define HOENN_TO_NATIONAL(name) [HOENN_DEX_##name - 1] = NATIONAL_DEX_##name -struct OakSpeechNidoranFStruct +struct MonSpritesGfxManager { - u8 spriteCount:4; + u8 numSprites:4; u8 battlePosition:4; - u8 frameCount; - u8 enable; - bool8 enable2; - u32 sizePerSprite; - u8 *dataBuffer; - u8 **bufferPtrs; + u8 numFrames; + u8 active; + u8 mode; + u32 dataSize; + u8 *spriteBuffer; + u8 **spritePointers; struct SpriteTemplate *templates; struct SpriteFrameImage *frameImages; }; @@ -60,7 +61,7 @@ EWRAM_DATA u8 gEnemyPartyCount = 0; EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {}; EWRAM_DATA struct Pokemon gPlayerParty[PARTY_SIZE] = {}; EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; -static EWRAM_DATA struct OakSpeechNidoranFStruct *sOakSpeechNidoranResources = NULL; +static EWRAM_DATA struct MonSpritesGfxManager *sMonSpritesGfxManager = NULL; static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId); @@ -98,7 +99,8 @@ static const struct CombinedMove sCombinedMoves[2] = // NOTE: The order of the elements in the 3 arrays below is irrelevant. // To reorder the pokedex, see the values in include/constants/pokedex.h. -static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) + // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) +static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_HOENN(BULBASAUR), SPECIES_TO_HOENN(IVYSAUR), @@ -513,7 +515,8 @@ static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoe SPECIES_TO_HOENN(CHIMECHO), }; -static const u16 sSpeciesToNationalPokedexNum[] = // Assigns all species to the National Dex Index (Summary No. for National Dex) + // Assigns all species to the National Dex Index (Summary No. for National Dex) +static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_NATIONAL(BULBASAUR), SPECIES_TO_NATIONAL(IVYSAUR), @@ -928,7 +931,8 @@ static const u16 sSpeciesToNationalPokedexNum[] = // Assigns all species to the SPECIES_TO_NATIONAL(CHIMECHO), }; -static const u16 sHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index) +// Assigns all Hoenn Dex Indexes to a National Dex Index +static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = { HOENN_TO_NATIONAL(TREECKO), HOENN_TO_NATIONAL(GROVYLE), @@ -1345,54 +1349,53 @@ static const u16 sHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using static const struct SpindaSpot sSpindaSpotGraphics[] = { - {16, 7, INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, - {40, 8, INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, - {22, 25, INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, - {34, 26, INCBIN_U16("graphics/spinda_spots/spot_3.bin")} + {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, + {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, + {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, + {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.bin")} }; #include "data/pokemon/item_effects.h" -static const s8 sNatureStatTable[][5] = -{ - // Atk Def Spd Sp.Atk Sp.Def - { 0, 0, 0, 0, 0}, // Hardy - { +1, -1, 0, 0, 0}, // Lonely - { +1, 0, -1, 0, 0}, // Brave - { +1, 0, 0, -1, 0}, // Adamant - { +1, 0, 0, 0, -1}, // Naughty - { -1, +1, 0, 0, 0}, // Bold - { 0, 0, 0, 0, 0}, // Docile - { 0, +1, -1, 0, 0}, // Relaxed - { 0, +1, 0, -1, 0}, // Impish - { 0, +1, 0, 0, -1}, // Lax - { -1, 0, +1, 0, 0}, // Timid - { 0, -1, +1, 0, 0}, // Hasty - { 0, 0, 0, 0, 0}, // Serious - { 0, 0, +1, -1, 0}, // Jolly - { 0, 0, +1, 0, -1}, // Naive - { -1, 0, 0, +1, 0}, // Modest - { 0, -1, 0, +1, 0}, // Mild - { 0, 0, -1, +1, 0}, // Quiet - { 0, 0, 0, 0, 0}, // Bashful - { 0, 0, 0, +1, -1}, // Rash - { -1, 0, 0, 0, +1}, // Calm - { 0, -1, 0, 0, +1}, // Gentle - { 0, 0, -1, 0, +1}, // Sassy - { 0, 0, 0, -1, +1}, // Careful - { 0, 0, 0, 0, 0}, // Quirky +static const s8 sNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = +{ // Attack Defense Speed Sp.Atk Sp.Def + [NATURE_HARDY] = { 0, 0, 0, 0, 0 }, + [NATURE_LONELY] = { +1, -1, 0, 0, 0 }, + [NATURE_BRAVE] = { +1, 0, -1, 0, 0 }, + [NATURE_ADAMANT] = { +1, 0, 0, -1, 0 }, + [NATURE_NAUGHTY] = { +1, 0, 0, 0, -1 }, + [NATURE_BOLD] = { -1, +1, 0, 0, 0 }, + [NATURE_DOCILE] = { 0, 0, 0, 0, 0 }, + [NATURE_RELAXED] = { 0, +1, -1, 0, 0 }, + [NATURE_IMPISH] = { 0, +1, 0, -1, 0 }, + [NATURE_LAX] = { 0, +1, 0, 0, -1 }, + [NATURE_TIMID] = { -1, 0, +1, 0, 0 }, + [NATURE_HASTY] = { 0, -1, +1, 0, 0 }, + [NATURE_SERIOUS] = { 0, 0, 0, 0, 0 }, + [NATURE_JOLLY] = { 0, 0, +1, -1, 0 }, + [NATURE_NAIVE] = { 0, 0, +1, 0, -1 }, + [NATURE_MODEST] = { -1, 0, 0, +1, 0 }, + [NATURE_MILD] = { 0, -1, 0, +1, 0 }, + [NATURE_QUIET] = { 0, 0, -1, +1, 0 }, + [NATURE_BASHFUL] = { 0, 0, 0, 0, 0 }, + [NATURE_RASH] = { 0, 0, 0, +1, -1 }, + [NATURE_CALM] = { -1, 0, 0, 0, +1 }, + [NATURE_GENTLE] = { 0, -1, 0, 0, +1 }, + [NATURE_SASSY] = { 0, 0, -1, 0, +1 }, + [NATURE_CAREFUL] = { 0, 0, 0, -1, +1 }, + [NATURE_QUIRKY] = { 0, 0, 0, 0, 0 }, }; #include "data/pokemon/tmhm_learnsets.h" #include "data/pokemon/trainer_class_lookups.h" #include "data/pokemon/cry_ids.h" #include "data/pokemon/experience_tables.h" -#include "data/pokemon/base_stats.h" +#include "data/pokemon/species_info.h" #include "data/pokemon/level_up_learnsets.h" #include "data/pokemon/evolution.h" #include "data/pokemon/level_up_learnset_pointers.h" -static const s8 sPokeblockFlavorCompatibilityTable[] = +static const s8 sPokeblockFlavorCompatibilityTable[NUM_NATURES * FLAVOR_COUNT] = { // Cool, Beauty, Cute, Smart, Tough 0, 0, 0, 0, 0, // Hardy @@ -1422,32 +1425,38 @@ static const s8 sPokeblockFlavorCompatibilityTable[] = 0, 0, 0, 0, 0 // Quirky }; -const u8 gPPUpGetMask[] = { 0x03, 0x0c, 0x30, 0xc0 }; // Masks for getting PP Up count, also PP Max values +#define PP_UP_SHIFTS(val) val, (val) << 2, (val) << 4, (val) << 6 +#define PP_UP_SHIFTS_INV(val) (u8)~(val), (u8)~((val) << 2), (u8)~((val) << 4), (u8)~((val) << 6) -const u8 gPPUpSetMask[] = { 0xfc, 0xf3, 0xcf, 0x3f }; // Masks for setting PP Up count +// PP Up bonuses are stored for a Pokémon as a single byte. +// There are 2 bits (a value 0-3) for each move slot that +// represent how many PP Ups have been applied. +// The following arrays take a move slot id and return: +// gPPUpGetMask - A mask to get the number of PP Ups applied to that move slot +// gPPUpClearMask - A mask to clear the number of PP Ups applied to that move slot +// gPPUpAddValues - A value to add to the PP Bonuses byte to apply 1 PP Up to that move slot +const u8 gPPUpGetMask[MAX_MON_MOVES] = {PP_UP_SHIFTS(3)}; +const u8 gPPUpClearMask[MAX_MON_MOVES] = {PP_UP_SHIFTS_INV(3)}; +const u8 gPPUpAddValues[MAX_MON_MOVES] = {PP_UP_SHIFTS(1)}; -const u8 gPPUpAddMask[] = { 0x01, 0x04, 0x10, 0x40 }; // Values added to PP Up count - -const u8 gStatStageRatios[][2] = +const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2] = { - { 10, 40 }, - { 10, 35 }, - { 10, 30 }, - { 10, 25 }, - { 10, 20 }, - { 10, 15 }, - { 10, 10 }, - { 15, 10 }, - { 20, 10 }, - { 25, 10 }, - { 30, 10 }, - { 35, 10 }, - { 40, 10 }, - { 138, 174 }, - { 108, 120 }, + {10, 40}, // -6, MIN_STAT_STAGE + {10, 35}, // -5 + {10, 30}, // -4 + {10, 25}, // -3 + {10, 20}, // -2 + {10, 15}, // -1 + {10, 10}, // 0, DEFAULT_STAT_STAGE + {15, 10}, // +1 + {20, 10}, // +2 + {25, 10}, // +3 + {30, 10}, // +4 + {35, 10}, // +5 + {40, 10}, // +6, MAX_STAT_STAGE }; -static const u8 sFiller = _(""); +static const u8 sText_GameFreak[] = _("ゲーフリ"); static const u8 sHoldEffectToType[][2] = { @@ -1470,7 +1479,7 @@ static const u8 sHoldEffectToType[][2] = {HOLD_EFFECT_NORMAL_POWER, TYPE_NORMAL}, }; -const struct SpriteTemplate gSpriteTemplates_Battlers[] = +const struct SpriteTemplate gSpriteTemplates_Battlers[MAX_BATTLERS_COUNT] = { [B_POSITION_PLAYER_LEFT] = { .tileTag = TAG_NONE, @@ -1569,7 +1578,8 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = }; // Classes dummied out -static const u8 sSecretBaseFacilityClasses[][5] = +#define NUM_SECRET_BASE_CLASSES 5 +static const u8 sSecretBaseFacilityClasses[GENDER_COUNT][NUM_SECRET_BASE_CLASSES] = { [MALE] = { FACILITY_CLASS_YOUNGSTER, @@ -1597,11 +1607,14 @@ static const u8 sGetMonDataEVConstants[] = MON_DATA_SPATK_EV }; +// For stat-raising items static const u8 sStatsToRaise[] = { STAT_ATK, STAT_ATK, STAT_SPEED, STAT_DEF, STAT_SPATK, STAT_ACC }; +// 3 modifiers each for how much to change friendship for different ranges +// 0-99, 100-199, 200+ static const s8 sFriendshipEventDeltas[][3] = { [FRIENDSHIP_EVENT_GROW_LEVEL] = { 5, 3, 2 }, @@ -1616,31 +1629,35 @@ static const s8 sFriendshipEventDeltas[][3] = [FRIENDSHIP_EVENT_FAINT_LARGE] = {-5, -5, -10 }, }; +#define HM_MOVES_END 0xFFFF + static const u16 sHMMoves[] = { MOVE_CUT, MOVE_FLY, MOVE_SURF, MOVE_STRENGTH, MOVE_FLASH, - MOVE_ROCK_SMASH, MOVE_WATERFALL, MOVE_DIVE, 0xFFFF + MOVE_ROCK_SMASH, MOVE_WATERFALL, MOVE_DIVE, HM_MOVES_END }; #if defined(FIRERED) +// Attack forme static const u16 sDeoxysBaseStats[] = { - 50, // Hp - 180, // Attack - 20, // Defense - 150, // Speed - 180, // Sp.Attack - 20, // Sp.Defense + [STAT_HP] = 50, + [STAT_ATK] = 180, + [STAT_DEF] = 20, + [STAT_SPEED] = 150, + [STAT_SPATK] = 180, + [STAT_SPDEF] = 20, }; #elif defined(LEAFGREEN) +// Defense forme static const u16 sDeoxysBaseStats[] = { - 50, // Hp - 70, // Attack - 160, // Defense - 90, // Speed - 70, // Sp.Attack - 160, // Sp.Defense + [STAT_HP] = 50, + [STAT_ATK] = 70, + [STAT_DEF] = 160, + [STAT_SPEED] = 90, + [STAT_SPATK] = 70, + [STAT_SPDEF] = 160, }; #endif @@ -1668,34 +1685,33 @@ const u16 gUnionRoomFacilityClasses[NUM_UNION_ROOM_CLASSES * GENDER_COUNT] = FACILITY_CLASS_BEAUTY, }; -static const struct OamData sOakSpeechNidoranFDummyOamData = +static const struct OamData sOamData_64x64 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, - .objMode = 0, + .objMode = ST_OAM_OBJ_NORMAL, .mosaic = FALSE, - .bpp = 0, - .shape = 0, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, }; -static const struct SpriteTemplate sOakSpeechNidoranFDummyTemplate = +static const struct SpriteTemplate sSpriteTemplate_64x64 = { .tileTag = TAG_NONE, .paletteTag = TAG_NONE, - .oam = &sOakSpeechNidoranFDummyOamData, + .oam = &sOamData_64x64, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -// code void ZeroBoxMonData(struct BoxPokemon *boxMon) { u8 *raw = (u8 *)boxMon; @@ -1718,7 +1734,7 @@ void ZeroMonData(struct Pokemon *mon) SetMonData(mon, MON_DATA_SPEED, &arg); SetMonData(mon, MON_DATA_SPATK, &arg); SetMonData(mon, MON_DATA_SPDEF, &arg); - arg = 255; + arg = MAIL_NONE; SetMonData(mon, MON_DATA_MAIL, &arg); } @@ -1742,7 +1758,7 @@ void CreateMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFix ZeroMonData(mon); CreateBoxMon(&mon->box, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); SetMonData(mon, MON_DATA_LEVEL, &level); - arg = 255; + arg = MAIL_NONE; SetMonData(mon, MON_DATA_MAIL, &arg); CalculateMonStats(mon); } @@ -1770,7 +1786,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, do { value = Random32(); - shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(value, personality); } while (shinyValue < SHINY_ODDS); } else if (otIdType == OT_ID_PRESET) //Pokemon has a preset OT ID @@ -1795,8 +1811,8 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage); SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName); SetBoxMonData(boxMon, MON_DATA_SPECIES, &species); - SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gBaseStats[species].growthRate][level]); - SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gBaseStats[species].friendship); + SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]); + SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].friendship); value = GetCurrentRegionMapSectionId(); SetBoxMonData(boxMon, MON_DATA_MET_LOCATION, &value); SetBoxMonData(boxMon, MON_DATA_MET_LEVEL, &level); @@ -1805,7 +1821,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_POKEBALL, &value); SetBoxMonData(boxMon, MON_DATA_OT_GENDER, &gSaveBlock2Ptr->playerGender); - if (fixedIV < 32) + if (fixedIV < USE_RANDOM_IVS) { SetBoxMonData(boxMon, MON_DATA_HP_IV, &fixedIV); SetBoxMonData(boxMon, MON_DATA_ATK_IV, &fixedIV); @@ -1819,24 +1835,24 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, u32 iv; value = Random(); - iv = value & 0x1F; + iv = value & MAX_IV_MASK; SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv); - iv = (value & 0x3E0) >> 5; + iv = (value & (MAX_IV_MASK << 5)) >> 5; SetBoxMonData(boxMon, MON_DATA_ATK_IV, &iv); - iv = (value & 0x7C00) >> 10; + iv = (value & (MAX_IV_MASK << 10)) >> 10; SetBoxMonData(boxMon, MON_DATA_DEF_IV, &iv); value = Random(); - iv = value & 0x1F; + iv = value & MAX_IV_MASK; SetBoxMonData(boxMon, MON_DATA_SPEED_IV, &iv); - iv = (value & 0x3E0) >> 5; + iv = (value & (MAX_IV_MASK << 5)) >> 5; SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv); - iv = (value & 0x7C00) >> 10; + iv = (value & (MAX_IV_MASK << 10)) >> 10; SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); } - if (gBaseStats[species].abilities[1]) + if (gSpeciesInfo[species].abilities[1]) { value = personality & 1; SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value); @@ -1855,7 +1871,7 @@ void CreateMonWithNature(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, } while (nature != GetNatureFromPersonality(personality)); - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 gender, u8 nature, u8 unownLetter) @@ -1869,7 +1885,7 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, do { personality = Random32(); - actualLetter = ((((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 28); + actualLetter = GET_UNOWN_LETTER(personality); } while (nature != GetNatureFromPersonality(personality) || gender != GetGenderFromSpeciesAndPersonality(species, personality) @@ -1885,7 +1901,7 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, || gender != GetGenderFromSpeciesAndPersonality(species, personality)); } - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } // Used to create the Old Man's Weedle? @@ -1900,25 +1916,25 @@ void CreateMaleMon(struct Pokemon *mon, u16 species, u8 level) personality = Random32(); } while (GetGenderFromSpeciesAndPersonality(species, personality) != MON_MALE); - CreateMon(mon, species, level, 32, 1, personality, OT_ID_PRESET, otId); + CreateMon(mon, species, level, USE_RANDOM_IVS, TRUE, personality, OT_ID_PRESET, otId); } void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32 ivs, u32 personality) { - CreateMon(mon, species, level, 0, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, 0, TRUE, personality, OT_ID_PLAYER_ID, 0); SetMonData(mon, MON_DATA_IVS, &ivs); CalculateMonStats(mon); } static void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId) { - CreateMon(mon, species, level, 0, 0, 0, OT_ID_PRESET, otId); - SetMonData(mon, MON_DATA_HP_IV, &ivs[0]); - SetMonData(mon, MON_DATA_ATK_IV, &ivs[1]); - SetMonData(mon, MON_DATA_DEF_IV, &ivs[2]); - SetMonData(mon, MON_DATA_SPEED_IV, &ivs[3]); - SetMonData(mon, MON_DATA_SPATK_IV, &ivs[4]); - SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[5]); + CreateMon(mon, species, level, 0, FALSE, 0, OT_ID_PRESET, otId); + SetMonData(mon, MON_DATA_HP_IV, &ivs[STAT_HP]); + SetMonData(mon, MON_DATA_ATK_IV, &ivs[STAT_ATK]); + SetMonData(mon, MON_DATA_DEF_IV, &ivs[STAT_DEF]); + SetMonData(mon, MON_DATA_SPEED_IV, &ivs[STAT_SPEED]); + SetMonData(mon, MON_DATA_SPATK_IV, &ivs[STAT_SPATK]); + SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[STAT_SPDEF]); CalculateMonStats(mon); } @@ -1929,7 +1945,7 @@ void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedI u16 evAmount; u8 evsBits; - CreateMon(mon, species, level, fixedIV, 0, 0, 0, 0); + CreateMon(mon, species, level, fixedIV, FALSE, 0, OT_ID_PLAYER_ID, 0); evsBits = evSpread; @@ -1959,9 +1975,9 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) s32 i; u8 value; - CreateMon(mon, src->species, src->level, 0, 1, src->personality, 1, src->otId); + CreateMon(mon, src->species, src->level, 0, TRUE, src->personality, OT_ID_PRESET, src->otId); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); SetMonData(mon, MON_DATA_PP_BONUSES, &src->ppBonuses); @@ -1971,7 +1987,7 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) /* StringCopy(nickname, src->nickname); - if (nickname[0] == 0xFC && nickname[1] == 0x15) + if (nickname[0] == EXT_CTRL_CODE_BEGIN && nickname[1] == EXT_CTRL_CODE_JPN) language = LANGUAGE_JAPANESE; else language = GAME_LANGUAGE; @@ -2005,12 +2021,12 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) CalculateMonStats(mon); } -static void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) +static void CreateEventMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) { - bool32 isEventLegal = TRUE; + bool32 isModernFatefulEncounter = TRUE; CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); - SetMonData(mon, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(mon, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); } void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest) @@ -2026,7 +2042,7 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP dest->heldItem = heldItem; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) dest->moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); dest->level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -2059,16 +2075,16 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon) union PokemonSubstruct *substruct3 = GetSubstruct(boxMon, boxMon->personality, 3); s32 i; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct0->raw); i++) checksum += substruct0->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct1->raw); i++) checksum += substruct1->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct2->raw); i++) checksum += substruct2->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct3->raw); i++) checksum += substruct3->raw[i]; return checksum; @@ -2076,7 +2092,7 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon) #define CALC_STAT(base, iv, ev, statIndex, field) \ { \ - u8 baseStat = gBaseStats[species].base; \ + u8 baseStat = gSpeciesInfo[species].base; \ s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5; \ u8 nature = GetNature(mon); \ n = ModifyStatByNature(nature, n, statIndex); \ @@ -2111,13 +2127,13 @@ void CalculateMonStats(struct Pokemon *mon) } else { - s32 n = 2 * gBaseStats[species].baseHP + hpIV; + s32 n = 2 * gSpeciesInfo[species].baseHP + hpIV; newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10; } - gBattleScripting.field_23 = newMaxHP - oldMaxHP; - if (gBattleScripting.field_23 == 0) - gBattleScripting.field_23 = 1; + gBattleScripting.levelUpHP = newMaxHP - oldMaxHP; + if (gBattleScripting.levelUpHP == 0) + gBattleScripting.levelUpHP = 1; SetMonData(mon, MON_DATA_MAX_HP, &newMaxHP); @@ -2160,7 +2176,7 @@ void BoxMonToMon(struct BoxPokemon *src, struct Pokemon *dest) SetMonData(dest, MON_DATA_STATUS, &value); SetMonData(dest, MON_DATA_HP, &value); SetMonData(dest, MON_DATA_MAX_HP, &value); - value = 255; + value = MAIL_NONE; SetMonData(dest, MON_DATA_MAIL, &value); CalculateMonStats(dest); } @@ -2171,7 +2187,7 @@ static u8 GetLevelFromMonExp(struct Pokemon *mon) u32 exp = GetMonData(mon, MON_DATA_EXP, NULL); s32 level = 1; - while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp) + while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp) level++; return level - 1; @@ -2183,7 +2199,7 @@ u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon) u32 exp = GetBoxMonData(boxMon, MON_DATA_EXP, NULL); s32 level = 1; - while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp) + while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp) level++; return level - 1; @@ -2197,7 +2213,7 @@ u16 GiveMoveToMon(struct Pokemon *mon, u16 move) static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 existingMove = GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, NULL); if (!existingMove) @@ -2207,16 +2223,16 @@ static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) return move; } if (existingMove == move) - return -2; + return MON_ALREADY_KNOWS_MOVE; } - return -1; + return MON_HAS_MAX_MOVES; } u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (!mon->moves[i]) { @@ -2226,7 +2242,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) } } - return -1; + return MON_HAS_MAX_MOVES; } void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot) @@ -2257,21 +2273,21 @@ static void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon) u16 moveLevel; u16 move; - moveLevel = (gLevelUpLearnsets[species][i] & 0xFE00); + moveLevel = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV); if (moveLevel > (level << 9)) break; - move = (gLevelUpLearnsets[species][i] & 0x1FF); + move = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); - if (GiveMoveToBoxMon(boxMon, move) == 0xFFFF) + if (GiveMoveToBoxMon(boxMon, move) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, move); } } u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) { - u32 retVal = 0; + u32 retVal = MOVE_NONE; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -2283,17 +2299,17 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) { sLearningMoveTableID = 0; - while ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) != (level << 9)) + while ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) != (level << 9)) { sLearningMoveTableID++; if (gLevelUpLearnsets[species][sLearningMoveTableID] == LEVEL_UP_END) - return 0; + return MOVE_NONE; } } - if ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) == (level << 9)) + if ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) == (level << 9)) { - gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & 0x1FF); + gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_ID); sLearningMoveTableID++; retVal = GiveMoveToMon(mon, gMoveToLearn); } @@ -2304,11 +2320,11 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) { s32 i; - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; u8 ppBonuses; - for (i = 0; i < 3; i++) + for (i = 0; i < MAX_MON_MOVES - 1; i++) { moves[i] = GetMonData(mon, MON_DATA_MOVE2 + i, NULL); pp[i] = GetMonData(mon, MON_DATA_PP2 + i, NULL); @@ -2316,10 +2332,10 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(mon, MON_DATA_MOVE1 + i, &moves[i]); SetMonData(mon, MON_DATA_PP1 + i, &pp[i]); @@ -2331,11 +2347,11 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; u8 ppBonuses; - for (i = 0; i < 3; i++) + for (i = 0; i < MAX_MON_MOVES - 1; i++) { moves[i] = GetBoxMonData(boxMon, MON_DATA_MOVE2 + i, NULL); pp[i] = GetBoxMonData(boxMon, MON_DATA_PP2 + i, NULL); @@ -2343,10 +2359,10 @@ static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 mo ppBonuses = GetBoxMonData(boxMon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &moves[i]); SetBoxMonData(boxMon, MON_DATA_PP1 + i, &pp[i]); @@ -2361,6 +2377,11 @@ static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 mo (var) /= (gStatStageRatios)[(mon)->statStages[(statIndex)]][1]; \ } +// Own function in pokeemerald +#define ShouldGetStatBadgeBoost(flag, battler)\ + (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER)) && FlagGet(flag) && GetBattlerSide(battler) == B_SIDE_PLAYER) + + s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 battlerIdAtk, u8 battlerIdDef) { u32 i; @@ -2382,13 +2403,14 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (!typeOverride) type = gBattleMoves[move].type; else - type = typeOverride & 0x3F; + type = typeOverride & DYNAMIC_TYPE_MASK; attack = attacker->attack; defense = defender->defense; spAttack = attacker->spAttack; spDefense = defender->spDefense; + // Get attacker hold item info if (attacker->item == ITEM_ENIGMA_BERRY) { attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect; @@ -2400,6 +2422,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de attackerHoldEffectParam = ItemId_GetHoldEffectParam(attacker->item); } + // Get defender hold item info if (defender->item == ITEM_ENIGMA_BERRY) { defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect; @@ -2414,33 +2437,17 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (attacker->ability == ABILITY_HUGE_POWER || attacker->ability == ABILITY_PURE_POWER) attack *= 2; - // In FRLG, the Battle Tower and opponent checks are stubbed here. - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE01_GET) - && GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER) - attack = (110 * attack) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE05_GET) - && GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER) - defense = (110 * defense) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE07_GET) - && GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER) - spAttack = (110 * spAttack) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE07_GET) - && GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER) - spDefense = (110 * spDefense) / 100; - } + if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerIdAtk)) + attack = (110 * attack) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerIdDef)) + defense = (110 * defense) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdAtk)) + spAttack = (110 * spAttack) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdDef)) + spDefense = (110 * spDefense) / 100; - for (i = 0; i < NELEMS(sHoldEffectToType); i++) + // Apply type-bonus hold item + for (i = 0; i < ARRAY_COUNT(sHoldEffectToType); i++) { if (attackerHoldEffect == sHoldEffectToType[i][0] && type == sHoldEffectToType[i][1]) @@ -2453,6 +2460,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } + // Apply boosts from hold items if (attackerHoldEffect == HOLD_EFFECT_CHOICE_BAND) attack = (150 * attack) / 100; if (attackerHoldEffect == HOLD_EFFECT_SOUL_DEW && !(gBattleTypeFlags & (BATTLE_TYPE_BATTLE_TOWER)) && (attacker->species == SPECIES_LATIAS || attacker->species == SPECIES_LATIOS)) @@ -2493,6 +2501,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de gBattleMovePower = (150 * gBattleMovePower) / 100; if (type == TYPE_BUG && attacker->ability == ABILITY_SWARM && attacker->hp <= (attacker->maxHP / 3)) gBattleMovePower = (150 * gBattleMovePower) / 100; + + // Self-destruct / Explosion cut defense in half if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION) defense /= 2; @@ -2500,7 +2510,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { - if (attacker->statStages[STAT_ATK] > 6) + // Critical hit, if attacker has lost attack stat stages then ignore stat drop + if (attacker->statStages[STAT_ATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, attack, STAT_ATK) else damage = attack; @@ -2513,7 +2524,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { - if (defender->statStages[STAT_DEF] < 6) + // Critical hit, if defender has gained defense stat stages then ignore stat increase + if (defender->statStages[STAT_DEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, defense, STAT_DEF) else damageHelper = defense; @@ -2524,9 +2536,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = damage / damageHelper; damage /= 50; + // Burn cuts attack in half if ((attacker->status1 & STATUS1_BURN) && attacker->ability != ABILITY_GUTS) damage /= 2; + // Apply Reflect if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -2535,10 +2549,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } - if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) + // Moves hitting both targets do half damage in double battles + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // moves always do at least 1 damage. + // Moves always do at least 1 damage. if (damage == 0) damage = 1; } @@ -2550,7 +2565,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { - if (attacker->statStages[STAT_SPATK] > 6) + // Critical hit, if attacker has lost sp. attack stat stages then ignore stat drop + if (attacker->statStages[STAT_SPATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, spAttack, STAT_SPATK) else damage = spAttack; @@ -2563,7 +2579,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { - if (defender->statStages[STAT_SPDEF] < 6) + // Critical hit, if defender has gained sp. defense stat stages then ignore stat increase + if (defender->statStages[STAT_SPDEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, spDefense, STAT_SPDEF) else damageHelper = spDefense; @@ -2574,6 +2591,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = (damage / damageHelper); damage /= 50; + // Apply Lightscreen if ((sideStatus & SIDE_STATUS_LIGHTSCREEN) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -2582,12 +2600,14 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } - if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) + // Moves hitting both targets do half damage in double battles + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // are effects of weather negated with cloud nine or air lock + // Are effects of weather negated with cloud nine or air lock if (WEATHER_HAS_EFFECT2) { + // Rain weakens Fire, boosts Water if (gBattleWeather & B_WEATHER_RAIN_TEMPORARY) { switch (type) @@ -2601,11 +2621,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // any weather except sun weakens solar beam + // Any weather except sun weakens solar beam if ((gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_HAIL_TEMPORARY)) && gCurrentMove == MOVE_SOLAR_BEAM) damage /= 2; - // sunny + // Sun boosts Fire, weakens Water if (gBattleWeather & B_WEATHER_SUN) { switch (type) @@ -2620,7 +2640,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // flash fire triggered + // Flash fire triggered if ((gBattleResources->flags->flags[battlerIdAtk] & RESOURCE_FLAG_FLASH_FIRE) && type == TYPE_FIRE) damage = (15 * damage) / 10; } @@ -2636,21 +2656,21 @@ u8 CountAliveMonsInBattle(u8 caseId) switch (caseId) { case BATTLE_ALIVE_EXCEPT_ACTIVE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (i != gActiveBattler && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; } break; case BATTLE_ALIVE_ATK_SIDE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (GetBattlerSide(i) == GetBattlerSide(gBattlerAttacker) && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; } break; case BATTLE_ALIVE_DEF_SIDE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (GetBattlerSide(i) == GetBattlerSide(gBattlerTarget) && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; @@ -2696,15 +2716,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon) u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - switch (gBaseStats[species].genderRatio) + switch (gSpeciesInfo[species].genderRatio) { case MON_MALE: case MON_FEMALE: case MON_GENDERLESS: - return gBaseStats[species].genderRatio; + return gSpeciesInfo[species].genderRatio; } - if (gBaseStats[species].genderRatio > (personality & 0xFF)) + if (gSpeciesInfo[species].genderRatio > (personality & 0xFF)) return MON_FEMALE; else return MON_MALE; @@ -2712,15 +2732,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon) u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) { - switch (gBaseStats[species].genderRatio) + switch (gSpeciesInfo[species].genderRatio) { case MON_MALE: case MON_FEMALE: case MON_GENDERLESS: - return gBaseStats[species].genderRatio; + return gSpeciesInfo[species].genderRatio; } - if (gBaseStats[species].genderRatio > (personality & 0xFF)) + if (gSpeciesInfo[species].genderRatio > (personality & 0xFF)) return MON_FEMALE; else return MON_MALE; @@ -2730,23 +2750,23 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) { if (gMonSpritesGfxPtr != NULL) { - if (battlerPosition >= 4) + if (battlerPosition >= MAX_BATTLERS_COUNT) battlerPosition = 0; gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; } else { - if (sOakSpeechNidoranResources) + if (sMonSpritesGfxManager) { - if (battlerPosition >= (s8)sOakSpeechNidoranResources->battlePosition) // why a cast?!? changing the unk0_2 type to s8 causes extra shifts, but a cast is the correct fix. why, compiler? + if (battlerPosition >= (s8)sMonSpritesGfxManager->battlePosition) // why a cast?!? changing the unk0_2 type to s8 causes extra shifts, but a cast is the correct fix. why, compiler? battlerPosition = 0; - gMultiuseSpriteTemplate = sOakSpeechNidoranResources->templates[battlerPosition]; + gMultiuseSpriteTemplate = sMonSpritesGfxManager->templates[battlerPosition]; } else { - if (battlerPosition >= 4) + if (battlerPosition >= MAX_BATTLERS_COUNT) battlerPosition = 0; gMultiuseSpriteTemplate = gSpriteTemplates_Battlers[battlerPosition]; @@ -2777,7 +2797,7 @@ void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosit static void EncryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->personality; boxMon->secure.raw[i] ^= boxMon->otId; @@ -2787,7 +2807,7 @@ static void EncryptBoxMon(struct BoxPokemon *boxMon) static void DecryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->otId; boxMon->secure.raw[i] ^= boxMon->personality; @@ -2963,9 +2983,9 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; } } @@ -3032,8 +3052,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) { retVal = 0; - // FRLG changed this to 7 which used to be PLAYER_NAME_LENGTH + 1 - while (retVal < 7) + while (retVal < PLAYER_NAME_LENGTH) { data[retVal] = boxMon->otName[retVal]; retVal++; @@ -3210,16 +3229,21 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_UNUSED_RIBBONS: retVal = substruct3->unusedRibbons; break; - case MON_DATA_EVENT_LEGAL: - retVal = substruct3->eventLegal; + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + retVal = substruct3->modernFatefulEncounter; break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: retVal = substruct0->species; if (substruct0->species && (substruct3->isEgg || boxMon->isBadEgg)) retVal = SPECIES_EGG; break; case MON_DATA_IVS: - retVal = substruct3->hpIV | (substruct3->attackIV << 5) | (substruct3->defenseIV << 10) | (substruct3->speedIV << 15) | (substruct3->spAttackIV << 20) | (substruct3->spDefenseIV << 25); + retVal = substruct3->hpIV + | (substruct3->attackIV << 5) + | (substruct3->defenseIV << 10) + | (substruct3->speedIV << 15) + | (substruct3->spAttackIV << 20) + | (substruct3->spDefenseIV << 25); break; case MON_DATA_KNOWN_MOVES: if (substruct0->species && !substruct3->isEgg) @@ -3340,7 +3364,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg) case MON_DATA_MAIL: SET8(mon->mail); break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: break; // why did FRLG go out of its way to specify all of these for default? case MON_DATA_IVS: @@ -3357,7 +3381,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg) case MON_DATA_EARTH_RIBBON: case MON_DATA_WORLD_RIBBON: case MON_DATA_UNUSED_RIBBONS: - case MON_DATA_EVENT_LEGAL: + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: case MON_DATA_KNOWN_MOVES: case MON_DATA_RIBBON_COUNT: case MON_DATA_RIBBONS: @@ -3387,9 +3411,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; EncryptBoxMon(boxMon); return; } @@ -3425,7 +3449,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_OT_NAME: { s32 i; - for (i = 0; i < 7; i++) + for (i = 0; i < PLAYER_NAME_LENGTH; i++) boxMon->otName[i] = data[i]; break; } @@ -3442,9 +3466,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) { SET16(substruct0->species); if (substruct0->species) - boxMon->hasSpecies = 1; + boxMon->hasSpecies = TRUE; else - boxMon->hasSpecies = 0; + boxMon->hasSpecies = FALSE; break; } case MON_DATA_HELD_ITEM: @@ -3552,9 +3576,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_IS_EGG: SET8(substruct3->isEgg); if (substruct3->isEgg) - boxMon->isEgg = 1; + boxMon->isEgg = TRUE; else - boxMon->isEgg = 0; + boxMon->isEgg = FALSE; break; case MON_DATA_ABILITY_NUM: SET8(substruct3->abilityNum); @@ -3613,8 +3637,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_UNUSED_RIBBONS: SET8(substruct3->unusedRibbons); break; - case MON_DATA_EVENT_LEGAL: - SET8(substruct3->eventLegal); + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + SET8(substruct3->modernFatefulEncounter); break; case MON_DATA_IVS: { @@ -3623,12 +3647,12 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) #else u32 ivs = *data; // Bug: Only the HP IV and the lower 3 bits of the Attack IV are read. The rest become 0. #endif - substruct3->hpIV = ivs & 0x1F; - substruct3->attackIV = (ivs >> 5) & 0x1F; - substruct3->defenseIV = (ivs >> 10) & 0x1F; - substruct3->speedIV = (ivs >> 15) & 0x1F; - substruct3->spAttackIV = (ivs >> 20) & 0x1F; - substruct3->spDefenseIV = (ivs >> 25) & 0x1F; + substruct3->hpIV = ivs & MAX_IV_MASK; + substruct3->attackIV = (ivs >> 5) & MAX_IV_MASK; + substruct3->defenseIV = (ivs >> 10) & MAX_IV_MASK; + substruct3->speedIV = (ivs >> 15) & MAX_IV_MASK; + substruct3->spAttackIV = (ivs >> 20) & MAX_IV_MASK; + substruct3->spDefenseIV = (ivs >> 25) & MAX_IV_MASK; break; } default: @@ -3744,8 +3768,8 @@ u8 GetMonsStateToDoubles(void) // FRLG changed the order of these checks, but there's no point to doing that // because of the requirement of all 3 of these checks. if (GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0 - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG) aliveCount++; } @@ -3755,9 +3779,9 @@ u8 GetMonsStateToDoubles(void) u8 GetAbilityBySpecies(u16 species, bool8 abilityNum) { if (abilityNum) - gLastUsedAbility = gBaseStats[species].abilities[1]; + gLastUsedAbility = gSpeciesInfo[species].abilities[1]; else - gLastUsedAbility = gBaseStats[species].abilities[0]; + gLastUsedAbility = gSpeciesInfo[species].abilities[0]; return gLastUsedAbility; } @@ -3784,24 +3808,24 @@ static void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord gBattleResources->secretBase->party.species[i], gBattleResources->secretBase->party.levels[i], 15, - 1, + TRUE, gBattleResources->secretBase->party.personality[i], - 2, + OT_ID_RANDOM_NO_SHINY, 0); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleResources->secretBase->party.heldItems[i]); - for (j = 0; j < 6; j++) + for (j = 0; j < NUM_STATS; j++) SetMonData(&gEnemyParty[i], MON_DATA_HP_EV + j, &gBattleResources->secretBase->party.EVs[i]); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { - SetMonData(&gEnemyParty[i], MON_DATA_MOVE1 + j, &gBattleResources->secretBase->party.moves[i * 4 + j]); - SetMonData(&gEnemyParty[i], MON_DATA_PP1 + j, &gBattleMoves[gBattleResources->secretBase->party.moves[i * 4 + j]].pp); + SetMonData(&gEnemyParty[i], MON_DATA_MOVE1 + j, &gBattleResources->secretBase->party.moves[i * MAX_MON_MOVES + j]); + SetMonData(&gEnemyParty[i], MON_DATA_PP1 + j, &gBattleMoves[gBattleResources->secretBase->party.moves[i * MAX_MON_MOVES + j]].pp); } } } - gBattleTypeFlags = 8; + gBattleTypeFlags = BATTLE_TYPE_TRAINER; gTrainerBattleOpponent_A = TRAINER_SECRET_BASE; } @@ -3868,13 +3892,13 @@ u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex) void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex) { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - ppBonuses &= gPPUpSetMask[moveIndex]; + ppBonuses &= gPPUpClearMask[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); } void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex) { - mon->ppBonuses &= gPPUpSetMask[moveIndex]; + mon->ppBonuses &= gPPUpClearMask[moveIndex]; } static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) @@ -3886,7 +3910,7 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES, NULL); gBattleMons[battlerId].item = GetMonData(&gPlayerParty[partyIndex], MON_DATA_HELD_ITEM, NULL); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gBattleMons[battlerId].moves[i] = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MOVE1 + i, NULL); gBattleMons[battlerId].pp[i] = GetMonData(&gPlayerParty[partyIndex], MON_DATA_PP1 + i, NULL); @@ -3914,8 +3938,8 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL); gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL); gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL); - gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1; - gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2; + gBattleMons[battlerId].type1 = gSpeciesInfo[gBattleMons[battlerId].species].types[0]; + gBattleMons[battlerId].type2 = gSpeciesInfo[gBattleMons[battlerId].species].types[1]; gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname); StringCopy_Nickname(gBattleMons[battlerId].nickname, nickname); @@ -3924,7 +3948,7 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) hpSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(battlerId)]; *hpSwitchout = gBattleMons[battlerId].hp; - for (i = 0; i < 8; i++) + for (i = 0; i < NUM_BATTLE_STATS; i++) gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE; gBattleMons[battlerId].status2 = 0; @@ -3937,6 +3961,31 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, return PokemonUseItemEffects(mon, item, partyIndex, moveIndex, 0); } +#define UPDATE_FRIENDSHIP_FROM_ITEM() \ +{ \ + if (retVal == 0 && friendshipChange == 0) \ + { \ + friendshipChange = itemEffect[idx]; \ + friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); \ + if (friendshipChange > 0 && holdEffect == HOLD_EFFECT_FRIENDSHIP_UP) \ + friendship += 150 * friendshipChange / 100; \ + else \ + friendship += friendshipChange; \ + if (friendshipChange > 0) \ + { \ + if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == ITEM_LUXURY_BALL) \ + friendship++; \ + if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) \ + friendship++; \ + } \ + if (friendship < 0) \ + friendship = 0; \ + if (friendship > MAX_FRIENDSHIP) \ + friendship = MAX_FRIENDSHIP; \ + SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); \ + } \ +} + bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) { u32 data; @@ -3944,15 +3993,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov s32 cmdIndex; bool8 retVal = TRUE; const u8 *itemEffect; - u8 idx = 6; + u8 idx = ITEM_EFFECT_ARG_START; u32 i; - s8 friendshipDelta = 0; + s8 friendshipChange = 0; u8 holdEffect; - u8 battleMonId = 4; + u8 battleMonId = MAX_BATTLERS_COUNT; u16 heldItem; u8 val; u32 evDelta; + // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); if (heldItem == ITEM_ENIGMA_BERRY) { @@ -3966,6 +4016,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov holdEffect = ItemId_GetHoldEffect(heldItem); } + // Get battler id (if relevant) gPotentialItemEffectBattler = gBattlerInMenuId; if (gMain.inBattle) { @@ -3984,14 +4035,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov else { gActiveBattler = 0; - battleMonId = 4; + battleMonId = MAX_BATTLERS_COUNT; } + // Skip using the item if it won't do anything if (!IS_POKEMON_ITEM(item)) return TRUE; if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; + // Get item effect if (item == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4004,90 +4057,112 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov itemEffect = gItemEffectTable[item - ITEM_POTION]; } - for (cmdIndex = 0; cmdIndex < 6; cmdIndex++) + // Do item effect + for (cmdIndex = 0; cmdIndex < ITEM_EFFECT_ARG_START; cmdIndex++) { switch (cmdIndex) { - // status healing effects + + // Handle ITEM0 effects (infatuation, Dire Hit, X Attack). ITEM0_SACRED_ASH is handled in party_menu.c case 0: + // Cure infatuation if ((itemEffect[cmdIndex] & ITEM0_INFATUATION) - && gMain.inBattle && battleMonId != 4 && (gBattleMons[battleMonId].status2 & STATUS2_INFATUATION)) + && gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && (gBattleMons[battleMonId].status2 & STATUS2_INFATUATION)) { gBattleMons[battleMonId].status2 &= ~STATUS2_INFATUATION; retVal = FALSE; } - if ((itemEffect[cmdIndex] & ITEM0_HIGH_CRIT) + + // Dire Hit + if ((itemEffect[cmdIndex] & ITEM0_DIRE_HIT) && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) { gBattleMons[gActiveBattler].status2 |= STATUS2_FOCUS_ENERGY; retVal = FALSE; } + + // X Attack if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK) - && gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & ITEM0_X_ATTACK; - if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12) - gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_ATK] = MAX_STAT_STAGE; retVal = FALSE; } break; - // in-battle stat boosting effects? + + // Handle ITEM1 effects (in-battle stat boosting effects) case 1: + // X Defend if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND) - && gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & ITEM1_X_DEFEND) >> 4; - if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12) - gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_DEF] = MAX_STAT_STAGE; retVal = FALSE; } + + // X Speed if ((itemEffect[cmdIndex] & ITEM1_X_SPEED) - && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & ITEM1_X_SPEED; - if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12) - gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_SPEED] = MAX_STAT_STAGE; retVal = FALSE; } break; - // more stat boosting effects? + + // Handle ITEM2 effects (more stat boosting effects) case 2: + // X Accuracy if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY) - && gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & ITEM2_X_ACCURACY) >> 4; - if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12) - gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_ACC] = MAX_STAT_STAGE; retVal = FALSE; } + + // X Sp Attack if ((itemEffect[cmdIndex] & ITEM2_X_SPATK) - && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & ITEM2_X_SPATK; - if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12) - gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_SPATK] = MAX_STAT_STAGE; retVal = FALSE; } break; + + // Handle ITEM3 effects (Guard Spec, Rare Candy, cure status) case 3: - if ((itemEffect[cmdIndex] & ITEM3_MIST) + // Guard Spec + if ((itemEffect[cmdIndex] & ITEM3_GUARD_SPEC) && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) { gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer = 5; retVal = FALSE; } - if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) // raise level - && GetMonData(mon, MON_DATA_LEVEL, NULL) != 100) + + // Rare Candy + if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) + && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - data = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + data = gExperienceTables[gSpeciesInfo[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; SetMonData(mon, MON_DATA_EXP, &data); CalculateMonStats(mon); retVal = FALSE; } + + // Cure status if ((itemEffect[cmdIndex] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battleMonId) == 0) { - if (battleMonId != 4) + if (battleMonId != MAX_BATTLERS_COUNT) gBattleMons[battleMonId].status2 &= ~STATUS2_NIGHTMARE; retVal = FALSE; } @@ -4100,15 +4175,18 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if ((itemEffect[cmdIndex] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battleMonId) == 0) retVal = FALSE; if ((itemEffect[cmdIndex] & ITEM3_CONFUSION) // heal confusion - && gMain.inBattle && battleMonId != 4 && (gBattleMons[battleMonId].status2 & STATUS2_CONFUSION)) + && gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && (gBattleMons[battleMonId].status2 & STATUS2_CONFUSION)) { gBattleMons[battleMonId].status2 &= ~STATUS2_CONFUSION; retVal = FALSE; } break; - // EV, HP, and PP raising effects + + // Handle ITEM4 effects (Change HP/Atk EVs, HP heal, PP heal, PP up, Revive, and evolution stones) case 4: val = itemEffect[cmdIndex]; + + // PP Up if (val & ITEM4_PP_UP) { val &= ~ITEM4_PP_UP; @@ -4116,7 +4194,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov i = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); if (data < 3 && i > 4) { - data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddMask[moveIndex]; + data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddValues[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &data); data = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), data, moveIndex) - i; @@ -4126,6 +4204,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } } i = 0; + + // Loop through and try each of the remaining ITEM4 effects while (val != 0) { if (val & 1) @@ -4135,20 +4215,25 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov switch (i) { - case 0: // EV_HP - case 1: // EV_ATK + case 0: // ITEM4_EV_HP + case 1: // ITEM4_EV_ATK evCount = GetMonEVCount(mon); - if (evCount >= 510) + + // Has EV increase limit already been reached? + if (evCount >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { - if (data + itemEffect[idx] > 100) - evDelta = 100 - (data + itemEffect[idx]) + itemEffect[idx]; + // Limit the increase + if (data + itemEffect[idx] > EV_ITEM_RAISE_LIMIT) + evDelta = EV_ITEM_RAISE_LIMIT - (data + itemEffect[idx]) + itemEffect[idx]; else evDelta = itemEffect[idx]; - if (evCount + evDelta > 510) - evDelta += 510 - (evCount + evDelta); + if (evCount + evDelta > MAX_TOTAL_EVS) + evDelta += MAX_TOTAL_EVS - (evCount + evDelta); + + // Update EVs and stats data += evDelta; SetMonData(mon, sGetMonDataEVConstants[i], &data); CalculateMonStats(mon); @@ -4156,8 +4241,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } break; - case 2: // HEAL_HP - // revive? + case 2: // ITEM4_HEAL_HP + // If Revive, update number of times revive has been used if (val & (ITEM4_REVIVE >> 2)) { if (GetMonData(mon, MON_DATA_HP, NULL) != 0) @@ -4167,7 +4252,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } if (gMain.inBattle) { - if (battleMonId != 4) + if (battleMonId != MAX_BATTLERS_COUNT) { gAbsentBattlerFlags &= ~gBitTable[battleMonId]; CopyPlayerPartyMonToBattleData(battleMonId, GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battleMonId])); @@ -4190,40 +4275,47 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } } + + // Get amount of HP to restore data = itemEffect[idx++]; switch (data) { - case 0xFF: + case ITEM6_HEAL_HP_FULL: data = GetMonData(mon, MON_DATA_MAX_HP, NULL) - GetMonData(mon, MON_DATA_HP, NULL); break; - case 0xFE: + case ITEM6_HEAL_HP_HALF: data = GetMonData(mon, MON_DATA_MAX_HP, NULL) / 2; if (data == 0) data = 1; break; - case 0xFD: - data = gBattleScripting.field_23; + case ITEM6_HEAL_HP_LVL_UP: + data = gBattleScripting.levelUpHP; break; } + + // Only restore HP if not at max health if (GetMonData(mon, MON_DATA_MAX_HP, NULL) != GetMonData(mon, MON_DATA_HP, NULL)) { if (!usedByAI) { + // Restore HP data = GetMonData(mon, MON_DATA_HP, NULL) + data; if (data > GetMonData(mon, MON_DATA_MAX_HP, NULL)) data = GetMonData(mon, MON_DATA_MAX_HP, NULL); SetMonData(mon, MON_DATA_HP, &data); - if (gMain.inBattle && battleMonId != 4) + + // Update battler (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT) { gBattleMons[battleMonId].hp = data; if (!(val & (ITEM4_REVIVE >> 2)) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { if (gBattleResults.numHealingItemsUsed < 255) gBattleResults.numHealingItemsUsed++; - // I have to re-use this variable to match. + r5 = gActiveBattler; gActiveBattler = battleMonId; - BtlController_EmitGetMonData(BUFFER_A, 0, 0); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); MarkBattlerForControllerExec(gActiveBattler); gActiveBattler = r5; } @@ -4237,10 +4329,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } val &= ~(ITEM4_REVIVE >> 2); break; - case 3: // HEAL_PP_ALL + case 3: // ITEM4_HEAL_PP if (!(val & (ITEM4_HEAL_PP_ONE >> 3))) { - for (r5 = 0; r5 < 4; r5++) + // Heal PP for all moves + for (r5 = 0; r5 < MAX_MON_MOVES; r5++) { u16 move_id; @@ -4256,10 +4349,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov data = CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), r5); } SetMonData(mon, MON_DATA_PP1 + r5, &data); - if (gMain.inBattle - && battleMonId != 4 && !(gBattleMons[battleMonId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battleMonId].mimickedMoves & gBitTable[r5])) + + // Heal battler PP too (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battleMonId, r5)) gBattleMons[battleMonId].pp[r5] = data; + retVal = FALSE; } } @@ -4267,8 +4361,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } else { + // Heal PP for one move u16 move_id; - data = GetMonData(mon, MON_DATA_PP1 + moveIndex, NULL); move_id = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); if (data != CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex)) @@ -4281,21 +4375,26 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov data = CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); } SetMonData(mon, MON_DATA_PP1 + moveIndex, &data); - if (gMain.inBattle - && battleMonId != 4 && !(gBattleMons[battleMonId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battleMonId].mimickedMoves & gBitTable[moveIndex])) + + // Heal battler PP too (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battleMonId, moveIndex)) gBattleMons[battleMonId].pp[moveIndex] = data; + retVal = FALSE; } } break; - case 7: // EVO_STONE + + // cases 4-6 are ITEM4_HEAL_PP_ONE, ITEM4_PP_UP, and ITEM4_REVIVE, which + // are already handled above by other cases or before the loop + + case 7: // ITEM4_EVO_STONE { u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item); if (targetSpecies != SPECIES_NONE) { - BeginEvolutionScene(mon, targetSpecies, 0, partyIndex); + BeginEvolutionScene(mon, targetSpecies, FALSE, partyIndex); return FALSE; } } @@ -4306,9 +4405,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov val >>= 1; } break; + + // Handle ITEM5 effects (Change Def/SpDef/SpAtk/Speed EVs, PP Max, and friendship changes) case 5: val = itemEffect[cmdIndex]; i = 0; + + // Loop through and try each of the ITEM5 effects while (val != 0) { if (val & 1) @@ -4317,22 +4420,27 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov switch (i) { - case 0: // EV_DEF - case 1: // EV_SPEED - case 2: // EV_SPDEF - case 3: // EV_SPATK + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK evCount = GetMonEVCount(mon); - if (evCount >= 510) + + // Has EV increase limit already been reached? + if (evCount >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i + 2], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { - if (data + itemEffect[idx] > 100) - evDelta = 100 - (data + itemEffect[idx]) + itemEffect[idx]; + // Limit the increase + if (data + itemEffect[idx] > EV_ITEM_RAISE_LIMIT) + evDelta = EV_ITEM_RAISE_LIMIT - (data + itemEffect[idx]) + itemEffect[idx]; else evDelta = itemEffect[idx]; - if (evCount + evDelta > 510) - evDelta += 510 - (evCount + evDelta); + if (evCount + evDelta > MAX_TOTAL_EVS) + evDelta += MAX_TOTAL_EVS - (evCount + evDelta); + + // Update EVs and stats data += evDelta; SetMonData(mon, sGetMonDataEVConstants[i + 2], &data); CalculateMonStats(mon); @@ -4340,14 +4448,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov idx++; } break; - case 4: // PP_MAX + case 4: // ITEM5_PP_MAX data = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); + + // Check if 3 PP Ups have been applied already if (data < 3) { evDelta = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - data &= gPPUpSetMask[moveIndex]; - data += gPPUpAddMask[moveIndex] * 3; + data &= gPPUpClearMask[moveIndex]; + data += gPPUpAddValues[moveIndex] * 3; // Apply 3 PP Ups (max) SetMonData(mon, MON_DATA_PP_BONUSES, &data); data = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), data, moveIndex) - evDelta; @@ -4356,77 +4466,23 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } break; - case 5: // FRIENDSHIP_LOW - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 5: // ITEM5_FRIENDSHIP_LOW + // Changes to friendship are given differently depending on + // how much friendship the Pokémon already has. + // In general, Pokémon with lower friendship receive more, + // and Pokémon with higher friendship receive less. + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; - case 6: // FRIENDSHIP_MID - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200 - && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 6: // ITEM5_FRIENDSHIP_MID + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; - case 7: // FRIENDSHIP_HIGH - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 7: // ITEM5_FRIENDSHIP_HIGH + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; } @@ -4448,7 +4504,7 @@ static bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, { status &= ~healMask; SetMonData(mon, MON_DATA_STATUS, &status); - if (gMain.inBattle && battleId != 4) + if (gMain.inBattle && battleId != MAX_BATTLERS_COUNT) gBattleMons[battleId].status1 &= ~healMask; return FALSE; } @@ -4465,17 +4521,17 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo s32 cmdIndex; bool8 retVal = TRUE; const u8 *itemEffect; - u8 idx = 6; + u8 idx = ITEM_EFFECT_ARG_START; u32 i; s32 sp18 = 0; u8 holdEffect; - u8 battlerId = 4; + u8 battlerId = MAX_BATTLERS_COUNT; u16 heldItem; u8 curEffect; u32 curMoveId; + // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - // you have to write as such, because otherwise gMain.inBattle will lose its u8 cast if (heldItem == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4487,6 +4543,8 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo { holdEffect = ItemId_GetHoldEffect(heldItem); } + + // Get battler id (if relevant) gPotentialItemEffectBattler = gBattlerInMenuId; if (gMain.inBattle) { @@ -4505,12 +4563,16 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo else { gActiveBattler = 0; - battlerId = 4; + battlerId = MAX_BATTLERS_COUNT; } + + // Skip using the item if it won't do anything if (!IS_POKEMON_ITEM(item)) return TRUE; if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; + + // Get item effect if (item == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4520,51 +4582,68 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } else { - itemEffect = gItemEffectTable[item - 13]; + itemEffect = gItemEffectTable[item - ITEM_POTION]; } - for (cmdIndex = 0; cmdIndex < 6; cmdIndex++) + + for (cmdIndex = 0; cmdIndex < ITEM_EFFECT_ARG_START; cmdIndex++) { switch (cmdIndex) { // status healing effects case 0: - if (itemEffect[cmdIndex] & ITEM0_INFATUATION - && gMain.inBattle - && battlerId != 4 - && gBattleMons[battlerId].status2 & STATUS2_INFATUATION) + // Cure infatuation + if (itemEffect[cmdIndex] & ITEM0_INFATUATION && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && gBattleMons[battlerId].status2 & STATUS2_INFATUATION) retVal = FALSE; - if (itemEffect[cmdIndex] & ITEM0_HIGH_CRIT - && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) + + // Dire Hit + if (itemEffect[cmdIndex] & ITEM0_DIRE_HIT && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) retVal = FALSE; + + // X Attack if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK) - && gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE) retVal = FALSE; break; - // in-battle stat boosting effects? + + // Handle ITEM1 effects (in-battle stat boosting effects) case 1: + // X Defend if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND) - && gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE) retVal = FALSE; + + // X Speed if ((itemEffect[cmdIndex] & ITEM1_X_SPEED) - && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE) retVal = FALSE; break; - // more stat boosting effects? + + // Handle ITEM2 effects (more stat boosting effects) case 2: + // X Accuracy if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY) - && gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE) retVal = FALSE; + + // X Sp Attack if ((itemEffect[cmdIndex] & ITEM2_X_SPATK) - && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE) retVal = FALSE; break; + + // Handle ITEM3 effects (Guard Spec, Rare Candy, cure status case 3: - if ((itemEffect[cmdIndex] & ITEM3_MIST) + // Guard Spec + if ((itemEffect[cmdIndex] & ITEM3_GUARD_SPEC) && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) // raise level - && GetMonData(mon, MON_DATA_LEVEL, NULL) != 100) + + // Rare Candy + if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) + && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) retVal = FALSE; + + // Cure status if ((itemEffect[cmdIndex] & ITEM3_SLEEP) && PartyMonHasStatus(mon, partyIndex, STATUS1_SLEEP, battlerId)) retVal = FALSE; @@ -4577,12 +4656,15 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo if ((itemEffect[cmdIndex] & ITEM3_PARALYSIS) && PartyMonHasStatus(mon, partyIndex, STATUS1_PARALYSIS, battlerId)) retVal = FALSE; if (itemEffect[cmdIndex] & ITEM3_CONFUSION // heal confusion - && gMain.inBattle && battlerId != 4 && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) + && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) retVal = FALSE; break; - // EV, HP, and PP raising effects + + // Handle ITEM4 effects (Change HP/Atk EVs, HP heal, PP heal, PP up, Revive, and evolution stones) case 4: curEffect = itemEffect[cmdIndex]; + + // PP Up if (curEffect & ITEM4_PP_UP) { curEffect &= ~ITEM4_PP_UP; @@ -4592,25 +4674,28 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo retVal = FALSE; } i = 0; - while (curEffect) // _080428C0 + + // Loop through and try each of the remaining ITEM4 effects + while (curEffect) { if (curEffect & 1) { switch (i) { - case 0: // EV_HP - case 1: // EV_ATK - if (GetMonEVCount(mon) >= 510) + case 0: // ITEM4_EV_HP + case 1: // ITEM4_EV_ATK + + // Has EV increase limit already been reached? + if (GetMonEVCount(mon) >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { idx++; retVal = FALSE; } break; - case 2: // HEAL_HP - // revive? + case 2: // ITEM4_HEAL_HP if (curEffect & (ITEM4_REVIVE >> 2)) { if (GetMonData(mon, MON_DATA_HP, NULL) != 0) @@ -4643,7 +4728,7 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } idx++; } - else // _080429FA + else { data = GetMonData(mon, MON_DATA_PP1 + moveIndex, NULL); curMoveId = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); @@ -4654,7 +4739,11 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } } break; - case 7: + + // cases 4-6 are ITEM4_HEAL_PP_ONE, ITEM4_PP_UP, and ITEM4_REVIVE, which + // are already handled above by other cases or before the loop + + case 7: // ITEM4_EVO_STONE if (GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item) != SPECIES_NONE) return FALSE; break; @@ -4664,42 +4753,48 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo curEffect >>= 1; } break; + + // Handle ITEM5 effects (Change Def/SpDef/SpAtk/Speed EVs, PP Max, and friendship changes) case 5: curEffect = itemEffect[cmdIndex]; i = 0; + + // Loop through and try each of the ITEM5 effects while (curEffect) { if (curEffect & 1) { switch (i) { - case 0: // EV_DEF - case 1: // EV_SPEED - case 2: // EV_SPDEF - case 3: // EV_SPATK - if (GetMonEVCount(mon) >= 510) + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK + if (GetMonEVCount(mon) >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i + 2], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { retVal = FALSE; idx++; } break; - case 4: // PP_MAX + case 4: // ITEM5_PP_MAX data = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); tmp = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); - if (data < 3 && tmp > 4) + + // Check if 3 PP Ups have been applied already, and that the move has a total PP of at least 5 (excludes Sketch) + if (data < 3 && tmp >= 5) retVal = FALSE; break; - case 5: // FRIENDSHIP_LOW + case 5: // ITEM5_FRIENDSHIP_LOW if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && retVal == FALSE && sp18 == 0) sp18 = itemEffect[idx]; idx++; break; - case 6: // FRIENDSHIP_MID + case 6: // ITEM5_FRIENDSHIP_MID if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200 && retVal == FALSE @@ -4707,7 +4802,7 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo sp18 = itemEffect[idx]; idx++; break; - case 7: // FRIENDSHIP_HIGH + case 7: // ITEM5_FRIENDSHIP_HIGH if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && retVal == FALSE && sp18 == 0) @@ -4742,9 +4837,9 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) u8 j; u8 val; - offset = 6; + offset = ITEM_EFFECT_ARG_START; - temp = gItemEffectTable[itemId - 13]; + temp = gItemEffectTable[itemId - ITEM_POTION]; if (!temp && itemId != ITEM_ENIGMA_BERRY) return 0; @@ -4756,7 +4851,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) itemEffect = temp; - for (i = 0; i < 6; i++) + for (i = 0; i < ITEM_EFFECT_ARG_START; i++) { switch (i) { @@ -4769,8 +4864,8 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) break; case 4: val = itemEffect[4]; - if (val & 0x20) - val &= 0xDF; + if (val & ITEM4_PP_UP) + val &= ~ITEM4_PP_UP; j = 0; while (val) { @@ -4778,25 +4873,26 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) { switch (j) { - case 2: - if (val & 0x10) - val &= 0xEF; - case 0: + case 2: // ITEM4_HEAL_HP + if (val & (ITEM4_REVIVE >> 2)) + val &= ~(ITEM4_REVIVE >> 2); + // fallthrough + case 0: // ITEM4_EV_HP if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 1: + case 1: // ITEM4_EV_ATK if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 3: + case 3: // ITEM4_HEAL_PP if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 7: + case 7: // ITEM4_EVO_STONE if (i == effectByte) return 0; break; @@ -4817,18 +4913,18 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) { switch (j) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK + case 4: // ITEM5_PP_MAX + case 5: // ITEM5_FRIENDSHIP_LOW + case 6: // ITEM5_FRIENDSHIP_MID if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 7: + case 7: // ITEM5_FRIENDSHIP_HIGH if (i == effectByte) return 0; break; @@ -4846,10 +4942,10 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) return offset; } -static void BufferStatRoseMessage(int stat) +static void BufferStatRoseMessage(int statIdx) { gBattlerTarget = gBattlerInMenuId; - StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[stat]]); + StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[statIdx]]); StringCopy(gBattleTextBuff2, gBattleText_Rose); BattleStringExpandPlaceholdersToDisplayedString(gText_DefendersStatRose); } @@ -4872,18 +4968,18 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) } else { - itemEffect = gItemEffectTable[itemId - 13]; + itemEffect = gItemEffectTable[itemId - ITEM_POTION]; } gPotentialItemEffectBattler = gBattlerInMenuId; for (i = 0; i < 3; i++) { - if (itemEffect[i] & 0xF) + if (itemEffect[i] & (ITEM0_X_ATTACK | ITEM1_X_SPEED | ITEM2_X_SPATK)) BufferStatRoseMessage(i * 2); - if (itemEffect[i] & 0xF0) + if (itemEffect[i] & (ITEM0_DIRE_HIT | ITEM1_X_DEFEND | ITEM2_X_ACCURACY)) { - if (i) + if (i != 0) // Dire Hit is the only ITEM0 above { BufferStatRoseMessage(i * 2 + 1); } @@ -4895,7 +4991,7 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) } } - if (itemEffect[3] & 0x80) + if (itemEffect[3] & ITEM3_GUARD_SPEC) { gBattlerAttacker = gBattlerInMenuId; BattleStringExpandPlaceholdersToDisplayedString(gBattleText_MistShroud); @@ -4906,12 +5002,12 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) u8 GetNature(struct Pokemon *mon) { - return GetMonData(mon, MON_DATA_PERSONALITY, NULL) % 25; + return GetMonData(mon, MON_DATA_PERSONALITY, NULL) % NUM_NATURES; } static u8 GetNatureFromPersonality(u32 personality) { - return personality % 25; + return personality % NUM_NATURES; } u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) @@ -4932,6 +5028,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) else holdEffect = ItemId_GetHoldEffect(heldItem); + // Prevent evolution with Everstone, unless we're just viewing the party menu with an evolution item if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE && type != EVO_MODE_ITEM_CHECK) return 0; @@ -4941,7 +5038,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) level = GetMonData(mon, MON_DATA_LEVEL, NULL); friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { switch (gEvolutionTable[species][i].method) { @@ -5003,7 +5100,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) } break; case EVO_MODE_TRADE: - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { switch (gEvolutionTable[species][i].method) { @@ -5014,9 +5111,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) if (gEvolutionTable[species][i].param == heldItem) { targetSpecies = gEvolutionTable[species][i].targetSpecies; + + // Prevent cross-generational evolutions like Scizor and Steelix until the National Pokedex is obtained if (IsNationalPokedexEnabled() || targetSpecies <= KANTO_SPECIES_END) { - heldItem = 0; + heldItem = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); targetSpecies = gEvolutionTable[species][i].targetSpecies; } @@ -5027,7 +5126,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) break; case EVO_MODE_ITEM_USE: case EVO_MODE_ITEM_CHECK: - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { if (gEvolutionTable[species][i].method == EVO_ITEM && gEvolutionTable[species][i].param == evolutionItem) @@ -5042,16 +5141,16 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) return targetSpecies; } -static u16 HoennPokedexNumToSpecies(u16 var) +static u16 HoennPokedexNumToSpecies(u16 hoennNum) { u16 species; - if (!var) + if (!hoennNum) return 0; species = 0; - while (species < NUM_SPECIES - 1 && sSpeciesToHoennPokedexNum[species] != var) + while (species < NUM_SPECIES - 1 && sSpeciesToHoennPokedexNum[species] != hoennNum) species++; if (species == NUM_SPECIES - 1) @@ -5131,42 +5230,81 @@ u16 SpeciesToCryId(u16 species) return sHoennSpeciesIdToCryId[species - ((SPECIES_OLD_UNOWN_Z + 1) - 1)]; } -#define DRAW_SPINDA_SPOTS \ +// Spots can be drawn on Spinda's color indexes 1, 2, or 3 +#define FIRST_SPOT_COLOR 1 +#define LAST_SPOT_COLOR 3 + +// To draw a spot pixel, add 4 to the color index +#define SPOT_COLOR_ADJUSTMENT 4 +/* + The macro below handles drawing the randomly-placed spots on Spinda's front sprite. + Spinda has 4 spots, each with an entry in sSpindaSpotGraphics. Each entry contains + a base x and y coordinate for the spot and a 16x16 binary image. Each bit in the image + determines whether that pixel should be considered part of the spot. + + The position of each spot is randomized using the Spinda's personality. The entire 32 bit + personality value is used, 4 bits for each coordinate of the 4 spots. If the personality + value is 0x87654321, then 0x1 will be used for the 1st spot's x coord, 0x2 will be used for + the 1st spot's y coord, 0x3 will be used for the 2nd spot's x coord, and so on. Each + coordinate is calculated as (baseCoord + (given 4 bits of personality) - 8). In effect this + means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities). + + The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if + the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the + pixel on Spinda satisfies the following formula: ((u8)(colorIndex - 1) <= 2). The -1 excludes + transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will + allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create + the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. + + The above is done two different ways in the macro: one with << 4, and one without. This + is because Spinda's sprite is a 4 bits per pixel image, but the pointer to Spinda's pixels + (destPixels) is an 8 bit pointer, so it addresses two pixels. Shifting by 4 accesses the 2nd + of these pixels, so this is done every other time. +*/ +#define DRAW_SPINDA_SPOTS(personality, dest) \ { \ - int i; \ - for (i = 0; i < 4; i++) \ + s32 i; \ + for (i = 0; i < (s32)ARRAY_COUNT(sSpindaSpotGraphics); i++) \ { \ - int j; \ + s32 row; \ u8 x = sSpindaSpotGraphics[i].x + ((personality & 0x0F) - 8); \ u8 y = sSpindaSpotGraphics[i].y + (((personality & 0xF0) >> 4) - 8); \ \ - for (j = 0; j < 16; j++) \ + for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) \ { \ - int k; \ - s32 row = sSpindaSpotGraphics[i].image[j]; \ + s32 column; \ + s32 spotPixelRow = sSpindaSpotGraphics[i].image[row]; \ \ - for (k = x; k < x + 16; k++) \ + for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) \ { \ - u8 *val = dest + ((k / 8) * 32) + \ - ((k % 8) / 2) + \ - ((y >> 3) << 8) + \ - ((y & 7) << 2); \ + /* Get target pixels on Spinda's sprite */ \ + u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + \ + ((column % 8) / 2) + \ + ((y / 8) * TILE_SIZE_4BPP * 8) + \ + ((y % 8) * 4); \ \ - if (row & 1) \ + /* Is this pixel in the 16x16 spot image part of the spot? */ \ + if (spotPixelRow & 1) \ { \ - if (k & 1) \ + /* destPixels addressess two pixels, alternate which */ \ + /* of the two pixels is being considered for drawing */ \ + if (column & 1) \ { \ - if ((u8)((*val & 0xF0) - 0x10) <= 0x20) \ - *val += 0x40; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\ + <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\ + *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \ } \ else \ { \ - if ((u8)((*val & 0xF) - 0x01) <= 0x02) \ - *val += 0x04; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \ + <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \ + *destPixels += SPOT_COLOR_ADJUSTMENT; \ } \ } \ \ - row >>= 1; \ + spotPixelRow >>= 1; \ } \ \ y++; \ @@ -5176,18 +5314,20 @@ u16 SpeciesToCryId(u16 species) } \ } +// Same as DrawSpindaSpots but attempts to discern for itself whether or +// not it's the front pic. static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest) { if (species == SPECIES_SPINDA - && dest != gMonSpritesGfxPtr->sprites[0] - && dest != gMonSpritesGfxPtr->sprites[2]) - DRAW_SPINDA_SPOTS; + && dest != gMonSpritesGfxPtr->sprites[B_POSITION_PLAYER_LEFT] + && dest != gMonSpritesGfxPtr->sprites[B_POSITION_PLAYER_RIGHT]) + DRAW_SPINDA_SPOTS(personality, dest); } void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic) { if (species == SPECIES_SPINDA && isFrontPic) - DRAW_SPINDA_SPOTS; + DRAW_SPINDA_SPOTS(personality, dest); } void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) @@ -5199,79 +5339,95 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[newSpecies]); } -bool8 GetPlayerFlankId(void) +// The below two functions determine which side of a multi battle the trainer battles on +// 0 is the left (top in party menu), 1 is right (bottom in party menu) +u8 GetPlayerFlankId(void) { - bool8 retVal = FALSE; + u8 flankId = 0; switch (gLinkPlayers[GetMultiplayerId()].id) { case 0: case 3: - retVal = FALSE; + flankId = 0; break; case 1: case 2: - retVal = TRUE; + flankId = 1; break; } - return retVal; + return flankId; } -bool16 GetLinkTrainerFlankId(u8 linkPlayerId) +u16 GetLinkTrainerFlankId(u8 linkPlayerId) { - bool16 retVal = FALSE; + u16 flankId = 0; switch (gLinkPlayers[linkPlayerId].id) { case 0: case 3: - retVal = FALSE; + flankId = 0; break; case 1: case 2: - retVal = TRUE; + flankId = 1; break; } - return retVal; + return flankId; } -s32 GetBattlerMultiplayerId(u16 a1) +s32 GetBattlerMultiplayerId(u16 id) { - s32 id; - for (id = 0; id < MAX_LINK_PLAYERS; id++) - if (gLinkPlayers[id].id == a1) + s32 multiplayerId; + for (multiplayerId = 0; multiplayerId < MAX_LINK_PLAYERS; multiplayerId++) + if (gLinkPlayers[multiplayerId].id == id) break; - return id; + return multiplayerId; } -u8 GetTrainerEncounterMusicId(u16 trainer) +u8 GetTrainerEncounterMusicId(u16 trainerId) { - return gTrainers[trainer].encounterMusic_gender & 0x7F; + return TRAINER_ENCOUNTER_MUSIC(trainerId); } -static u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex) +static u16 ModifyStatByNature(u8 nature, u16 stat, u8 statIndex) { - if (statIndex < 1 || statIndex > 5) - { - // should just be "return n", but it wouldn't match without this - u16 retVal = n; - retVal++; - retVal--; - return retVal; - } +// Because this is a u16 it will be unable to store the +// result of the multiplication for any stat > 595 for a +// positive nature and > 728 for a negative nature. +// Neither occur in the base game, but this can happen if +// any Nature-affected base stat is increased to a value +// above 248. The closest by default is Shuckle at 230. +#ifdef BUGFIX + u32 retVal; +#else + u16 retVal; +#endif + + // Don't modify HP, Accuracy, or Evasion by nature + if (statIndex <= STAT_HP || statIndex > NUM_NATURE_STATS) + return stat; switch (sNatureStatTable[nature][statIndex - 1]) { case 1: - return (u16)(n * 110) / 100; + retVal = stat * 110; + retVal /= 100; + break; case -1: - return (u16)(n * 90) / 100; + retVal = stat * 90; + retVal /= 100; + break; + default: + retVal = stat; + break; } - return n; + return retVal; } void AdjustFriendship(struct Pokemon *mon, u8 event) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u16 heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); u8 holdEffect; @@ -5319,7 +5475,7 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) } delta = sFriendshipEventDeltas[event][friendshipLevel]; - if (delta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) + if (delta > 0 && holdEffect == HOLD_EFFECT_FRIENDSHIP_UP) // 50% increase, rounding down delta = (150 * delta) / 100; @@ -5332,11 +5488,10 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) friendship++; } - // Clamp to u8 if (friendship < 0) friendship = 0; - if (friendship > 255) - friendship = 255; + if (friendship > MAX_FRIENDSHIP) + friendship = MAX_FRIENDSHIP; SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); } @@ -5374,23 +5529,23 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) switch (i) { - case 0: - evIncrease = gBaseStats[defeatedSpecies].evYield_HP * multiplier; + case STAT_HP: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_HP * multiplier; break; - case 1: - evIncrease = gBaseStats[defeatedSpecies].evYield_Attack * multiplier; + case STAT_ATK: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Attack * multiplier; break; - case 2: - evIncrease = gBaseStats[defeatedSpecies].evYield_Defense * multiplier; + case STAT_DEF: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Defense * multiplier; break; - case 3: - evIncrease = gBaseStats[defeatedSpecies].evYield_Speed * multiplier; + case STAT_SPEED: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Speed * multiplier; break; - case 4: - evIncrease = gBaseStats[defeatedSpecies].evYield_SpAttack * multiplier; + case STAT_SPATK: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpAttack * multiplier; break; - case 5: - evIncrease = gBaseStats[defeatedSpecies].evYield_SpDefense * multiplier; + case STAT_SPDEF: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpDefense * multiplier; break; } @@ -5414,9 +5569,9 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) if (totalEVs + (s16)evIncrease > MAX_TOTAL_EVS) evIncrease = ((s16)evIncrease + MAX_TOTAL_EVS) - (totalEVs + evIncrease); - if (evs[i] + (s16)evIncrease > 255) + if (evs[i] + (s16)evIncrease > MAX_PER_STAT_EVS) { - int val1 = (s16)evIncrease + 255; + int val1 = (s16)evIncrease + MAX_PER_STAT_EVS; int val2 = evs[i] + evIncrease; evIncrease = val1 - val2; } @@ -5448,7 +5603,7 @@ void RandomlyGivePartyPokerus(struct Pokemon *party) &foo; } -u8 CheckPartyPokerus(struct Pokemon *party, u8 party_bm) +u8 CheckPartyPokerus(struct Pokemon *party, u8 selection) { u8 retVal; @@ -5456,25 +5611,23 @@ u8 CheckPartyPokerus(struct Pokemon *party, u8 party_bm) unsigned curBit = 1; retVal = 0; - if (party_bm != 0) // Check mons in party based on bitmask, LSB = first mon + if (selection) { do { - if ((party_bm & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) + if ((selection & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) retVal |= curBit; partyIndex++; curBit <<= 1; - party_bm >>= 1; + selection >>= 1; } - while (party_bm); + while (selection); } - else // Single Pokemon + else if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) { - if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) - { - retVal = 1; - } + retVal = 1; } + return retVal; } @@ -5522,9 +5675,9 @@ void PartySpreadPokerus(struct Pokemon *party) static void SetMonExpWithMaxLevelCheck(struct Pokemon *mon, int species, u8 unused, u32 data) { - if (data > gExperienceTables[gBaseStats[species].growthRate][100]) + if (data > gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL]) { - data = gExperienceTables[gBaseStats[species].growthRate][100]; + data = gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL]; SetMonData(mon, MON_DATA_EXP, &data); } } @@ -5536,9 +5689,9 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon) u8 newLevel = level + 1; u32 exp = GetMonData(mon, MON_DATA_EXP, NULL); - if (level < 100) + if (level < MAX_LEVEL) { - if (exp > gExperienceTables[gBaseStats[species].growthRate][newLevel]) + if (exp > gExperienceTables[gSpeciesInfo[species].growthRate][newLevel]) { SetMonData(mon, MON_DATA_LEVEL, &newLevel); SetMonExpWithMaxLevelCheck(mon, species, newLevel, exp); @@ -5556,7 +5709,7 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon) u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); if (species == SPECIES_EGG) { return 0; @@ -5575,36 +5728,36 @@ u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm) u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves) { - u16 learnedMoves[4]; + u16 learnedMoves[MAX_MON_MOVES]; u8 numMoves = 0; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); int i, j, k; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - for (i = 0; i < 20; i++) + for (i = 0; i < MAX_LEVEL_UP_MOVES; i++) { u16 moveLevel; - if (gLevelUpLearnsets[species][i] == 0xFFFF) + if (gLevelUpLearnsets[species][i] == LEVEL_UP_END) break; - moveLevel = gLevelUpLearnsets[species][i] & 0xFE00; + moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV; if (moveLevel <= (level << 9)) { - for (j = 0; j < 4 && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { - for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++) + for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++) ; if (k == numMoves) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; } } } @@ -5617,48 +5770,48 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves) u8 numMoves = 0; int i; - for (i = 0; i < 20 && gLevelUpLearnsets[species][i] != 0xFFFF; i++) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + for (i = 0; i < MAX_LEVEL_UP_MOVES && gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++) + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; return numMoves; } u8 GetNumberOfRelearnableMoves(struct Pokemon *mon) { - u16 learnedMoves[4]; - u16 moves[20]; + u16 learnedMoves[MAX_MON_MOVES]; + u16 moves[MAX_LEVEL_UP_MOVES]; u8 numMoves = 0; - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); int i, j, k; if (species == SPECIES_EGG) return 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - for (i = 0; i < 20; i++) + for (i = 0; i < MAX_LEVEL_UP_MOVES; i++) { u16 moveLevel; - if (gLevelUpLearnsets[species][i] == 0xFFFF) + if (gLevelUpLearnsets[species][i] == LEVEL_UP_END) break; - moveLevel = gLevelUpLearnsets[species][i] & 0xFE00; + moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV; if (moveLevel <= (level << 9)) { - for (j = 0; j < 4 && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { - for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++) + for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++) ; if (k == numMoves) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; } } } @@ -5678,7 +5831,7 @@ u16 SpeciesToPokedexNum(u16 species) void ClearBattleMonForms(void) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) gBattleMonForms[i] = 0; } @@ -5730,7 +5883,7 @@ void PlayMapChosenOrBattleBGM(u16 songId) const u32 *GetMonFrontSpritePal(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); return GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); @@ -5743,7 +5896,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p if (species > SPECIES_EGG) return gMonPaletteTable[0].data; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return gMonShinyPaletteTable[species].data; else @@ -5752,7 +5905,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); return GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); @@ -5762,7 +5915,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u { u32 shinyValue; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return &gMonShinyPaletteTable[species]; else @@ -5772,7 +5925,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u bool32 IsHMMove2(u16 move) { int i = 0; - while (sHMMoves[i] != 0xFFFF) + while (sHMMoves[i] != HM_MOVES_END) { if (sHMMoves[i++] == move) return TRUE; @@ -5782,24 +5935,24 @@ bool32 IsHMMove2(u16 move) bool8 IsMonSpriteNotFlipped(u16 species) { - return gBaseStats[species].noFlip; + return gSpeciesInfo[species].noFlip; } static s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor) { u8 nature = GetNature(mon); - return sPokeblockFlavorCompatibilityTable[nature * 5 + flavor]; + return sPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor]; } s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor) { u8 nature = GetNatureFromPersonality(personality); - return sPokeblockFlavorCompatibilityTable[nature * 5 + flavor]; + return sPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor]; } bool8 IsTradedMon(struct Pokemon *mon) { - u8 otName[PLAYER_NAME_LENGTH]; + u8 otName[PLAYER_NAME_LENGTH + 1]; u32 otId; GetMonData(mon, MON_DATA_OT_NAME, otName); otId = GetMonData(mon, MON_DATA_OT_ID, NULL); @@ -5834,7 +5987,7 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, 0)) { @@ -5870,18 +6023,19 @@ void SetWildMonHeldItem(void) { u16 rnd = Random() % 100; u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); - if (gBaseStats[species].item1 == gBaseStats[species].item2) + if (gSpeciesInfo[species].itemCommon == gSpeciesInfo[species].itemRare) { - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); + // Both held items are the same, 100% chance to hold item + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon); return; } if (rnd > 44) { if (rnd <= 94) - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon); else - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare); } } } @@ -5896,7 +6050,7 @@ bool8 IsMonShiny(struct Pokemon *mon) static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality) { bool8 retVal = FALSE; - u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + u32 shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) retVal = TRUE; return retVal; @@ -5931,6 +6085,7 @@ u16 FacilityClassToPicIndex(u16 facilityClass) return gFacilityClassToPicIndex[facilityClass]; } +// If FALSE, should load this game's Deoxys form. If TRUE, should load normal Deoxys form bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId) { switch (caseId) @@ -5990,21 +6145,17 @@ bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId) static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId) { s32 ivVal, evVal; - u16 statValue; + u16 statValue = 0; u8 nature; if (gBattleTypeFlags & BATTLE_TYPE_LINK_IN_BATTLE || GetMonData(mon, MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS) - { - return statValue = 0; - } - else - { - ivVal = GetMonData(mon, MON_DATA_HP_IV + statId, NULL); - evVal = GetMonData(mon, MON_DATA_HP_EV + statId, NULL); - statValue = ((sDeoxysBaseStats[statId] * 2 + ivVal + evVal / 4) * mon->level) / 100 + 5; - nature = GetNature(mon); - statValue = ModifyStatByNature(nature, statValue, (u8)statId); - } + return 0; + + ivVal = GetMonData(mon, MON_DATA_HP_IV + statId, NULL); + evVal = GetMonData(mon, MON_DATA_HP_EV + statId, NULL); + statValue = ((sDeoxysBaseStats[statId] * 2 + ivVal + evVal / 4) * mon->level) / 100 + 5; + nature = GetNature(mon); + statValue = ModifyStatByNature(nature, statValue, (u8)statId); return statValue; } @@ -6049,14 +6200,14 @@ u16 GetUnionRoomTrainerClass(void) return gFacilityClassToTrainerClass[gUnionRoomFacilityClasses[arrId]]; } -void CreateEventLegalEnemyMon(void) +void CreateEnemyEventMon(void) { s32 species = gSpecialVar_0x8004; s32 level = gSpecialVar_0x8005; s32 itemId = gSpecialVar_0x8006; ZeroEnemyPartyMons(); - CreateEventLegalMon(&gEnemyParty[0], species, level, 32, 0, 0, 0, 0); + CreateEventMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); if (itemId) { u8 heldItem[2]; @@ -6083,30 +6234,34 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality) bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 battlerId) { - u8 buffer[12]; + u8 nickname[POKEMON_NAME_LENGTH + 1]; if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(battlerId) != B_SIDE_PLAYER) { - GetMonData(mon, MON_DATA_NICKNAME, buffer); - StringGet_Nickname(buffer); - if (!StringCompare(buffer, gText_Ghost)) + GetMonData(mon, MON_DATA_NICKNAME, nickname); + StringGet_Nickname(nickname); + if (!StringCompare(nickname, gText_Ghost)) return TRUE; } return FALSE; } -static void OakSpeechNidoranFSetupTemplate(struct OakSpeechNidoranFStruct *structPtr, u8 battlePosition) +#define ALLOC_FAIL_BUFFER (1 << 0) +#define ALLOC_FAIL_STRUCT (1 << 1) +#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value + +static void InitMonSpritesGfx_Mode1(struct MonSpritesGfxManager *structPtr, u8 battlePosition) { u16 i = 0, j = 0; - if (battlePosition > 3) + if (battlePosition >= MAX_BATTLERS_COUNT) { - for (i = 0; i < (s8)structPtr->spriteCount; ++i) + for (i = 0; i < (s8)structPtr->numSprites; ++i) { structPtr->templates[i] = gSpriteTemplates_Battlers[i]; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[i * structPtr->frameCount + j].data = &structPtr->bufferPtrs[i][j * 0x800]; - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->frameCount]; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[i * structPtr->numFrames + j].data = &structPtr->spritePointers[i][j * MON_PIC_SIZE]; + structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->numFrames]; } } else @@ -6114,172 +6269,173 @@ static void OakSpeechNidoranFSetupTemplate(struct OakSpeechNidoranFStruct *struc const struct SpriteTemplate *template = &gSpriteTemplates_Battlers[battlePosition]; structPtr->templates[0] = *template; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[j].data = &structPtr->bufferPtrs[0][j * 0x800]; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[j].data = &structPtr->spritePointers[0][j * MON_PIC_SIZE]; structPtr->templates[0].images = structPtr->frameImages; } } // not used -static void OakSpeechNidoranFSetupTemplateDummy(struct OakSpeechNidoranFStruct *structPtr) +static void InitMonSpritesGfx_Mode0(struct MonSpritesGfxManager *structPtr) { u16 i, j; - for (i = 0; i < (s8)structPtr->spriteCount; ++i) + for (i = 0; i < (s8)structPtr->numSprites; ++i) { - structPtr->templates[i] = sOakSpeechNidoranFDummyTemplate; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[i * structPtr->spriteCount + j].data = &structPtr->bufferPtrs[i][j * 0x800]; - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->spriteCount]; // should be frameCount logically + structPtr->templates[i] = sSpriteTemplate_64x64; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[i * structPtr->numSprites + j].data = &structPtr->spritePointers[i][j * MON_PIC_SIZE]; + structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->numSprites]; // should be numFrames logically structPtr->templates[i].anims = gAnims_MonPic; structPtr->templates[i].paletteTag = i; } } -struct OakSpeechNidoranFStruct *OakSpeechNidoranFSetup(u8 battlePosition, bool8 enable) +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 battlePosition, u8 mode) { s32 size; - u8 i, flags = 0; + u8 i, failureFlags = 0; - if (sOakSpeechNidoranResources != NULL) + if (sMonSpritesGfxManager != NULL) { - if (sOakSpeechNidoranResources->enable == 0xA3) + if (sMonSpritesGfxManager->active == GFX_MANAGER_ACTIVE) return NULL; - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - sOakSpeechNidoranResources = NULL; + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + sMonSpritesGfxManager = NULL; } - sOakSpeechNidoranResources = AllocZeroed(0x18); - if (sOakSpeechNidoranResources == NULL) + sMonSpritesGfxManager = AllocZeroed(sizeof(*sMonSpritesGfxManager)); + if (sMonSpritesGfxManager == NULL) return NULL; - switch (enable) + + switch (mode) { - case TRUE: - if (battlePosition == 4) + case 1: + if (battlePosition == MAX_BATTLERS_COUNT) { - sOakSpeechNidoranResources->spriteCount = 4; - sOakSpeechNidoranResources->battlePosition = 4; + sMonSpritesGfxManager->numSprites = MAX_BATTLERS_COUNT; + sMonSpritesGfxManager->battlePosition = MAX_BATTLERS_COUNT; } else { - if (battlePosition > 4) + if (battlePosition > MAX_BATTLERS_COUNT) battlePosition = 0; - sOakSpeechNidoranResources->spriteCount = 1; - sOakSpeechNidoranResources->battlePosition = 1; + sMonSpritesGfxManager->numSprites = 1; + sMonSpritesGfxManager->battlePosition = 1; } - sOakSpeechNidoranResources->frameCount = 4; - sOakSpeechNidoranResources->enable2 = TRUE; + sMonSpritesGfxManager->numFrames = MAX_MON_PIC_FRAMES; + sMonSpritesGfxManager->mode = 1; break; - case FALSE: + case 0: default: if (!battlePosition) battlePosition = 1; if (battlePosition > 8) battlePosition = 8; - sOakSpeechNidoranResources->spriteCount = (battlePosition << 16) >> 16; - sOakSpeechNidoranResources->battlePosition = battlePosition; - sOakSpeechNidoranResources->frameCount = 4; - sOakSpeechNidoranResources->enable2 = FALSE; + sMonSpritesGfxManager->numSprites = (battlePosition << 16) >> 16; + sMonSpritesGfxManager->battlePosition = battlePosition; + sMonSpritesGfxManager->numFrames = 4; + sMonSpritesGfxManager->mode = 0; break; } - size = sOakSpeechNidoranResources->frameCount * 0x800; - sOakSpeechNidoranResources->sizePerSprite = size; - sOakSpeechNidoranResources->dataBuffer = AllocZeroed(sOakSpeechNidoranResources->spriteCount * size); - sOakSpeechNidoranResources->bufferPtrs = AllocZeroed(sOakSpeechNidoranResources->spriteCount * 0x20); - if (sOakSpeechNidoranResources->dataBuffer == NULL || sOakSpeechNidoranResources->bufferPtrs == NULL) + + // Set up sprite / sprite pointer buffers + size = sMonSpritesGfxManager->numFrames * MON_PIC_SIZE; + sMonSpritesGfxManager->dataSize = size; + sMonSpritesGfxManager->spriteBuffer = AllocZeroed(sMonSpritesGfxManager->numSprites * size); + sMonSpritesGfxManager->spritePointers = AllocZeroed(sMonSpritesGfxManager->numSprites * 32); // ? Only * 4 is necessary, perhaps they were thinking bits. + if (sMonSpritesGfxManager->spriteBuffer == NULL || sMonSpritesGfxManager->spritePointers == NULL) { - flags |= 1; + failureFlags |= ALLOC_FAIL_BUFFER; } else { do { - for (i = 0; i < (s8)sOakSpeechNidoranResources->spriteCount; ++i) - sOakSpeechNidoranResources->bufferPtrs[i] = &sOakSpeechNidoranResources->dataBuffer[sOakSpeechNidoranResources->sizePerSprite * i]; + for (i = 0; i < (s8)sMonSpritesGfxManager->numSprites; ++i) + sMonSpritesGfxManager->spritePointers[i] = &sMonSpritesGfxManager->spriteBuffer[sMonSpritesGfxManager->dataSize * i]; } while (0); } - sOakSpeechNidoranResources->templates = AllocZeroed(sizeof(struct SpriteTemplate) * sOakSpeechNidoranResources->spriteCount); - sOakSpeechNidoranResources->frameImages = AllocZeroed(sOakSpeechNidoranResources->spriteCount * sizeof(struct SpriteFrameImage) * sOakSpeechNidoranResources->frameCount); - if (sOakSpeechNidoranResources->templates == NULL || sOakSpeechNidoranResources->frameImages == NULL) + + // Set up sprite structs + sMonSpritesGfxManager->templates = AllocZeroed(sizeof(struct SpriteTemplate) * sMonSpritesGfxManager->numSprites); + sMonSpritesGfxManager->frameImages = AllocZeroed(sMonSpritesGfxManager->numSprites * sizeof(struct SpriteFrameImage) * sMonSpritesGfxManager->numFrames); + if (sMonSpritesGfxManager->templates == NULL || sMonSpritesGfxManager->frameImages == NULL) { - flags |= 2; + failureFlags |= ALLOC_FAIL_STRUCT; } else { - for (i = 0; i < sOakSpeechNidoranResources->frameCount * sOakSpeechNidoranResources->spriteCount; ++i) - sOakSpeechNidoranResources->frameImages[i].size = 0x800; - switch (sOakSpeechNidoranResources->enable2) + for (i = 0; i < sMonSpritesGfxManager->numFrames * sMonSpritesGfxManager->numSprites; i++) + sMonSpritesGfxManager->frameImages[i].size = MON_PIC_SIZE; + switch (sMonSpritesGfxManager->mode) { - case TRUE: - OakSpeechNidoranFSetupTemplate(sOakSpeechNidoranResources, battlePosition); + case 1: + InitMonSpritesGfx_Mode1(sMonSpritesGfxManager, battlePosition); break; - case FALSE: + case 0: default: - OakSpeechNidoranFSetupTemplateDummy(sOakSpeechNidoranResources); + InitMonSpritesGfx_Mode0(sMonSpritesGfxManager); break; } } - if (flags & 2) + + // If either of the allocations failed free their respective members + if (failureFlags & ALLOC_FAIL_STRUCT) { - if (sOakSpeechNidoranResources->frameImages != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->frameImages); - if (sOakSpeechNidoranResources->templates != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->templates); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->frameImages); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->templates); } - if (flags & 1) + if (failureFlags & ALLOC_FAIL_BUFFER) { - if (sOakSpeechNidoranResources->bufferPtrs != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->bufferPtrs); - if (sOakSpeechNidoranResources->dataBuffer != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->dataBuffer); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spritePointers); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spriteBuffer); } - if (flags) + + if (failureFlags) { - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - FREE_AND_SET_NULL(sOakSpeechNidoranResources); + // Clear, something failed to allocate + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + FREE_AND_SET_NULL(sMonSpritesGfxManager); } else { - sOakSpeechNidoranResources->enable = 0xA3; + sMonSpritesGfxManager->active = GFX_MANAGER_ACTIVE; } - return sOakSpeechNidoranResources; + return sMonSpritesGfxManager; } -void OakSpeechNidoranFFreeResources(void) +void DestroyMonSpritesGfxManager(void) { - if (sOakSpeechNidoranResources != NULL) + if (sMonSpritesGfxManager != NULL) { - if (sOakSpeechNidoranResources->enable != 0xA3) + if (sMonSpritesGfxManager->active != GFX_MANAGER_ACTIVE) { - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - sOakSpeechNidoranResources = NULL; + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + sMonSpritesGfxManager = NULL; } else { - if (sOakSpeechNidoranResources->frameImages != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->frameImages); - if (sOakSpeechNidoranResources->templates != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->templates); - if (sOakSpeechNidoranResources->bufferPtrs != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->bufferPtrs); - if (sOakSpeechNidoranResources->dataBuffer != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->dataBuffer); - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - FREE_AND_SET_NULL(sOakSpeechNidoranResources); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->frameImages); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->templates); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spritePointers); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spriteBuffer); + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + FREE_AND_SET_NULL(sMonSpritesGfxManager); } } } -void *OakSpeechNidoranFGetBuffer(u8 bufferId) +u8 *MonSpritesGfxManager_GetSpritePtr(u8 spriteNum) { - if (sOakSpeechNidoranResources->enable != 0xA3) + if (sMonSpritesGfxManager->active != GFX_MANAGER_ACTIVE) { return NULL; } else { - if (bufferId >= (s8)sOakSpeechNidoranResources->spriteCount) - bufferId = 0; - return sOakSpeechNidoranResources->bufferPtrs[bufferId]; + if (spriteNum >= (s8)sMonSpritesGfxManager->numSprites) + spriteNum = 0; + return sMonSpritesGfxManager->spritePointers[spriteNum]; } } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index e0ba89e1d..49e94867b 100644 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2692,7 +2692,7 @@ void IsPokemonJumpSpeciesInParty(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (IsSpeciesAllowedInPokemonJump(species)) { gSpecialVar_Result = TRUE; diff --git a/src/pokemon_special_anim_scene.c b/src/pokemon_special_anim_scene.c index a2e58d761..216966921 100644 --- a/src/pokemon_special_anim_scene.c +++ b/src/pokemon_special_anim_scene.c @@ -49,16 +49,16 @@ static void Task_LevelUpVerticalSprites(u8 taskId); static void CreateLevelUpVerticalSprite(u8 taskId, s16 *data); static void SpriteCB_LevelUpVertical(struct Sprite *sprite); -static const u16 sBgPals_PSA_Any[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845963C.gbapal"); -static const u16 sBgPals_PSA_Anim4[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845965C.gbapal"); -static const u32 sBg3Tiles_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845967C.4bpp.lz"); -static const u32 sBg3Map_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845973C.bin.lz"); -static const u16 sSpritePals_LevelUpVertical[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459868.gbapal"); -static const u32 sSpriteTiles_LevelUpVertical[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459888.4bpp.lz"); -static const u16 sSpritePals_Star[] = INCBIN_U16("graphics/pokemon_special_anim/unk_84598A4.gbapal"); -static const u32 sSpriteTiles_Star[] = INCBIN_U32("graphics/pokemon_special_anim/unk_84598C4.4bpp.lz"); -static const u16 sSpritePals_UseItem_OutwardSpiralDots[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459940.gbapal"); -static const u32 sSpriteTiles_UseItem_OutwardSpiralDots[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459960.4bpp.lz"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg.gbapal"); +static const u16 sBg_TmHm_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg_tm_hm.gbapal"); +static const u32 sBg_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/pokemon_special_anim/bg.bin.lz"); +static const u16 sLevelUp_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/level_up.gbapal"); +static const u32 sLevelUp_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/level_up.4bpp.lz"); +static const u16 sStar_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/star.gbapal"); +static const u32 sStar_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/star.4bpp.lz"); +static const u16 sOutwardSpiralDots_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/outward_spiral_dots.gbapal"); +static const u32 sOutwardSpiralDots_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/outward_spiral_dots.4bpp.lz"); static const struct BgTemplate sBgTemplates[] = { { @@ -98,7 +98,7 @@ static const u8 *const s1_2_and_Poof_textPtrs[] = { gText_Poof, }; -static const u16 sUnref_84599A4[] = { +static const u16 sUnusedArray[] = { 0, 16, 68 }; @@ -116,24 +116,24 @@ static const s8 sStarCoordOffsets[][2] = { }; static const struct CompressedSpriteSheet sSpriteSheet_Star = { - sSpriteTiles_Star, + sStar_Gfx, 0x80, 2 }; static const struct SpritePalette sSpritePalette_Star = { - sSpritePals_Star, + sStar_Pal, 2 }; static const struct CompressedSpriteSheet sSpriteSheet_UseItem_OutwardSpiralDots = { - sSpriteTiles_UseItem_OutwardSpiralDots, + sOutwardSpiralDots_Gfx, 0x60, 5 }; static const struct SpritePalette sSpritePalette_UseItem_OutwardSpiralDots = { - sSpritePals_UseItem_OutwardSpiralDots, + sOutwardSpiralDots_Pal, 5 }; @@ -633,12 +633,12 @@ bool8 PSA_IsCopyingLevelUpWindowToVram(void) static void LoadBgGfxByAnimType(u16 animType) { - CopyToBgTilemapBuffer(3, sBg3Map_PSA, 0, 0x000); - DecompressAndCopyTileDataToVram(3, sBg3Tiles_PSA, 0, 0x000, 0); + CopyToBgTilemapBuffer(3, sBg_Tilemap, 0, 0x000); + DecompressAndCopyTileDataToVram(3, sBg_Gfx, 0, 0x000, 0); if (animType != 4) - LoadPalette(sBgPals_PSA_Any, 0x00, 0x20); + LoadPalette(sBg_Pal, 0x00, 0x20); else - LoadPalette(sBgPals_PSA_Anim4, 0x00, 0x20); + LoadPalette(sBg_TmHm_Pal, 0x00, 0x20); } void PSA_CreateMonSpriteAtCloseness(u8 closeness) @@ -1382,9 +1382,9 @@ void CreateLevelUpVerticalSpritesTask(u16 x, u16 y, u16 tileTag, u16 paletteTag, static struct SpritePalette spritePalette; u8 taskId; spriteSheet.tag = tileTag; - spriteSheet.data = sSpriteTiles_LevelUpVertical; - spriteSheet.size = sSpriteTiles_LevelUpVertical[0] >> 8; - spritePalette.data = sSpritePals_LevelUpVertical; + spriteSheet.data = sLevelUp_Gfx; + spriteSheet.size = sLevelUp_Gfx[0] >> 8; + spritePalette.data = sLevelUp_Pal; spritePalette.tag = paletteTag; LoadCompressedSpriteSheet(&spriteSheet); LoadSpritePalette(&spritePalette); diff --git a/src/pokemon_storage_system_data.c b/src/pokemon_storage_system_data.c index dd1502977..ed09bdb65 100644 --- a/src/pokemon_storage_system_data.c +++ b/src/pokemon_storage_system_data.c @@ -1031,7 +1031,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct Pokemon *mon = (struct Pokemon *)pokemon; - gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); + gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); if (gStorage->displayMonSpecies != SPECIES_NONE) { sanityIsBagEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); @@ -1054,7 +1054,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon; - gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2); + gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (gStorage->displayMonSpecies != SPECIES_NONE) { u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); diff --git a/src/pokemon_storage_system_graphics.c b/src/pokemon_storage_system_graphics.c index 9e97c0e6f..946b319d9 100644 --- a/src/pokemon_storage_system_graphics.c +++ b/src/pokemon_storage_system_graphics.c @@ -298,7 +298,7 @@ static u8 GetMonIconPriorityByCursorArea(void) void CreateMovingMonIcon(void) { u32 personality = GetMonData(&gStorage->movingMon, MON_DATA_PERSONALITY); - u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES2); + u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES_OR_EGG); u8 priority = GetMonIconPriorityByCursorArea(); gStorage->movingMonSprite = CreateMonIconSprite(species, personality, 0, 0, priority, 7); @@ -318,7 +318,7 @@ static void InitBoxMonSprites(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); @@ -344,7 +344,7 @@ static void InitBoxMonSprites(u8 boxId) void CreateBoxMonIconAtPos(u8 boxPosition) { - u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { @@ -567,7 +567,7 @@ static void SetBoxSpeciesAndPersonalities(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (gStorage->boxSpecies[boxPosition] != SPECIES_NONE) gStorage->boxPersonalities[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); boxPosition++; @@ -597,14 +597,14 @@ void SetBoxMonIconObjMode(u8 boxPosition, u8 objMode) void CreatePartyMonsSprites(bool8 visible) { u16 i, count; - u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG); u32 personality = GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY); gStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12); count = 1; for (i = 1; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); diff --git a/src/pokemon_storage_system_misc.c b/src/pokemon_storage_system_misc.c index 90bb93e43..9d219c7d2 100644 --- a/src/pokemon_storage_system_misc.c +++ b/src/pokemon_storage_system_misc.c @@ -400,7 +400,7 @@ static void MultiMove_DeselectRow(u8 row, u8 minColumn, u8 maxColumn) static void MultiMove_SetIconToBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY); if (species != SPECIES_NONE) @@ -414,7 +414,7 @@ static void MultiMove_SetIconToBg(u8 x, u8 y) static void MultiMove_ClearIconFromBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) FillWindowPixelRect8Bit(gStorage->multiMoveWindowId, PIXEL_FILL(0), 24 * x, 24 * y, 32, 32); diff --git a/src/pokemon_storage_system_tasks.c b/src/pokemon_storage_system_tasks.c index 4aa7bc454..06d0fb003 100644 --- a/src/pokemon_storage_system_tasks.c +++ b/src/pokemon_storage_system_tasks.c @@ -2680,12 +2680,12 @@ static void SetPokeStorageQuestLogEvent(u8 action) if (sInPartyMenu) { box2 = TOTAL_BOXES_COUNT; - species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES2); + species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES_OR_EGG); } else { box2 = StorageGetCurrentBox(); - species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES2); + species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES_OR_EGG); } questLogData = &gStorage->questLogData; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c56f243b2..3135621dc 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -58,7 +58,7 @@ static void PokeSum_SetHelpContext(void); static void Task_HandleInput_SelectMove(u8 id); static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void); static void PokeSum_CopyNewBgTilemapBeforePageFlip(void); -static void PokeSum_DrawBg3Tilemap(void); +static void PokeSum_DrawPageProgressTiles(void); static void PokeSum_PrintRightPaneText(void); static void PokeSum_PrintBottomPaneText(void); static void PokeSum_PrintAbilityDataOrMoveTypes(void); @@ -327,26 +327,25 @@ static EWRAM_DATA u8 sMoveSelectionCursorPos = 0; static EWRAM_DATA u8 sMoveSwapCursorPos = 0; static EWRAM_DATA struct MonPicBounceState * sMonPicBounceState = NULL; -extern const u32 gBgTilemap_TrainerMemo_Stats[]; -extern const u32 gBgTilemap_PokeSum_MovesListForDelete[]; -extern const u32 gBgTilemap_TrainerMemo_Details[]; -extern const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[]; -extern const u32 gBgTilemap_TrainerMemo_Egg[]; -extern const u16 gTrainerMemoPal1[]; -extern const u32 gPokeSumBgTiles[]; -extern const u16 gPokeSummary_ExpBarPals[]; -extern const u32 gPokeSummary_StatusAilmentIconTiles[]; -extern const u16 gPokeSummary_StatusAilmentIconPals[]; -extern const u32 gPokeSummary_HpBarTiles[]; -extern const u32 gPokeSummary_ExpBarTiles[]; -extern const u16 gPokeSummary_ExpBarPals[]; +extern const u32 gSummaryScreen_PageSkills_Tilemap[]; +extern const u32 gSummaryScreen_PageMoves_Tilemap[]; +extern const u32 gSummaryScreen_PageInfo_Tilemap[]; +extern const u32 gSummaryScreen_PageMovesInfo_Tilemap[]; +extern const u32 gSummaryScreen_PageEgg_Tilemap[]; +extern const u16 gSummaryScreen_Bg_Pal[]; +extern const u32 gSummaryScreen_Bg_Gfx[]; +extern const u16 gSummaryScreen_HpExpBar_Pal[]; +extern const u32 gSummaryScreen_StatusAilmentIcon_Gfx[]; +extern const u16 gSummaryScreen_StatusAilmentIcon_Pal[]; +extern const u32 gSummaryScreen_HpBar_Gfx[]; +extern const u32 gSummaryScreen_ExpBar_Gfx[]; -static const u32 sBgPal7[] = INCBIN_U32("graphics/interface/pokesummary_unk_84636C0.gbapal"); -static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/interface/pokesummary_unk_84636E0.gbapal"); -static const u32 sBgPal8[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463700.gbapal"); -static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463720.gbapal"); -static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463740.4bpp.lz"); -static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/interface/pokesummary_unk_846386C.4bpp.lz"); +static const u32 sTextHeaderPalette[] = INCBIN_U32("graphics/summary_screen/text_header.gbapal"); +static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/summary_screen/marking.gbapal"); +static const u32 sTextMovesPalette[] = INCBIN_U32("graphics/summary_screen/text_moves.gbapal"); +static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/summary_screen/move_selection_cursor.gbapal"); +static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_left.4bpp.lz"); +static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_right.4bpp.lz"); static const struct OamData sMoveSelectionCursorOamData = { @@ -560,8 +559,8 @@ static const union AnimCmd * const sHpOrExpBarAnimTable[] = sHpOrExpAnim_11 }; -static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463AAC.gbapal"); -static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463ACC.gbapal"); +static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/summary_screen/hp_bar_yellow.gbapal"); +static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/summary_screen/hp_bar_red.gbapal"); static const struct OamData sPokerusIconObjOamData = { .y = 0, @@ -589,8 +588,8 @@ static const union AnimCmd * const sPokerusIconObjAnimTable[] = sPokerusIconObjAnim0 }; -static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463B00.gbapal"); -static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463B20.4bpp.lz"); +static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/summary_screen/pokerus_cured.gbapal"); +static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/summary_screen/pokerus_cured.4bpp.lz"); static const struct OamData sStarObjOamData = { @@ -619,10 +618,10 @@ static const union AnimCmd * const sStarObjAnimTable[] = sStarObjAnim0 }; -static const u16 sStarObjPal[] = INCBIN_U16( "graphics/interface/pokesummary_unk_8463B44.gbapal"); -static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B64.4bpp.lz"); -static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B88.bin.lz"); -static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463C80.bin.lz"); +static const u16 sStarObjPal[] = INCBIN_U16( "graphics/summary_screen/shiny_star.gbapal"); +static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/summary_screen/shiny_star.4bpp.lz"); +static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/summary_screen/moves_info_page.bin.lz"); +static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/summary_screen/moves_page.bin.lz"); #include "data/text/nature_names.h" @@ -959,7 +958,7 @@ static const s8 sEggPicShakeXDelta_AlmostReadyToHatch[] = static const u16 * const sHpBarPals[] = { - gPokeSummary_ExpBarPals, + gSummaryScreen_HpExpBar_Pal, sPokeSummary_HpBarPalYellow, sPokeSummary_HpBarPalRed, }; @@ -1262,7 +1261,7 @@ static void Task_PokeSum_FlipPages(u8 taskId) case 2: PokeSum_CopyNewBgTilemapBeforePageFlip_2(); PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex); break; case 3: @@ -1358,7 +1357,7 @@ static void Task_FlipPages_FromInfo(u8 taskId) PokeSum_HideSpritesBeforePageFlip(); PokeSum_UpdateWin1ActiveFlag(sMonSummaryScreen->curPageIndex); PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_CopyNewBgTilemapBeforePageFlip_2(); break; case 3: @@ -1510,7 +1509,7 @@ static void Task_BackOutOfSelectMove(u8 taskId) break; case 10: PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); CopyBgTilemapBufferToVram(3); PokeSum_ShowSpritesBeforePageFlip(); break; @@ -1838,24 +1837,24 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void) switch (newPage) { case PSS_PAGE_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_SKILLS: if (sMonSummaryScreen->pageFlipDirection == 1) - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); else - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); break; case PSS_PAGE_MOVES: if (sMonSummaryScreen->pageFlipDirection == 1) - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0); else - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_MOVES_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); break; } } @@ -1872,7 +1871,7 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip(void) switch (newPage) { case PSS_PAGE_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_SKILLS: break; @@ -1933,22 +1932,22 @@ static void CB2_SetUpPSS(void) else CopyToBgTilemapBuffer(3, sBgTilemap_MovesInfoPage, 0, 0); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); break; case 11: if (sMonSummaryScreen->isEgg) - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0); else { if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE || sMonSummaryScreen->mode == PSS_MODE_FORGET_MOVE) { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0); } else { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } } @@ -2007,28 +2006,28 @@ static u8 PokeSum_HandleLoadBgGfx(void) switch (sMonSummaryScreen->loadBgGfxStep) { case 0: - LoadPalette(gTrainerMemoPal1, 0, 0x20 * 5); + LoadPalette(gSummaryScreen_Bg_Pal, 0, 0x20 * 5); if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20); } break; case 1: ListMenuLoadStdPalAt(0x60, 1); - LoadPalette(sBgPal7, 0x70, 0x20); + LoadPalette(sTextHeaderPalette, 0x70, 0x20); break; case 2: ResetTempTileDataBuffers(); break; case 3: - DecompressAndCopyTileDataToVram(2, gPokeSumBgTiles, 0, 0, 0); + DecompressAndCopyTileDataToVram(2, gSummaryScreen_Bg_Gfx, 0, 0, 0); break; case 4: if (FreeTempTileDataBuffersIfPossible() == TRUE) @@ -2040,7 +2039,7 @@ static u8 PokeSum_HandleLoadBgGfx(void) break; default: - LoadPalette(sBgPal8, 0x80, 0x20); + LoadPalette(sTextMovesPalette, 0x80, 0x20); return TRUE; } @@ -2105,15 +2104,15 @@ static void BufferMonInfo(void) return; } - sMonSummaryScreen->monTypes[0] = gBaseStats[dexNum].type1; - sMonSummaryScreen->monTypes[1] = gBaseStats[dexNum].type2; + sMonSummaryScreen->monTypes[0] = gSpeciesInfo[dexNum].types[0]; + sMonSummaryScreen->monTypes[1] = gSpeciesInfo[dexNum].types[1]; GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_NICKNAME, tempStr); StringCopyN_Multibyte(sMonSummaryScreen->summary.nicknameStrBuf, tempStr, POKEMON_NAME_LENGTH); StringGet_Nickname(sMonSummaryScreen->summary.nicknameStrBuf); gender = GetMonGender(&sMonSummaryScreen->currentMon); - dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); if (gender == MON_FEMALE) StringCopy(sMonSummaryScreen->summary.genderSymbolStrBuf, gText_FemaleSymbol); @@ -2224,7 +2223,7 @@ static void BufferMonSkills(void) if (level < 100) { species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES); - expToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - exp; + expToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - exp; } ConvertIntToDecimalStringN(sMonSummaryScreen->summary.expToNextLevelStrBuf, expToNextLevel, STR_CONV_MODE_LEFT_ALIGN, 7); @@ -2646,7 +2645,7 @@ static void PokeSum_PrintTrainerMemo_Mon_HeldByOT(void) // but Japanese uses different grammar for Bold and Gentle natures. if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // Hatched { - if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter + if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) { if (PokeSum_IsMonBoldOrGentle(nature)) DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_FatefulEncounterHatched_BoldGentleGrammar); @@ -2743,7 +2742,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void) // but Japanese uses different grammar for Bold and Gentle natures. if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // hatched from an EGG { - if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter + if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) { if (PokeSum_IsMonBoldOrGentle(nature)) DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_ApparentlyFatefulEncounterHatched_BoldGentleGrammar); @@ -2797,7 +2796,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void) if (sMonSummaryScreen->monList.mons != gEnemyParty) { - if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) + if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) chosenStrIndex = 4; else { @@ -2815,7 +2814,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void) } else { - if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) + if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) chosenStrIndex = 4; else { @@ -3272,86 +3271,86 @@ static u8 PokeSum_BufferOtName_IsEqualToCurrentOwner(struct Pokemon * mon) return TRUE; } -#define SUB_8138538_BASE_TILE_NUM (345) +#define PAGE_PROGRESS_BASE_TILE_NUM (345) -static void PokeSum_DrawBg3Tilemap(void) +static void PokeSum_DrawPageProgressTiles(void) { switch (sMonSummaryScreen->curPageIndex) { case PSS_PAGE_INFO: if (!sMonSummaryScreen->isEgg) { - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 20 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 36 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 20 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 36 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); } else { - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 2 + SUB_8138538_BASE_TILE_NUM, 15, 0, 4, 2, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 2 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 4, 2, 0); } break; case PSS_PAGE_SKILLS: - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; case PSS_PAGE_MOVES: - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; case PSS_PAGE_MOVES_INFO: if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE) { - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 13, 0, 4, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 13, 1, 4, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 4, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 4, 1, 0); } else { - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); } - FillBgTilemapBufferRect(3, 50 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 66 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 50 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 66 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; } } @@ -4014,7 +4013,7 @@ static void PokeSum_CreateMonPicSprite(void) sMonPicBounceState = AllocZeroed(sizeof(struct MonPicBounceState)); - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY); trainerId = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_OT_ID); @@ -4142,7 +4141,7 @@ static void PokeSum_CreateMonIconSprite(void) u16 species; u32 personality; - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY); SafeLoadMonIconPalette(species); @@ -4178,7 +4177,7 @@ static void PokeSum_ShowOrHideMonIconSprite(bool8 invisible) static void PokeSum_DestroyMonIconSprite(void) { u16 species; - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); SafeFreeMonIconPalette(species); DestroyMonIcon(&gSprites[sMonSummaryScreen->monIconSpriteId]); } @@ -4309,7 +4308,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag) sStatusIcon = AllocZeroed(sizeof(struct MonStatusIconObj)); gfxBufferPtr = AllocZeroed(0x20 * 32); - LZ77UnCompWram(gPokeSummary_StatusAilmentIconTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_StatusAilmentIcon_Gfx, gfxBufferPtr); if (sStatusIcon != NULL) { @@ -4319,7 +4318,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag) .tag = tileTag }; - struct SpritePalette palette = {.data = gPokeSummary_StatusAilmentIconPals, .tag = palTag}; + struct SpritePalette palette = {.data = gSummaryScreen_StatusAilmentIcon_Pal, .tag = palTag}; struct SpriteTemplate template = { .tileTag = tileTag, .paletteTag = palTag, @@ -4401,7 +4400,7 @@ static void CreateHpBarObjs(u16 tileTag, u16 palTag) sHpBarObjs = AllocZeroed(sizeof(struct HpBarObjs)); gfxBufferPtr = AllocZeroed(0x20 * 12); - LZ77UnCompWram(gPokeSummary_HpBarTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_HpBar_Gfx, gfxBufferPtr); curHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_HP); maxHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MAX_HP); @@ -4559,7 +4558,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag) sExpBarObjs = AllocZeroed(sizeof(struct ExpBarObjs)); gfxBufferPtr = AllocZeroed(0x20 * 12); - LZ77UnCompWram(gPokeSummary_ExpBarTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_ExpBar_Gfx, gfxBufferPtr); if (gfxBufferPtr != NULL) { struct SpriteSheet sheet = { @@ -4568,7 +4567,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag) .tag = tileTag }; - struct SpritePalette palette = {.data = gPokeSummary_ExpBarPals, .tag = palTag}; + struct SpritePalette palette = {.data = gSummaryScreen_HpExpBar_Pal, .tag = palTag}; LoadSpriteSheet(&sheet); LoadSpritePalette(&palette); } @@ -4622,8 +4621,8 @@ static void UpdateExpBarObjs(void) if (level < 100) { - totalExpToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - gExperienceTables[gBaseStats[species].growthRate][level]; - curExpToNextLevel = exp - gExperienceTables[gBaseStats[species].growthRate][level]; + totalExpToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - gExperienceTables[gSpeciesInfo[species].growthRate][level]; + curExpToNextLevel = exp - gExperienceTables[gSpeciesInfo[species].growthRate][level]; pointsPerTile = ((totalExpToNextLevel << 2) / 8); totalPoints = (curExpToNextLevel << 2); @@ -5079,13 +5078,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20); } sMonSummaryScreen->switchMonTaskState++; @@ -5095,13 +5094,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) { if (sMonSummaryScreen->isEgg) { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } else { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } } sMonSummaryScreen->switchMonTaskState++; @@ -5130,7 +5129,7 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) break; case 9: PokeSum_PrintMonTypeIcons(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex); sMonSummaryScreen->switchMonTaskState++; break; @@ -5183,9 +5182,9 @@ static void PokeSum_TryPlayMonCry(void) if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG)) { if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE) - PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_NORMAL); else - PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_WEAK); } } diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index ee6dffcbd..60696d810 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -61,7 +61,7 @@ struct GFRomHeader u32 externalEventFlagsOffset; u32 externalEventDataOffset; u32 unk18; - const struct BaseStats * baseStats; + const struct SpeciesInfo * speciesInfo; const u8 (* abilityNames)[]; const u8 *const * abilityDescriptions; const struct Item * items; @@ -146,7 +146,7 @@ static const struct GFRomHeader sGFRomHeader = { .externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags), .externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData), .unk18 = 0x00000000, - .baseStats = gBaseStats, + .speciesInfo = gSpeciesInfo, .abilityNames = gAbilityNames, .abilityDescriptions = gAbilityDescriptionPointers, .items = gItems, diff --git a/src/save.c b/src/save.c index 08b8465b7..07def36e4 100644 --- a/src/save.c +++ b/src/save.c @@ -7,6 +7,7 @@ #include "link.h" #include "save_failed_screen.h" #include "fieldmap.h" +#include "pokemon_storage_system.h" #include "gba/flash_internal.h" static u8 HandleWriteSector(u16 sectorId, const struct SaveSectorLocation *locations); diff --git a/src/scrcmd.c b/src/scrcmd.c index 5d68549f1..7fad88fd0 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2222,21 +2222,21 @@ bool8 ScrCmd_normalmsg(struct ScriptContext * ctx) return FALSE; } -// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it. -bool8 ScrCmd_setmoneventlegal(struct ScriptContext * ctx) +// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it. +bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext * ctx) { - bool8 isEventLegal = TRUE; + bool8 isModernFatefulEncounter = TRUE; u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); return FALSE; } -bool8 ScrCmd_checkmoneventlegal(struct ScriptContext * ctx) +bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext * ctx) { u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL); + gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index 483ac88b2..7c0d83ab6 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -14,6 +14,10 @@ #include "constants/seagallop.h" #include "constants/menu.h" +#define GFXTAG_FOSSIL 7000 + +#define MULTICHOICE(name) {.list = name, .count = ARRAY_COUNT(name)} + struct MultichoiceListStruct { const struct MenuAction * list; @@ -35,59 +39,59 @@ static void DestroyScriptMenuWindow(u8 windowId); static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); -static const struct MenuAction sScriptMultiChoiceMenu_YesNo[] = { +static const struct MenuAction sMultichoiceList_YesNo[] = { { gText_Yes }, { gText_No } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerCardIconTint[] = { +static const struct MenuAction sMultichoiceList_TrainerCardIconTint[] = { { gText_Normal }, { gText_Black }, { gText_Pink }, { gText_Sepia } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Quit[] = { { gText_HallOfFame }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Quit[] = { +static const struct MenuAction sMultichoiceList_Eggs_Quit[] = { { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_Victories_Quit[] = { { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Eggs_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Victories_Quit[] = { { gText_HallOfFame }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_Eggs_Victories_Quit[] = { { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Eggs_Victories_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] = { +static const struct MenuAction sMultichoiceList_TrainerSchoolWhiteboard[] = { { gText_Slp }, { gText_Psn }, { gText_Par }, @@ -96,13 +100,13 @@ static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo[] = { +static const struct MenuAction sMultichoiceList_YesNoInfo[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[] = { +static const struct MenuAction sMultichoiceList_SingleDoubleMultiInfoExit[] = { { gText_SingleBattle }, { gText_DoubleBattle }, { gText_MultiBattle }, @@ -110,59 +114,59 @@ static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[ { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo2[] = { +static const struct MenuAction sMultichoiceList_YesNoInfo2[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_ChallengeInfoExit[] = { +static const struct MenuAction sMultichoiceList_ChallengeInfoExit[] = { { gText_MakeAChallenge }, { gText_Info_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_RooftopB1F[] = { +static const struct MenuAction sMultichoiceList_RooftopB1F[] = { { gText_Rooftop }, { gText_B1F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Helix[] = { +static const struct MenuAction sMultichoiceList_Helix[] = { { gText_HelixFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Dome[] = { +static const struct MenuAction sMultichoiceList_Dome[] = { { gText_DomeFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Amber[] = { +static const struct MenuAction sMultichoiceList_Amber[] = { { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HelixAmber[] = { +static const struct MenuAction sMultichoiceList_HelixAmber[] = { { gText_HelixFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_DomeAmber[] = { +static const struct MenuAction sMultichoiceList_DomeAmber[] = { { gText_DomeFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_CeladonVendingMachine[] = { +static const struct MenuAction sMultichoiceList_CeladonVendingMachine[] = { { gText_FreshWater_200 }, { gText_SodaPop_300 }, { gText_Lemonade_350 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerTMPrizes[] = { { gText_Tm13_4000Coins }, { gText_Tm23_3500Coins }, { gText_Tm24_4000Coins }, @@ -171,7 +175,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerBattleItemPrizes[] = { { gText_SmokeBall_800Coins }, { gText_MiracleSeed_1000Coins }, { gText_Charcoal_1000Coins }, @@ -180,23 +184,23 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter[] = { +static const struct MenuAction sMultichoiceList_GameCornerCoinPurchaseCounter[] = { { gText_50Coins_1000 }, { gText_500Coins_10000 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Excellent_NotSoBad[] = { +static const struct MenuAction sMultichoiceList_Excellent_NotSoBad[] = { { gText_Excellent }, { gText_NotSoBad } }; -static const struct MenuAction sScriptMultiChoiceMenu_RightLeft[] = { +static const struct MenuAction sMultichoiceList_RightLeft[] = { { gText_Right }, { gText_Left } }; -static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { +static const struct MenuAction sMultichoiceList_DeptStoreElevator[] = { { gText_5F_2 }, { gText_4F_2 }, { gText_3F_2 }, @@ -205,91 +209,91 @@ static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWater[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWater[] = { { gText_FreshWater }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPop[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlSodaPop[] = { { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterSodaPop[] = { { gText_FreshWater }, { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlLemonade[] = { { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterLemonade[] = { { gText_FreshWater }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlSodaPopLemonade[] = { { gText_SodaPop }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterSodaPopLemonade[] = { { gText_FreshWater }, { gText_SodaPop }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_0[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_0[] = { { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_1[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_1[] = { { gText_RedShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_2[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_2[] = { { gText_YellowShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_3[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_3[] = { { gText_RedShard }, { gText_YellowShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_4[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_4[] = { { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_5[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_5[] = { { gText_RedShard }, { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_6[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_6[] = { { gText_YellowShard }, { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_7[] = { { gText_RedShard }, { gText_YellowShard }, { gText_BlueShard }, @@ -297,7 +301,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { +static const struct MenuAction sMultichoiceList_Eeveelutions[] = { { gText_Eevee }, { gText_Flareon }, { gText_Jolteon }, @@ -305,12 +309,12 @@ static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { { gText_QuitLooking } }; -static const struct MenuAction sScriptMultiChoiceMenu_BikeShop[] = { +static const struct MenuAction sMultichoiceList_BikeShop[] = { { gText_Bicycle_Price }, { gText_NoThanks } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerPokemonPrizes[] = { #if defined(FIRERED) { gText_Abra_180Coins }, { gText_Clefairy_500Coins }, @@ -327,81 +331,81 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeCenter_Colosseum[] = { +static const struct MenuAction sMultichoiceList_TradeCenter_Colosseum[] = { { gText_TradeCenter }, { gText_Colosseum }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Link_Wireless[] = { +static const struct MenuAction sMultichoiceList_Link_Wireless[] = { { gText_GameLinkCable }, { gText_Wireless }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_RocketHideoutElevator[] = { +static const struct MenuAction sMultichoiceList_RocketHideoutElevator[] = { { gText_B1F }, { gText_B2F }, { gText_B4F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_LinkedDirectUnion[] = { +static const struct MenuAction sMultichoiceList_LinkedDirectUnion[] = { { gText_LinkedGamePlay }, { gText_DirectCorner }, { gText_UnionRoom }, { gOtherText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island23[] = { +static const struct MenuAction sMultichoiceList_Island23[] = { { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island13[] = { +static const struct MenuAction sMultichoiceList_Island13[] = { { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island12[] = { +static const struct MenuAction sMultichoiceList_Island12[] = { { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumCrush[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_BerryCrush }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_48[] = { +static const struct MenuAction sMultichoiceList_48[] = { { gText_EmptyLinkService1 }, { gText_EmptyLinkService2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseum_2[] = { +static const struct MenuAction sMultichoiceList_TradeColosseum_2[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_PokejumpDodrio[] = { +static const struct MenuAction sMultichoiceList_PokejumpDodrio[] = { { gText_PokemonJump }, { gText_DodrioBerryPicking }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Mushrooms[] = { +static const struct MenuAction sMultichoiceList_Mushrooms[] = { { gText_2Tinymushrooms }, { gText_1BigMushroom } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumBlankCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_RecordCorner }, @@ -409,78 +413,78 @@ static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlank[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumBlank[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_RecordCorner }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavel[] = { +static const struct MenuAction sMultichoiceList_SeviiNavel[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiBirth[] = { +static const struct MenuAction sMultichoiceList_SeviiBirth[] = { { gText_SeviiIslands }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { +static const struct MenuAction sMultichoiceList_SeviiNavelBirth[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Seagallop123[] = { +static const struct MenuAction sMultichoiceList_Seagallop123[] = { { gText_OneIsland }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV23[] = { +static const struct MenuAction sMultichoiceList_SeagallopV23[] = { { gText_Vermilion }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV13[] = { +static const struct MenuAction sMultichoiceList_SeagallopV13[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV12[] = { +static const struct MenuAction sMultichoiceList_SeagallopV12[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopVermilion[] = { +static const struct MenuAction sMultichoiceList_SeagallopVermilion[] = { { gText_Vermilion }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_62[] = { +static const struct MenuAction sMultichoiceList_62[] = { { gText_Multichoice_Empty1 }, { gText_Multichoice_Empty2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_JoinOrLead[] = { +static const struct MenuAction sMultichoiceList_JoinOrLead[] = { { gText_JoinGroup }, { gText_BecomeLeader }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { +static const struct MenuAction sMultichoiceList_TrainerTowerMode[] = { { gOtherText_Single }, { gOtherText_Double }, { gOtherText_Knockout }, @@ -488,76 +492,76 @@ static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Exit[] = { +static const struct MenuAction sMultichoiceList_Exit[] = { { gOtherText_Exit } }; -const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { - { sScriptMultiChoiceMenu_YesNo, NELEMS(sScriptMultiChoiceMenu_YesNo) }, - { sScriptMultiChoiceMenu_Eeveelutions, NELEMS(sScriptMultiChoiceMenu_Eeveelutions) }, - { sScriptMultiChoiceMenu_TrainerCardIconTint, NELEMS(sScriptMultiChoiceMenu_TrainerCardIconTint) }, - { sScriptMultiChoiceMenu_HOF_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Quit) }, - { sScriptMultiChoiceMenu_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Quit) }, - { sScriptMultiChoiceMenu_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Victories_Quit) }, - { sScriptMultiChoiceMenu_HOF_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Quit) }, - { sScriptMultiChoiceMenu_HOF_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Victories_Quit) }, - { sScriptMultiChoiceMenu_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Victories_Quit) }, - { sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_BikeShop, NELEMS(sScriptMultiChoiceMenu_BikeShop) }, - { sScriptMultiChoiceMenu_GameCornerPokemonPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerPokemonPrizes) }, - { sScriptMultiChoiceMenu_TrainerSchoolWhiteboard, NELEMS(sScriptMultiChoiceMenu_TrainerSchoolWhiteboard) }, - { sScriptMultiChoiceMenu_YesNoInfo, NELEMS(sScriptMultiChoiceMenu_YesNoInfo) }, - { sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit, NELEMS(sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit) }, - { sScriptMultiChoiceMenu_YesNoInfo2, NELEMS(sScriptMultiChoiceMenu_YesNoInfo2) }, - { sScriptMultiChoiceMenu_ChallengeInfoExit, NELEMS(sScriptMultiChoiceMenu_ChallengeInfoExit) }, - { sScriptMultiChoiceMenu_RooftopB1F, NELEMS(sScriptMultiChoiceMenu_RooftopB1F) }, - { sScriptMultiChoiceMenu_Helix, NELEMS(sScriptMultiChoiceMenu_Helix) }, - { sScriptMultiChoiceMenu_Dome, NELEMS(sScriptMultiChoiceMenu_Dome) }, - { sScriptMultiChoiceMenu_Amber, NELEMS(sScriptMultiChoiceMenu_Amber) }, - { sScriptMultiChoiceMenu_HelixAmber, NELEMS(sScriptMultiChoiceMenu_HelixAmber) }, - { sScriptMultiChoiceMenu_DomeAmber, NELEMS(sScriptMultiChoiceMenu_DomeAmber) }, - { sScriptMultiChoiceMenu_CeladonVendingMachine, NELEMS(sScriptMultiChoiceMenu_CeladonVendingMachine) }, - { sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter, NELEMS(sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter) }, - { sScriptMultiChoiceMenu_Excellent_NotSoBad, NELEMS(sScriptMultiChoiceMenu_Excellent_NotSoBad) }, - { sScriptMultiChoiceMenu_RightLeft, NELEMS(sScriptMultiChoiceMenu_RightLeft) }, - { sScriptMultiChoiceMenu_GameCornerTMPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerTMPrizes) }, - { sScriptMultiChoiceMenu_DeptStoreElevator, NELEMS(sScriptMultiChoiceMenu_DeptStoreElevator) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWater, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWater) }, - { sScriptMultiChoiceMenu_ThirstyGirlSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPop) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop) }, - { sScriptMultiChoiceMenu_ThirstyGirlLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade) }, - { sScriptMultiChoiceMenu_TradeCenter_Colosseum, NELEMS(sScriptMultiChoiceMenu_TradeCenter_Colosseum) }, - { sScriptMultiChoiceMenu_Link_Wireless, NELEMS(sScriptMultiChoiceMenu_Link_Wireless) }, - { sScriptMultiChoiceMenu_GameCornerBattleItemPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerBattleItemPrizes) }, - { sScriptMultiChoiceMenu_RocketHideoutElevator, NELEMS(sScriptMultiChoiceMenu_RocketHideoutElevator) }, - { sScriptMultiChoiceMenu_LinkedDirectUnion, NELEMS(sScriptMultiChoiceMenu_LinkedDirectUnion) }, - { sScriptMultiChoiceMenu_Island23, NELEMS(sScriptMultiChoiceMenu_Island23) }, - { sScriptMultiChoiceMenu_Island13, NELEMS(sScriptMultiChoiceMenu_Island13) }, - { sScriptMultiChoiceMenu_Island12, NELEMS(sScriptMultiChoiceMenu_Island12) }, - { sScriptMultiChoiceMenu_TradeColosseumCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumCrush) }, - { sScriptMultiChoiceMenu_48, NELEMS(sScriptMultiChoiceMenu_48) }, - { sScriptMultiChoiceMenu_PokejumpDodrio, NELEMS(sScriptMultiChoiceMenu_PokejumpDodrio) }, - { sScriptMultiChoiceMenu_TradeColosseum_2, NELEMS(sScriptMultiChoiceMenu_TradeColosseum_2) }, - { sScriptMultiChoiceMenu_Mushrooms, NELEMS(sScriptMultiChoiceMenu_Mushrooms) }, - { sScriptMultiChoiceMenu_TradeColosseumBlankCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlankCrush) }, - { sScriptMultiChoiceMenu_TradeColosseumBlank, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlank) }, - { sScriptMultiChoiceMenu_SeviiNavel, NELEMS(sScriptMultiChoiceMenu_SeviiNavel) }, - { sScriptMultiChoiceMenu_SeviiBirth, NELEMS(sScriptMultiChoiceMenu_SeviiBirth) }, - { sScriptMultiChoiceMenu_SeviiNavelBirth, NELEMS(sScriptMultiChoiceMenu_SeviiNavelBirth) }, - { sScriptMultiChoiceMenu_Seagallop123, NELEMS(sScriptMultiChoiceMenu_Seagallop123) }, - { sScriptMultiChoiceMenu_SeagallopV23, NELEMS(sScriptMultiChoiceMenu_SeagallopV23) }, - { sScriptMultiChoiceMenu_SeagallopV13, NELEMS(sScriptMultiChoiceMenu_SeagallopV13) }, - { sScriptMultiChoiceMenu_SeagallopV12, NELEMS(sScriptMultiChoiceMenu_SeagallopV12) }, - { sScriptMultiChoiceMenu_SeagallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeagallopVermilion) }, - { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, - { sScriptMultiChoiceMenu_JoinOrLead, NELEMS(sScriptMultiChoiceMenu_JoinOrLead) }, - { sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) } +static const struct MultichoiceListStruct sMultichoiceLists[] = { + [MULTICHOICE_YES_NO] = MULTICHOICE(sMultichoiceList_YesNo), + [MULTICHOICE_EEVEELUTIONS] = MULTICHOICE(sMultichoiceList_Eeveelutions), + [MULTICHOICE_TRAINER_CARD_ICON_TINT] = MULTICHOICE(sMultichoiceList_TrainerCardIconTint), + [MULTICHOICE_HOF_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Quit), + [MULTICHOICE_EGGS_QUIT] = MULTICHOICE(sMultichoiceList_Eggs_Quit), + [MULTICHOICE_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_Victories_Quit), + [MULTICHOICE_HOF_EGGS_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Eggs_Quit), + [MULTICHOICE_HOF_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Victories_Quit), + [MULTICHOICE_EGGS_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_Eggs_Victories_Quit), + [MULTICHOICE_HOF_EGGS_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Eggs_Victories_Quit), + [MULTICHOICE_EXIT] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_EXIT_2] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_EXIT_3] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_BIKE_SHOP] = MULTICHOICE(sMultichoiceList_BikeShop), + [MULTICHOICE_GAME_CORNER_POKEMON_PRIZES] = MULTICHOICE(sMultichoiceList_GameCornerPokemonPrizes), + [MULTICHOICE_TRAINER_SCHOOL_WHITEBOARD] = MULTICHOICE(sMultichoiceList_TrainerSchoolWhiteboard), + [MULTICHOICE_YES_NO_INFO] = MULTICHOICE(sMultichoiceList_YesNoInfo), + [MULTICHOICE_SINGLE_DOUBLE_MULTI_INFO_EXIT] = MULTICHOICE(sMultichoiceList_SingleDoubleMultiInfoExit), + [MULTICHOICE_YES_NO_INFO_2] = MULTICHOICE(sMultichoiceList_YesNoInfo2), + [MULTICHOICE_CHALLENGE_INFO_EXIT] = MULTICHOICE(sMultichoiceList_ChallengeInfoExit), + [MULTICHOICE_ROOFTOP_B1F] = MULTICHOICE(sMultichoiceList_RooftopB1F), + [MULTICHOICE_HELIX] = MULTICHOICE(sMultichoiceList_Helix), + [MULTICHOICE_DOME] = MULTICHOICE(sMultichoiceList_Dome), + [MULTICHOICE_AMBER] = MULTICHOICE(sMultichoiceList_Amber), + [MULTICHOICE_HELIX_AMBER] = MULTICHOICE(sMultichoiceList_HelixAmber), + [MULTICHOICE_DOME_AMBER] = MULTICHOICE(sMultichoiceList_DomeAmber), + [MULTICHOICE_CELADON_VENDING_MACHINE] = MULTICHOICE(sMultichoiceList_CeladonVendingMachine), + [MULTICHOICE_GAME_CORNER_COIN_PURCHASE_COUNTER] = MULTICHOICE(sMultichoiceList_GameCornerCoinPurchaseCounter), + [MULTICHOICE_EXCELLENT_NOT_SO_BAD] = MULTICHOICE(sMultichoiceList_Excellent_NotSoBad), + [MULTICHOICE_RIGHT_LEFT] = MULTICHOICE(sMultichoiceList_RightLeft), + [MULTICHOICE_GAME_CORNER_TMPRIZES] = MULTICHOICE(sMultichoiceList_GameCornerTMPrizes), + [MULTICHOICE_DEPT_STORE_ELEVATOR] = MULTICHOICE(sMultichoiceList_DeptStoreElevator), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWater), + [MULTICHOICE_THIRSTY_GIRL_SODA_POP] = MULTICHOICE(sMultichoiceList_ThirstyGirlSodaPop), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterSodaPop), + [MULTICHOICE_THIRSTY_GIRL_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlLemonade), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterLemonade), + [MULTICHOICE_THIRSTY_GIRL_SODA_POP_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlSodaPopLemonade), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterSodaPopLemonade), + [MULTICHOICE_TRADE_CENTER_COLOSSEUM] = MULTICHOICE(sMultichoiceList_TradeCenter_Colosseum), + [MULTICHOICE_LINK_WIRELESS] = MULTICHOICE(sMultichoiceList_Link_Wireless), + [MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES] = MULTICHOICE(sMultichoiceList_GameCornerBattleItemPrizes), + [MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR] = MULTICHOICE(sMultichoiceList_RocketHideoutElevator), + [MULTICHOICE_LINKED_DIRECT_UNION] = MULTICHOICE(sMultichoiceList_LinkedDirectUnion), + [MULTICHOICE_ISLAND_23] = MULTICHOICE(sMultichoiceList_Island23), + [MULTICHOICE_ISLAND_13] = MULTICHOICE(sMultichoiceList_Island13), + [MULTICHOICE_ISLAND_12] = MULTICHOICE(sMultichoiceList_Island12), + [MULTICHOICE_TRADE_COLOSSEUM_CRUSH] = MULTICHOICE(sMultichoiceList_TradeColosseumCrush), + [MULTICHOICE_48] = MULTICHOICE(sMultichoiceList_48), + [MULTICHOICE_POKEJUMP_DODRIO] = MULTICHOICE(sMultichoiceList_PokejumpDodrio), + [MULTICHOICE_TRADE_COLOSSEUM_2] = MULTICHOICE(sMultichoiceList_TradeColosseum_2), + [MULTICHOICE_MUSHROOMS] = MULTICHOICE(sMultichoiceList_Mushrooms), + [MULTICHOICE_TRADE_COLOSSEUM_BLANK_CRUSH] = MULTICHOICE(sMultichoiceList_TradeColosseumBlankCrush), + [MULTICHOICE_TRADE_COLOSSEUM_BLANK] = MULTICHOICE(sMultichoiceList_TradeColosseumBlank), + [MULTICHOICE_SEVII_NAVEL] = MULTICHOICE(sMultichoiceList_SeviiNavel), + [MULTICHOICE_SEVII_BIRTH] = MULTICHOICE(sMultichoiceList_SeviiBirth), + [MULTICHOICE_SEVII_NAVEL_BIRTH] = MULTICHOICE(sMultichoiceList_SeviiNavelBirth), + [MULTICHOICE_SEAGALLOP_123] = MULTICHOICE(sMultichoiceList_Seagallop123), + [MULTICHOICE_SEAGALLOP_V23] = MULTICHOICE(sMultichoiceList_SeagallopV23), + [MULTICHOICE_SEAGALLOP_V13] = MULTICHOICE(sMultichoiceList_SeagallopV13), + [MULTICHOICE_SEAGALLOP_V12] = MULTICHOICE(sMultichoiceList_SeagallopV12), + [MULTICHOICE_SEAGALLOP_VERMILION] = MULTICHOICE(sMultichoiceList_SeagallopVermilion), + [MULTICHOICE_62] = MULTICHOICE(sMultichoiceList_62), + [MULTICHOICE_JOIN_OR_LEAD] = MULTICHOICE(sMultichoiceList_JoinOrLead), + [MULTICHOICE_TRAINER_TOWER_MODE] = MULTICHOICE(sMultichoiceList_TrainerTowerMode), }; // From Cool to Berries goes unused @@ -627,8 +631,8 @@ static const struct OamData sMuseumFossilOamData = { }; static const struct SpriteTemplate sMuseumFossilSprTemplate = { - .tileTag = 7000, - .paletteTag = 0xFFFF, + .tileTag = GFXTAG_FOSSIL, + .paletteTag = TAG_NONE, .oam = &sMuseumFossilOamData, .anims = sMuseumFossilAnimCmdTable, .affineAnims = gDummySpriteAffineAnimTable, @@ -641,25 +645,25 @@ static const u16 sMuseumKabutopsSprTiles[] = INCBIN_U16("graphics/script_menu/ka static const u16 sMuseumKabutopsSprPalette[] = INCBIN_U16("graphics/script_menu/kabutops_fossil.gbapal"); static const struct SpriteSheet sMuseumKabutopsSprSheets[] = { - {sMuseumKabutopsSprTiles, 0x800, 7000}, + {sMuseumKabutopsSprTiles, sizeof(sMuseumKabutopsSprTiles), GFXTAG_FOSSIL}, {} }; static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { - {sMuseumAerodactylSprTiles, 0x800, 7000}, + {sMuseumAerodactylSprTiles, sizeof(sMuseumAerodactylSprTiles), GFXTAG_FOSSIL}, {} }; static const u8 *const sSeagallopDestStrings[] = { - gText_Vermilion, - gText_OneIsland, - gText_TwoIsland, - gText_ThreeIsland, - gText_FourIsland, - gText_FiveIsland, - gText_SixIsland, - gText_SevenIsland + [SEAGALLOP_VERMILION_CITY] = gText_Vermilion, + [SEAGALLOP_ONE_ISLAND] = gText_OneIsland, + [SEAGALLOP_TWO_ISLAND] = gText_TwoIsland, + [SEAGALLOP_THREE_ISLAND] = gText_ThreeIsland, + [SEAGALLOP_FOUR_ISLAND] = gText_FourIsland, + [SEAGALLOP_FIVE_ISLAND] = gText_FiveIsland, + [SEAGALLOP_SIX_ISLAND] = gText_SixIsland, + [SEAGALLOP_SEVEN_ISLAND] = gText_SevenIsland, }; static u16 GetStringTilesWide(const u8 *str) @@ -714,8 +718,8 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres if ((ignoreBpress & 2) || QL_AvoidDisplay(QL_DestroyAbortedDisplay) != TRUE) { ignoreBpress &= 1; - count = gScriptMultiChoiceMenus[mcId].count; - list = gScriptMultiChoiceMenus[mcId].list; + count = sMultichoiceLists[mcId].count; + list = sMultichoiceLists[mcId].list; strWidth = 0; for (i = 0; i < count; i++) { @@ -729,7 +733,9 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres height = GetMCWindowHeight(count); windowId = CreateWindowFromRect(left, top, width, height); SetStdWindowBorderStyle(windowId, FALSE); - if (mcId == MULTICHOICE_GAME_CORNER_TMPRIZES || mcId == MULTICHOICE_BIKE_SHOP || mcId == MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES) + if (mcId == MULTICHOICE_GAME_CORNER_TMPRIZES + || mcId == MULTICHOICE_BIKE_SHOP + || mcId == MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES) MultichoiceList_PrintItems(windowId, FONT_NORMAL, 8, 2, 14, count, list, 0, 2); else MultichoiceList_PrintItems(windowId, FONT_NORMAL, 8, 2, 14, count, list, 0, 2); @@ -766,21 +772,30 @@ static u8 GetMCWindowHeight(u8 count) } } +#define tTimer data[2] +#define tIgnoreBPress data[4] +#define tWrapAround data[5] +#define tWindowId data[6] +#define tMultichoiceId data[7] + static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) { u8 taskId; - if (mcId == MULTICHOICE_TRADE_CENTER_COLOSSEUM || mcId == MULTICHOICE_TRADE_COLOSSEUM_CRUSH || mcId == MULTICHOICE_TRADE_COLOSSEUM_2) + if (mcId == MULTICHOICE_TRADE_CENTER_COLOSSEUM + || mcId == MULTICHOICE_TRADE_COLOSSEUM_CRUSH + || mcId == MULTICHOICE_TRADE_COLOSSEUM_2) sDelay = 12; else sDelay = 0; + taskId = CreateTask(Task_MultichoiceMenu_HandleInput, 80); - gTasks[taskId].data[4] = ignoreBpress; + gTasks[taskId].tIgnoreBPress = ignoreBpress; if (count > 3) - gTasks[taskId].data[5] = TRUE; + gTasks[taskId].tWrapAround = TRUE; else - gTasks[taskId].data[5] = FALSE; - gTasks[taskId].data[6] = windowId; - gTasks[taskId].data[7] = mcId; + gTasks[taskId].tWrapAround = FALSE; + gTasks[taskId].tWindowId = windowId; + gTasks[taskId].tMultichoiceId = mcId; MultiChoicePrintHelpDescription(mcId); } @@ -794,18 +809,18 @@ static void Task_MultichoiceMenu_HandleInput(u8 taskId) sDelay--; else { - if (data[5] == FALSE) + if (tWrapAround == FALSE) input = Menu_ProcessInputNoWrapAround(); else input = Menu_ProcessInput(); if (JOY_NEW(DPAD_UP | DPAD_DOWN)) - MultiChoicePrintHelpDescription(data[7]); + MultiChoicePrintHelpDescription(tMultichoiceId); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - if (data[4]) + case MENU_B_PRESSED: + if (tIgnoreBPress) return; PlaySE(SE_SELECT); gSpecialVar_Result = SCR_MENU_CANCEL; @@ -814,7 +829,7 @@ static void Task_MultichoiceMenu_HandleInput(u8 taskId) gSpecialVar_Result = input; break; } - DestroyScriptMenuWindow(data[6]); + DestroyScriptMenuWindow(tWindowId); DestroyTask(taskId); ScriptContext_Enable(); } @@ -825,15 +840,15 @@ static void MultiChoicePrintHelpDescription(u8 mcId) { switch (mcId) { - case 39: + case MULTICHOICE_TRADE_CENTER_COLOSSEUM: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; - case 47: + case MULTICHOICE_TRADE_COLOSSEUM_CRUSH: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; - case 50: + case MULTICHOICE_TRADE_COLOSSEUM_2: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; @@ -866,23 +881,23 @@ static bool8 IsScriptActive(void) static void Task_YesNoMenu_HandleInput(u8 taskId) { s8 input; - if (gTasks[taskId].data[2] < 5) + if (gTasks[taskId].tTimer < 5) { - gTasks[taskId].data[2]++; + gTasks[taskId].tTimer++; } else { input = Menu_ProcessInputNoWrapClearOnChoose(); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - case 1: + case MENU_B_PRESSED: + case 1: // NO PlaySE(SE_SELECT); gSpecialVar_Result = FALSE; break; - case 0: + case 0: // YES gSpecialVar_Result = TRUE; break; } @@ -891,7 +906,7 @@ static void Task_YesNoMenu_HandleInput(u8 taskId) } } -bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount) +bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBpress, u8 columnCount) { const struct MenuAction * list; u8 count; @@ -905,16 +920,16 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co if (QL_AvoidDisplay(QL_DestroyAbortedDisplay) == TRUE) return TRUE; - list = gScriptMultiChoiceMenus[multichoiceId].list; - count = gScriptMultiChoiceMenus[multichoiceId].count; + list = sMultichoiceLists[multichoiceId].list; + count = sMultichoiceLists[multichoiceId].count; width = GetMenuWidthFromList(list, count) + 1; rowCount = count / columnCount; taskId = CreateTask(Hask_MultichoiceGridMenu_HandleInput, 80); - gTasks[taskId].data[4] = a4; - gTasks[taskId].data[6] = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); - SetStdWindowBorderStyle(gTasks[taskId].data[6], FALSE); - MultichoiceGrid_PrintItems(gTasks[taskId].data[6], FONT_NORMAL_COPY_1, width * 8, 16, columnCount, rowCount, list); - MultichoiceGrid_InitCursor(gTasks[taskId].data[6], FONT_NORMAL_COPY_1, 0, 1, width * 8, columnCount, rowCount, 0); + gTasks[taskId].tIgnoreBPress = ignoreBpress; + gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, FALSE); + MultichoiceGrid_PrintItems(gTasks[taskId].tWindowId, FONT_NORMAL_COPY_1, width * 8, 16, columnCount, rowCount, list); + MultichoiceGrid_InitCursor(gTasks[taskId].tWindowId, FONT_NORMAL_COPY_1, 0, 1, width * 8, columnCount, rowCount, 0); ScheduleBgCopyTilemapToVram(0); return TRUE; @@ -926,10 +941,10 @@ static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) s8 input = Menu_ProcessInputGridLayout(); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - if (data[4]) + case MENU_B_PRESSED: + if (tIgnoreBPress) return; PlaySE(SE_SELECT); gSpecialVar_Result = SCR_MENU_CANCEL; @@ -938,11 +953,21 @@ static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) gSpecialVar_Result = input; break; } - DestroyScriptMenuWindow(data[6]); + DestroyScriptMenuWindow(tWindowId); DestroyTask(taskId); ScriptContext_Enable(); } +#undef tIgnoreBPress +#undef tWrapAround +#undef tWindowId +#undef tMultichoiceId + +#define tState data[0] +#define tSpecies data[1] +#define tSpriteId data[2] +#define tWindowId data[5] + bool8 CreatePCMenu(void) { if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) @@ -957,7 +982,7 @@ static void CreatePCMenuWindow(void) u8 cursorWidth = GetMenuCursorDimensionByFont(FONT_NORMAL, 0); u8 height = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT); u8 windowWidth; - u8 nitems; + u8 numItems; u8 windowId; switch (GetStringTilesWide(gText_SPc)) { @@ -974,33 +999,33 @@ static void CreatePCMenuWindow(void) } if (FlagGet(FLAG_SYS_GAME_CLEAR)) { - nitems = 5; + numItems = 5; windowId = CreateWindowFromRect(0, 0, windowWidth, 10); SetStdWindowBorderStyle(windowId, FALSE); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 66, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame_2, cursorWidth, 50, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 66, TEXT_SKIP_DRAW, NULL); } else { if (FlagGet(FLAG_SYS_POKEDEX_GET)) - nitems = 4; + numItems = 4; else - nitems = 3; - windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); + numItems = 3; + windowId = CreateWindowFromRect(0, 0, windowWidth, numItems * 2); SetStdWindowBorderStyle(windowId, FALSE); if (FlagGet(FLAG_SYS_POKEDEX_GET)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 2 + 16 * (numItems - 1), TEXT_SKIP_DRAW, NULL); } if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BillSPc, cursorWidth, 2 , TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeoneSPc, cursorWidth, 2 , TEXT_SKIP_DRAW, NULL); StringExpandPlaceholders(gStringVar4, gText_SPc); Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); - Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, nitems, 0); - CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, numItems, 0); + CreateMCMenuInputHandlerTask(FALSE, numItems, windowId, MULTICHOICE_NONE); ScheduleBgCopyTilemapToVram(0); } @@ -1013,19 +1038,19 @@ void ScriptMenu_DisplayPCStartupPrompt(void) static void Task_ScriptShowMonPic(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - task->data[0]++; + task->tState++; break; case 1: break; case 2: - FreeResourcesAndDestroySprite(&gSprites[task->data[2]], task->data[2]); - task->data[0]++; + FreeResourcesAndDestroySprite(&gSprites[task->tSpriteId], task->tSpriteId); + task->tState++; break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1037,17 +1062,17 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) u8 taskId; if (QL_AvoidDisplay(QL_DestroyAbortedDisplay) == TRUE) return TRUE; - if (FindTaskIdByFunc(Task_ScriptShowMonPic) != 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) != TASK_NONE) return FALSE; spriteId = CreateMonSprite_PicBox(species, 8 * x + 40, 8 * y + 40, FALSE); taskId = CreateTask(Task_ScriptShowMonPic, 80); - gTasks[taskId].data[5] = CreateWindowFromRect(x, y, 8, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = species; - gTasks[taskId].data[2] = spriteId; + gTasks[taskId].tWindowId = CreateWindowFromRect(x, y, 8, 8); + gTasks[taskId].tState = 0; + gTasks[taskId].tSpecies = species; + gTasks[taskId].tSpriteId = spriteId; gSprites[spriteId].callback = SpriteCallbackDummy; gSprites[spriteId].oam.priority = 0; - SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, TRUE); ScheduleBgCopyTilemapToVram(0); return TRUE; } @@ -1055,15 +1080,15 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) bool8 (*ScriptMenu_HidePokemonPic(void))(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); - if (taskId == 0xFF) + if (taskId == TASK_NONE) return NULL; - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; return PicboxWait; } static bool8 PicboxWait(void) { - if (FindTaskIdByFunc(Task_ScriptShowMonPic) == 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) == TASK_NONE) return TRUE; else return FALSE; @@ -1073,20 +1098,20 @@ void PicboxCancel(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); struct Task *task; - if (taskId != 0xFF) + if (taskId != TASK_NONE) { task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: case 1: case 2: - FreeResourcesAndDestroySprite(&gSprites[task->data[2]], task->data[2]); - DestroyScriptMenuWindow(task->data[5]); + FreeResourcesAndDestroySprite(&gSprites[task->tSpriteId], task->tSpriteId); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1096,20 +1121,20 @@ void PicboxCancel(void) void Task_WaitMuseumFossilPic(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - task->data[0]++; + task->tState++; break; case 1: break; case 2: - DestroySprite(&gSprites[task->data[2]]); - FreeSpriteTilesByTag(7000); - task->data[0]++; + DestroySprite(&gSprites[task->tSpriteId]); + FreeSpriteTilesByTag(GFXTAG_FOSSIL); + task->tState++; break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1121,7 +1146,7 @@ bool8 OpenMuseumFossilPic(void) u8 taskId; if (QL_AvoidDisplay(QL_DestroyAbortedDisplay) == TRUE) return TRUE; - if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != 0xFF) + if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != TASK_NONE) return FALSE; if (gSpecialVar_0x8004 == SPECIES_KABUTOPS) { @@ -1140,10 +1165,10 @@ bool8 OpenMuseumFossilPic(void) spriteId = CreateSprite(&sMuseumFossilSprTemplate, gSpecialVar_0x8005 * 8 + 40, gSpecialVar_0x8006 * 8 + 40, 0); gSprites[spriteId].oam.paletteNum = 13; taskId = CreateTask(Task_WaitMuseumFossilPic, 80); - gTasks[taskId].data[5] = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[2] = spriteId; - SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + gTasks[taskId].tWindowId = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); + gTasks[taskId].tState = 0; + gTasks[taskId].tSpriteId = spriteId; + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, TRUE); ScheduleBgCopyTilemapToVram(0); return TRUE; } @@ -1151,9 +1176,9 @@ bool8 OpenMuseumFossilPic(void) bool8 CloseMuseumFossilPic(void) { u8 taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); - if (taskId == 0xFF) + if (taskId == TASK_NONE) return FALSE; - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; return TRUE; } @@ -1177,21 +1202,23 @@ void QL_DestroyAbortedDisplay(void) u8 taskId; s16 *data; ScriptContext_SetupScript(EventScript_ReleaseEnd); + taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); - if (taskId != 0xFF) + if (taskId != TASK_NONE) { data = gTasks[taskId].data; - if (data[0] < 2) - FreeResourcesAndDestroySprite(&gSprites[data[2]], data[2]); + if (tState < 2) + FreeResourcesAndDestroySprite(&gSprites[tSpriteId], tSpriteId); } + taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); - if (taskId != 0xFF) + if (taskId != TASK_NONE) { data = gTasks[taskId].data; - if (data[0] < 2) + if (tState < 2) { - DestroySprite(&gSprites[data[2]]); - FreeSpriteTilesByTag(7000); + DestroySprite(&gSprites[tSpriteId]); + FreeSpriteTilesByTag(GFXTAG_FOSSIL); } } } @@ -1200,9 +1227,9 @@ void DrawSeagallopDestinationMenu(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) - u8 r4; + u8 destinationId; u8 top; - u8 nitems; + u8 numItems; u8 cursorWidth; u8 fontHeight; u8 windowId; @@ -1215,37 +1242,41 @@ void DrawSeagallopDestinationMenu(void) if (gSpecialVar_0x8005 == 1) { if (gSpecialVar_0x8004 < SEAGALLOP_FIVE_ISLAND) - r4 = SEAGALLOP_FIVE_ISLAND; + destinationId = SEAGALLOP_FIVE_ISLAND; else - r4 = SEAGALLOP_FOUR_ISLAND; - nitems = 5; + destinationId = SEAGALLOP_FOUR_ISLAND; + numItems = 5; top = 2; } else { - r4 = SEAGALLOP_VERMILION_CITY; - nitems = 6; + destinationId = SEAGALLOP_VERMILION_CITY; + numItems = 6; top = 0; } cursorWidth = GetMenuCursorDimensionByFont(FONT_NORMAL, 0); fontHeight = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT); - windowId = CreateWindowFromRect(17, top, 11, nitems * 2); + windowId = CreateWindowFromRect(17, top, 11, numItems * 2); SetStdWindowBorderStyle(windowId, FALSE); - for (i = 0; i < nitems - 2; i++) + + // -2 excludes "Other" and "Exit", appended after the loop + for (i = 0; i < numItems - 2; i++) { - if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, FONT_NORMAL, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + if (destinationId != gSpecialVar_0x8004) + AddTextPrinterParameterized(windowId, FONT_NORMAL, sSeagallopDestStrings[destinationId], cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); else i--; - r4++; - if (r4 == SEAGALLOP_CINNABAR_ISLAND) - r4 = SEAGALLOP_VERMILION_CITY; + destinationId++; + + // Wrap around + if (destinationId == SEAGALLOP_SEVEN_ISLAND + 1) + destinationId = SEAGALLOP_VERMILION_CITY; } - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Other, cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); i++; - AddTextPrinterParameterized(windowId, FONT_NORMAL, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); - Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, nitems, 0); - CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gOtherText_Exit, cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); + Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, numItems, 0); + CreateMCMenuInputHandlerTask(FALSE, numItems, windowId, MULTICHOICE_NONE); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 4bd5c9f22..bc11dc001 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -109,7 +109,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item) for(i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item) return TRUE; } diff --git a/src/slot_machine.c b/src/slot_machine.c index b89412a7e..1b79bf9f8 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -13,48 +13,92 @@ #include "strings.h" #include "constants/songs.h" -#define SLOT_IMAGE_7 0 -#define SLOT_IMAGE_ROCKET 1 -#define SLOT_IMAGE_PIKACHU 2 -#define SLOT_IMAGE_PSYDUCK 3 -#define SLOT_IMAGE_CHERRIES 4 -#define SLOT_IMAGE_MAGNEMITE 5 -#define SLOT_IMAGE_SHELLDER 6 +#define NUM_REELS 3 +#define REEL_LENGTH 21 // Total number of icons per reel -#define SLOT_PAYOUT_NONE 0 -#define SLOT_PAYOUT_CHERRIES2 1 -#define SLOT_PAYOUT_CHERRIES3 2 -#define SLOT_PAYOUT_MAGSHELL 3 -#define SLOT_PAYOUT_PIKAPSY 4 -#define SLOT_PAYOUT_ROCKET 5 -#define SLOT_PAYOUT_7 6 +// Only 4 icons are actually visible per reel at a single +// time, with 1 on deck. Only 3 visible when not spinning. +#define REEL_LOAD_LENGTH 5 -#define ROWATTR_COL1POS 0 -#define ROWATTR_COL2POS 1 -#define ROWATTR_COL3POS 2 -#define ROWATTR_MINBET 3 +// 3 horizontal, 2 diagonal +#define NUM_MATCH_LINES 5 -#define SLOTTASK_GFX_INIT 0 -#define SLOTTASK_FADEOUT_EXIT 1 -#define SLOTTASK_UPDATE_LINE_LIGHTS 2 -#define SLOTTASK_CLEFAIRY_BOUNCE 3 -#define SLOTTASK_ANIM_WIN 4 -#define SLOTTASK_END_ANIM_WIN 5 -#define SLOTTASK_ANIM_LOSE 6 -#define SLOTTASK_ANIM_BETTING 7 -#define SLOTTASK_SHOW_AMOUNTS 8 -#define SLOTTASK_MSG_NO_COINS 9 -#define SLOTTASK_ASK_QUIT 10 -#define SLOTTASK_DESTROY_YESNO 11 -#define SLOTTASK_PRESS_BUTTON 12 -#define SLOTTASK_RELEASE_BUTTONS 13 -#define SLOTTASK_SHOWHELP 14 -#define SLOTTASK_HIDEHELP 15 +#define NUM_BUTTON_TILES 4 +#define NUM_DIGIT_SPRITES 4 + +enum { + PALSLOT_LINE_NORMAL = 4, // Loaded as part of sBg_Pal + PALSLOT_LINE_BET, + PALSLOT_LINE_MATCH, +}; + +enum { + GFXTAG_REEL_ICONS, + GFXTAG_CLEFAIRY, + GFXTAG_DIGITS, +}; + +enum { + PALTAG_REEL_ICONS_0, + PALTAG_REEL_ICONS_1, + PALTAG_REEL_ICONS_2, + PALTAG_REEL_ICONS_3, + PALTAG_REEL_ICONS_4, + PALTAG_CLEFAIRY, + PALTAG_DIGITS, +}; + +enum { + ICON_7, + ICON_ROCKET, + ICON_PIKACHU, + ICON_PSYDUCK, // Psyduck in FR, Slowpoke in LG + ICON_CHERRIES, + ICON_MAGNEMITE, // Magnemite in FR, Voltorb in LG + ICON_SHELLDER, // Shellder in FR, Staryu in LG +}; + +enum { + PAYOUT_NONE, + PAYOUT_CHERRIES2, + PAYOUT_CHERRIES3, + PAYOUT_MAGSHELL, + PAYOUT_PIKAPSY, + PAYOUT_ROCKET, + PAYOUT_7, + NUM_PAYOUT_TYPES +}; + +enum { + ROWATTR_COL1POS, + ROWATTR_COL2POS, + ROWATTR_COL3POS, + ROWATTR_MINBET, +}; + +enum { + SLOTTASK_GFX_INIT, + SLOTTASK_FADEOUT_EXIT, + SLOTTASK_UPDATE_LINE_LIGHTS, + SLOTTASK_CLEFAIRY_BOUNCE, + SLOTTASK_ANIM_WIN, + SLOTTASK_END_ANIM_WIN, + SLOTTASK_ANIM_LOSE, + SLOTTASK_ANIM_BETTING, + SLOTTASK_SHOW_AMOUNTS, + SLOTTASK_MSG_NO_COINS, + SLOTTASK_ASK_QUIT, + SLOTTASK_DESTROY_YESNO, + SLOTTASK_PRESS_BUTTON, + SLOTTASK_RELEASE_BUTTONS, + SLOTTASK_SHOWHELP, + SLOTTASK_HIDEHELP, +}; struct SlotMachineState { MainCallback savedCallback; - u16 machineidx; + u16 machineIdx; u16 currentReel; u16 machineBias; u16 slotRewardClass; @@ -62,22 +106,22 @@ struct SlotMachineState u16 bet; u8 taskId; u8 spinReelsTaskId; - bool32 reelIsSpinning[3]; - s16 reelPositions[3]; - s16 reelSubpixel[3]; - s16 destReelPos[3]; - s16 reelStopOrder[3]; + bool32 reelIsSpinning[NUM_REELS]; + s16 reelPositions[NUM_REELS]; + s16 reelSubpixel[NUM_REELS]; + s16 destReelPos[NUM_REELS]; + s16 reelStopOrder[NUM_REELS]; u32 reel2BiasInPlay; - bool32 winFlags[5]; + bool32 winFlags[NUM_MATCH_LINES]; u16 payout; }; struct SlotMachineGfxManager { - u32 field_00[3]; - struct Sprite *reelIconSprites[3][5]; - struct Sprite *creditDigitSprites[4]; - struct Sprite *payoutDigitSprites[4]; + u32 field_00[NUM_REELS]; // Never read + struct Sprite *reelIconSprites[NUM_REELS][REEL_LOAD_LENGTH]; + struct Sprite *creditDigitSprites[NUM_DIGIT_SPRITES]; + struct Sprite *payoutDigitSprites[NUM_DIGIT_SPRITES]; struct Sprite *clefairySprites[2]; vu16 * reelIconAffineParamPtr; }; @@ -96,13 +140,13 @@ struct SlotMachineSetupTaskData // align 2 s32 bg1X; bool32 yesNoMenuActive; - u16 buttonPressedTiles[3][4]; - u16 buttonReleasedTiles[3][4]; - u8 field_005C[0x800]; - u8 bg0TilemapBuffer[0x800]; - u8 bg1TilemapBuffer[0x800]; - u8 bg2TilemapBuffer[0x800]; - u8 bg3TilemapBuffer[0x800]; + u16 buttonPressedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u16 buttonReleasedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u8 unusedBuffer[BG_SCREEN_SIZE]; + u8 bg0TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg1TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg2TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg3TilemapBuffer[BG_SCREEN_SIZE]; }; // size: 285C struct LineStateTileIdxList @@ -198,7 +242,7 @@ static const u8 sSecondReelBiasCheckIndices[][2] = { {0x04, 0x06} }; -static const u8 sThirdReelBiasCheckIndices[][3] = { +static const u8 sThirdReelBiasCheckIndices[NUM_MATCH_LINES][3] = { {0x00, 0x03, 0x06}, // top row {0x01, 0x04, 0x07}, // middle row {0x02, 0x05, 0x08}, // bottom row @@ -206,7 +250,7 @@ static const u8 sThirdReelBiasCheckIndices[][3] = { {0x02, 0x04, 0x06} // bl-tr }; -static const u8 sRowAttributes[][4] = { +static const u8 sRowAttributes[NUM_MATCH_LINES][4] = { {0x00, 0x04, 0x08, 0x03}, // tl-br {0x00, 0x03, 0x06, 0x02}, // top row {0x01, 0x04, 0x07, 0x01}, // middle row @@ -214,150 +258,193 @@ static const u8 sRowAttributes[][4] = { {0x02, 0x04, 0x06, 0x03} // bl-tr }; -static const u16 sReelBiasChances[][7] = { - {0x1fa1, 0x2eab, 0x3630, 0x39f3, 0x3bd4, 0x3bfc, 0x0049}, - {0x1f97, 0x2ea2, 0x3627, 0x39e9, 0x3bca, 0x3bf8, 0x0049}, - {0x1f91, 0x2e9b, 0x3620, 0x39e3, 0x3bc4, 0x3bf4, 0x0049}, - {0x1f87, 0x2e92, 0x3617, 0x39d9, 0x3bba, 0x3bef, 0x0050}, - {0x1f7f, 0x2e89, 0x360e, 0x39d1, 0x3bb2, 0x3bea, 0x0050}, - {0x1fc9, 0x2efc, 0x3696, 0x3a63, 0x3c49, 0x3c8b, 0x0073}, +static const u16 sReelBiasChances[][NUM_PAYOUT_TYPES] = { + { + [PAYOUT_NONE] = 0x1fa1, + [PAYOUT_CHERRIES2] = 0x2eab, + [PAYOUT_CHERRIES3] = 0x3630, + [PAYOUT_MAGSHELL] = 0x39f3, + [PAYOUT_PIKAPSY] = 0x3bd4, + [PAYOUT_ROCKET] = 0x3bfc, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f97, + [PAYOUT_CHERRIES2] = 0x2ea2, + [PAYOUT_CHERRIES3] = 0x3627, + [PAYOUT_MAGSHELL] = 0x39e9, + [PAYOUT_PIKAPSY] = 0x3bca, + [PAYOUT_ROCKET] = 0x3bf8, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f91, + [PAYOUT_CHERRIES2] = 0x2e9b, + [PAYOUT_CHERRIES3] = 0x3620, + [PAYOUT_MAGSHELL] = 0x39e3, + [PAYOUT_PIKAPSY] = 0x3bc4, + [PAYOUT_ROCKET] = 0x3bf4, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f87, + [PAYOUT_CHERRIES2] = 0x2e92, + [PAYOUT_CHERRIES3] = 0x3617, + [PAYOUT_MAGSHELL] = 0x39d9, + [PAYOUT_PIKAPSY] = 0x3bba, + [PAYOUT_ROCKET] = 0x3bef, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1f7f, + [PAYOUT_CHERRIES2] = 0x2e89, + [PAYOUT_CHERRIES3] = 0x360e, + [PAYOUT_MAGSHELL] = 0x39d1, + [PAYOUT_PIKAPSY] = 0x3bb2, + [PAYOUT_ROCKET] = 0x3bea, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1fc9, + [PAYOUT_CHERRIES2] = 0x2efc, + [PAYOUT_CHERRIES3] = 0x3696, + [PAYOUT_MAGSHELL] = 0x3a63, + [PAYOUT_PIKAPSY] = 0x3c49, + [PAYOUT_ROCKET] = 0x3c8b, + [PAYOUT_7] = 0x0073, + }, }; -static const u8 sReelIconAnimByReelAndPos[][21] = { +static const u8 sReelIconAnimByReelAndPos[NUM_REELS][REEL_LENGTH] = { { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_7, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU + ICON_7, + ICON_PSYDUCK, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_7, + ICON_SHELLDER, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_CHERRIES, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_7, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_ROCKET, + ICON_SHELLDER, + ICON_PIKACHU }, { - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PSYDUCK, + ICON_CHERRIES }, { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_ROCKET + ICON_7, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_ROCKET }, }; static const u16 sPayoutTable[] = { - [SLOT_PAYOUT_NONE] = 0, - [SLOT_PAYOUT_CHERRIES2] = 2, - [SLOT_PAYOUT_CHERRIES3] = 6, - [SLOT_PAYOUT_MAGSHELL] = 8, - [SLOT_PAYOUT_PIKAPSY] = 15, - [SLOT_PAYOUT_ROCKET] = 100, - [SLOT_PAYOUT_7] = 300 + [PAYOUT_NONE] = 0, + [PAYOUT_CHERRIES2] = 2, + [PAYOUT_CHERRIES3] = 6, + [PAYOUT_MAGSHELL] = 8, + [PAYOUT_PIKAPSY] = 15, + [PAYOUT_ROCKET] = 100, + [PAYOUT_7] = 300 }; -static const u16 sSpritePal_ReelIcons_0[] = INCBIN_U16("graphics/slot_machine/unk_8464974.gbapal"); -static const u16 sSpritePal_ReelIcons_1[] = INCBIN_U16("graphics/slot_machine/unk_8464994.gbapal"); -static const u16 sSpritePal_ReelIcons_2[] = INCBIN_U16("graphics/slot_machine/unk_84649b4.gbapal"); -static const u16 sSpritePal_ReelIcons_3[] = INCBIN_U16("graphics/slot_machine/unk_84649d4.gbapal"); -static const u16 sSpritePal_ReelIcons_4[] = INCBIN_U16("graphics/slot_machine/unk_84649f4.gbapal"); #if defined(FIRERED) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_8464a14.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_846506c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_846506c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/firered/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/clefairy.4bpp.lz"); #elif defined(LEAFGREEN) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464434.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_lg_8464a3c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464a3c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/clefairy.4bpp.lz"); #endif -static const u16 sSpritePal_Digits[] = INCBIN_U16("graphics/slot_machine/unk_8465524.gbapal"); -static const u32 sSpriteTiles_Digits[] = INCBIN_U32("graphics/slot_machine/unk_8465544.4bpp.lz"); +static const u16 sDigits_Pal[] = INCBIN_U16("graphics/slot_machine/digits.gbapal"); +static const u32 sDigits_Tiles[] = INCBIN_U32("graphics/slot_machine/digits.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {(const void *)sSpriteTiles_ReelIcons, 0xe00, 0}, - {(const void *)sSpriteTiles_Clefairy, 0xc00, 1}, - {(const void *)sSpriteTiles_Digits, 0x280, 2}, + {.data = sReelIcons_Tiles, .size = 0xe00, .tag = GFXTAG_REEL_ICONS}, + {.data = sClefairy_Tiles, .size = 0xc00, .tag = GFXTAG_CLEFAIRY}, + {.data = sDigits_Tiles, .size = 0x280, .tag = GFXTAG_DIGITS}, }; static const struct SpritePalette sSpritePalettes[] = { - {sSpritePal_ReelIcons_0, 0}, - {sSpritePal_ReelIcons_1, 1}, - {sSpritePal_ReelIcons_2, 2}, - {sSpritePal_ReelIcons_3, 3}, - {sSpritePal_ReelIcons_4, 4}, - {sSpritePal_Clefairy, 5}, - {sSpritePal_Digits, 6}, - {NULL} + {.data = sReelIcons_Pal[0], .tag = PALTAG_REEL_ICONS_0}, + {.data = sReelIcons_Pal[1], .tag = PALTAG_REEL_ICONS_1}, + {.data = sReelIcons_Pal[2], .tag = PALTAG_REEL_ICONS_2}, + {.data = sReelIcons_Pal[3], .tag = PALTAG_REEL_ICONS_3}, + {.data = sReelIcons_Pal[4], .tag = PALTAG_REEL_ICONS_4}, + {.data = sClefairy_Pal, .tag = PALTAG_CLEFAIRY}, + {.data = sDigits_Pal, .tag = PALTAG_DIGITS}, + {} }; +static const u16 sReelIconPaletteTags[] = { #if defined(FIRERED) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 0, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 4, - [SLOT_IMAGE_SHELLDER] = 3 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_0, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_4, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_3, #elif defined(LEAFGREEN) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 3, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 1, - [SLOT_IMAGE_SHELLDER] = 1 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_3, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_1, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_1, #endif +}; static const u16 sReelIconAffineParams[] = { 0x0120, 0x011f, 0x011e, 0x011d, 0x011c, 0x011b, 0x011a, 0x0119, 0x0118, 0x0117, 0x0116, 0x0115, 0x0114, 0x0113, 0x0112, 0x0111, @@ -451,13 +538,13 @@ static const union AnimCmd sAnimCmd_ReelIcon_Shellder_2[] = { }; static const union AnimCmd *const sAnimTable_ReelIcons[] = { - sAnimCmd_ReelIcon_7, - sAnimCmd_ReelIcon_Rocket, - sAnimCmd_ReelIcon_Pikachu, - sAnimCmd_ReelIcon_Psyduck, - sAnimCmd_ReelIcon_Cherries, - sAnimCmd_ReelIcon_Magnemite, - sAnimCmd_ReelIcon_Shellder, + [ICON_7] = sAnimCmd_ReelIcon_7, + [ICON_ROCKET] = sAnimCmd_ReelIcon_Rocket, + [ICON_PIKACHU] = sAnimCmd_ReelIcon_Pikachu, + [ICON_PSYDUCK] = sAnimCmd_ReelIcon_Psyduck, + [ICON_CHERRIES] = sAnimCmd_ReelIcon_Cherries, + [ICON_MAGNEMITE] = sAnimCmd_ReelIcon_Magnemite, + [ICON_SHELLDER] = sAnimCmd_ReelIcon_Shellder, sAnimCmd_ReelIcon_Pikachu_2, sAnimCmd_ReelIcon_Psyduck_2, sAnimCmd_ReelIcon_Cherries_2, @@ -475,8 +562,8 @@ static const union AffineAnimCmd *const sAffineAnimTable_ReelIcons_Unused[] = { }; static const struct SpriteTemplate sSpriteTemplate_ReelIcons = { - .tileTag = 0, - .paletteTag = 0, + .tileTag = GFXTAG_REEL_ICONS, + .paletteTag = PALTAG_REEL_ICONS_0, .oam = &sOamData_ReelIcons, .anims = sAnimTable_ReelIcons, .images = NULL, @@ -564,8 +651,8 @@ static const union AnimCmd *const sAnimTable_Digits[] = { }; static const struct SpriteTemplate sSpriteTemplate_Digits = { - .tileTag = 2, - .paletteTag = 6, + .tileTag = GFXTAG_DIGITS, + .paletteTag = PALTAG_DIGITS, .oam = &sOamData_Digits, .anims = sAnimTable_Digits, .images = NULL, @@ -620,8 +707,8 @@ static const union AnimCmd *const sAnimTable_Clefairy[] = { }; static const struct SpriteTemplate sSpriteTemplate_Clefairy = { - .tileTag = 1, - .paletteTag = 5, + .tileTag = GFXTAG_CLEFAIRY, + .paletteTag = PALTAG_CLEFAIRY, .oam = &sOamData_Clefairy, .anims = sAnimTable_Clefairy, .images = NULL, @@ -649,36 +736,25 @@ bool8 (*const sSlotMachineSetupTasks[])(u8 *, struct SlotMachineSetupTaskData *) }; #if defined(FIRERED) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_8465930.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_8465950.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_8465970.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_8465990.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_84659b0.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_84659d0.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_84661d4.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_84664bc.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_84664dc.gbapal","graphics/slot_machine/unk_84664fc.gbapal", "graphics/slot_machine/unk_846651c.gbapal"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/firered/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/firered/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/firered/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.bin.lz"); #elif defined(LEAFGREEN) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652bc.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652dc.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652fc.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_lg_846531c.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_lg_846533c.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_lg_846535c.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465ab8.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465d9c.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465dbc.gbapal","graphics/slot_machine/unk_lg_8465ddc.gbapal", "graphics/slot_machine/unk_lg_8465dfc.gbapal"); -#endif -static const u32 sBg2Tiles_C0[] = INCBIN_U32("graphics/slot_machine/unk_846653c.4bpp.lz"); -static const u16 sBgPal_70[] = INCBIN_U16("graphics/slot_machine/unk_84665c0.gbapal"); -static const u16 sBgPal_80[] = INCBIN_U16("graphics/slot_machine/unk_84665e0.gbapal"); -static const u16 sBgPal_90[] = INCBIN_U16("graphics/slot_machine/unk_8466600.gbapal"); -#if defined(FIRERED) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_8466620.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_8466998.bin.lz"); -#elif defined(LEAFGREEN) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465f00.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8466278.bin.lz"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/leafgreen/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.bin.lz"); #endif static const struct BgTemplate sBgTemplates[] = { @@ -758,15 +834,15 @@ static const u16 sLineTiles_BLTR[] = { 0x0204, 0x0205, 0x0206, 0x0224, 0x0225, 0x0226, 0x01e7, 0x0207, 0x018c, 0x01ac, 0x0131, 0x0151, 0x00d6, 0x00f6, 0x00b7, 0x00b8, 0x00b9, 0x00d7, 0x00d8, 0x00d9 }; -static const struct LineStateTileIdxList sLineStateTileIdxs[] = { - { sLineTiles_TLBR, NELEMS(sLineTiles_TLBR) }, - { sLineTiles_TopRow, NELEMS(sLineTiles_TopRow) }, - { sLineTiles_MiddleRow, NELEMS(sLineTiles_MiddleRow) }, - { sLineTiles_BottomRow, NELEMS(sLineTiles_BottomRow) }, - { sLineTiles_BLTR, NELEMS(sLineTiles_BLTR) } +static const struct LineStateTileIdxList sLineStateTileIdxs[NUM_MATCH_LINES] = { + { sLineTiles_TLBR, ARRAY_COUNT(sLineTiles_TLBR) }, + { sLineTiles_TopRow, ARRAY_COUNT(sLineTiles_TopRow) }, + { sLineTiles_MiddleRow, ARRAY_COUNT(sLineTiles_MiddleRow) }, + { sLineTiles_BottomRow, ARRAY_COUNT(sLineTiles_BottomRow) }, + { sLineTiles_BLTR, ARRAY_COUNT(sLineTiles_BLTR) } }; -static const u8 sWInningLineFlashPalIdxs[2] = {2, 4}; +static const u8 sWinningLineFlashPalIdxs[2] = {2, 4}; static const struct WindowTemplate sYesNoWindowTemplate = { .bg = 0, @@ -778,7 +854,7 @@ static const struct WindowTemplate sYesNoWindowTemplate = { .baseBlock = 0x9F }; -static const u16 sReelButtonMapTileIdxs[][4] = { +static const u16 sReelButtonMapTileIdxs[NUM_REELS][NUM_BUTTON_TILES] = { {0x0229, 0x022a, 0x0249, 0x024a}, {0x022e, 0x022f, 0x024e, 0x024f}, {0x0233, 0x0234, 0x0253, 0x0254} @@ -792,9 +868,9 @@ void PlaySlotMachine(u16 machineIdx, MainCallback savedCallback) SetMainCallback2(savedCallback); else { - if (machineIdx > 5) + if (machineIdx >= ARRAY_COUNT(sReelBiasChances)) machineIdx = 0; - sSlotMachineState->machineidx = machineIdx; + sSlotMachineState->machineIdx = machineIdx; sSlotMachineState->savedCallback = savedCallback; InitSlotMachineState(sSlotMachineState); SetMainCallback2(CB2_InitSlotMachine); @@ -809,12 +885,12 @@ static void InitSlotMachineState(struct SlotMachineState * ptr) ptr->bet = 0; ptr->payout = 0; // for whatever reason, the loop does not use the ptr param - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { sSlotMachineState->reelIsSpinning[i] = FALSE; - sSlotMachineState->reelPositions[i] = 0; - sSlotMachineState->reelSubpixel[i] = 0; - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->reelPositions[i] = 0; + sSlotMachineState->reelSubpixel[i] = 0; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; } } @@ -952,16 +1028,16 @@ static void MainTask_SlotsGameLoop(u8 taskId) if (IsReelSpinning(sSlotMachineState->currentReel) == 0 && !IsSlotMachineSetupTaskActive(0)) { sSlotMachineState->currentReel++; - if (sSlotMachineState->currentReel >= 3) + if (sSlotMachineState->currentReel >= NUM_REELS) { sSlotMachineState->slotRewardClass = CalcPayout(); sSlotMachineState->bet = 0; sSlotMachineState->currentReel = 0; - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_NONE) + if (sSlotMachineState->slotRewardClass == PAYOUT_NONE) SetMainTask(MainTask_DarnNoPayout); else { - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_7) IncrementGameStat(GAME_STAT_SLOT_JACKPOTS); ResetMachineBias(); SetMainTask(MainTask_WinHandlePayout); @@ -1098,7 +1174,7 @@ static void MainTask_WinHandlePayout(u8 taskId) switch (data[0]) { case 0: - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == PAYOUT_7) PlayFanfare(MUS_SLOTS_JACKPOT); else PlayFanfare(MUS_SLOTS_WIN); @@ -1201,7 +1277,7 @@ static void Task_SpinReels(u8 taskId) s32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { if (sSlotMachineState->reelIsSpinning[i] || sSlotMachineState->reelSubpixel[i] != 0) { @@ -1213,12 +1289,12 @@ static void Task_SpinReels(u8 taskId) sSlotMachineState->reelSubpixel[i] = 0; sSlotMachineState->reelPositions[i]--; if (sSlotMachineState->reelPositions[i] < 0) - sSlotMachineState->reelPositions[i] = 20; + sSlotMachineState->reelPositions[i] = REEL_LENGTH - 1; } if (sSlotMachineState->reelPositions[i] != sSlotMachineState->destReelPos[i]) continue; } - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; sSlotMachineState->reelIsSpinning[i] = FALSE; } } @@ -1229,10 +1305,8 @@ static void StartReels(void) { s32 i; - for (i = 0; i < 3; i++) - { + for (i = 0; i < NUM_REELS; i++) sSlotMachineState->reelIsSpinning[i] = TRUE; - } } static void StopCurrentReel(u16 whichReel, u16 whichReel2) @@ -1263,7 +1337,7 @@ static s16 GetNextReelPosition(u16 whichReel) { position--; if (position < 0) - position = 20; + position = REEL_LENGTH - 1; } return position; } @@ -1282,7 +1356,7 @@ static void StopReel1(u16 whichReel) { for (j = 0, destPos = nextPos - i + 1; j < 3; j++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(1, sReelIconAnimByReelAndPos[whichReel][destPos])) break; @@ -1298,7 +1372,7 @@ static void StopReel1(u16 whichReel) { for (i = 0, destPos = nextPos + 1; i < 3; i++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { @@ -1310,7 +1384,7 @@ static void StopReel1(u16 whichReel) for (i = 0, destPos = nextPos; i < 4; i++, destPos--) { if (destPos < 0) - destPos = 20; + destPos = REEL_LENGTH - 1; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { posToSample[numPosToSample] = i + 1; @@ -1328,7 +1402,7 @@ static void StopReel1(u16 whichReel) } destPos = nextPos - destPos; if (destPos < 0) - destPos += 21; + destPos += REEL_LENGTH; sSlotMachineState->reelStopOrder[0] = whichReel; sSlotMachineState->destReelPos[whichReel] = destPos; } @@ -1342,11 +1416,11 @@ static void StopReel2(u16 whichReel) firstStoppedReelId = sSlotMachineState->reelStopOrder[0]; firstStoppedReelPos = sSlotMachineState->reelPositions[firstStoppedReelId] + 1; - if (firstStoppedReelPos >= 21) + if (firstStoppedReelPos >= REEL_LENGTH) firstStoppedReelPos = 0; nextPos = GetNextReelPosition(whichReel); pos = nextPos + 1; - if (pos >= 21) + if (pos >= REEL_LENGTH) pos = 0; numPossiblePositions = 0; for (i = 0; i < 5; i++) @@ -1358,12 +1432,12 @@ static void StopReel2(u16 whichReel) } pos--; if (pos < 0) - pos = 20; + pos = REEL_LENGTH - 1; } if (numPossiblePositions == 0) { sSlotMachineState->reel2BiasInPlay = 0; - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1375,7 +1449,7 @@ static void StopReel2(u16 whichReel) } pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->reelStopOrder[1] = whichReel; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1405,7 +1479,7 @@ static void StopReel3(u16 whichReel) } if (numPossiblePositions == 0) { - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1414,7 +1488,7 @@ static void StopReel3(u16 whichReel) pos = possiblePositions[0]; pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1431,10 +1505,10 @@ static bool32 TwoReelBiasCheck(s32 reel0id, s32 reel0pos, s32 reel1id, s32 reel1 icons[3 * reel0id + i] = sReelIconAnimByReelAndPos[reel0id][reel0pos]; icons[3 * reel1id + i] = sReelIconAnimByReelAndPos[reel1id][reel1pos]; reel0pos++; - if (reel0pos >= 21) + if (reel0pos >= REEL_LENGTH) reel0pos = 0; reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; } @@ -1501,40 +1575,40 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) firstStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[0]] + 1; secondStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[1]] + 1; reelPos++; - if (firstStoppedPos >= 21) + if (firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (secondStoppedPos >= 21) + if (secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; for (i = 0; i < 3; i++) { icons[sSlotMachineState->reelStopOrder[0] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[0]][firstStoppedPos]; icons[sSlotMachineState->reelStopOrder[1] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[1]][secondStoppedPos]; icons[reelId * 3 + i] = sReelIconAnimByReelAndPos[reelId][reelPos]; - if (++firstStoppedPos >= 21) + if (++firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (++secondStoppedPos >= 21) + if (++secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (++reelPos >= 21) + if (++reelPos >= REEL_LENGTH) reelPos = 0; } switch (biasIcon) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: for (i = 0; i < 3; i++) { if (TestReelIconAttribute(1, icons[i])) return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]]) return FALSE; } return TRUE; - case SLOT_PAYOUT_CHERRIES2: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES2: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return FALSE; @@ -1545,15 +1619,15 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) return TRUE; } return FALSE; - case SLOT_PAYOUT_CHERRIES3: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES3: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; } return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; @@ -1565,19 +1639,19 @@ static bool32 TestReelIconAttribute(s32 attr, s32 icon) { switch (attr) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: return icon ^ 4 ? TRUE : FALSE; - case SLOT_PAYOUT_CHERRIES2: - case SLOT_PAYOUT_CHERRIES3: - return icon == SLOT_IMAGE_CHERRIES ? TRUE : FALSE; - case SLOT_PAYOUT_MAGSHELL: - return icon == SLOT_IMAGE_MAGNEMITE || icon == SLOT_IMAGE_SHELLDER ? TRUE : FALSE; - case SLOT_PAYOUT_PIKAPSY: - return icon == SLOT_IMAGE_PIKACHU || icon == SLOT_IMAGE_PSYDUCK ? TRUE : FALSE; - case SLOT_PAYOUT_ROCKET: - return icon == SLOT_IMAGE_ROCKET ? TRUE : FALSE; - case SLOT_PAYOUT_7: - return icon == SLOT_IMAGE_7 ? TRUE : FALSE; + case PAYOUT_CHERRIES2: + case PAYOUT_CHERRIES3: + return icon == ICON_CHERRIES ? TRUE : FALSE; + case PAYOUT_MAGSHELL: + return icon == ICON_MAGNEMITE || icon == ICON_SHELLDER ? TRUE : FALSE; + case PAYOUT_PIKAPSY: + return icon == ICON_PIKACHU || icon == ICON_PSYDUCK ? TRUE : FALSE; + case PAYOUT_ROCKET: + return icon == ICON_ROCKET ? TRUE : FALSE; + case PAYOUT_7: + return icon == ICON_7 ? TRUE : FALSE; default: return FALSE; } @@ -1588,18 +1662,18 @@ static u8 ReelIconToPayoutRank(s32 iconId) switch (iconId) { default: - case SLOT_IMAGE_CHERRIES: - return SLOT_PAYOUT_CHERRIES2; - case SLOT_IMAGE_MAGNEMITE: - case SLOT_IMAGE_SHELLDER: - return SLOT_PAYOUT_MAGSHELL; - case SLOT_IMAGE_PIKACHU: - case SLOT_IMAGE_PSYDUCK: - return SLOT_PAYOUT_PIKAPSY; - case SLOT_IMAGE_ROCKET: - return SLOT_PAYOUT_ROCKET; - case SLOT_IMAGE_7: - return SLOT_PAYOUT_7; + case ICON_CHERRIES: + return PAYOUT_CHERRIES2; + case ICON_MAGNEMITE: + case ICON_SHELLDER: + return PAYOUT_MAGSHELL; + case ICON_PIKACHU: + case ICON_PSYDUCK: + return PAYOUT_PIKAPSY; + case ICON_ROCKET: + return PAYOUT_ROCKET; + case ICON_7: + return PAYOUT_7; } } @@ -1607,22 +1681,22 @@ static void CalcSlotBias(void) { u16 rval = Random() / 4; s32 i; - const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineidx]; - for (i = 0; i < 6; i++) + const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineIdx]; + for (i = 0; i < NUM_PAYOUT_TYPES - 1; i++) { if (rval < biasChances[i]) break; } - if (sSlotMachineState->machineBias < SLOT_PAYOUT_ROCKET) + if (sSlotMachineState->machineBias < PAYOUT_ROCKET) { if (sSlotMachineState->biasCooldown == 0) { - if ((Random() & 0x3FFF) < biasChances[SLOT_PAYOUT_7]) + if ((Random() & 0x3FFF) < biasChances[PAYOUT_7]) sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; } if (sSlotMachineState->biasCooldown != 0) { - if (i == 0 && (Random() & 0x3FFF) < 0x2CCC) // 70% + if (i == 0 && (Random() & 0x3FFF) < (int)(0.7 * 0x3FFF)) // 70% sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; sSlotMachineState->biasCooldown--; } @@ -1642,7 +1716,7 @@ static u16 CalcPayout(void) s32 reel1pos, reel2pos, reel3pos; s32 bestMatch; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) sSlotMachineState->winFlags[i] = FALSE; bestMatch = 0; @@ -1653,20 +1727,20 @@ static u16 CalcPayout(void) for (i = 0; i < 3; i++) { reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; reel2pos++; - if (reel2pos >= 21) + if (reel2pos >= REEL_LENGTH) reel2pos = 0; reel3pos++; - if (reel3pos >= 21) + if (reel3pos >= REEL_LENGTH) reel3pos = 0; visibleIcons[0 * 3 + i] = sReelIconAnimByReelAndPos[0][reel1pos]; visibleIcons[1 * 3 + i] = sReelIconAnimByReelAndPos[1][reel2pos]; visibleIcons[2 * 3 + i] = sReelIconAnimByReelAndPos[2][reel3pos]; } sSlotMachineState->payout = 0; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (sSlotMachineState->bet >= sRowAttributes[i][ROWATTR_MINBET]) { @@ -1699,16 +1773,16 @@ static u8 GetPlayerBet(void) return sSlotMachineState->bet; } -static bool32 GetWinFlagByLine(int a0) +static bool32 GetWinFlagByLine(int lineId) { - return sSlotMachineState->winFlags[a0]; + return sSlotMachineState->winFlags[lineId]; } static bool32 LoadSpriteGraphicsAndAllocateManager(void) { s32 i; - for (i = 0; i < NELEMS(sSpriteSheets); i++) + for (i = 0; i < ARRAY_COUNT(sSpriteSheets); i++) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalettes(sSpritePalettes); sSlotMachineGfxManager = Alloc(sizeof(*sSlotMachineGfxManager)); @@ -1731,13 +1805,11 @@ static void InitGfxManager(struct SlotMachineGfxManager * manager) { s32 i, j; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { manager->field_00[i] = 0; - for (j = 0; j < 5; j++) - { + for (j = 0; j < REEL_LOAD_LENGTH; j++) manager->reelIconSprites[i][j] = NULL; - } } } @@ -1747,9 +1819,9 @@ static void CreateReelIconSprites(void) s32 i, j; s32 spriteId; s32 animId; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { spriteId = CreateSprite(&sSpriteTemplate_ReelIcons, 80 + 40 * i, 44 + 24 * j, 2); animId = sReelIconAnimByReelAndPos[i][j]; @@ -1772,11 +1844,11 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) s32 i, j; s32 reelPos, ypos; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { reelPos = *reelPosPtr; ypos = *yposPtr * 8; - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { sSlotMachineGfxManager->reelIconSprites[i][j]->y2 = ypos; { @@ -1791,7 +1863,7 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) } sSlotMachineGfxManager->reelIconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag(sReelIconPaletteTags[sReelIconAnimByReelAndPos[i][reelPos]]); reelPos++; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; } reelPosPtr++; @@ -1819,11 +1891,11 @@ static void CreateScoreDigitSprites(void) s32 i; s32 spriteId; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x55 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 85 + 7 * i, 30, 0); sSlotMachineGfxManager->creditDigitSprites[i] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x85 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 133 + 7 * i, 30, 0); sSlotMachineGfxManager->payoutDigitSprites[i] = &gSprites[spriteId]; } } @@ -1836,7 +1908,7 @@ static void UpdateCoinsDisplay(void) s32 divisor = 1000; s32 quotient; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { quotient = coins / divisor; StartSpriteAnim(sSlotMachineGfxManager->creditDigitSprites[i], quotient); @@ -1850,11 +1922,9 @@ static void UpdateCoinsDisplay(void) static void CreateClefairySprites(void) { - s32 spriteId; - - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0x10, 0x88, 1); + s32 spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 16, 136, 1); sSlotMachineGfxManager->clefairySprites[0] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0xE0, 0x88, 1); + spriteId = CreateSprite(&sSpriteTemplate_Clefairy, DISPLAY_WIDTH - 16, 136, 1); sSlotMachineGfxManager->clefairySprites[1] = &gSprites[spriteId]; sSlotMachineGfxManager->clefairySprites[1]->hFlip = TRUE; } @@ -1862,10 +1932,8 @@ static void CreateClefairySprites(void) static void SetClefairySpriteAnim(u8 animId) { s32 i; - for (i = 0; i < 2; i++) - { + for (i = 0; i < (int)ARRAY_COUNT(sSlotMachineGfxManager->clefairySprites); i++) StartSpriteAnim(sSlotMachineGfxManager->clefairySprites[i], animId); - } } static bool32 CreateSlotMachine(void) @@ -1875,7 +1943,7 @@ static bool32 CreateSlotMachine(void) struct SlotMachineSetupTaskData * ptr = Alloc(sizeof(struct SlotMachineSetupTaskData)); if (ptr == NULL) return FALSE; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) ptr->tasks[i].active = 0; ptr->yesNoMenuActive = FALSE; SetWordTaskArg(CreateTask(Task_SlotMachine, 2), 0, (uintptr_t)ptr); @@ -1898,7 +1966,7 @@ static void Task_SlotMachine(u8 taskId) struct SlotMachineSetupTaskData * ptr = (void *)GetWordTaskArg(taskId, 0); s32 i; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) { if (ptr->tasks[i].active) ptr->tasks[i].active = sSlotMachineSetupTasks[ptr->tasks[i].funcno](&ptr->tasks[i].state, ptr); @@ -1958,7 +2026,7 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgPositions(); ResetBgsAndClearDma3BusyFlags(FALSE); - InitBgsFromTemplates(0, sBgTemplates, NELEMS(sBgTemplates)); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); InitWindows(sWindowTemplates); SetBgTilemapBuffer(3, ptr->bg3TilemapBuffer); @@ -1966,29 +2034,29 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData CopyBgTilemapBufferToVram(3); ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_00, 0, 0x00, 0); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_C0, 0, 0xC0, 0); + DecompressAndCopyTileDataToVram(2, sBg_Tiles, 0, 0x00, 0); + DecompressAndCopyTileDataToVram(2, sButtonPressed_Tiles, 0, 0xC0, 0); SetBgTilemapBuffer(2, ptr->bg2TilemapBuffer); - CopyToBgTilemapBuffer(2, sBg2Map, 0, 0x00); + CopyToBgTilemapBuffer(2, sBg_Tilemap, 0, 0x00); CopyBgTilemapBufferToVram(2); - LoadPalette(sBgPal_00, 0x00, 0xA0); - LoadPalette(sBgPal_50, 0x50, 0x20); - LoadPalette(sBgPal_70, 0x70, 0x60); + LoadPalette(sBg_Pal, 0x00, sizeof(sBg_Pal)); + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_BET * 16, sizeof(sBgPal_MatchLines)); + LoadPalette(sCombosWindow_Pal, 0x70, sizeof(sCombosWindow_Pal)); LoadColor(RGB(30, 30, 31), pal); LoadUserWindowGfx2(0, 0x00A, 0xD0); LoadStdWindowGfxOnBg(0, 0x001, 0xF0); SetBgTilemapBuffer(0, ptr->bg0TilemapBuffer); FillBgTilemapBufferRect_Palette0(0, 0, 0, 2, 32, 30); - DecompressAndCopyTileDataToVram(1, sBg1Tiles, 0, 0, 0); - DecompressAndCopyTileDataToVram(1, sBg1Map, 0, 0, 1); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tiles, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tilemap, 0, 0, 1); CopyBgTilemapBufferToVram(1); LoadPalette(GetTextWindowPalette(2), 0xE0, 0x20); FillWindowPixelBuffer(1, 0xFF); PutWindowTilemap(1); - x = 236 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); + x = DISPLAY_WIDTH - 4 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); textColor[0] = TEXT_DYNAMIC_COLOR_6; textColor[1] = TEXT_COLOR_WHITE; textColor[2] = TEXT_COLOR_DARK_GRAY; @@ -2278,20 +2346,20 @@ static void SetLineStatesByBet(u16 * bgTilemapBuffer) switch (GetPlayerBet()) { case 0: - SetLineState(bgTilemapBuffer, 0, 4); - SetLineState(bgTilemapBuffer, 1, 4); - SetLineState(bgTilemapBuffer, 2, 4); - SetLineState(bgTilemapBuffer, 3, 4); - SetLineState(bgTilemapBuffer, 4, 4); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_NORMAL); break; case 3: - SetLineState(bgTilemapBuffer, 0, 5); - SetLineState(bgTilemapBuffer, 4, 5); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_BET); case 2: - SetLineState(bgTilemapBuffer, 1, 5); - SetLineState(bgTilemapBuffer, 3, 5); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_BET); case 1: - SetLineState(bgTilemapBuffer, 2, 5); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_BET); break; } } @@ -2318,11 +2386,11 @@ static void Task_FlashWinningLine(u8 taskId) switch (data[0]) { case 0: - LoadPalette(sBgPal_50, 0x60, 0x20); - for (i = 0; i < 5; i++) + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_MATCH * 16, sizeof(sBgPal_MatchLines)); + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 6); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_MATCH); } CopyBgTilemapBufferToVram(2); data[0]++; @@ -2331,7 +2399,7 @@ static void Task_FlashWinningLine(u8 taskId) if (data[1] == 0) { u16 y = gSineTable[data[2]] >> 7; - LoadPalette(&sBgPal_VictoryFlash[16 * y], 0x10, 0x20); + LoadPalette(&sBgPal_PayoutLight[y], 0x10, sizeof(sBgPal_PayoutLight[0])); data[2] += 32; data[2] &= 0x7F; data[1] = 8; @@ -2344,7 +2412,7 @@ static void Task_FlashWinningLine(u8 taskId) data[4] += 8; data[4] &= 0x7F; data[5] = gSineTable[data[4]] >> 5; - BlendPalettes(0x00000040, data[5], RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5], RGB_BLACK); } else { @@ -2354,22 +2422,24 @@ static void Task_FlashWinningLine(u8 taskId) data[4] = 0; data[5]++; data[5] &= 1; - BlendPalettes(0x00000040, data[5] * 8, RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5] * 8, RGB_BLACK); } } - for (i = 0; i < NELEMS(sWInningLineFlashPalIdxs); i++) - { - gPlttBufferFaded[sWInningLineFlashPalIdxs[i] + 0x60] = gPlttBufferUnfaded[sWInningLineFlashPalIdxs[i] + 0x60]; - } + for (i = 0; i < ARRAY_COUNT(sWinningLineFlashPalIdxs); i++) + gPlttBufferFaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16] = gPlttBufferUnfaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16]; break; case 2: - for (i = 0; i < 5; i++) + // Restore match lines to normal color + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 4); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_NORMAL); } - LoadPalette(sBgPal_10, 0x10, 0x20); + + // Restore payout lights to normal color + LoadPalette(&sBg_Pal[1], 0x10, sizeof(sBg_Pal[1])); + CopyBgTilemapBufferToVram(2); data[0]++; break; @@ -2408,9 +2478,9 @@ static void InitReelButtonTileMem(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; data->buttonReleasedTiles[i][j] = buffer[idx]; @@ -2421,12 +2491,12 @@ static void InitReelButtonTileMem(void) static void SetReelButtonPressed(u8 reel) { - if (reel < 3) + if (reel < NUM_REELS) { s32 i; struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_BUTTON_TILES; i++) { u16 idx = sReelButtonMapTileIdxs[reel][i]; buffer[idx] = data->buttonPressedTiles[reel][i]; @@ -2440,9 +2510,9 @@ static void ReleaseReelButtons(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; buffer[idx] = data->buttonReleasedTiles[i][j]; diff --git a/src/teachy_tv.c b/src/teachy_tv.c index 0f4e79099..0d4c31434 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -95,7 +95,7 @@ static u8 TeachyTvGrassAnimationCheckIfNeedsToGenerateGrassObj(s16 x, s16 y); static void TeachyTvGrassAnimationObjCallback(struct Sprite *sprite); static void TeachyTvRestorePlayerPartyCallback(void); static void TeachyTvPreBattleAnimAndSetBattleCallback(u8 taskId); -static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size); +static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size); static void TeachyTvPushBackNewMapPalIndexArrayEntry(const struct MapLayout *mStruct, u16 *buf1, u8 *palIndexArray, u16 mapEntry, u16 offset); static void TeachyTvComputeMapTilesFromTilesetAndMetaTiles(const u16 *metaTilesArray, u8 *blockBuf, u8 *tileset); static void TeachyTvComputeSingleMapTileBlockFromTilesetAndMetaTiles(u8 *blockBuf, u8 *tileset, u8 metaTile); @@ -1276,7 +1276,7 @@ static void TeachyTvLoadBg3Map(u16 *buffer) Free(blockIndicesBuffer); } -static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size) +static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size) { if (ts) { diff --git a/src/trade.c b/src/trade.c index e7de8d22d..d3966b993 100644 --- a/src/trade.c +++ b/src/trade.c @@ -948,7 +948,7 @@ static void CB2_CreateTradeMenu(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { struct Pokemon * mon = &gPlayerParty[i]; - sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), + sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, @@ -960,7 +960,7 @@ static void CB2_CreateTradeMenu(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { struct Pokemon * mon = &gEnemyParty[i]; - sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), + sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, @@ -1145,7 +1145,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon( - GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL), + GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, sTradeMonSpriteCoords[i][0] * 8 + 14, sTradeMonSpriteCoords[i][1] * 8 - 12, @@ -1157,7 +1157,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon( - GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL), + GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8 + 14, sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8 - 12, @@ -1964,7 +1964,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 cursor // Partner cant trade illegitimate Deoxys or Mew partnerSpecies = GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_SPECIES); if ((partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW) - && !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_EVENT_LEGAL)) + && !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return PARTNER_MON_INVALID; if (hasLiveMon != 0) @@ -2747,7 +2747,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int for (i = 0; i < partyCount; i++) { - species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES2); + species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES_OR_EGG); species[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES); } @@ -2790,7 +2790,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW) { - if (!GetMonData(&playerParty[monIdx], MON_DATA_EVENT_LEGAL)) + if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return CANT_TRADE_INVALID_MON; } @@ -2855,17 +2855,17 @@ s32 GetGameProgressForLinkTrade(void) return TRADE_BOTH_PLAYERS_READY; } -static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal) +static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter) { if (species == SPECIES_DEOXYS || species == SPECIES_MEW) { - if (!isEventLegal) + if (!isModernFatefulEncounter) return TRUE; } return FALSE; } -int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal) +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter) { bool8 playerHasNationalDex = player.hasNationalDex; bool8 playerCanLinkNationally = player.canLinkNationally; @@ -2890,7 +2890,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf } // Cannot trade illegitimate Deoxys/Mew - if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal)) + if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter)) return UR_TRADE_MSG_MON_CANT_BE_TRADED_2; if (partnerSpecies == SPECIES_EGG) @@ -2902,8 +2902,8 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf else { // Player's Pokémon must be of the type the partner requested - if (gBaseStats[playerSpecies2].type1 != requestedType - && gBaseStats[playerSpecies2].type2 != requestedType) + if (gSpeciesInfo[playerSpecies2].types[0] != requestedType + && gSpeciesInfo[playerSpecies2].types[1] != requestedType) return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS; } @@ -2933,11 +2933,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf return UR_TRADE_MSG_NONE; } -int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal) +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter) { bool8 hasNationalDex = player.hasNationalDex; - if (IsDeoxysOrMewUntradable(species, isEventLegal)) + if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter)) return CANT_REGISTER_MON; if (hasNationalDex) diff --git a/src/trade_scene.c b/src/trade_scene.c index ad79c7287..de99e5366 100644 --- a/src/trade_scene.c +++ b/src/trade_scene.c @@ -753,7 +753,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) { case 0: // Load graphics - species = GetMonData(mon, MON_DATA_SPECIES2); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(mon, MON_DATA_PERSONALITY); if (whichParty == TRADE_PLAYER) @@ -881,8 +881,8 @@ void CB2_LinkTrade(void) case 10: BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); ShowBg(0); - sTradeAnim->questLogData.speciesSent = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES2); - sTradeAnim->questLogData.speciesReceived = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES2); + sTradeAnim->questLogData.speciesSent = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES_OR_EGG); + sTradeAnim->questLogData.speciesReceived = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES_OR_EGG); memcpy(sTradeAnim->questLogData.partnerName, gLinkPlayers[GetMultiplayerId() ^ 1].name, PLAYER_NAME_LENGTH); gMain.state++; break; diff --git a/src/trainer_tower.c b/src/trainer_tower.c index fd0bc4a0a..5aa48d026 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -1030,7 +1030,7 @@ static s32 GetPartyMaxLevel(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG) { s32 currLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL); if (currLevel > topLevel) diff --git a/src/union_room.c b/src/union_room.c index 48545c01c..59a090f98 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -4002,7 +4002,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) return UR_TRADE_MATCH; } @@ -4012,8 +4012,8 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); - if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type) + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); + if (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type) return UR_TRADE_MATCH; } return UR_TRADE_NOTYPE; @@ -4145,7 +4145,7 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) for (i = 0; i < gPlayerPartyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= UNION_ROOM_MAX_LEVEL - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) count++; } @@ -4174,7 +4174,7 @@ void Script_ResetUnionRoomTrade(void) static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * trade) { - trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->playerLevel = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->playerPersonality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); if (trade->playerSpecies == SPECIES_EGG) @@ -4185,7 +4185,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * tra static void RegisterTradeMon(u32 monId, struct UnionRoomTrade * trade) { - trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); } @@ -4217,7 +4217,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade * trade, u8 mul cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); if (cur_personality != personality) continue; - cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (cur_species != species) continue; response = i; diff --git a/src/union_room_chat_display.c b/src/union_room_chat_display.c index ab789ca83..6ded7d3af 100644 --- a/src/union_room_chat_display.c +++ b/src/union_room_chat_display.c @@ -119,9 +119,9 @@ static void InitScanlineEffect(void); static void FillScanlineEffectWithValue1col(s16 a0); static void FillScanlineEffectWithValue2col(s16 a0); -static const u16 sUnionRoomChatPanelBgPal_C[] = INCBIN_U16("graphics/union_room_chat/unk_845AA24.gbapal"); -static const u16 sBg1Pal8[] = INCBIN_U16("graphics/union_room_chat/unk_845AA44.gbapal"); -static const u16 sWin0PalF[] = INCBIN_U16("graphics/union_room_chat/unk_845AA64.gbapal"); +static const u16 sUnionRoomChat_TextEntry_Pal[] = INCBIN_U16("graphics/union_room_chat/text_entry.gbapal"); +static const u16 gUnionRoomChat_Unused_Pal[] = INCBIN_U16("graphics/union_room_chat/unused.gbapal"); // Loaded, but nothing uses it +static const u16 sUnionRoomChat_Messages_Pal[] = INCBIN_U16("graphics/union_room_chat/messages.gbapal"); static const struct BgTemplate sBgTemplates[] = { { @@ -1259,10 +1259,10 @@ static void ClearBg0(void) static void LoadUnionRoomChatPanelGfx(void) { - LoadPalette(gUnionRoomChatPanelBgPal_7, 0x70, 0x20); - LoadPalette(sUnionRoomChatPanelBgPal_C, 0xC0, 0x20); - DecompressAndCopyTileDataToVram(1, gUnionRoomChatPanelBgTiles, 0, 0, 0); - CopyToBgTilemapBuffer(1, gUnionRoomChatPanelBgMap, 0, 0); + LoadPalette(gUnionRoomChat_Panel_Pal, 0x70, 0x20); + LoadPalette(sUnionRoomChat_TextEntry_Pal, 0xC0, 0x20); + DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Panel_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(1, gUnionRoomChat_Panel_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); } @@ -1270,21 +1270,21 @@ static void LoadLinkMiscMenuGfx(void) { u8 *ptr; - LoadPalette(gLinkMiscMenu_Pal, 0, 0x20); - ptr = DecompressAndCopyTileDataToVram(2, gLinkMiscMenu_Gfx, 0, 0, 0); - CopyToBgTilemapBuffer(2, gLinkMiscMenu_Tilemap, 0, 0); + LoadPalette(gUnionRoomChat_Bg_Pal, 0, 0x20); + ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Bg_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(2, gUnionRoomChat_Bg_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); } static void LoadBg1Pal8(void) { - LoadPalette(sBg1Pal8, 0x80, 0x20); + LoadPalette(gUnionRoomChat_Unused_Pal, 0x80, 0x20); RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, DMA3_32BIT); } static void LoadWin0(void) { - LoadPalette(sWin0PalF, 0xF0, 0x20); + LoadPalette(sUnionRoomChat_Messages_Pal, 0xF0, 0x20); PutWindowTilemap(0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/union_room_chat_objects.c b/src/union_room_chat_objects.c index 24590c67a..23837d2e3 100644 --- a/src/union_room_chat_objects.c +++ b/src/union_room_chat_objects.c @@ -4,6 +4,14 @@ #include "graphics.h" #include "union_room_chat.h" +enum { + GFXTAG_SELECTOR_CURSOR, + GFXTAG_CHAR_SELECT_CURSOR, + GFXTAG_TEXT_ENTRY_CURSOR, + GFXTAG_R_BUTTON, + GFXTAG_ICONS, +}; + struct UnionRoomChat3 { struct Sprite *selectorCursorSprite; @@ -19,18 +27,38 @@ static EWRAM_DATA struct UnionRoomChat3 *sWork = NULL; static void SpriteCB_TextEntryCursor(struct Sprite *sprite); static void SpriteCB_CharacterSelectCursor(struct Sprite *sprite); -static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/unk_845AC14.gbapal"); -static const u32 sSelectorCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AC34.4bpp.lz"); -static const u32 sHorizontalBarGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AEB8.4bpp.lz"); -static const u32 sMenuCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AED8.4bpp.lz"); -static const u32 sRButtonGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AF04.4bpp.lz"); +static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/objects.gbapal"); +static const u32 sSelectorCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/selector_cursor.4bpp.lz"); +static const u32 sTextEntryCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/text_entry_cursor.4bpp.lz"); +static const u32 sCharacterSelectCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/character_select_cursor.4bpp.lz"); +static const u32 sRButton_Gfx[] = INCBIN_U32("graphics/union_room_chat/r_button.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {sSelectorCursorGfxTiles, 0x1000, 0}, - {sMenuCursorGfxTiles, 0x0040, 1}, - {sHorizontalBarGfxTiles, 0x0040, 2}, - {sRButtonGfxTiles, 0x0080, 3}, - {gUnionRoomChatIcons, 0x0400, 4} + { + .data = sSelectorCursor_Gfx, + .size = 128 * TILE_SIZE_4BPP, + .tag = GFXTAG_SELECTOR_CURSOR + }, + { + .data = sCharacterSelectCursor_Gfx, + .size = 2 * TILE_SIZE_4BPP, + .tag = GFXTAG_CHAR_SELECT_CURSOR + }, + { + .data = sTextEntryCursor_Gfx, + .size = 2 * TILE_SIZE_4BPP, + .tag = GFXTAG_TEXT_ENTRY_CURSOR + }, + { + .data = sRButton_Gfx, + .size = 4 * TILE_SIZE_4BPP, + .tag = GFXTAG_R_BUTTON + }, + { + .data = gUnionRoomChat_Icons_Gfx, + .size = 32 * TILE_SIZE_4BPP, + .tag = GFXTAG_ICONS + }, }; static const struct SpritePalette sSpritePalette = { @@ -71,7 +99,7 @@ static const union AnimCmd *const sSpriteAnims_SelectorCursor[] = { }; static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = { - .tileTag = 0, + .tileTag = GFXTAG_SELECTOR_CURSOR, .paletteTag = 0, .oam = &sOamData_64x32_1, .anims = sSpriteAnims_SelectorCursor, @@ -86,7 +114,7 @@ static const struct OamData sOamData_8x16_2 = { }; static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { - .tileTag = 2, + .tileTag = GFXTAG_TEXT_ENTRY_CURSOR, .paletteTag = 0, .oam = &sOamData_8x16_2, .anims = gDummySpriteAnimTable, @@ -95,7 +123,7 @@ static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { }; static const struct SpriteTemplate sSpriteTemplate_CharacterSelectCursor = { - .tileTag = 1, + .tileTag = GFXTAG_CHAR_SELECT_CURSOR, .paletteTag = 0, .oam = &sOamData_8x16_2, .anims = gDummySpriteAnimTable, @@ -143,7 +171,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnionRoomChatIcons[] = { }; static const struct SpriteTemplate sSpriteTemplate_RButton = { - .tileTag = 3, + .tileTag = GFXTAG_R_BUTTON, .paletteTag = 0, .oam = &sOamData_16x16_2, .anims = gDummySpriteAnimTable, @@ -152,7 +180,7 @@ static const struct SpriteTemplate sSpriteTemplate_RButton = { }; static const struct SpriteTemplate sSpriteTemplate_UnionRoomChatIcons = { - .tileTag = 4, + .tileTag = GFXTAG_ICONS, .paletteTag = 0, .oam = &sOamData_32x16_2, .anims = sSpriteAnimTable_UnionRoomChatIcons, diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 5de9f7461..cfe95c485 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -61,14 +61,44 @@ void write_text_file(string filepath, string text) { out_file.close(); } + +string json_to_string(const Json &data, const string &field = "", bool silent = false) { + const Json value = !field.empty() ? data[field] : data; + string output = ""; + switch (value.type()) { + case Json::Type::STRING: + output = value.string_value(); + break; + case Json::Type::NUMBER: + output = std::to_string(value.int_value()); + break; + case Json::Type::BOOL: + output = value.bool_value() ? "TRUE" : "FALSE"; + break; + default:{ + if (!silent) { + string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; + FATAL_ERROR("%s is unexpected type; expected string, number, or bool.\n", s.c_str()); + } + } + } + + if (!silent && output.empty()) { + string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; + FATAL_ERROR("%s cannot be empty.\n", s.c_str()); + } + + return output; +} + string generate_map_header_text(Json map_data, Json layouts_data) { - string map_layout_id = map_data["layout"].string_value(); + string map_layout_id = json_to_string(map_data, "layout"); vector matched; - for (auto &field : layouts_data["layouts"].array_items()) { - if (map_layout_id == field["id"].string_value()) - matched.push_back(field); + for (auto &layout : layouts_data["layouts"].array_items()) { + if (map_layout_id == json_to_string(layout, "id", true)) + matched.push_back(layout); } if (matched.size() != 1) @@ -78,55 +108,52 @@ string generate_map_header_text(Json map_data, Json layouts_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); - text << map_data["name"].string_value() << "::\n" - << "\t.4byte " << layout["name"].string_value() << "\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; + + text << mapName << ":\n" + << "\t.4byte " << json_to_string(layout, "name") << "\n"; if (map_data.object_items().find("shared_events_map") != map_data.object_items().end()) - text << "\t.4byte " << map_data["shared_events_map"].string_value() << "_MapEvents\n"; + text << "\t.4byte " << json_to_string(map_data, "shared_events_map") << "_MapEvents\n"; else - text << "\t.4byte " << map_data["name"].string_value() << "_MapEvents\n"; + text << "\t.4byte " << mapName << "_MapEvents\n"; if (map_data.object_items().find("shared_scripts_map") != map_data.object_items().end()) - text << "\t.4byte " << map_data["shared_scripts_map"].string_value() << "_MapScripts\n"; + text << "\t.4byte " << json_to_string(map_data, "shared_scripts_map") << "_MapScripts\n"; else - text << "\t.4byte " << map_data["name"].string_value() << "_MapScripts\n"; + text << "\t.4byte " << mapName << "_MapScripts\n"; if (map_data.object_items().find("connections") != map_data.object_items().end() - && map_data["connections"].array_items().size() > 0 && map_data["connections_no_include"] == Json()) - text << "\t.4byte " << map_data["name"].string_value() << "_MapConnections\n"; + && map_data["connections"].array_items().size() > 0 && json_to_string(map_data, "connections_no_include", true) != "TRUE") + text << "\t.4byte " << mapName << "_MapConnections\n"; else - text << "\t.4byte 0x0\n"; + text << "\t.4byte NULL\n"; - text << "\t.2byte " << map_data["music"].string_value() << "\n" - << "\t.2byte " << layout["id"].string_value() << "\n" - << "\t.byte " << map_data["region_map_section"].string_value() << "\n" - << "\t.byte " << map_data["requires_flash"].bool_value() << "\n" - << "\t.byte " << map_data["weather"].string_value() << "\n" - << "\t.byte " << map_data["map_type"].string_value() << "\n"; + text << "\t.2byte " << json_to_string(map_data, "music") << "\n" + << "\t.2byte " << json_to_string(layout, "id") << "\n" + << "\t.byte " << json_to_string(map_data, "region_map_section") << "\n" + << "\t.byte " << json_to_string(map_data, "requires_flash") << "\n" + << "\t.byte " << json_to_string(map_data, "weather") << "\n" + << "\t.byte " << json_to_string(map_data, "map_type") << "\n"; if (version != "firered") text << "\t.2byte 0\n"; - if (version == "ruby") { - text << "\t.byte " << map_data["show_map_name"].bool_value() << "\n"; - } - else if (version == "emerald" || version == "firered") { + if (version == "ruby") + text << "\t.byte " << json_to_string(map_data, "show_map_name") << "\n"; + else if (version == "emerald" || version == "firered") text << "\tmap_header_flags " - << "allow_cycling=" << map_data["allow_cycling"].bool_value() << ", " - << "allow_escaping=" << map_data["allow_escaping"].bool_value() << ", " - << "allow_running=" << map_data["allow_running"].bool_value() << ", " - << "show_map_name=" << map_data["show_map_name"].bool_value() << "\n"; - } + << "allow_cycling=" << json_to_string(map_data, "allow_cycling") << ", " + << "allow_escaping=" << json_to_string(map_data, "allow_escaping") << ", " + << "allow_running=" << json_to_string(map_data, "allow_running") << ", " + << "show_map_name=" << json_to_string(map_data, "show_map_name") << "\n"; - if (version == "firered") { - text << "\t.byte " << map_data["floor_number"].int_value() << "\n"; - } + if (version == "firered") + text << "\t.byte " << json_to_string(map_data, "floor_number") << "\n"; - text << "\t.byte " << map_data["battle_scene"].string_value() << "\n\n"; + text << "\t.byte " << json_to_string(map_data, "battle_scene") << "\n\n"; return text.str(); } @@ -137,22 +164,22 @@ string generate_map_connections_text(Json map_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); - text << map_data["name"].string_value() << "_MapConnectionsList::\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; + + text << mapName << "_MapConnectionsList:\n"; for (auto &connection : map_data["connections"].array_items()) { text << "\tconnection " - << connection["direction"].string_value() << ", " - << connection["offset"].int_value() << ", " - << connection["map"].string_value() << "\n"; + << json_to_string(connection, "direction") << ", " + << json_to_string(connection, "offset") << ", " + << json_to_string(connection, "map") << "\n"; } - text << "\n" << map_data["name"].string_value() << "_MapConnections::\n" + text << "\n" << mapName << "_MapConnections:\n" << "\t.4byte " << map_data["connections"].array_items().size() << "\n" - << "\t.4byte " << map_data["name"].string_value() << "_MapConnectionsList\n\n"; + << "\t.4byte " << mapName << "_MapConnectionsList\n\n"; return text.str(); } @@ -163,232 +190,137 @@ string generate_map_events_text(Json map_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); + + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; string objects_label, warps_label, coords_label, bgs_label; if (map_data["object_events"].array_items().size() > 0) { - objects_label = map_data["name"].string_value() + "_ObjectEvents"; + objects_label = mapName + "_ObjectEvents"; text << objects_label << ":\n"; for (unsigned int i = 0; i < map_data["object_events"].array_items().size(); i++) { auto obj_event = map_data["object_events"].array_items()[i]; - text << "\tobject_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", 0, " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["elevation"].int_value() << ", " - << obj_event["movement_type"].string_value() << ", " - << obj_event["movement_range_x"].int_value() << ", " - << obj_event["movement_range_y"].int_value() << ", " - << obj_event["trainer_type"].string_value() << ", " - << obj_event["trainer_sight_or_berry_tree_id"].string_value() << ", " - << obj_event["script"].string_value() << ", " - << obj_event["flag"].string_value() << "\n"; - } - text << "\n"; - } else { - objects_label = "0x0"; - } - - if (map_data["warp_events"].array_items().size() > 0) { - warps_label = map_data["name"].string_value() + "_MapWarps"; - text << warps_label << ":\n"; - for (auto &warp_event : map_data["warp_events"].array_items()) { - text << "\twarp_def " - << warp_event["x"].int_value() << ", " - << warp_event["y"].int_value() << ", " - << warp_event["elevation"].int_value() << ", " - << warp_event["dest_warp_id"].string_value() << ", " - << warp_event["dest_map"].string_value() << "\n"; - } - text << "\n"; - } else { - warps_label = "0x0"; - } - - if (map_data["coord_events"].array_items().size() > 0) { - coords_label = map_data["name"].string_value() + "_MapCoordEvents"; - text << coords_label << ":\n"; - for (auto &coord_event : map_data["coord_events"].array_items()) { - if (coord_event["type"].string_value() == "trigger") { - text << "\tcoord_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["var"].string_value() << ", " - << coord_event["var_value"].string_value() << ", " - << coord_event["script"].string_value() << "\n"; - } - else if (coord_event["type"] == "weather") { - text << "\tcoord_weather_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["weather"].string_value() << "\n"; - } - } - text << "\n"; - } else { - coords_label = "0x0"; - } - - if (map_data["bg_events"].array_items().size() > 0) { - bgs_label = map_data["name"].string_value() + "_MapBGEvents"; - text << bgs_label << ":\n"; - for (auto &bg_event : map_data["bg_events"].array_items()) { - if (bg_event["type"] == "sign") { - text << "\tbg_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["player_facing_dir"].string_value() << ", " - << bg_event["script"].string_value() << "\n"; - } - else if (bg_event["type"] == "hidden_item") { - text << "\tbg_hidden_item_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["item"].string_value() << ", " - << bg_event["flag"].string_value() << "\n"; - } - else if (bg_event["type"] == "secret_base") { - text << "\tbg_secret_base_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["secret_base_id"].string_value() << "\n"; - } - } - text << "\n"; - } else { - bgs_label = "0x0"; - } - - text << map_data["name"].string_value() << "_MapEvents::\n" - << "\tmap_events " << objects_label << ", " << warps_label << ", " - << coords_label << ", " << bgs_label << "\n\n"; - - return text.str(); -} - -string generate_firered_map_events_text(Json map_data) { - ostringstream text; - - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; - - string objects_label, warps_label, coords_label, bgs_label; - - if (map_data["object_events"].array_items().size() > 0) { - objects_label = map_data["name"].string_value() + "_ObjectEvents"; - text << objects_label << "::\n"; - for (unsigned int i = 0; i < map_data["object_events"].array_items().size(); i++) { - auto obj_event = map_data["object_events"].array_items()[i]; - string type = obj_event["type"].string_value(); + string type = json_to_string(obj_event, "type", true); // If no type field is present, assume it's a regular object event. if (type == "" || type == "object") { text << "\tobject_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["elevation"].int_value() << ", " - << obj_event["movement_type"].string_value() << ", " - << obj_event["movement_range_x"].int_value() << ", " - << obj_event["movement_range_y"].int_value() << ", " - << obj_event["trainer_type"].string_value() << ", " - << obj_event["trainer_sight_or_berry_tree_id"].string_value() << ", " - << obj_event["script"].string_value() << ", " - << obj_event["flag"].string_value() << "\n"; + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "elevation") << ", " + << json_to_string(obj_event, "movement_type") << ", " + << json_to_string(obj_event, "movement_range_x") << ", " + << json_to_string(obj_event, "movement_range_y") << ", " + << json_to_string(obj_event, "trainer_type") << ", " + << json_to_string(obj_event, "trainer_sight_or_berry_tree_id") << ", " + << json_to_string(obj_event, "script") << ", " + << json_to_string(obj_event, "flag") << "\n"; } else if (type == "clone") { text << "\tclone_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["target_local_id"].int_value() << ", " - << obj_event["target_map"].string_value() << "\n"; + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "target_local_id") << ", " + << json_to_string(obj_event, "target_map") << "\n"; + } else { + FATAL_ERROR("Unknown object event type '%s'. Expected 'object' or 'clone'.\n", type.c_str()); } } text << "\n"; } else { - objects_label = "0x0"; + objects_label = "NULL"; } if (map_data["warp_events"].array_items().size() > 0) { - warps_label = map_data["name"].string_value() + "_MapWarps"; - text << warps_label << "::\n"; + warps_label = mapName + "_MapWarps"; + text << warps_label << ":\n"; for (auto &warp_event : map_data["warp_events"].array_items()) { text << "\twarp_def " - << warp_event["x"].int_value() << ", " - << warp_event["y"].int_value() << ", " - << warp_event["elevation"].int_value() << ", " - << warp_event["dest_warp_id"].string_value() << ", " - << warp_event["dest_map"].string_value() << "\n"; + << json_to_string(warp_event, "x") << ", " + << json_to_string(warp_event, "y") << ", " + << json_to_string(warp_event, "elevation") << ", " + << json_to_string(warp_event, "dest_warp_id") << ", " + << json_to_string(warp_event, "dest_map") << "\n"; } text << "\n"; } else { - warps_label = "0x0"; + warps_label = "NULL"; } if (map_data["coord_events"].array_items().size() > 0) { - coords_label = map_data["name"].string_value() + "_MapCoordEvents"; - text << coords_label << "::\n"; + coords_label = mapName + "_MapCoordEvents"; + text << coords_label << ":\n"; for (auto &coord_event : map_data["coord_events"].array_items()) { - if (coord_event["type"].string_value() == "trigger") { + string type = json_to_string(coord_event, "type"); + if (type == "trigger") { text << "\tcoord_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["var"].string_value() << ", " - << coord_event["var_value"].string_value() << ", " - << coord_event["script"].string_value() << "\n"; + << json_to_string(coord_event, "x") << ", " + << json_to_string(coord_event, "y") << ", " + << json_to_string(coord_event, "elevation") << ", " + << json_to_string(coord_event, "var") << ", " + << json_to_string(coord_event, "var_value") << ", " + << json_to_string(coord_event, "script") << "\n"; } - else if (coord_event["type"] == "weather") { + else if (type == "weather") { text << "\tcoord_weather_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["weather"].string_value() << "\n"; + << json_to_string(coord_event, "x") << ", " + << json_to_string(coord_event, "y") << ", " + << json_to_string(coord_event, "elevation") << ", " + << json_to_string(coord_event, "weather") << "\n"; + } else { + FATAL_ERROR("Unknown coord event type '%s'. Expected 'trigger' or 'weather'.\n", type.c_str()); } } text << "\n"; } else { - coords_label = "0x0"; + coords_label = "NULL"; } if (map_data["bg_events"].array_items().size() > 0) { - bgs_label = map_data["name"].string_value() + "_MapBGEvents"; - text << bgs_label << "::\n"; + bgs_label = mapName + "_MapBGEvents"; + text << bgs_label << ":\n"; for (auto &bg_event : map_data["bg_events"].array_items()) { - if (bg_event["type"] == "sign") { + string type = json_to_string(bg_event, "type"); + if (type == "sign") { text << "\tbg_sign_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["player_facing_dir"].string_value() << ", " - << bg_event["script"].string_value() << "\n"; + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "player_facing_dir") << ", " + << json_to_string(bg_event, "script") << "\n"; } - else if (bg_event["type"] == "hidden_item") { + else if (type == "hidden_item") { text << "\tbg_hidden_item_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["item"].string_value() << ", " - << bg_event["flag"].string_value() << ", " - << bg_event["quantity"].int_value() << ", " - << bg_event["underfoot"].bool_value() << "\n"; + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "item") << ", " + << json_to_string(bg_event, "flag"); + if (version == "firered") { + text << ", " + << json_to_string(bg_event, "quantity") << ", " + << json_to_string(bg_event, "underfoot"); + } + text << "\n"; + } + else if (type == "secret_base") { + text << "\tbg_secret_base_event " + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "secret_base_id") << "\n"; + } else { + FATAL_ERROR("Unknown bg event type '%s'. Expected 'sign', 'hidden_item', or 'secret_base'.\n", type.c_str()); } } text << "\n"; } else { - bgs_label = "0x0"; + bgs_label = "NULL"; } - text << map_data["name"].string_value() << "_MapEvents::\n" + text << mapName << "_MapEvents::\n" << "\tmap_events " << objects_label << ", " << warps_label << ", " << coords_label << ", " << bgs_label << "\n\n"; @@ -416,8 +348,7 @@ void process_map(string map_filepath, string layouts_filepath) { FATAL_ERROR("%s\n", layouts_err.c_str()); string header_text = generate_map_header_text(map_data, layouts_data); - string events_text = version == "firered" ? generate_firered_map_events_text(map_data) - : generate_map_events_text(map_data); + string events_text = generate_map_events_text(map_data); string connections_text = generate_map_connections_text(map_data); string files_dir = get_directory_name(map_filepath); @@ -432,20 +363,17 @@ string generate_groups_text(Json groups_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (auto &key : groups_data["group_order"].array_items()) { - string group = key.string_value(); + string group = json_to_string(key); text << group << "::\n"; auto maps = groups_data[group].array_items(); for (Json &map_name : maps) - text << "\t.4byte " << map_name.string_value() << "\n"; + text << "\t.4byte " << json_to_string(map_name) << "\n"; text << "\n"; } - if (version != "firered") - text << "\t.align 2\n"; - - text << "gMapGroups::\n"; + text << "\t.align 2\n" << "gMapGroups::\n"; for (auto &group : groups_data["group_order"].array_items()) - text << "\t.4byte " << group.string_value() << "\n"; + text << "\t.4byte " << json_to_string(group) << "\n"; text << "\n"; return text.str(); @@ -455,7 +383,7 @@ string generate_connections_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) + for (auto map_name : groups_data[json_to_string(group)].array_items()) map_names.push_back(map_name); vector connections_include_order = groups_data["connections_include_order"].array_items(); @@ -476,7 +404,7 @@ string generate_connections_text(Json groups_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (Json map_name : map_names) - text << "\t.include \"data/maps/" << map_name.string_value() << "/connections.inc\"\n"; + text << "\t.include \"data/maps/" << json_to_string(map_name) << "/connections.inc\"\n"; return text.str(); } @@ -485,8 +413,8 @@ string generate_headers_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) - map_names.push_back(map_name.string_value()); + for (auto map_name : groups_data[json_to_string(group)].array_items()) + map_names.push_back(json_to_string(map_name)); ostringstream text; @@ -502,8 +430,8 @@ string generate_events_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) - map_names.push_back(map_name.string_value()); + for (auto map_name : groups_data[json_to_string(group)].array_items()) + map_names.push_back(json_to_string(map_name)); ostringstream text; @@ -529,22 +457,25 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) { int group_num = 0; for (auto &group : groups_data["group_order"].array_items()) { - text << "// " << group.string_value() << "\n"; + string groupName = json_to_string(group); + text << "// " << groupName << "\n"; vector map_ids; size_t max_length = 0; - for (auto &map_name : groups_data[group.string_value()].array_items()) { - string header_filepath = file_dir + map_name.string_value() + dir_separator + "map.json"; + for (auto &map_name : groups_data[groupName].array_items()) { + string header_filepath = file_dir + json_to_string(map_name) + dir_separator + "map.json"; string err_str; Json map_data = Json::parse(read_text_file(header_filepath), err_str); map_ids.push_back(map_data["id"]); - if (map_data["id"].string_value().length() > max_length) - max_length = map_data["id"].string_value().length(); + string id = json_to_string(map_data, "id"); + if (id.length() > max_length) + max_length = id.length(); } int map_id_num = 0; for (Json map_id : map_ids) { - text << "#define " << map_id.string_value() << string((max_length - map_id.string_value().length() + 1), ' ') + string id = json_to_string(map_id); + text << "#define " << id << string((max_length - id.length() + 1), ' ') << "(" << map_id_num++ << " | (" << group_num << " << 8))\n"; } text << "\n"; @@ -588,27 +519,26 @@ string generate_layout_headers_text(Json layouts_data) { for (auto &layout : layouts_data["layouts"].array_items()) { if (layout == Json::object()) continue; - string border_label = layout["name"].string_value() + "_Border"; - string blockdata_label = layout["name"].string_value() + "_Blockdata"; + string layoutName = json_to_string(layout, "name"); + string border_label = layoutName + "_Border"; + string blockdata_label = layoutName + "_Blockdata"; text << border_label << "::\n" - << "\t.incbin \"" << layout["border_filepath"].string_value() << "\"\n\n" + << "\t.incbin \"" << json_to_string(layout, "border_filepath") << "\"\n\n" << blockdata_label << "::\n" - << "\t.incbin \"" << layout["blockdata_filepath"].string_value() << "\"\n\n" + << "\t.incbin \"" << json_to_string(layout, "blockdata_filepath") << "\"\n\n" << "\t.align 2\n" - << layout["name"].string_value() << "::\n" - << "\t.4byte " << layout["width"].int_value() << "\n" - << "\t.4byte " << layout["height"].int_value() << "\n" + << layoutName << "::\n" + << "\t.4byte " << json_to_string(layout, "width") << "\n" + << "\t.4byte " << json_to_string(layout, "height") << "\n" << "\t.4byte " << border_label << "\n" << "\t.4byte " << blockdata_label << "\n" - << "\t.4byte " << layout["primary_tileset"].string_value() << "\n" - << "\t.4byte " << layout["secondary_tileset"].string_value() << "\n"; - + << "\t.4byte " << json_to_string(layout, "primary_tileset") << "\n" + << "\t.4byte " << json_to_string(layout, "secondary_tileset") << "\n"; if (version == "firered") { - text << "\t.byte " << layout["border_width"].int_value() << "\n" - << "\t.byte " << layout["border_height"].int_value() << "\n" + text << "\t.byte " << json_to_string(layout, "border_width") << "\n" + << "\t.byte " << json_to_string(layout, "border_height") << "\n" << "\t.2byte 0\n"; } - text << "\n"; } @@ -621,10 +551,10 @@ string generate_layouts_table_text(Json layouts_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; text << "\t.align 2\n" - << layouts_data["layouts_table_label"].string_value() << "::\n"; + << json_to_string(layouts_data, "layouts_table_label") << "::\n"; for (auto &layout : layouts_data["layouts"].array_items()) { - string layout_name = layout["name"].string_value(); + string layout_name = json_to_string(layout, "name", true); if (layout_name.empty()) layout_name = "NULL"; text << "\t.4byte " << layout_name << "\n"; } @@ -643,7 +573,7 @@ string generate_layouts_constants_text(Json layouts_data) { int i = 1; for (auto &layout : layouts_data["layouts"].array_items()) { if (layout != Json::object()) - text << "#define " << layout["id"].string_value() << " " << i << "\n"; + text << "#define " << json_to_string(layout, "id") << " " << i << "\n"; i++; } @@ -675,7 +605,8 @@ int main(int argc, char *argv[]) { if (argc < 3) FATAL_ERROR("USAGE: mapjson [options]\n"); - version = argv[2]; + char *version_arg = argv[2]; + version = string(version_arg); if (version != "emerald" && version != "ruby" && version != "firered") FATAL_ERROR("ERROR: must be 'emerald', 'firered', or 'ruby'.\n"); diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 7756cadc5..2fc573c81 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -40,6 +40,8 @@ AsmFile::AsmFile(std::string filename) : m_filename(filename) if (m_size < 0) FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str()); + else if (m_size == 0) + return; // Empty file m_buffer = new char[m_size + 1]; @@ -72,7 +74,7 @@ AsmFile::AsmFile(AsmFile&& other) : m_filename(std::move(other.m_filename)) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } // Removes comments to simplify further processing. diff --git a/tools/scaninc/asm_file.cpp b/tools/scaninc/asm_file.cpp index 109e604a2..d2cc624ee 100644 --- a/tools/scaninc/asm_file.cpp +++ b/tools/scaninc/asm_file.cpp @@ -36,6 +36,11 @@ AsmFile::AsmFile(std::string path) m_size = std::ftell(fp); + if (m_size < 0) + FATAL_ERROR("File size of \"%s\" is less than zero.\n", path.c_str()); + else if (m_size == 0) + return; // Empty file + m_buffer = new char[m_size]; std::rewind(fp); @@ -51,7 +56,7 @@ AsmFile::AsmFile(std::string path) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } IncDirectiveType AsmFile::ReadUntilIncDirective(std::string &path)