diff options
Diffstat (limited to 'src')
82 files changed, 46594 insertions, 2594 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index c57825b4f..e66fdb2af 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1,6 +1,6 @@ #include "global.h" #include "battle.h" -#include "battle_main.h" +#include "battle_anim.h" #include "util.h" #include "item.h" #include "random.h" diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index e871937e7..c19af4cb7 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -28,7 +28,7 @@ static u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3); static void sub_8075658(struct Sprite *sprite); static void sub_80757E8(struct Sprite *sprite); static bool8 sub_80758DC(void); -static void sub_8075EF0(struct Sprite *sprite); +static void AnimThrowProjectile_Step(struct Sprite *sprite); static void sub_80760D0(u8 taskId); static void AnimTask_BlendMonInAndOutSetup(struct Task *task); static void AnimTask_BlendMonInAndOutStep(u8 taskId); @@ -1336,7 +1336,7 @@ static u8 GetBattlerAtPosition_(u8 position) return GetBattlerAtPosition(position); } -void sub_8075D9C(struct Sprite *sprite) +void AnimSpriteOnMonPos(struct Sprite *sprite) { bool8 var; @@ -1390,7 +1390,7 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_8075E80(struct Sprite *sprite) +void AnimThrowProjectile(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); if (GetBattlerSide(gBattleAnimAttacker)) @@ -1400,10 +1400,10 @@ void sub_8075E80(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[5]; InitAnimArcTranslation(sprite); - sprite->callback = sub_8075EF0; + sprite->callback = AnimThrowProjectile_Step; } -static void sub_8075EF0(struct Sprite *sprite) +static void AnimThrowProjectile_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); diff --git a/src/battle_controller_oak_old_man.c b/src/battle_controller_oak_old_man.c new file mode 100644 index 000000000..99391ab3e --- /dev/null +++ b/src/battle_controller_oak_old_man.c @@ -0,0 +1,2295 @@ +#include "global.h" +#include "task.h" +#include "pokemon.h" +#include "pokeball.h" +#include "party_menu.h" +#include "bg.h" +#include "data.h" +#include "palette.h" +#include "util.h" +#include "m4a.h" +#include "link.h" +#include "sound.h" +#include "item.h" +#include "item_menu.h" +#include "text.h" +#include "strings.h" +#include "string_util.h" +#include "window.h" +#include "battle.h" +#include "battle_anim.h" +#include "battle_controllers.h" +#include "battle_interface.h" +#include "battle_message.h" +#include "reshow_battle_screen.h" +#include "constants/songs.h" +#include "constants/items.h" + +static void OakOldManHandleGetMonData(void); +static void OakOldManHandleGetRawMonData(void); +static void OakOldManHandleSetMonData(void); +static void OakOldManHandleSetRawMonData(void); +static void OakOldManHandleLoadMonSprite(void); +static void OakOldManHandleSwitchInAnim(void); +static void OakOldManHandleReturnMonToBall(void); +static void OakOldManHandleDrawTrainerPic(void); +static void OakOldManHandleTrainerSlide(void); +static void OakOldManHandleTrainerSlideBack(void); +static void OakOldManHandleFaintAnimation(void); +static void OakOldManHandlePaletteFade(void); +static void OakOldManHandleSuccessBallThrowAnim(void); +static void OakOldManHandleBallThrowAnim(void); +static void OakOldManHandlePause(void); +static void OakOldManHandleMoveAnimation(void); +static void OakOldManHandlePrintString(void); +static void OakOldManHandlePrintSelectionString(void); +static void OakOldManHandleChooseAction(void); +static void OakOldManHandleUnknownYesNoBox(void); +static void OakOldManHandleChooseMove(void); +static void OakOldManHandleChooseItem(void); +static void OakOldManHandleChoosePokemon(void); +static void OakOldManHandleCmd23(void); +static void OakOldManHandleHealthBarUpdate(void); +static void OakOldManHandleExpUpdate(void); +static void OakOldManHandleStatusIconUpdate(void); +static void OakOldManHandleStatusAnimation(void); +static void OakOldManHandleStatusXor(void); +static void OakOldManHandleDataTransfer(void); +static void OakOldManHandleDMA3Transfer(void); +static void OakOldManHandlePlayBGM(void); +static void OakOldManHandleCmd32(void); +static void OakOldManHandleTwoReturnValues(void); +static void OakOldManHandleChosenMonReturnValue(void); +static void OakOldManHandleOneReturnValue(void); +static void OakOldManHandleOneReturnValue_Duplicate(void); +static void OakOldManHandleCmd37(void); +static void OakOldManHandleCmd38(void); +static void OakOldManHandleCmd39(void); +static void OakOldManHandleCmd40(void); +static void OakOldManHandleHitAnimation(void); +static void OakOldManHandleCmd42(void); +static void OakOldManHandlePlaySE(void); +static void OakOldManHandlePlayFanfare(void); +static void OakOldManHandleFaintingCry(void); +static void OakOldManHandleIntroSlide(void); +static void OakOldManHandleIntroTrainerBallThrow(void); +static void OakOldManHandleDrawPartyStatusSummary(void); +static void OakOldManHandleHidePartyStatusSummary(void); +static void OakOldManHandleEndBounceEffect(void); +static void OakOldManHandleSpriteInvisibility(void); +static void OakOldManHandleBattleAnimation(void); +static void OakOldManHandleLinkStandbyMsg(void); +static void OakOldManHandleResetActionMoveSelection(void); +static void OakOldManHandleCmd55(void); +static void OakOldManCmdEnd(void); + +static void OakOldManBufferRunCommand(void); +static void OakOldManBufferExecCompleted(void); +static void WaitForMonSelection(void); +static void CompleteWhenChoseItem(void); +static void sub_80E8704(void); +static void sub_80E7CD8(void); +static void sub_80E835C(void); +static void Task_LaunchLvlUpAnim(u8 taskId); +static void DestroyExpTaskAndCompleteOnInactiveTextPrinter(u8 taskId); +static void CompleteOnInactiveTextPrinter2(void); +static void Task_PrepareToGiveExpWithExpBar(u8 taskId); +static void sub_80E804C(u8 taskId); +static void Task_UpdateLvlInHealthbox(u8 taskId); +static void sub_80E85D4(const u8 *text, u8 a1); +static u32 CopyOakOldManMonData(u8 monId, u8 *dst); +static void SetOakOldManMonData(u8 monId); +static void OakOldManDoMoveAnimation(void); +static void HandleInputChooseAction(void); +static void sub_80EB0A8(u8 taskId); + +static void (*const sOakOldManBufferCommands[CONTROLLER_CMDS_COUNT])(void) = +{ + OakOldManHandleGetMonData, + OakOldManHandleGetRawMonData, + OakOldManHandleSetMonData, + OakOldManHandleSetRawMonData, + OakOldManHandleLoadMonSprite, + OakOldManHandleSwitchInAnim, + OakOldManHandleReturnMonToBall, + OakOldManHandleDrawTrainerPic, + OakOldManHandleTrainerSlide, + OakOldManHandleTrainerSlideBack, + OakOldManHandleFaintAnimation, + OakOldManHandlePaletteFade, + OakOldManHandleSuccessBallThrowAnim, + OakOldManHandleBallThrowAnim, + OakOldManHandlePause, + OakOldManHandleMoveAnimation, + OakOldManHandlePrintString, + OakOldManHandlePrintSelectionString, + OakOldManHandleChooseAction, + OakOldManHandleUnknownYesNoBox, + OakOldManHandleChooseMove, + OakOldManHandleChooseItem, + OakOldManHandleChoosePokemon, + OakOldManHandleCmd23, + OakOldManHandleHealthBarUpdate, + OakOldManHandleExpUpdate, + OakOldManHandleStatusIconUpdate, + OakOldManHandleStatusAnimation, + OakOldManHandleStatusXor, + OakOldManHandleDataTransfer, + OakOldManHandleDMA3Transfer, + OakOldManHandlePlayBGM, + OakOldManHandleCmd32, + OakOldManHandleTwoReturnValues, + OakOldManHandleChosenMonReturnValue, + OakOldManHandleOneReturnValue, + OakOldManHandleOneReturnValue_Duplicate, + OakOldManHandleCmd37, + OakOldManHandleCmd38, + OakOldManHandleCmd39, + OakOldManHandleCmd40, + OakOldManHandleHitAnimation, + OakOldManHandleCmd42, + OakOldManHandlePlaySE, + OakOldManHandlePlayFanfare, + OakOldManHandleFaintingCry, + OakOldManHandleIntroSlide, + OakOldManHandleIntroTrainerBallThrow, + OakOldManHandleDrawPartyStatusSummary, + OakOldManHandleHidePartyStatusSummary, + OakOldManHandleEndBounceEffect, + OakOldManHandleSpriteInvisibility, + OakOldManHandleBattleAnimation, + OakOldManHandleLinkStandbyMsg, + OakOldManHandleResetActionMoveSelection, + OakOldManHandleCmd55, + OakOldManCmdEnd, +}; + +static void nullsub_81(void) +{ +} + +void SetControllerToOakOrOldMan(void) +{ + gBattlerControllerFuncs[gActiveBattler] = OakOldManBufferRunCommand; + gBattleStruct->field_94 = 0; + gBattleStruct->field_95 = 0; + gBattleStruct->field_96 = 0; + gBattleStruct->field_97 = 0; +} + +static void OakOldManBufferRunCommand(void) +{ + if (gBattleControllerExecFlags & gBitTable[gActiveBattler]) + { + if (gBattleBufferA[gActiveBattler][0] < ARRAY_COUNT(sOakOldManBufferCommands)) + sOakOldManBufferCommands[gBattleBufferA[gActiveBattler][0]](); + else + OakOldManBufferExecCompleted(); + } +} + +static void HandleInputChooseAction(void) +{ + u16 itemId = gBattleBufferA[gActiveBattler][2] | (gBattleBufferA[gActiveBattler][3] << 8); + + DoBounceEffect(gActiveBattler, BOUNCE_HEALTHBOX, 7, 1); + DoBounceEffect(gActiveBattler, BOUNCE_MON, 7, 1); + if (JOY_NEW(A_BUTTON)) + { + PlaySE(SE_SELECT); + + switch (gActionSelectionCursor[gActiveBattler]) + { + case 0: + BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0); + break; + case 1: + BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); + break; + case 2: + BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + break; + case 3: + BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0); + break; + } + OakOldManBufferExecCompleted(); + } + else if (JOY_NEW(DPAD_LEFT)) + { + if (gActionSelectionCursor[gActiveBattler] & 1) // if is B_ACTION_USE_ITEM or B_ACTION_RUN + { + PlaySE(SE_SELECT); + ActionSelectionDestroyCursorAt(gActionSelectionCursor[gActiveBattler]); + gActionSelectionCursor[gActiveBattler] ^= 1; + ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); + } + } + else if (JOY_NEW(DPAD_RIGHT)) + { + if (!(gActionSelectionCursor[gActiveBattler] & 1)) // if is B_ACTION_USE_MOVE or B_ACTION_SWITCH + { + PlaySE(SE_SELECT); + ActionSelectionDestroyCursorAt(gActionSelectionCursor[gActiveBattler]); + gActionSelectionCursor[gActiveBattler] ^= 1; + ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); + } + } + else if (JOY_NEW(DPAD_UP)) + { + if (gActionSelectionCursor[gActiveBattler] & 2) // if is B_ACTION_SWITCH or B_ACTION_RUN + { + PlaySE(SE_SELECT); + ActionSelectionDestroyCursorAt(gActionSelectionCursor[gActiveBattler]); + gActionSelectionCursor[gActiveBattler] ^= 2; + ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); + } + } + else if (JOY_NEW(DPAD_DOWN)) + { + if (!(gActionSelectionCursor[gActiveBattler] & 2)) // if is B_ACTION_USE_MOVE or B_ACTION_USE_ITEM + { + PlaySE(SE_SELECT); + ActionSelectionDestroyCursorAt(gActionSelectionCursor[gActiveBattler]); + gActionSelectionCursor[gActiveBattler] ^= 2; + ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); + } + } + else if (JOY_NEW(B_BUTTON)) + { + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + && GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT + && !(gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]) + && !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + { + if (gBattleBufferA[gActiveBattler][1] == B_ACTION_USE_ITEM) + { + // Add item to bag if it is a ball + if (itemId <= ITEM_PREMIER_BALL) + AddBagItem(itemId, 1); + else + return; + } + PlaySE(SE_SELECT); + BtlController_EmitTwoReturnValues(1, B_ACTION_CANCEL_PARTNER, 0); + OakOldManBufferExecCompleted(); + } + } + else if (JOY_NEW(START_BUTTON)) + { + SwapHpBarsWithHpText(); + } +} + +static void sub_80E7844(void) +{ + switch (gBattleStruct->field_94) + { + case 0: + gBattleStruct->field_96 = 64; + ++gBattleStruct->field_94; + // fall through + case 1: + if (--gBattleStruct->field_96 == 0) + { + PlaySE(SE_SELECT); + ActionSelectionDestroyCursorAt(0); + ActionSelectionCreateCursorAt(1, 0); + gBattleStruct->field_96 = 64; + ++gBattleStruct->field_94; + } + break; + case 2: + if (--gBattleStruct->field_96 == 0) + { + PlaySE(SE_SELECT); + BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); + OakOldManBufferExecCompleted(); + } + break; + } +} + +static void CompleteOnBattlerSpriteCallbackDummy(void) +{ + if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) + OakOldManBufferExecCompleted(); +} + +static void CompleteOnInactiveTextPrinter(void) +{ + if (!IsTextPrinterActive(0)) + OakOldManBufferExecCompleted(); +} + +static void sub_80E7930(void) +{ + if (!gPaletteFade.active) + { + gMain.inBattle = FALSE; + gMain.callback1 = gPreBattleCallback1; + SetMainCallback2(gMain.savedCallback); + } +} + +static void CompleteOnSpecialAnimDone(void) +{ + if (!gDoingBattleAnim) + OakOldManBufferExecCompleted(); +} + +void sub_80E7988(void) +{ + HandleInputChooseMove(); + if (!(gBattleControllerExecFlags & gBitTable[gActiveBattler])) + OakOldManBufferExecCompleted(); +} + +static void OpenPartyMenuToChooseMon(void) +{ + if (!gPaletteFade.active) + { + u8 caseId; + + gBattlerControllerFuncs[gActiveBattler] = WaitForMonSelection; + caseId = gTasks[gUnknown_3004FFC[gActiveBattler]].data[0]; + DestroyTask(gUnknown_3004FFC[gActiveBattler]); + FreeAllWindowBuffers(); + OpenPartyMenuInBattle(caseId); + } +} + +static void WaitForMonSelection(void) +{ + if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) + { + if (gUnknown_203B0C0 == 1) + BtlController_EmitChosenMonReturnValue(1, gUnknown_203B0C1, gUnknown_203B0DC); + else + BtlController_EmitChosenMonReturnValue(1, 6, NULL); + OakOldManBufferExecCompleted(); + } +} + +static void OpenBagAndChooseItem(void) +{ + if (!gPaletteFade.active) + { + gBattlerControllerFuncs[gActiveBattler] = CompleteWhenChoseItem; + nullsub_44(); + FreeAllWindowBuffers(); + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + sub_8107ECC(); + else + sub_810AF74(); + } +} + +static void CompleteWhenChoseItem(void) +{ + if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) + { + if (!sub_80EB2E0(4) + && gSpecialVar_ItemId == ITEM_POTION + && gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + sub_80EB2F4(4); + gBattlerControllerFuncs[gActiveBattler] = sub_80E8704; + } + else + { + BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId); + OakOldManBufferExecCompleted(); + } + } +} + +static void sub_80E7B4C(void) +{ + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x80 + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) + sub_80F1720(gActiveBattler, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]); + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].flag_x80 + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) + sub_80F1720(gActiveBattler ^ BIT_FLANK, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) + { + if (IsDoubleBattle() && !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + { + DestroySprite(&gSprites[gUnknown_3004FFC[gActiveBattler ^ BIT_FLANK]]); + UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler ^ BIT_FLANK], + &gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]], + HEALTHBOX_ALL); + sub_804BD94(gActiveBattler ^ BIT_FLANK); + SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler ^ BIT_FLANK]); + } + DestroySprite(&gSprites[gUnknown_3004FFC[gActiveBattler]]); + UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], + &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], + HEALTHBOX_ALL); + sub_804BD94(gActiveBattler); + SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); + gBattleSpritesDataPtr->animationData->field_9_x1 = 0; + gBattlerControllerFuncs[gActiveBattler] = sub_80E7CD8; + } +} + +static void sub_80E7CD8(void) +{ + bool32 r4 = FALSE; + + if (gSprites[gHealthboxSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) + r4 = TRUE; + if (r4 + && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1 + && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].field_1_x1) + { + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x80 = 0; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1 = 0; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].flag_x80 = 0; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].field_1_x1 = 0; + FreeSpriteTilesByTag(0x27F9); + FreeSpritePaletteByTag(0x27F9); + CreateTask(c3_0802FDF4, 10); + HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); + gBattlerControllerFuncs[gActiveBattler] = sub_80E835C; + } +} + +#define tExpTask_monId data[0] +#define tExpTask_gainedExp data[1] +#define tExpTask_battler data[2] +#define tExpTask_frames data[10] + +static void Task_GiveExpToMon(u8 taskId) +{ + u32 monId = (u8)(gTasks[taskId].tExpTask_monId); + u8 battlerId = gTasks[taskId].tExpTask_battler; + s16 gainedExp = gTasks[taskId].tExpTask_gainedExp; + + if (IsDoubleBattle() == TRUE || monId != gBattlerPartyIndexes[battlerId]) // Give exp without moving the expbar. + { + struct Pokemon *mon = &gPlayerParty[monId]; + 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]; + + if (currExp + gainedExp >= nextLvlExp) + { + u8 savedActiveBattler; + + SetMonData(mon, MON_DATA_EXP, &nextLvlExp); + CalculateMonStats(mon); + gainedExp -= nextLvlExp - currExp; + savedActiveBattler = gActiveBattler; + gActiveBattler = battlerId; + BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + gActiveBattler = savedActiveBattler; + if (IsDoubleBattle() == TRUE + && ((u16)(monId) == gBattlerPartyIndexes[battlerId] || (u16)(monId) == gBattlerPartyIndexes[battlerId ^ BIT_FLANK])) + gTasks[taskId].func = Task_LaunchLvlUpAnim; + else + gTasks[taskId].func = DestroyExpTaskAndCompleteOnInactiveTextPrinter; + } + else + { + currExp += gainedExp; + SetMonData(mon, MON_DATA_EXP, &currExp); + gBattlerControllerFuncs[battlerId] = CompleteOnInactiveTextPrinter2; + DestroyTask(taskId); + } + } + else + { + gTasks[taskId].func = Task_PrepareToGiveExpWithExpBar; + } +} + +static void Task_PrepareToGiveExpWithExpBar(u8 taskId) +{ + u8 monIndex = gTasks[taskId].tExpTask_monId; + s32 gainedExp = gTasks[taskId].tExpTask_gainedExp; + u8 battlerId = gTasks[taskId].tExpTask_battler; + struct Pokemon *mon = &gPlayerParty[monIndex]; + 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 expToNextLvl; + + exp -= currLvlExp; + expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); + PlaySE(SE_EXP); + gTasks[taskId].func = sub_80E804C; +} + +static void sub_80E804C(u8 taskId) +{ + if (gTasks[taskId].tExpTask_frames < 13) + { + ++gTasks[taskId].tExpTask_frames; + } + else + { + u8 monId = gTasks[taskId].tExpTask_monId; + s16 gainedExp = gTasks[taskId].tExpTask_gainedExp; + u8 battlerId = gTasks[taskId].tExpTask_battler; + s16 newExpPoints; + + newExpPoints = MoveBattleBar(battlerId, gHealthboxSpriteIds[battlerId], EXP_BAR, 0); + SetHealthboxSpriteVisible(gHealthboxSpriteIds[battlerId]); + if (newExpPoints == -1) // The bar has been filled with given exp points. + { + u8 level; + s32 currExp; + u16 species; + s32 expOnNextLvl; + + m4aSongNumStop(SE_EXP); + 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]; + if (currExp + gainedExp >= expOnNextLvl) + { + u8 savedActiveBattler; + + SetMonData(&gPlayerParty[monId], MON_DATA_EXP, &expOnNextLvl); + CalculateMonStats(&gPlayerParty[monId]); + gainedExp -= expOnNextLvl - currExp; + savedActiveBattler = gActiveBattler; + gActiveBattler = battlerId; + BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + gActiveBattler = savedActiveBattler; + gTasks[taskId].func = Task_LaunchLvlUpAnim; + } + else + { + currExp += gainedExp; + SetMonData(&gPlayerParty[monId], MON_DATA_EXP, &currExp); + gBattlerControllerFuncs[battlerId] = CompleteOnInactiveTextPrinter2; + DestroyTask(taskId); + } + } + } +} + +static void Task_LaunchLvlUpAnim(u8 taskId) +{ + u8 battlerId = gTasks[taskId].tExpTask_battler; + u8 monIndex = gTasks[taskId].tExpTask_monId; + + if (IsDoubleBattle() == TRUE && monIndex == gBattlerPartyIndexes[battlerId ^ BIT_FLANK]) + battlerId ^= BIT_FLANK; + InitAndLaunchSpecialAnimation(battlerId, battlerId, battlerId, B_ANIM_LVL_UP); + gTasks[taskId].func = Task_UpdateLvlInHealthbox; +} + +static void Task_UpdateLvlInHealthbox(u8 taskId) +{ + u8 battlerId = gTasks[taskId].tExpTask_battler; + + if (!gBattleSpritesDataPtr->healthBoxesData[battlerId].specialAnimActive) + { + u8 monIndex = gTasks[taskId].tExpTask_monId; + + GetMonData(&gPlayerParty[monIndex], MON_DATA_LEVEL); // Unused return value. + if (IsDoubleBattle() == TRUE && monIndex == gBattlerPartyIndexes[battlerId ^ BIT_FLANK]) + UpdateHealthboxAttribute(gHealthboxSpriteIds[battlerId ^ BIT_FLANK], &gPlayerParty[monIndex], HEALTHBOX_ALL); + else + UpdateHealthboxAttribute(gHealthboxSpriteIds[battlerId], &gPlayerParty[monIndex], HEALTHBOX_ALL); + gTasks[taskId].func = DestroyExpTaskAndCompleteOnInactiveTextPrinter; + } +} + +static void DestroyExpTaskAndCompleteOnInactiveTextPrinter(u8 taskId) +{ + u8 monIndex = gTasks[taskId].tExpTask_monId; + u8 battlerId; + + GetMonData(&gPlayerParty[monIndex], MON_DATA_LEVEL); // Unused return value + battlerId = gTasks[taskId].tExpTask_battler; + gBattlerControllerFuncs[battlerId] = CompleteOnInactiveTextPrinter2; + DestroyTask(taskId); +} + +static void sub_80E82F4(void) +{ + if (gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y + gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.y > DISPLAY_HEIGHT) + { + FreeOamMatrix(gSprites[gBattlerSpriteIds[gActiveBattler]].oam.matrixNum); + DestroySprite(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + SetHealthboxSpriteInvisible(gHealthboxSpriteIds[gActiveBattler]); + OakOldManBufferExecCompleted(); + } +} + +static void sub_80E835C(void) +{ + u32 mask; + + switch (gBattleStruct->field_94) + { + case 0: + if (!gPaletteFade.active) + { + sub_80EEFC8(&gBattleStruct->field_95, &gBattleStruct->field_97, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)); + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 0, + 8, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 1: + if (!gPaletteFade.active) + { + sub_80EB30C(); + ++gBattleStruct->field_94; + } + break; + case 2: + BattleStringExpandPlaceholdersToDisplayedString(gUnknown_83FDAE2); + BattlePutTextOnWindow(gDisplayedStringBattle, 24); + ++gBattleStruct->field_94; + break; + case 3: + if (!IsTextPrinterActive(24)) + { + mask = (gBitTable[gBattleStruct->field_95] | gBitTable[gBattleStruct->field_97]) << 16; + BeginNormalPaletteFade(mask, + 4, + 8, + 0, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 4: + if (!gPaletteFade.active) + { + BattleStringExpandPlaceholdersToDisplayedString(gUnknown_83FDB92); + BattlePutTextOnWindow(gDisplayedStringBattle, 24); + ++gBattleStruct->field_94; + } + break; + case 5: + if (!IsTextPrinterActive(24)) + { + mask = (gBitTable[gBattleStruct->field_95] | gBitTable[gBattleStruct->field_97]) << 16; + BeginNormalPaletteFade(mask, + 4, + 0, + 8, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 6: + if (!gPaletteFade.active) + { + BattleStringExpandPlaceholdersToDisplayedString(gUnknown_83FDBEF); + BattlePutTextOnWindow(gDisplayedStringBattle, 24); + ++gBattleStruct->field_94; + } + break; + case 7: + if (!IsTextPrinterActive(24)) + { + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 8, + 0, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 8: + if (!gPaletteFade.active) + { + sub_80EF0E0(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)); + sub_80EB524(); + gBattleStruct->field_94 = 0; + OakOldManBufferExecCompleted(); + } + break; + } +} + +void sub_80E8570(void) +{ + sub_80E85D4(gUnknown_83FDC58, 1); +} + +static void sub_80E8584(void) +{ + sub_80E85D4(gUnknown_83FDC95, 64); +} + +void sub_80E8598(void) +{ + sub_80E85D4(gUnknown_83FDD23, 1); +} + +static void sub_80E85AC(void) +{ + sub_80E85D4(gUnknown_83FDD64, 64); +} + +void sub_80E85C0(void) +{ + sub_80E85D4(gUnknown_83FDDEB, 64); +} + +static void sub_80E85D4(const u8 *text, u8 a2) +{ + switch (gBattleStruct->field_94) + { + case 0: + if (!IsTextPrinterActive(0)) + { + gBattleStruct->field_97 = a2; + ++gBattleStruct->field_94; + } + break; + case 1: + if (--gBattleStruct->field_97 == 0) + { + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 0, + 8, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 2: + if (!gPaletteFade.active) + { + sub_80EB30C(); + ++gBattleStruct->field_94; + } + break; + case 3: + BattleStringExpandPlaceholdersToDisplayedString(text); + BattlePutTextOnWindow(gDisplayedStringBattle, 24); + ++gBattleStruct->field_94; + break; + case 4: + if (!IsTextPrinterActive(24)) + { + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 8, + 0, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 5: + if (!gPaletteFade.active) + { + sub_80EB524(); + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + OakOldManBufferExecCompleted(); + else + OpponentBufferExecCompleted(); + gBattleCommunication[MSG_DISPLAY] = 0; + gBattleStruct->field_94 = 0; + } + break; + } +} + +static void sub_80E8704(void) +{ + u32 mask; + + switch (gBattleStruct->field_94) + { + case 0: + if (!gPaletteFade.active) + { + sub_80EEFC8(&gBattleStruct->field_95, &gBattleStruct->field_97, gActiveBattler); + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 0, + 8, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 1: + if (!gPaletteFade.active) + { + mask = (gBitTable[gBattleStruct->field_95] | gBitTable[gBattleStruct->field_97]) << 16; + BeginNormalPaletteFade(mask, + 4, + 8, + 0, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 2: + if (!gPaletteFade.active) + { + sub_80EB30C(); + ++gBattleStruct->field_94; + } + break; + case 3: + BattleStringExpandPlaceholdersToDisplayedString(gUnknown_83FDCD2); + BattlePutTextOnWindow(gDisplayedStringBattle, 24); + ++gBattleStruct->field_94; + break; + case 4: + if (!IsTextPrinterActive(24)) + { + mask = (gBitTable[gBattleStruct->field_95] | gBitTable[gBattleStruct->field_97]) << 16; + BeginNormalPaletteFade(mask, + 4, + 0, + 8, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 5: + if (!gPaletteFade.active) + { + BeginNormalPaletteFade(0xFFFFFF7E, + 4, + 8, + 0, + RGB_BLACK); + ++gBattleStruct->field_94; + } + break; + case 6: + if (!gPaletteFade.active) + { + sub_80EB524(); + BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId); + OakOldManBufferExecCompleted(); + gBattleStruct->field_94 = 0; + } + break; + } +} + +static void CompleteOnHealthbarDone(void) +{ + s16 hpValue = MoveBattleBar(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], HEALTH_BAR, 0); + + SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); + if (hpValue != -1) + { + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + } + else + { + HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); + OakOldManBufferExecCompleted(); + } +} + +static void CompleteOnInactiveTextPrinter2(void) +{ + if (!IsTextPrinterActive(0)) + OakOldManBufferExecCompleted(); +} + +static void DoHitAnimBlinkSpriteEffect(void) +{ + u8 spriteId = gBattlerSpriteIds[gActiveBattler]; + + if (gSprites[spriteId].data[1] == 32) + { + gSprites[spriteId].data[1] = 0; + gSprites[spriteId].invisible = FALSE; + gDoingBattleAnim = FALSE; + OakOldManBufferExecCompleted(); + } + else + { + if ((gSprites[spriteId].data[1] % 4) == 0) + gSprites[spriteId].invisible ^= 1; + ++gSprites[spriteId].data[1]; + } +} + +static void sub_80E89C4(void) +{ + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive) + { + FreeSpriteOamMatrix(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + DestroySprite(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + SetHealthboxSpriteInvisible(gHealthboxSpriteIds[gActiveBattler]); + OakOldManBufferExecCompleted(); + } +} + +static void CompleteOnBattlerSpriteCallbackDummy2(void) +{ + if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) + OakOldManBufferExecCompleted(); +} + +static void CompleteOnFinishedBattleAnimation(void) +{ + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animFromTableActive) + OakOldManBufferExecCompleted(); +} + +static void OakOldManBufferExecCompleted(void) +{ + gBattlerControllerFuncs[gActiveBattler] = OakOldManBufferRunCommand; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + u8 playerId = GetMultiplayerId(); + + PrepareBufferDataTransferLink(2, 4, &playerId); + gBattleBufferA[gActiveBattler][0] = CONTROLLER_TERMINATOR_NOP; + } + else + { + gBattleControllerExecFlags &= ~gBitTable[gActiveBattler]; + } +} + +static void CompleteOnFinishedStatusAnimation(void) +{ + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].statusAnimActive) + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleGetMonData(void) +{ + u8 monData[sizeof(struct Pokemon) * 2 + 56]; // this allows to get full data of two pokemon, trying to get more will result in overwriting data + u32 size = 0; + u8 monToCheck; + s32 i; + + if (gBattleBufferA[gActiveBattler][2] == 0) + { + size += CopyOakOldManMonData(gBattlerPartyIndexes[gActiveBattler], monData); + } + else + { + monToCheck = gBattleBufferA[gActiveBattler][2]; + for (i = 0; i < PARTY_SIZE; ++i) + { + if (monToCheck & 1) + size += CopyOakOldManMonData(i, monData + size); + monToCheck >>= 1; + } + } + BtlController_EmitDataTransfer(1, size, monData); + OakOldManBufferExecCompleted(); +} + +static u32 CopyOakOldManMonData(u8 monId, u8 *dst) +{ + struct BattlePokemon battleMon; + struct MovePpInfo moveData; + u8 nickname[20]; + u8 *src; + s16 data16; + u32 data32; + s32 size = 0; + + switch (gBattleBufferA[gActiveBattler][1]) + { + case REQUEST_ALL_BATTLE: + battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); + battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); + for (size = 0; size < MAX_MON_MOVES; ++size) + { + battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); + battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); + } + battleMon.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); + battleMon.friendship = GetMonData(&gPlayerParty[monId], MON_DATA_FRIENDSHIP); + battleMon.experience = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); + battleMon.hpIV = GetMonData(&gPlayerParty[monId], MON_DATA_HP_IV); + battleMon.attackIV = GetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV); + battleMon.defenseIV = GetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV); + battleMon.speedIV = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV); + battleMon.spAttackIV = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV); + battleMon.spDefenseIV = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV); + battleMon.personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); + battleMon.status1 = GetMonData(&gPlayerParty[monId], MON_DATA_STATUS); + battleMon.level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); + battleMon.hp = GetMonData(&gPlayerParty[monId], MON_DATA_HP); + battleMon.maxHP = GetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP); + battleMon.attack = GetMonData(&gPlayerParty[monId], MON_DATA_ATK); + battleMon.defense = GetMonData(&gPlayerParty[monId], MON_DATA_DEF); + battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); + battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); + battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); + battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); + battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); + GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); + StringCopy10(battleMon.nickname, nickname); + GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); + src = (u8 *)&battleMon; + for (size = 0; size < sizeof(battleMon); ++size) + dst[size] = src[size]; + break; + case REQUEST_SPECIES_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_HELDITEM_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_MOVES_PP_BATTLE: + for (size = 0; size < MAX_MON_MOVES; ++size) + { + moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); + moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); + } + moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); + src = (u8 *)(&moveData); + for (size = 0; size < sizeof(moveData); ++size) + dst[size] = src[size]; + break; + case REQUEST_MOVE1_BATTLE: + case REQUEST_MOVE2_BATTLE: + case REQUEST_MOVE3_BATTLE: + case REQUEST_MOVE4_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_PP_DATA_BATTLE: + for (size = 0; size < MAX_MON_MOVES; ++size) + dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); + dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); + ++size; + break; + case REQUEST_PPMOVE1_BATTLE: + case REQUEST_PPMOVE2_BATTLE: + case REQUEST_PPMOVE3_BATTLE: + case REQUEST_PPMOVE4_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + gBattleBufferA[gActiveBattler][1] - REQUEST_PPMOVE1_BATTLE); + size = 1; + break; + case REQUEST_OTID_BATTLE: + data32 = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); + dst[0] = (data32 & 0x000000FF); + dst[1] = (data32 & 0x0000FF00) >> 8; + dst[2] = (data32 & 0x00FF0000) >> 16; + size = 3; + break; + case REQUEST_EXP_BATTLE: + data32 = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); + dst[0] = (data32 & 0x000000FF); + dst[1] = (data32 & 0x0000FF00) >> 8; + dst[2] = (data32 & 0x00FF0000) >> 16; + size = 3; + break; + case REQUEST_HP_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_HP_EV); + size = 1; + break; + case REQUEST_ATK_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_ATK_EV); + size = 1; + break; + case REQUEST_DEF_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_DEF_EV); + size = 1; + break; + case REQUEST_SPEED_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED_EV); + size = 1; + break; + case REQUEST_SPATK_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK_EV); + size = 1; + break; + case REQUEST_SPDEF_EV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_EV); + size = 1; + break; + case REQUEST_FRIENDSHIP_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_FRIENDSHIP); + size = 1; + break; + case REQUEST_POKERUS_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_POKERUS); + size = 1; + break; + case REQUEST_MET_LOCATION_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_MET_LOCATION); + size = 1; + break; + case REQUEST_MET_LEVEL_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_MET_LEVEL); + size = 1; + break; + case REQUEST_MET_GAME_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_MET_GAME); + size = 1; + break; + case REQUEST_POKEBALL_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_POKEBALL); + size = 1; + break; + case REQUEST_ALL_IVS_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_HP_IV); + dst[1] = GetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV); + dst[2] = GetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV); + dst[3] = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV); + dst[4] = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV); + dst[5] = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV); + size = 6; + break; + case REQUEST_HP_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_HP_IV); + size = 1; + break; + case REQUEST_ATK_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV); + size = 1; + break; + case REQUEST_DEF_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV); + size = 1; + break; + case REQUEST_SPEED_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV); + size = 1; + break; + case REQUEST_SPATK_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV); + size = 1; + break; + case REQUEST_SPDEF_IV_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV); + size = 1; + break; + case REQUEST_PERSONALITY_BATTLE: + data32 = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); + dst[0] = (data32 & 0x000000FF); + dst[1] = (data32 & 0x0000FF00) >> 8; + dst[2] = (data32 & 0x00FF0000) >> 16; + dst[3] = (data32 & 0xFF000000) >> 24; + size = 4; + break; + case REQUEST_CHECKSUM_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_CHECKSUM); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_STATUS_BATTLE: + data32 = GetMonData(&gPlayerParty[monId], MON_DATA_STATUS); + dst[0] = (data32 & 0x000000FF); + dst[1] = (data32 & 0x0000FF00) >> 8; + dst[2] = (data32 & 0x00FF0000) >> 16; + dst[3] = (data32 & 0xFF000000) >> 24; + size = 4; + break; + case REQUEST_LEVEL_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); + size = 1; + break; + case REQUEST_HP_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_HP); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_MAX_HP_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_ATK_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_ATK); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_DEF_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_DEF); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_SPEED_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_SPATK_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_SPDEF_BATTLE: + data16 = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); + dst[0] = data16; + dst[1] = data16 >> 8; + size = 2; + break; + case REQUEST_COOL_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_COOL); + size = 1; + break; + case REQUEST_BEAUTY_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_BEAUTY); + size = 1; + break; + case REQUEST_CUTE_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_CUTE); + size = 1; + break; + case REQUEST_SMART_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SMART); + size = 1; + break; + case REQUEST_TOUGH_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_TOUGH); + size = 1; + break; + case REQUEST_SHEEN_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SHEEN); + size = 1; + break; + case REQUEST_COOL_RIBBON_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_COOL_RIBBON); + size = 1; + break; + case REQUEST_BEAUTY_RIBBON_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_BEAUTY_RIBBON); + size = 1; + break; + case REQUEST_CUTE_RIBBON_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_CUTE_RIBBON); + size = 1; + break; + case REQUEST_SMART_RIBBON_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_SMART_RIBBON); + size = 1; + break; + case REQUEST_TOUGH_RIBBON_BATTLE: + dst[0] = GetMonData(&gPlayerParty[monId], MON_DATA_TOUGH_RIBBON); + size = 1; + break; + } + return size; +} + +static void OakOldManHandleGetRawMonData(void) +{ + PlayerHandleGetRawMonData(); +} + +static void OakOldManHandleSetMonData(void) +{ + u8 monToCheck; + u8 i; + + if (gBattleBufferA[gActiveBattler][2] == 0) + { + SetOakOldManMonData(gBattlerPartyIndexes[gActiveBattler]); + } + else + { + monToCheck = gBattleBufferA[gActiveBattler][2]; + for (i = 0; i < PARTY_SIZE; ++i) + { + if (monToCheck & 1) + SetOakOldManMonData(i); + monToCheck >>= 1; + } + } + OakOldManBufferExecCompleted(); +} + +static void SetOakOldManMonData(u8 monId) +{ + struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3]; + struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3]; + s32 i; + + switch (gBattleBufferA[gActiveBattler][1]) + { + case REQUEST_ALL_BATTLE: + { + u8 iv; + + SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); + SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); + for (i = 0; i < MAX_MON_MOVES; ++i) + { + SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); + } + SetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES, &battlePokemon->ppBonuses); + SetMonData(&gPlayerParty[monId], MON_DATA_FRIENDSHIP, &battlePokemon->friendship); + SetMonData(&gPlayerParty[monId], MON_DATA_EXP, &battlePokemon->experience); + iv = battlePokemon->hpIV; + SetMonData(&gPlayerParty[monId], MON_DATA_HP_IV, &iv); + iv = battlePokemon->attackIV; + SetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV, &iv); + iv = battlePokemon->defenseIV; + SetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV, &iv); + iv = battlePokemon->speedIV; + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV, &iv); + iv = battlePokemon->spAttackIV; + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV, &iv); + iv = battlePokemon->spDefenseIV; + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV, &iv); + SetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY, &battlePokemon->personality); + SetMonData(&gPlayerParty[monId], MON_DATA_STATUS, &battlePokemon->status1); + SetMonData(&gPlayerParty[monId], MON_DATA_LEVEL, &battlePokemon->level); + SetMonData(&gPlayerParty[monId], MON_DATA_HP, &battlePokemon->hp); + SetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP, &battlePokemon->maxHP); + SetMonData(&gPlayerParty[monId], MON_DATA_ATK, &battlePokemon->attack); + SetMonData(&gPlayerParty[monId], MON_DATA_DEF, &battlePokemon->defense); + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED, &battlePokemon->speed); + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK, &battlePokemon->spAttack); + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF, &battlePokemon->spDefense); + } + break; + case REQUEST_SPECIES_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_HELDITEM_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_MOVES_PP_BATTLE: + for (i = 0; i < MAX_MON_MOVES; ++i) + { + SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); + } + SetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES, &moveData->ppBonuses); + break; + case REQUEST_MOVE1_BATTLE: + case REQUEST_MOVE2_BATTLE: + case REQUEST_MOVE3_BATTLE: + case REQUEST_MOVE4_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_PP_DATA_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_PP1, &gBattleBufferA[gActiveBattler][3]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP2, &gBattleBufferA[gActiveBattler][4]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP3, &gBattleBufferA[gActiveBattler][5]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP4, &gBattleBufferA[gActiveBattler][6]); + SetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES, &gBattleBufferA[gActiveBattler][7]); + break; + case REQUEST_PPMOVE1_BATTLE: + case REQUEST_PPMOVE2_BATTLE: + case REQUEST_PPMOVE3_BATTLE: + case REQUEST_PPMOVE4_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + gBattleBufferA[gActiveBattler][1] - REQUEST_PPMOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_OTID_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_OT_ID, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_EXP_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_EXP, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_HP_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_HP_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_ATK_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_ATK_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_DEF_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_DEF_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPEED_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPATK_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPDEF_EV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_EV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_FRIENDSHIP_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_FRIENDSHIP, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_POKERUS_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_POKERUS, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_MET_LOCATION_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_MET_LOCATION, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_MET_LEVEL_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_MET_LEVEL, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_MET_GAME_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_MET_GAME, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_POKEBALL_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_POKEBALL, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_ALL_IVS_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_HP_IV, &gBattleBufferA[gActiveBattler][3]); + SetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBattler][4]); + SetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBattler][5]); + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV, &gBattleBufferA[gActiveBattler][6]); + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBattler][7]); + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][8]); + break; + case REQUEST_HP_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_HP_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_ATK_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_DEF_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPEED_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPATK_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPDEF_IV_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_PERSONALITY_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_CHECKSUM_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_STATUS_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_LEVEL_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_LEVEL, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_HP_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_MAX_HP_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_ATK_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_DEF_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPEED_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPATK_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SPDEF_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_COOL_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_COOL, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_BEAUTY_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_BEAUTY, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_CUTE_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_CUTE, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SMART_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SMART, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_TOUGH_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_TOUGH, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SHEEN_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SHEEN, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_COOL_RIBBON_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_COOL_RIBBON, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_BEAUTY_RIBBON_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_BEAUTY_RIBBON, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_CUTE_RIBBON_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_CUTE_RIBBON, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_SMART_RIBBON_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_SMART_RIBBON, &gBattleBufferA[gActiveBattler][3]); + break; + case REQUEST_TOUGH_RIBBON_BATTLE: + SetMonData(&gPlayerParty[monId], MON_DATA_TOUGH_RIBBON, &gBattleBufferA[gActiveBattler][3]); + break; + } + HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); +} + +static void OakOldManHandleSetRawMonData(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleLoadMonSprite(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleSwitchInAnim(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleReturnMonToBall(void) +{ + if (gBattleBufferA[gActiveBattler][1] == 0) + { + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SWITCH_OUT_PLAYER_MON); + gBattlerControllerFuncs[gActiveBattler] = sub_80E89C4; + } + else + { + FreeSpriteOamMatrix(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + DestroySprite(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + SetHealthboxSpriteInvisible(gHealthboxSpriteIds[gActiveBattler]); + OakOldManBufferExecCompleted(); + } +} + +static void OakOldManHandleDrawTrainerPic(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + DecompressTrainerBackPalette(gSaveBlock2Ptr->playerGender, gActiveBattler); + SetMultiuseSpriteTemplateToTrainerBack(gSaveBlock2Ptr->playerGender, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, + 80, + (8 - gTrainerBackPicCoords[gSaveBlock2Ptr->playerGender].size) * 4 + 80, + 30); + } + else + { + DecompressTrainerBackPalette(5, gActiveBattler); + SetMultiuseSpriteTemplateToTrainerBack(5, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, + 80, + (8 - gTrainerBackPicCoords[5].size) * 4 + 80, + 30); + } + gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler; + gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = -2; + gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_8033EEC; + gBattlerControllerFuncs[gActiveBattler] = CompleteOnBattlerSpriteCallbackDummy; +} + +static void OakOldManHandleTrainerSlide(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + DecompressTrainerBackPalette(gSaveBlock2Ptr->playerGender, gActiveBattler); + SetMultiuseSpriteTemplateToTrainerBack(gSaveBlock2Ptr->playerGender, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, + 80, + (8 - gTrainerBackPicCoords[gSaveBlock2Ptr->playerGender].size) * 4 + 80, + 30); + } + else + { + DecompressTrainerBackPalette(5, gActiveBattler); + SetMultiuseSpriteTemplateToTrainerBack(5, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, + 80, + (8 - gTrainerBackPicCoords[5].size) * 4 + 80, + 30); + } + gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler; + gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -96; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 2; + gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_8033EEC; + gBattlerControllerFuncs[gActiveBattler] = CompleteOnBattlerSpriteCallbackDummy2; +} + +static void OakOldManHandleTrainerSlideBack(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleFaintAnimation(void) +{ + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState == 0) + { + if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute) + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SUBSTITUTE_TO_MON); + ++gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState; + } + else + { + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive) + { + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; + HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); + PlaySE12WithPanning(SE_POKE_DEAD, SOUND_PAN_ATTACKER); + gSprites[gBattlerSpriteIds[gActiveBattler]].data[1] = 0; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 5; + gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_8012110; + gBattlerControllerFuncs[gActiveBattler] = sub_80E82F4; + } + } +} + +static void OakOldManHandlePaletteFade(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleSuccessBallThrowAnim(void) +{ + gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS; + gDoingBattleAnim = TRUE; + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW); + gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone; +} + +static void OakOldManHandleBallThrowAnim(void) +{ + u8 ballThrowCaseId = gBattleBufferA[gActiveBattler][1]; + + gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId; + gDoingBattleAnim = TRUE; + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW); + gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone; +} + +static void OakOldManHandlePause(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleMoveAnimation(void) +{ + u16 move = gBattleBufferA[gActiveBattler][1] | (gBattleBufferA[gActiveBattler][2] << 8); + + gAnimMoveTurn = gBattleBufferA[gActiveBattler][3]; + gAnimMovePower = gBattleBufferA[gActiveBattler][4] | (gBattleBufferA[gActiveBattler][5] << 8); + gAnimMoveDmg = gBattleBufferA[gActiveBattler][6] | (gBattleBufferA[gActiveBattler][7] << 8) | (gBattleBufferA[gActiveBattler][8] << 16) | (gBattleBufferA[gActiveBattler][9] << 24); + gAnimFriendship = gBattleBufferA[gActiveBattler][10]; + gWeatherMoveAnim = gBattleBufferA[gActiveBattler][12] | (gBattleBufferA[gActiveBattler][13] << 8); + gAnimDisableStructPtr = (struct DisableStruct *)&gBattleBufferA[gActiveBattler][16]; + gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE + { + OakOldManBufferExecCompleted(); + } + else + { + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; + gBattlerControllerFuncs[gActiveBattler] = OakOldManDoMoveAnimation; + } +} + +static void OakOldManDoMoveAnimation(void) +{ + u16 move = gBattleBufferA[gActiveBattler][1] | (gBattleBufferA[gActiveBattler][2] << 8); + + switch (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState) + { + case 0: + if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute) + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SUBSTITUTE_TO_MON); + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 1; + break; + case 1: + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive) + { + sub_8035450(0); + DoMoveAnim(move); + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 2; + } + break; + case 2: + gAnimScriptCallback(); + if (!gAnimScriptActive) + { + sub_8035450(1); + if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute) + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_MON_TO_SUBSTITUTE); + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 3; + } + break; + case 3: + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive) + { + CopyAllBattleSpritesInvisibilities(); + TrySetBehindSubstituteSpriteBit(gActiveBattler, gBattleBufferA[gActiveBattler][1] | (gBattleBufferA[gActiveBattler][2] << 8)); + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; + OakOldManBufferExecCompleted(); + } + break; + } +} + +static void OakOldManHandlePrintString(void) +{ + u16 *stringId; + + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]); + if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && *stringId == 1) + { + OakOldManBufferExecCompleted(); + } + else + { + BufferStringBattle(*stringId); + if (sub_80D89B0(*stringId)) + BattlePutTextOnWindow(gDisplayedStringBattle, 64); + else + BattlePutTextOnWindow(gDisplayedStringBattle, 0); + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + switch (*stringId) + { + case 216: + if (!sub_80EB2E0(2)) + { + sub_80EB2F4(2); + gBattlerControllerFuncs[gActiveBattler] = sub_80E8584; + return; + } + break; + case 30: + gBattlerControllerFuncs[gActiveBattler] = sub_80E85AC; + return; + case 383: + gBattlerControllerFuncs[gActiveBattler] = sub_80E85C0; + return; + case 227: + gBattlerControllerFuncs[gActiveBattler] = sub_80E8598; + return; + } + } + gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; + } +} + +static void OakOldManHandlePrintSelectionString(void) +{ + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + OakOldManHandlePrintString(); + else + OakOldManBufferExecCompleted(); +} + +static void sub_80EA690(void) +{ + if (!IsDma3ManagerBusyWithBgCopy()) + { + gBattle_BG0_X = 0; + gBattle_BG0_Y = 160; + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + gBattlerControllerFuncs[gActiveBattler] = HandleInputChooseAction; + else + gBattlerControllerFuncs[gActiveBattler] = sub_80E7844; + } +} + +static void OakOldManHandleChooseAction(void) +{ + s32 i; + + gBattlerControllerFuncs[gActiveBattler] = sub_80EA690; + BattlePutTextOnWindow(gUnknown_83FDA4C, 0); + BattlePutTextOnWindow(gUnknown_83FE725, 2); + for (i = 0; i < MAX_MON_MOVES; ++i) + ActionSelectionDestroyCursorAt((u8)i); + ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo); + else + BattleStringExpandPlaceholdersToDisplayedString(gUnknown_83FE6FA); + BattlePutTextOnWindow(gDisplayedStringBattle, 1); +} + +static void OakOldManHandleUnknownYesNoBox(void) +{ + OakOldManBufferExecCompleted(); +} + +static void sub_80EA798(void) +{ + if (!IsDma3ManagerBusyWithBgCopy()) + { + gBattle_BG0_X = 0; + gBattle_BG0_Y = 320; + gBattlerControllerFuncs[gActiveBattler] = sub_80E7988; + } +} + +static void OakOldManHandleChooseMove(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + InitMoveSelectionsVarsAndStrings(); + gBattlerControllerFuncs[gActiveBattler] = sub_80EA798; + } + else + { + switch (gBattleStruct->field_95) + { + case 0: + InitMoveSelectionsVarsAndStrings(); + ++gBattleStruct->field_95; + gBattleStruct->field_97 = 80; + // fall through + case 1: + if (--gBattleStruct->field_97 == 0) + { + PlaySE(SE_SELECT); + BtlController_EmitTwoReturnValues(1, 10, 0x100); + OakOldManBufferExecCompleted(); + } + break; + } + } +} + +static void OakOldManHandleChooseItem(void) +{ + s32 i; + + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gBattlerControllerFuncs[gActiveBattler] = OpenBagAndChooseItem; + gBattlerInMenuId = gActiveBattler; + for (i = 0; i < 3; ++i) + gUnknown_203B0DC[i] = gBattleBufferA[gActiveBattler][i + 1]; +} + +static void OakOldManHandleChoosePokemon(void) +{ + s32 i; + + gUnknown_3004FFC[gActiveBattler] = CreateTask(TaskDummy, 0xFF); + gTasks[gUnknown_3004FFC[gActiveBattler]].data[0] = gBattleBufferA[gActiveBattler][1] & 0xF; + *(&gBattleStruct->battlerPreventingSwitchout) = gBattleBufferA[gActiveBattler][1] >> 4; + *(&gBattleStruct->field_8B) = gBattleBufferA[gActiveBattler][2]; + *(&gBattleStruct->abilityPreventingSwitchout) = gBattleBufferA[gActiveBattler][3]; + for (i = 0; i < 3; ++i) + gUnknown_203B0DC[i] = gBattleBufferA[gActiveBattler][4 + i]; + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gBattlerControllerFuncs[gActiveBattler] = OpenPartyMenuToChooseMon; + gBattlerInMenuId = gActiveBattler; +} + +static void OakOldManHandleCmd23(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleHealthBarUpdate(void) +{ + s16 hpVal; + + LoadBattleBarGfx(0); + hpVal = gBattleBufferA[gActiveBattler][2] | (gBattleBufferA[gActiveBattler][3] << 8); + if (hpVal != INSTANT_HP_BAR_DROP) + { + u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); + u32 curHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_HP); + + SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, curHP, hpVal); + } + else + { + u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); + + SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + } + gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; +} + +static void OakOldManHandleExpUpdate(void) +{ + u8 monId = gBattleBufferA[gActiveBattler][1]; + + if (GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL) >= MAX_LEVEL) + { + OakOldManBufferExecCompleted(); + } + else + { + s16 expPointsToGive; + u8 taskId; + + LoadBattleBarGfx(1); + GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); // Unused return value. + expPointsToGive = T1_READ_16(&gBattleBufferA[gActiveBattler][2]); + taskId = CreateTask(Task_GiveExpToMon, 10); + gTasks[taskId].tExpTask_monId = monId; + gTasks[taskId].tExpTask_gainedExp = expPointsToGive; + gTasks[taskId].tExpTask_battler = gActiveBattler; + gBattlerControllerFuncs[gActiveBattler] = nullsub_81; + } +} + +static void OakOldManHandleStatusIconUpdate(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleStatusAnimation(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleStatusXor(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleDataTransfer(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleDMA3Transfer(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandlePlayBGM(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd32(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleTwoReturnValues(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleChosenMonReturnValue(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleOneReturnValue(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleOneReturnValue_Duplicate(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd37(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd38(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd39(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd40(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleHitAnimation(void) +{ + if (gSprites[gBattlerSpriteIds[gActiveBattler]].invisible == TRUE) + { + OakOldManBufferExecCompleted(); + } + else + { + gDoingBattleAnim = TRUE; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[1] = 0; + DoHitAnimHealthboxEffect(gActiveBattler); + gBattlerControllerFuncs[gActiveBattler] = DoHitAnimBlinkSpriteEffect; + } +} + +static void OakOldManHandleCmd42(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandlePlaySE(void) +{ + PlaySE(gBattleBufferA[gActiveBattler][1] | (gBattleBufferA[gActiveBattler][2] << 8)); + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandlePlayFanfare(void) +{ + PlayFanfare(gBattleBufferA[gActiveBattler][1] | (gBattleBufferA[gActiveBattler][2] << 8)); + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleFaintingCry(void) +{ + u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); + + PlayCry1(species, 25); + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleIntroSlide(void) +{ + HandleIntroSlide(gBattleBufferA[gActiveBattler][1]); + gIntroSlideFlags |= 1; + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleIntroTrainerBallThrow(void) +{ + u8 paletteNum; + u8 taskId; + + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y; + gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation; + gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler; + StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_80335F8); + StartSpriteAnim(&gSprites[gBattlerSpriteIds[gActiveBattler]], 1); + paletteNum = AllocSpritePalette(0xD6F8); + LoadCompressedPalette(gTrainerBackPicPaletteTable[gSaveBlock2Ptr->playerGender].data, 0x100 + paletteNum * 16, 32); + gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = paletteNum; + taskId = CreateTask(sub_80EB0A8, 5); + gTasks[taskId].data[0] = gActiveBattler; + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) + gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; + gBattleSpritesDataPtr->animationData->field_9_x1 = 1; + gBattlerControllerFuncs[gActiveBattler] = nullsub_13; + } + else + { + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) + gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; + OakOldManBufferExecCompleted(); + } +} + +static void sub_80EAF34(u8 battlerId) +{ + u16 species; + + gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies = SPECIES_NONE; + gBattlerPartyIndexes[battlerId] = gBattleBufferA[battlerId][1]; + species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); + gUnknown_3004FFC[battlerId] = CreateInvisibleSpriteWithCallback(sub_8033E3C); + SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); + gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate, + GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteDefault_Y(battlerId), + GetBattlerSpriteSubpriority(battlerId)); + gSprites[gUnknown_3004FFC[battlerId]].data[1] = gBattlerSpriteIds[battlerId]; + gSprites[gBattlerSpriteIds[battlerId]].data[0] = battlerId; + gSprites[gBattlerSpriteIds[battlerId]].data[2] = species; + gSprites[gBattlerSpriteIds[battlerId]].oam.paletteNum = battlerId; + StartSpriteAnim(&gSprites[gBattlerSpriteIds[battlerId]], gBattleMonForms[battlerId]); + gSprites[gBattlerSpriteIds[battlerId]].invisible = TRUE; + gSprites[gBattlerSpriteIds[battlerId]].callback = SpriteCallbackDummy; + gSprites[gUnknown_3004FFC[battlerId]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT); +} + +static void sub_80EB0A8(u8 taskId) +{ + if (gTasks[taskId].data[1] < 31) + { + ++gTasks[taskId].data[1]; + } + else + { + u8 savedActiveBattler = gActiveBattler; + + gActiveBattler = gTasks[taskId].data[0]; + gBattleBufferA[gActiveBattler][1] = gBattlerPartyIndexes[gActiveBattler]; + sub_80EAF34(gActiveBattler); + gBattlerControllerFuncs[gActiveBattler] = sub_80E7B4C; + gActiveBattler = savedActiveBattler; + DestroyTask(taskId); + } +} + +static void OakOldManHandleDrawPartyStatusSummary(void) +{ + if (gBattleBufferA[gActiveBattler][1] != 0 + && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + { + OakOldManBufferExecCompleted(); + } + else + { + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown = TRUE; + gBattlerStatusSummaryTaskId[gActiveBattler] = CreatePartyStatusSummarySprites(gActiveBattler, + (struct HpAndStatus *)&gBattleBufferA[gActiveBattler][4], + gBattleBufferA[gActiveBattler][1], + gBattleBufferA[gActiveBattler][2]); + OakOldManBufferExecCompleted(); + } +} + +static void OakOldManHandleHidePartyStatusSummary(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleEndBounceEffect(void) +{ + EndBounceEffect(gActiveBattler, BOUNCE_HEALTHBOX); + EndBounceEffect(gActiveBattler, BOUNCE_MON); + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleSpriteInvisibility(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleBattleAnimation(void) +{ + u8 animationId = gBattleBufferA[gActiveBattler][1]; + u16 argument = gBattleBufferA[gActiveBattler][2] | (gBattleBufferA[gActiveBattler][3] << 8); + + if (TryHandleLaunchBattleTableAnimation(gActiveBattler, gActiveBattler, gActiveBattler, animationId, argument)) + OakOldManBufferExecCompleted(); + else + gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedBattleAnimation; +} + +static void OakOldManHandleLinkStandbyMsg(void) +{ + switch (gBattleBufferA[gActiveBattler][1]) + { + case 0: + case 1: + EndBounceEffect(gActiveBattler, BOUNCE_HEALTHBOX); + EndBounceEffect(gActiveBattler, BOUNCE_MON); + break; + case 2: + break; + } + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleResetActionMoveSelection(void) +{ + OakOldManBufferExecCompleted(); +} + +static void OakOldManHandleCmd55(void) +{ + gBattleOutcome = gBattleBufferA[gActiveBattler][1]; + FadeOutMapMusic(5); + BeginFastPaletteFade(3); + OakOldManBufferExecCompleted(); + if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER) && gBattleTypeFlags & BATTLE_TYPE_LINK) + gBattlerControllerFuncs[gActiveBattler] = sub_80E7930; +} + +static void OakOldManCmdEnd(void) +{ +} + +bool8 sub_80EB2E0(u8 a1) +{ + return gBattleStruct->field_96 & a1; +} + +void sub_80EB2F4(u8 a1) +{ + gBattleStruct->field_96 |= a1; +} + +void sub_80EB30C(void) +{ + u32 width = 0x1A; + u32 pal = 7; + + FillBgTilemapBufferRect(0, 0x30, 0, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x31, 1, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x32, 2, 0xE, width, 1, pal); + FillBgTilemapBufferRect(0, 0x33, 0x1C, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x34, 0x1D, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x35, 0, 0xF, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x36, 1, 0xF, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x38, 0x1C, 0xF, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x39, 0x1D, 0xF, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x3A, 0, 0x10, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x3B, 1, 0x10, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x3C, 0x1C, 0x10, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x3D, 0x1D, 0x10, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x3A), 0, 0x11, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x3B), 1, 0x11, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x3C), 0x1C, 0x11, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x3D), 0x1D, 0x11, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x35), 0, 0x12, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x36), 1, 0x12, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x38), 0x1C, 0x12, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x39), 0x1D, 0x12, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x30), 0, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x31), 1, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x32), 2, 0x13, width, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x33), 0x1C, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, BG_TILE_V_FLIP(0x34), 0x1D, 0x13, 1, 1, pal); +} + +void sub_80EB524(void) +{ + u32 pal = 0; + u32 width = 0x1A; + u32 height; + + FillBgTilemapBufferRect(0, 3, 0, 0xE, 1, 1, pal); + height = 4; + FillBgTilemapBufferRect(0, 4, 1, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 5, 2, 0xE, width, 1, pal); + FillBgTilemapBufferRect(0, 6, 0x1C, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 7, 0x1D, 0xE, 1, 1, pal); + FillBgTilemapBufferRect(0, 8, 0, 0xF, 1, height, pal); + FillBgTilemapBufferRect(0, 9, 1, 0xF, 1, height, pal); + FillBgTilemapBufferRect(0, 0xA, 2, 0xF, width, height, pal); + FillBgTilemapBufferRect(0, 0xB, 0x1C, 0xF, 1, height, pal); + FillBgTilemapBufferRect(0, 0xC, 0x1D, 0xF, 1, height, pal); + FillBgTilemapBufferRect(0, 0xD, 0, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, 0xE, 1, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, 0xF, 2, 0x13, width, 1, pal); + FillBgTilemapBufferRect(0, 0x10, 0x1C, 0x13, 1, 1, pal); + FillBgTilemapBufferRect(0, 0x11, 0x1D, 0x13, 1, 1, pal); +} diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 794b83b73..a9173f1a9 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -45,7 +45,7 @@ static void OpponentHandleTrainerSlideBack(void); static void OpponentHandleFaintAnimation(void); static void OpponentHandlePaletteFade(void); static void OpponentHandleSuccessBallThrowAnim(void); -static void OpponentHandleBallThrow(void); +static void OpponentHandleBallThrowAnim(void); static void OpponentHandlePause(void); static void OpponentHandleMoveAnimation(void); static void OpponentHandlePrintString(void); @@ -116,7 +116,7 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) = OpponentHandleFaintAnimation, OpponentHandlePaletteFade, OpponentHandleSuccessBallThrowAnim, - OpponentHandleBallThrow, + OpponentHandleBallThrowAnim, OpponentHandlePause, OpponentHandleMoveAnimation, OpponentHandlePrintString, @@ -1231,7 +1231,7 @@ static void OpponentHandleSuccessBallThrowAnim(void) OpponentBufferExecCompleted(); } -static void OpponentHandleBallThrow(void) +static void OpponentHandleBallThrowAnim(void) { OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index a9bb5bc6e..f8d5958ba 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -839,7 +839,7 @@ void sub_802F6A8(void) else { m4aSongNumStop(SE_HINSI); - gMain.inBattle = 0; + gMain.inBattle = FALSE; gMain.callback1 = gPreBattleCallback1; SetMainCallback2(gMain.savedCallback); } @@ -1318,7 +1318,6 @@ static void WaitForMonSelection(void) BtlController_EmitChosenMonReturnValue(1, gUnknown_203B0C1, gUnknown_203B0DC); else BtlController_EmitChosenMonReturnValue(1, 6, NULL); - if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1) PrintLinkStandbyMsg(); PlayerBufferExecCompleted(); diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 544af1006..f3530fc4b 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -85,9 +85,9 @@ static void InitSinglePlayerBtlControllers(void) gBattleMainFunc = BeginBattleIntro; if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE) { - gBattlerControllerFuncs[0] = SetControllerToPokedude; + gBattlerControllerFuncs[0] = SetControllerToPokeDude; gBattlerPositions[0] = B_POSITION_PLAYER_LEFT; - gBattlerControllerFuncs[1] = SetControllerToPokedude; + gBattlerControllerFuncs[1] = SetControllerToPokeDude; gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT; gBattlersCount = 2; } @@ -95,8 +95,8 @@ static void InitSinglePlayerBtlControllers(void) { if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) gBattlerControllerFuncs[0] = SetControllerToSafari; - else if (gBattleTypeFlags & (BATTLE_TYPE_OLDMAN_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE)) - gBattlerControllerFuncs[0] = SetControllerToOakOrOldman; + else if (gBattleTypeFlags & (BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE)) + gBattlerControllerFuncs[0] = SetControllerToOakOrOldMan; else gBattlerControllerFuncs[0] = SetControllerToPlayer; gBattlerPositions[0] = B_POSITION_PLAYER_LEFT; @@ -110,13 +110,13 @@ static void InitSinglePlayerBtlControllers(void) gBattleMainFunc = BeginBattleIntro; if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE) { - gBattlerControllerFuncs[0] = SetControllerToPokedude; + gBattlerControllerFuncs[0] = SetControllerToPokeDude; gBattlerPositions[0] = B_POSITION_PLAYER_LEFT; - gBattlerControllerFuncs[1] = SetControllerToPokedude; + gBattlerControllerFuncs[1] = SetControllerToPokeDude; gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT; - gBattlerControllerFuncs[2] = SetControllerToPokedude; + gBattlerControllerFuncs[2] = SetControllerToPokeDude; gBattlerPositions[2] = B_POSITION_PLAYER_RIGHT; - gBattlerControllerFuncs[3] = SetControllerToPokedude; + gBattlerControllerFuncs[3] = SetControllerToPokeDude; gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; gBattlersCount = MAX_BATTLERS_COUNT; } @@ -774,7 +774,7 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID) sBattleBuffersTransferData[1] = CONTROLLER_PRINTSTRINGPLAYERONLY; sBattleBuffersTransferData[2] = stringID; sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8; - stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]); + stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]); stringInfo->currentMove = gCurrentMove; stringInfo->originallyUsedMove = gChosenMove; stringInfo->lastItem = gLastUsedItem; diff --git a/src/battle_main.c b/src/battle_main.c new file mode 100644 index 000000000..1b1614a5a --- /dev/null +++ b/src/battle_main.c @@ -0,0 +1,4412 @@ +#include "global.h" +#include "battle.h" +#include "battle_anim.h" +#include "battle_ai_script_commands.h" +#include "battle_controllers.h" +#include "battle_interface.h" +#include "battle_main.h" +#include "battle_message.h" +#include "battle_scripts.h" +#include "battle_setup.h" +#include "battle_tower.h" +#include "battle_string_ids.h" +#include "berry.h" +#include "bg.h" +#include "data.h" +#include "decompress.h" +#include "dma3.h" +#include "event_data.h" +#include "evolution_scene.h" +#include "graphics.h" +#include "gpu_regs.h" +#include "help_system.h" +#include "international_string_util.h" +#include "item.h" +#include "link.h" +#include "link_rfu.h" +#include "load_save.h" +#include "main.h" +#include "malloc.h" +#include "m4a.h" +#include "palette.h" +#include "party_menu.h" +#include "pokeball.h" +#include "pokedex.h" +#include "pokemon.h" +#include "quest_log.h" +#include "random.h" +#include "roamer.h" +#include "safari_zone.h" +#include "scanline_effect.h" +#include "sound.h" +#include "sprite.h" +#include "string_util.h" +#include "strings.h" +#include "task.h" +#include "text.h" +#include "trig.h" +#include "vs_seeker.h" +#include "util.h" +#include "window.h" +#include "cable_club.h" +#include "constants/abilities.h" +#include "constants/battle_move_effects.h" +#include "constants/hold_effects.h" +#include "constants/items.h" +#include "constants/moves.h" +#include "constants/pokemon.h" +#include "constants/songs.h" +#include "constants/species.h" +#include "constants/trainers.h" +#include "constants/trainer_classes.h" + +static void sub_80111EC(struct Sprite *sprite); +static void HandleAction_UseMove(void); +static void HandleAction_Switch(void); +static void HandleAction_UseItem(void); +static void HandleAction_Run(void); +static void HandleAction_WatchesCarefully(void); +static void HandleAction_SafariZoneBallThrow(void); +static void HandleAction_ThrowPokeblock(void); +static void HandleAction_GoNear(void); +static void HandleAction_SafariZoneRun(void); +static void HandleAction_OldManBallThrow(void); +static void HandleAction_TryFinish(void); +static void HandleAction_NothingIsFainted(void); +static void HandleAction_ActionFinished(void); +static void HandleEndTurn_ContinueBattle(void); +static void HandleEndTurn_BattleWon(void); +static void HandleEndTurn_BattleLost(void); +static void HandleEndTurn_RanFromBattle(void); +static void HandleEndTurn_MonFled(void); +static void HandleEndTurn_FinishBattle(void); +static void CB2_InitBattleInternal(void); +static void CB2_PreInitMultiBattle(void); +static void CB2_HandleStartMultiBattle(void); +static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum); +static void CB2_HandleStartBattle(void); +static void TryCorrectShedinjaLanguage(struct Pokemon *mon); +static void BattleMainCB1(void); +static void CB2_QuitPokeDudeBattle(void); +static void sub_80111FC(struct Sprite *sprite); +static void sub_8011B94(void); +static void sub_8011BB0(void); +static void SpriteCB_MoveWildMonToRight(struct Sprite *sprite); +static void SpriteCB_WildMonShowHealthbox(struct Sprite *sprite); +static void sub_8011E3C(struct Sprite *sprite); +static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite); +static void sub_8012060(struct Sprite *sprite); +static void oac_poke_ally_(struct Sprite *sprite); +static void SpriteCallbackDummy3(struct Sprite *sprite); +static void SpriteCB_BounceEffect(struct Sprite *sprite); +static void sub_8012398(struct Sprite *sprite); +static void BattleStartClearSetData(void); +static void BattleIntroGetMonsData(void); +static void TurnValuesCleanUp(bool8 var0); +static void SpecialStatusesClear(void); +static void BattleIntroPrepareBackgroundSlide(void); +static void BattleIntroDrawTrainersOrMonsSprites(void); +static void BattleIntroDrawPartySummaryScreens(void); +static void BattleIntroPrintTrainerWantsToBattle(void); +static void BattleIntroPrintWildMonAttacked(void); +static void BattleIntroPrintOpponentSendsOut(void); +static void BattleIntroPrintPlayerSendsOut(void); +static void BattleIntroRecordMonsToDex(void); +static void BattleIntroOpponentSendsOutMonAnimation(void); +static void BattleIntroPlayerSendsOutMonAnimation(void); +static void TryDoEventsBeforeFirstTurn(void); +static void HandleTurnActionSelectionState(void); +static void RunTurnActionsFunctions(void); +static void SetActionsAndBattlersTurnOrder(void); +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); +static void HandleEndTurn_FinishBattle(void); +static void FreeResetData_ReturnToOvOrDoEvolutions(void); +static void ReturnFromBattleToOverworld(void); +static void TryEvolvePokemon(void); +static void WaitForEvoSceneToFinish(void); + +EWRAM_DATA u16 gBattle_BG0_X = 0; +EWRAM_DATA u16 gBattle_BG0_Y = 0; +EWRAM_DATA u16 gBattle_BG1_X = 0; +EWRAM_DATA u16 gBattle_BG1_Y = 0; +EWRAM_DATA u16 gBattle_BG2_X = 0; +EWRAM_DATA u16 gBattle_BG2_Y = 0; +EWRAM_DATA u16 gBattle_BG3_X = 0; +EWRAM_DATA u16 gBattle_BG3_Y = 0; +EWRAM_DATA u16 gBattle_WIN0H = 0; +EWRAM_DATA u16 gBattle_WIN0V = 0; +EWRAM_DATA u16 gBattle_WIN1H = 0; +EWRAM_DATA u16 gBattle_WIN1V = 0; +EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; +EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; +static EWRAM_DATA u32 gUnknown_2022AE8[25] = {0}; +EWRAM_DATA u32 gBattleTypeFlags = 0; +EWRAM_DATA u8 gBattleTerrain = 0; +EWRAM_DATA u32 gUnknown_2022B54 = 0; +EWRAM_DATA struct UnknownPokemonStruct4 gUnknown_2022B58[3] = {0}; +EWRAM_DATA u8 *gUnknown_2022BB8 = NULL; +EWRAM_DATA u8 *gUnknown_2022BBC = NULL; +EWRAM_DATA u16 *gUnknown_2022BC0 = NULL; +EWRAM_DATA u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200] = {0}; +EWRAM_DATA u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200] = {0}; +EWRAM_DATA u8 gActiveBattler = 0; +EWRAM_DATA u32 gBattleControllerExecFlags = 0; +EWRAM_DATA u8 gBattlersCount = 0; +EWRAM_DATA u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gBattlerPositions[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gActionsByTurnOrder[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gBattlerByTurnOrder[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gCurrentTurnActionNumber = 0; +EWRAM_DATA u8 gCurrentActionFuncId = 0; +EWRAM_DATA struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gCurrMovePos = 0; +EWRAM_DATA u8 gChosenMovePos = 0; +EWRAM_DATA u16 gCurrentMove = 0; +EWRAM_DATA u16 gChosenMove = 0; +EWRAM_DATA u16 gCalledMove = 0; +EWRAM_DATA s32 gBattleMoveDamage = 0; +EWRAM_DATA s32 gHpDealt = 0; +EWRAM_DATA s32 gTakenDmg[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLastUsedItem = 0; +EWRAM_DATA u8 gLastUsedAbility = 0; +EWRAM_DATA u8 gBattlerAttacker = 0; +EWRAM_DATA u8 gBattlerTarget = 0; +EWRAM_DATA u8 gBattlerFainted = 0; +EWRAM_DATA u8 gEffectBattler = 0; +EWRAM_DATA u8 gPotentialItemEffectBattler = 0; +EWRAM_DATA u8 gAbsentBattlerFlags = 0; +EWRAM_DATA u8 gCritMultiplier = 0; +EWRAM_DATA u8 gMultiHitCounter = 0; +EWRAM_DATA const u8 *gBattlescriptCurrInstr = NULL; +EWRAM_DATA u32 gUnusedBattleMainVar = 0; +EWRAM_DATA u8 gChosenActionByBattler[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA const u8 *gSelectionBattleScripts[MAX_BATTLERS_COUNT] = {NULL}; +EWRAM_DATA u16 gLastPrintedMoves[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLastMoves[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLastLandedMoves[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLastHitByType[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLastResultingMoves[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gLockedMoves[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gLastHitBy[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gChosenMoveByBattler[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gMoveResultFlags = 0; +EWRAM_DATA u32 gHitMarker = 0; +static EWRAM_DATA u8 gUnknown_2023DD4[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gUnknown_2023DDC = 0; +EWRAM_DATA u16 gSideStatuses[2] = {0}; +EWRAM_DATA struct SideTimer gSideTimers[2] = {0}; +EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gPauseCounterBattle = 0; +EWRAM_DATA u16 gPaydayMoney = 0; +EWRAM_DATA u16 gRandomTurnNumber = 0; +EWRAM_DATA u8 gBattleCommunication[BATTLE_COMMUNICATION_ENTRIES_COUNT] = {0}; +EWRAM_DATA u8 gBattleOutcome = 0; +EWRAM_DATA struct ProtectStruct gProtectStructs[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA struct SpecialStatus gSpecialStatuses[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u16 gBattleWeather = 0; +EWRAM_DATA struct WishFutureKnock gWishFutureKnock = {0}; +EWRAM_DATA u16 gIntroSlideFlags = 0; +EWRAM_DATA u8 gSentPokesToOpponent[2] = {0}; +EWRAM_DATA u16 gDynamicBasePower = 0; +EWRAM_DATA u16 gExpShareExp = 0; +EWRAM_DATA struct BattleEnigmaBerry gEnigmaBerries[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA struct BattleScripting gBattleScripting = {0}; +EWRAM_DATA struct BattleStruct *gBattleStruct = NULL; +EWRAM_DATA u8 *gLinkBattleSendBuffer = NULL; +EWRAM_DATA u8 *gLinkBattleRecvBuffer = NULL; +EWRAM_DATA struct BattleResources *gBattleResources = NULL; +EWRAM_DATA u8 gActionSelectionCursor[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gBattlerStatusSummaryTaskId[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u8 gBattlerInMenuId = 0; +EWRAM_DATA bool8 gDoingBattleAnim = FALSE; +EWRAM_DATA u32 gTransformedPersonalities[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA struct BattleSpriteData *gBattleSpritesDataPtr = NULL; +EWRAM_DATA struct MonSpritesGfx *gMonSpritesGfxPtr = NULL; +EWRAM_DATA u16 gBattleMovePower = 0; +EWRAM_DATA u16 gMoveToLearn = 0; +EWRAM_DATA u8 gBattleMonForms[MAX_BATTLERS_COUNT] = {0}; + +void (*gPreBattleCallback1)(void); +void (*gBattleMainFunc)(void); +struct BattleResults gBattleResults; +u8 gLeveledUpInBattle; +void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); +u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; +u8 gMultiUsePlayerCursor; +u8 gNumberOfMovesToChoose; +u8 gUnknown_3004FFC[MAX_BATTLERS_COUNT]; + +static const struct ScanlineEffectParams sIntroScanlineParams16Bit = +{ + ®_BG3HOFS, SCANLINE_EFFECT_DMACNT_16BIT, 1 +}; + +const struct SpriteTemplate gUnknown_824EFF0 = +{ + .tileTag = 0, + .paletteTag = 0, + .oam = &gDummyOamData, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80111EC, +}; + +static const u8 sText_ShedinjaJpnName[] = _("ヌケニン"); // Nukenin + +const struct OamData gOamData_824F010 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +const struct OamData gOamData_824F018 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 2, + .affineParam = 0, +}; + +// not used +static const union AnimCmd gUnknown_824F020[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_JUMP(0), +}; + +// not used +static const union AnimCmd *const gUnknown_824F028[] = +{ + gUnknown_824F020, +}; + +// not used +static const union AffineAnimCmd gUnknown_824F02C[] = +{ + AFFINEANIMCMD_FRAME(-0x10, 0x0, 0, 4), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 0x3C), + AFFINEANIMCMD_JUMP(1), +}; + +// not used +static const union AffineAnimCmd *const gUnknown_824F044[] = +{ + gUnknown_824F02C, +}; + +static const s8 gUnknown_824F048[] = { -32, -16, -16, -32, -32, 0, 0, 0 }; + +// format: attacking type, defending type, damage multiplier +// the multiplier is a (decimal) fixed-point number: +// 20 is ×2.0 TYPE_MUL_SUPER_EFFECTIVE +// 10 is ×1.0 TYPE_MUL_NORMAL +// 05 is ×0.5 TYPE_MUL_NOT_EFFECTIVE +// 00 is ×0.0 TYPE_MUL_NO_EFFECT +const u8 gTypeEffectiveness[336] = +{ + TYPE_NORMAL, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_NORMAL, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIRE, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIRE, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIRE, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIRE, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIRE, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIRE, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIRE, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIRE, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_WATER, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_WATER, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE, + TYPE_WATER, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE, + TYPE_WATER, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_WATER, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_WATER, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ELECTRIC, TYPE_WATER, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ELECTRIC, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ELECTRIC, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ELECTRIC, TYPE_GROUND, TYPE_MUL_NO_EFFECT, + TYPE_ELECTRIC, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ELECTRIC, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_WATER, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GRASS, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GRASS, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GRASS, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GRASS, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ICE, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ICE, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ICE, TYPE_ICE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ICE, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ICE, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ICE, TYPE_DRAGON, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ICE, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ICE, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIGHTING, TYPE_NORMAL, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIGHTING, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIGHTING, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIGHTING, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIGHTING, TYPE_PSYCHIC, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIGHTING, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FIGHTING, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIGHTING, TYPE_DARK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FIGHTING, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_POISON, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_POISON, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_POISON, TYPE_GROUND, TYPE_MUL_NOT_EFFECTIVE, + TYPE_POISON, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_POISON, TYPE_GHOST, TYPE_MUL_NOT_EFFECTIVE, + TYPE_POISON, TYPE_STEEL, TYPE_MUL_NO_EFFECT, + TYPE_GROUND, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GROUND, TYPE_ELECTRIC, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GROUND, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GROUND, TYPE_POISON, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GROUND, TYPE_FLYING, TYPE_MUL_NO_EFFECT, + TYPE_GROUND, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GROUND, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GROUND, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FLYING, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FLYING, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FLYING, TYPE_FIGHTING, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FLYING, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_FLYING, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FLYING, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_PSYCHIC, TYPE_FIGHTING, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_PSYCHIC, TYPE_POISON, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_PSYCHIC, TYPE_PSYCHIC, TYPE_MUL_NOT_EFFECTIVE, + TYPE_PSYCHIC, TYPE_DARK, TYPE_MUL_NO_EFFECT, + TYPE_PSYCHIC, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_BUG, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_BUG, TYPE_GHOST, TYPE_MUL_NOT_EFFECTIVE, + TYPE_BUG, TYPE_DARK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_BUG, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ROCK, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ROCK, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ROCK, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ROCK, TYPE_GROUND, TYPE_MUL_NOT_EFFECTIVE, + TYPE_ROCK, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ROCK, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_ROCK, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GHOST, TYPE_NORMAL, TYPE_MUL_NO_EFFECT, + TYPE_GHOST, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_GHOST, TYPE_DARK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GHOST, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_GHOST, TYPE_GHOST, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_DRAGON, TYPE_DRAGON, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_DRAGON, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_DARK, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE, + TYPE_DARK, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_DARK, TYPE_GHOST, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_DARK, TYPE_DARK, TYPE_MUL_NOT_EFFECTIVE, + TYPE_DARK, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_STEEL, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE, + TYPE_STEEL, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE, + TYPE_STEEL, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE, + TYPE_STEEL, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_STEEL, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE, + TYPE_STEEL, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE, + TYPE_FORESIGHT, TYPE_FORESIGHT, TYPE_MUL_NO_EFFECT, + TYPE_NORMAL, TYPE_GHOST, TYPE_MUL_NO_EFFECT, + TYPE_FIGHTING, TYPE_GHOST, TYPE_MUL_NO_EFFECT, + TYPE_ENDTABLE, TYPE_ENDTABLE, TYPE_MUL_NO_EFFECT +}; + +const u8 gTypeNames[][TYPE_NAME_LENGTH + 1] = +{ + _("NORMAL"), + _("FIGHT"), + _("FLYING"), + _("POISON"), + _("GROUND"), + _("ROCK"), + _("BUG"), + _("GHOST"), + _("STEEL"), + _("???"), + _("FIRE"), + _("WATER"), + _("GRASS"), + _("ELECTR"), + _("PSYCHC"), + _("ICE"), + _("DRAGON"), + _("DARK"), +}; + +// This is a factor in how much money you get for beating a trainer. +const struct TrainerMoney gTrainerMoneyTable[] = +{ + { CLASS_LEADER_2, 25 }, + { CLASS_ELITE_FOUR_2, 25 }, + { CLASS_PKMN_PROF, 25 }, + { CLASS_RIVAL, 4 }, + { CLASS_RIVAL_2, 9 }, + { CLASS_CHAMPION_2, 25 }, + { CLASS_YOUNGSTER_2, 4 }, + { CLASS_BUG_CATCHER_2, 3 }, + { CLASS_HIKER_2, 9 }, + { CLASS_BIRD_KEEPER_2, 6 }, + { CLASS_PICNICKER_2, 5 }, + { CLASS_SUPER_NERD, 6 }, + { CLASS_FISHERMAN_2, 9 }, + { CLASS_TEAM_ROCKET, 8 }, + { CLASS_LASS_2, 4 }, + { CLASS_BEAUTY_2, 18 }, + { CLASS_BLACK_BELT_2, 6 }, + { CLASS_CUE_BALL, 6 }, + { CLASS_CHANNELER, 8 }, + { CLASS_ROCKER, 6 }, + { CLASS_GENTLEMAN_2, 18 }, + { CLASS_BURGLAR, 22 }, + { CLASS_SWIMMER_MALE_2, 1 }, + { CLASS_ENGINEER, 12 }, + { CLASS_JUGGLER, 10 }, + { CLASS_SAILOR_2, 8 }, + { CLASS_COOLTRAINER_2, 9 }, + { CLASS_POKEMANIAC_2, 12 }, + { CLASS_TAMER, 10 }, + { CLASS_CAMPER_2, 5 }, + { CLASS_PSYCHIC_2, 5 }, + { CLASS_BIKER, 5 }, + { CLASS_GAMER, 18 }, + { CLASS_SCIENTIST, 12 }, + { CLASS_CRUSH_GIRL, 6 }, + { CLASS_TUBER_3, 1 }, + { CLASS_PKMN_BREEDER_2, 7 }, + { CLASS_PKMN_RANGER_2, 9 }, + { CLASS_AROMA_LADY_2, 7 }, + { CLASS_RUIN_MANIAC_2, 12 }, + { CLASS_LADY_2, 50 }, + { CLASS_PAINTER, 4 }, + { CLASS_TWINS_2, 3 }, + { CLASS_YOUNG_COUPLE_2, 7 }, + { CLASS_SIS_AND_BRO_2, 1 }, + { CLASS_COOL_COUPLE, 6 }, + { CLASS_CRUSH_KIN, 6 }, + { CLASS_SWIMMER_FEMALE_2, 1 }, + { CLASS_PLAYER, 1 }, + { CLASS_LEADER, 25 }, + { CLASS_ELITE_FOUR, 25 }, + { CLASS_LASS, 4 }, + { CLASS_YOUNGSTER, 4 }, + { CLASS_PKMN_TRAINER_3, 15 }, + { CLASS_HIKER, 10 }, + { CLASS_BEAUTY, 20 }, + { CLASS_FISHERMAN, 10 }, + { CLASS_LADY, 50 }, + { CLASS_TRIATHLETE, 10 }, + { CLASS_TEAM_AQUA, 5 }, + { CLASS_TWINS, 3 }, + { CLASS_SWIMMER_FEMALE, 2 }, + { CLASS_BUG_CATCHER, 4 }, + { CLASS_SCHOOL_KID, 5 }, + { CLASS_RICH_BOY, 50 }, + { CLASS_SR_AND_JR, 4 }, + { CLASS_BLACK_BELT, 8 }, + { CLASS_TUBER, 1 }, + { CLASS_HEX_MANIAC, 6 }, + { CLASS_PKMN_BREEDER, 10 }, + { CLASS_TEAM_MAGMA, 5 }, + { CLASS_INTERVIEWER, 12 }, + { CLASS_TUBER_2, 1 }, + { CLASS_YOUNG_COUPLE, 8 }, + { CLASS_GUITARIST, 8 }, + { CLASS_GENTLEMAN, 20 }, + { CLASS_CHAMPION, 50 }, + { CLASS_MAGMA_LEADER, 20 }, + { CLASS_BATTLE_GIRL, 6 }, + { CLASS_SWIMMER_MALE, 2 }, + { CLASS_POKEFAN, 20 }, + { CLASS_EXPERT, 10 }, + { CLASS_DRAGON_TAMER, 12 }, + { CLASS_BIRD_KEEPER, 8 }, + { CLASS_NINJA_BOY, 3 }, + { CLASS_PARASOL_LADY, 10 }, + { CLASS_BUG_MANIAC, 15 }, + { CLASS_SAILOR, 8 }, + { CLASS_COLLECTOR, 15 }, + { CLASS_PKMN_RANGER, 12 }, + { CLASS_MAGMA_ADMIN, 10 }, + { CLASS_AROMA_LADY, 10 }, + { CLASS_RUIN_MANIAC, 15 }, + { CLASS_COOLTRAINER, 12 }, + { CLASS_POKEMANIAC, 15 }, + { CLASS_KINDLER, 8 }, + { CLASS_CAMPER, 4 }, + { CLASS_PICNICKER, 4 }, + { CLASS_PSYCHIC, 6 }, + { CLASS_SIS_AND_BRO, 3 }, + { CLASS_OLD_COUPLE, 10 }, + { CLASS_AQUA_ADMIN, 10 }, + { CLASS_AQUA_LEADER, 20 }, + { CLASS_BOSS, 25 }, + { 0xFF, 5 }, +}; + +#include "data/text/abilities.h" + +static void (*const sTurnActionsFuncsTable[])(void) = +{ + [B_ACTION_USE_MOVE] = HandleAction_UseMove, + [B_ACTION_USE_ITEM] = HandleAction_UseItem, + [B_ACTION_SWITCH] = HandleAction_Switch, + [B_ACTION_RUN] = HandleAction_Run, + [B_ACTION_SAFARI_WATCH_CAREFULLY] = HandleAction_WatchesCarefully, + [B_ACTION_SAFARI_BALL] = HandleAction_SafariZoneBallThrow, + [B_ACTION_SAFARI_POKEBLOCK] = HandleAction_ThrowPokeblock, + [B_ACTION_SAFARI_GO_NEAR] = HandleAction_GoNear, + [B_ACTION_SAFARI_RUN] = HandleAction_SafariZoneRun, + [B_ACTION_OLDMAN_THROW] = HandleAction_OldManBallThrow, + [B_ACTION_EXEC_SCRIPT] = HandleAction_RunBattleScript, + [B_ACTION_TRY_FINISH] = HandleAction_TryFinish, + [B_ACTION_FINISHED] = HandleAction_ActionFinished, + [B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted, +}; + +static void (*const sEndTurnFuncsTable[])(void) = +{ + [0] = HandleEndTurn_ContinueBattle, //B_OUTCOME_NONE? + [B_OUTCOME_WON] = HandleEndTurn_BattleWon, + [B_OUTCOME_LOST] = HandleEndTurn_BattleLost, + [B_OUTCOME_DREW] = HandleEndTurn_BattleLost, + [B_OUTCOME_RAN] = HandleEndTurn_RanFromBattle, + [B_OUTCOME_PLAYER_TELEPORTED] = HandleEndTurn_FinishBattle, + [B_OUTCOME_MON_FLED] = HandleEndTurn_MonFled, + [B_OUTCOME_CAUGHT] = HandleEndTurn_FinishBattle, + [B_OUTCOME_NO_SAFARI_BALLS] = HandleEndTurn_FinishBattle, +}; + +const u8 gStatusConditionString_PoisonJpn[8] = _("どく$$$$$"); +const u8 gStatusConditionString_SleepJpn[8] = _("ねむり$$$$"); +const u8 gStatusConditionString_ParalysisJpn[8] = _("まひ$$$$$"); +const u8 gStatusConditionString_BurnJpn[8] = _("やけど$$$$"); +const u8 gStatusConditionString_IceJpn[8] = _("こおり$$$$"); +const u8 gStatusConditionString_ConfusionJpn[8] = _("こんらん$$$"); +const u8 gStatusConditionString_LoveJpn[8] = _("メロメロ$$$"); + +const u8 *const gStatusConditionStringsTable[7][2] = +{ + { gStatusConditionString_PoisonJpn, gText_Poison }, + { gStatusConditionString_SleepJpn, gText_Sleep }, + { gStatusConditionString_ParalysisJpn, gText_Paralysis }, + { gStatusConditionString_BurnJpn, gText_Burn }, + { gStatusConditionString_IceJpn, gText_Ice }, + { gStatusConditionString_ConfusionJpn, gText_Confusion }, + { gStatusConditionString_LoveJpn, gText_Love } +}; + +void CB2_InitBattle(void) +{ + MoveSaveBlocks_ResetHeap(); + AllocateBattleResources(); + AllocateBattleSpritesData(); + AllocateMonSpritesGfx(); + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + HandleLinkBattleSetup(); + SetMainCallback2(CB2_PreInitMultiBattle); + gBattleCommunication[MULTIUSE_STATE] = 0; + } + else + { + CB2_InitBattleInternal(); + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + HelpSystem_SetSomeVariable2(0x19); + else + HelpSystem_SetSomeVariable2(0x18); + } + else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) + { + HelpSystem_SetSomeVariable2(0x1A); + } + else + { + HelpSystem_SetSomeVariable2(0x17); + } + } + } +} + +static void CB2_InitBattleInternal(void) +{ + s32 i; + + SetHBlankCallback(NULL); + SetVBlankCallback(NULL); + CpuFill32(0, (void *)VRAM, VRAM_SIZE); + SetGpuReg(REG_OFFSET_MOSAIC, 0); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 0xF0)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(0x50, 0x51)); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + gBattle_WIN0H = WIN_RANGE(0, 0xF0); + gBattle_WIN0V = WIN_RANGE(0x50, 0x51); + ScanlineEffect_Clear(); + for (i = 0; i < 80; ++i) + { + gScanlineEffectRegBuffers[0][i] = 0xF0; + gScanlineEffectRegBuffers[1][i] = 0xF0; + } + for (; i < 160; ++i) + { + gScanlineEffectRegBuffers[0][i] = 0xFF10; + gScanlineEffectRegBuffers[1][i] = 0xFF10; + } + ScanlineEffect_SetParams(sIntroScanlineParams16Bit); + ResetPaletteFade(); + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + gBattle_BG2_X = 0; + gBattle_BG2_Y = 0; + gBattle_BG3_X = 0; + gBattle_BG3_Y = 0; + gBattleTerrain = BattleSetup_GetTerrainId(); + sub_800F34C(); + LoadBattleTextboxAndBackground(); + ResetSpriteData(); + ResetTasks(); + DrawBattleEntryBackground(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 4; + SetVBlankCallback(VBlankCB_Battle); + SetUpBattleVars(); + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + SetMainCallback2(CB2_HandleStartMultiBattle); + else + SetMainCallback2(CB2_HandleStartBattle); + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A); + SetWildMonHeldItem(); + } + gMain.inBattle = TRUE; + for (i = 0; i < PARTY_SIZE; ++i) + AdjustFriendship(&gPlayerParty[i], 3); + gBattleCommunication[MULTIUSE_STATE] = 0; +} + +static void sub_800FFEC(void) +{ + u16 r6 = 0; + u16 species = SPECIES_NONE; + u16 hp = 0; + u32 status = 0; + s32 i; + + for (i = 0; i < PARTY_SIZE; ++i) + { + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r6 |= 1 << i * 2; + if (species == SPECIES_NONE) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r6 |= 2 << i * 2; + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp == 0) + r6 |= 3 << i * 2; + } + gBattleStruct->field_186 = r6; + *(&gBattleStruct->field_187) = r6 >> 8; +} + +static void SetPlayerBerryDataInBattleStruct(void) +{ + s32 i; + struct BattleStruct *battleStruct = gBattleStruct; + struct BattleEnigmaBerry *battleBerry = &battleStruct->battleEnigmaBerry; + + if (IsEnigmaBerryValid() == TRUE) + { + for (i = 0; i < BERRY_NAME_LENGTH; ++i) + battleBerry->name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + battleBerry->name[i] = EOS; + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; ++i) + battleBerry->itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + battleBerry->holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + battleBerry->holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + } + else + { + const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); + + for (i = 0; i < BERRY_NAME_LENGTH; ++i) + battleBerry->name[i] = berryData->name[i]; + battleBerry->name[i] = EOS; + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; ++i) + battleBerry->itemEffect[i] = 0; + battleBerry->holdEffect = HOLD_EFFECT_NONE; + battleBerry->holdEffectParam = 0; + } +} + +static void SetAllPlayersBerryData(void) +{ + s32 i, j; + + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + if (IsEnigmaBerryValid() == TRUE) + { + for (i = 0; i < BERRY_NAME_LENGTH; ++i) + { + gEnigmaBerries[0].name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + gEnigmaBerries[2].name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + } + gEnigmaBerries[0].name[i] = EOS; + gEnigmaBerries[2].name[i] = EOS; + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; ++i) + { + gEnigmaBerries[0].itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + gEnigmaBerries[2].itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + } + gEnigmaBerries[0].holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + gEnigmaBerries[2].holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + gEnigmaBerries[0].holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + gEnigmaBerries[2].holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + } + else + { + const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); + + for (i = 0; i < BERRY_NAME_LENGTH; ++i) + { + gEnigmaBerries[0].name[i] = berryData->name[i]; + gEnigmaBerries[2].name[i] = berryData->name[i]; + } + gEnigmaBerries[0].name[i] = EOS; + gEnigmaBerries[2].name[i] = EOS; + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; ++i) + { + gEnigmaBerries[0].itemEffect[i] = 0; + gEnigmaBerries[2].itemEffect[i] = 0; + } + gEnigmaBerries[0].holdEffect = HOLD_EFFECT_NONE; + gEnigmaBerries[2].holdEffect = HOLD_EFFECT_NONE; + gEnigmaBerries[0].holdEffectParam = 0; + gEnigmaBerries[2].holdEffectParam = 0; + } + } + else + { + s32 numPlayers; + struct BattleEnigmaBerry *src; + u8 battlerId; + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + for (i = 0; i < 4; ++i) + { + src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2); + battlerId = gLinkPlayers[i].id; + for (j = 0; j < BERRY_NAME_LENGTH; ++j) + gEnigmaBerries[battlerId].name[j] = src->name[j]; + gEnigmaBerries[battlerId].name[j] = EOS; + for (j = 0; j < BERRY_ITEM_EFFECT_COUNT; ++j) + gEnigmaBerries[battlerId].itemEffect[j] = src->itemEffect[j]; + gEnigmaBerries[battlerId].holdEffect = src->holdEffect; + gEnigmaBerries[battlerId].holdEffectParam = src->holdEffectParam; + } + } + else + { + for (i = 0; i < 2; ++i) + { + src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2); + for (j = 0; j < BERRY_NAME_LENGTH; ++j) + { + gEnigmaBerries[i].name[j] = src->name[j]; + gEnigmaBerries[i + 2].name[j] = src->name[j]; + } + gEnigmaBerries[i].name[j] = EOS; + gEnigmaBerries[i + 2].name[j] = EOS; + for (j = 0; j < BERRY_ITEM_EFFECT_COUNT; ++j) + { + gEnigmaBerries[i].itemEffect[j] = src->itemEffect[j]; + gEnigmaBerries[i + 2].itemEffect[j] = src->itemEffect[j]; + } + gEnigmaBerries[i].holdEffect = src->holdEffect; + gEnigmaBerries[i + 2].holdEffect = src->holdEffect; + gEnigmaBerries[i].holdEffectParam = src->holdEffectParam; + gEnigmaBerries[i + 2].holdEffectParam = src->holdEffectParam; + } + } + } +} + +static void sub_8010414(u8 arg0, u8 arg1) +{ + u8 var = 0; + + if (gBlockRecvBuffer[0][0] == 256) + { + if (arg1 == 0) + gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + ++var; + } + if (var == 0) + { + s32 i; + + for (i = 0; i < arg0; ++i) + if (gBlockRecvBuffer[0][0] != gBlockRecvBuffer[i][0]) + break; + if (i == arg0) + { + if (arg1 == 0) + gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + ++var; + } + if (var == 0) + { + for (i = 0; i < arg0; ++i) + { + if (gBlockRecvBuffer[i][0] == 0x201) + if (i != arg1 && i < arg1) + break; + if (gBlockRecvBuffer[i][0] > 0x201 && i != arg1) + break; + } + if (i == arg0) + gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + } + } +} + +static void CB2_HandleStartBattle(void) +{ + u8 playerMultiplayerId; + u8 enemyMultiplayerId; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + playerMultiplayerId = GetMultiplayerId(); + gBattleStruct->multiplayerId = playerMultiplayerId; + enemyMultiplayerId = playerMultiplayerId ^ BIT_SIDE; + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + sub_80357C8(); + gBattleCommunication[MULTIUSE_STATE] = 1; + } + if (gWirelessCommType) + LoadWirelessStatusIndicatorSpriteGfx(); + break; + case 1: + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + if (gReceivedRemoteLinkPlayers != 0) + { + if (IsLinkTaskFinished()) + { + *(&gBattleStruct->field_184) = 1; + *(&gBattleStruct->field_185) = 2; + sub_800FFEC(); + SetPlayerBerryDataInBattleStruct(); + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_184, 32); + gBattleCommunication[MULTIUSE_STATE] = 2; + } + if (gWirelessCommType != 0) + CreateWirelessStatusIndicatorSprite(0, 0); + } + } + else + { + gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER; + gBattleCommunication[MULTIUSE_STATE] = 15; + SetAllPlayersBerryData(); + } + break; + case 2: + if ((GetBlockReceivedStatus() & 3) == 3) + { + u8 taskId; + + ResetBlockReceivedFlags(); + sub_8010414(2, playerMultiplayerId); + SetAllPlayersBerryData(); + taskId = CreateTask(sub_800F6FC, 0); + gTasks[taskId].data[1] = 270; + gTasks[taskId].data[2] = 90; + gTasks[taskId].data[5] = 0; + gTasks[taskId].data[3] = gBattleStruct->field_186 | (gBattleStruct->field_187 << 8); + gTasks[taskId].data[4] = gBlockRecvBuffer[enemyMultiplayerId][1]; + SetDeoxysStats(); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 3: + if (IsLinkTaskFinished()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 4: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 7: + if (IsLinkTaskFinished()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 8: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 11: + if (IsLinkTaskFinished()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 12: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty + 4, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); + TryCorrectShedinjaLanguage(&gEnemyParty[1]); + TryCorrectShedinjaLanguage(&gEnemyParty[2]); + TryCorrectShedinjaLanguage(&gEnemyParty[3]); + TryCorrectShedinjaLanguage(&gEnemyParty[4]); + TryCorrectShedinjaLanguage(&gEnemyParty[5]); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 15: + sub_800D30C(); + ++gBattleCommunication[MULTIUSE_STATE]; + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + gBattleCommunication[SPRITES_INIT_STATE2] = 0; + break; + case 16: + if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) + { + gPreBattleCallback1 = gMain.callback1; + gMain.callback1 = BattleMainCB1; + SetMainCallback2(BattleMainCB2); + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleTypeFlags |= BATTLE_TYPE_20; + } + } + break; + case 5: + case 9: + case 13: + ++gBattleCommunication[MULTIUSE_STATE]; + gBattleCommunication[1] = 1; + case 6: + case 10: + case 14: + if (--gBattleCommunication[1] == 0) + ++gBattleCommunication[MULTIUSE_STATE]; + break; + } +} + +static void sub_80108C4(void) +{ + s32 i, j; + u8 *nick, *cur; + + for (i = 0; i < 3; ++i) + { + gUnknown_2022B58[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES); + gUnknown_2022B58[i].heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + nick = gUnknown_2022B58[i].nickname; + GetMonData(&gPlayerParty[i], MON_DATA_NICKNAME, nick); + gUnknown_2022B58[i].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); + gUnknown_2022B58[i].hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + gUnknown_2022B58[i].maxhp = GetMonData(&gPlayerParty[i], MON_DATA_MAX_HP); + gUnknown_2022B58[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + gUnknown_2022B58[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); + gUnknown_2022B58[i].gender = GetMonGender(&gPlayerParty[i]); + StripExtCtrlCodes(nick); + if (GetMonData(&gPlayerParty[i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE) + { + for (cur = nick, j = 0; cur[j] != EOS; ++j) + ; + while (j < 6) + cur[j++] = 0; + cur[j] = EOS; + } + } + memcpy(&gBattleStruct->field_184, gUnknown_2022B58, sizeof(gUnknown_2022B58)); +} + +static void CB2_PreInitMultiBattle(void) +{ + s32 i; + u8 playerMultiplierId; + u8 r4 = 0xF; + u16 *savedBattleTypeFlags; + void (**savedCallback)(void); + + playerMultiplierId = GetMultiplayerId(); + gBattleStruct->multiplayerId = playerMultiplierId; + savedCallback = &gBattleStruct->savedCallback; + savedBattleTypeFlags = &gBattleStruct->savedBattleTypeFlags; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (gReceivedRemoteLinkPlayers != 0 && IsLinkTaskFinished()) + { + sub_80108C4(); + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_184, sizeof(gUnknown_2022B58)); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 1: + if ((GetBlockReceivedStatus() & r4) == r4) + { + ResetBlockReceivedFlags(); + for (i = 0; i < 4; ++i) + { + if (i == playerMultiplierId) + continue; + if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[playerMultiplierId].id & 1)) + || (gLinkPlayers[i].id & 1 && gLinkPlayers[playerMultiplierId].id & 1)) + memcpy(gUnknown_2022B58, gBlockRecvBuffer[i], sizeof(gUnknown_2022B58)); + } + ++gBattleCommunication[MULTIUSE_STATE]; + *savedCallback = gMain.savedCallback; + *savedBattleTypeFlags = gBattleTypeFlags; + gMain.savedCallback = CB2_PreInitMultiBattle; + sub_8128198(); + } + break; + case 2: + if (!gPaletteFade.active) + { + ++gBattleCommunication[MULTIUSE_STATE]; + if (gWirelessCommType) + sub_800AB9C(); + else + sub_800AAC0(); + } + break; + case 3: + if (gWirelessCommType) + { + if (IsLinkRfuTaskFinished()) + { + gBattleTypeFlags = *savedBattleTypeFlags; + gMain.savedCallback = *savedCallback; + SetMainCallback2(CB2_InitBattleInternal); + } + } + else if (gReceivedRemoteLinkPlayers == 0) + { + gBattleTypeFlags = *savedBattleTypeFlags; + gMain.savedCallback = *savedCallback; + SetMainCallback2(CB2_InitBattleInternal); + } + break; + } +} + +static void CB2_HandleStartMultiBattle(void) +{ + u8 playerMultiplayerId; + s32 id; + u8 taskId; + + playerMultiplayerId = GetMultiplayerId(); + gBattleStruct->multiplayerId = playerMultiplayerId; + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + sub_80357C8(); + gBattleCommunication[MULTIUSE_STATE] = 1; + } + if (gWirelessCommType) + LoadWirelessStatusIndicatorSpriteGfx(); + break; + case 1: + if (gReceivedRemoteLinkPlayers != 0) + { + if (IsLinkTaskFinished()) + { + *(&gBattleStruct->field_184) = 1; + *(&gBattleStruct->field_185) = 2; + sub_800FFEC(); + SetPlayerBerryDataInBattleStruct(); + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_184, 32); + ++gBattleCommunication[MULTIUSE_STATE]; + } + if (gWirelessCommType) + CreateWirelessStatusIndicatorSprite(0, 0); + } + break; + case 2: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + sub_8010414(4, playerMultiplayerId); + SetAllPlayersBerryData(); + SetDeoxysStats(); + memcpy(gDecompressionBuffer, gPlayerParty, sizeof(struct Pokemon) * 3); + taskId = CreateTask(sub_800F6FC, 0); + gTasks[taskId].data[1] = 270; + gTasks[taskId].data[2] = 90; + gTasks[taskId].data[5] = 0; + gTasks[taskId].data[3] = 0; + gTasks[taskId].data[4] = 0; + for (id = 0; id < MAX_LINK_PLAYERS; ++id) + { + switch (gLinkPlayers[id].id) + { + case 0: + gTasks[taskId].data[3] |= gBlockRecvBuffer[id][1] & 0x3F; + break; + case 1: + gTasks[taskId].data[4] |= gBlockRecvBuffer[id][1] & 0x3F; + break; + case 2: + gTasks[taskId].data[3] |= (gBlockRecvBuffer[id][1] & 0x3F) << 6; + break; + case 3: + gTasks[taskId].data[4] |= (gBlockRecvBuffer[id][1] & 0x3F) << 6; + break; + } + } + ZeroPlayerPartyMons(); + ZeroEnemyPartyMons(); + ++gBattleCommunication[MULTIUSE_STATE]; + } + else + { + break; + } + // fall through + case 3: + if (IsLinkTaskFinished()) + { + SendBlock(bitmask_all_link_players_but_self(), gDecompressionBuffer, sizeof(struct Pokemon) * 2); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 4: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + for (id = 0; id < MAX_LINK_PLAYERS; ++id) + { + if (id == playerMultiplayerId) + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gPlayerParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + else + { + if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1)) + || ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1))) + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gPlayerParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + else + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gEnemyParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gEnemyParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + } + } + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 7: + if (IsLinkTaskFinished()) + { + SendBlock(bitmask_all_link_players_but_self(), gDecompressionBuffer + sizeof(struct Pokemon) * 2, sizeof(struct Pokemon)); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 8: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + for (id = 0; id < MAX_LINK_PLAYERS; ++id) + { + if (id == playerMultiplayerId) + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gPlayerParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gPlayerParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + else + { + if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1)) + || ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1))) + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gPlayerParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gPlayerParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + else + { + switch (gLinkPlayers[id].id) + { + case 0: + case 3: + memcpy(gEnemyParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gEnemyParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + } + } + TryCorrectShedinjaLanguage(&gPlayerParty[0]); + TryCorrectShedinjaLanguage(&gPlayerParty[1]); + TryCorrectShedinjaLanguage(&gPlayerParty[2]); + TryCorrectShedinjaLanguage(&gPlayerParty[3]); + TryCorrectShedinjaLanguage(&gPlayerParty[4]); + TryCorrectShedinjaLanguage(&gPlayerParty[5]); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); + TryCorrectShedinjaLanguage(&gEnemyParty[1]); + TryCorrectShedinjaLanguage(&gEnemyParty[2]); + TryCorrectShedinjaLanguage(&gEnemyParty[3]); + TryCorrectShedinjaLanguage(&gEnemyParty[4]); + TryCorrectShedinjaLanguage(&gEnemyParty[5]); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 11: + sub_800D30C(); + ++gBattleCommunication[MULTIUSE_STATE]; + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + gBattleCommunication[SPRITES_INIT_STATE2] = 0; + break; + case 12: + if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) + { + gPreBattleCallback1 = gMain.callback1; + gMain.callback1 = BattleMainCB1; + SetMainCallback2(BattleMainCB2); + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + gBattleTypeFlags |= BATTLE_TYPE_20; + } + break; + case 5: + case 9: + ++gBattleCommunication[0]; + gBattleCommunication[SPRITES_INIT_STATE1] = 1; + // fall through + case 6: + case 10: + if (--gBattleCommunication[SPRITES_INIT_STATE1] == 0) + ++gBattleCommunication[0]; + break; + } +} + +void BattleMainCB2(void) +{ + AnimateSprites(); + BuildOamBuffer(); + RunTextPrinters(); + UpdatePaletteFade(); + RunTasks(); + if (JOY_HELD(B_BUTTON) && gBattleTypeFlags & BATTLE_TYPE_POKEDUDE) + { + gSpecialVar_Result = gBattleOutcome = B_OUTCOME_DREW; + ResetPaletteFadeControl(); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + SetMainCallback2(CB2_QuitPokeDudeBattle); + } +} + +void FreeRestoreBattleData(void) +{ + gMain.callback1 = gPreBattleCallback1; + gScanlineEffect.state = 3; + gMain.inBattle = FALSE; + ZeroEnemyPartyMons(); + m4aSongNumStop(SE_HINSI); + FreeMonSpritesGfx(); + FreeBattleSpritesData(); + FreeBattleResources(); +} + +static void CB2_QuitPokeDudeBattle(void) +{ + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + FreeRestoreBattleData(); + FreeAllWindowBuffers(); + SetMainCallback2(gMain.savedCallback); + } +} + +static void sub_80111EC(struct Sprite *sprite) +{ + sprite->data[0] = 0; + sprite->callback = sub_80111FC; +} + +static void sub_80111FC(struct Sprite *sprite) +{ + switch (sprite->data[0]) + { + case 0: + gUnknown_2022BC0 = AllocZeroed(0x1000); + ++sprite->data[0]; + sprite->data[1] = 0; + sprite->data[2] = 0x281; + sprite->data[3] = 0; + sprite->data[4] = 1; + // fall through + case 1: + if (--sprite->data[4] == 0) + { + s32 i, r2, r0; + + sprite->data[4] = 2; + r2 = sprite->data[1] + sprite->data[3] * 32; + r0 = sprite->data[2] - sprite->data[3] * 32; + for (i = 0; i <= 29; i += 2) + { + *(&gUnknown_2022BC0[r2] + i) = 0x3D; + *(&gUnknown_2022BC0[r0] + i) = 0x3D; + } + if (++sprite->data[3] == 21) + { + ++sprite->data[0]; + sprite->data[1] = 32; + } + } + break; + case 2: + if (--sprite->data[1] == 20) + { + if (gUnknown_2022BC0 != NULL) + { + memset(gUnknown_2022BC0, 0, 0x1000); + FREE_AND_SET_NULL(gUnknown_2022BC0); + } + SetMainCallback2(CB2_InitBattle); + } + break; + } +} + +static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum) +{ + u32 nameHash = 0; + u32 personalityValue; + u8 fixedIV; + s32 i, j; + + if (trainerNum == TRAINER_SECRET_BASE) + return 0; + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER + && !(gBattleTypeFlags & (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_TRAINER_TOWER))) + { + ZeroEnemyPartyMons(); + for (i = 0; i < gTrainers[trainerNum].partySize; ++i) + { + + if (gTrainers[trainerNum].doubleBattle == TRUE) + personalityValue = 0x80; + else if (gTrainers[trainerNum].encounterMusic_gender & 0x80) + personalityValue = 0x78; + else + personalityValue = 0x88; + for (j = 0; gTrainers[trainerNum].trainerName[j] != EOS; ++j) + nameHash += gTrainers[trainerNum].trainerName[j]; + switch (gTrainers[trainerNum].partyFlags) + { + case 0: + { + const struct TrainerMonNoItemDefaultMoves *partyData = gTrainers[trainerNum].party.NoItemDefaultMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; ++j) + nameHash += gSpeciesNames[partyData[i].species][j]; + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); + break; + } + case F_TRAINER_PARTY_CUSTOM_MOVESET: + { + const struct TrainerMonNoItemCustomMoves *partyData = gTrainers[trainerNum].party.NoItemCustomMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; ++j) + nameHash += gSpeciesNames[partyData[i].species][j]; + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); + for (j = 0; j < MAX_MON_MOVES; ++j) + { + SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); + SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); + } + break; + } + case F_TRAINER_PARTY_HELD_ITEM: + { + const struct TrainerMonItemDefaultMoves *partyData = gTrainers[trainerNum].party.ItemDefaultMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; ++j) + nameHash += gSpeciesNames[partyData[i].species][j]; + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); + + SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); + break; + } + case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM: + { + const struct TrainerMonItemCustomMoves *partyData = gTrainers[trainerNum].party.ItemCustomMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; ++j) + nameHash += gSpeciesNames[partyData[i].species][j]; + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); + SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); + for (j = 0; j < MAX_MON_MOVES; ++j) + { + SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); + SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); + } + break; + } + } + } + gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; + } + return gTrainers[trainerNum].partySize; +} + +// not used +static void sub_80116CC(void) +{ + if (REG_VCOUNT < 0xA0 && REG_VCOUNT >= 0x6F) + REG_BG0CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(24) | BGCNT_16COLOR | BGCNT_TXT256x512; +} + +void VBlankCB_Battle(void) +{ + // Change gRngSeed every vblank. + Random(); + SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_X); + SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_Y); + SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); + SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); + SetGpuReg(REG_OFFSET_BG2HOFS, gBattle_BG2_X); + SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y); + SetGpuReg(REG_OFFSET_BG3HOFS, gBattle_BG3_X); + SetGpuReg(REG_OFFSET_BG3VOFS, gBattle_BG3_Y); + SetGpuReg(REG_OFFSET_WIN0H, gBattle_WIN0H); + SetGpuReg(REG_OFFSET_WIN0V, gBattle_WIN0V); + SetGpuReg(REG_OFFSET_WIN1H, gBattle_WIN1H); + SetGpuReg(REG_OFFSET_WIN1V, gBattle_WIN1V); + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + ScanlineEffect_InitHBlankDmaTransfer(); +} + +void nullsub_9(struct Sprite *sprite) +{ +} + +static void sub_80117BC(struct Sprite *sprite) +{ + if (sprite->data[0] != 0) + sprite->pos1.x = sprite->data[1] + ((sprite->data[2] & 0xFF00) >> 8); + else + sprite->pos1.x = sprite->data[1] - ((sprite->data[2] & 0xFF00) >> 8); + sprite->data[2] += 0x180; + if (sprite->affineAnimEnded) + { + FreeSpriteTilesByTag(ANIM_SPRITES_START); + FreeSpritePaletteByTag(ANIM_SPRITES_START); + FreeSpriteOamMatrix(sprite); + DestroySprite(sprite); + } +} + +void sub_801182C(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, 1); + sprite->callback = sub_80117BC; + PlaySE(SE_BT_START); +} + +static void sub_801184C(u8 taskId) +{ + struct Pokemon *party1 = NULL; + struct Pokemon *party2 = NULL; + u8 multiplayerId = gBattleStruct->multiplayerId; + u32 r7; + s32 i; + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + switch (gLinkPlayers[multiplayerId].id) + { + case 0: + case 2: + party1 = gPlayerParty; + party2 = gEnemyParty; + break; + case 1: + case 3: + party1 = gEnemyParty; + party2 = gPlayerParty; + break; + } + } + else + { + party1 = gPlayerParty; + party2 = gEnemyParty; + } + r7 = 0; + for (i = 0; i < PARTY_SIZE; ++i) + { + u16 species = GetMonData(&party1[i], MON_DATA_SPECIES2); + u16 hp = GetMonData(&party1[i], MON_DATA_HP); + u32 status = GetMonData(&party1[i], MON_DATA_STATUS); + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r7 |= 1 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r7 |= 2 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp == 0) + r7 |= 3 << i * 2; + } + gTasks[taskId].data[3] = r7; + r7 = 0; + for (i = 0; i < PARTY_SIZE; ++i) + { + u16 species = GetMonData(&party2[i], MON_DATA_SPECIES2); + u16 hp = GetMonData(&party2[i], MON_DATA_HP); + u32 status = GetMonData(&party2[i], MON_DATA_STATUS); + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r7 |= 1 << i * 2; + if (species == SPECIES_NONE) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r7 |= 2 << i * 2; + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp == 0) + r7 |= 3 << i * 2; + } + gTasks[taskId].data[4] = r7; +} + +void sub_8011A1C(void) +{ + s32 i; + u8 taskId; + + SetHBlankCallback(NULL); + SetVBlankCallback(NULL); + CpuFill32(0, (void *)VRAM, VRAM_SIZE); + SetGpuReg(REG_OFFSET_MOSAIC, 0); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 0xF0)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(0x50, 0x51)); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + gBattle_WIN0H = WIN_RANGE(0, 0xF0); + gBattle_WIN0V = WIN_RANGE(0x50, 0x51); + ScanlineEffect_Clear(); + for (i = 0; i < 80; ++i) + { + gScanlineEffectRegBuffers[0][i] = 0xF0; + gScanlineEffectRegBuffers[1][i] = 0xF0; + } + + for (; i < 160; ++i) + { + gScanlineEffectRegBuffers[0][i] = 0xFF10; + gScanlineEffectRegBuffers[1][i] = 0xFF10; + } + ResetPaletteFade(); + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + gBattle_BG2_X = 0; + gBattle_BG2_Y = 0; + gBattle_BG3_X = 0; + gBattle_BG3_Y = 0; + sub_800F34C(); + LoadCompressedPalette(gBattleTextboxPalette, 0, 64); + LoadBattleMenuWindowGfx(); + ResetSpriteData(); + ResetTasks(); + DrawBattleEntryBackground(); + SetGpuReg(REG_OFFSET_WINOUT, WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_OBJ | WININ_WIN0_CLR); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 4; + SetVBlankCallback(VBlankCB_Battle); + taskId = CreateTask(sub_800F6FC, 0); + gTasks[taskId].data[1] = 270; + gTasks[taskId].data[2] = 90; + gTasks[taskId].data[5] = 1; + sub_801184C(taskId); + SetMainCallback2(sub_8011B94); + gBattleCommunication[MULTIUSE_STATE] = 0; +} + +static void sub_8011B94(void) +{ + sub_8011BB0(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); + RunTasks(); +} + +static void sub_8011BB0(void) +{ + s32 i; + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + ShowBg(0); + ShowBg(1); + ShowBg(2); + gBattleCommunication[1] = 0xFF; + ++gBattleCommunication[MULTIUSE_STATE]; + break; + case 1: + if (--gBattleCommunication[1] == 0) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + ++gBattleCommunication[MULTIUSE_STATE]; + } + break; + case 2: + if (!gPaletteFade.active) + { + SetMainCallback2(gMain.savedCallback); + sub_812C224(); + FreeMonSpritesGfx(); + FreeBattleSpritesData(); + FreeBattleResources(); + } + break; + } +} + +u32 sub_8011C44(u8 arrayId, u8 caseId) +{ + u32 ret = 0; + + switch (caseId) + { + case 0: + ret = gBattleBgTemplates[arrayId].bg; + break; + case 1: + ret = gBattleBgTemplates[arrayId].charBaseIndex; + break; + case 2: + ret = gBattleBgTemplates[arrayId].mapBaseIndex; + break; + case 3: + ret = gBattleBgTemplates[arrayId].screenSize; + break; + case 4: + ret = gBattleBgTemplates[arrayId].paletteMode; + break; + case 5: + ret = gBattleBgTemplates[arrayId].priority; + break; + case 6: + ret = gBattleBgTemplates[arrayId].baseTile; + break; + } + return ret; +} + +static void TryCorrectShedinjaLanguage(struct Pokemon *mon) +{ + u8 nickname[POKEMON_NAME_LENGTH + 1]; + u8 language = LANGUAGE_JAPANESE; + + if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA + && GetMonData(mon, MON_DATA_LANGUAGE) != language) + { + GetMonData(mon, MON_DATA_NICKNAME, nickname); + if (StringCompareWithoutExtCtrlCodes(nickname, sText_ShedinjaJpnName) == 0) + SetMonData(mon, MON_DATA_LANGUAGE, &language); + } +} + +#define sBattler data[0] +#define sSpeciesId data[2] + +void SpriteCB_WildMon(struct Sprite *sprite) +{ + sprite->callback = SpriteCB_MoveWildMonToRight; + StartSpriteAnimIfDifferent(sprite, 0); + BeginNormalPaletteFade(0x20000, 0, 10, 10, RGB(8, 8, 8)); +} + +static void SpriteCB_MoveWildMonToRight(struct Sprite *sprite) +{ + if ((gIntroSlideFlags & 1) == 0) + { + sprite->pos2.x += 2; + if (sprite->pos2.x == 0) + { + sprite->callback = SpriteCB_WildMonShowHealthbox; + PlayCry1(sprite->data[2], 25); + } + } +} + +static void SpriteCB_WildMonShowHealthbox(struct Sprite *sprite) +{ + if (sprite->animEnded) + { + sub_804BD94(sprite->sBattler); + SetHealthboxSpriteVisible(gHealthboxSpriteIds[sprite->sBattler]); + sprite->callback = SpriteCallbackDummy2; + StartSpriteAnimIfDifferent(sprite, 0); + BeginNormalPaletteFade(0x20000, 0, 10, 0, RGB(8, 8, 8)); + } +} + +void SpriteCallbackDummy2(struct Sprite *sprite) +{ +} + +// not used +static void sub_8011E28(struct Sprite *sprite) +{ + sprite->data[3] = 6; + sprite->data[4] = 1; + sprite->callback = sub_8011E3C; +} + +// not used +static void sub_8011E3C(struct Sprite *sprite) +{ + --sprite->data[4]; + if (sprite->data[4] == 0) + { + sprite->data[4] = 8; + sprite->invisible ^= 1; + --sprite->data[3]; + if (sprite->data[3] == 0) + { + sprite->invisible = FALSE; + sprite->callback = SpriteCallbackDummy2; + gUnknown_2022AE8[0] = 0; + } + } +} + +void SpriteCB_FaintOpponentMon(struct Sprite *sprite) +{ + u8 battler = sprite->sBattler; + u16 species; + u8 yOffset; + + if (gBattleSpritesDataPtr->battlerData[battler].transformSpecies != 0) + species = gBattleSpritesDataPtr->battlerData[battler].transformSpecies; + else + species = sprite->sSpeciesId; + GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY); // Unused return value. + if (species == SPECIES_UNOWN) + { + u32 personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY); + u16 unownForm = ((((personalityValue & 0x3000000) >> 18) | ((personalityValue & 0x30000) >> 12) | ((personalityValue & 0x300) >> 6) | (personalityValue & 3)) % 0x1C); + u16 unownSpecies; + + if (unownForm == 0) + unownSpecies = SPECIES_UNOWN; // Use the A Unown form. + else + unownSpecies = NUM_SPECIES + unownForm; // Use one of the other Unown letters. + yOffset = gMonFrontPicCoords[unownSpecies].y_offset; + } + else if (species == SPECIES_CASTFORM) + { + yOffset = gCastformFrontSpriteCoords[gBattleMonForms[battler]].y_offset; + } + else if (species > NUM_SPECIES) + { + yOffset = gMonFrontPicCoords[SPECIES_NONE].y_offset; + } + else + { + yOffset = gMonFrontPicCoords[species].y_offset; + } + sprite->data[3] = 8 - yOffset / 8; + sprite->data[4] = 1; + sprite->callback = SpriteCB_AnimFaintOpponent; +} + +static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite) +{ + s32 i; + + if (--sprite->data[4] == 0) + { + sprite->data[4] = 2; + sprite->pos2.y += 8; // Move the sprite down. + if (--sprite->data[3] < 0) + { + FreeSpriteOamMatrix(sprite); + DestroySprite(sprite); + } + else // Erase bottom part of the sprite to create a smooth illusion of mon falling down. + { + u8 *dst = (u8 *)gMonSpritesGfxPtr->sprites[GetBattlerPosition(sprite->sBattler)] + (gBattleMonForms[sprite->sBattler] << 11) + (sprite->data[3] << 8); + + for (i = 0; i < 0x100; ++i) + *(dst++) = 0; + StartSpriteAnim(sprite, gBattleMonForms[sprite->sBattler]); + } + } +} + +void sub_8012044(struct Sprite *sprite) +{ + sprite->data[3] = 8; + sprite->data[4] = sprite->invisible; + sprite->callback = sub_8012060; +} + +static void sub_8012060(struct Sprite *sprite) +{ + --sprite->data[3]; + if (sprite->data[3] == 0) + { + sprite->invisible ^= 1; + sprite->data[3] = 8; + } +} + +void sub_8012098(struct Sprite *sprite) +{ + sprite->invisible = sprite->data[4]; + sprite->data[4] = FALSE; + sprite->callback = SpriteCallbackDummy2; +} + +void sub_80120C4(struct Sprite *sprite) +{ + sprite->callback = oac_poke_ally_; +} + +static void oac_poke_ally_(struct Sprite *sprite) +{ + if (!(gIntroSlideFlags & 1)) + { + sprite->pos2.x -= 2; + if (sprite->pos2.x == 0) + { + sprite->callback = SpriteCallbackDummy3; + sprite->data[1] = 0; + } + } +} + +void sub_8012100(struct Sprite *sprite) +{ + sprite->callback = SpriteCallbackDummy3; +} + +static void SpriteCallbackDummy3(struct Sprite *sprite) +{ +} + +void sub_8012110(struct Sprite *sprite) +{ + if (!(gIntroSlideFlags & 1)) + { + sprite->pos2.x += sprite->data[1]; + sprite->pos2.y += sprite->data[2]; + } +} + +#define sSinIndex data[0] +#define sDelta data[1] +#define sAmplitude data[2] +#define sBouncerSpriteId data[3] +#define sWhich data[4] + +void DoBounceEffect(u8 battler, u8 which, s8 delta, s8 amplitude) +{ + u8 invisibleSpriteId; + u8 bouncerSpriteId; + + switch (which) + { + case BOUNCE_HEALTHBOX: + default: + if (gBattleSpritesDataPtr->healthBoxesData[battler].healthboxIsBouncing) + return; + break; + case BOUNCE_MON: + if (gBattleSpritesDataPtr->healthBoxesData[battler].battlerIsBouncing) + return; + break; + } + invisibleSpriteId = CreateInvisibleSpriteWithCallback(SpriteCB_BounceEffect); + if (which == BOUNCE_HEALTHBOX) + { + bouncerSpriteId = gHealthboxSpriteIds[battler]; + gBattleSpritesDataPtr->healthBoxesData[battler].healthboxBounceSpriteId = invisibleSpriteId; + gBattleSpritesDataPtr->healthBoxesData[battler].healthboxIsBouncing = 1; + gSprites[invisibleSpriteId].sSinIndex = 128; // 0 + } + else + { + bouncerSpriteId = gBattlerSpriteIds[battler]; + gBattleSpritesDataPtr->healthBoxesData[battler].battlerBounceSpriteId = invisibleSpriteId; + gBattleSpritesDataPtr->healthBoxesData[battler].battlerIsBouncing = 1; + gSprites[invisibleSpriteId].sSinIndex = 192; // -1 + } + gSprites[invisibleSpriteId].sDelta = delta; + gSprites[invisibleSpriteId].sAmplitude = amplitude; + gSprites[invisibleSpriteId].sBouncerSpriteId = bouncerSpriteId; + gSprites[invisibleSpriteId].sWhich = which; + gSprites[bouncerSpriteId].pos2.x = 0; + gSprites[bouncerSpriteId].pos2.y = 0; +} + +void EndBounceEffect(u8 battler, u8 which) +{ + u8 bouncerSpriteId; + + if (which == BOUNCE_HEALTHBOX) + { + if (!gBattleSpritesDataPtr->healthBoxesData[battler].healthboxIsBouncing) + return; + + bouncerSpriteId = gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].healthboxBounceSpriteId].sBouncerSpriteId; + DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].healthboxBounceSpriteId]); + gBattleSpritesDataPtr->healthBoxesData[battler].healthboxIsBouncing = 0; + } + else + { + if (!gBattleSpritesDataPtr->healthBoxesData[battler].battlerIsBouncing) + return; + + bouncerSpriteId = gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].battlerBounceSpriteId].sBouncerSpriteId; + DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].battlerBounceSpriteId]); + gBattleSpritesDataPtr->healthBoxesData[battler].battlerIsBouncing = 0; + } + gSprites[bouncerSpriteId].pos2.x = 0; + gSprites[bouncerSpriteId].pos2.y = 0; +} + +static void SpriteCB_BounceEffect(struct Sprite *sprite) +{ + u8 bouncerSpriteId = sprite->sBouncerSpriteId; + s32 index; + + if (sprite->sWhich == BOUNCE_HEALTHBOX) + index = sprite->sSinIndex; + else + index = sprite->sSinIndex; + gSprites[bouncerSpriteId].pos2.y = Sin(index, sprite->sAmplitude) + sprite->sAmplitude; + sprite->sSinIndex = (sprite->sSinIndex + sprite->sDelta) & 0xFF; +} + +void sub_8012354(struct Sprite *sprite) +{ + StartSpriteAnim(sprite, 1); + sprite->callback = sub_8012398; +} + +void sub_801236C(struct Sprite *sprite) +{ + if (sprite->animDelayCounter == 0) + sprite->centerToCornerVecX = gUnknown_824F048[sprite->animCmdIndex]; +} + +static void sub_8012398(struct Sprite *sprite) +{ + sub_801236C(sprite); + if (sprite->animEnded) + sprite->callback = SpriteCallbackDummy3; +} + +void nullsub_12(void) +{ +} + +void BeginBattleIntro(void) +{ + BattleStartClearSetData(); + gBattleCommunication[1] = 0; + gBattleMainFunc = BattleIntroGetMonsData; +} + +static void BattleMainCB1(void) +{ + gBattleMainFunc(); + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + gBattlerControllerFuncs[gActiveBattler](); +} + +static void BattleStartClearSetData(void) +{ + s32 i; + u32 j; + u8 *dataPtr; + + TurnValuesCleanUp(FALSE); + SpecialStatusesClear(); + for (i = 0; i < MAX_BATTLERS_COUNT; ++i) + { + gStatuses3[i] = 0; + dataPtr = (u8 *)&gDisableStructs[i]; + for (j = 0; j < sizeof(struct DisableStruct); ++j) + dataPtr[j] = 0; + gDisableStructs[i].isFirstTurn = 2; + gUnknown_2023DD4[i] = 0; + gLastMoves[i] = MOVE_NONE; + gLastLandedMoves[i] = MOVE_NONE; + gLastHitByType[i] = 0; + gLastResultingMoves[i] = MOVE_NONE; + gLastHitBy[i] = 0xFF; + gLockedMoves[i] = MOVE_NONE; + gLastPrintedMoves[i] = MOVE_NONE; + gBattleResources->flags->flags[i] = 0; + } + for (i = 0; i < 2; ++i) + { + gSideStatuses[i] = 0; + dataPtr = (u8 *)&gSideTimers[i]; + for (j = 0; j < sizeof(struct SideTimer); ++j) + dataPtr[j] = 0; + } + gBattlerAttacker = 0; + gBattlerTarget = 0; + gBattleWeather = 0; + dataPtr = (u8 *)&gWishFutureKnock; + for (i = 0; i < sizeof(struct WishFutureKnock); ++i) + dataPtr[i] = 0; + gHitMarker = 0; + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_POKEDUDE)) && gSaveBlock2Ptr->optionsBattleSceneOff) + gHitMarker |= HITMARKER_NO_ANIMATIONS; + gBattleScripting.battleStyle = gSaveBlock2Ptr->optionsBattleStyle; + gMultiHitCounter = 0; + gBattleOutcome = 0; + gBattleControllerExecFlags = 0; + gPaydayMoney = 0; + gBattleResources->battleScriptsStack->size = 0; + gBattleResources->battleCallbackStack->size = 0; + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; ++i) + gBattleCommunication[i] = 0; + gPauseCounterBattle = 0; + gBattleMoveDamage = 0; + gIntroSlideFlags = 0; + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gLeveledUpInBattle = 0; + gAbsentBattlerFlags = 0; + gBattleStruct->runTries = 0; + gBattleStruct->safariGoNearCounter = 0; + gBattleStruct->safariPkblThrowCounter = 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; + if (gBattleStruct->safariEscapeFactor <= 1) + gBattleStruct->safariEscapeFactor = 2; + gBattleStruct->wildVictorySong = 0; + gBattleStruct->moneyMultiplier = 1; + for (i = 0; i < 8; ++i) + { + *((u8 *)gBattleStruct->lastTakenMove + i) = MOVE_NONE; + *((u8 *)gBattleStruct->usedHeldItems + i) = ITEM_NONE; + *((u8 *)gBattleStruct->choicedMove + i) = MOVE_NONE; + *((u8 *)gBattleStruct->changedItems + i) = ITEM_NONE; + *(i + 0 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(i + 1 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(i + 2 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(i + 3 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + } + *(gBattleStruct->AI_monToSwitchIntoId + 0) = PARTY_SIZE; + *(gBattleStruct->AI_monToSwitchIntoId + 1) = PARTY_SIZE; + *(&gBattleStruct->givenExpMons) = 0; + for (i = 0; i < 11; ++i) + gBattleResults.catchAttempts[i] = 0; + gBattleResults.battleTurnCounter = 0; + gBattleResults.playerFaintCounter = 0; + gBattleResults.opponentFaintCounter = 0; + gBattleResults.playerSwitchesCounter = 0; + gBattleResults.numHealingItemsUsed = 0; + gBattleResults.numRevivesUsed = 0; + gBattleResults.playerMonWasDamaged = FALSE; + gBattleResults.usedMasterBall = FALSE; + gBattleResults.lastOpponentSpecies = SPECIES_NONE; + gBattleResults.lastUsedMovePlayer = MOVE_NONE; + gBattleResults.lastUsedMoveOpponent = MOVE_NONE; + gBattleResults.playerMon1Species = SPECIES_NONE; + gBattleResults.playerMon2Species = SPECIES_NONE; + gBattleResults.caughtMonSpecies = SPECIES_NONE; + for (i = 0; i < POKEMON_NAME_LENGTH; ++i) + { + gBattleResults.playerMon1Name[i] = 0; + gBattleResults.playerMon2Name[i] = 0; + gBattleResults.caughtMonNick[i] = 0; + } +} + +void SwitchInClearSetData(void) +{ + struct DisableStruct disableStructCopy = gDisableStructs[gActiveBattler]; + s32 i; + u8 *ptr; + + if (gBattleMoves[gCurrentMove].effect != EFFECT_BATON_PASS) + { + for (i = 0; i < NUM_BATTLE_STATS; ++i) + gBattleMons[gActiveBattler].statStages[i] = 6; + for (i = 0; i < gBattlersCount; ++i) + { + if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].battlerPreventingEscape == gActiveBattler) + gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION; + if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].battlerWithSureHit == gActiveBattler) + { + gStatuses3[i] &= ~STATUS3_ALWAYS_HITS; + gDisableStructs[i].battlerWithSureHit = 0; + } + } + } + if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) + { + gBattleMons[gActiveBattler].status2 &= (STATUS2_CONFUSION | STATUS2_FOCUS_ENERGY | STATUS2_SUBSTITUTE | STATUS2_ESCAPE_PREVENTION | STATUS2_CURSED); + gStatuses3[gActiveBattler] &= (STATUS3_LEECHSEED_BATTLER | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT); + for (i = 0; i < gBattlersCount; ++i) + { + if (GetBattlerSide(gActiveBattler) != GetBattlerSide(i) + && (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0 + && (gDisableStructs[i].battlerWithSureHit == gActiveBattler)) + { + gStatuses3[i] &= ~(STATUS3_ALWAYS_HITS); + gStatuses3[i] |= 0x10; + } + } + } + else + { + gBattleMons[gActiveBattler].status2 = 0; + gStatuses3[gActiveBattler] = 0; + } + for (i = 0; i < gBattlersCount; ++i) + { + if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBattler)) + gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBattler)); + if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBattler) + gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + } + gActionSelectionCursor[gActiveBattler] = 0; + gMoveSelectionCursor[gActiveBattler] = 0; + ptr = (u8 *)&gDisableStructs[gActiveBattler]; + for (i = 0; i < sizeof(struct DisableStruct); ++i) + ptr[i] = 0; + if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) + { + gDisableStructs[gActiveBattler].substituteHP = disableStructCopy.substituteHP; + gDisableStructs[gActiveBattler].battlerWithSureHit = disableStructCopy.battlerWithSureHit; + gDisableStructs[gActiveBattler].perishSongTimer = disableStructCopy.perishSongTimer; + gDisableStructs[gActiveBattler].perishSongTimerStartValue = disableStructCopy.perishSongTimerStartValue; + gDisableStructs[gActiveBattler].battlerPreventingEscape = disableStructCopy.battlerPreventingEscape; + } + gMoveResultFlags = 0; + gDisableStructs[gActiveBattler].isFirstTurn = 2; + gLastMoves[gActiveBattler] = MOVE_NONE; + gLastLandedMoves[gActiveBattler] = MOVE_NONE; + gLastHitByType[gActiveBattler] = 0; + gLastResultingMoves[gActiveBattler] = MOVE_NONE; + gLastPrintedMoves[gActiveBattler] = MOVE_NONE; + gLastHitBy[gActiveBattler] = 0xFF; + *(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 0) = MOVE_NONE; + *(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 1) = MOVE_NONE; + *(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + for (i = 0; i < gBattlersCount; ++i) + { + if (i != gActiveBattler) + { + *(gBattleStruct->lastTakenMove + i * 2 + 0) = MOVE_NONE; + *(gBattleStruct->lastTakenMove + i * 2 + 1) = MOVE_NONE; + } + *(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + } + *((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = MOVE_NONE; + *((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = MOVE_NONE; + gBattleResources->flags->flags[gActiveBattler] = 0; + gCurrentMove = MOVE_NONE; +} + +void FaintClearSetData(void) +{ + s32 i; + u8 *ptr; + + for (i = 0; i < NUM_BATTLE_STATS; ++i) + gBattleMons[gActiveBattler].statStages[i] = 6; + gBattleMons[gActiveBattler].status2 = 0; + gStatuses3[gActiveBattler] = 0; + for (i = 0; i < gBattlersCount; ++i) + { + if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].battlerPreventingEscape == gActiveBattler) + gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION; + if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBattler)) + gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBattler)); + if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBattler) + gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + } + gActionSelectionCursor[gActiveBattler] = 0; + gMoveSelectionCursor[gActiveBattler] = 0; + ptr = (u8 *)&gDisableStructs[gActiveBattler]; + for (i = 0; i < sizeof(struct DisableStruct); ++i) + ptr[i] = 0; + gProtectStructs[gActiveBattler].protected = FALSE; + gProtectStructs[gActiveBattler].endured = FALSE; + gProtectStructs[gActiveBattler].noValidMoves = FALSE; + gProtectStructs[gActiveBattler].helpingHand = FALSE; + gProtectStructs[gActiveBattler].bounceMove = FALSE; + gProtectStructs[gActiveBattler].stealMove = FALSE; + gProtectStructs[gActiveBattler].flag0Unknown = FALSE; + gProtectStructs[gActiveBattler].prlzImmobility = FALSE; + gProtectStructs[gActiveBattler].confusionSelfDmg = FALSE; + gProtectStructs[gActiveBattler].targetNotAffected = FALSE; + gProtectStructs[gActiveBattler].chargingTurn = FALSE; + gProtectStructs[gActiveBattler].fleeFlag = 0; + gProtectStructs[gActiveBattler].usedImprisonedMove = FALSE; + gProtectStructs[gActiveBattler].loveImmobility = FALSE; + gProtectStructs[gActiveBattler].usedDisabledMove = FALSE; + gProtectStructs[gActiveBattler].usedTauntedMove = FALSE; + gProtectStructs[gActiveBattler].flag2Unknown = FALSE; + gProtectStructs[gActiveBattler].flinchImmobility = FALSE; + gProtectStructs[gActiveBattler].notFirstStrike = FALSE; + gDisableStructs[gActiveBattler].isFirstTurn = 2; + gLastMoves[gActiveBattler] = MOVE_NONE; + gLastLandedMoves[gActiveBattler] = MOVE_NONE; + gLastHitByType[gActiveBattler] = MOVE_NONE; + gLastResultingMoves[gActiveBattler] = MOVE_NONE; + gLastPrintedMoves[gActiveBattler] = MOVE_NONE; + gLastHitBy[gActiveBattler] = 0xFF; + *((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = MOVE_NONE; + *((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = MOVE_NONE; + *(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 0) = MOVE_NONE; + *(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 1) = MOVE_NONE; + *(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + *(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; + for (i = 0; i < gBattlersCount; ++i) + { + if (i != gActiveBattler) + { + *(gBattleStruct->lastTakenMove + i * 2 + 0) = MOVE_NONE; + *(gBattleStruct->lastTakenMove + i * 2 + 1) = MOVE_NONE; + } + *(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0; + *(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; +} + +static void BattleIntroGetMonsData(void) +{ + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + gActiveBattler = gBattleCommunication[1]; + BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0); + MarkBattlerForControllerExec(gActiveBattler); + ++gBattleCommunication[MULTIUSE_STATE]; + break; + case 1: + if (gBattleControllerExecFlags == 0) + { + ++gBattleCommunication[1]; + if (gBattleCommunication[1] == gBattlersCount) + gBattleMainFunc = BattleIntroPrepareBackgroundSlide; + else + gBattleCommunication[MULTIUSE_STATE] = 0; + } + break; + } +} + +static void BattleIntroPrepareBackgroundSlide(void) +{ + if (gBattleControllerExecFlags == 0) + { + gActiveBattler = GetBattlerAtPosition(0); + BtlController_EmitIntroSlide(0, gBattleTerrain); + MarkBattlerForControllerExec(gActiveBattler); + gBattleMainFunc = BattleIntroDrawTrainersOrMonsSprites; + gBattleCommunication[MULTIUSE_STATE] = 0; + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + } +} + +static void BattleIntroDrawTrainersOrMonsSprites(void) +{ + u8 *ptr; + s32 i; + + if (!gBattleControllerExecFlags) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if ((gBattleTypeFlags & BATTLE_TYPE_SAFARI) + && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + { + ptr = (u8 *)&gBattleMons[gActiveBattler]; + for (i = 0; i < sizeof(struct BattlePokemon); ++i) + ptr[i] = 0; + } + else + { + u16 *hpOnSwitchout; + + ptr = (u8 *)&gBattleMons[gActiveBattler]; + 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].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); + hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)]; + *hpOnSwitchout = gBattleMons[gActiveBattler].hp; + for (i = 0; i < NUM_BATTLE_STATS; ++i) + gBattleMons[gActiveBattler].statStages[i] = 6; + gBattleMons[gActiveBattler].status2 = 0; + } + if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT) + { + BtlController_EmitDrawTrainerPic(0); + MarkBattlerForControllerExec(gActiveBattler); + } + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + if (GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_LEFT) + { + BtlController_EmitDrawTrainerPic(0); + MarkBattlerForControllerExec(gActiveBattler); + } + if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_POKEDUDE + | BATTLE_TYPE_LINK + | BATTLE_TYPE_GHOST + | BATTLE_TYPE_OLD_MAN_TUTORIAL + | BATTLE_TYPE_LEGENDARY))) + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality); + } + else + { + if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) + { + if (gBattleTypeFlags & (BATTLE_TYPE_GHOST | BATTLE_TYPE_LEGENDARY)) + { + if ((gBattleTypeFlags & (BATTLE_TYPE_GHOST | BATTLE_TYPE_LEGENDARY)) != BATTLE_TYPE_GHOST) + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality); + } + else if (!(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_POKEDUDE + | BATTLE_TYPE_LINK + | BATTLE_TYPE_GHOST + | BATTLE_TYPE_OLD_MAN_TUTORIAL + | BATTLE_TYPE_LEGENDARY))) + { + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality); + } + BtlController_EmitLoadMonSprite(0); + MarkBattlerForControllerExec(gActiveBattler); + } + } + if (gBattleTypeFlags & BATTLE_TYPE_MULTI + && (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT || GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT)) + { + BtlController_EmitDrawTrainerPic(0); + MarkBattlerForControllerExec(gActiveBattler); + } + } + gBattleMainFunc = BattleIntroDrawPartySummaryScreens; + } +} + +static void BattleIntroDrawPartySummaryScreens(void) +{ + s32 i; + struct HpAndStatus hpStatus[PARTY_SIZE]; + + if (!gBattleControllerExecFlags) + { + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + for (i = 0; i < PARTY_SIZE; ++i) + { + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gEnemyParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS); + } + } + gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + BtlController_EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + MarkBattlerForControllerExec(gActiveBattler); + for (i = 0; i < PARTY_SIZE; ++i) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + } + } + gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + BtlController_EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + MarkBattlerForControllerExec(gActiveBattler); + + gBattleMainFunc = BattleIntroPrintTrainerWantsToBattle; + } + else + { + // The struct gets set here, but nothing is ever done with it since + // wild battles don't show the party summary. + // Still, there's no point in having dead code. + for (i = 0; i < PARTY_SIZE; ++i) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + } + } + gBattleMainFunc = BattleIntroPrintWildMonAttacked; + } + } +} + +static void BattleIntroPrintTrainerWantsToBattle(void) +{ + if (!gBattleControllerExecFlags) + { + gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + PrepareStringBattle(STRINGID_INTROMSG, gActiveBattler); + gBattleMainFunc = BattleIntroPrintOpponentSendsOut; + } +} + +static void BattleIntroPrintWildMonAttacked(void) +{ + if (!gBattleControllerExecFlags) + { + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; + PrepareStringBattle(STRINGID_INTROMSG, 0); + if ((gBattleTypeFlags & (BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_GHOST)) == (BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_GHOST)) + { + gBattleScripting.battler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + BattleScriptExecute(gUnknown_81D91A1); + } + } +} + +static void BattleIntroPrintOpponentSendsOut(void) +{ + if (!gBattleControllerExecFlags) + { + PrepareStringBattle(STRINGID_INTROSENDOUT, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)); + gBattleMainFunc = BattleIntroOpponentSendsOutMonAnimation; + } +} + +static void BattleIntroOpponentSendsOutMonAnimation(void) +{ + if (!gBattleControllerExecFlags) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_LEFT) + { + BtlController_EmitIntroTrainerBallThrow(0); + MarkBattlerForControllerExec(gActiveBattler); + } + if (gBattleTypeFlags & BATTLE_TYPE_MULTI && GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT) + { + BtlController_EmitIntroTrainerBallThrow(0); + MarkBattlerForControllerExec(gActiveBattler); + } + } + gBattleMainFunc = BattleIntroRecordMonsToDex; + } +} + +static void BattleIntroRecordMonsToDex(void) +{ + if (!gBattleControllerExecFlags) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_POKEDUDE + | BATTLE_TYPE_LINK + | BATTLE_TYPE_GHOST + | BATTLE_TYPE_OLD_MAN_TUTORIAL + | BATTLE_TYPE_LEGENDARY))) + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality); + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; + } +} + +// not used +static void sub_80136C4(void) +{ + if (!gBattleControllerExecFlags) + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; +} + +void BattleIntroPrintPlayerSendsOut(void) +{ + if (!gBattleControllerExecFlags) + { + if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) + PrepareStringBattle(STRINGID_INTROSENDOUT, GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)); + gBattleMainFunc = BattleIntroPlayerSendsOutMonAnimation; + } +} + +static void BattleIntroPlayerSendsOutMonAnimation(void) +{ + u32 position; + + if (!gBattleControllerExecFlags) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT) + { + BtlController_EmitIntroTrainerBallThrow(0); + MarkBattlerForControllerExec(gActiveBattler); + } + if (gBattleTypeFlags & BATTLE_TYPE_MULTI && GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT) + { + BtlController_EmitIntroTrainerBallThrow(0); + MarkBattlerForControllerExec(gActiveBattler); + } + } + gBattleStruct->switchInAbilitiesCounter = 0; + gBattleStruct->switchInItemsCounter = 0; + gBattleStruct->overworldWeatherDone = FALSE; + gBattleMainFunc = TryDoEventsBeforeFirstTurn; + } +} + +// not used +static void sub_80137D0(void) +{ + if (!gBattleControllerExecFlags) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + { + BtlController_EmitSwitchInAnim(0, gBattlerPartyIndexes[gActiveBattler], FALSE); + MarkBattlerForControllerExec(gActiveBattler); + } + } + gBattleStruct->switchInAbilitiesCounter = 0; + gBattleStruct->switchInItemsCounter = 0; + gBattleStruct->overworldWeatherDone = FALSE; + gBattleMainFunc = TryDoEventsBeforeFirstTurn; + } +} + +static void TryDoEventsBeforeFirstTurn(void) +{ + s32 i, j; + u8 effect = 0; + + if (!gBattleControllerExecFlags) + { + + if (gBattleStruct->switchInAbilitiesCounter == 0) + { + for (i = 0; i < gBattlersCount; ++i) + gBattlerByTurnOrder[i] = i; + for (i = 0; i < gBattlersCount - 1; ++i) + for (j = i + 1; j < gBattlersCount; ++j) + if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], TRUE) != 0) + SwapTurnOrder(i, j); + } + if (!gBattleStruct->overworldWeatherDone + && AbilityBattleEffects(0, 0, 0, ABILITYEFFECT_SWITCH_IN_WEATHER, 0) != 0) + { + gBattleStruct->overworldWeatherDone = TRUE; + return; + } + // Check all switch in abilities happening from the fastest mon to slowest. + while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount) + { + if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerByTurnOrder[gBattleStruct->switchInAbilitiesCounter], 0, 0, 0) != 0) + ++effect; + ++gBattleStruct->switchInAbilitiesCounter; + if (effect) + return; + } + if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) != 0) + return; + if (AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) != 0) + return; + // Check all switch in items having effect from the fastest mon to slowest. + while (gBattleStruct->switchInItemsCounter < gBattlersCount) + { + if (ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gBattlerByTurnOrder[gBattleStruct->switchInItemsCounter], FALSE)) + ++effect; + ++gBattleStruct->switchInItemsCounter; + if (effect) + return; + } + for (i = 0; i < gBattlersCount; ++i) // pointless, ruby leftover + ; + for (i = 0; i < MAX_BATTLERS_COUNT; ++i) + { + *(gBattleStruct->monToSwitchIntoId + i) = PARTY_SIZE; + gChosenActionByBattler[i] = B_ACTION_NONE; + gChosenMoveByBattler[i] = MOVE_NONE; + } + TurnValuesCleanUp(FALSE); + SpecialStatusesClear(); + *(&gBattleStruct->field_91) = gAbsentBattlerFlags; + gBattleMainFunc = HandleTurnActionSelectionState; + ResetSentPokesToOpponentValue(); + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; ++i) + gBattleCommunication[i] = 0; + for (i = 0; i < gBattlersCount; ++i) + gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + *(&gBattleStruct->turnEffectsTracker) = 0; + *(&gBattleStruct->turnEffectsBattlerId) = 0; + *(&gBattleStruct->wishPerishSongState) = 0; + *(&gBattleStruct->wishPerishSongBattlerId) = 0; + gBattleScripting.atk49_state = 0; + gBattleStruct->faintedActionsState = 0; + gBattleStruct->turnCountersTracker = 0; + gMoveResultFlags = 0; + gRandomTurnNumber = Random(); + } +} + +static void HandleEndTurn_ContinueBattle(void) +{ + s32 i; + + if (!gBattleControllerExecFlags) + { + gBattleMainFunc = BattleTurnPassed; + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; ++i) + gBattleCommunication[i] = 0; + for (i = 0; i < gBattlersCount; ++i) + { + gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + if ((gBattleMons[i].status1 & STATUS1_SLEEP) && (gBattleMons[i].status2 & STATUS2_MULTIPLETURNS)) + CancelMultiTurnMoves(i); + } + gBattleStruct->turnEffectsTracker = 0; + gBattleStruct->turnEffectsBattlerId = 0; + gBattleStruct->wishPerishSongState = 0; + gBattleStruct->wishPerishSongBattlerId = 0; + gBattleStruct->turnCountersTracker = 0; + gMoveResultFlags = 0; + } +} + +void BattleTurnPassed(void) +{ + s32 i; + + TurnValuesCleanUp(TRUE); + if (gBattleOutcome == 0) + { + if (DoFieldEndTurnEffects()) + return; + if (DoBattlerEndTurnEffects()) + return; + } + if (HandleFaintedMonActions()) + return; + gBattleStruct->faintedActionsState = 0; + if (HandleWishPerishSongOnTurnEnd()) + return; + TurnValuesCleanUp(FALSE); + gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); + gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); + gHitMarker &= ~(HITMARKER_x400000); + gHitMarker &= ~(HITMARKER_x100000); + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gBattleScripting.atk49_state = 0; + gBattleMoveDamage = 0; + gMoveResultFlags = 0; + for (i = 0; i < 5; ++i) + gBattleCommunication[i] = 0; + if (gBattleOutcome != 0) + { + gCurrentActionFuncId = B_ACTION_FINISHED; + gBattleMainFunc = RunTurnActionsFunctions; + return; + } + if (gBattleResults.battleTurnCounter < 0xFF) + ++gBattleResults.battleTurnCounter; + for (i = 0; i < gBattlersCount; ++i) + { + gChosenActionByBattler[i] = B_ACTION_NONE; + gChosenMoveByBattler[i] = MOVE_NONE; + } + for (i = 0; i < MAX_BATTLERS_COUNT; ++i) + *(gBattleStruct->monToSwitchIntoId + i) = PARTY_SIZE; + *(&gBattleStruct->field_91) = gAbsentBattlerFlags; + gBattleMainFunc = HandleTurnActionSelectionState; + gRandomTurnNumber = Random(); +} + +u8 IsRunningFromBattleImpossible(void) +{ + u8 holdEffect; + u8 side; + s32 i; + + if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[gActiveBattler].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item); + gPotentialItemEffectBattler = gActiveBattler; + if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN + || (gBattleTypeFlags & BATTLE_TYPE_LINK) + || gBattleMons[gActiveBattler].ability == ABILITY_RUN_AWAY) + return BATTLE_RUN_SUCCESS; + side = GetBattlerSide(gActiveBattler); + for (i = 0; i < gBattlersCount; ++i) + { + if (side != GetBattlerSide(i) + && gBattleMons[i].ability == ABILITY_SHADOW_TAG) + { + gBattleScripting.battler = i; + gLastUsedAbility = gBattleMons[i].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return BATTLE_RUN_FAILURE; + } + if (side != GetBattlerSide(i) + && gBattleMons[gActiveBattler].ability != ABILITY_LEVITATE + && !IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_FLYING) + && gBattleMons[i].ability == ABILITY_ARENA_TRAP) + { + gBattleScripting.battler = i; + gLastUsedAbility = gBattleMons[i].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return BATTLE_RUN_FAILURE; + } + } + i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER, gActiveBattler, ABILITY_MAGNET_PULL, 0, 0); + if (i != 0 && IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL)) + { + gBattleScripting.battler = i - 1; + gLastUsedAbility = gBattleMons[i - 1].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return BATTLE_RUN_FAILURE; + } + if ((gBattleMons[gActiveBattler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)) + || (gStatuses3[gActiveBattler] & STATUS3_ROOTED)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + return BATTLE_RUN_FORBIDDEN; + } + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + return BATTLE_RUN_FORBIDDEN; + } + return BATTLE_RUN_SUCCESS; +} + +void sub_8013F6C(u8 battler) +{ + s32 i; + u8 r4, r1; + + for (i = 0; i < 3; ++i) + gUnknown_203B0DC[i] = *(battler * 3 + i + (u8 *)(gBattleStruct->field_60)); + r4 = pokemon_order_func(gBattlerPartyIndexes[battler]); + r1 = pokemon_order_func(*(gBattleStruct->monToSwitchIntoId + battler)); + sub_8127FF4(r4, r1); + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + for (i = 0; i < 3; ++i) + { + *(battler * 3 + i + (u8 *)(gBattleStruct->field_60)) = gUnknown_203B0DC[i]; + *(BATTLE_PARTNER(battler) * 3 + i + (u8 *)(gBattleStruct->field_60)) = gUnknown_203B0DC[i]; + } + } + else + { + for (i = 0; i < 3; ++i) + *(battler * 3 + i + (u8 *)(gBattleStruct->field_60)) = gUnknown_203B0DC[i]; + } +} + +enum +{ + STATE_BEFORE_ACTION_CHOSEN, + STATE_WAIT_ACTION_CHOSEN, + STATE_WAIT_ACTION_CASE_CHOSEN, + STATE_WAIT_ACTION_CONFIRMED_STANDBY, + STATE_WAIT_ACTION_CONFIRMED, + STATE_SELECTION_SCRIPT, + STATE_WAIT_SET_BEFORE_ACTION, +}; + +static void HandleTurnActionSelectionState(void) +{ + s32 i; + + gBattleCommunication[ACTIONS_CONFIRMED_COUNT] = 0; + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + u8 position = GetBattlerPosition(gActiveBattler); + + switch (gBattleCommunication[gActiveBattler]) + { + case STATE_BEFORE_ACTION_CHOSEN: // Choose an action. + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; + if (gBattleTypeFlags & BATTLE_TYPE_MULTI + || (position & BIT_FLANK) == B_FLANK_LEFT + || gBattleStruct->field_91 & gBitTable[GetBattlerAtPosition(BATTLE_PARTNER(position))] + || gBattleCommunication[GetBattlerAtPosition(BATTLE_PARTNER(position))] == STATE_WAIT_ACTION_CONFIRMED) + { + if (gBattleStruct->field_91 & gBitTable[gActiveBattler]) + { + gChosenActionByBattler[gActiveBattler] = B_ACTION_NOTHING_FAINTED; + if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + gBattleCommunication[gActiveBattler] = STATE_WAIT_ACTION_CONFIRMED; + else + gBattleCommunication[gActiveBattler] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; + } + else + { + if (gBattleMons[gActiveBattler].status2 & STATUS2_MULTIPLETURNS + || gBattleMons[gActiveBattler].status2 & STATUS2_RECHARGE) + { + gChosenActionByBattler[gActiveBattler] = B_ACTION_USE_MOVE; + gBattleCommunication[gActiveBattler] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; + } + else + { + BtlController_EmitChooseAction(0, gChosenActionByBattler[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8)); + MarkBattlerForControllerExec(gActiveBattler); + ++gBattleCommunication[gActiveBattler]; + } + } + } + break; + case STATE_WAIT_ACTION_CHOSEN: // Try to perform an action. + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + { + gChosenActionByBattler[gActiveBattler] = gBattleBufferB[gActiveBattler][1]; + switch (gBattleBufferB[gActiveBattler][1]) + { + case B_ACTION_USE_MOVE: + if (AreAllMovesUnusable()) + { + gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_WAIT_ACTION_CONFIRMED_STANDBY; + *(gBattleStruct->moveTarget + gActiveBattler) = gBattleBufferB[gActiveBattler][3]; + return; + } + else if (gDisableStructs[gActiveBattler].encoredMove != MOVE_NONE) + { + gChosenMoveByBattler[gActiveBattler] = gDisableStructs[gActiveBattler].encoredMove; + *(gBattleStruct->chosenMovePositions + gActiveBattler) = gDisableStructs[gActiveBattler].encoredMovePos; + gBattleCommunication[gActiveBattler] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; + return; + } + else + { + struct ChooseMoveStruct moveInfo; + + moveInfo.species = gBattleMons[gActiveBattler].species; + moveInfo.monType1 = gBattleMons[gActiveBattler].type1; + moveInfo.monType2 = gBattleMons[gActiveBattler].type2; + for (i = 0; i < MAX_MON_MOVES; ++i) + { + moveInfo.moves[i] = gBattleMons[gActiveBattler].moves[i]; + moveInfo.currentPp[i] = gBattleMons[gActiveBattler].pp[i]; + moveInfo.maxPp[i] = CalculatePPWithBonus(gBattleMons[gActiveBattler].moves[i], + gBattleMons[gActiveBattler].ppBonuses, + i); + } + BtlController_EmitChooseMove(0, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo); + MarkBattlerForControllerExec(gActiveBattler); + } + break; + case B_ACTION_USE_ITEM: + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER)) + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed; + gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_BEFORE_ACTION_CHOSEN; + return; + } + else + { + BtlController_EmitChooseItem(0, gBattleStruct->field_60[gActiveBattler]); + MarkBattlerForControllerExec(gActiveBattler); + } + break; + case B_ACTION_SWITCH: + *(gBattleStruct->field_58 + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; + if (gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION) || gStatuses3[gActiveBattler] & STATUS3_ROOTED) + { + BtlController_EmitChoosePokemon(0, PARTY_CANT_SWITCH, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + } + else if ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_SHADOW_TAG)) + || ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_ARENA_TRAP)) + && !IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_FLYING) + && gBattleMons[gActiveBattler].ability != ABILITY_LEVITATE) + || ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER, gActiveBattler, ABILITY_MAGNET_PULL, 0, 0)) + && IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL))) + { + BtlController_EmitChoosePokemon(0, ((i - 1) << 4) | PARTY_ABILITY_PREVENTS, 6, gLastUsedAbility, gBattleStruct->field_60[gActiveBattler]); + } + else + { + if (gActiveBattler == 2 && gChosenActionByBattler[0] == B_ACTION_SWITCH) + BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + else if (gActiveBattler == 3 && gChosenActionByBattler[1] == B_ACTION_SWITCH) + BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + else + BtlController_EmitChoosePokemon(0, PARTY_CHOOSE_MON, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + } + MarkBattlerForControllerExec(gActiveBattler); + break; + case B_ACTION_SAFARI_BALL: + if (IsPlayerPartyAndPokemonStorageFull()) + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_PrintFullBox; + gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_BEFORE_ACTION_CHOSEN; + return; + } + break; + case B_ACTION_CANCEL_PARTNER: + gBattleCommunication[gActiveBattler] = STATE_WAIT_SET_BEFORE_ACTION; + gBattleCommunication[GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler)))] = STATE_BEFORE_ACTION_CHOSEN; + BtlController_EmitEndBounceEffect(0); + MarkBattlerForControllerExec(gActiveBattler); + return; + } + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER + && !(gBattleTypeFlags & BATTLE_TYPE_LINK) + && gBattleBufferB[gActiveBattler][1] == B_ACTION_RUN) + { + BattleScriptExecute(BattleScript_PrintCantRunFromTrainer); + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; + } + else if (IsRunningFromBattleImpossible() != BATTLE_RUN_SUCCESS + && gBattleBufferB[gActiveBattler][1] == B_ACTION_RUN) + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_PrintCantEscapeFromBattle; + gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_BEFORE_ACTION_CHOSEN; + return; + } + else + { + ++gBattleCommunication[gActiveBattler]; + } + } + break; + case STATE_WAIT_ACTION_CASE_CHOSEN: + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + { + switch (gChosenActionByBattler[gActiveBattler]) + { + case B_ACTION_USE_MOVE: + switch (gBattleBufferB[gActiveBattler][1]) + { + case 3 ... 9: + gChosenActionByBattler[gActiveBattler] = gBattleBufferB[gActiveBattler][1]; + return; + default: + if ((gBattleBufferB[gActiveBattler][2] | (gBattleBufferB[gActiveBattler][3] << 8)) == 0xFFFF) + { + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; + } + else if (TrySetCantSelectMoveBattleScript()) + { + gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; + gBattleBufferB[gActiveBattler][1] = 0; + *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_WAIT_ACTION_CHOSEN; + return; + } + else + { + *(gBattleStruct->chosenMovePositions + gActiveBattler) = gBattleBufferB[gActiveBattler][2]; + gChosenMoveByBattler[gActiveBattler] = gBattleMons[gActiveBattler].moves[*(gBattleStruct->chosenMovePositions + gActiveBattler)]; + *(gBattleStruct->moveTarget + gActiveBattler) = gBattleBufferB[gActiveBattler][3]; + ++gBattleCommunication[gActiveBattler]; + } + break; + } + break; + case B_ACTION_USE_ITEM: + if ((gBattleBufferB[gActiveBattler][1] | (gBattleBufferB[gActiveBattler][2] << 8)) == 0) + { + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; + } + else + { + gLastUsedItem = (gBattleBufferB[gActiveBattler][1] | (gBattleBufferB[gActiveBattler][2] << 8)); + ++gBattleCommunication[gActiveBattler]; + } + break; + case B_ACTION_SWITCH: + if (gBattleBufferB[gActiveBattler][1] == PARTY_SIZE) + { + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; + } + else + { + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = gBattleBufferB[gActiveBattler][1]; + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + *(gActiveBattler * 3 + (u8 *)(gBattleStruct->field_60) + 0) &= 0xF; + *(gActiveBattler * 3 + (u8 *)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0); + *(gActiveBattler * 3 + (u8 *)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBattler][3]; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->field_60) + 0) &= (0xF0); + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBattler][3]; + } + ++gBattleCommunication[gActiveBattler]; + } + break; + case B_ACTION_RUN: + gHitMarker |= HITMARKER_RUN; + ++gBattleCommunication[gActiveBattler]; + break; + case B_ACTION_SAFARI_WATCH_CAREFULLY: + ++gBattleCommunication[gActiveBattler]; + break; + case B_ACTION_SAFARI_BALL: + ++gBattleCommunication[gActiveBattler]; + break; + case B_ACTION_SAFARI_POKEBLOCK: + case B_ACTION_SAFARI_GO_NEAR: + ++gBattleCommunication[gActiveBattler]; + break; + case B_ACTION_SAFARI_RUN: + gHitMarker |= HITMARKER_RUN; + ++gBattleCommunication[gActiveBattler]; + break; + case B_ACTION_OLDMAN_THROW: + ++gBattleCommunication[gActiveBattler]; + break; + } + } + break; + case STATE_WAIT_ACTION_CONFIRMED_STANDBY: + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + { + if (((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_DOUBLE)) != BATTLE_TYPE_DOUBLE) + || (position & BIT_FLANK) != B_FLANK_LEFT + || (*(&gBattleStruct->field_91) & gBitTable[GetBattlerAtPosition(position ^ BIT_FLANK)])) + BtlController_EmitLinkStandbyMsg(0, 0); + else + BtlController_EmitLinkStandbyMsg(0, 1); + MarkBattlerForControllerExec(gActiveBattler); + ++gBattleCommunication[gActiveBattler]; + } + break; + case STATE_WAIT_ACTION_CONFIRMED: + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + ++gBattleCommunication[ACTIONS_CONFIRMED_COUNT]; + break; + case STATE_SELECTION_SCRIPT: + if (*(gBattleStruct->selectionScriptFinished + gActiveBattler)) + { + gBattleCommunication[gActiveBattler] = *(gBattleStruct->stateIdAfterSelScript + gActiveBattler); + } + else + { + gBattlerAttacker = gActiveBattler; + gBattlescriptCurrInstr = gSelectionBattleScripts[gActiveBattler]; + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + gSelectionBattleScripts[gActiveBattler] = gBattlescriptCurrInstr; + } + break; + case STATE_WAIT_SET_BEFORE_ACTION: + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF0000000) | (gBitTable[gActiveBattler] << 4) | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 0xC)))) + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; + break; + } + } + // Check if everyone chose actions. + if (gBattleCommunication[ACTIONS_CONFIRMED_COUNT] == gBattlersCount) + gBattleMainFunc = SetActionsAndBattlersTurnOrder; +} + +void SwapTurnOrder(u8 id1, u8 id2) +{ + u32 temp; + + SWAP(gActionsByTurnOrder[id1], gActionsByTurnOrder[id2], temp); + SWAP(gBattlerByTurnOrder[id1], gBattlerByTurnOrder[id2], temp); +} + +u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) +{ + u8 strikesFirst = 0; + u8 speedMultiplierBattler1 = 0, speedMultiplierBattler2 = 0; + u32 speedBattler1 = 0, speedBattler2 = 0; + u8 holdEffect = 0; + u8 holdEffectParam = 0; + u16 moveBattler1 = 0, moveBattler2 = 0; + + if (WEATHER_HAS_EFFECT) + { + if ((gBattleMons[battler1].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) + || (gBattleMons[battler1].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + speedMultiplierBattler1 = 2; + else + speedMultiplierBattler1 = 1; + if ((gBattleMons[battler2].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) + || (gBattleMons[battler2].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + speedMultiplierBattler2 = 2; + else + speedMultiplierBattler2 = 1; + } + else + { + speedMultiplierBattler1 = 1; + speedMultiplierBattler2 = 1; + } + speedBattler1 = (gBattleMons[battler1].speed * speedMultiplierBattler1) + * (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][0]) + / (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][1]); + if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[battler1].holdEffect; + holdEffectParam = gEnigmaBerries[battler1].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[battler1].item); + holdEffectParam = ItemId_GetHoldEffectParam(gBattleMons[battler1].item); + } + // badge boost + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) + && FlagGet(FLAG_BADGE03_GET) + && GetBattlerSide(battler1) == B_SIDE_PLAYER) + speedBattler1 = (speedBattler1 * 110) / 100; + if (holdEffect == HOLD_EFFECT_MACHO_BRACE) + speedBattler1 /= 2; + if (gBattleMons[battler1].status1 & STATUS1_PARALYSIS) + speedBattler1 /= 4; + if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100) + speedBattler1 = UINT_MAX; + // check second battlerId's speed + speedBattler2 = (gBattleMons[battler2].speed * speedMultiplierBattler2) + * (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][0]) + / (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][1]); + if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[battler2].holdEffect; + holdEffectParam = gEnigmaBerries[battler2].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[battler2].item); + holdEffectParam = ItemId_GetHoldEffectParam(gBattleMons[battler2].item); + } + // badge boost + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) + && FlagGet(FLAG_BADGE03_GET) + && GetBattlerSide(battler2) == B_SIDE_PLAYER) + speedBattler2 = (speedBattler2 * 110) / 100; + if (holdEffect == HOLD_EFFECT_MACHO_BRACE) + speedBattler2 /= 2; + if (gBattleMons[battler2].status1 & STATUS1_PARALYSIS) + speedBattler2 /= 4; + if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100) + speedBattler2 = UINT_MAX; + if (ignoreChosenMoves) + { + moveBattler1 = MOVE_NONE; + moveBattler2 = MOVE_NONE; + } + else + { + if (gChosenActionByBattler[battler1] == B_ACTION_USE_MOVE) + { + if (gProtectStructs[battler1].noValidMoves) + moveBattler1 = MOVE_STRUGGLE; + else + moveBattler1 = gBattleMons[battler1].moves[*(gBattleStruct->chosenMovePositions + battler1)]; + } + else + moveBattler1 = MOVE_NONE; + if (gChosenActionByBattler[battler2] == B_ACTION_USE_MOVE) + { + if (gProtectStructs[battler2].noValidMoves) + moveBattler2 = MOVE_STRUGGLE; + else + moveBattler2 = gBattleMons[battler2].moves[*(gBattleStruct->chosenMovePositions + battler2)]; + } + else + moveBattler2 = MOVE_NONE; + } + // both move priorities are different than 0 + if (gBattleMoves[moveBattler1].priority != 0 || gBattleMoves[moveBattler2].priority != 0) + { + // both priorities are the same + if (gBattleMoves[moveBattler1].priority == gBattleMoves[moveBattler2].priority) + { + if (speedBattler1 == speedBattler2 && Random() & 1) + strikesFirst = 2; // same speeds, same priorities + else if (speedBattler1 < speedBattler2) + strikesFirst = 1; // battler2 has more speed + // else battler1 has more speed + } + else if (gBattleMoves[moveBattler1].priority < gBattleMoves[moveBattler2].priority) + strikesFirst = 1; // battler2's move has greater priority + // else battler1's move has greater priority + } + // both priorities are equal to 0 + else + { + if (speedBattler1 == speedBattler2 && Random() & 1) + strikesFirst = 2; // same speeds, same priorities + else if (speedBattler1 < speedBattler2) + strikesFirst = 1; // battler2 has more speed + // else battler1 has more speed + } + return strikesFirst; +} + +static void SetActionsAndBattlersTurnOrder(void) +{ + s32 turnOrderId = 0; + s32 i, j; + + if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler]; + gBattlerByTurnOrder[turnOrderId] = gActiveBattler; + ++turnOrderId; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (gChosenActionByBattler[gActiveBattler] == B_ACTION_RUN) + { + turnOrderId = 5; + break; + } + } + } + else if (gChosenActionByBattler[0] == B_ACTION_RUN) + { + gActiveBattler = 0; + turnOrderId = 5; + } + if (turnOrderId == 5) // One of battlers wants to run. + { + gActionsByTurnOrder[0] = gChosenActionByBattler[gActiveBattler]; + gBattlerByTurnOrder[0] = gActiveBattler; + turnOrderId = 1; + for (i = 0; i < gBattlersCount; ++i) + { + if (i != gActiveBattler) + { + gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[i]; + gBattlerByTurnOrder[turnOrderId] = i; + ++turnOrderId; + } + } + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleStruct->focusPunchBattlerId = 0; + return; + } + else + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_ITEM || gChosenActionByBattler[gActiveBattler] == B_ACTION_SWITCH) + { + gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler]; + gBattlerByTurnOrder[turnOrderId] = gActiveBattler; + ++turnOrderId; + } + } + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (gChosenActionByBattler[gActiveBattler] != B_ACTION_USE_ITEM && gChosenActionByBattler[gActiveBattler] != B_ACTION_SWITCH) + { + gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler]; + gBattlerByTurnOrder[turnOrderId] = gActiveBattler; + ++turnOrderId; + } + } + for (i = 0; i < gBattlersCount - 1; ++i) + { + for (j = i + 1; j < gBattlersCount; ++j) + { + u8 battler1 = gBattlerByTurnOrder[i]; + u8 battler2 = gBattlerByTurnOrder[j]; + + if (gActionsByTurnOrder[i] != B_ACTION_USE_ITEM + && gActionsByTurnOrder[j] != B_ACTION_USE_ITEM + && gActionsByTurnOrder[i] != B_ACTION_SWITCH + && gActionsByTurnOrder[j] != B_ACTION_SWITCH) + if (GetWhoStrikesFirst(battler1, battler2, FALSE)) + SwapTurnOrder(i, j); + } + } + } + } + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleStruct->focusPunchBattlerId = 0; +} + +static void TurnValuesCleanUp(bool8 var0) +{ + s32 i; + u8 *dataPtr; + + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (var0) + { + gProtectStructs[gActiveBattler].protected = FALSE; + gProtectStructs[gActiveBattler].endured = FALSE; + } + else + { + dataPtr = (u8 *)(&gProtectStructs[gActiveBattler]); + for (i = 0; i < sizeof(struct ProtectStruct); ++i) + dataPtr[i] = 0; + if (gDisableStructs[gActiveBattler].isFirstTurn) + --gDisableStructs[gActiveBattler].isFirstTurn; + if (gDisableStructs[gActiveBattler].rechargeTimer) + { + --gDisableStructs[gActiveBattler].rechargeTimer; + if (gDisableStructs[gActiveBattler].rechargeTimer == 0) + gBattleMons[gActiveBattler].status2 &= ~(STATUS2_RECHARGE); + } + } + + if (gDisableStructs[gActiveBattler].substituteHP == 0) + gBattleMons[gActiveBattler].status2 &= ~(STATUS2_SUBSTITUTE); + } + gSideTimers[0].followmeTimer = 0; + gSideTimers[1].followmeTimer = 0; +} + +static void SpecialStatusesClear(void) +{ + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + s32 i; + u8 *dataPtr = (u8 *)(&gSpecialStatuses[gActiveBattler]); + + for (i = 0; i < sizeof(struct SpecialStatus); ++i) + dataPtr[i] = 0; + } +} + +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) +{ + if (!(gHitMarker & HITMARKER_RUN)) + { + while (gBattleStruct->focusPunchBattlerId < gBattlersCount) + { + gActiveBattler = gBattlerAttacker = gBattleStruct->focusPunchBattlerId; + ++gBattleStruct->focusPunchBattlerId; + if (gChosenMoveByBattler[gActiveBattler] == MOVE_FOCUS_PUNCH + && !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) + && !(gDisableStructs[gBattlerAttacker].truantCounter) + && !(gProtectStructs[gActiveBattler].noValidMoves)) + { + BattleScriptExecute(BattleScript_FocusPunchSetUp); + return; + } + } + } + TryClearRageStatuses(); + gCurrentTurnActionNumber = 0; + { + // something stupid needed to match + u8 zero; + + gCurrentActionFuncId = gActionsByTurnOrder[(zero = 0)]; + } + gDynamicBasePower = 0; + gBattleStruct->dynamicMoveType = 0; + gBattleMainFunc = RunTurnActionsFunctions; + gBattleCommunication[3] = 0; + gBattleCommunication[4] = 0; + gBattleScripting.multihitMoveEffect = 0; + gBattleResources->battleScriptsStack->size = 0; +} + +static void RunTurnActionsFunctions(void) +{ + if (gBattleOutcome != 0) + gCurrentActionFuncId = B_ACTION_FINISHED; + *(&gBattleStruct->savedTurnActionNumber) = gCurrentTurnActionNumber; + sTurnActionsFuncsTable[gCurrentActionFuncId](); + + if (gCurrentTurnActionNumber >= gBattlersCount) // everyone did their actions, turn finished + { + gHitMarker &= ~(HITMARKER_x100000); + gBattleMainFunc = sEndTurnFuncsTable[gBattleOutcome & 0x7F]; + } + else + { + if (gBattleStruct->savedTurnActionNumber != gCurrentTurnActionNumber) // action turn has been done, clear hitmarker bits for another battlerId + { + gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); + gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); + } + } +} + +static void HandleEndTurn_BattleWon(void) +{ + gCurrentActionFuncId = 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleTextBuff1[0] = gBattleOutcome; + gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; + gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + } + else if (gBattleTypeFlags & (BATTLE_TYPE_TRAINER_TOWER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER)) + { + BattleStopLowHpSound(); + PlayBGM(MUS_WIN_TRE); + gBattlescriptCurrInstr = gUnknown_81D88D7; + } + else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + BattleStopLowHpSound(); + gBattlescriptCurrInstr = BattleScript_LocalTrainerBattleWon; + switch (gTrainers[gTrainerBattleOpponent_A].trainerClass) + { + case CLASS_LEADER_2: + case CLASS_CHAMPION_2: + PlayBGM(MUS_WIN_GYM); + break; + case CLASS_BOSS: + case CLASS_TEAM_ROCKET: + case CLASS_COOLTRAINER_2: + case CLASS_ELITE_FOUR_2: + case CLASS_GENTLEMAN_2: + default: + PlayBGM(MUS_WIN_TRE); + break; + } + } + else + { + gBattlescriptCurrInstr = BattleScript_PayDayMoneyAndPickUpItems; + } + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +static void HandleEndTurn_BattleLost(void) +{ + gCurrentActionFuncId = 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleTextBuff1[0] = gBattleOutcome; + gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; + gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && ScrSpecial_GetTrainerBattleMode() == 9) + { + if (sub_80803D8() & 1) + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattlerAttacker = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + gBattlescriptCurrInstr = BattleScript_LocalBattleLost; + } + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +static void HandleEndTurn_RanFromBattle(void) +{ + gCurrentActionFuncId = 0; + switch (gProtectStructs[gBattlerAttacker].fleeFlag) + { + default: + gBattlescriptCurrInstr = BattleScript_GotAwaySafely; + break; + case 1: + gBattlescriptCurrInstr = BattleScript_SmokeBallEscape; + break; + case 2: + gBattlescriptCurrInstr = BattleScript_RanAwayUsingMonAbility; + break; + } + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +static void HandleEndTurn_MonFled(void) +{ + gCurrentActionFuncId = 0; + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, gBattlerPartyIndexes[gBattlerAttacker]); + gBattlescriptCurrInstr = BattleScript_WildMonFled; + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +static void HandleEndTurn_FinishBattle(void) +{ + if (gCurrentActionFuncId == B_ACTION_TRY_FINISH || gCurrentActionFuncId == B_ACTION_FINISHED) + { + if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER_TOWER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_LINK))) + { + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + { + if (gBattleResults.playerMon1Species == SPECIES_NONE) + { + gBattleResults.playerMon1Species = gBattleMons[gActiveBattler].species; + StringCopy(gBattleResults.playerMon1Name, gBattleMons[gActiveBattler].nickname); + } + else + { + gBattleResults.playerMon2Species = gBattleMons[gActiveBattler].species; + StringCopy(gBattleResults.playerMon2Name, gBattleMons[gActiveBattler].nickname); + } + } + } + } + sub_812BFDC(); + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + sub_810CB90(); + BeginFastPaletteFade(3); + FadeOutMapMusic(5); + gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions; + gCB2_AfterEvolution = BattleMainCB2; + } + else if (!gBattleControllerExecFlags) + { + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } +} + +static void FreeResetData_ReturnToOvOrDoEvolutions(void) +{ + if (!gPaletteFade.active) + { + ResetSpriteData(); + if (gLeveledUpInBattle == 0 || gBattleOutcome != B_OUTCOME_WON) + gBattleMainFunc = ReturnFromBattleToOverworld; + else + gBattleMainFunc = TryEvolvePokemon; + FreeAllWindowBuffers(); + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + FreeMonSpritesGfx(); + FreeBattleSpritesData(); + FreeBattleResources(); + } + } +} + +static void TryEvolvePokemon(void) +{ + s32 i; + + while (gLeveledUpInBattle != 0) + { + for (i = 0; i < PARTY_SIZE; ++i) + { + if (gLeveledUpInBattle & gBitTable[i]) + { + u16 species; + u8 levelUpBits = gLeveledUpInBattle; + + levelUpBits &= ~(gBitTable[i]); + gLeveledUpInBattle = levelUpBits; + species = GetEvolutionTargetSpecies(&gPlayerParty[i], 0, levelUpBits); + if (species != SPECIES_NONE) + { + gBattleMainFunc = WaitForEvoSceneToFinish; + EvolutionScene(&gPlayerParty[i], species, 0x81, i); + return; + } + } + } + } + gBattleMainFunc = ReturnFromBattleToOverworld; +} + +static void WaitForEvoSceneToFinish(void) +{ + if (gMain.callback2 == BattleMainCB2) + gBattleMainFunc = TryEvolvePokemon; +} + +static void ReturnFromBattleToOverworld(void) +{ + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + RandomlyGivePartyPokerus(gPlayerParty); + PartySpreadPokerus(gPlayerParty); + } + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) || gReceivedRemoteLinkPlayers == 0) + { + gSpecialVar_Result = gBattleOutcome; + gMain.inBattle = FALSE; + gMain.callback1 = gPreBattleCallback1; + if (gBattleTypeFlags & BATTLE_TYPE_ROAMER) + { + UpdateRoamerHPStatus(&gEnemyParty[0]); + if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT) + SetRoamerInactive(); + } + m4aSongNumStop(SE_HINSI); + SetMainCallback2(gMain.savedCallback); + } +} + +void RunBattleScriptCommands_PopCallbacksStack(void) +{ + if (gCurrentActionFuncId == B_ACTION_TRY_FINISH || gCurrentActionFuncId == B_ACTION_FINISHED) + { + if (gBattleResources->battleCallbackStack->size != 0) + --gBattleResources->battleCallbackStack->size; + gBattleMainFunc = gBattleResources->battleCallbackStack->function[gBattleResources->battleCallbackStack->size]; + } + else + { + if (!gBattleControllerExecFlags) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } +} + +void RunBattleScriptCommands(void) +{ + if (!gBattleControllerExecFlags) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); +} + +static void HandleAction_UseMove(void) +{ + u8 side; + u8 var = 4; + + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + if (*(&gBattleStruct->field_91) & gBitTable[gBattlerAttacker]) + { + gCurrentActionFuncId = B_ACTION_FINISHED; + return; + } + gCritMultiplier = 1; + gBattleScripting.dmgMultiplier = 1; + gBattleStruct->atkCancellerTracker = 0; + gMoveResultFlags = 0; + gMultiHitCounter = 0; + gBattleCommunication[6] = 0; + gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerAttacker); + // choose move + if (gProtectStructs[gBattlerAttacker].noValidMoves) + { + gProtectStructs[gBattlerAttacker].noValidMoves = 0; + gCurrentMove = gChosenMove = MOVE_STRUGGLE; + gHitMarker |= HITMARKER_NO_PPDEDUCT; + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(MOVE_STRUGGLE, 0); + } + else if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS || gBattleMons[gBattlerAttacker].status2 & STATUS2_RECHARGE) + { + gCurrentMove = gChosenMove = gLockedMoves[gBattlerAttacker]; + } + // encore forces you to use the same move + else if (gDisableStructs[gBattlerAttacker].encoredMove != MOVE_NONE + && gDisableStructs[gBattlerAttacker].encoredMove == gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos]) + { + gCurrentMove = gChosenMove = gDisableStructs[gBattlerAttacker].encoredMove; + gCurrMovePos = gChosenMovePos = gDisableStructs[gBattlerAttacker].encoredMovePos; + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + } + // check if the encored move wasn't overwritten + else if (gDisableStructs[gBattlerAttacker].encoredMove != MOVE_NONE + && gDisableStructs[gBattlerAttacker].encoredMove != gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos]) + { + gCurrMovePos = gChosenMovePos = gDisableStructs[gBattlerAttacker].encoredMovePos; + gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; + gDisableStructs[gBattlerAttacker].encoredMove = MOVE_NONE; + gDisableStructs[gBattlerAttacker].encoredMovePos = 0; + gDisableStructs[gBattlerAttacker].encoreTimer = 0; + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + } + else if (gBattleMons[gBattlerAttacker].moves[gCurrMovePos] != gChosenMoveByBattler[gBattlerAttacker]) + { + gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + } + else + { + gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; + } + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + gBattleResults.lastUsedMovePlayer = gCurrentMove; + else + gBattleResults.lastUsedMoveOpponent = gCurrentMove; + // choose target + side = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE; + if (gSideTimers[side].followmeTimer != 0 + && gBattleMoves[gCurrentMove].target == MOVE_TARGET_SELECTED + && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gSideTimers[side].followmeTarget) + && gBattleMons[gSideTimers[side].followmeTarget].hp != 0) + { + gBattlerTarget = gSideTimers[side].followmeTarget; + } + else if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + && gSideTimers[side].followmeTimer == 0 + && (gBattleMoves[gCurrentMove].power != 0 + || gBattleMoves[gCurrentMove].target != MOVE_TARGET_USER) + && gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_LIGHTNING_ROD + && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) + { + side = GetBattlerSide(gBattlerAttacker); + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + if (side != GetBattlerSide(gActiveBattler) + && *(gBattleStruct->moveTarget + gBattlerAttacker) != gActiveBattler + && gBattleMons[gActiveBattler].ability == ABILITY_LIGHTNING_ROD + && GetBattlerTurnOrderNum(gActiveBattler) < var) + var = GetBattlerTurnOrderNum(gActiveBattler); + if (var == 4) + { + if (gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM) + { + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + { + if (Random() & 1) + gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + else + gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); + } + else + { + if (Random() & 1) + gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + else + gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); + } + } + else + { + gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker); + } + if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) + { + if (GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)) + { + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK); + } + else + { + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_SIDE); + if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK); + } + } + } + else + { + gActiveBattler = gBattlerByTurnOrder[var]; + RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); + gSpecialStatuses[gActiveBattler].lightningRodRedirected = 1; + gBattlerTarget = gActiveBattler; + } + } + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM) + { + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + { + if (Random() & 1) + gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + else + gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); + } + else + { + if (Random() & 1) + gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + else + gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); + } + if (gAbsentBattlerFlags & gBitTable[gBattlerTarget] + && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)) + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK); + } + else + { + gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker); + if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) + { + if (GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)) + { + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK); + } + else + { + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_SIDE); + if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) + gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK); + } + } + } + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +static void HandleAction_Switch(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gActionSelectionCursor[gBattlerAttacker] = 0; + gMoveSelectionCursor[gBattlerAttacker] = 0; + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, *(gBattleStruct->field_58 + gBattlerAttacker)); + gBattleScripting.battler = gBattlerAttacker; + gBattlescriptCurrInstr = BattleScript_ActionSwitch; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; + if (gBattleResults.playerSwitchesCounter < 255) + ++gBattleResults.playerSwitchesCounter; +} + +static void HandleAction_UseItem(void) +{ + gBattlerAttacker = gBattlerTarget = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + ClearFuryCutterDestinyBondGrudge(gBattlerAttacker); + gLastUsedItem = gBattleBufferB[gBattlerAttacker][1] | (gBattleBufferB[gBattlerAttacker][2] << 8); + if (gLastUsedItem <= ITEM_PREMIER_BALL) // is ball + { + gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem]; + } + else if (gLastUsedItem == ITEM_POKE_DOLL || gLastUsedItem == ITEM_FLUFFY_TAIL) + { + gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[0]; + } + else if (gLastUsedItem == ITEM_POKE_FLUTE) + { + gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[1]; + } + else if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + { + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[0]; + } + else + { + gBattleScripting.battler = gBattlerAttacker; + switch (*(gBattleStruct->AI_itemType + (gBattlerAttacker >> 1))) + { + case AI_ITEM_FULL_RESTORE: + case AI_ITEM_HEAL_HP: + break; + case AI_ITEM_CURE_CONDITION: + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1) + { + if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 0x3E) + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + } + else + { + while (!(*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1)) + { + *(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1; + ++gBattleCommunication[MULTISTRING_CHOOSER]; + } + } + break; + case AI_ITEM_X_STAT: + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & 0x80) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + } + else + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); + PREPARE_STRING_BUFFER(gBattleTextBuff2, CHAR_X); + while (!((*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1))) & 1)) + { + *(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1; + ++gBattleTextBuff1[2]; + } + gBattleScripting.animArg1 = gBattleTextBuff1[2] + 14; + gBattleScripting.animArg2 = 0; + } + break; + case AI_ITEM_GUARD_SPECS: + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + break; + } + + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[*(gBattleStruct->AI_itemType + gBattlerAttacker / 2)]; + } + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +bool8 TryRunFromBattle(u8 battler) +{ + bool8 effect = FALSE; + u8 holdEffect; + u8 pyramidMultiplier; + u8 speedVar; + + if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[battler].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[battler].item); + gPotentialItemEffectBattler = battler; + if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN) + { + gLastUsedItem = gBattleMons[battler].item; + gProtectStructs[battler].fleeFlag = 1; + ++effect; + } + else if (gBattleMons[battler].ability == ABILITY_RUN_AWAY) + { + gLastUsedAbility = ABILITY_RUN_AWAY; + gProtectStructs[battler].fleeFlag = 2; + ++effect; + } + else if ((gBattleTypeFlags & (BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_GHOST)) == BATTLE_TYPE_GHOST) + { + if (GetBattlerSide(battler) == B_SIDE_PLAYER) + ++effect; + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + if (gBattleMons[battler].speed < gBattleMons[BATTLE_OPPOSITE(battler)].speed) + { + speedVar = (gBattleMons[battler].speed * 128) / (gBattleMons[BATTLE_OPPOSITE(battler)].speed) + (gBattleStruct->runTries * 30); + if (speedVar > (Random() & 0xFF)) + ++effect; + } + else // same speed or faster + { + ++effect; + } + } + + ++gBattleStruct->runTries; + } + if (effect) + { + gCurrentTurnActionNumber = gBattlersCount; + gBattleOutcome = B_OUTCOME_RAN; + } + return effect; +} + +static void HandleAction_Run(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gCurrentTurnActionNumber = gBattlersCount; + for (gActiveBattler = 0; gActiveBattler < gBattlersCount; ++gActiveBattler) + { + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) + { + if (gChosenActionByBattler[gActiveBattler] == B_ACTION_RUN) + gBattleOutcome |= B_OUTCOME_LOST; + } + else + { + if (gChosenActionByBattler[gActiveBattler] == B_ACTION_RUN) + gBattleOutcome |= B_OUTCOME_WON; + } + } + gBattleOutcome |= B_OUTCOME_LINK_BATTLE_RAN; + } + else + { + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + { + if (!TryRunFromBattle(gBattlerAttacker)) // failed to run away + { + ClearFuryCutterDestinyBondGrudge(gBattlerAttacker); + gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; + } + } + else + { + if (gBattleMons[gBattlerAttacker].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; + } + else + { + gCurrentTurnActionNumber = gBattlersCount; + gBattleOutcome = B_OUTCOME_MON_FLED; + } + } + } +} + +static void HandleAction_WatchesCarefully(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + if (gBattleStruct->safariGoNearCounter != 0) + { + --gBattleStruct->safariGoNearCounter; + if (gBattleStruct->safariGoNearCounter == 0) + { + *(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + } + else + { + if (gBattleStruct->safariPkblThrowCounter != 0) + { + --gBattleStruct->safariPkblThrowCounter; + if (gBattleStruct->safariPkblThrowCounter == 0) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[5] = 2; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + } + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[0]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +static void HandleAction_SafariZoneBallThrow(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + --gNumSafariBalls; + gLastUsedItem = ITEM_SAFARI_BALL; + gBattlescriptCurrInstr = gBattlescriptsForBallThrow[ITEM_SAFARI_BALL]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +static void HandleAction_ThrowPokeblock(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattleStruct->safariPkblThrowCounter += Random() % 5 + 2; + if (gBattleStruct->safariPkblThrowCounter > 6) + gBattleStruct->safariPkblThrowCounter = 6; + gBattleStruct->safariGoNearCounter = 0; + gBattleStruct->safariCatchFactor >>= 1; + if (gBattleStruct->safariCatchFactor <= 2) + gBattleStruct->safariCatchFactor = 3; + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[2]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +static void HandleAction_GoNear(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattleStruct->safariGoNearCounter += Random() % 5 + 2; + if (gBattleStruct->safariGoNearCounter > 6) + gBattleStruct->safariGoNearCounter = 6; + gBattleStruct->safariPkblThrowCounter = 0; + gBattleStruct->safariCatchFactor <<= 1; + if (gBattleStruct->safariCatchFactor > 20) + gBattleStruct->safariCatchFactor = 20; + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[1]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + +static void HandleAction_SafariZoneRun(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + PlaySE(SE_NIGERU); + gCurrentTurnActionNumber = gBattlersCount; + gBattleOutcome = B_OUTCOME_RAN; +} + +static void HandleAction_OldManBallThrow(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, gBattlerPartyIndexes[gBattlerAttacker]) + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[3]; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; + gActionsByTurnOrder[1] = B_ACTION_FINISHED; +} + +static void HandleAction_TryFinish(void) +{ + if (!HandleFaintedMonActions()) + { + gBattleStruct->faintedActionsState = 0; + gCurrentActionFuncId = B_ACTION_FINISHED; + } +} + +static void HandleAction_NothingIsFainted(void) +{ + ++gCurrentTurnActionNumber; + gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; + gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED + | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 + | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_CHARGING | HITMARKER_x4000000); +} + +static void HandleAction_ActionFinished(void) +{ + ++gCurrentTurnActionNumber; + gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; + SpecialStatusesClear(); + gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED + | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 + | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_CHARGING | HITMARKER_x4000000); + gCurrentMove = MOVE_NONE; + gBattleMoveDamage = 0; + gMoveResultFlags = 0; + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gLastLandedMoves[gBattlerAttacker] = 0; + gLastHitByType[gBattlerAttacker] = 0; + gBattleStruct->dynamicMoveType = 0; + gDynamicBasePower = 0; + gBattleScripting.atk49_state = 0; + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; + gBattleCommunication[ACTIONS_CONFIRMED_COUNT] = 0; + gBattleScripting.multihitMoveEffect = 0; + gBattleResources->battleScriptsStack->size = 0; +} diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ecc8e3d36..a7d8cb6fa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -48,6 +48,7 @@ #include "constants/abilities.h" #include "constants/pokemon.h" #include "constants/trainers.h" +#include "constants/map_types.h" #define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) @@ -1222,7 +1223,7 @@ static void atk04_critcalc(void) critChance = NELEMS(sCriticalHitChance) - 1; if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR) && !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT) - && !(gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL) + && !(gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL) && !(Random() % sCriticalHitChance[critChance]) && (!(gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) || sub_80EB2E0(1)) && !(gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)) @@ -4414,7 +4415,7 @@ static void atk4E_switchinanim(void) && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_LEGENDARY - | BATTLE_TYPE_OLDMAN_TUTORIAL + | BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_GHOST))) @@ -5229,7 +5230,7 @@ static void atk5D_getmoneyreward(void) } else { - moneyReward = sub_8054C04(); + moneyReward = ComputeWhiteOutMoneyLoss(); } PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff1, 5, moneyReward); if (moneyReward) @@ -5411,7 +5412,7 @@ static void atk5D_getmoneyreward(void) bl AddMoney\n\ b _08025A00\n\ _080259FA:\n\ - bl sub_8054C04\n\ + bl ComputeWhiteOutMoneyLoss\n\ adds r4, r0, 0\n\ _08025A00:\n\ ldr r1, _08025A40 @ =gBattleTextBuff1\n\ @@ -9436,7 +9437,7 @@ static void atkEF_handleballthrow(void) MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr = BattleScript_TrainerBallBlock; } - else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLDMAN_TUTORIAL)) + else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLD_MAN_TUTORIAL)) { BtlController_EmitBallThrowAnim(0, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); @@ -9451,7 +9452,6 @@ static void atkEF_handleballthrow(void) catchRate = gBattleStruct->safariCatchFactor * 1275 / 100; else catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate; - if (gLastUsedItem > ITEM_SAFARI_BALL) { switch (gLastUsedItem) @@ -9515,7 +9515,7 @@ static void atkEF_handleballthrow(void) else { if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 0xFF) - gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]++; + ++gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]; } } if (odds > 254) // mon caught diff --git a/src/battle_setup.c b/src/battle_setup.c new file mode 100644 index 000000000..98437e279 --- /dev/null +++ b/src/battle_setup.c @@ -0,0 +1,1060 @@ +#include "global.h" +#include "task.h" +#include "help_system.h" +#include "overworld.h" +#include "item.h" +#include "sound.h" +#include "pokemon.h" +#include "load_save.h" +#include "safari_zone.h" +#include "quest_log.h" +#include "script.h" +#include "script_pokemon_util_80A0058.h" +#include "strings.h" +#include "string_util.h" +#include "event_data.h" +#include "unk_8159F40.h" +#include "map_obj_80688E4.h" +#include "metatile_behavior.h" +#include "event_scripts.h" +#include "fldeff.h" +#include "fieldmap.h" +#include "field_control_avatar.h" +#include "field_player_avatar.h" +#include "field_screen_effect.h" +#include "field_message_box.h" +#include "field_map_obj.h" +#include "vs_seeker.h" +#include "battle.h" +#include "battle_setup.h" +#include "battle_transition.h" +#include "constants/battle_setup.h" +#include "constants/flags.h" +#include "constants/items.h" +#include "constants/maps.h" +#include "constants/songs.h" +#include "constants/species.h" +#include "constants/pokemon.h" +#include "constants/trainers.h" +#include "constants/trainer_classes.h" +#include "constants/map_types.h" + +enum +{ + TRAINER_PARAM_LOAD_VAL_8BIT, + TRAINER_PARAM_LOAD_VAL_16BIT, + TRAINER_PARAM_LOAD_VAL_32BIT, + TRAINER_PARAM_CLEAR_VAL_8BIT, + TRAINER_PARAM_CLEAR_VAL_16BIT, + TRAINER_PARAM_CLEAR_VAL_32BIT, + TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR, +}; + +struct TrainerBattleParameter +{ + void *varPtr; + u8 ptrType; +}; + +static void DoSafariBattle(void); +static void DoGhostBattle(void); +static void DoStandardWildBattle(void); +static void CB2_EndWildBattle(void); +static u8 GetWildBattleTransition(void); +static u8 GetTrainerBattleTransition(void); +static void CB2_EndScriptedWildBattle(void); +static void CB2_EndMarowakBattle(void); +static bool32 IsPlayerDefeated(u32 battleOutcome); +static void CB2_EndTrainerBattle(void); +static const u8 *GetIntroSpeechOfApproachingTrainer(void); +static const u8 *GetTrainerCantBattleSpeech(void); + +static EWRAM_DATA u16 sTrainerBattleMode = 0; +EWRAM_DATA u16 gTrainerBattleOpponent_A = 0; +static EWRAM_DATA u16 sTrainerEventObjectLocalId = 0; +static EWRAM_DATA u8 *sTrainerAIntroSpeech = NULL; +static EWRAM_DATA u8 *sTrainerADefeatSpeech = NULL; +static EWRAM_DATA u8 *sTrainerVictorySpeech = NULL; +static EWRAM_DATA u8 *sTrainerCannotBattleSpeech = NULL; +static EWRAM_DATA u8 *sTrainerBattleEndScript = NULL; +static EWRAM_DATA u8 *sTrainerABattleScriptRetAddr = NULL; +static EWRAM_DATA u16 gUnknown_20386CC = 0; + +static const u8 sBattleTransitionTable_Wild[][2] = +{ + B_TRANSITION_SLICED_SCREEN, B_TRANSITION_WHITEFADE_IN_STRIPES, + B_TRANSITION_CLOCKWISE_BLACKFADE, B_TRANSITION_GRID_SQUARES, + B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES, + B_TRANSITION_BLACK_WAVE_TO_RIGHT, B_TRANSITION_FULLSCREEN_WAVE, +}; + +static const u8 sBattleTransitionTable_Trainer[][2] = +{ + B_TRANSITION_SLIDING_POKEBALLS, B_TRANSITION_BLACK_DOODLES, + B_TRANSITION_HORIZONTAL_CORRUGATE, B_TRANSITION_BIG_POKEBALL, + B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES, + B_TRANSITION_DISTORTED_WAVE, B_TRANSITION_FULLSCREEN_WAVE, +}; + +static const struct TrainerBattleParameter sOrdinaryBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerEventObjectLocalId, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + +static const struct TrainerBattleParameter sContinueScriptBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerEventObjectLocalId, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + +static const struct TrainerBattleParameter sDoubleBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerEventObjectLocalId, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + +static const struct TrainerBattleParameter sOrdinaryNoIntroBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerEventObjectLocalId, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + +static const struct TrainerBattleParameter sTutorialBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&gUnknown_20386CC, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + +static const struct TrainerBattleParameter sContinueScriptDoubleBattleParams[] = +{ + {&sTrainerBattleMode, TRAINER_PARAM_LOAD_VAL_8BIT}, + {&gTrainerBattleOpponent_A, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerEventObjectLocalId, TRAINER_PARAM_LOAD_VAL_16BIT}, + {&sTrainerAIntroSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerADefeatSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerVictorySpeech, TRAINER_PARAM_CLEAR_VAL_32BIT}, + {&sTrainerCannotBattleSpeech, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerABattleScriptRetAddr, TRAINER_PARAM_LOAD_VAL_32BIT}, + {&sTrainerBattleEndScript, TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR}, +}; + + +#define tState data[0] +#define tTransition data[1] + +static void Task_BattleStart(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + + switch (tState) + { + case 0: + if (!FldEffPoison_IsActive()) + { + HelpSystem_Disable(); + BT_StartOnField(tTransition); + ++tState; + } + break; + case 1: + if (BT_IsDone() == TRUE) + { + HelpSystem_Enable(); + CleanupOverworldWindowsAndTilemaps(); + SetMainCallback2(CB2_InitBattle); + RestartWildEncounterImmunitySteps(); + ClearPoisonStepCounter(); + DestroyTask(taskId); + } + break; + } +} + +static void CreateBattleStartTask(u8 transition, u16 song) // song == 0 means default music for current map +{ + u8 taskId = CreateTask(Task_BattleStart, 1); + + gTasks[taskId].tTransition = transition; + PlayMapChosenOrBattleBGM(song); +} + +static bool8 CheckSilphScopeInPokemonTower(u16 mapGroup, u16 mapNum) +{ + if (mapGroup == MAP_GROUP(POKEMON_TOWER_1F) + && ((u16)(mapNum - MAP_NUM(POKEMON_TOWER_1F)) <= 6) + && !(CheckBagHasItem(ITEM_SILPH_SCOPE, 1))) + return TRUE; + else + return FALSE; +} + +void BattleSetup_StartWildBattle(void) +{ + if (GetSafariZoneFlag()) + DoSafariBattle(); + else if (CheckSilphScopeInPokemonTower(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) + DoGhostBattle(); + else + DoStandardWildBattle(); +} + +static void DoStandardWildBattle(void) +{ + ScriptContext2_Enable(); + FreezeEventObjects(); + sub_805C780(); + gMain.savedCallback = CB2_EndWildBattle; + gBattleTypeFlags = 0; + CreateBattleStartTask(GetWildBattleTransition(), 0); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void BattleSetup_StartRoamerBattle(void) +{ + ScriptContext2_Enable(); + FreezeEventObjects(); + sub_805C780(); + gMain.savedCallback = CB2_EndWildBattle; + gBattleTypeFlags = BATTLE_TYPE_ROAMER; + CreateBattleStartTask(GetWildBattleTransition(), MUS_VS_DEN); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +static void DoSafariBattle(void) +{ + ScriptContext2_Enable(); + FreezeEventObjects(); + sub_805C780(); + gMain.savedCallback = CB2_EndSafariBattle; + gBattleTypeFlags = BATTLE_TYPE_SAFARI; + CreateBattleStartTask(GetWildBattleTransition(), 0); +} + +static void DoGhostBattle(void) +{ + ScriptContext2_Enable(); + FreezeEventObjects(); + sub_805C780(); + gMain.savedCallback = CB2_EndWildBattle; + gBattleTypeFlags = BATTLE_TYPE_GHOST; + CreateBattleStartTask(GetWildBattleTransition(), 0); + SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gUnknown_841D148); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +static void DoTrainerBattle(void) +{ + CreateBattleStartTask(GetTrainerBattleTransition(), 0); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_TRAINER_BATTLES); +} + +void ScrSpecial_StartOldManTutorialBattle(void) +{ + CreateMaleMon(&gEnemyParty[0], SPECIES_WEEDLE, 5); + ScriptContext2_Enable(); + gMain.savedCallback = CB2_ReturnToFieldContinueScriptPlayMapMusic; + gBattleTypeFlags = BATTLE_TYPE_OLD_MAN_TUTORIAL; + CreateBattleStartTask(B_TRANSITION_SLICED_SCREEN, 0); +} + +void BattleSetup_StartScriptedWildBattle(void) +{ + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndScriptedWildBattle; + gBattleTypeFlags = BATTLE_TYPE_PALACE; + CreateBattleStartTask(GetWildBattleTransition(), 0); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void ScrSpecial_StartMarowakBattle(void) +{ + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndMarowakBattle; + if (CheckBagHasItem(ITEM_SILPH_SCOPE, 1)) + { + gBattleTypeFlags = BATTLE_TYPE_GHOST | BATTLE_TYPE_LEGENDARY; + CreateMonWithGenderNatureLetter(gEnemyParty, SPECIES_MAROWAK, 30, 31, MON_FEMALE, NATURE_SERIOUS, 0); + } + else + { + gBattleTypeFlags = BATTLE_TYPE_GHOST; + } + CreateBattleStartTask(GetWildBattleTransition(), 0); + SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gUnknown_841D148); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void ScrSpecial_StartSouthernIslandBattle(void) +{ + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndScriptedWildBattle; + gBattleTypeFlags = BATTLE_TYPE_LEGENDARY; + CreateBattleStartTask(GetWildBattleTransition(), 0); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void Special_StartLegendaryBattle(void) +{ + u16 species; + + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndScriptedWildBattle; + gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_ARENA; + species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES); + switch (species) + { + case SPECIES_MEWTWO: + CreateBattleStartTask(B_TRANSITION_BLUR, MUS_VS_MYU2); + break; + case SPECIES_DEOXYS: + CreateBattleStartTask(B_TRANSITION_BLUR, MUS_VS_DEO); + break; + case SPECIES_MOLTRES: + case SPECIES_ARTICUNO: + case SPECIES_ZAPDOS: + case SPECIES_HO_OH: + case SPECIES_LUGIA: + CreateBattleStartTask(B_TRANSITION_BLUR, MUS_VS_DEN); + break; + default: + CreateBattleStartTask(B_TRANSITION_BLUR, MUS_BATTLE20); + break; + } + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void Special_StartGroudonKyogreBattle(void) +{ + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndScriptedWildBattle; + gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_KYOGRE_GROUDON; + if (gGameVersion == VERSION_FIRE_RED) + CreateBattleStartTask(B_TRANSITION_BLACK_DOODLES, MUS_BATTLE20); + else // pointless, exactly the same + CreateBattleStartTask(B_TRANSITION_BLACK_DOODLES, MUS_BATTLE20); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +void Special_StartRegiBattle(void) +{ + ScriptContext2_Enable(); + gMain.savedCallback = CB2_EndScriptedWildBattle; + gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI; + CreateBattleStartTask(B_TRANSITION_BLUR, MUS_BATTLE20); + IncrementGameStat(GAME_STAT_TOTAL_BATTLES); + IncrementGameStat(GAME_STAT_WILD_BATTLES); +} + +// not used +static void sub_807FAF8(void) +{ + LoadPlayerParty(); + CB2_EndWildBattle(); +} + +// not used +static void sub_807FB08(void) +{ + ScriptContext2_Enable(); + FreezeEventObjects(); + sub_805C780(); + gMain.savedCallback = sub_807FAF8; + SavePlayerParty(); + InitPokedudePartyAndOpponent(); + CreateBattleStartTask(GetWildBattleTransition(), 0); +} + +static void CB2_EndWildBattle(void) +{ + CpuFill16(0, (void *)BG_PLTT, BG_PLTT_SIZE); + ResetOamRange(0, 128); + if (IsPlayerDefeated(gBattleOutcome) == TRUE) + { + SetMainCallback2(CB2_WhiteOut); + } + else + { + SetMainCallback2(CB2_ReturnToField); + gFieldCallback = sub_807E3EC; + } +} + +static void CB2_EndScriptedWildBattle(void) +{ + CpuFill16(0, (void *)BG_PLTT, BG_PLTT_SIZE); + ResetOamRange(0, 128); + if (IsPlayerDefeated(gBattleOutcome) == TRUE) + SetMainCallback2(CB2_WhiteOut); + else + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); +} + +static void CB2_EndMarowakBattle(void) +{ + CpuFill16(0, (void *)BG_PLTT, BG_PLTT_SIZE); + ResetOamRange(0, 128); + if (IsPlayerDefeated(gBattleOutcome)) + { + SetMainCallback2(CB2_WhiteOut); + } + else + { + if (gBattleOutcome == B_OUTCOME_WON) + gSpecialVar_Result = 0; + else + gSpecialVar_Result = 1; + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + } +} + +u8 BattleSetup_GetTerrainId(void) +{ + u16 tileBehavior; + s16 x, y; + + PlayerGetDestCoords(&x, &y); + tileBehavior = MapGridGetMetatileBehaviorAt(x, y); + if (MetatileBehavior_IsTallGrass_2(tileBehavior)) + return BATTLE_TERRAIN_GRASS; + if (MetatileBehavior_IsLongGrass(tileBehavior)) + return BATTLE_TERRAIN_LONG_GRASS; + if (MetatileBehavior_IsSandOrDeepSand(tileBehavior)) + return BATTLE_TERRAIN_SAND; + switch (gMapHeader.mapType) + { + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + break; + case MAP_TYPE_UNDERGROUND: + if (MetatileBehavior_IsIndoorEncounter(tileBehavior)) + return BATTLE_TERRAIN_BUILDING; + if (MetatileBehavior_IsSurfable(tileBehavior)) + return BATTLE_TERRAIN_POND; + return BATTLE_TERRAIN_CAVE; + case MAP_TYPE_INDOOR: + case MAP_TYPE_SECRET_BASE: + return BATTLE_TERRAIN_BUILDING; + case MAP_TYPE_UNDERWATER: + return BATTLE_TERRAIN_UNDERWATER; + case MAP_TYPE_OCEAN_ROUTE: + if (MetatileBehavior_IsSurfable(tileBehavior)) + return BATTLE_TERRAIN_WATER; + return BATTLE_TERRAIN_PLAIN; + } + if (MetatileBehavior_IsDeepSemiDeepOrSplashingWater(tileBehavior)) + return BATTLE_TERRAIN_WATER; + if (MetatileBehavior_IsSurfable(tileBehavior)) + return BATTLE_TERRAIN_POND; + if (MetatileBehavior_IsMountain(tileBehavior)) + return BATTLE_TERRAIN_MOUNTAIN; + if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) + { + if (MetatileBehavior_GetBridgeType(tileBehavior)) + return BATTLE_TERRAIN_POND; + if (MetatileBehavior_IsBridge(tileBehavior) == TRUE) + return BATTLE_TERRAIN_WATER; + } + return BATTLE_TERRAIN_PLAIN; +} + +static u8 GetBattleTransitionTypeByMap(void) +{ + u16 tileBehavior; + s16 x, y; + + PlayerGetDestCoords(&x, &y); + tileBehavior = MapGridGetMetatileBehaviorAt(x, y); + if (Overworld_GetFlashLevel()) + return B_TRANSITION_HORIZONTAL_CORRUGATE; + if (!MetatileBehavior_IsSurfable(tileBehavior)) + { + switch (gMapHeader.mapType) + { + case MAP_TYPE_UNDERGROUND: + return B_TRANSITION_DISTORTED_WAVE; + case MAP_TYPE_UNDERWATER: + return B_TRANSITION_BIG_POKEBALL; + default: + return B_TRANSITION_BLUR; + } + } + return B_TRANSITION_BIG_POKEBALL; +} + +static u16 GetSumOfPlayerPartyLevel(u8 numMons) +{ + u8 sum = 0; + s32 i; + + for (i = 0; i < PARTY_SIZE; ++i) + { + u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + + if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0) + { + sum += GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); + if (--numMons == 0) + break; + } + } + return sum; +} + +static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons) +{ + u8 i; + u8 sum; + u32 count = numMons; + + if (gTrainers[opponentId].partySize < count) + count = gTrainers[opponentId].partySize; + sum = 0; + switch (gTrainers[opponentId].partyFlags) + { + case 0: + { + const struct TrainerMonNoItemDefaultMoves *party; + + party = gTrainers[opponentId].party.NoItemDefaultMoves; + for (i = 0; i < count; ++i) + sum += party[i].lvl; + } + break; + case F_TRAINER_PARTY_CUSTOM_MOVESET: + { + const struct TrainerMonNoItemCustomMoves *party; + + party = gTrainers[opponentId].party.NoItemCustomMoves; + for (i = 0; i < count; ++i) + sum += party[i].lvl; + } + break; + case F_TRAINER_PARTY_HELD_ITEM: + { + const struct TrainerMonItemDefaultMoves *party; + + party = gTrainers[opponentId].party.ItemDefaultMoves; + for (i = 0; i < count; ++i) + sum += party[i].lvl; + } + break; + case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM: + { + const struct TrainerMonItemCustomMoves *party; + + party = gTrainers[opponentId].party.ItemCustomMoves; + for (i = 0; i < count; ++i) + sum += party[i].lvl; + } + break; + } + return sum; +} + +static u8 GetWildBattleTransition(void) +{ + u8 transitionType = GetBattleTransitionTypeByMap(); + u8 enemyLevel = GetMonData(&gEnemyParty[0], MON_DATA_LEVEL); + u8 playerLevel = GetSumOfPlayerPartyLevel(1); + + if (enemyLevel < playerLevel) + return sBattleTransitionTable_Wild[transitionType][0]; + else + return sBattleTransitionTable_Wild[transitionType][1]; +} + +static u8 GetTrainerBattleTransition(void) +{ + u8 minPartyCount; + u8 transitionType; + u8 enemyLevel; + u8 playerLevel; + + if (gTrainerBattleOpponent_A == TRAINER_SECRET_BASE) + return B_TRANSITION_BLUE; + if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_ELITE_FOUR_2) + { + if (gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_LORELEI || gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_LORELEI_2) + return B_TRANSITION_LORELEI; + if (gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_BRUNO || gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_BRUNO_2) + return B_TRANSITION_BRUNO; + if (gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_AGATHA || gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_AGATHA_2) + return B_TRANSITION_AGATHA; + if (gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_LANCE || gTrainerBattleOpponent_A == TRAINER_ELITE_FOUR_LANCE_2) + return B_TRANSITION_LANCE; + return B_TRANSITION_BLUE; + } + if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_CHAMPION_2) + return B_TRANSITION_BLUE; + if (gTrainers[gTrainerBattleOpponent_A].doubleBattle == TRUE) + minPartyCount = 2; // double battles always at least have 2 pokemon. + else + minPartyCount = 1; + transitionType = GetBattleTransitionTypeByMap(); + enemyLevel = GetSumOfEnemyPartyLevel(gTrainerBattleOpponent_A, minPartyCount); + playerLevel = GetSumOfPlayerPartyLevel(minPartyCount); + if (enemyLevel < playerLevel) + return sBattleTransitionTable_Trainer[transitionType][0]; + else + return sBattleTransitionTable_Trainer[transitionType][1]; +} + +u8 sub_8080060(void) +{ + u8 enemyLevel = GetMonData(&gEnemyParty[0], MON_DATA_LEVEL); + u8 playerLevel = GetSumOfPlayerPartyLevel(1); + + if (enemyLevel < playerLevel) + return 4; + else + return 3; +} + +static u32 TrainerBattleLoadArg32(const u8 *ptr) +{ + return T1_READ_32(ptr); +} + +static u16 TrainerBattleLoadArg16(const u8 *ptr) +{ + return T1_READ_16(ptr); +} + +static u8 TrainerBattleLoadArg8(const u8 *ptr) +{ + return T1_READ_8(ptr); +} + +static u16 GetTrainerAFlag(void) +{ + return FLAG_TRAINER_FLAG_START + gTrainerBattleOpponent_A; +} + +static bool32 IsPlayerDefeated(u32 battleOutcome) +{ + switch (battleOutcome) + { + case B_OUTCOME_LOST: + case B_OUTCOME_DREW: + return TRUE; + case B_OUTCOME_WON: + case B_OUTCOME_RAN: + case B_OUTCOME_PLAYER_TELEPORTED: + case B_OUTCOME_MON_FLED: + case B_OUTCOME_CAUGHT: + return FALSE; + default: + return FALSE; + } +} + +static void InitTrainerBattleVariables(void) +{ + sTrainerBattleMode = 0; + gTrainerBattleOpponent_A = 0; + sTrainerEventObjectLocalId = 0; + sTrainerAIntroSpeech = NULL; + sTrainerADefeatSpeech = NULL; + sTrainerVictorySpeech = NULL; + sTrainerCannotBattleSpeech = NULL; + sTrainerBattleEndScript = NULL; + sTrainerABattleScriptRetAddr = NULL; + gUnknown_20386CC = 0; +} + +static inline void SetU8(void *ptr, u8 value) +{ + *(u8 *)(ptr) = value; +} + +static inline void SetU16(void *ptr, u16 value) +{ + *(u16 *)(ptr) = value; +} + +static inline void SetU32(void *ptr, u32 value) +{ + *(u32 *)(ptr) = value; +} + +static inline void SetPtr(const void *ptr, const void *value) +{ + *(const void **)(ptr) = value; +} + +static void TrainerBattleLoadArgs(const struct TrainerBattleParameter *specs, const u8 *data) +{ + while (1) + { + switch (specs->ptrType) + { + case TRAINER_PARAM_LOAD_VAL_8BIT: + SetU8(specs->varPtr, TrainerBattleLoadArg8(data)); + data += 1; + break; + case TRAINER_PARAM_LOAD_VAL_16BIT: + SetU16(specs->varPtr, TrainerBattleLoadArg16(data)); + data += 2; + break; + case TRAINER_PARAM_LOAD_VAL_32BIT: + SetU32(specs->varPtr, TrainerBattleLoadArg32(data)); + data += 4; + break; + case TRAINER_PARAM_CLEAR_VAL_8BIT: + SetU8(specs->varPtr, 0); + break; + case TRAINER_PARAM_CLEAR_VAL_16BIT: + SetU16(specs->varPtr, 0); + break; + case TRAINER_PARAM_CLEAR_VAL_32BIT: + SetU32(specs->varPtr, 0); + break; + case TRAINER_PARAM_LOAD_SCRIPT_RET_ADDR: + SetPtr(specs->varPtr, data); + return; + } + ++specs; + } +} + +static void SetMapVarsToTrainer(void) +{ + if (sTrainerEventObjectLocalId != 0) + { + gSpecialVar_LastTalked = sTrainerEventObjectLocalId; + gSelectedEventObject = GetFieldObjectIdByLocalIdAndMap(sTrainerEventObjectLocalId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + } +} + +const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) +{ + InitTrainerBattleVariables(); + sTrainerBattleMode = TrainerBattleLoadArg8(data); + switch (sTrainerBattleMode) + { + case TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT: + TrainerBattleLoadArgs(sOrdinaryNoIntroBattleParams, data); + return EventScript_DoTrainerBattle; + case TRAINER_BATTLE_DOUBLE: + TrainerBattleLoadArgs(sDoubleBattleParams, data); + SetMapVarsToTrainer(); + return EventScript_TryDoDoubleTrainerBattle; + case TRAINER_BATTLE_CONTINUE_SCRIPT: + case TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC: + TrainerBattleLoadArgs(sContinueScriptBattleParams, data); + SetMapVarsToTrainer(); + return EventScript_TryDoNormalTrainerBattle; + case TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE: + case TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC: + TrainerBattleLoadArgs(sContinueScriptDoubleBattleParams, data); + SetMapVarsToTrainer(); + return EventScript_TryDoDoubleTrainerBattle; + case TRAINER_BATTLE_REMATCH_DOUBLE: + sub_811231C(); + TrainerBattleLoadArgs(sDoubleBattleParams, data); + SetMapVarsToTrainer(); + gTrainerBattleOpponent_A = GetRematchTrainerId(gTrainerBattleOpponent_A); + return EventScript_TryDoDoubleRematchBattle; + case TRAINER_BATTLE_REMATCH: + sub_811231C(); + TrainerBattleLoadArgs(sOrdinaryBattleParams, data); + SetMapVarsToTrainer(); + gTrainerBattleOpponent_A = GetRematchTrainerId(gTrainerBattleOpponent_A); + return EventScript_TryDoRematchBattle; + case TRAINER_BATTLE_TUTORIAL: + TrainerBattleLoadArgs(sTutorialBattleParams, data); + return EventScript_DoTrainerBattle; + default: + TrainerBattleLoadArgs(sOrdinaryBattleParams, data); + SetMapVarsToTrainer(); + return EventScript_TryDoNormalTrainerBattle; + } +} + +void ConfigureAndSetUpOneTrainerBattle(u8 trainerEventObjId, const u8 *trainerScript) +{ + gSelectedEventObject = trainerEventObjId; + gSpecialVar_LastTalked = gMapObjects[trainerEventObjId].localId; + BattleSetup_ConfigureTrainerBattle(trainerScript + 1); + ScriptContext1_SetupScript(gUnknown_81A4EB4); + ScriptContext2_Enable(); +} + +bool32 GetTrainerFlagFromScriptPointer(const u8 *data) +{ + u32 flag = TrainerBattleLoadArg16(data + 2); + + return FlagGet(FLAG_TRAINER_FLAG_START + flag); +} + +void SetUpTrainerMovement(void) +{ + struct MapObject *eventObject = &gMapObjects[gSelectedEventObject]; + + SetTrainerMovementType(eventObject, GetTrainerFacingDirectionMovementType(eventObject->facingDirection)); +} + +u8 ScrSpecial_GetTrainerBattleMode(void) +{ + return sTrainerBattleMode; +} + +u16 sub_80803D8(void) +{ + return gUnknown_20386CC; +} + +u16 ScrSpecial_HasTrainerBeenFought(void) +{ + return FlagGet(GetTrainerAFlag()); +} + +void SetBattledTrainerFlag(void) +{ + FlagSet(GetTrainerAFlag()); +} + +// not used +static void SetBattledTrainerFlag2(void) +{ + FlagSet(GetTrainerAFlag()); +} + +bool8 HasTrainerBeenFought(u16 trainerId) +{ + return FlagGet(FLAG_TRAINER_FLAG_START + trainerId); +} + +void SetTrainerFlag(u16 trainerId) +{ + FlagSet(FLAG_TRAINER_FLAG_START + trainerId); +} + +void ClearTrainerFlag(u16 trainerId) +{ + FlagClear(FLAG_TRAINER_FLAG_START + trainerId); +} + +void BattleSetup_StartTrainerBattle(void) +{ + gBattleTypeFlags = BATTLE_TYPE_TRAINER; + if (ScrSpecial_GetTrainerBattleMode() == TRAINER_BATTLE_TUTORIAL + && sub_80803D8() & 3) + gBattleTypeFlags |= BATTLE_TYPE_FIRST_BATTLE; + gMain.savedCallback = CB2_EndTrainerBattle; + DoTrainerBattle(); + ScriptContext1_Stop(); +} + +static void CB2_EndTrainerBattle(void) +{ + if (sTrainerBattleMode == TRAINER_BATTLE_TUTORIAL) + { + if (IsPlayerDefeated(gBattleOutcome) == TRUE) + { + gSpecialVar_Result = 1; + if (gUnknown_20386CC & 1) + { + sp000_heal_pokemon(); + } + else + { + SetMainCallback2(CB2_WhiteOut); + return; + } + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + SetBattledTrainerFlag(); + sub_81139BC(); + } + else + { + gSpecialVar_Result = 0; + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + SetBattledTrainerFlag(); + sub_81139BC(); + } + + } + else + { + if (gTrainerBattleOpponent_A == TRAINER_SECRET_BASE) + { + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + } + else if (IsPlayerDefeated(gBattleOutcome) == TRUE) + { + SetMainCallback2(CB2_WhiteOut); + } + else + { + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + SetBattledTrainerFlag(); + sub_81139BC(); + } + } +} + +static void CB2_EndRematchBattle(void) +{ + if (gTrainerBattleOpponent_A == TRAINER_SECRET_BASE) + { + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + } + else if (IsPlayerDefeated(gBattleOutcome) == TRUE) + { + SetMainCallback2(CB2_WhiteOut); + } + else + { + SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); + SetBattledTrainerFlag(); + sub_810CDE8(); + sub_81138F8(); + } +} + +void ScrSpecial_StartTrainerEyeRematch(void) +{ + gBattleTypeFlags = BATTLE_TYPE_TRAINER; + gMain.savedCallback = CB2_EndRematchBattle; + DoTrainerBattle(); + ScriptContext1_Stop(); +} + +void ScrSpecial_ShowTrainerIntroSpeech(void) +{ + ShowFieldMessage(GetIntroSpeechOfApproachingTrainer()); +} + +const u8 *BattleSetup_GetScriptAddrAfterBattle(void) +{ + if (sTrainerBattleEndScript != NULL) + return sTrainerBattleEndScript; + else + return EventScript_1C555B; +} + +const u8 *BattleSetup_GetTrainerPostBattleScript(void) +{ + if (sTrainerABattleScriptRetAddr != NULL) + return sTrainerABattleScriptRetAddr; + else + return EventScript_1C555B; +} + +void ScrSpecial_ShowTrainerNonBattlingSpeech(void) +{ + ShowFieldMessage(GetTrainerCantBattleSpeech()); +} + +void PlayTrainerEncounterMusic(void) +{ + u16 music; + + if (gUnknown_203ADFA != 2 + && gUnknown_203ADFA != 3 + && sTrainerBattleMode != TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC + && sTrainerBattleMode != TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC) + { + switch (GetTrainerEncounterMusicId(gTrainerBattleOpponent_A)) + { + case TRAINER_ENCOUNTER_MUSIC_FEMALE: + case TRAINER_ENCOUNTER_MUSIC_GIRL: + case TRAINER_ENCOUNTER_MUSIC_TWINS: + music = MUS_SHOUJO; + break; + case TRAINER_ENCOUNTER_MUSIC_MALE: + case TRAINER_ENCOUNTER_MUSIC_INTENSE: + case TRAINER_ENCOUNTER_MUSIC_COOL: + case TRAINER_ENCOUNTER_MUSIC_SWIMMER: + case TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR: + case TRAINER_ENCOUNTER_MUSIC_HIKER: + case TRAINER_ENCOUNTER_MUSIC_INTERVIEWER: + case TRAINER_ENCOUNTER_MUSIC_RICH: + music = MUS_SHOUNEN; + break; + default: + music = MUS_ROCKET; + break; + } + PlayNewMapMusic(music); + } +} + +static const u8 *ReturnEmptyStringIfNull(const u8 *string) +{ + if (string == NULL) + return gString_Dummy; + else + return string; +} + +static const u8 *GetIntroSpeechOfApproachingTrainer(void) +{ + return ReturnEmptyStringIfNull(sTrainerAIntroSpeech); +} + +const u8 *GetTrainerALoseText(void) +{ + const u8 *string = sTrainerADefeatSpeech; + + StringExpandPlaceholders(gStringVar4, ReturnEmptyStringIfNull(string)); + return gStringVar4; +} + +const u8 *GetTrainerWonSpeech(void) +{ + StringExpandPlaceholders(gStringVar4, ReturnEmptyStringIfNull(sTrainerVictorySpeech)); + return gStringVar4; +} + +static const u8 *GetTrainerCantBattleSpeech(void) +{ + return ReturnEmptyStringIfNull(sTrainerCannotBattleSpeech); +} diff --git a/src/battle_transition.c b/src/battle_transition.c index 19d76fed1..1dbfe3aed 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -27,7 +27,7 @@ struct TransitionData u16 winOut; u16 win0H; u16 win0V; - u16 unused_A; + u16 win1H; // not used u16 win1V; u16 bldCnt; u16 bldAlpha; @@ -3175,7 +3175,7 @@ static bool8 BT_Phase2WhiteFadeInStripes_Stop(struct Task *task) DmaStop(0); SetVBlankCallback(NULL); SetHBlankCallback(NULL); - sTransitionStructPtr->win0H = 240; + sTransitionStructPtr->win0H = WIN_RANGE(0, 240); sTransitionStructPtr->bldY = 0; sTransitionStructPtr->bldCnt = BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN; sTransitionStructPtr->winIn = WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WININ_WIN0_CLR; diff --git a/src/battle_util.c b/src/battle_util.c index b8360758c..de6419ecf 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3116,14 +3116,14 @@ u8 IsMonDisobedient(void) return 0; if (HasObedientBitSet(gBattlerAttacker)) // only if species is Mew or Deoxys { - if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName) || FlagGet(FLAG_0x827)) + if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName) || FlagGet(FLAG_BADGE08_GET)) return 0; obedienceLevel = 10; - if (FlagGet(FLAG_0x821)) + if (FlagGet(FLAG_BADGE02_GET)) obedienceLevel = 30; - if (FlagGet(FLAG_0x823)) + if (FlagGet(FLAG_BADGE04_GET)) obedienceLevel = 50; - if (FlagGet(FLAG_0x825)) + if (FlagGet(FLAG_BADGE06_GET)) obedienceLevel = 70; } if (gBattleMons[gBattlerAttacker].level <= obedienceLevel) diff --git a/src/battle_util2.c b/src/battle_util2.c index d940d8508..a3a748767 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -1,6 +1,7 @@ #include "global.h" #include "bg.h" #include "battle.h" +#include "battle_anim.h" #include "pokemon.h" #include "malloc.h" #include "trainer_tower.h" diff --git a/src/berry.c b/src/berry.c index 91d83f40c..d349109d2 100644 --- a/src/berry.c +++ b/src/berry.c @@ -134,7 +134,7 @@ bool32 IsEnigmaBerryValid(void) return TRUE; } -const struct Berry * sub_809C8A0(u8 berryIdx) +const struct Berry * GetBerryInfo(u8 berryIdx) { if (berryIdx == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid()) return (struct Berry *)&gSaveBlock1Ptr->enigmaBerry.berry; @@ -163,7 +163,7 @@ u16 BerryTypeToItemId(u16 berryType) void GetBerryNameByBerryType(u8 berryType, u8 * dest) { - const struct Berry * berry = sub_809C8A0(berryType); + const struct Berry * berry = GetBerryInfo(berryType); memcpy(dest, berry->name, 6); dest[6] = EOS; } diff --git a/src/berry_powder.c b/src/berry_powder.c index 992e82522..f9d9f7dbb 100644 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -111,7 +111,7 @@ void sub_815F094(void) { struct WindowTemplate template; - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { template = SetWindowTemplateFields(0, 1, 1, 8, 3, 15, 32); gUnknown_203F464 = AddWindow(&template); diff --git a/src/cereader_tool.c b/src/cereader_tool.c index 1b25f4828..066702fe0 100644 --- a/src/cereader_tool.c +++ b/src/cereader_tool.c @@ -9,18 +9,18 @@ u8 sub_815D654(void) return (gSaveBlock1Ptr->unkArray[0].unk9 + 1) % 256; } -static bool32 ValidateTrainerTowerTrainer(struct TrainerTowerTrainer * trainer) +static bool32 ValidateTrainerTowerTrainer(struct TrainerTowerFloor * floor) { - if (trainer->unk_001 < 1 || trainer->unk_001 > 8) + if (floor->floorIdx < 1 || floor->floorIdx > 8) return FALSE; - if (trainer->unk_002 > 2) + if (floor->challengeType > 2) return FALSE; - if (CalcByteArraySum((const u8 *)trainer, offsetof(typeof(*trainer), checksum)) != trainer->checksum) + if (CalcByteArraySum((const u8 *)floor, offsetof(typeof(*floor), checksum)) != floor->checksum) return FALSE; return TRUE; } -bool32 ValidateTrainerTowerData(struct TrainerTowerData * ttdata) +bool32 ValidateTrainerTowerData(struct EReaderTrainerHillSet * ttdata) { u32 count = ttdata->count; s32 i; @@ -28,18 +28,18 @@ bool32 ValidateTrainerTowerData(struct TrainerTowerData * ttdata) return FALSE; for (i = 0; i < count; i++) { - if (!ValidateTrainerTowerTrainer(&ttdata->trainers[i])) + if (!ValidateTrainerTowerTrainer(&ttdata->floors[i])) return FALSE; } - if (CalcByteArraySum((const u8 *)ttdata->trainers, count * sizeof(ttdata->trainers[0])) != ttdata->checksum) + if (CalcByteArraySum((const u8 *)ttdata->floors, count * sizeof(ttdata->floors[0])) != ttdata->checksum) return FALSE; return TRUE; } -#define SEC30_SIZE (offsetof(struct TrainerTowerData, trainers[4])) -#define SEC31_SIZE (sizeof(struct TrainerTowerData) - SEC30_SIZE) +#define SEC30_SIZE (offsetof(struct EReaderTrainerHillSet, floors[4])) +#define SEC31_SIZE (sizeof(struct EReaderTrainerHillSet) - SEC30_SIZE) -static bool32 CEReaderTool_SaveTrainerTower_r(struct TrainerTowerData * ttdata, u8 * buffer) +static bool32 CEReaderTool_SaveTrainerTower_r(struct EReaderTrainerHillSet * ttdata, u8 * buffer) { AGB_ASSERT_EX(ttdata->dummy == 0, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/cereader_tool.c", 198); AGB_ASSERT_EX(ttdata->id == 0, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/cereader_tool.c", 199) @@ -56,7 +56,7 @@ static bool32 CEReaderTool_SaveTrainerTower_r(struct TrainerTowerData * ttdata, return TRUE; } -bool32 CEReaderTool_SaveTrainerTower(struct TrainerTowerData * ttdata) +bool32 CEReaderTool_SaveTrainerTower(struct EReaderTrainerHillSet * ttdata) { u8 * buffer = AllocZeroed(0x1000); bool32 result = CEReaderTool_SaveTrainerTower_r(ttdata, buffer); @@ -64,7 +64,7 @@ bool32 CEReaderTool_SaveTrainerTower(struct TrainerTowerData * ttdata) return result; } -static bool32 CEReaderTool_LoadTrainerTower_r(struct TrainerTowerData * ttdata, void * buffer) +static bool32 CEReaderTool_LoadTrainerTower_r(struct EReaderTrainerHillSet * ttdata, void * buffer) { if (TryCopySpecialSaveSection(30, buffer) != 1) return FALSE; @@ -79,7 +79,7 @@ static bool32 CEReaderTool_LoadTrainerTower_r(struct TrainerTowerData * ttdata, return TRUE; } -bool32 CEReaderTool_LoadTrainerTower(struct TrainerTowerData * ttdata) +bool32 CEReaderTool_LoadTrainerTower(struct EReaderTrainerHillSet * ttdata) { void * buffer = AllocZeroed(0x1000); bool32 success = CEReaderTool_LoadTrainerTower_r(ttdata, buffer); diff --git a/src/coins.c b/src/coins.c index 9de600e7f..2eaa31b2c 100644 --- a/src/coins.c +++ b/src/coins.c @@ -5,8 +5,6 @@ #include "text_window.h" #include "strings.h" -extern const u8 gUnknown_8417C2D[]; - EWRAM_DATA static u8 sCoinsWindowId = 0; #define MAX_COINS 9999 @@ -62,7 +60,7 @@ void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 void sub_80D0674(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, palette); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417C2D, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(windowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString_Parameterized(windowId, coinAmount, 0x10, 0xC, 0); } @@ -88,7 +86,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) PutWindowTilemap(sCoinsWindowId); TextWindow_SetStdFrame0_WithPal(sCoinsWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized(sCoinsWindowId, 2, gUnknown_8417C2D, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(sCoinsWindowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString(coinAmount); } diff --git a/src/credits.c b/src/credits.c index 270a4d045..ad78d875c 100644 --- a/src/credits.c +++ b/src/credits.c @@ -750,7 +750,7 @@ static void CB2_Credits(void) sCreditsMgr->unk_1D++; break; case 2: - FlagClear(0x4000); + FlagClear(FLAG_SPECIAL_FLAG_0x4000); gDisableMapMusicChangeOnMapLoad = MUSIC_DISABLE_OFF; Free(sCreditsMgr); SoftReset(RESET_ALL); @@ -797,7 +797,7 @@ static bool32 DoOverworldMapScrollScene(UNUSED u8 unused) switch (sCreditsMgr->subseqno) { case 0: - FlagSet(0x4000); + FlagSet(FLAG_SPECIAL_FLAG_0x4000); gDisableMapMusicChangeOnMapLoad = MUSIC_DISABLE_KEEP; sCreditsMgr->ovwldseqno = 0; sCreditsMgr->subseqno++; diff --git a/src/dark.c b/src/dark.c index cb34b991e..b6d13afe3 100644 --- a/src/dark.c +++ b/src/dark.c @@ -613,7 +613,7 @@ static void sub_80B82C0(u8 taskId) { case 0: task->data[5] += 8; - if (task->data[5] >= task->data[7]) + if (task->data[5] >= task->data[7]) task->data[5] = task->data[7]; sub_80B843C(task); if (task->data[5] == task->data[7]) diff --git a/src/data.c b/src/data.c new file mode 100644 index 000000000..dddeeac51 --- /dev/null +++ b/src/data.c @@ -0,0 +1,300 @@ +#include "global.h" +#include "malloc.h" +#include "battle.h" +#include "data.h" +#include "graphics.h" +#include "constants/items.h" +#include "constants/moves.h" +#include "constants/species.h" +#include "constants/trainers.h" +#include "constants/battle_ai.h" +#include "constants/trainer_classes.h" + +const struct SpriteFrameImage gUnknown_8234698[] = +{ + gHeap + 0x8000, 0x800, + gHeap + 0x8800, 0x800, + gHeap + 0x9000, 0x800, + gHeap + 0x9800, 0x800, +}; + +const struct SpriteFrameImage gUnknown_82346B8[] = +{ + gHeap + 0xA000, 0x800, + gHeap + 0xA800, 0x800, + gHeap + 0xB000, 0x800, + gHeap + 0xB800, 0x800, +}; + +const struct SpriteFrameImage gUnknown_82346D8[] = +{ + gHeap + 0xC000, 0x800, + gHeap + 0xC800, 0x800, + gHeap + 0xD000, 0x800, + gHeap + 0xD800, 0x800, +}; + +const struct SpriteFrameImage gUnknown_82346F8[] = +{ + gHeap + 0xE000, 0x800, + gHeap + 0xE800, 0x800, + gHeap + 0xF000, 0x800, + gHeap + 0xF800, 0x800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_Red[] = +{ + gTrainerBackPic_Red, 0x0800, + gTrainerBackPic_Red + 0x0800, 0x0800, + gTrainerBackPic_Red + 0x1000, 0x0800, + gTrainerBackPic_Red + 0x1800, 0x0800, + gTrainerBackPic_Red + 0x2000, 0x0800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] = +{ + gTrainerBackPic_Leaf, 0x0800, + gTrainerBackPic_Leaf + 0x0800, 0x0800, + gTrainerBackPic_Leaf + 0x1000, 0x0800, + gTrainerBackPic_Leaf + 0x1800, 0x0800, + gTrainerBackPic_Leaf + 0x2000, 0x0800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_PokeDude[] = +{ + gTrainerBackPic_PokeDude, 0x0800, + gTrainerBackPic_PokeDude + 0x0800, 0x0800, + gTrainerBackPic_PokeDude + 0x1000, 0x0800, + gTrainerBackPic_PokeDude + 0x1800, 0x0800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_OldMan[] = +{ + gTrainerBackPic_OldMan, 0x0800, + gTrainerBackPic_OldMan + 0x0800, 0x0800, + gTrainerBackPic_OldMan + 0x1000, 0x0800, + gTrainerBackPic_OldMan + 0x1800, 0x0800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_RSBrendan[] = +{ + gTrainerBackPic_RSBrendan, 0x0800, + gTrainerBackPic_RSBrendan + 0x0800, 0x0800, + gTrainerBackPic_RSBrendan + 0x1000, 0x0800, + gTrainerBackPic_RSBrendan + 0x1800, 0x0800, +}; + +const struct SpriteFrameImage gTrainerBackPicTable_RSMay[] = +{ + gTrainerBackPic_RSMay, 0x0800, + gTrainerBackPic_RSMay + 0x0800, 0x0800, + gTrainerBackPic_RSMay + 0x1000, 0x0800, + gTrainerBackPic_RSMay + 0x1800, 0x0800, +}; + +static const union AnimCmd sAnim_GeneralFrame0[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_GeneralFrame3[] = +{ + ANIMCMD_FRAME(3, 0), + ANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_82347F8[] = +{ + AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0x00), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234808[] = +{ + AFFINEANIMCMD_FRAME(0xff00, 0x0100, 0x00, 0x00), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234818[] = +{ + AFFINEANIMCMD_FRAME(0x0028, 0x0028, 0x00, 0x00), + AFFINEANIMCMD_FRAME(0x0012, 0x0012, 0x00, 0x0c), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234830[] = +{ + AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x12), + AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x0f), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234848[] = +{ + AFFINEANIMCMD_FRAME(0x00a0, 0x0100, 0x00, 0x00), + AFFINEANIMCMD_FRAME(0x0004, 0x0000, 0x00, 0x08), + AFFINEANIMCMD_FRAME(0xfffc, 0x0000, 0x00, 0x08), + AFFINEANIMCMD_JUMP(1), +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234868[] = +{ + AFFINEANIMCMD_FRAME(0x0002, 0x0002, 0x00, 0x14), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234878[] = +{ + AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x14), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234888[] = +{ + AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0000), + AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x09), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_82348A0[] = +{ + AFFINEANIMCMD_FRAME(0x0004, 0x0004, 0x00, 0x3f), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_82348B0[] = +{ + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05), + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gSpriteAffineAnimTable_82348C8[] = +{ + gSpriteAffineAnim_82347F8, + gSpriteAffineAnim_8234818, + gSpriteAffineAnim_8234830, + gSpriteAffineAnim_8234848, + gSpriteAffineAnim_8234868, + gSpriteAffineAnim_8234878, + gSpriteAffineAnim_82348A0, + gSpriteAffineAnim_82348B0, + gSpriteAffineAnim_8234888, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_82348EC[] = +{ + AFFINEANIMCMD_FRAME(0xfffc, 0xfffc, 0x04, 0x3f), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_82348FC[] = +{ + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05), + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234914[] = +{ + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfb, 0x14), + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x00, 0x14), + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x05, 0x14), + AFFINEANIMCMD_END, +}; + +static const union AffineAnimCmd gSpriteAffineAnim_8234934[] = +{ + AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x09, 0x6e), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gSpriteAffineAnimTable_8234944[] = +{ + gSpriteAffineAnim_82347F8, + gSpriteAffineAnim_8234818, + gSpriteAffineAnim_8234830, + gSpriteAffineAnim_8234848, + gSpriteAffineAnim_8234868, + gSpriteAffineAnim_8234878, + gSpriteAffineAnim_82348EC, + gSpriteAffineAnim_82348FC, + gSpriteAffineAnim_8234914, + gSpriteAffineAnim_8234888, + gSpriteAffineAnim_8234934, +}; + +const union AffineAnimCmd *const gSpriteAffineAnimTable_82349470[] = +{ + gSpriteAffineAnim_8234808, + gSpriteAffineAnim_8234818, + gSpriteAffineAnim_8234830, + gSpriteAffineAnim_8234848, + gSpriteAffineAnim_8234868, + gSpriteAffineAnim_8234878, + gSpriteAffineAnim_82348EC, + gSpriteAffineAnim_82348FC, + gSpriteAffineAnim_8234914, + gSpriteAffineAnim_8234888, + gSpriteAffineAnim_8234934, +}; + +static const union AnimCmd gSpriteAnim_823499C[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END, +}; + +static const union AnimCmd gSpriteAnim_82349A4[] = +{ + ANIMCMD_FRAME(1, 0), + ANIMCMD_END, +}; + +static const union AnimCmd gSpriteAnim_82349AC[] = +{ + ANIMCMD_FRAME(2, 0), + ANIMCMD_END, +}; + +static const union AnimCmd gSpriteAnim_82349B4[] = +{ + ANIMCMD_FRAME(3, 0), + ANIMCMD_END, +}; + +const union AnimCmd *const gSpriteAnimTable_82349BC[] = +{ + gSpriteAnim_823499C, + gSpriteAnim_82349A4, + gSpriteAnim_82349AC, + gSpriteAnim_82349B4, +}; + +#define SPECIES_SPRITE(species, sprite) [SPECIES_##species] = {sprite, 0x800, SPECIES_##species} +#define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species} +#define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG} + +#define TRAINER_SPRITE(trainerPic, sprite, size) [TRAINER_PIC_##trainerPic] = {sprite, size, TRAINER_PIC_##trainerPic} +#define TRAINER_PAL(trainerPic, pal) [TRAINER_PIC_##trainerPic] = {pal, TRAINER_PIC_##trainerPic} + +#include "data/pokemon_graphics/front_pic_coordinates.h" +#include "data/pokemon_graphics/front_pic_table.h" +#include "data/pokemon_graphics/back_pic_coordinates.h" +#include "data/pokemon_graphics/back_pic_table.h" +#include "data/pokemon_graphics/palette_table.h" +#include "data/pokemon_graphics/shiny_palette_table.h" + +#include "data/trainer_graphics/front_pic_anims.h" +#include "data/trainer_graphics/front_pic_tables.h" +#include "data/trainer_graphics/back_pic_anims.h" +#include "data/trainer_graphics/back_pic_tables.h" + +#include "data/pokemon_graphics/enemy_mon_elevation.h" + +#include "data/trainer_parties.h" +#include "data/text/trainer_class_names.h" +#include "data/trainers.h" +#include "data/text/species_names.h" +#include "data/text/move_names.h" diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h new file mode 100644 index 000000000..b8a96febc --- /dev/null +++ b/src/data/pokemon_graphics/back_pic_coordinates.h @@ -0,0 +1,2204 @@ +const struct MonCoords gMonBackPicCoords[] = +{ + [SPECIES_NONE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_BULBASAUR] = + { + .size = 0x64, + .y_offset = 0x10, + }, + [SPECIES_IVYSAUR] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_VENUSAUR] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_CHARMANDER] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_CHARMELEON] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_CHARIZARD] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_SQUIRTLE] = + { + .size = 0x75, + .y_offset = 0x0f, + }, + [SPECIES_WARTORTLE] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_BLASTOISE] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_CATERPIE] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_METAPOD] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_BUTTERFREE] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_WEEDLE] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_KAKUNA] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_BEEDRILL] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_PIDGEY] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_PIDGEOTTO] = + { + .size = 0x85, + .y_offset = 0x0c, + }, + [SPECIES_PIDGEOT] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_RATTATA] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_RATICATE] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_SPEAROW] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_FEAROW] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_EKANS] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_ARBOK] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_PIKACHU] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_RAICHU] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_SANDSHREW] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_SANDSLASH] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_NIDORAN_F] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_NIDORINA] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_NIDOQUEEN] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_NIDORAN_M] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_NIDORINO] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_NIDOKING] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_CLEFAIRY] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_CLEFABLE] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_VULPIX] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_NINETALES] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_JIGGLYPUFF] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_WIGGLYTUFF] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_ZUBAT] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_GOLBAT] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_ODDISH] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_GLOOM] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_VILEPLUME] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_PARAS] = + { + .size = 0x63, + .y_offset = 0x14, + }, + [SPECIES_PARASECT] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_VENONAT] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_VENOMOTH] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_DIGLETT] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_DUGTRIO] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_MEOWTH] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_PERSIAN] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_PSYDUCK] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_GOLDUCK] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_MANKEY] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_PRIMEAPE] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_GROWLITHE] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_ARCANINE] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_POLIWAG] = + { + .size = 0x74, + .y_offset = 0x10, + }, + [SPECIES_POLIWHIRL] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_POLIWRATH] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_ABRA] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_KADABRA] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_ALAKAZAM] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_MACHOP] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_MACHOKE] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_MACHAMP] = + { + .size = 0x67, + .y_offset = 0x04, + }, + [SPECIES_BELLSPROUT] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_WEEPINBELL] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_VICTREEBEL] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_TENTACOOL] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_TENTACRUEL] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_GEODUDE] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_GRAVELER] = + { + .size = 0x75, + .y_offset = 0x0c, + }, + [SPECIES_GOLEM] = + { + .size = 0x84, + .y_offset = 0x10, + }, + [SPECIES_PONYTA] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_RAPIDASH] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_SLOWPOKE] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_SLOWBRO] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_MAGNEMITE] = + { + .size = 0x43, + .y_offset = 0x14, + }, + [SPECIES_MAGNETON] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_FARFETCHD] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_DODUO] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_DODRIO] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SEEL] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_DEWGONG] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_GRIMER] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_MUK] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_SHELLDER] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_CLOYSTER] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_GASTLY] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_HAUNTER] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_GENGAR] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_ONIX] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_DROWZEE] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_HYPNO] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_KRABBY] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_KINGLER] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_VOLTORB] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_ELECTRODE] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_EXEGGCUTE] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_EXEGGUTOR] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_CUBONE] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_MAROWAK] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_HITMONLEE] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_HITMONCHAN] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_LICKITUNG] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_KOFFING] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_WEEZING] = + { + .size = 0x85, + .y_offset = 0x0c, + }, + [SPECIES_RHYHORN] = + { + .size = 0x85, + .y_offset = 0x0c, + }, + [SPECIES_RHYDON] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_CHANSEY] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_TANGELA] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_KANGASKHAN] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_HORSEA] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_SEADRA] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_GOLDEEN] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_SEAKING] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_STARYU] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_STARMIE] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_MR_MIME] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_SCYTHER] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_JYNX] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_ELECTABUZZ] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_MAGMAR] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_PINSIR] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_TAUROS] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_MAGIKARP] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_GYARADOS] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LAPRAS] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_DITTO] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_EEVEE] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_VAPOREON] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_JOLTEON] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_FLAREON] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_PORYGON] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_OMANYTE] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_OMASTAR] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_KABUTO] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_KABUTOPS] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_AERODACTYL] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SNORLAX] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_ARTICUNO] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_ZAPDOS] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_MOLTRES] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_DRATINI] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_DRAGONAIR] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_DRAGONITE] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_MEWTWO] = + { + .size = 0x78, + .y_offset = 0x01, + }, + [SPECIES_MEW] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CHIKORITA] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_BAYLEEF] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_MEGANIUM] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_CYNDAQUIL] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_QUILAVA] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_TYPHLOSION] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_TOTODILE] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_CROCONAW] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_FERALIGATR] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SENTRET] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_FURRET] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_HOOTHOOT] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_NOCTOWL] = + { + .size = 0x68, + .y_offset = 0x03, + }, + [SPECIES_LEDYBA] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_LEDIAN] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_SPINARAK] = + { + .size = 0x73, + .y_offset = 0x15, + }, + [SPECIES_ARIADOS] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_CROBAT] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_CHINCHOU] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_LANTURN] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_PICHU] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_CLEFFA] = + { + .size = 0x65, + .y_offset = 0x0f, + }, + [SPECIES_IGGLYBUFF] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_TOGEPI] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_TOGETIC] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_NATU] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_XATU] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_MAREEP] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_FLAAFFY] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_AMPHAROS] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_BELLOSSOM] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_MARILL] = + { + .size = 0x75, + .y_offset = 0x0c, + }, + [SPECIES_AZUMARILL] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SUDOWOODO] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_POLITOED] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_HOPPIP] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_SKIPLOOM] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_JUMPLUFF] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_AIPOM] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_SUNKERN] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_SUNFLORA] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_YANMA] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_WOOPER] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_QUAGSIRE] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_ESPEON] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_UMBREON] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_MURKROW] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_SLOWKING] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_MISDREAVUS] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN] = + { + .size = 0x36, + .y_offset = 0x08, + }, + [SPECIES_WOBBUFFET] = + { + .size = 0x75, + .y_offset = 0x0c, + }, + [SPECIES_GIRAFARIG] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_PINECO] = + { + .size = 0x65, + .y_offset = 0x0f, + }, + [SPECIES_FORRETRESS] = + { + .size = 0x84, + .y_offset = 0x10, + }, + [SPECIES_DUNSPARCE] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_GLIGAR] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_STEELIX] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SNUBBULL] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_GRANBULL] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_QWILFISH] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_SCIZOR] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_SHUCKLE] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_HERACROSS] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_SNEASEL] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_TEDDIURSA] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_URSARING] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_SLUGMA] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_MAGCARGO] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_SWINUB] = + { + .size = 0x63, + .y_offset = 0x15, + }, + [SPECIES_PILOSWINE] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_CORSOLA] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_REMORAID] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_OCTILLERY] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_DELIBIRD] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_MANTINE] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_SKARMORY] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_HOUNDOUR] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_HOUNDOOM] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_KINGDRA] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_PHANPY] = + { + .size = 0x65, + .y_offset = 0x0e, + }, + [SPECIES_DONPHAN] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_PORYGON2] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_STANTLER] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_SMEARGLE] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_TYROGUE] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_HITMONTOP] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_SMOOCHUM] = + { + .size = 0x56, + .y_offset = 0x09, + }, + [SPECIES_ELEKID] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_MAGBY] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_MILTANK] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_BLISSEY] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_RAIKOU] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_ENTEI] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_SUICUNE] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_LARVITAR] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_PUPITAR] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_TYRANITAR] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LUGIA] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_HO_OH] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CELEBI] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_OLD_UNOWN_B] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_C] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_D] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_E] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_F] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_G] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_H] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_I] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_J] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_K] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_L] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_M] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_N] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_O] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_P] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_Q] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_R] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_S] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_T] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_U] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_V] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_W] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_X] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_Y] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_OLD_UNOWN_Z] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_TREECKO] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_GROVYLE] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SCEPTILE] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_TORCHIC] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_COMBUSKEN] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_BLAZIKEN] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_MUDKIP] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_MARSHTOMP] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_SWAMPERT] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_POOCHYENA] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_MIGHTYENA] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_ZIGZAGOON] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_LINOONE] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_WURMPLE] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_SILCOON] = + { + .size = 0x83, + .y_offset = 0x15, + }, + [SPECIES_BEAUTIFLY] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CASCOON] = + { + .size = 0x73, + .y_offset = 0x14, + }, + [SPECIES_DUSTOX] = + { + .size = 0x83, + .y_offset = 0x14, + }, + [SPECIES_LOTAD] = + { + .size = 0x75, + .y_offset = 0x0f, + }, + [SPECIES_LOMBRE] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_LUDICOLO] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SEEDOT] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_NUZLEAF] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_SHIFTRY] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_NINCADA] = + { + .size = 0x83, + .y_offset = 0x14, + }, + [SPECIES_NINJASK] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SHEDINJA] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_TAILLOW] = + { + .size = 0x64, + .y_offset = 0x11, + }, + [SPECIES_SWELLOW] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SHROOMISH] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_BRELOOM] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_SPINDA] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_WINGULL] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_PELIPPER] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_SURSKIT] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_MASQUERAIN] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_WAILMER] = + { + .size = 0x83, + .y_offset = 0x15, + }, + [SPECIES_WAILORD] = + { + .size = 0x83, + .y_offset = 0x16, + }, + [SPECIES_SKITTY] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_DELCATTY] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_KECLEON] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_BALTOY] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_CLAYDOL] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_NOSEPASS] = + { + .size = 0x85, + .y_offset = 0x0c, + }, + [SPECIES_TORKOAL] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SABLEYE] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_BARBOACH] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_WHISCASH] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_LUVDISC] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_CORPHISH] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_CRAWDAUNT] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_FEEBAS] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_MILOTIC] = + { + .size = 0x68, + .y_offset = 0x02, + }, + [SPECIES_CARVANHA] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_SHARPEDO] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_TRAPINCH] = + { + .size = 0x75, + .y_offset = 0x0e, + }, + [SPECIES_VIBRAVA] = + { + .size = 0x74, + .y_offset = 0x11, + }, + [SPECIES_FLYGON] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_MAKUHITA] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_HARIYAMA] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_ELECTRIKE] = + { + .size = 0x84, + .y_offset = 0x10, + }, + [SPECIES_MANECTRIC] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_NUMEL] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_CAMERUPT] = + { + .size = 0x84, + .y_offset = 0x13, + }, + [SPECIES_SPHEAL] = + { + .size = 0x64, + .y_offset = 0x12, + }, + [SPECIES_SEALEO] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_WALREIN] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_CACNEA] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_CACTURNE] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_SNORUNT] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_GLALIE] = + { + .size = 0x85, + .y_offset = 0x0c, + }, + [SPECIES_LUNATONE] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_SOLROCK] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_AZURILL] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SPOINK] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_GRUMPIG] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_PLUSLE] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_MINUN] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_MAWILE] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_MEDITITE] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_MEDICHAM] = + { + .size = 0x68, + .y_offset = 0x03, + }, + [SPECIES_SWABLU] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_ALTARIA] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_WYNAUT] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_DUSKULL] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_DUSCLOPS] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_ROSELIA] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_SLAKOTH] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_VIGOROTH] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SLAKING] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_GULPIN] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_SWALOT] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_TROPIUS] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_WHISMUR] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_LOUDRED] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_EXPLOUD] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_CLAMPERL] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_HUNTAIL] = + { + .size = 0x68, + .y_offset = 0x02, + }, + [SPECIES_GOREBYSS] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_ABSOL] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_SHUPPET] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_BANETTE] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_SEVIPER] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_ZANGOOSE] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_RELICANTH] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_ARON] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_LAIRON] = + { + .size = 0x84, + .y_offset = 0x11, + }, + [SPECIES_AGGRON] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_CASTFORM] = + { + .size = 0x45, + .y_offset = 0x0d, + }, + [SPECIES_VOLBEAT] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_ILLUMISE] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_LILEEP] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_CRADILY] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_ANORITH] = + { + .size = 0x83, + .y_offset = 0x17, + }, + [SPECIES_ARMALDO] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_RALTS] = + { + .size = 0x45, + .y_offset = 0x0d, + }, + [SPECIES_KIRLIA] = + { + .size = 0x57, + .y_offset = 0x06, + }, + [SPECIES_GARDEVOIR] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_BAGON] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_SHELGON] = + { + .size = 0x85, + .y_offset = 0x0d, + }, + [SPECIES_SALAMENCE] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_BELDUM] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_METANG] = + { + .size = 0x84, + .y_offset = 0x10, + }, + [SPECIES_METAGROSS] = + { + .size = 0x83, + .y_offset = 0x14, + }, + [SPECIES_REGIROCK] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_REGICE] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_REGISTEEL] = + { + .size = 0x85, + .y_offset = 0x0e, + }, + [SPECIES_KYOGRE] = + { + .size = 0x84, + .y_offset = 0x13, + }, + [SPECIES_GROUDON] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_RAYQUAZA] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_LATIAS] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_LATIOS] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_JIRACHI] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_DEOXYS] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_CHIMECHO] = + { + .size = 0x47, + .y_offset = 0x07, + }, + [SPECIES_EGG] = + { + .size = 0x36, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_B] = + { + .size = 0x56, + .y_offset = 0x09, + }, + [SPECIES_UNOWN_C] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_UNOWN_D] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_UNOWN_E] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_F] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_G] = + { + .size = 0x57, + .y_offset = 0x05, + }, + [SPECIES_UNOWN_H] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_UNOWN_I] = + { + .size = 0x37, + .y_offset = 0x07, + }, + [SPECIES_UNOWN_J] = + { + .size = 0x46, + .y_offset = 0x09, + }, + [SPECIES_UNOWN_K] = + { + .size = 0x57, + .y_offset = 0x07, + }, + [SPECIES_UNOWN_L] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_M] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_UNOWN_N] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_UNOWN_O] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_UNOWN_P] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_Q] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_UNOWN_R] = + { + .size = 0x45, + .y_offset = 0x0c, + }, + [SPECIES_UNOWN_S] = + { + .size = 0x57, + .y_offset = 0x04, + }, + [SPECIES_UNOWN_T] = + { + .size = 0x45, + .y_offset = 0x0d, + }, + [SPECIES_UNOWN_U] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_UNOWN_V] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_UNOWN_W] = + { + .size = 0x55, + .y_offset = 0x0d, + }, + [SPECIES_UNOWN_X] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_UNOWN_Y] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_Z] = + { + .size = 0x46, + .y_offset = 0x0a, + }, + [SPECIES_UNOWN_EMARK] = + { + .size = 0x37, + .y_offset = 0x06, + }, + [SPECIES_UNOWN_QMARK] = + { + .size = 0x47, + .y_offset = 0x06, + }, +}; + diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h new file mode 100644 index 000000000..60ee8fed1 --- /dev/null +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -0,0 +1,443 @@ +const struct CompressedSpriteSheet gMonBackPicTable[] = +{ + SPECIES_SPRITE(NONE, gMonBackPic_CircledQuestionMark), + SPECIES_SPRITE(BULBASAUR, gMonBackPic_Bulbasaur), + SPECIES_SPRITE(IVYSAUR, gMonBackPic_Ivysaur), + SPECIES_SPRITE(VENUSAUR, gMonBackPic_Venusaur), + SPECIES_SPRITE(CHARMANDER, gMonBackPic_Charmander), + SPECIES_SPRITE(CHARMELEON, gMonBackPic_Charmeleon), + SPECIES_SPRITE(CHARIZARD, gMonBackPic_Charizard), + SPECIES_SPRITE(SQUIRTLE, gMonBackPic_Squirtle), + SPECIES_SPRITE(WARTORTLE, gMonBackPic_Wartortle), + SPECIES_SPRITE(BLASTOISE, gMonBackPic_Blastoise), + SPECIES_SPRITE(CATERPIE, gMonBackPic_Caterpie), + SPECIES_SPRITE(METAPOD, gMonBackPic_Metapod), + SPECIES_SPRITE(BUTTERFREE, gMonBackPic_Butterfree), + SPECIES_SPRITE(WEEDLE, gMonBackPic_Weedle), + SPECIES_SPRITE(KAKUNA, gMonBackPic_Kakuna), + SPECIES_SPRITE(BEEDRILL, gMonBackPic_Beedrill), + SPECIES_SPRITE(PIDGEY, gMonBackPic_Pidgey), + SPECIES_SPRITE(PIDGEOTTO, gMonBackPic_Pidgeotto), + SPECIES_SPRITE(PIDGEOT, gMonBackPic_Pidgeot), + SPECIES_SPRITE(RATTATA, gMonBackPic_Rattata), + SPECIES_SPRITE(RATICATE, gMonBackPic_Raticate), + SPECIES_SPRITE(SPEAROW, gMonBackPic_Spearow), + SPECIES_SPRITE(FEAROW, gMonBackPic_Fearow), + SPECIES_SPRITE(EKANS, gMonBackPic_Ekans), + SPECIES_SPRITE(ARBOK, gMonBackPic_Arbok), + SPECIES_SPRITE(PIKACHU, gMonBackPic_Pikachu), + SPECIES_SPRITE(RAICHU, gMonBackPic_Raichu), + SPECIES_SPRITE(SANDSHREW, gMonBackPic_Sandshrew), + SPECIES_SPRITE(SANDSLASH, gMonBackPic_Sandslash), + SPECIES_SPRITE(NIDORAN_F, gMonBackPic_NidoranF), + SPECIES_SPRITE(NIDORINA, gMonBackPic_Nidorina), + SPECIES_SPRITE(NIDOQUEEN, gMonBackPic_Nidoqueen), + SPECIES_SPRITE(NIDORAN_M, gMonBackPic_NidoranM), + SPECIES_SPRITE(NIDORINO, gMonBackPic_Nidorino), + SPECIES_SPRITE(NIDOKING, gMonBackPic_Nidoking), + SPECIES_SPRITE(CLEFAIRY, gMonBackPic_Clefairy), + SPECIES_SPRITE(CLEFABLE, gMonBackPic_Clefable), + SPECIES_SPRITE(VULPIX, gMonBackPic_Vulpix), + SPECIES_SPRITE(NINETALES, gMonBackPic_Ninetales), + SPECIES_SPRITE(JIGGLYPUFF, gMonBackPic_Jigglypuff), + SPECIES_SPRITE(WIGGLYTUFF, gMonBackPic_Wigglytuff), + SPECIES_SPRITE(ZUBAT, gMonBackPic_Zubat), + SPECIES_SPRITE(GOLBAT, gMonBackPic_Golbat), + SPECIES_SPRITE(ODDISH, gMonBackPic_Oddish), + SPECIES_SPRITE(GLOOM, gMonBackPic_Gloom), + SPECIES_SPRITE(VILEPLUME, gMonBackPic_Vileplume), + SPECIES_SPRITE(PARAS, gMonBackPic_Paras), + SPECIES_SPRITE(PARASECT, gMonBackPic_Parasect), + SPECIES_SPRITE(VENONAT, gMonBackPic_Venonat), + SPECIES_SPRITE(VENOMOTH, gMonBackPic_Venomoth), + SPECIES_SPRITE(DIGLETT, gMonBackPic_Diglett), + SPECIES_SPRITE(DUGTRIO, gMonBackPic_Dugtrio), + SPECIES_SPRITE(MEOWTH, gMonBackPic_Meowth), + SPECIES_SPRITE(PERSIAN, gMonBackPic_Persian), + SPECIES_SPRITE(PSYDUCK, gMonBackPic_Psyduck), + SPECIES_SPRITE(GOLDUCK, gMonBackPic_Golduck), + SPECIES_SPRITE(MANKEY, gMonBackPic_Mankey), + SPECIES_SPRITE(PRIMEAPE, gMonBackPic_Primeape), + SPECIES_SPRITE(GROWLITHE, gMonBackPic_Growlithe), + SPECIES_SPRITE(ARCANINE, gMonBackPic_Arcanine), + SPECIES_SPRITE(POLIWAG, gMonBackPic_Poliwag), + SPECIES_SPRITE(POLIWHIRL, gMonBackPic_Poliwhirl), + SPECIES_SPRITE(POLIWRATH, gMonBackPic_Poliwrath), + SPECIES_SPRITE(ABRA, gMonBackPic_Abra), + SPECIES_SPRITE(KADABRA, gMonBackPic_Kadabra), + SPECIES_SPRITE(ALAKAZAM, gMonBackPic_Alakazam), + SPECIES_SPRITE(MACHOP, gMonBackPic_Machop), + SPECIES_SPRITE(MACHOKE, gMonBackPic_Machoke), + SPECIES_SPRITE(MACHAMP, gMonBackPic_Machamp), + SPECIES_SPRITE(BELLSPROUT, gMonBackPic_Bellsprout), + SPECIES_SPRITE(WEEPINBELL, gMonBackPic_Weepinbell), + SPECIES_SPRITE(VICTREEBEL, gMonBackPic_Victreebel), + SPECIES_SPRITE(TENTACOOL, gMonBackPic_Tentacool), + SPECIES_SPRITE(TENTACRUEL, gMonBackPic_Tentacruel), + SPECIES_SPRITE(GEODUDE, gMonBackPic_Geodude), + SPECIES_SPRITE(GRAVELER, gMonBackPic_Graveler), + SPECIES_SPRITE(GOLEM, gMonBackPic_Golem), + SPECIES_SPRITE(PONYTA, gMonBackPic_Ponyta), + SPECIES_SPRITE(RAPIDASH, gMonBackPic_Rapidash), + SPECIES_SPRITE(SLOWPOKE, gMonBackPic_Slowpoke), + SPECIES_SPRITE(SLOWBRO, gMonBackPic_Slowbro), + SPECIES_SPRITE(MAGNEMITE, gMonBackPic_Magnemite), + SPECIES_SPRITE(MAGNETON, gMonBackPic_Magneton), + SPECIES_SPRITE(FARFETCHD, gMonBackPic_Farfetchd), + SPECIES_SPRITE(DODUO, gMonBackPic_Doduo), + SPECIES_SPRITE(DODRIO, gMonBackPic_Dodrio), + SPECIES_SPRITE(SEEL, gMonBackPic_Seel), + SPECIES_SPRITE(DEWGONG, gMonBackPic_Dewgong), + SPECIES_SPRITE(GRIMER, gMonBackPic_Grimer), + SPECIES_SPRITE(MUK, gMonBackPic_Muk), + SPECIES_SPRITE(SHELLDER, gMonBackPic_Shellder), + SPECIES_SPRITE(CLOYSTER, gMonBackPic_Cloyster), + SPECIES_SPRITE(GASTLY, gMonBackPic_Gastly), + SPECIES_SPRITE(HAUNTER, gMonBackPic_Haunter), + SPECIES_SPRITE(GENGAR, gMonBackPic_Gengar), + SPECIES_SPRITE(ONIX, gMonBackPic_Onix), + SPECIES_SPRITE(DROWZEE, gMonBackPic_Drowzee), + SPECIES_SPRITE(HYPNO, gMonBackPic_Hypno), + SPECIES_SPRITE(KRABBY, gMonBackPic_Krabby), + SPECIES_SPRITE(KINGLER, gMonBackPic_Kingler), + SPECIES_SPRITE(VOLTORB, gMonBackPic_Voltorb), + SPECIES_SPRITE(ELECTRODE, gMonBackPic_Electrode), + SPECIES_SPRITE(EXEGGCUTE, gMonBackPic_Exeggcute), + SPECIES_SPRITE(EXEGGUTOR, gMonBackPic_Exeggutor), + SPECIES_SPRITE(CUBONE, gMonBackPic_Cubone), + SPECIES_SPRITE(MAROWAK, gMonBackPic_Marowak), + SPECIES_SPRITE(HITMONLEE, gMonBackPic_Hitmonlee), + SPECIES_SPRITE(HITMONCHAN, gMonBackPic_Hitmonchan), + SPECIES_SPRITE(LICKITUNG, gMonBackPic_Lickitung), + SPECIES_SPRITE(KOFFING, gMonBackPic_Koffing), + SPECIES_SPRITE(WEEZING, gMonBackPic_Weezing), + SPECIES_SPRITE(RHYHORN, gMonBackPic_Rhyhorn), + SPECIES_SPRITE(RHYDON, gMonBackPic_Rhydon), + SPECIES_SPRITE(CHANSEY, gMonBackPic_Chansey), + SPECIES_SPRITE(TANGELA, gMonBackPic_Tangela), + SPECIES_SPRITE(KANGASKHAN, gMonBackPic_Kangaskhan), + SPECIES_SPRITE(HORSEA, gMonBackPic_Horsea), + SPECIES_SPRITE(SEADRA, gMonBackPic_Seadra), + SPECIES_SPRITE(GOLDEEN, gMonBackPic_Goldeen), + SPECIES_SPRITE(SEAKING, gMonBackPic_Seaking), + SPECIES_SPRITE(STARYU, gMonBackPic_Staryu), + SPECIES_SPRITE(STARMIE, gMonBackPic_Starmie), + SPECIES_SPRITE(MR_MIME, gMonBackPic_Mrmime), + SPECIES_SPRITE(SCYTHER, gMonBackPic_Scyther), + SPECIES_SPRITE(JYNX, gMonBackPic_Jynx), + SPECIES_SPRITE(ELECTABUZZ, gMonBackPic_Electabuzz), + SPECIES_SPRITE(MAGMAR, gMonBackPic_Magmar), + SPECIES_SPRITE(PINSIR, gMonBackPic_Pinsir), + SPECIES_SPRITE(TAUROS, gMonBackPic_Tauros), + SPECIES_SPRITE(MAGIKARP, gMonBackPic_Magikarp), + SPECIES_SPRITE(GYARADOS, gMonBackPic_Gyarados), + SPECIES_SPRITE(LAPRAS, gMonBackPic_Lapras), + SPECIES_SPRITE(DITTO, gMonBackPic_Ditto), + SPECIES_SPRITE(EEVEE, gMonBackPic_Eevee), + SPECIES_SPRITE(VAPOREON, gMonBackPic_Vaporeon), + SPECIES_SPRITE(JOLTEON, gMonBackPic_Jolteon), + SPECIES_SPRITE(FLAREON, gMonBackPic_Flareon), + SPECIES_SPRITE(PORYGON, gMonBackPic_Porygon), + SPECIES_SPRITE(OMANYTE, gMonBackPic_Omanyte), + SPECIES_SPRITE(OMASTAR, gMonBackPic_Omastar), + SPECIES_SPRITE(KABUTO, gMonBackPic_Kabuto), + SPECIES_SPRITE(KABUTOPS, gMonBackPic_Kabutops), + SPECIES_SPRITE(AERODACTYL, gMonBackPic_Aerodactyl), + SPECIES_SPRITE(SNORLAX, gMonBackPic_Snorlax), + SPECIES_SPRITE(ARTICUNO, gMonBackPic_Articuno), + SPECIES_SPRITE(ZAPDOS, gMonBackPic_Zapdos), + SPECIES_SPRITE(MOLTRES, gMonBackPic_Moltres), + SPECIES_SPRITE(DRATINI, gMonBackPic_Dratini), + SPECIES_SPRITE(DRAGONAIR, gMonBackPic_Dragonair), + SPECIES_SPRITE(DRAGONITE, gMonBackPic_Dragonite), + SPECIES_SPRITE(MEWTWO, gMonBackPic_Mewtwo), + SPECIES_SPRITE(MEW, gMonBackPic_Mew), + SPECIES_SPRITE(CHIKORITA, gMonBackPic_Chikorita), + SPECIES_SPRITE(BAYLEEF, gMonBackPic_Bayleef), + SPECIES_SPRITE(MEGANIUM, gMonBackPic_Meganium), + SPECIES_SPRITE(CYNDAQUIL, gMonBackPic_Cyndaquil), + SPECIES_SPRITE(QUILAVA, gMonBackPic_Quilava), + SPECIES_SPRITE(TYPHLOSION, gMonBackPic_Typhlosion), + SPECIES_SPRITE(TOTODILE, gMonBackPic_Totodile), + SPECIES_SPRITE(CROCONAW, gMonBackPic_Croconaw), + SPECIES_SPRITE(FERALIGATR, gMonBackPic_Feraligatr), + SPECIES_SPRITE(SENTRET, gMonBackPic_Sentret), + SPECIES_SPRITE(FURRET, gMonBackPic_Furret), + SPECIES_SPRITE(HOOTHOOT, gMonBackPic_Hoothoot), + SPECIES_SPRITE(NOCTOWL, gMonBackPic_Noctowl), + SPECIES_SPRITE(LEDYBA, gMonBackPic_Ledyba), + SPECIES_SPRITE(LEDIAN, gMonBackPic_Ledian), + SPECIES_SPRITE(SPINARAK, gMonBackPic_Spinarak), + SPECIES_SPRITE(ARIADOS, gMonBackPic_Ariados), + SPECIES_SPRITE(CROBAT, gMonBackPic_Crobat), + SPECIES_SPRITE(CHINCHOU, gMonBackPic_Chinchou), + SPECIES_SPRITE(LANTURN, gMonBackPic_Lanturn), + SPECIES_SPRITE(PICHU, gMonBackPic_Pichu), + SPECIES_SPRITE(CLEFFA, gMonBackPic_Cleffa), + SPECIES_SPRITE(IGGLYBUFF, gMonBackPic_Igglybuff), + SPECIES_SPRITE(TOGEPI, gMonBackPic_Togepi), + SPECIES_SPRITE(TOGETIC, gMonBackPic_Togetic), + SPECIES_SPRITE(NATU, gMonBackPic_Natu), + SPECIES_SPRITE(XATU, gMonBackPic_Xatu), + SPECIES_SPRITE(MAREEP, gMonBackPic_Mareep), + SPECIES_SPRITE(FLAAFFY, gMonBackPic_Flaaffy), + SPECIES_SPRITE(AMPHAROS, gMonBackPic_Ampharos), + SPECIES_SPRITE(BELLOSSOM, gMonBackPic_Bellossom), + SPECIES_SPRITE(MARILL, gMonBackPic_Marill), + SPECIES_SPRITE(AZUMARILL, gMonBackPic_Azumarill), + SPECIES_SPRITE(SUDOWOODO, gMonBackPic_Sudowoodo), + SPECIES_SPRITE(POLITOED, gMonBackPic_Politoed), + SPECIES_SPRITE(HOPPIP, gMonBackPic_Hoppip), + SPECIES_SPRITE(SKIPLOOM, gMonBackPic_Skiploom), + SPECIES_SPRITE(JUMPLUFF, gMonBackPic_Jumpluff), + SPECIES_SPRITE(AIPOM, gMonBackPic_Aipom), + SPECIES_SPRITE(SUNKERN, gMonBackPic_Sunkern), + SPECIES_SPRITE(SUNFLORA, gMonBackPic_Sunflora), + SPECIES_SPRITE(YANMA, gMonBackPic_Yanma), + SPECIES_SPRITE(WOOPER, gMonBackPic_Wooper), + SPECIES_SPRITE(QUAGSIRE, gMonBackPic_Quagsire), + SPECIES_SPRITE(ESPEON, gMonBackPic_Espeon), + SPECIES_SPRITE(UMBREON, gMonBackPic_Umbreon), + SPECIES_SPRITE(MURKROW, gMonBackPic_Murkrow), + SPECIES_SPRITE(SLOWKING, gMonBackPic_Slowking), + SPECIES_SPRITE(MISDREAVUS, gMonBackPic_Misdreavus), + SPECIES_SPRITE(UNOWN, gMonBackPic_UnownA), + SPECIES_SPRITE(WOBBUFFET, gMonBackPic_Wobbuffet), + SPECIES_SPRITE(GIRAFARIG, gMonBackPic_Girafarig), + SPECIES_SPRITE(PINECO, gMonBackPic_Pineco), + SPECIES_SPRITE(FORRETRESS, gMonBackPic_Forretress), + SPECIES_SPRITE(DUNSPARCE, gMonBackPic_Dunsparce), + SPECIES_SPRITE(GLIGAR, gMonBackPic_Gligar), + SPECIES_SPRITE(STEELIX, gMonBackPic_Steelix), + SPECIES_SPRITE(SNUBBULL, gMonBackPic_Snubbull), + SPECIES_SPRITE(GRANBULL, gMonBackPic_Granbull), + SPECIES_SPRITE(QWILFISH, gMonBackPic_Qwilfish), + SPECIES_SPRITE(SCIZOR, gMonBackPic_Scizor), + SPECIES_SPRITE(SHUCKLE, gMonBackPic_Shuckle), + SPECIES_SPRITE(HERACROSS, gMonBackPic_Heracross), + SPECIES_SPRITE(SNEASEL, gMonBackPic_Sneasel), + SPECIES_SPRITE(TEDDIURSA, gMonBackPic_Teddiursa), + SPECIES_SPRITE(URSARING, gMonBackPic_Ursaring), + SPECIES_SPRITE(SLUGMA, gMonBackPic_Slugma), + SPECIES_SPRITE(MAGCARGO, gMonBackPic_Magcargo), + SPECIES_SPRITE(SWINUB, gMonBackPic_Swinub), + SPECIES_SPRITE(PILOSWINE, gMonBackPic_Piloswine), + SPECIES_SPRITE(CORSOLA, gMonBackPic_Corsola), + SPECIES_SPRITE(REMORAID, gMonBackPic_Remoraid), + SPECIES_SPRITE(OCTILLERY, gMonBackPic_Octillery), + SPECIES_SPRITE(DELIBIRD, gMonBackPic_Delibird), + SPECIES_SPRITE(MANTINE, gMonBackPic_Mantine), + SPECIES_SPRITE(SKARMORY, gMonBackPic_Skarmory), + SPECIES_SPRITE(HOUNDOUR, gMonBackPic_Houndour), + SPECIES_SPRITE(HOUNDOOM, gMonBackPic_Houndoom), + SPECIES_SPRITE(KINGDRA, gMonBackPic_Kingdra), + SPECIES_SPRITE(PHANPY, gMonBackPic_Phanpy), + SPECIES_SPRITE(DONPHAN, gMonBackPic_Donphan), + SPECIES_SPRITE(PORYGON2, gMonBackPic_Porygon2), + SPECIES_SPRITE(STANTLER, gMonBackPic_Stantler), + SPECIES_SPRITE(SMEARGLE, gMonBackPic_Smeargle), + SPECIES_SPRITE(TYROGUE, gMonBackPic_Tyrogue), + SPECIES_SPRITE(HITMONTOP, gMonBackPic_Hitmontop), + SPECIES_SPRITE(SMOOCHUM, gMonBackPic_Smoochum), + SPECIES_SPRITE(ELEKID, gMonBackPic_Elekid), + SPECIES_SPRITE(MAGBY, gMonBackPic_Magby), + SPECIES_SPRITE(MILTANK, gMonBackPic_Miltank), + SPECIES_SPRITE(BLISSEY, gMonBackPic_Blissey), + SPECIES_SPRITE(RAIKOU, gMonBackPic_Raikou), + SPECIES_SPRITE(ENTEI, gMonBackPic_Entei), + SPECIES_SPRITE(SUICUNE, gMonBackPic_Suicune), + SPECIES_SPRITE(LARVITAR, gMonBackPic_Larvitar), + SPECIES_SPRITE(PUPITAR, gMonBackPic_Pupitar), + SPECIES_SPRITE(TYRANITAR, gMonBackPic_Tyranitar), + SPECIES_SPRITE(LUGIA, gMonBackPic_Lugia), + SPECIES_SPRITE(HO_OH, gMonBackPic_HoOh), + SPECIES_SPRITE(CELEBI, gMonBackPic_Celebi), + SPECIES_SPRITE(OLD_UNOWN_B, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_C, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_D, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_E, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_F, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_G, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_H, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_I, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_J, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_K, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_L, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_M, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_N, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_O, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_P, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Q, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_R, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_S, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_T, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_U, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_V, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_W, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_X, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Y, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Z, gMonBackPic_DoubleQuestionMark), + SPECIES_SPRITE(TREECKO, gMonBackPic_Treecko), + SPECIES_SPRITE(GROVYLE, gMonBackPic_Grovyle), + SPECIES_SPRITE(SCEPTILE, gMonBackPic_Sceptile), + SPECIES_SPRITE(TORCHIC, gMonBackPic_Torchic), + SPECIES_SPRITE(COMBUSKEN, gMonBackPic_Combusken), + SPECIES_SPRITE(BLAZIKEN, gMonBackPic_Blaziken), + SPECIES_SPRITE(MUDKIP, gMonBackPic_Mudkip), + SPECIES_SPRITE(MARSHTOMP, gMonBackPic_Marshtomp), + SPECIES_SPRITE(SWAMPERT, gMonBackPic_Swampert), + SPECIES_SPRITE(POOCHYENA, gMonBackPic_Poochyena), + SPECIES_SPRITE(MIGHTYENA, gMonBackPic_Mightyena), + SPECIES_SPRITE(ZIGZAGOON, gMonBackPic_Zigzagoon), + SPECIES_SPRITE(LINOONE, gMonBackPic_Linoone), + SPECIES_SPRITE(WURMPLE, gMonBackPic_Wurmple), + SPECIES_SPRITE(SILCOON, gMonBackPic_Silcoon), + SPECIES_SPRITE(BEAUTIFLY, gMonBackPic_Beautifly), + SPECIES_SPRITE(CASCOON, gMonBackPic_Cascoon), + SPECIES_SPRITE(DUSTOX, gMonBackPic_Dustox), + SPECIES_SPRITE(LOTAD, gMonBackPic_Lotad), + SPECIES_SPRITE(LOMBRE, gMonBackPic_Lombre), + SPECIES_SPRITE(LUDICOLO, gMonBackPic_Ludicolo), + SPECIES_SPRITE(SEEDOT, gMonBackPic_Seedot), + SPECIES_SPRITE(NUZLEAF, gMonBackPic_Nuzleaf), + SPECIES_SPRITE(SHIFTRY, gMonBackPic_Shiftry), + SPECIES_SPRITE(NINCADA, gMonBackPic_Nincada), + SPECIES_SPRITE(NINJASK, gMonBackPic_Ninjask), + SPECIES_SPRITE(SHEDINJA, gMonBackPic_Shedinja), + SPECIES_SPRITE(TAILLOW, gMonBackPic_Taillow), + SPECIES_SPRITE(SWELLOW, gMonBackPic_Swellow), + SPECIES_SPRITE(SHROOMISH, gMonBackPic_Shroomish), + SPECIES_SPRITE(BRELOOM, gMonBackPic_Breloom), + SPECIES_SPRITE(SPINDA, gMonBackPic_Spinda), + SPECIES_SPRITE(WINGULL, gMonBackPic_Wingull), + SPECIES_SPRITE(PELIPPER, gMonBackPic_Pelipper), + SPECIES_SPRITE(SURSKIT, gMonBackPic_Surskit), + SPECIES_SPRITE(MASQUERAIN, gMonBackPic_Masquerain), + SPECIES_SPRITE(WAILMER, gMonBackPic_Wailmer), + SPECIES_SPRITE(WAILORD, gMonBackPic_Wailord), + SPECIES_SPRITE(SKITTY, gMonBackPic_Skitty), + SPECIES_SPRITE(DELCATTY, gMonBackPic_Delcatty), + SPECIES_SPRITE(KECLEON, gMonBackPic_Kecleon), + SPECIES_SPRITE(BALTOY, gMonBackPic_Baltoy), + SPECIES_SPRITE(CLAYDOL, gMonBackPic_Claydol), + SPECIES_SPRITE(NOSEPASS, gMonBackPic_Nosepass), + SPECIES_SPRITE(TORKOAL, gMonBackPic_Torkoal), + SPECIES_SPRITE(SABLEYE, gMonBackPic_Sableye), + SPECIES_SPRITE(BARBOACH, gMonBackPic_Barboach), + SPECIES_SPRITE(WHISCASH, gMonBackPic_Whiscash), + SPECIES_SPRITE(LUVDISC, gMonBackPic_Luvdisc), + SPECIES_SPRITE(CORPHISH, gMonBackPic_Corphish), + SPECIES_SPRITE(CRAWDAUNT, gMonBackPic_Crawdaunt), + SPECIES_SPRITE(FEEBAS, gMonBackPic_Feebas), + SPECIES_SPRITE(MILOTIC, gMonBackPic_Milotic), + SPECIES_SPRITE(CARVANHA, gMonBackPic_Carvanha), + SPECIES_SPRITE(SHARPEDO, gMonBackPic_Sharpedo), + SPECIES_SPRITE(TRAPINCH, gMonBackPic_Trapinch), + SPECIES_SPRITE(VIBRAVA, gMonBackPic_Vibrava), + SPECIES_SPRITE(FLYGON, gMonBackPic_Flygon), + SPECIES_SPRITE(MAKUHITA, gMonBackPic_Makuhita), + SPECIES_SPRITE(HARIYAMA, gMonBackPic_Hariyama), + SPECIES_SPRITE(ELECTRIKE, gMonBackPic_Electrike), + SPECIES_SPRITE(MANECTRIC, gMonBackPic_Manectric), + SPECIES_SPRITE(NUMEL, gMonBackPic_Numel), + SPECIES_SPRITE(CAMERUPT, gMonBackPic_Camerupt), + SPECIES_SPRITE(SPHEAL, gMonBackPic_Spheal), + SPECIES_SPRITE(SEALEO, gMonBackPic_Sealeo), + SPECIES_SPRITE(WALREIN, gMonBackPic_Walrein), + SPECIES_SPRITE(CACNEA, gMonBackPic_Cacnea), + SPECIES_SPRITE(CACTURNE, gMonBackPic_Cacturne), + SPECIES_SPRITE(SNORUNT, gMonBackPic_Snorunt), + SPECIES_SPRITE(GLALIE, gMonBackPic_Glalie), + SPECIES_SPRITE(LUNATONE, gMonBackPic_Lunatone), + SPECIES_SPRITE(SOLROCK, gMonBackPic_Solrock), + SPECIES_SPRITE(AZURILL, gMonBackPic_Azurill), + SPECIES_SPRITE(SPOINK, gMonBackPic_Spoink), + SPECIES_SPRITE(GRUMPIG, gMonBackPic_Grumpig), + SPECIES_SPRITE(PLUSLE, gMonBackPic_Plusle), + SPECIES_SPRITE(MINUN, gMonBackPic_Minun), + SPECIES_SPRITE(MAWILE, gMonBackPic_Mawile), + SPECIES_SPRITE(MEDITITE, gMonBackPic_Meditite), + SPECIES_SPRITE(MEDICHAM, gMonBackPic_Medicham), + SPECIES_SPRITE(SWABLU, gMonBackPic_Swablu), + SPECIES_SPRITE(ALTARIA, gMonBackPic_Altaria), + SPECIES_SPRITE(WYNAUT, gMonBackPic_Wynaut), + SPECIES_SPRITE(DUSKULL, gMonBackPic_Duskull), + SPECIES_SPRITE(DUSCLOPS, gMonBackPic_Dusclops), + SPECIES_SPRITE(ROSELIA, gMonBackPic_Roselia), + SPECIES_SPRITE(SLAKOTH, gMonBackPic_Slakoth), + SPECIES_SPRITE(VIGOROTH, gMonBackPic_Vigoroth), + SPECIES_SPRITE(SLAKING, gMonBackPic_Slaking), + SPECIES_SPRITE(GULPIN, gMonBackPic_Gulpin), + SPECIES_SPRITE(SWALOT, gMonBackPic_Swalot), + SPECIES_SPRITE(TROPIUS, gMonBackPic_Tropius), + SPECIES_SPRITE(WHISMUR, gMonBackPic_Whismur), + SPECIES_SPRITE(LOUDRED, gMonBackPic_Loudred), + SPECIES_SPRITE(EXPLOUD, gMonBackPic_Exploud), + SPECIES_SPRITE(CLAMPERL, gMonBackPic_Clamperl), + SPECIES_SPRITE(HUNTAIL, gMonBackPic_Huntail), + SPECIES_SPRITE(GOREBYSS, gMonBackPic_Gorebyss), + SPECIES_SPRITE(ABSOL, gMonBackPic_Absol), + SPECIES_SPRITE(SHUPPET, gMonBackPic_Shuppet), + SPECIES_SPRITE(BANETTE, gMonBackPic_Banette), + SPECIES_SPRITE(SEVIPER, gMonBackPic_Seviper), + SPECIES_SPRITE(ZANGOOSE, gMonBackPic_Zangoose), + SPECIES_SPRITE(RELICANTH, gMonBackPic_Relicanth), + SPECIES_SPRITE(ARON, gMonBackPic_Aron), + SPECIES_SPRITE(LAIRON, gMonBackPic_Lairon), + SPECIES_SPRITE(AGGRON, gMonBackPic_Aggron), + SPECIES_SPRITE(CASTFORM, gMonBackPic_Castform), + SPECIES_SPRITE(VOLBEAT, gMonBackPic_Volbeat), + SPECIES_SPRITE(ILLUMISE, gMonBackPic_Illumise), + SPECIES_SPRITE(LILEEP, gMonBackPic_Lileep), + SPECIES_SPRITE(CRADILY, gMonBackPic_Cradily), + SPECIES_SPRITE(ANORITH, gMonBackPic_Anorith), + SPECIES_SPRITE(ARMALDO, gMonBackPic_Armaldo), + SPECIES_SPRITE(RALTS, gMonBackPic_Ralts), + SPECIES_SPRITE(KIRLIA, gMonBackPic_Kirlia), + SPECIES_SPRITE(GARDEVOIR, gMonBackPic_Gardevoir), + SPECIES_SPRITE(BAGON, gMonBackPic_Bagon), + SPECIES_SPRITE(SHELGON, gMonBackPic_Shelgon), + SPECIES_SPRITE(SALAMENCE, gMonBackPic_Salamence), + SPECIES_SPRITE(BELDUM, gMonBackPic_Beldum), + SPECIES_SPRITE(METANG, gMonBackPic_Metang), + SPECIES_SPRITE(METAGROSS, gMonBackPic_Metagross), + SPECIES_SPRITE(REGIROCK, gMonBackPic_Regirock), + SPECIES_SPRITE(REGICE, gMonBackPic_Regice), + SPECIES_SPRITE(REGISTEEL, gMonBackPic_Registeel), + SPECIES_SPRITE(KYOGRE, gMonBackPic_Kyogre), + SPECIES_SPRITE(GROUDON, gMonBackPic_Groudon), + SPECIES_SPRITE(RAYQUAZA, gMonBackPic_Rayquaza), + SPECIES_SPRITE(LATIAS, gMonBackPic_Latias), + SPECIES_SPRITE(LATIOS, gMonBackPic_Latios), + SPECIES_SPRITE(JIRACHI, gMonBackPic_Jirachi), + SPECIES_SPRITE(DEOXYS, gMonBackPic_Deoxys), + SPECIES_SPRITE(CHIMECHO, gMonBackPic_Chimecho), + SPECIES_SPRITE(EGG, gMonFrontPic_Egg), + SPECIES_SPRITE(UNOWN_B, gMonBackPic_UnownB), + SPECIES_SPRITE(UNOWN_C, gMonBackPic_UnownC), + SPECIES_SPRITE(UNOWN_D, gMonBackPic_UnownD), + SPECIES_SPRITE(UNOWN_E, gMonBackPic_UnownE), + SPECIES_SPRITE(UNOWN_F, gMonBackPic_UnownF), + SPECIES_SPRITE(UNOWN_G, gMonBackPic_UnownG), + SPECIES_SPRITE(UNOWN_H, gMonBackPic_UnownH), + SPECIES_SPRITE(UNOWN_I, gMonBackPic_UnownI), + SPECIES_SPRITE(UNOWN_J, gMonBackPic_UnownJ), + SPECIES_SPRITE(UNOWN_K, gMonBackPic_UnownK), + SPECIES_SPRITE(UNOWN_L, gMonBackPic_UnownL), + SPECIES_SPRITE(UNOWN_M, gMonBackPic_UnownM), + SPECIES_SPRITE(UNOWN_N, gMonBackPic_UnownN), + SPECIES_SPRITE(UNOWN_O, gMonBackPic_UnownO), + SPECIES_SPRITE(UNOWN_P, gMonBackPic_UnownP), + SPECIES_SPRITE(UNOWN_Q, gMonBackPic_UnownQ), + SPECIES_SPRITE(UNOWN_R, gMonBackPic_UnownR), + SPECIES_SPRITE(UNOWN_S, gMonBackPic_UnownS), + SPECIES_SPRITE(UNOWN_T, gMonBackPic_UnownT), + SPECIES_SPRITE(UNOWN_U, gMonBackPic_UnownU), + SPECIES_SPRITE(UNOWN_V, gMonBackPic_UnownV), + SPECIES_SPRITE(UNOWN_W, gMonBackPic_UnownW), + SPECIES_SPRITE(UNOWN_X, gMonBackPic_UnownX), + SPECIES_SPRITE(UNOWN_Y, gMonBackPic_UnownY), + SPECIES_SPRITE(UNOWN_Z, gMonBackPic_UnownZ), + SPECIES_SPRITE(UNOWN_EMARK, gMonBackPic_UnownExclamationMark), + SPECIES_SPRITE(UNOWN_QMARK, gMonBackPic_UnownQuestionMark), +}; diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h new file mode 100644 index 000000000..dccd063da --- /dev/null +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -0,0 +1,65 @@ +// This determines how much higher above the usual position the enemy Pokémon +// is during battle. Species that float or fly have nonzero values. +const u8 gEnemyMonElevation[NUM_SPECIES] = +{ + [SPECIES_BUTTERFREE] = 8, + [SPECIES_BEEDRILL] = 8, + [SPECIES_PIDGEOT] = 4, + [SPECIES_FEAROW] = 6, + [SPECIES_ZUBAT] = 8, + [SPECIES_GOLBAT] = 8, + [SPECIES_VENOMOTH] = 8, + [SPECIES_GEODUDE] = 16, + [SPECIES_MAGNEMITE] = 16, + [SPECIES_MAGNETON] = 8, + [SPECIES_GASTLY] = 4, + [SPECIES_HAUNTER] = 4, + [SPECIES_VOLTORB] = 10, + [SPECIES_ELECTRODE] = 12, + [SPECIES_KOFFING] = 8, + [SPECIES_WEEZING] = 6, + [SPECIES_AERODACTYL] = 7, + [SPECIES_ARTICUNO] = 6, + [SPECIES_ZAPDOS] = 8, + [SPECIES_MOLTRES] = 5, + [SPECIES_DRAGONITE] = 6, + [SPECIES_MEW] = 8, + [SPECIES_LEDIAN] = 8, + [SPECIES_CROBAT] = 6, + [SPECIES_HOPPIP] = 11, + [SPECIES_SKIPLOOM] = 12, + [SPECIES_JUMPLUFF] = 9, + [SPECIES_YANMA] = 8, + [SPECIES_MISDREAVUS] = 8, + [SPECIES_UNOWN] = 8, + [SPECIES_GLIGAR] = 6, + [SPECIES_LUGIA] = 6, + [SPECIES_HO_OH] = 6, + [SPECIES_CELEBI] = 15, + [SPECIES_BEAUTIFLY] = 8, + [SPECIES_DUSTOX] = 10, + [SPECIES_NINJASK] = 10, + [SPECIES_SHEDINJA] = 8, + [SPECIES_WINGULL] = 16, + [SPECIES_PELIPPER] = 8, + [SPECIES_MASQUERAIN] = 10, + [SPECIES_BALTOY] = 4, + [SPECIES_CLAYDOL] = 10, + [SPECIES_FLYGON] = 7, + [SPECIES_GLALIE] = 12, + [SPECIES_LUNATONE] = 13, + [SPECIES_SOLROCK] = 4, + [SPECIES_SWABLU] = 12, + [SPECIES_ALTARIA] = 8, + [SPECIES_DUSKULL] = 9, + [SPECIES_SHUPPET] = 12, + [SPECIES_BANETTE] = 8, + [SPECIES_CASTFORM] = 16, + [SPECIES_BELDUM] = 8, + [SPECIES_RAYQUAZA] = 6, + [SPECIES_LATIAS] = 6, + [SPECIES_LATIOS] = 6, + [SPECIES_JIRACHI] = 12, + [SPECIES_DEOXYS] = 8, + [SPECIES_CHIMECHO] = 12, +}; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h new file mode 100644 index 000000000..1bb67f1f5 --- /dev/null +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -0,0 +1,2203 @@ +const struct MonCoords gMonFrontPicCoords[] = +{ + [SPECIES_NONE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_BULBASAUR] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_IVYSAUR] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_VENUSAUR] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_CHARMANDER] = + { + .size = 0x55, + .y_offset = 0x0d, + }, + [SPECIES_CHARMELEON] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_CHARIZARD] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SQUIRTLE] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_WARTORTLE] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_BLASTOISE] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_CATERPIE] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_METAPOD] = + { + .size = 0x54, + .y_offset = 0x14, + }, + [SPECIES_BUTTERFREE] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_WEEDLE] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_KAKUNA] = + { + .size = 0x45, + .y_offset = 0x0e, + }, + [SPECIES_BEEDRILL] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_PIDGEY] = + { + .size = 0x55, + .y_offset = 0x0d, + }, + [SPECIES_PIDGEOTTO] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_PIDGEOT] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_RATTATA] = + { + .size = 0x65, + .y_offset = 0x0e, + }, + [SPECIES_RATICATE] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_SPEAROW] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_FEAROW] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_EKANS] = + { + .size = 0x65, + .y_offset = 0x0f, + }, + [SPECIES_ARBOK] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_PIKACHU] = + { + .size = 0x67, + .y_offset = 0x09, + }, + [SPECIES_RAICHU] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SANDSHREW] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_SANDSLASH] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_NIDORAN_F] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_NIDORINA] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_NIDOQUEEN] = + { + .size = 0x78, + .y_offset = 0x02, + }, + [SPECIES_NIDORAN_M] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_NIDORINO] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_NIDOKING] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_CLEFAIRY] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_CLEFABLE] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_VULPIX] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_NINETALES] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_JIGGLYPUFF] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_WIGGLYTUFF] = + { + .size = 0x67, + .y_offset = 0x08, + }, + [SPECIES_ZUBAT] = + { + .size = 0x66, + .y_offset = 0x0d, + }, + [SPECIES_GOLBAT] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_ODDISH] = + { + .size = 0x45, + .y_offset = 0x0c, + }, + [SPECIES_GLOOM] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_VILEPLUME] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_PARAS] = + { + .size = 0x64, + .y_offset = 0x12, + }, + [SPECIES_PARASECT] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_VENONAT] = + { + .size = 0x57, + .y_offset = 0x0b, + }, + [SPECIES_VENOMOTH] = + { + .size = 0x87, + .y_offset = 0x08, + }, + [SPECIES_DIGLETT] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_DUGTRIO] = + { + .size = 0x75, + .y_offset = 0x0c, + }, + [SPECIES_MEOWTH] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_PERSIAN] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_PSYDUCK] = + { + .size = 0x56, + .y_offset = 0x09, + }, + [SPECIES_GOLDUCK] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_MANKEY] = + { + .size = 0x66, + .y_offset = 0x0e, + }, + [SPECIES_PRIMEAPE] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_GROWLITHE] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_ARCANINE] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_POLIWAG] = + { + .size = 0x74, + .y_offset = 0x10, + }, + [SPECIES_POLIWHIRL] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_POLIWRATH] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_ABRA] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_KADABRA] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_ALAKAZAM] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_MACHOP] = + { + .size = 0x46, + .y_offset = 0x0b, + }, + [SPECIES_MACHOKE] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_MACHAMP] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_BELLSPROUT] = + { + .size = 0x66, + .y_offset = 0x0f, + }, + [SPECIES_WEEPINBELL] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_VICTREEBEL] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_TENTACOOL] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_TENTACRUEL] = + { + .size = 0x78, + .y_offset = 0x01, + }, + [SPECIES_GEODUDE] = + { + .size = 0x74, + .y_offset = 0x12, + }, + [SPECIES_GRAVELER] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_GOLEM] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_PONYTA] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_RAPIDASH] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SLOWPOKE] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_SLOWBRO] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_MAGNEMITE] = + { + .size = 0x53, + .y_offset = 0x16, + }, + [SPECIES_MAGNETON] = + { + .size = 0x75, + .y_offset = 0x10, + }, + [SPECIES_FARFETCHD] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_DODUO] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_DODRIO] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SEEL] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_DEWGONG] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_GRIMER] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_MUK] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SHELLDER] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_CLOYSTER] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_GASTLY] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_HAUNTER] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_GENGAR] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_ONIX] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_DROWZEE] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_HYPNO] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_KRABBY] = + { + .size = 0x75, + .y_offset = 0x0e, + }, + [SPECIES_KINGLER] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_VOLTORB] = + { + .size = 0x44, + .y_offset = 0x13, + }, + [SPECIES_ELECTRODE] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_EXEGGCUTE] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_EXEGGUTOR] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CUBONE] = + { + .size = 0x65, + .y_offset = 0x0d, + }, + [SPECIES_MAROWAK] = + { + .size = 0x87, + .y_offset = 0x0d, + }, + [SPECIES_HITMONLEE] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_HITMONCHAN] = + { + .size = 0x67, + .y_offset = 0x04, + }, + [SPECIES_LICKITUNG] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_KOFFING] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_WEEZING] = + { + .size = 0x88, + .y_offset = 0x07, + }, + [SPECIES_RHYHORN] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_RHYDON] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_CHANSEY] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_TANGELA] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_KANGASKHAN] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_HORSEA] = + { + .size = 0x45, + .y_offset = 0x10, + }, + [SPECIES_SEADRA] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_GOLDEEN] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_SEAKING] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_STARYU] = + { + .size = 0x66, + .y_offset = 0x0d, + }, + [SPECIES_STARMIE] = + { + .size = 0x67, + .y_offset = 0x0a, + }, + [SPECIES_MR_MIME] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_SCYTHER] = + { + .size = 0x78, + .y_offset = 0x02, + }, + [SPECIES_JYNX] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_ELECTABUZZ] = + { + .size = 0x88, + .y_offset = 0x04, + }, + [SPECIES_MAGMAR] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_PINSIR] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_TAUROS] = + { + .size = 0x88, + .y_offset = 0x05, + }, + [SPECIES_MAGIKARP] = + { + .size = 0x77, + .y_offset = 0x0b, + }, + [SPECIES_GYARADOS] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LAPRAS] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_DITTO] = + { + .size = 0x54, + .y_offset = 0x11, + }, + [SPECIES_EEVEE] = + { + .size = 0x56, + .y_offset = 0x0d, + }, + [SPECIES_VAPOREON] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_JOLTEON] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_FLAREON] = + { + .size = 0x76, + .y_offset = 0x0b, + }, + [SPECIES_PORYGON] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_OMANYTE] = + { + .size = 0x45, + .y_offset = 0x0f, + }, + [SPECIES_OMASTAR] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_KABUTO] = + { + .size = 0x54, + .y_offset = 0x14, + }, + [SPECIES_KABUTOPS] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_AERODACTYL] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SNORLAX] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_ARTICUNO] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_ZAPDOS] = + { + .size = 0x88, + .y_offset = 0x04, + }, + [SPECIES_MOLTRES] = + { + .size = 0x88, + .y_offset = 0x06, + }, + [SPECIES_DRATINI] = + { + .size = 0x75, + .y_offset = 0x0f, + }, + [SPECIES_DRAGONAIR] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_DRAGONITE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_MEWTWO] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_MEW] = + { + .size = 0x77, + .y_offset = 0x0d, + }, + [SPECIES_CHIKORITA] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_BAYLEEF] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_MEGANIUM] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CYNDAQUIL] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_QUILAVA] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_TYPHLOSION] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_TOTODILE] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_CROCONAW] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_FERALIGATR] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SENTRET] = + { + .size = 0x47, + .y_offset = 0x04, + }, + [SPECIES_FURRET] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_HOOTHOOT] = + { + .size = 0x55, + .y_offset = 0x0d, + }, + [SPECIES_NOCTOWL] = + { + .size = 0x58, + .y_offset = 0x03, + }, + [SPECIES_LEDYBA] = + { + .size = 0x56, + .y_offset = 0x0c, + }, + [SPECIES_LEDIAN] = + { + .size = 0x67, + .y_offset = 0x04, + }, + [SPECIES_SPINARAK] = + { + .size = 0x54, + .y_offset = 0x13, + }, + [SPECIES_ARIADOS] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_CROBAT] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CHINCHOU] = + { + .size = 0x75, + .y_offset = 0x10, + }, + [SPECIES_LANTURN] = + { + .size = 0x87, + .y_offset = 0x0b, + }, + [SPECIES_PICHU] = + { + .size = 0x45, + .y_offset = 0x0c, + }, + [SPECIES_CLEFFA] = + { + .size = 0x44, + .y_offset = 0x14, + }, + [SPECIES_IGGLYBUFF] = + { + .size = 0x44, + .y_offset = 0x12, + }, + [SPECIES_TOGEPI] = + { + .size = 0x34, + .y_offset = 0x14, + }, + [SPECIES_TOGETIC] = + { + .size = 0x46, + .y_offset = 0x09, + }, + [SPECIES_NATU] = + { + .size = 0x44, + .y_offset = 0x14, + }, + [SPECIES_XATU] = + { + .size = 0x47, + .y_offset = 0x07, + }, + [SPECIES_MAREEP] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_FLAAFFY] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_AMPHAROS] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_BELLOSSOM] = + { + .size = 0x45, + .y_offset = 0x0e, + }, + [SPECIES_MARILL] = + { + .size = 0x65, + .y_offset = 0x0e, + }, + [SPECIES_AZUMARILL] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_SUDOWOODO] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_POLITOED] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_HOPPIP] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_SKIPLOOM] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_JUMPLUFF] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_AIPOM] = + { + .size = 0x58, + .y_offset = 0x03, + }, + [SPECIES_SUNKERN] = + { + .size = 0x44, + .y_offset = 0x10, + }, + [SPECIES_SUNFLORA] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_YANMA] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_WOOPER] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_QUAGSIRE] = + { + .size = 0x77, + .y_offset = 0x07, + }, + [SPECIES_ESPEON] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_UMBREON] = + { + .size = 0x67, + .y_offset = 0x08, + }, + [SPECIES_MURKROW] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_SLOWKING] = + { + .size = 0x58, + .y_offset = 0x01, + }, + [SPECIES_MISDREAVUS] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_UNOWN] = + { + .size = 0x35, + .y_offset = 0x0f, + }, + [SPECIES_WOBBUFFET] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_GIRAFARIG] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_PINECO] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_FORRETRESS] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_DUNSPARCE] = + { + .size = 0x74, + .y_offset = 0x11, + }, + [SPECIES_GLIGAR] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_STEELIX] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SNUBBULL] = + { + .size = 0x55, + .y_offset = 0x0d, + }, + [SPECIES_GRANBULL] = + { + .size = 0x57, + .y_offset = 0x06, + }, + [SPECIES_QWILFISH] = + { + .size = 0x56, + .y_offset = 0x0a, + }, + [SPECIES_SCIZOR] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SHUCKLE] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_HERACROSS] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_SNEASEL] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_TEDDIURSA] = + { + .size = 0x46, + .y_offset = 0x0b, + }, + [SPECIES_URSARING] = + { + .size = 0x78, + .y_offset = 0x01, + }, + [SPECIES_SLUGMA] = + { + .size = 0x45, + .y_offset = 0x0d, + }, + [SPECIES_MAGCARGO] = + { + .size = 0x57, + .y_offset = 0x0d, + }, + [SPECIES_SWINUB] = + { + .size = 0x43, + .y_offset = 0x14, + }, + [SPECIES_PILOSWINE] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_CORSOLA] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_REMORAID] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_OCTILLERY] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_DELIBIRD] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_MANTINE] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_SKARMORY] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_HOUNDOUR] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_HOUNDOOM] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_KINGDRA] = + { + .size = 0x78, + .y_offset = 0x04, + }, + [SPECIES_PHANPY] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_DONPHAN] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_PORYGON2] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_STANTLER] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SMEARGLE] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_TYROGUE] = + { + .size = 0x46, + .y_offset = 0x09, + }, + [SPECIES_HITMONTOP] = + { + .size = 0x67, + .y_offset = 0x05, + }, + [SPECIES_SMOOCHUM] = + { + .size = 0x35, + .y_offset = 0x0f, + }, + [SPECIES_ELEKID] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_MAGBY] = + { + .size = 0x45, + .y_offset = 0x0d, + }, + [SPECIES_MILTANK] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_BLISSEY] = + { + .size = 0x77, + .y_offset = 0x06, + }, + [SPECIES_RAIKOU] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_ENTEI] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SUICUNE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LARVITAR] = + { + .size = 0x46, + .y_offset = 0x09, + }, + [SPECIES_PUPITAR] = + { + .size = 0x56, + .y_offset = 0x09, + }, + [SPECIES_TYRANITAR] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LUGIA] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_HO_OH] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CELEBI] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_OLD_UNOWN_B] = + { + .size = 0x88, + .y_offset = 0x06, + }, + [SPECIES_OLD_UNOWN_C] = + { + .size = 0x88, + .y_offset = 0x06, + }, + [SPECIES_OLD_UNOWN_D] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_E] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_F] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_G] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_H] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_I] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_J] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_K] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_L] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_M] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_N] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_O] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_P] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_Q] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_R] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_S] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_T] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_U] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_V] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_W] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_X] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_Y] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_OLD_UNOWN_Z] = + { + .size = 0x88, + .y_offset = 0x06 + }, + [SPECIES_TREECKO] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_GROVYLE] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_SCEPTILE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_TORCHIC] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_COMBUSKEN] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_BLAZIKEN] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_MUDKIP] = + { + .size = 0x56, + .y_offset = 0x0c, + }, + [SPECIES_MARSHTOMP] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_SWAMPERT] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_POOCHYENA] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_MIGHTYENA] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_ZIGZAGOON] = + { + .size = 0x85, + .y_offset = 0x0f, + }, + [SPECIES_LINOONE] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_WURMPLE] = + { + .size = 0x45, + .y_offset = 0x0e, + }, + [SPECIES_SILCOON] = + { + .size = 0x75, + .y_offset = 0x11, + }, + [SPECIES_BEAUTIFLY] = + { + .size = 0x86, + .y_offset = 0x09, + }, + [SPECIES_CASCOON] = + { + .size = 0x74, + .y_offset = 0x10, + }, + [SPECIES_DUSTOX] = + { + .size = 0x86, + .y_offset = 0x0f, + }, + [SPECIES_LOTAD] = + { + .size = 0x65, + .y_offset = 0x0e, + }, + [SPECIES_LOMBRE] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_LUDICOLO] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SEEDOT] = + { + .size = 0x46, + .y_offset = 0x10, + }, + [SPECIES_NUZLEAF] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_SHIFTRY] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_NINCADA] = + { + .size = 0x74, + .y_offset = 0x12, + }, + [SPECIES_NINJASK] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_SHEDINJA] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_TAILLOW] = + { + .size = 0x64, + .y_offset = 0x10, + }, + [SPECIES_SWELLOW] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_SHROOMISH] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_BRELOOM] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_SPINDA] = + { + .size = 0x67, + .y_offset = 0x08, + }, + [SPECIES_WINGULL] = + { + .size = 0x84, + .y_offset = 0x18, + }, + [SPECIES_PELIPPER] = + { + .size = 0x77, + .y_offset = 0x04, + }, + [SPECIES_SURSKIT] = + { + .size = 0x65, + .y_offset = 0x0f, + }, + [SPECIES_MASQUERAIN] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_WAILMER] = + { + .size = 0x75, + .y_offset = 0x0f, + }, + [SPECIES_WAILORD] = + { + .size = 0x87, + .y_offset = 0x0a, + }, + [SPECIES_SKITTY] = + { + .size = 0x66, + .y_offset = 0x0b, + }, + [SPECIES_DELCATTY] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_KECLEON] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_BALTOY] = + { + .size = 0x55, + .y_offset = 0x10, + }, + [SPECIES_CLAYDOL] = + { + .size = 0x78, + .y_offset = 0x06, + }, + [SPECIES_NOSEPASS] = + { + .size = 0x56, + .y_offset = 0x0c, + }, + [SPECIES_TORKOAL] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_SABLEYE] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_BARBOACH] = + { + .size = 0x46, + .y_offset = 0x0b, + }, + [SPECIES_WHISCASH] = + { + .size = 0x76, + .y_offset = 0x09, + }, + [SPECIES_LUVDISC] = + { + .size = 0x46, + .y_offset = 0x18, + }, + [SPECIES_CORPHISH] = + { + .size = 0x66, + .y_offset = 0x0c, + }, + [SPECIES_CRAWDAUNT] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_FEEBAS] = + { + .size = 0x46, + .y_offset = 0x0d, + }, + [SPECIES_MILOTIC] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CARVANHA] = + { + .size = 0x67, + .y_offset = 0x06, + }, + [SPECIES_SHARPEDO] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_TRAPINCH] = + { + .size = 0x54, + .y_offset = 0x10, + }, + [SPECIES_VIBRAVA] = + { + .size = 0x86, + .y_offset = 0x0c, + }, + [SPECIES_FLYGON] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_MAKUHITA] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_HARIYAMA] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_ELECTRIKE] = + { + .size = 0x64, + .y_offset = 0x12, + }, + [SPECIES_MANECTRIC] = + { + .size = 0x67, + .y_offset = 0x04, + }, + [SPECIES_NUMEL] = + { + .size = 0x65, + .y_offset = 0x0f, + }, + [SPECIES_CAMERUPT] = + { + .size = 0x87, + .y_offset = 0x09, + }, + [SPECIES_SPHEAL] = + { + .size = 0x65, + .y_offset = 0x10, + }, + [SPECIES_SEALEO] = + { + .size = 0x86, + .y_offset = 0x0a, + }, + [SPECIES_WALREIN] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CACNEA] = + { + .size = 0x74, + .y_offset = 0x10, + }, + [SPECIES_CACTURNE] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_SNORUNT] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_GLALIE] = + { + .size = 0x76, + .y_offset = 0x0a, + }, + [SPECIES_LUNATONE] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_SOLROCK] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_AZURILL] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_SPOINK] = + { + .size = 0x46, + .y_offset = 0x09, + }, + [SPECIES_GRUMPIG] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_PLUSLE] = + { + .size = 0x56, + .y_offset = 0x0e, + }, + [SPECIES_MINUN] = + { + .size = 0x66, + .y_offset = 0x0c, + }, + [SPECIES_MAWILE] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_MEDITITE] = + { + .size = 0x65, + .y_offset = 0x0c, + }, + [SPECIES_MEDICHAM] = + { + .size = 0x68, + .y_offset = 0x01, + }, + [SPECIES_SWABLU] = + { + .size = 0x76, + .y_offset = 0x11, + }, + [SPECIES_ALTARIA] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_WYNAUT] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_DUSKULL] = + { + .size = 0x66, + .y_offset = 0x0a, + }, + [SPECIES_DUSCLOPS] = + { + .size = 0x77, + .y_offset = 0x05, + }, + [SPECIES_ROSELIA] = + { + .size = 0x76, + .y_offset = 0x08, + }, + [SPECIES_SLAKOTH] = + { + .size = 0x74, + .y_offset = 0x12, + }, + [SPECIES_VIGOROTH] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_SLAKING] = + { + .size = 0x86, + .y_offset = 0x08, + }, + [SPECIES_GULPIN] = + { + .size = 0x55, + .y_offset = 0x12, + }, + [SPECIES_SWALOT] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_TROPIUS] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_WHISMUR] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_LOUDRED] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_EXPLOUD] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CLAMPERL] = + { + .size = 0x55, + .y_offset = 0x0e, + }, + [SPECIES_HUNTAIL] = + { + .size = 0x78, + .y_offset = 0x03, + }, + [SPECIES_GOREBYSS] = + { + .size = 0x86, + .y_offset = 0x0b, + }, + [SPECIES_ABSOL] = + { + .size = 0x68, + .y_offset = 0x00, + }, + [SPECIES_SHUPPET] = + { + .size = 0x56, + .y_offset = 0x0e, + }, + [SPECIES_BANETTE] = + { + .size = 0x55, + .y_offset = 0x0c, + }, + [SPECIES_SEVIPER] = + { + .size = 0x77, + .y_offset = 0x08, + }, + [SPECIES_ZANGOOSE] = + { + .size = 0x87, + .y_offset = 0x05, + }, + [SPECIES_RELICANTH] = + { + .size = 0x77, + .y_offset = 0x0b, + }, + [SPECIES_ARON] = + { + .size = 0x43, + .y_offset = 0x14, + }, + [SPECIES_LAIRON] = + { + .size = 0x75, + .y_offset = 0x0d, + }, + [SPECIES_AGGRON] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_CASTFORM] = + { + .size = 0x34, + .y_offset = 0x11, + }, + [SPECIES_VOLBEAT] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_ILLUMISE] = + { + .size = 0x56, + .y_offset = 0x08, + }, + [SPECIES_LILEEP] = + { + .size = 0x67, + .y_offset = 0x07, + }, + [SPECIES_CRADILY] = + { + .size = 0x78, + .y_offset = 0x00, + }, + [SPECIES_ANORITH] = + { + .size = 0x66, + .y_offset = 0x08, + }, + [SPECIES_ARMALDO] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_RALTS] = + { + .size = 0x35, + .y_offset = 0x0f, + }, + [SPECIES_KIRLIA] = + { + .size = 0x47, + .y_offset = 0x06, + }, + [SPECIES_GARDEVOIR] = + { + .size = 0x78, + .y_offset = 0x01, + }, + [SPECIES_BAGON] = + { + .size = 0x56, + .y_offset = 0x0b, + }, + [SPECIES_SHELGON] = + { + .size = 0x66, + .y_offset = 0x09, + }, + [SPECIES_SALAMENCE] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_BELDUM] = + { + .size = 0x55, + .y_offset = 0x0f, + }, + [SPECIES_METANG] = + { + .size = 0x87, + .y_offset = 0x07, + }, + [SPECIES_METAGROSS] = + { + .size = 0x87, + .y_offset = 0x06, + }, + [SPECIES_REGIROCK] = + { + .size = 0x78, + .y_offset = 0x04, + }, + [SPECIES_REGICE] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_REGISTEEL] = + { + .size = 0x88, + .y_offset = 0x03, + }, + [SPECIES_KYOGRE] = + { + .size = 0x87, + .y_offset = 0x04, + }, + [SPECIES_GROUDON] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_RAYQUAZA] = + { + .size = 0x88, + .y_offset = 0x00, + }, + [SPECIES_LATIAS] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_LATIOS] = + { + .size = 0x88, + .y_offset = 0x02, + }, + [SPECIES_JIRACHI] = + { + .size = 0x66, + .y_offset = 0x0d, + }, + [SPECIES_DEOXYS] = + { + .size = 0x88, + .y_offset = 0x01, + }, + [SPECIES_CHIMECHO] = + { + .size = 0x37, + .y_offset = 0x06, + }, + [SPECIES_EGG] = + { + .size = 0x33, + .y_offset = 0x14, + }, + [SPECIES_UNOWN_B] = + { + .size = 0x34, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_C] = + { + .size = 0x44, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_D] = + { + .size = 0x44, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_E] = + { + .size = 0x44, + .y_offset = 0x11, + }, + [SPECIES_UNOWN_F] = + { + .size = 0x44, + .y_offset = 0x11, + }, + [SPECIES_UNOWN_G] = + { + .size = 0x35, + .y_offset = 0x0e, + }, + [SPECIES_UNOWN_H] = + { + .size = 0x44, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_I] = + { + .size = 0x34, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_J] = + { + .size = 0x34, + .y_offset = 0x11, + }, + [SPECIES_UNOWN_K] = + { + .size = 0x44, + .y_offset = 0x11, + }, + [SPECIES_UNOWN_L] = + { + .size = 0x34, + .y_offset = 0x13, + }, + [SPECIES_UNOWN_M] = + { + .size = 0x44, + .y_offset = 0x13, + }, + [SPECIES_UNOWN_N] = + { + .size = 0x43, + .y_offset = 0x14, + }, + [SPECIES_UNOWN_O] = + { + .size = 0x44, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_P] = + { + .size = 0x34, + .y_offset = 0x13, + }, + [SPECIES_UNOWN_Q] = + { + .size = 0x43, + .y_offset = 0x15, + }, + [SPECIES_UNOWN_R] = + { + .size = 0x34, + .y_offset = 0x13, + }, + [SPECIES_UNOWN_S] = + { + .size = 0x45, + .y_offset = 0x0c, + }, + [SPECIES_UNOWN_T] = + { + .size = 0x34, + .y_offset = 0x12, + }, + [SPECIES_UNOWN_U] = + { + .size = 0x44, + .y_offset = 0x12, + }, + [SPECIES_UNOWN_V] = + { + .size = 0x44, + .y_offset = 0x12, + }, + [SPECIES_UNOWN_W] = + { + .size = 0x44, + .y_offset = 0x13, + }, + [SPECIES_UNOWN_X] = + { + .size = 0x33, + .y_offset = 0x15, + }, + [SPECIES_UNOWN_Y] = + { + .size = 0x34, + .y_offset = 0x11, + }, + [SPECIES_UNOWN_Z] = + { + .size = 0x34, + .y_offset = 0x10, + }, + [SPECIES_UNOWN_EMARK] = + { + .size = 0x35, + .y_offset = 0x0f, + }, + [SPECIES_UNOWN_QMARK] = + { + .size = 0x35, + .y_offset = 0x0d, + }, +}; diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h new file mode 100644 index 000000000..82af860d3 --- /dev/null +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -0,0 +1,443 @@ +const struct CompressedSpriteSheet gMonFrontPicTable[] = +{ + SPECIES_SPRITE(NONE, gMonFrontPic_CircledQuestionMark), + SPECIES_SPRITE(BULBASAUR, gMonFrontPic_Bulbasaur), + SPECIES_SPRITE(IVYSAUR, gMonFrontPic_Ivysaur), + SPECIES_SPRITE(VENUSAUR, gMonFrontPic_Venusaur), + SPECIES_SPRITE(CHARMANDER, gMonFrontPic_Charmander), + SPECIES_SPRITE(CHARMELEON, gMonFrontPic_Charmeleon), + SPECIES_SPRITE(CHARIZARD, gMonFrontPic_Charizard), + SPECIES_SPRITE(SQUIRTLE, gMonFrontPic_Squirtle), + SPECIES_SPRITE(WARTORTLE, gMonFrontPic_Wartortle), + SPECIES_SPRITE(BLASTOISE, gMonFrontPic_Blastoise), + SPECIES_SPRITE(CATERPIE, gMonFrontPic_Caterpie), + SPECIES_SPRITE(METAPOD, gMonFrontPic_Metapod), + SPECIES_SPRITE(BUTTERFREE, gMonFrontPic_Butterfree), + SPECIES_SPRITE(WEEDLE, gMonFrontPic_Weedle), + SPECIES_SPRITE(KAKUNA, gMonFrontPic_Kakuna), + SPECIES_SPRITE(BEEDRILL, gMonFrontPic_Beedrill), + SPECIES_SPRITE(PIDGEY, gMonFrontPic_Pidgey), + SPECIES_SPRITE(PIDGEOTTO, gMonFrontPic_Pidgeotto), + SPECIES_SPRITE(PIDGEOT, gMonFrontPic_Pidgeot), + SPECIES_SPRITE(RATTATA, gMonFrontPic_Rattata), + SPECIES_SPRITE(RATICATE, gMonFrontPic_Raticate), + SPECIES_SPRITE(SPEAROW, gMonFrontPic_Spearow), + SPECIES_SPRITE(FEAROW, gMonFrontPic_Fearow), + SPECIES_SPRITE(EKANS, gMonFrontPic_Ekans), + SPECIES_SPRITE(ARBOK, gMonFrontPic_Arbok), + SPECIES_SPRITE(PIKACHU, gMonFrontPic_Pikachu), + SPECIES_SPRITE(RAICHU, gMonFrontPic_Raichu), + SPECIES_SPRITE(SANDSHREW, gMonFrontPic_Sandshrew), + SPECIES_SPRITE(SANDSLASH, gMonFrontPic_Sandslash), + SPECIES_SPRITE(NIDORAN_F, gMonFrontPic_NidoranF), + SPECIES_SPRITE(NIDORINA, gMonFrontPic_Nidorina), + SPECIES_SPRITE(NIDOQUEEN, gMonFrontPic_Nidoqueen), + SPECIES_SPRITE(NIDORAN_M, gMonFrontPic_NidoranM), + SPECIES_SPRITE(NIDORINO, gMonFrontPic_Nidorino), + SPECIES_SPRITE(NIDOKING, gMonFrontPic_Nidoking), + SPECIES_SPRITE(CLEFAIRY, gMonFrontPic_Clefairy), + SPECIES_SPRITE(CLEFABLE, gMonFrontPic_Clefable), + SPECIES_SPRITE(VULPIX, gMonFrontPic_Vulpix), + SPECIES_SPRITE(NINETALES, gMonFrontPic_Ninetales), + SPECIES_SPRITE(JIGGLYPUFF, gMonFrontPic_Jigglypuff), + SPECIES_SPRITE(WIGGLYTUFF, gMonFrontPic_Wigglytuff), + SPECIES_SPRITE(ZUBAT, gMonFrontPic_Zubat), + SPECIES_SPRITE(GOLBAT, gMonFrontPic_Golbat), + SPECIES_SPRITE(ODDISH, gMonFrontPic_Oddish), + SPECIES_SPRITE(GLOOM, gMonFrontPic_Gloom), + SPECIES_SPRITE(VILEPLUME, gMonFrontPic_Vileplume), + SPECIES_SPRITE(PARAS, gMonFrontPic_Paras), + SPECIES_SPRITE(PARASECT, gMonFrontPic_Parasect), + SPECIES_SPRITE(VENONAT, gMonFrontPic_Venonat), + SPECIES_SPRITE(VENOMOTH, gMonFrontPic_Venomoth), + SPECIES_SPRITE(DIGLETT, gMonFrontPic_Diglett), + SPECIES_SPRITE(DUGTRIO, gMonFrontPic_Dugtrio), + SPECIES_SPRITE(MEOWTH, gMonFrontPic_Meowth), + SPECIES_SPRITE(PERSIAN, gMonFrontPic_Persian), + SPECIES_SPRITE(PSYDUCK, gMonFrontPic_Psyduck), + SPECIES_SPRITE(GOLDUCK, gMonFrontPic_Golduck), + SPECIES_SPRITE(MANKEY, gMonFrontPic_Mankey), + SPECIES_SPRITE(PRIMEAPE, gMonFrontPic_Primeape), + SPECIES_SPRITE(GROWLITHE, gMonFrontPic_Growlithe), + SPECIES_SPRITE(ARCANINE, gMonFrontPic_Arcanine), + SPECIES_SPRITE(POLIWAG, gMonFrontPic_Poliwag), + SPECIES_SPRITE(POLIWHIRL, gMonFrontPic_Poliwhirl), + SPECIES_SPRITE(POLIWRATH, gMonFrontPic_Poliwrath), + SPECIES_SPRITE(ABRA, gMonFrontPic_Abra), + SPECIES_SPRITE(KADABRA, gMonFrontPic_Kadabra), + SPECIES_SPRITE(ALAKAZAM, gMonFrontPic_Alakazam), + SPECIES_SPRITE(MACHOP, gMonFrontPic_Machop), + SPECIES_SPRITE(MACHOKE, gMonFrontPic_Machoke), + SPECIES_SPRITE(MACHAMP, gMonFrontPic_Machamp), + SPECIES_SPRITE(BELLSPROUT, gMonFrontPic_Bellsprout), + SPECIES_SPRITE(WEEPINBELL, gMonFrontPic_Weepinbell), + SPECIES_SPRITE(VICTREEBEL, gMonFrontPic_Victreebel), + SPECIES_SPRITE(TENTACOOL, gMonFrontPic_Tentacool), + SPECIES_SPRITE(TENTACRUEL, gMonFrontPic_Tentacruel), + SPECIES_SPRITE(GEODUDE, gMonFrontPic_Geodude), + SPECIES_SPRITE(GRAVELER, gMonFrontPic_Graveler), + SPECIES_SPRITE(GOLEM, gMonFrontPic_Golem), + SPECIES_SPRITE(PONYTA, gMonFrontPic_Ponyta), + SPECIES_SPRITE(RAPIDASH, gMonFrontPic_Rapidash), + SPECIES_SPRITE(SLOWPOKE, gMonFrontPic_Slowpoke), + SPECIES_SPRITE(SLOWBRO, gMonFrontPic_Slowbro), + SPECIES_SPRITE(MAGNEMITE, gMonFrontPic_Magnemite), + SPECIES_SPRITE(MAGNETON, gMonFrontPic_Magneton), + SPECIES_SPRITE(FARFETCHD, gMonFrontPic_Farfetchd), + SPECIES_SPRITE(DODUO, gMonFrontPic_Doduo), + SPECIES_SPRITE(DODRIO, gMonFrontPic_Dodrio), + SPECIES_SPRITE(SEEL, gMonFrontPic_Seel), + SPECIES_SPRITE(DEWGONG, gMonFrontPic_Dewgong), + SPECIES_SPRITE(GRIMER, gMonFrontPic_Grimer), + SPECIES_SPRITE(MUK, gMonFrontPic_Muk), + SPECIES_SPRITE(SHELLDER, gMonFrontPic_Shellder), + SPECIES_SPRITE(CLOYSTER, gMonFrontPic_Cloyster), + SPECIES_SPRITE(GASTLY, gMonFrontPic_Gastly), + SPECIES_SPRITE(HAUNTER, gMonFrontPic_Haunter), + SPECIES_SPRITE(GENGAR, gMonFrontPic_Gengar), + SPECIES_SPRITE(ONIX, gMonFrontPic_Onix), + SPECIES_SPRITE(DROWZEE, gMonFrontPic_Drowzee), + SPECIES_SPRITE(HYPNO, gMonFrontPic_Hypno), + SPECIES_SPRITE(KRABBY, gMonFrontPic_Krabby), + SPECIES_SPRITE(KINGLER, gMonFrontPic_Kingler), + SPECIES_SPRITE(VOLTORB, gMonFrontPic_Voltorb), + SPECIES_SPRITE(ELECTRODE, gMonFrontPic_Electrode), + SPECIES_SPRITE(EXEGGCUTE, gMonFrontPic_Exeggcute), + SPECIES_SPRITE(EXEGGUTOR, gMonFrontPic_Exeggutor), + SPECIES_SPRITE(CUBONE, gMonFrontPic_Cubone), + SPECIES_SPRITE(MAROWAK, gMonFrontPic_Marowak), + SPECIES_SPRITE(HITMONLEE, gMonFrontPic_Hitmonlee), + SPECIES_SPRITE(HITMONCHAN, gMonFrontPic_Hitmonchan), + SPECIES_SPRITE(LICKITUNG, gMonFrontPic_Lickitung), + SPECIES_SPRITE(KOFFING, gMonFrontPic_Koffing), + SPECIES_SPRITE(WEEZING, gMonFrontPic_Weezing), + SPECIES_SPRITE(RHYHORN, gMonFrontPic_Rhyhorn), + SPECIES_SPRITE(RHYDON, gMonFrontPic_Rhydon), + SPECIES_SPRITE(CHANSEY, gMonFrontPic_Chansey), + SPECIES_SPRITE(TANGELA, gMonFrontPic_Tangela), + SPECIES_SPRITE(KANGASKHAN, gMonFrontPic_Kangaskhan), + SPECIES_SPRITE(HORSEA, gMonFrontPic_Horsea), + SPECIES_SPRITE(SEADRA, gMonFrontPic_Seadra), + SPECIES_SPRITE(GOLDEEN, gMonFrontPic_Goldeen), + SPECIES_SPRITE(SEAKING, gMonFrontPic_Seaking), + SPECIES_SPRITE(STARYU, gMonFrontPic_Staryu), + SPECIES_SPRITE(STARMIE, gMonFrontPic_Starmie), + SPECIES_SPRITE(MR_MIME, gMonFrontPic_Mrmime), + SPECIES_SPRITE(SCYTHER, gMonFrontPic_Scyther), + SPECIES_SPRITE(JYNX, gMonFrontPic_Jynx), + SPECIES_SPRITE(ELECTABUZZ, gMonFrontPic_Electabuzz), + SPECIES_SPRITE(MAGMAR, gMonFrontPic_Magmar), + SPECIES_SPRITE(PINSIR, gMonFrontPic_Pinsir), + SPECIES_SPRITE(TAUROS, gMonFrontPic_Tauros), + SPECIES_SPRITE(MAGIKARP, gMonFrontPic_Magikarp), + SPECIES_SPRITE(GYARADOS, gMonFrontPic_Gyarados), + SPECIES_SPRITE(LAPRAS, gMonFrontPic_Lapras), + SPECIES_SPRITE(DITTO, gMonFrontPic_Ditto), + SPECIES_SPRITE(EEVEE, gMonFrontPic_Eevee), + SPECIES_SPRITE(VAPOREON, gMonFrontPic_Vaporeon), + SPECIES_SPRITE(JOLTEON, gMonFrontPic_Jolteon), + SPECIES_SPRITE(FLAREON, gMonFrontPic_Flareon), + SPECIES_SPRITE(PORYGON, gMonFrontPic_Porygon), + SPECIES_SPRITE(OMANYTE, gMonFrontPic_Omanyte), + SPECIES_SPRITE(OMASTAR, gMonFrontPic_Omastar), + SPECIES_SPRITE(KABUTO, gMonFrontPic_Kabuto), + SPECIES_SPRITE(KABUTOPS, gMonFrontPic_Kabutops), + SPECIES_SPRITE(AERODACTYL, gMonFrontPic_Aerodactyl), + SPECIES_SPRITE(SNORLAX, gMonFrontPic_Snorlax), + SPECIES_SPRITE(ARTICUNO, gMonFrontPic_Articuno), + SPECIES_SPRITE(ZAPDOS, gMonFrontPic_Zapdos), + SPECIES_SPRITE(MOLTRES, gMonFrontPic_Moltres), + SPECIES_SPRITE(DRATINI, gMonFrontPic_Dratini), + SPECIES_SPRITE(DRAGONAIR, gMonFrontPic_Dragonair), + SPECIES_SPRITE(DRAGONITE, gMonFrontPic_Dragonite), + SPECIES_SPRITE(MEWTWO, gMonFrontPic_Mewtwo), + SPECIES_SPRITE(MEW, gMonFrontPic_Mew), + SPECIES_SPRITE(CHIKORITA, gMonFrontPic_Chikorita), + SPECIES_SPRITE(BAYLEEF, gMonFrontPic_Bayleef), + SPECIES_SPRITE(MEGANIUM, gMonFrontPic_Meganium), + SPECIES_SPRITE(CYNDAQUIL, gMonFrontPic_Cyndaquil), + SPECIES_SPRITE(QUILAVA, gMonFrontPic_Quilava), + SPECIES_SPRITE(TYPHLOSION, gMonFrontPic_Typhlosion), + SPECIES_SPRITE(TOTODILE, gMonFrontPic_Totodile), + SPECIES_SPRITE(CROCONAW, gMonFrontPic_Croconaw), + SPECIES_SPRITE(FERALIGATR, gMonFrontPic_Feraligatr), + SPECIES_SPRITE(SENTRET, gMonFrontPic_Sentret), + SPECIES_SPRITE(FURRET, gMonFrontPic_Furret), + SPECIES_SPRITE(HOOTHOOT, gMonFrontPic_Hoothoot), + SPECIES_SPRITE(NOCTOWL, gMonFrontPic_Noctowl), + SPECIES_SPRITE(LEDYBA, gMonFrontPic_Ledyba), + SPECIES_SPRITE(LEDIAN, gMonFrontPic_Ledian), + SPECIES_SPRITE(SPINARAK, gMonFrontPic_Spinarak), + SPECIES_SPRITE(ARIADOS, gMonFrontPic_Ariados), + SPECIES_SPRITE(CROBAT, gMonFrontPic_Crobat), + SPECIES_SPRITE(CHINCHOU, gMonFrontPic_Chinchou), + SPECIES_SPRITE(LANTURN, gMonFrontPic_Lanturn), + SPECIES_SPRITE(PICHU, gMonFrontPic_Pichu), + SPECIES_SPRITE(CLEFFA, gMonFrontPic_Cleffa), + SPECIES_SPRITE(IGGLYBUFF, gMonFrontPic_Igglybuff), + SPECIES_SPRITE(TOGEPI, gMonFrontPic_Togepi), + SPECIES_SPRITE(TOGETIC, gMonFrontPic_Togetic), + SPECIES_SPRITE(NATU, gMonFrontPic_Natu), + SPECIES_SPRITE(XATU, gMonFrontPic_Xatu), + SPECIES_SPRITE(MAREEP, gMonFrontPic_Mareep), + SPECIES_SPRITE(FLAAFFY, gMonFrontPic_Flaaffy), + SPECIES_SPRITE(AMPHAROS, gMonFrontPic_Ampharos), + SPECIES_SPRITE(BELLOSSOM, gMonFrontPic_Bellossom), + SPECIES_SPRITE(MARILL, gMonFrontPic_Marill), + SPECIES_SPRITE(AZUMARILL, gMonFrontPic_Azumarill), + SPECIES_SPRITE(SUDOWOODO, gMonFrontPic_Sudowoodo), + SPECIES_SPRITE(POLITOED, gMonFrontPic_Politoed), + SPECIES_SPRITE(HOPPIP, gMonFrontPic_Hoppip), + SPECIES_SPRITE(SKIPLOOM, gMonFrontPic_Skiploom), + SPECIES_SPRITE(JUMPLUFF, gMonFrontPic_Jumpluff), + SPECIES_SPRITE(AIPOM, gMonFrontPic_Aipom), + SPECIES_SPRITE(SUNKERN, gMonFrontPic_Sunkern), + SPECIES_SPRITE(SUNFLORA, gMonFrontPic_Sunflora), + SPECIES_SPRITE(YANMA, gMonFrontPic_Yanma), + SPECIES_SPRITE(WOOPER, gMonFrontPic_Wooper), + SPECIES_SPRITE(QUAGSIRE, gMonFrontPic_Quagsire), + SPECIES_SPRITE(ESPEON, gMonFrontPic_Espeon), + SPECIES_SPRITE(UMBREON, gMonFrontPic_Umbreon), + SPECIES_SPRITE(MURKROW, gMonFrontPic_Murkrow), + SPECIES_SPRITE(SLOWKING, gMonFrontPic_Slowking), + SPECIES_SPRITE(MISDREAVUS, gMonFrontPic_Misdreavus), + SPECIES_SPRITE(UNOWN, gMonFrontPic_UnownA), + SPECIES_SPRITE(WOBBUFFET, gMonFrontPic_Wobbuffet), + SPECIES_SPRITE(GIRAFARIG, gMonFrontPic_Girafarig), + SPECIES_SPRITE(PINECO, gMonFrontPic_Pineco), + SPECIES_SPRITE(FORRETRESS, gMonFrontPic_Forretress), + SPECIES_SPRITE(DUNSPARCE, gMonFrontPic_Dunsparce), + SPECIES_SPRITE(GLIGAR, gMonFrontPic_Gligar), + SPECIES_SPRITE(STEELIX, gMonFrontPic_Steelix), + SPECIES_SPRITE(SNUBBULL, gMonFrontPic_Snubbull), + SPECIES_SPRITE(GRANBULL, gMonFrontPic_Granbull), + SPECIES_SPRITE(QWILFISH, gMonFrontPic_Qwilfish), + SPECIES_SPRITE(SCIZOR, gMonFrontPic_Scizor), + SPECIES_SPRITE(SHUCKLE, gMonFrontPic_Shuckle), + SPECIES_SPRITE(HERACROSS, gMonFrontPic_Heracross), + SPECIES_SPRITE(SNEASEL, gMonFrontPic_Sneasel), + SPECIES_SPRITE(TEDDIURSA, gMonFrontPic_Teddiursa), + SPECIES_SPRITE(URSARING, gMonFrontPic_Ursaring), + SPECIES_SPRITE(SLUGMA, gMonFrontPic_Slugma), + SPECIES_SPRITE(MAGCARGO, gMonFrontPic_Magcargo), + SPECIES_SPRITE(SWINUB, gMonFrontPic_Swinub), + SPECIES_SPRITE(PILOSWINE, gMonFrontPic_Piloswine), + SPECIES_SPRITE(CORSOLA, gMonFrontPic_Corsola), + SPECIES_SPRITE(REMORAID, gMonFrontPic_Remoraid), + SPECIES_SPRITE(OCTILLERY, gMonFrontPic_Octillery), + SPECIES_SPRITE(DELIBIRD, gMonFrontPic_Delibird), + SPECIES_SPRITE(MANTINE, gMonFrontPic_Mantine), + SPECIES_SPRITE(SKARMORY, gMonFrontPic_Skarmory), + SPECIES_SPRITE(HOUNDOUR, gMonFrontPic_Houndour), + SPECIES_SPRITE(HOUNDOOM, gMonFrontPic_Houndoom), + SPECIES_SPRITE(KINGDRA, gMonFrontPic_Kingdra), + SPECIES_SPRITE(PHANPY, gMonFrontPic_Phanpy), + SPECIES_SPRITE(DONPHAN, gMonFrontPic_Donphan), + SPECIES_SPRITE(PORYGON2, gMonFrontPic_Porygon2), + SPECIES_SPRITE(STANTLER, gMonFrontPic_Stantler), + SPECIES_SPRITE(SMEARGLE, gMonFrontPic_Smeargle), + SPECIES_SPRITE(TYROGUE, gMonFrontPic_Tyrogue), + SPECIES_SPRITE(HITMONTOP, gMonFrontPic_Hitmontop), + SPECIES_SPRITE(SMOOCHUM, gMonFrontPic_Smoochum), + SPECIES_SPRITE(ELEKID, gMonFrontPic_Elekid), + SPECIES_SPRITE(MAGBY, gMonFrontPic_Magby), + SPECIES_SPRITE(MILTANK, gMonFrontPic_Miltank), + SPECIES_SPRITE(BLISSEY, gMonFrontPic_Blissey), + SPECIES_SPRITE(RAIKOU, gMonFrontPic_Raikou), + SPECIES_SPRITE(ENTEI, gMonFrontPic_Entei), + SPECIES_SPRITE(SUICUNE, gMonFrontPic_Suicune), + SPECIES_SPRITE(LARVITAR, gMonFrontPic_Larvitar), + SPECIES_SPRITE(PUPITAR, gMonFrontPic_Pupitar), + SPECIES_SPRITE(TYRANITAR, gMonFrontPic_Tyranitar), + SPECIES_SPRITE(LUGIA, gMonFrontPic_Lugia), + SPECIES_SPRITE(HO_OH, gMonFrontPic_HoOh), + SPECIES_SPRITE(CELEBI, gMonFrontPic_Celebi), + SPECIES_SPRITE(OLD_UNOWN_B, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_C, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_D, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_E, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_F, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_G, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_H, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_I, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_J, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_K, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_L, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_M, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_N, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_O, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_P, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Q, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_R, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_S, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_T, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_U, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_V, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_W, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_X, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Y, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(OLD_UNOWN_Z, gMonFrontPic_DoubleQuestionMark), + SPECIES_SPRITE(TREECKO, gMonFrontPic_Treecko), + SPECIES_SPRITE(GROVYLE, gMonFrontPic_Grovyle), + SPECIES_SPRITE(SCEPTILE, gMonFrontPic_Sceptile), + SPECIES_SPRITE(TORCHIC, gMonFrontPic_Torchic), + SPECIES_SPRITE(COMBUSKEN, gMonFrontPic_Combusken), + SPECIES_SPRITE(BLAZIKEN, gMonFrontPic_Blaziken), + SPECIES_SPRITE(MUDKIP, gMonFrontPic_Mudkip), + SPECIES_SPRITE(MARSHTOMP, gMonFrontPic_Marshtomp), + SPECIES_SPRITE(SWAMPERT, gMonFrontPic_Swampert), + SPECIES_SPRITE(POOCHYENA, gMonFrontPic_Poochyena), + SPECIES_SPRITE(MIGHTYENA, gMonFrontPic_Mightyena), + SPECIES_SPRITE(ZIGZAGOON, gMonFrontPic_Zigzagoon), + SPECIES_SPRITE(LINOONE, gMonFrontPic_Linoone), + SPECIES_SPRITE(WURMPLE, gMonFrontPic_Wurmple), + SPECIES_SPRITE(SILCOON, gMonFrontPic_Silcoon), + SPECIES_SPRITE(BEAUTIFLY, gMonFrontPic_Beautifly), + SPECIES_SPRITE(CASCOON, gMonFrontPic_Cascoon), + SPECIES_SPRITE(DUSTOX, gMonFrontPic_Dustox), + SPECIES_SPRITE(LOTAD, gMonFrontPic_Lotad), + SPECIES_SPRITE(LOMBRE, gMonFrontPic_Lombre), + SPECIES_SPRITE(LUDICOLO, gMonFrontPic_Ludicolo), + SPECIES_SPRITE(SEEDOT, gMonFrontPic_Seedot), + SPECIES_SPRITE(NUZLEAF, gMonFrontPic_Nuzleaf), + SPECIES_SPRITE(SHIFTRY, gMonFrontPic_Shiftry), + SPECIES_SPRITE(NINCADA, gMonFrontPic_Nincada), + SPECIES_SPRITE(NINJASK, gMonFrontPic_Ninjask), + SPECIES_SPRITE(SHEDINJA, gMonFrontPic_Shedinja), + SPECIES_SPRITE(TAILLOW, gMonFrontPic_Taillow), + SPECIES_SPRITE(SWELLOW, gMonFrontPic_Swellow), + SPECIES_SPRITE(SHROOMISH, gMonFrontPic_Shroomish), + SPECIES_SPRITE(BRELOOM, gMonFrontPic_Breloom), + SPECIES_SPRITE(SPINDA, gMonFrontPic_Spinda), + SPECIES_SPRITE(WINGULL, gMonFrontPic_Wingull), + SPECIES_SPRITE(PELIPPER, gMonFrontPic_Pelipper), + SPECIES_SPRITE(SURSKIT, gMonFrontPic_Surskit), + SPECIES_SPRITE(MASQUERAIN, gMonFrontPic_Masquerain), + SPECIES_SPRITE(WAILMER, gMonFrontPic_Wailmer), + SPECIES_SPRITE(WAILORD, gMonFrontPic_Wailord), + SPECIES_SPRITE(SKITTY, gMonFrontPic_Skitty), + SPECIES_SPRITE(DELCATTY, gMonFrontPic_Delcatty), + SPECIES_SPRITE(KECLEON, gMonFrontPic_Kecleon), + SPECIES_SPRITE(BALTOY, gMonFrontPic_Baltoy), + SPECIES_SPRITE(CLAYDOL, gMonFrontPic_Claydol), + SPECIES_SPRITE(NOSEPASS, gMonFrontPic_Nosepass), + SPECIES_SPRITE(TORKOAL, gMonFrontPic_Torkoal), + SPECIES_SPRITE(SABLEYE, gMonFrontPic_Sableye), + SPECIES_SPRITE(BARBOACH, gMonFrontPic_Barboach), + SPECIES_SPRITE(WHISCASH, gMonFrontPic_Whiscash), + SPECIES_SPRITE(LUVDISC, gMonFrontPic_Luvdisc), + SPECIES_SPRITE(CORPHISH, gMonFrontPic_Corphish), + SPECIES_SPRITE(CRAWDAUNT, gMonFrontPic_Crawdaunt), + SPECIES_SPRITE(FEEBAS, gMonFrontPic_Feebas), + SPECIES_SPRITE(MILOTIC, gMonFrontPic_Milotic), + SPECIES_SPRITE(CARVANHA, gMonFrontPic_Carvanha), + SPECIES_SPRITE(SHARPEDO, gMonFrontPic_Sharpedo), + SPECIES_SPRITE(TRAPINCH, gMonFrontPic_Trapinch), + SPECIES_SPRITE(VIBRAVA, gMonFrontPic_Vibrava), + SPECIES_SPRITE(FLYGON, gMonFrontPic_Flygon), + SPECIES_SPRITE(MAKUHITA, gMonFrontPic_Makuhita), + SPECIES_SPRITE(HARIYAMA, gMonFrontPic_Hariyama), + SPECIES_SPRITE(ELECTRIKE, gMonFrontPic_Electrike), + SPECIES_SPRITE(MANECTRIC, gMonFrontPic_Manectric), + SPECIES_SPRITE(NUMEL, gMonFrontPic_Numel), + SPECIES_SPRITE(CAMERUPT, gMonFrontPic_Camerupt), + SPECIES_SPRITE(SPHEAL, gMonFrontPic_Spheal), + SPECIES_SPRITE(SEALEO, gMonFrontPic_Sealeo), + SPECIES_SPRITE(WALREIN, gMonFrontPic_Walrein), + SPECIES_SPRITE(CACNEA, gMonFrontPic_Cacnea), + SPECIES_SPRITE(CACTURNE, gMonFrontPic_Cacturne), + SPECIES_SPRITE(SNORUNT, gMonFrontPic_Snorunt), + SPECIES_SPRITE(GLALIE, gMonFrontPic_Glalie), + SPECIES_SPRITE(LUNATONE, gMonFrontPic_Lunatone), + SPECIES_SPRITE(SOLROCK, gMonFrontPic_Solrock), + SPECIES_SPRITE(AZURILL, gMonFrontPic_Azurill), + SPECIES_SPRITE(SPOINK, gMonFrontPic_Spoink), + SPECIES_SPRITE(GRUMPIG, gMonFrontPic_Grumpig), + SPECIES_SPRITE(PLUSLE, gMonFrontPic_Plusle), + SPECIES_SPRITE(MINUN, gMonFrontPic_Minun), + SPECIES_SPRITE(MAWILE, gMonFrontPic_Mawile), + SPECIES_SPRITE(MEDITITE, gMonFrontPic_Meditite), + SPECIES_SPRITE(MEDICHAM, gMonFrontPic_Medicham), + SPECIES_SPRITE(SWABLU, gMonFrontPic_Swablu), + SPECIES_SPRITE(ALTARIA, gMonFrontPic_Altaria), + SPECIES_SPRITE(WYNAUT, gMonFrontPic_Wynaut), + SPECIES_SPRITE(DUSKULL, gMonFrontPic_Duskull), + SPECIES_SPRITE(DUSCLOPS, gMonFrontPic_Dusclops), + SPECIES_SPRITE(ROSELIA, gMonFrontPic_Roselia), + SPECIES_SPRITE(SLAKOTH, gMonFrontPic_Slakoth), + SPECIES_SPRITE(VIGOROTH, gMonFrontPic_Vigoroth), + SPECIES_SPRITE(SLAKING, gMonFrontPic_Slaking), + SPECIES_SPRITE(GULPIN, gMonFrontPic_Gulpin), + SPECIES_SPRITE(SWALOT, gMonFrontPic_Swalot), + SPECIES_SPRITE(TROPIUS, gMonFrontPic_Tropius), + SPECIES_SPRITE(WHISMUR, gMonFrontPic_Whismur), + SPECIES_SPRITE(LOUDRED, gMonFrontPic_Loudred), + SPECIES_SPRITE(EXPLOUD, gMonFrontPic_Exploud), + SPECIES_SPRITE(CLAMPERL, gMonFrontPic_Clamperl), + SPECIES_SPRITE(HUNTAIL, gMonFrontPic_Huntail), + SPECIES_SPRITE(GOREBYSS, gMonFrontPic_Gorebyss), + SPECIES_SPRITE(ABSOL, gMonFrontPic_Absol), + SPECIES_SPRITE(SHUPPET, gMonFrontPic_Shuppet), + SPECIES_SPRITE(BANETTE, gMonFrontPic_Banette), + SPECIES_SPRITE(SEVIPER, gMonFrontPic_Seviper), + SPECIES_SPRITE(ZANGOOSE, gMonFrontPic_Zangoose), + SPECIES_SPRITE(RELICANTH, gMonFrontPic_Relicanth), + SPECIES_SPRITE(ARON, gMonFrontPic_Aron), + SPECIES_SPRITE(LAIRON, gMonFrontPic_Lairon), + SPECIES_SPRITE(AGGRON, gMonFrontPic_Aggron), + SPECIES_SPRITE(CASTFORM, gMonFrontPic_Castform), + SPECIES_SPRITE(VOLBEAT, gMonFrontPic_Volbeat), + SPECIES_SPRITE(ILLUMISE, gMonFrontPic_Illumise), + SPECIES_SPRITE(LILEEP, gMonFrontPic_Lileep), + SPECIES_SPRITE(CRADILY, gMonFrontPic_Cradily), + SPECIES_SPRITE(ANORITH, gMonFrontPic_Anorith), + SPECIES_SPRITE(ARMALDO, gMonFrontPic_Armaldo), + SPECIES_SPRITE(RALTS, gMonFrontPic_Ralts), + SPECIES_SPRITE(KIRLIA, gMonFrontPic_Kirlia), + SPECIES_SPRITE(GARDEVOIR, gMonFrontPic_Gardevoir), + SPECIES_SPRITE(BAGON, gMonFrontPic_Bagon), + SPECIES_SPRITE(SHELGON, gMonFrontPic_Shelgon), + SPECIES_SPRITE(SALAMENCE, gMonFrontPic_Salamence), + SPECIES_SPRITE(BELDUM, gMonFrontPic_Beldum), + SPECIES_SPRITE(METANG, gMonFrontPic_Metang), + SPECIES_SPRITE(METAGROSS, gMonFrontPic_Metagross), + SPECIES_SPRITE(REGIROCK, gMonFrontPic_Regirock), + SPECIES_SPRITE(REGICE, gMonFrontPic_Regice), + SPECIES_SPRITE(REGISTEEL, gMonFrontPic_Registeel), + SPECIES_SPRITE(KYOGRE, gMonFrontPic_Kyogre), + SPECIES_SPRITE(GROUDON, gMonFrontPic_Groudon), + SPECIES_SPRITE(RAYQUAZA, gMonFrontPic_Rayquaza), + SPECIES_SPRITE(LATIAS, gMonFrontPic_Latias), + SPECIES_SPRITE(LATIOS, gMonFrontPic_Latios), + SPECIES_SPRITE(JIRACHI, gMonFrontPic_Jirachi), + SPECIES_SPRITE(DEOXYS, gMonFrontPic_Deoxys), + SPECIES_SPRITE(CHIMECHO, gMonFrontPic_Chimecho), + SPECIES_SPRITE(EGG, gMonFrontPic_Egg), + SPECIES_SPRITE(UNOWN_B, gMonFrontPic_UnownB), + SPECIES_SPRITE(UNOWN_C, gMonFrontPic_UnownC), + SPECIES_SPRITE(UNOWN_D, gMonFrontPic_UnownD), + SPECIES_SPRITE(UNOWN_E, gMonFrontPic_UnownE), + SPECIES_SPRITE(UNOWN_F, gMonFrontPic_UnownF), + SPECIES_SPRITE(UNOWN_G, gMonFrontPic_UnownG), + SPECIES_SPRITE(UNOWN_H, gMonFrontPic_UnownH), + SPECIES_SPRITE(UNOWN_I, gMonFrontPic_UnownI), + SPECIES_SPRITE(UNOWN_J, gMonFrontPic_UnownJ), + SPECIES_SPRITE(UNOWN_K, gMonFrontPic_UnownK), + SPECIES_SPRITE(UNOWN_L, gMonFrontPic_UnownL), + SPECIES_SPRITE(UNOWN_M, gMonFrontPic_UnownM), + SPECIES_SPRITE(UNOWN_N, gMonFrontPic_UnownN), + SPECIES_SPRITE(UNOWN_O, gMonFrontPic_UnownO), + SPECIES_SPRITE(UNOWN_P, gMonFrontPic_UnownP), + SPECIES_SPRITE(UNOWN_Q, gMonFrontPic_UnownQ), + SPECIES_SPRITE(UNOWN_R, gMonFrontPic_UnownR), + SPECIES_SPRITE(UNOWN_S, gMonFrontPic_UnownS), + SPECIES_SPRITE(UNOWN_T, gMonFrontPic_UnownT), + SPECIES_SPRITE(UNOWN_U, gMonFrontPic_UnownU), + SPECIES_SPRITE(UNOWN_V, gMonFrontPic_UnownV), + SPECIES_SPRITE(UNOWN_W, gMonFrontPic_UnownW), + SPECIES_SPRITE(UNOWN_X, gMonFrontPic_UnownX), + SPECIES_SPRITE(UNOWN_Y, gMonFrontPic_UnownY), + SPECIES_SPRITE(UNOWN_Z, gMonFrontPic_UnownZ), + SPECIES_SPRITE(UNOWN_EMARK, gMonFrontPic_UnownExclamationMark), + SPECIES_SPRITE(UNOWN_QMARK, gMonFrontPic_UnownQuestionMark), +}; diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h new file mode 100644 index 000000000..35edcc76c --- /dev/null +++ b/src/data/pokemon_graphics/palette_table.h @@ -0,0 +1,443 @@ +const struct CompressedSpritePalette gMonPaletteTable[] = +{ + SPECIES_PAL(NONE, gMonPalette_CircledQuestionMark), + SPECIES_PAL(BULBASAUR, gMonPalette_Bulbasaur), + SPECIES_PAL(IVYSAUR, gMonPalette_Ivysaur), + SPECIES_PAL(VENUSAUR, gMonPalette_Venusaur), + SPECIES_PAL(CHARMANDER, gMonPalette_Charmander), + SPECIES_PAL(CHARMELEON, gMonPalette_Charmeleon), + SPECIES_PAL(CHARIZARD, gMonPalette_Charizard), + SPECIES_PAL(SQUIRTLE, gMonPalette_Squirtle), + SPECIES_PAL(WARTORTLE, gMonPalette_Wartortle), + SPECIES_PAL(BLASTOISE, gMonPalette_Blastoise), + SPECIES_PAL(CATERPIE, gMonPalette_Caterpie), + SPECIES_PAL(METAPOD, gMonPalette_Metapod), + SPECIES_PAL(BUTTERFREE, gMonPalette_Butterfree), + SPECIES_PAL(WEEDLE, gMonPalette_Weedle), + SPECIES_PAL(KAKUNA, gMonPalette_Kakuna), + SPECIES_PAL(BEEDRILL, gMonPalette_Beedrill), + SPECIES_PAL(PIDGEY, gMonPalette_Pidgey), + SPECIES_PAL(PIDGEOTTO, gMonPalette_Pidgeotto), + SPECIES_PAL(PIDGEOT, gMonPalette_Pidgeot), + SPECIES_PAL(RATTATA, gMonPalette_Rattata), + SPECIES_PAL(RATICATE, gMonPalette_Raticate), + SPECIES_PAL(SPEAROW, gMonPalette_Spearow), + SPECIES_PAL(FEAROW, gMonPalette_Fearow), + SPECIES_PAL(EKANS, gMonPalette_Ekans), + SPECIES_PAL(ARBOK, gMonPalette_Arbok), + SPECIES_PAL(PIKACHU, gMonPalette_Pikachu), + SPECIES_PAL(RAICHU, gMonPalette_Raichu), + SPECIES_PAL(SANDSHREW, gMonPalette_Sandshrew), + SPECIES_PAL(SANDSLASH, gMonPalette_Sandslash), + SPECIES_PAL(NIDORAN_F, gMonPalette_NidoranF), + SPECIES_PAL(NIDORINA, gMonPalette_Nidorina), + SPECIES_PAL(NIDOQUEEN, gMonPalette_Nidoqueen), + SPECIES_PAL(NIDORAN_M, gMonPalette_NidoranM), + SPECIES_PAL(NIDORINO, gMonPalette_Nidorino), + SPECIES_PAL(NIDOKING, gMonPalette_Nidoking), + SPECIES_PAL(CLEFAIRY, gMonPalette_Clefairy), + SPECIES_PAL(CLEFABLE, gMonPalette_Clefable), + SPECIES_PAL(VULPIX, gMonPalette_Vulpix), + SPECIES_PAL(NINETALES, gMonPalette_Ninetales), + SPECIES_PAL(JIGGLYPUFF, gMonPalette_Jigglypuff), + SPECIES_PAL(WIGGLYTUFF, gMonPalette_Wigglytuff), + SPECIES_PAL(ZUBAT, gMonPalette_Zubat), + SPECIES_PAL(GOLBAT, gMonPalette_Golbat), + SPECIES_PAL(ODDISH, gMonPalette_Oddish), + SPECIES_PAL(GLOOM, gMonPalette_Gloom), + SPECIES_PAL(VILEPLUME, gMonPalette_Vileplume), + SPECIES_PAL(PARAS, gMonPalette_Paras), + SPECIES_PAL(PARASECT, gMonPalette_Parasect), + SPECIES_PAL(VENONAT, gMonPalette_Venonat), + SPECIES_PAL(VENOMOTH, gMonPalette_Venomoth), + SPECIES_PAL(DIGLETT, gMonPalette_Diglett), + SPECIES_PAL(DUGTRIO, gMonPalette_Dugtrio), + SPECIES_PAL(MEOWTH, gMonPalette_Meowth), + SPECIES_PAL(PERSIAN, gMonPalette_Persian), + SPECIES_PAL(PSYDUCK, gMonPalette_Psyduck), + SPECIES_PAL(GOLDUCK, gMonPalette_Golduck), + SPECIES_PAL(MANKEY, gMonPalette_Mankey), + SPECIES_PAL(PRIMEAPE, gMonPalette_Primeape), + SPECIES_PAL(GROWLITHE, gMonPalette_Growlithe), + SPECIES_PAL(ARCANINE, gMonPalette_Arcanine), + SPECIES_PAL(POLIWAG, gMonPalette_Poliwag), + SPECIES_PAL(POLIWHIRL, gMonPalette_Poliwhirl), + SPECIES_PAL(POLIWRATH, gMonPalette_Poliwrath), + SPECIES_PAL(ABRA, gMonPalette_Abra), + SPECIES_PAL(KADABRA, gMonPalette_Kadabra), + SPECIES_PAL(ALAKAZAM, gMonPalette_Alakazam), + SPECIES_PAL(MACHOP, gMonPalette_Machop), + SPECIES_PAL(MACHOKE, gMonPalette_Machoke), + SPECIES_PAL(MACHAMP, gMonPalette_Machamp), + SPECIES_PAL(BELLSPROUT, gMonPalette_Bellsprout), + SPECIES_PAL(WEEPINBELL, gMonPalette_Weepinbell), + SPECIES_PAL(VICTREEBEL, gMonPalette_Victreebel), + SPECIES_PAL(TENTACOOL, gMonPalette_Tentacool), + SPECIES_PAL(TENTACRUEL, gMonPalette_Tentacruel), + SPECIES_PAL(GEODUDE, gMonPalette_Geodude), + SPECIES_PAL(GRAVELER, gMonPalette_Graveler), + SPECIES_PAL(GOLEM, gMonPalette_Golem), + SPECIES_PAL(PONYTA, gMonPalette_Ponyta), + SPECIES_PAL(RAPIDASH, gMonPalette_Rapidash), + SPECIES_PAL(SLOWPOKE, gMonPalette_Slowpoke), + SPECIES_PAL(SLOWBRO, gMonPalette_Slowbro), + SPECIES_PAL(MAGNEMITE, gMonPalette_Magnemite), + SPECIES_PAL(MAGNETON, gMonPalette_Magneton), + SPECIES_PAL(FARFETCHD, gMonPalette_Farfetchd), + SPECIES_PAL(DODUO, gMonPalette_Doduo), + SPECIES_PAL(DODRIO, gMonPalette_Dodrio), + SPECIES_PAL(SEEL, gMonPalette_Seel), + SPECIES_PAL(DEWGONG, gMonPalette_Dewgong), + SPECIES_PAL(GRIMER, gMonPalette_Grimer), + SPECIES_PAL(MUK, gMonPalette_Muk), + SPECIES_PAL(SHELLDER, gMonPalette_Shellder), + SPECIES_PAL(CLOYSTER, gMonPalette_Cloyster), + SPECIES_PAL(GASTLY, gMonPalette_Gastly), + SPECIES_PAL(HAUNTER, gMonPalette_Haunter), + SPECIES_PAL(GENGAR, gMonPalette_Gengar), + SPECIES_PAL(ONIX, gMonPalette_Onix), + SPECIES_PAL(DROWZEE, gMonPalette_Drowzee), + SPECIES_PAL(HYPNO, gMonPalette_Hypno), + SPECIES_PAL(KRABBY, gMonPalette_Krabby), + SPECIES_PAL(KINGLER, gMonPalette_Kingler), + SPECIES_PAL(VOLTORB, gMonPalette_Voltorb), + SPECIES_PAL(ELECTRODE, gMonPalette_Electrode), + SPECIES_PAL(EXEGGCUTE, gMonPalette_Exeggcute), + SPECIES_PAL(EXEGGUTOR, gMonPalette_Exeggutor), + SPECIES_PAL(CUBONE, gMonPalette_Cubone), + SPECIES_PAL(MAROWAK, gMonPalette_Marowak), + SPECIES_PAL(HITMONLEE, gMonPalette_Hitmonlee), + SPECIES_PAL(HITMONCHAN, gMonPalette_Hitmonchan), + SPECIES_PAL(LICKITUNG, gMonPalette_Lickitung), + SPECIES_PAL(KOFFING, gMonPalette_Koffing), + SPECIES_PAL(WEEZING, gMonPalette_Weezing), + SPECIES_PAL(RHYHORN, gMonPalette_Rhyhorn), + SPECIES_PAL(RHYDON, gMonPalette_Rhydon), + SPECIES_PAL(CHANSEY, gMonPalette_Chansey), + SPECIES_PAL(TANGELA, gMonPalette_Tangela), + SPECIES_PAL(KANGASKHAN, gMonPalette_Kangaskhan), + SPECIES_PAL(HORSEA, gMonPalette_Horsea), + SPECIES_PAL(SEADRA, gMonPalette_Seadra), + SPECIES_PAL(GOLDEEN, gMonPalette_Goldeen), + SPECIES_PAL(SEAKING, gMonPalette_Seaking), + SPECIES_PAL(STARYU, gMonPalette_Staryu), + SPECIES_PAL(STARMIE, gMonPalette_Starmie), + SPECIES_PAL(MR_MIME, gMonPalette_Mrmime), + SPECIES_PAL(SCYTHER, gMonPalette_Scyther), + SPECIES_PAL(JYNX, gMonPalette_Jynx), + SPECIES_PAL(ELECTABUZZ, gMonPalette_Electabuzz), + SPECIES_PAL(MAGMAR, gMonPalette_Magmar), + SPECIES_PAL(PINSIR, gMonPalette_Pinsir), + SPECIES_PAL(TAUROS, gMonPalette_Tauros), + SPECIES_PAL(MAGIKARP, gMonPalette_Magikarp), + SPECIES_PAL(GYARADOS, gMonPalette_Gyarados), + SPECIES_PAL(LAPRAS, gMonPalette_Lapras), + SPECIES_PAL(DITTO, gMonPalette_Ditto), + SPECIES_PAL(EEVEE, gMonPalette_Eevee), + SPECIES_PAL(VAPOREON, gMonPalette_Vaporeon), + SPECIES_PAL(JOLTEON, gMonPalette_Jolteon), + SPECIES_PAL(FLAREON, gMonPalette_Flareon), + SPECIES_PAL(PORYGON, gMonPalette_Porygon), + SPECIES_PAL(OMANYTE, gMonPalette_Omanyte), + SPECIES_PAL(OMASTAR, gMonPalette_Omastar), + SPECIES_PAL(KABUTO, gMonPalette_Kabuto), + SPECIES_PAL(KABUTOPS, gMonPalette_Kabutops), + SPECIES_PAL(AERODACTYL, gMonPalette_Aerodactyl), + SPECIES_PAL(SNORLAX, gMonPalette_Snorlax), + SPECIES_PAL(ARTICUNO, gMonPalette_Articuno), + SPECIES_PAL(ZAPDOS, gMonPalette_Zapdos), + SPECIES_PAL(MOLTRES, gMonPalette_Moltres), + SPECIES_PAL(DRATINI, gMonPalette_Dratini), + SPECIES_PAL(DRAGONAIR, gMonPalette_Dragonair), + SPECIES_PAL(DRAGONITE, gMonPalette_Dragonite), + SPECIES_PAL(MEWTWO, gMonPalette_Mewtwo), + SPECIES_PAL(MEW, gMonPalette_Mew), + SPECIES_PAL(CHIKORITA, gMonPalette_Chikorita), + SPECIES_PAL(BAYLEEF, gMonPalette_Bayleef), + SPECIES_PAL(MEGANIUM, gMonPalette_Meganium), + SPECIES_PAL(CYNDAQUIL, gMonPalette_Cyndaquil), + SPECIES_PAL(QUILAVA, gMonPalette_Quilava), + SPECIES_PAL(TYPHLOSION, gMonPalette_Typhlosion), + SPECIES_PAL(TOTODILE, gMonPalette_Totodile), + SPECIES_PAL(CROCONAW, gMonPalette_Croconaw), + SPECIES_PAL(FERALIGATR, gMonPalette_Feraligatr), + SPECIES_PAL(SENTRET, gMonPalette_Sentret), + SPECIES_PAL(FURRET, gMonPalette_Furret), + SPECIES_PAL(HOOTHOOT, gMonPalette_Hoothoot), + SPECIES_PAL(NOCTOWL, gMonPalette_Noctowl), + SPECIES_PAL(LEDYBA, gMonPalette_Ledyba), + SPECIES_PAL(LEDIAN, gMonPalette_Ledian), + SPECIES_PAL(SPINARAK, gMonPalette_Spinarak), + SPECIES_PAL(ARIADOS, gMonPalette_Ariados), + SPECIES_PAL(CROBAT, gMonPalette_Crobat), + SPECIES_PAL(CHINCHOU, gMonPalette_Chinchou), + SPECIES_PAL(LANTURN, gMonPalette_Lanturn), + SPECIES_PAL(PICHU, gMonPalette_Pichu), + SPECIES_PAL(CLEFFA, gMonPalette_Cleffa), + SPECIES_PAL(IGGLYBUFF, gMonPalette_Igglybuff), + SPECIES_PAL(TOGEPI, gMonPalette_Togepi), + SPECIES_PAL(TOGETIC, gMonPalette_Togetic), + SPECIES_PAL(NATU, gMonPalette_Natu), + SPECIES_PAL(XATU, gMonPalette_Xatu), + SPECIES_PAL(MAREEP, gMonPalette_Mareep), + SPECIES_PAL(FLAAFFY, gMonPalette_Flaaffy), + SPECIES_PAL(AMPHAROS, gMonPalette_Ampharos), + SPECIES_PAL(BELLOSSOM, gMonPalette_Bellossom), + SPECIES_PAL(MARILL, gMonPalette_Marill), + SPECIES_PAL(AZUMARILL, gMonPalette_Azumarill), + SPECIES_PAL(SUDOWOODO, gMonPalette_Sudowoodo), + SPECIES_PAL(POLITOED, gMonPalette_Politoed), + SPECIES_PAL(HOPPIP, gMonPalette_Hoppip), + SPECIES_PAL(SKIPLOOM, gMonPalette_Skiploom), + SPECIES_PAL(JUMPLUFF, gMonPalette_Jumpluff), + SPECIES_PAL(AIPOM, gMonPalette_Aipom), + SPECIES_PAL(SUNKERN, gMonPalette_Sunkern), + SPECIES_PAL(SUNFLORA, gMonPalette_Sunflora), + SPECIES_PAL(YANMA, gMonPalette_Yanma), + SPECIES_PAL(WOOPER, gMonPalette_Wooper), + SPECIES_PAL(QUAGSIRE, gMonPalette_Quagsire), + SPECIES_PAL(ESPEON, gMonPalette_Espeon), + SPECIES_PAL(UMBREON, gMonPalette_Umbreon), + SPECIES_PAL(MURKROW, gMonPalette_Murkrow), + SPECIES_PAL(SLOWKING, gMonPalette_Slowking), + SPECIES_PAL(MISDREAVUS, gMonPalette_Misdreavus), + SPECIES_PAL(UNOWN, gMonPalette_Unown), + SPECIES_PAL(WOBBUFFET, gMonPalette_Wobbuffet), + SPECIES_PAL(GIRAFARIG, gMonPalette_Girafarig), + SPECIES_PAL(PINECO, gMonPalette_Pineco), + SPECIES_PAL(FORRETRESS, gMonPalette_Forretress), + SPECIES_PAL(DUNSPARCE, gMonPalette_Dunsparce), + SPECIES_PAL(GLIGAR, gMonPalette_Gligar), + SPECIES_PAL(STEELIX, gMonPalette_Steelix), + SPECIES_PAL(SNUBBULL, gMonPalette_Snubbull), + SPECIES_PAL(GRANBULL, gMonPalette_Granbull), + SPECIES_PAL(QWILFISH, gMonPalette_Qwilfish), + SPECIES_PAL(SCIZOR, gMonPalette_Scizor), + SPECIES_PAL(SHUCKLE, gMonPalette_Shuckle), + SPECIES_PAL(HERACROSS, gMonPalette_Heracross), + SPECIES_PAL(SNEASEL, gMonPalette_Sneasel), + SPECIES_PAL(TEDDIURSA, gMonPalette_Teddiursa), + SPECIES_PAL(URSARING, gMonPalette_Ursaring), + SPECIES_PAL(SLUGMA, gMonPalette_Slugma), + SPECIES_PAL(MAGCARGO, gMonPalette_Magcargo), + SPECIES_PAL(SWINUB, gMonPalette_Swinub), + SPECIES_PAL(PILOSWINE, gMonPalette_Piloswine), + SPECIES_PAL(CORSOLA, gMonPalette_Corsola), + SPECIES_PAL(REMORAID, gMonPalette_Remoraid), + SPECIES_PAL(OCTILLERY, gMonPalette_Octillery), + SPECIES_PAL(DELIBIRD, gMonPalette_Delibird), + SPECIES_PAL(MANTINE, gMonPalette_Mantine), + SPECIES_PAL(SKARMORY, gMonPalette_Skarmory), + SPECIES_PAL(HOUNDOUR, gMonPalette_Houndour), + SPECIES_PAL(HOUNDOOM, gMonPalette_Houndoom), + SPECIES_PAL(KINGDRA, gMonPalette_Kingdra), + SPECIES_PAL(PHANPY, gMonPalette_Phanpy), + SPECIES_PAL(DONPHAN, gMonPalette_Donphan), + SPECIES_PAL(PORYGON2, gMonPalette_Porygon2), + SPECIES_PAL(STANTLER, gMonPalette_Stantler), + SPECIES_PAL(SMEARGLE, gMonPalette_Smeargle), + SPECIES_PAL(TYROGUE, gMonPalette_Tyrogue), + SPECIES_PAL(HITMONTOP, gMonPalette_Hitmontop), + SPECIES_PAL(SMOOCHUM, gMonPalette_Smoochum), + SPECIES_PAL(ELEKID, gMonPalette_Elekid), + SPECIES_PAL(MAGBY, gMonPalette_Magby), + SPECIES_PAL(MILTANK, gMonPalette_Miltank), + SPECIES_PAL(BLISSEY, gMonPalette_Blissey), + SPECIES_PAL(RAIKOU, gMonPalette_Raikou), + SPECIES_PAL(ENTEI, gMonPalette_Entei), + SPECIES_PAL(SUICUNE, gMonPalette_Suicune), + SPECIES_PAL(LARVITAR, gMonPalette_Larvitar), + SPECIES_PAL(PUPITAR, gMonPalette_Pupitar), + SPECIES_PAL(TYRANITAR, gMonPalette_Tyranitar), + SPECIES_PAL(LUGIA, gMonPalette_Lugia), + SPECIES_PAL(HO_OH, gMonPalette_HoOh), + SPECIES_PAL(CELEBI, gMonPalette_Celebi), + SPECIES_PAL(OLD_UNOWN_B, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_C, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_D, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_E, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_F, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_G, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_H, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_I, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_J, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_K, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_L, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_M, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_N, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_O, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_P, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_Q, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_R, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_S, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_T, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_U, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_V, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_W, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_X, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_Y, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(OLD_UNOWN_Z, gMonPalette_DoubleQuestionMark), + SPECIES_PAL(TREECKO, gMonPalette_Treecko), + SPECIES_PAL(GROVYLE, gMonPalette_Grovyle), + SPECIES_PAL(SCEPTILE, gMonPalette_Sceptile), + SPECIES_PAL(TORCHIC, gMonPalette_Torchic), + SPECIES_PAL(COMBUSKEN, gMonPalette_Combusken), + SPECIES_PAL(BLAZIKEN, gMonPalette_Blaziken), + SPECIES_PAL(MUDKIP, gMonPalette_Mudkip), + SPECIES_PAL(MARSHTOMP, gMonPalette_Marshtomp), + SPECIES_PAL(SWAMPERT, gMonPalette_Swampert), + SPECIES_PAL(POOCHYENA, gMonPalette_Poochyena), + SPECIES_PAL(MIGHTYENA, gMonPalette_Mightyena), + SPECIES_PAL(ZIGZAGOON, gMonPalette_Zigzagoon), + SPECIES_PAL(LINOONE, gMonPalette_Linoone), + SPECIES_PAL(WURMPLE, gMonPalette_Wurmple), + SPECIES_PAL(SILCOON, gMonPalette_Silcoon), + SPECIES_PAL(BEAUTIFLY, gMonPalette_Beautifly), + SPECIES_PAL(CASCOON, gMonPalette_Cascoon), + SPECIES_PAL(DUSTOX, gMonPalette_Dustox), + SPECIES_PAL(LOTAD, gMonPalette_Lotad), + SPECIES_PAL(LOMBRE, gMonPalette_Lombre), + SPECIES_PAL(LUDICOLO, gMonPalette_Ludicolo), + SPECIES_PAL(SEEDOT, gMonPalette_Seedot), + SPECIES_PAL(NUZLEAF, gMonPalette_Nuzleaf), + SPECIES_PAL(SHIFTRY, gMonPalette_Shiftry), + SPECIES_PAL(NINCADA, gMonPalette_Nincada), + SPECIES_PAL(NINJASK, gMonPalette_Ninjask), + SPECIES_PAL(SHEDINJA, gMonPalette_Shedinja), + SPECIES_PAL(TAILLOW, gMonPalette_Taillow), + SPECIES_PAL(SWELLOW, gMonPalette_Swellow), + SPECIES_PAL(SHROOMISH, gMonPalette_Shroomish), + SPECIES_PAL(BRELOOM, gMonPalette_Breloom), + SPECIES_PAL(SPINDA, gMonPalette_Spinda), + SPECIES_PAL(WINGULL, gMonPalette_Wingull), + SPECIES_PAL(PELIPPER, gMonPalette_Pelipper), + SPECIES_PAL(SURSKIT, gMonPalette_Surskit), + SPECIES_PAL(MASQUERAIN, gMonPalette_Masquerain), + SPECIES_PAL(WAILMER, gMonPalette_Wailmer), + SPECIES_PAL(WAILORD, gMonPalette_Wailord), + SPECIES_PAL(SKITTY, gMonPalette_Skitty), + SPECIES_PAL(DELCATTY, gMonPalette_Delcatty), + SPECIES_PAL(KECLEON, gMonPalette_Kecleon), + SPECIES_PAL(BALTOY, gMonPalette_Baltoy), + SPECIES_PAL(CLAYDOL, gMonPalette_Claydol), + SPECIES_PAL(NOSEPASS, gMonPalette_Nosepass), + SPECIES_PAL(TORKOAL, gMonPalette_Torkoal), + SPECIES_PAL(SABLEYE, gMonPalette_Sableye), + SPECIES_PAL(BARBOACH, gMonPalette_Barboach), + SPECIES_PAL(WHISCASH, gMonPalette_Whiscash), + SPECIES_PAL(LUVDISC, gMonPalette_Luvdisc), + SPECIES_PAL(CORPHISH, gMonPalette_Corphish), + SPECIES_PAL(CRAWDAUNT, gMonPalette_Crawdaunt), + SPECIES_PAL(FEEBAS, gMonPalette_Feebas), + SPECIES_PAL(MILOTIC, gMonPalette_Milotic), + SPECIES_PAL(CARVANHA, gMonPalette_Carvanha), + SPECIES_PAL(SHARPEDO, gMonPalette_Sharpedo), + SPECIES_PAL(TRAPINCH, gMonPalette_Trapinch), + SPECIES_PAL(VIBRAVA, gMonPalette_Vibrava), + SPECIES_PAL(FLYGON, gMonPalette_Flygon), + SPECIES_PAL(MAKUHITA, gMonPalette_Makuhita), + SPECIES_PAL(HARIYAMA, gMonPalette_Hariyama), + SPECIES_PAL(ELECTRIKE, gMonPalette_Electrike), + SPECIES_PAL(MANECTRIC, gMonPalette_Manectric), + SPECIES_PAL(NUMEL, gMonPalette_Numel), + SPECIES_PAL(CAMERUPT, gMonPalette_Camerupt), + SPECIES_PAL(SPHEAL, gMonPalette_Spheal), + SPECIES_PAL(SEALEO, gMonPalette_Sealeo), + SPECIES_PAL(WALREIN, gMonPalette_Walrein), + SPECIES_PAL(CACNEA, gMonPalette_Cacnea), + SPECIES_PAL(CACTURNE, gMonPalette_Cacturne), + SPECIES_PAL(SNORUNT, gMonPalette_Snorunt), + SPECIES_PAL(GLALIE, gMonPalette_Glalie), + SPECIES_PAL(LUNATONE, gMonPalette_Lunatone), + SPECIES_PAL(SOLROCK, gMonPalette_Solrock), + SPECIES_PAL(AZURILL, gMonPalette_Azurill), + SPECIES_PAL(SPOINK, gMonPalette_Spoink), + SPECIES_PAL(GRUMPIG, gMonPalette_Grumpig), + SPECIES_PAL(PLUSLE, gMonPalette_Plusle), + SPECIES_PAL(MINUN, gMonPalette_Minun), + SPECIES_PAL(MAWILE, gMonPalette_Mawile), + SPECIES_PAL(MEDITITE, gMonPalette_Meditite), + SPECIES_PAL(MEDICHAM, gMonPalette_Medicham), + SPECIES_PAL(SWABLU, gMonPalette_Swablu), + SPECIES_PAL(ALTARIA, gMonPalette_Altaria), + SPECIES_PAL(WYNAUT, gMonPalette_Wynaut), + SPECIES_PAL(DUSKULL, gMonPalette_Duskull), + SPECIES_PAL(DUSCLOPS, gMonPalette_Dusclops), + SPECIES_PAL(ROSELIA, gMonPalette_Roselia), + SPECIES_PAL(SLAKOTH, gMonPalette_Slakoth), + SPECIES_PAL(VIGOROTH, gMonPalette_Vigoroth), + SPECIES_PAL(SLAKING, gMonPalette_Slaking), + SPECIES_PAL(GULPIN, gMonPalette_Gulpin), + SPECIES_PAL(SWALOT, gMonPalette_Swalot), + SPECIES_PAL(TROPIUS, gMonPalette_Tropius), + SPECIES_PAL(WHISMUR, gMonPalette_Whismur), + SPECIES_PAL(LOUDRED, gMonPalette_Loudred), + SPECIES_PAL(EXPLOUD, gMonPalette_Exploud), + SPECIES_PAL(CLAMPERL, gMonPalette_Clamperl), + SPECIES_PAL(HUNTAIL, gMonPalette_Huntail), + SPECIES_PAL(GOREBYSS, gMonPalette_Gorebyss), + SPECIES_PAL(ABSOL, gMonPalette_Absol), + SPECIES_PAL(SHUPPET, gMonPalette_Shuppet), + SPECIES_PAL(BANETTE, gMonPalette_Banette), + SPECIES_PAL(SEVIPER, gMonPalette_Seviper), + SPECIES_PAL(ZANGOOSE, gMonPalette_Zangoose), + SPECIES_PAL(RELICANTH, gMonPalette_Relicanth), + SPECIES_PAL(ARON, gMonPalette_Aron), + SPECIES_PAL(LAIRON, gMonPalette_Lairon), + SPECIES_PAL(AGGRON, gMonPalette_Aggron), + SPECIES_PAL(CASTFORM, gMonPalette_Castform), + SPECIES_PAL(VOLBEAT, gMonPalette_Volbeat), + SPECIES_PAL(ILLUMISE, gMonPalette_Illumise), + SPECIES_PAL(LILEEP, gMonPalette_Lileep), + SPECIES_PAL(CRADILY, gMonPalette_Cradily), + SPECIES_PAL(ANORITH, gMonPalette_Anorith), + SPECIES_PAL(ARMALDO, gMonPalette_Armaldo), + SPECIES_PAL(RALTS, gMonPalette_Ralts), + SPECIES_PAL(KIRLIA, gMonPalette_Kirlia), + SPECIES_PAL(GARDEVOIR, gMonPalette_Gardevoir), + SPECIES_PAL(BAGON, gMonPalette_Bagon), + SPECIES_PAL(SHELGON, gMonPalette_Shelgon), + SPECIES_PAL(SALAMENCE, gMonPalette_Salamence), + SPECIES_PAL(BELDUM, gMonPalette_Beldum), + SPECIES_PAL(METANG, gMonPalette_Metang), + SPECIES_PAL(METAGROSS, gMonPalette_Metagross), + SPECIES_PAL(REGIROCK, gMonPalette_Regirock), + SPECIES_PAL(REGICE, gMonPalette_Regice), + SPECIES_PAL(REGISTEEL, gMonPalette_Registeel), + SPECIES_PAL(KYOGRE, gMonPalette_Kyogre), + SPECIES_PAL(GROUDON, gMonPalette_Groudon), + SPECIES_PAL(RAYQUAZA, gMonPalette_Rayquaza), + SPECIES_PAL(LATIAS, gMonPalette_Latias), + SPECIES_PAL(LATIOS, gMonPalette_Latios), + SPECIES_PAL(JIRACHI, gMonPalette_Jirachi), + SPECIES_PAL(DEOXYS, gMonPalette_Deoxys), + SPECIES_PAL(CHIMECHO, gMonPalette_Chimecho), + SPECIES_PAL(EGG, gMonPalette_Egg), + SPECIES_PAL(UNOWN_B, gMonPalette_Unown), + SPECIES_PAL(UNOWN_C, gMonPalette_Unown), + SPECIES_PAL(UNOWN_D, gMonPalette_Unown), + SPECIES_PAL(UNOWN_E, gMonPalette_Unown), + SPECIES_PAL(UNOWN_F, gMonPalette_Unown), + SPECIES_PAL(UNOWN_G, gMonPalette_Unown), + SPECIES_PAL(UNOWN_H, gMonPalette_Unown), + SPECIES_PAL(UNOWN_I, gMonPalette_Unown), + SPECIES_PAL(UNOWN_J, gMonPalette_Unown), + SPECIES_PAL(UNOWN_K, gMonPalette_Unown), + SPECIES_PAL(UNOWN_L, gMonPalette_Unown), + SPECIES_PAL(UNOWN_M, gMonPalette_Unown), + SPECIES_PAL(UNOWN_N, gMonPalette_Unown), + SPECIES_PAL(UNOWN_O, gMonPalette_Unown), + SPECIES_PAL(UNOWN_P, gMonPalette_Unown), + SPECIES_PAL(UNOWN_Q, gMonPalette_Unown), + SPECIES_PAL(UNOWN_R, gMonPalette_Unown), + SPECIES_PAL(UNOWN_S, gMonPalette_Unown), + SPECIES_PAL(UNOWN_T, gMonPalette_Unown), + SPECIES_PAL(UNOWN_U, gMonPalette_Unown), + SPECIES_PAL(UNOWN_V, gMonPalette_Unown), + SPECIES_PAL(UNOWN_W, gMonPalette_Unown), + SPECIES_PAL(UNOWN_X, gMonPalette_Unown), + SPECIES_PAL(UNOWN_Y, gMonPalette_Unown), + SPECIES_PAL(UNOWN_Z, gMonPalette_Unown), + SPECIES_PAL(UNOWN_EMARK, gMonPalette_Unown), + SPECIES_PAL(UNOWN_QMARK, gMonPalette_Unown), +}; diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h new file mode 100644 index 000000000..8b1cfcaac --- /dev/null +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -0,0 +1,443 @@ +const struct CompressedSpritePalette gMonShinyPaletteTable[] = +{ + SPECIES_SHINY_PAL(NONE, gMonShinyPalette_CircledQuestionMark), + SPECIES_SHINY_PAL(BULBASAUR, gMonShinyPalette_Bulbasaur), + SPECIES_SHINY_PAL(IVYSAUR, gMonShinyPalette_Ivysaur), + SPECIES_SHINY_PAL(VENUSAUR, gMonShinyPalette_Venusaur), + SPECIES_SHINY_PAL(CHARMANDER, gMonShinyPalette_Charmander), + SPECIES_SHINY_PAL(CHARMELEON, gMonShinyPalette_Charmeleon), + SPECIES_SHINY_PAL(CHARIZARD, gMonShinyPalette_Charizard), + SPECIES_SHINY_PAL(SQUIRTLE, gMonShinyPalette_Squirtle), + SPECIES_SHINY_PAL(WARTORTLE, gMonShinyPalette_Wartortle), + SPECIES_SHINY_PAL(BLASTOISE, gMonShinyPalette_Blastoise), + SPECIES_SHINY_PAL(CATERPIE, gMonShinyPalette_Caterpie), + SPECIES_SHINY_PAL(METAPOD, gMonShinyPalette_Metapod), + SPECIES_SHINY_PAL(BUTTERFREE, gMonShinyPalette_Butterfree), + SPECIES_SHINY_PAL(WEEDLE, gMonShinyPalette_Weedle), + SPECIES_SHINY_PAL(KAKUNA, gMonShinyPalette_Kakuna), + SPECIES_SHINY_PAL(BEEDRILL, gMonShinyPalette_Beedrill), + SPECIES_SHINY_PAL(PIDGEY, gMonShinyPalette_Pidgey), + SPECIES_SHINY_PAL(PIDGEOTTO, gMonShinyPalette_Pidgeotto), + SPECIES_SHINY_PAL(PIDGEOT, gMonShinyPalette_Pidgeot), + SPECIES_SHINY_PAL(RATTATA, gMonShinyPalette_Rattata), + SPECIES_SHINY_PAL(RATICATE, gMonShinyPalette_Raticate), + SPECIES_SHINY_PAL(SPEAROW, gMonShinyPalette_Spearow), + SPECIES_SHINY_PAL(FEAROW, gMonShinyPalette_Fearow), + SPECIES_SHINY_PAL(EKANS, gMonShinyPalette_Ekans), + SPECIES_SHINY_PAL(ARBOK, gMonShinyPalette_Arbok), + SPECIES_SHINY_PAL(PIKACHU, gMonShinyPalette_Pikachu), + SPECIES_SHINY_PAL(RAICHU, gMonShinyPalette_Raichu), + SPECIES_SHINY_PAL(SANDSHREW, gMonShinyPalette_Sandshrew), + SPECIES_SHINY_PAL(SANDSLASH, gMonShinyPalette_Sandslash), + SPECIES_SHINY_PAL(NIDORAN_F, gMonShinyPalette_NidoranF), + SPECIES_SHINY_PAL(NIDORINA, gMonShinyPalette_Nidorina), + SPECIES_SHINY_PAL(NIDOQUEEN, gMonShinyPalette_Nidoqueen), + SPECIES_SHINY_PAL(NIDORAN_M, gMonShinyPalette_NidoranM), + SPECIES_SHINY_PAL(NIDORINO, gMonShinyPalette_Nidorino), + SPECIES_SHINY_PAL(NIDOKING, gMonShinyPalette_Nidoking), + SPECIES_SHINY_PAL(CLEFAIRY, gMonShinyPalette_Clefairy), + SPECIES_SHINY_PAL(CLEFABLE, gMonShinyPalette_Clefable), + SPECIES_SHINY_PAL(VULPIX, gMonShinyPalette_Vulpix), + SPECIES_SHINY_PAL(NINETALES, gMonShinyPalette_Ninetales), + SPECIES_SHINY_PAL(JIGGLYPUFF, gMonShinyPalette_Jigglypuff), + SPECIES_SHINY_PAL(WIGGLYTUFF, gMonShinyPalette_Wigglytuff), + SPECIES_SHINY_PAL(ZUBAT, gMonShinyPalette_Zubat), + SPECIES_SHINY_PAL(GOLBAT, gMonShinyPalette_Golbat), + SPECIES_SHINY_PAL(ODDISH, gMonShinyPalette_Oddish), + SPECIES_SHINY_PAL(GLOOM, gMonShinyPalette_Gloom), + SPECIES_SHINY_PAL(VILEPLUME, gMonShinyPalette_Vileplume), + SPECIES_SHINY_PAL(PARAS, gMonShinyPalette_Paras), + SPECIES_SHINY_PAL(PARASECT, gMonShinyPalette_Parasect), + SPECIES_SHINY_PAL(VENONAT, gMonShinyPalette_Venonat), + SPECIES_SHINY_PAL(VENOMOTH, gMonShinyPalette_Venomoth), + SPECIES_SHINY_PAL(DIGLETT, gMonShinyPalette_Diglett), + SPECIES_SHINY_PAL(DUGTRIO, gMonShinyPalette_Dugtrio), + SPECIES_SHINY_PAL(MEOWTH, gMonShinyPalette_Meowth), + SPECIES_SHINY_PAL(PERSIAN, gMonShinyPalette_Persian), + SPECIES_SHINY_PAL(PSYDUCK, gMonShinyPalette_Psyduck), + SPECIES_SHINY_PAL(GOLDUCK, gMonShinyPalette_Golduck), + SPECIES_SHINY_PAL(MANKEY, gMonShinyPalette_Mankey), + SPECIES_SHINY_PAL(PRIMEAPE, gMonShinyPalette_Primeape), + SPECIES_SHINY_PAL(GROWLITHE, gMonShinyPalette_Growlithe), + SPECIES_SHINY_PAL(ARCANINE, gMonShinyPalette_Arcanine), + SPECIES_SHINY_PAL(POLIWAG, gMonShinyPalette_Poliwag), + SPECIES_SHINY_PAL(POLIWHIRL, gMonShinyPalette_Poliwhirl), + SPECIES_SHINY_PAL(POLIWRATH, gMonShinyPalette_Poliwrath), + SPECIES_SHINY_PAL(ABRA, gMonShinyPalette_Abra), + SPECIES_SHINY_PAL(KADABRA, gMonShinyPalette_Kadabra), + SPECIES_SHINY_PAL(ALAKAZAM, gMonShinyPalette_Alakazam), + SPECIES_SHINY_PAL(MACHOP, gMonShinyPalette_Machop), + SPECIES_SHINY_PAL(MACHOKE, gMonShinyPalette_Machoke), + SPECIES_SHINY_PAL(MACHAMP, gMonShinyPalette_Machamp), + SPECIES_SHINY_PAL(BELLSPROUT, gMonShinyPalette_Bellsprout), + SPECIES_SHINY_PAL(WEEPINBELL, gMonShinyPalette_Weepinbell), + SPECIES_SHINY_PAL(VICTREEBEL, gMonShinyPalette_Victreebel), + SPECIES_SHINY_PAL(TENTACOOL, gMonShinyPalette_Tentacool), + SPECIES_SHINY_PAL(TENTACRUEL, gMonShinyPalette_Tentacruel), + SPECIES_SHINY_PAL(GEODUDE, gMonShinyPalette_Geodude), + SPECIES_SHINY_PAL(GRAVELER, gMonShinyPalette_Graveler), + SPECIES_SHINY_PAL(GOLEM, gMonShinyPalette_Golem), + SPECIES_SHINY_PAL(PONYTA, gMonShinyPalette_Ponyta), + SPECIES_SHINY_PAL(RAPIDASH, gMonShinyPalette_Rapidash), + SPECIES_SHINY_PAL(SLOWPOKE, gMonShinyPalette_Slowpoke), + SPECIES_SHINY_PAL(SLOWBRO, gMonShinyPalette_Slowbro), + SPECIES_SHINY_PAL(MAGNEMITE, gMonShinyPalette_Magnemite), + SPECIES_SHINY_PAL(MAGNETON, gMonShinyPalette_Magneton), + SPECIES_SHINY_PAL(FARFETCHD, gMonShinyPalette_Farfetchd), + SPECIES_SHINY_PAL(DODUO, gMonShinyPalette_Doduo), + SPECIES_SHINY_PAL(DODRIO, gMonShinyPalette_Dodrio), + SPECIES_SHINY_PAL(SEEL, gMonShinyPalette_Seel), + SPECIES_SHINY_PAL(DEWGONG, gMonShinyPalette_Dewgong), + SPECIES_SHINY_PAL(GRIMER, gMonShinyPalette_Grimer), + SPECIES_SHINY_PAL(MUK, gMonShinyPalette_Muk), + SPECIES_SHINY_PAL(SHELLDER, gMonShinyPalette_Shellder), + SPECIES_SHINY_PAL(CLOYSTER, gMonShinyPalette_Cloyster), + SPECIES_SHINY_PAL(GASTLY, gMonShinyPalette_Gastly), + SPECIES_SHINY_PAL(HAUNTER, gMonShinyPalette_Haunter), + SPECIES_SHINY_PAL(GENGAR, gMonShinyPalette_Gengar), + SPECIES_SHINY_PAL(ONIX, gMonShinyPalette_Onix), + SPECIES_SHINY_PAL(DROWZEE, gMonShinyPalette_Drowzee), + SPECIES_SHINY_PAL(HYPNO, gMonShinyPalette_Hypno), + SPECIES_SHINY_PAL(KRABBY, gMonShinyPalette_Krabby), + SPECIES_SHINY_PAL(KINGLER, gMonShinyPalette_Kingler), + SPECIES_SHINY_PAL(VOLTORB, gMonShinyPalette_Voltorb), + SPECIES_SHINY_PAL(ELECTRODE, gMonShinyPalette_Electrode), + SPECIES_SHINY_PAL(EXEGGCUTE, gMonShinyPalette_Exeggcute), + SPECIES_SHINY_PAL(EXEGGUTOR, gMonShinyPalette_Exeggutor), + SPECIES_SHINY_PAL(CUBONE, gMonShinyPalette_Cubone), + SPECIES_SHINY_PAL(MAROWAK, gMonShinyPalette_Marowak), + SPECIES_SHINY_PAL(HITMONLEE, gMonShinyPalette_Hitmonlee), + SPECIES_SHINY_PAL(HITMONCHAN, gMonShinyPalette_Hitmonchan), + SPECIES_SHINY_PAL(LICKITUNG, gMonShinyPalette_Lickitung), + SPECIES_SHINY_PAL(KOFFING, gMonShinyPalette_Koffing), + SPECIES_SHINY_PAL(WEEZING, gMonShinyPalette_Weezing), + SPECIES_SHINY_PAL(RHYHORN, gMonShinyPalette_Rhyhorn), + SPECIES_SHINY_PAL(RHYDON, gMonShinyPalette_Rhydon), + SPECIES_SHINY_PAL(CHANSEY, gMonShinyPalette_Chansey), + SPECIES_SHINY_PAL(TANGELA, gMonShinyPalette_Tangela), + SPECIES_SHINY_PAL(KANGASKHAN, gMonShinyPalette_Kangaskhan), + SPECIES_SHINY_PAL(HORSEA, gMonShinyPalette_Horsea), + SPECIES_SHINY_PAL(SEADRA, gMonShinyPalette_Seadra), + SPECIES_SHINY_PAL(GOLDEEN, gMonShinyPalette_Goldeen), + SPECIES_SHINY_PAL(SEAKING, gMonShinyPalette_Seaking), + SPECIES_SHINY_PAL(STARYU, gMonShinyPalette_Staryu), + SPECIES_SHINY_PAL(STARMIE, gMonShinyPalette_Starmie), + SPECIES_SHINY_PAL(MR_MIME, gMonShinyPalette_Mrmime), + SPECIES_SHINY_PAL(SCYTHER, gMonShinyPalette_Scyther), + SPECIES_SHINY_PAL(JYNX, gMonShinyPalette_Jynx), + SPECIES_SHINY_PAL(ELECTABUZZ, gMonShinyPalette_Electabuzz), + SPECIES_SHINY_PAL(MAGMAR, gMonShinyPalette_Magmar), + SPECIES_SHINY_PAL(PINSIR, gMonShinyPalette_Pinsir), + SPECIES_SHINY_PAL(TAUROS, gMonShinyPalette_Tauros), + SPECIES_SHINY_PAL(MAGIKARP, gMonShinyPalette_Magikarp), + SPECIES_SHINY_PAL(GYARADOS, gMonShinyPalette_Gyarados), + SPECIES_SHINY_PAL(LAPRAS, gMonShinyPalette_Lapras), + SPECIES_SHINY_PAL(DITTO, gMonShinyPalette_Ditto), + SPECIES_SHINY_PAL(EEVEE, gMonShinyPalette_Eevee), + SPECIES_SHINY_PAL(VAPOREON, gMonShinyPalette_Vaporeon), + SPECIES_SHINY_PAL(JOLTEON, gMonShinyPalette_Jolteon), + SPECIES_SHINY_PAL(FLAREON, gMonShinyPalette_Flareon), + SPECIES_SHINY_PAL(PORYGON, gMonShinyPalette_Porygon), + SPECIES_SHINY_PAL(OMANYTE, gMonShinyPalette_Omanyte), + SPECIES_SHINY_PAL(OMASTAR, gMonShinyPalette_Omastar), + SPECIES_SHINY_PAL(KABUTO, gMonShinyPalette_Kabuto), + SPECIES_SHINY_PAL(KABUTOPS, gMonShinyPalette_Kabutops), + SPECIES_SHINY_PAL(AERODACTYL, gMonShinyPalette_Aerodactyl), + SPECIES_SHINY_PAL(SNORLAX, gMonShinyPalette_Snorlax), + SPECIES_SHINY_PAL(ARTICUNO, gMonShinyPalette_Articuno), + SPECIES_SHINY_PAL(ZAPDOS, gMonShinyPalette_Zapdos), + SPECIES_SHINY_PAL(MOLTRES, gMonShinyPalette_Moltres), + SPECIES_SHINY_PAL(DRATINI, gMonShinyPalette_Dratini), + SPECIES_SHINY_PAL(DRAGONAIR, gMonShinyPalette_Dragonair), + SPECIES_SHINY_PAL(DRAGONITE, gMonShinyPalette_Dragonite), + SPECIES_SHINY_PAL(MEWTWO, gMonShinyPalette_Mewtwo), + SPECIES_SHINY_PAL(MEW, gMonShinyPalette_Mew), + SPECIES_SHINY_PAL(CHIKORITA, gMonShinyPalette_Chikorita), + SPECIES_SHINY_PAL(BAYLEEF, gMonShinyPalette_Bayleef), + SPECIES_SHINY_PAL(MEGANIUM, gMonShinyPalette_Meganium), + SPECIES_SHINY_PAL(CYNDAQUIL, gMonShinyPalette_Cyndaquil), + SPECIES_SHINY_PAL(QUILAVA, gMonShinyPalette_Quilava), + SPECIES_SHINY_PAL(TYPHLOSION, gMonShinyPalette_Typhlosion), + SPECIES_SHINY_PAL(TOTODILE, gMonShinyPalette_Totodile), + SPECIES_SHINY_PAL(CROCONAW, gMonShinyPalette_Croconaw), + SPECIES_SHINY_PAL(FERALIGATR, gMonShinyPalette_Feraligatr), + SPECIES_SHINY_PAL(SENTRET, gMonShinyPalette_Sentret), + SPECIES_SHINY_PAL(FURRET, gMonShinyPalette_Furret), + SPECIES_SHINY_PAL(HOOTHOOT, gMonShinyPalette_Hoothoot), + SPECIES_SHINY_PAL(NOCTOWL, gMonShinyPalette_Noctowl), + SPECIES_SHINY_PAL(LEDYBA, gMonShinyPalette_Ledyba), + SPECIES_SHINY_PAL(LEDIAN, gMonShinyPalette_Ledian), + SPECIES_SHINY_PAL(SPINARAK, gMonShinyPalette_Spinarak), + SPECIES_SHINY_PAL(ARIADOS, gMonShinyPalette_Ariados), + SPECIES_SHINY_PAL(CROBAT, gMonShinyPalette_Crobat), + SPECIES_SHINY_PAL(CHINCHOU, gMonShinyPalette_Chinchou), + SPECIES_SHINY_PAL(LANTURN, gMonShinyPalette_Lanturn), + SPECIES_SHINY_PAL(PICHU, gMonShinyPalette_Pichu), + SPECIES_SHINY_PAL(CLEFFA, gMonShinyPalette_Cleffa), + SPECIES_SHINY_PAL(IGGLYBUFF, gMonShinyPalette_Igglybuff), + SPECIES_SHINY_PAL(TOGEPI, gMonShinyPalette_Togepi), + SPECIES_SHINY_PAL(TOGETIC, gMonShinyPalette_Togetic), + SPECIES_SHINY_PAL(NATU, gMonShinyPalette_Natu), + SPECIES_SHINY_PAL(XATU, gMonShinyPalette_Xatu), + SPECIES_SHINY_PAL(MAREEP, gMonShinyPalette_Mareep), + SPECIES_SHINY_PAL(FLAAFFY, gMonShinyPalette_Flaaffy), + SPECIES_SHINY_PAL(AMPHAROS, gMonShinyPalette_Ampharos), + SPECIES_SHINY_PAL(BELLOSSOM, gMonShinyPalette_Bellossom), + SPECIES_SHINY_PAL(MARILL, gMonShinyPalette_Marill), + SPECIES_SHINY_PAL(AZUMARILL, gMonShinyPalette_Azumarill), + SPECIES_SHINY_PAL(SUDOWOODO, gMonShinyPalette_Sudowoodo), + SPECIES_SHINY_PAL(POLITOED, gMonShinyPalette_Politoed), + SPECIES_SHINY_PAL(HOPPIP, gMonShinyPalette_Hoppip), + SPECIES_SHINY_PAL(SKIPLOOM, gMonShinyPalette_Skiploom), + SPECIES_SHINY_PAL(JUMPLUFF, gMonShinyPalette_Jumpluff), + SPECIES_SHINY_PAL(AIPOM, gMonShinyPalette_Aipom), + SPECIES_SHINY_PAL(SUNKERN, gMonShinyPalette_Sunkern), + SPECIES_SHINY_PAL(SUNFLORA, gMonShinyPalette_Sunflora), + SPECIES_SHINY_PAL(YANMA, gMonShinyPalette_Yanma), + SPECIES_SHINY_PAL(WOOPER, gMonShinyPalette_Wooper), + SPECIES_SHINY_PAL(QUAGSIRE, gMonShinyPalette_Quagsire), + SPECIES_SHINY_PAL(ESPEON, gMonShinyPalette_Espeon), + SPECIES_SHINY_PAL(UMBREON, gMonShinyPalette_Umbreon), + SPECIES_SHINY_PAL(MURKROW, gMonShinyPalette_Murkrow), + SPECIES_SHINY_PAL(SLOWKING, gMonShinyPalette_Slowking), + SPECIES_SHINY_PAL(MISDREAVUS, gMonShinyPalette_Misdreavus), + SPECIES_SHINY_PAL(UNOWN, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(WOBBUFFET, gMonShinyPalette_Wobbuffet), + SPECIES_SHINY_PAL(GIRAFARIG, gMonShinyPalette_Girafarig), + SPECIES_SHINY_PAL(PINECO, gMonShinyPalette_Pineco), + SPECIES_SHINY_PAL(FORRETRESS, gMonShinyPalette_Forretress), + SPECIES_SHINY_PAL(DUNSPARCE, gMonShinyPalette_Dunsparce), + SPECIES_SHINY_PAL(GLIGAR, gMonShinyPalette_Gligar), + SPECIES_SHINY_PAL(STEELIX, gMonShinyPalette_Steelix), + SPECIES_SHINY_PAL(SNUBBULL, gMonShinyPalette_Snubbull), + SPECIES_SHINY_PAL(GRANBULL, gMonShinyPalette_Granbull), + SPECIES_SHINY_PAL(QWILFISH, gMonShinyPalette_Qwilfish), + SPECIES_SHINY_PAL(SCIZOR, gMonShinyPalette_Scizor), + SPECIES_SHINY_PAL(SHUCKLE, gMonShinyPalette_Shuckle), + SPECIES_SHINY_PAL(HERACROSS, gMonShinyPalette_Heracross), + SPECIES_SHINY_PAL(SNEASEL, gMonShinyPalette_Sneasel), + SPECIES_SHINY_PAL(TEDDIURSA, gMonShinyPalette_Teddiursa), + SPECIES_SHINY_PAL(URSARING, gMonShinyPalette_Ursaring), + SPECIES_SHINY_PAL(SLUGMA, gMonShinyPalette_Slugma), + SPECIES_SHINY_PAL(MAGCARGO, gMonShinyPalette_Magcargo), + SPECIES_SHINY_PAL(SWINUB, gMonShinyPalette_Swinub), + SPECIES_SHINY_PAL(PILOSWINE, gMonShinyPalette_Piloswine), + SPECIES_SHINY_PAL(CORSOLA, gMonShinyPalette_Corsola), + SPECIES_SHINY_PAL(REMORAID, gMonShinyPalette_Remoraid), + SPECIES_SHINY_PAL(OCTILLERY, gMonShinyPalette_Octillery), + SPECIES_SHINY_PAL(DELIBIRD, gMonShinyPalette_Delibird), + SPECIES_SHINY_PAL(MANTINE, gMonShinyPalette_Mantine), + SPECIES_SHINY_PAL(SKARMORY, gMonShinyPalette_Skarmory), + SPECIES_SHINY_PAL(HOUNDOUR, gMonShinyPalette_Houndour), + SPECIES_SHINY_PAL(HOUNDOOM, gMonShinyPalette_Houndoom), + SPECIES_SHINY_PAL(KINGDRA, gMonShinyPalette_Kingdra), + SPECIES_SHINY_PAL(PHANPY, gMonShinyPalette_Phanpy), + SPECIES_SHINY_PAL(DONPHAN, gMonShinyPalette_Donphan), + SPECIES_SHINY_PAL(PORYGON2, gMonShinyPalette_Porygon2), + SPECIES_SHINY_PAL(STANTLER, gMonShinyPalette_Stantler), + SPECIES_SHINY_PAL(SMEARGLE, gMonShinyPalette_Smeargle), + SPECIES_SHINY_PAL(TYROGUE, gMonShinyPalette_Tyrogue), + SPECIES_SHINY_PAL(HITMONTOP, gMonShinyPalette_Hitmontop), + SPECIES_SHINY_PAL(SMOOCHUM, gMonShinyPalette_Smoochum), + SPECIES_SHINY_PAL(ELEKID, gMonShinyPalette_Elekid), + SPECIES_SHINY_PAL(MAGBY, gMonShinyPalette_Magby), + SPECIES_SHINY_PAL(MILTANK, gMonShinyPalette_Miltank), + SPECIES_SHINY_PAL(BLISSEY, gMonShinyPalette_Blissey), + SPECIES_SHINY_PAL(RAIKOU, gMonShinyPalette_Raikou), + SPECIES_SHINY_PAL(ENTEI, gMonShinyPalette_Entei), + SPECIES_SHINY_PAL(SUICUNE, gMonShinyPalette_Suicune), + SPECIES_SHINY_PAL(LARVITAR, gMonShinyPalette_Larvitar), + SPECIES_SHINY_PAL(PUPITAR, gMonShinyPalette_Pupitar), + SPECIES_SHINY_PAL(TYRANITAR, gMonShinyPalette_Tyranitar), + SPECIES_SHINY_PAL(LUGIA, gMonShinyPalette_Lugia), + SPECIES_SHINY_PAL(HO_OH, gMonShinyPalette_HoOh), + SPECIES_SHINY_PAL(CELEBI, gMonShinyPalette_Celebi), + SPECIES_SHINY_PAL(OLD_UNOWN_B, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_C, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_D, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_E, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_F, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_G, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_H, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_I, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_J, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_K, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_L, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_M, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_N, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_O, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_P, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_Q, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_R, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_S, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_T, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_U, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_V, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_W, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_X, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_Y, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(OLD_UNOWN_Z, gMonShinyPalette_DoubleQuestionMark), + SPECIES_SHINY_PAL(TREECKO, gMonShinyPalette_Treecko), + SPECIES_SHINY_PAL(GROVYLE, gMonShinyPalette_Grovyle), + SPECIES_SHINY_PAL(SCEPTILE, gMonShinyPalette_Sceptile), + SPECIES_SHINY_PAL(TORCHIC, gMonShinyPalette_Torchic), + SPECIES_SHINY_PAL(COMBUSKEN, gMonShinyPalette_Combusken), + SPECIES_SHINY_PAL(BLAZIKEN, gMonShinyPalette_Blaziken), + SPECIES_SHINY_PAL(MUDKIP, gMonShinyPalette_Mudkip), + SPECIES_SHINY_PAL(MARSHTOMP, gMonShinyPalette_Marshtomp), + SPECIES_SHINY_PAL(SWAMPERT, gMonShinyPalette_Swampert), + SPECIES_SHINY_PAL(POOCHYENA, gMonShinyPalette_Poochyena), + SPECIES_SHINY_PAL(MIGHTYENA, gMonShinyPalette_Mightyena), + SPECIES_SHINY_PAL(ZIGZAGOON, gMonShinyPalette_Zigzagoon), + SPECIES_SHINY_PAL(LINOONE, gMonShinyPalette_Linoone), + SPECIES_SHINY_PAL(WURMPLE, gMonShinyPalette_Wurmple), + SPECIES_SHINY_PAL(SILCOON, gMonShinyPalette_Silcoon), + SPECIES_SHINY_PAL(BEAUTIFLY, gMonShinyPalette_Beautifly), + SPECIES_SHINY_PAL(CASCOON, gMonShinyPalette_Cascoon), + SPECIES_SHINY_PAL(DUSTOX, gMonShinyPalette_Dustox), + SPECIES_SHINY_PAL(LOTAD, gMonShinyPalette_Lotad), + SPECIES_SHINY_PAL(LOMBRE, gMonShinyPalette_Lombre), + SPECIES_SHINY_PAL(LUDICOLO, gMonShinyPalette_Ludicolo), + SPECIES_SHINY_PAL(SEEDOT, gMonShinyPalette_Seedot), + SPECIES_SHINY_PAL(NUZLEAF, gMonShinyPalette_Nuzleaf), + SPECIES_SHINY_PAL(SHIFTRY, gMonShinyPalette_Shiftry), + SPECIES_SHINY_PAL(NINCADA, gMonShinyPalette_Nincada), + SPECIES_SHINY_PAL(NINJASK, gMonShinyPalette_Ninjask), + SPECIES_SHINY_PAL(SHEDINJA, gMonShinyPalette_Shedinja), + SPECIES_SHINY_PAL(TAILLOW, gMonShinyPalette_Taillow), + SPECIES_SHINY_PAL(SWELLOW, gMonShinyPalette_Swellow), + SPECIES_SHINY_PAL(SHROOMISH, gMonShinyPalette_Shroomish), + SPECIES_SHINY_PAL(BRELOOM, gMonShinyPalette_Breloom), + SPECIES_SHINY_PAL(SPINDA, gMonShinyPalette_Spinda), + SPECIES_SHINY_PAL(WINGULL, gMonShinyPalette_Wingull), + SPECIES_SHINY_PAL(PELIPPER, gMonShinyPalette_Pelipper), + SPECIES_SHINY_PAL(SURSKIT, gMonShinyPalette_Surskit), + SPECIES_SHINY_PAL(MASQUERAIN, gMonShinyPalette_Masquerain), + SPECIES_SHINY_PAL(WAILMER, gMonShinyPalette_Wailmer), + SPECIES_SHINY_PAL(WAILORD, gMonShinyPalette_Wailord), + SPECIES_SHINY_PAL(SKITTY, gMonShinyPalette_Skitty), + SPECIES_SHINY_PAL(DELCATTY, gMonShinyPalette_Delcatty), + SPECIES_SHINY_PAL(KECLEON, gMonShinyPalette_Kecleon), + SPECIES_SHINY_PAL(BALTOY, gMonShinyPalette_Baltoy), + SPECIES_SHINY_PAL(CLAYDOL, gMonShinyPalette_Claydol), + SPECIES_SHINY_PAL(NOSEPASS, gMonShinyPalette_Nosepass), + SPECIES_SHINY_PAL(TORKOAL, gMonShinyPalette_Torkoal), + SPECIES_SHINY_PAL(SABLEYE, gMonShinyPalette_Sableye), + SPECIES_SHINY_PAL(BARBOACH, gMonShinyPalette_Barboach), + SPECIES_SHINY_PAL(WHISCASH, gMonShinyPalette_Whiscash), + SPECIES_SHINY_PAL(LUVDISC, gMonShinyPalette_Luvdisc), + SPECIES_SHINY_PAL(CORPHISH, gMonShinyPalette_Corphish), + SPECIES_SHINY_PAL(CRAWDAUNT, gMonShinyPalette_Crawdaunt), + SPECIES_SHINY_PAL(FEEBAS, gMonShinyPalette_Feebas), + SPECIES_SHINY_PAL(MILOTIC, gMonShinyPalette_Milotic), + SPECIES_SHINY_PAL(CARVANHA, gMonShinyPalette_Carvanha), + SPECIES_SHINY_PAL(SHARPEDO, gMonShinyPalette_Sharpedo), + SPECIES_SHINY_PAL(TRAPINCH, gMonShinyPalette_Trapinch), + SPECIES_SHINY_PAL(VIBRAVA, gMonShinyPalette_Vibrava), + SPECIES_SHINY_PAL(FLYGON, gMonShinyPalette_Flygon), + SPECIES_SHINY_PAL(MAKUHITA, gMonShinyPalette_Makuhita), + SPECIES_SHINY_PAL(HARIYAMA, gMonShinyPalette_Hariyama), + SPECIES_SHINY_PAL(ELECTRIKE, gMonShinyPalette_Electrike), + SPECIES_SHINY_PAL(MANECTRIC, gMonShinyPalette_Manectric), + SPECIES_SHINY_PAL(NUMEL, gMonShinyPalette_Numel), + SPECIES_SHINY_PAL(CAMERUPT, gMonShinyPalette_Camerupt), + SPECIES_SHINY_PAL(SPHEAL, gMonShinyPalette_Spheal), + SPECIES_SHINY_PAL(SEALEO, gMonShinyPalette_Sealeo), + SPECIES_SHINY_PAL(WALREIN, gMonShinyPalette_Walrein), + SPECIES_SHINY_PAL(CACNEA, gMonShinyPalette_Cacnea), + SPECIES_SHINY_PAL(CACTURNE, gMonShinyPalette_Cacturne), + SPECIES_SHINY_PAL(SNORUNT, gMonShinyPalette_Snorunt), + SPECIES_SHINY_PAL(GLALIE, gMonShinyPalette_Glalie), + SPECIES_SHINY_PAL(LUNATONE, gMonShinyPalette_Lunatone), + SPECIES_SHINY_PAL(SOLROCK, gMonShinyPalette_Solrock), + SPECIES_SHINY_PAL(AZURILL, gMonShinyPalette_Azurill), + SPECIES_SHINY_PAL(SPOINK, gMonShinyPalette_Spoink), + SPECIES_SHINY_PAL(GRUMPIG, gMonShinyPalette_Grumpig), + SPECIES_SHINY_PAL(PLUSLE, gMonShinyPalette_Plusle), + SPECIES_SHINY_PAL(MINUN, gMonShinyPalette_Minun), + SPECIES_SHINY_PAL(MAWILE, gMonShinyPalette_Mawile), + SPECIES_SHINY_PAL(MEDITITE, gMonShinyPalette_Meditite), + SPECIES_SHINY_PAL(MEDICHAM, gMonShinyPalette_Medicham), + SPECIES_SHINY_PAL(SWABLU, gMonShinyPalette_Swablu), + SPECIES_SHINY_PAL(ALTARIA, gMonShinyPalette_Altaria), + SPECIES_SHINY_PAL(WYNAUT, gMonShinyPalette_Wynaut), + SPECIES_SHINY_PAL(DUSKULL, gMonShinyPalette_Duskull), + SPECIES_SHINY_PAL(DUSCLOPS, gMonShinyPalette_Dusclops), + SPECIES_SHINY_PAL(ROSELIA, gMonShinyPalette_Roselia), + SPECIES_SHINY_PAL(SLAKOTH, gMonShinyPalette_Slakoth), + SPECIES_SHINY_PAL(VIGOROTH, gMonShinyPalette_Vigoroth), + SPECIES_SHINY_PAL(SLAKING, gMonShinyPalette_Slaking), + SPECIES_SHINY_PAL(GULPIN, gMonShinyPalette_Gulpin), + SPECIES_SHINY_PAL(SWALOT, gMonShinyPalette_Swalot), + SPECIES_SHINY_PAL(TROPIUS, gMonShinyPalette_Tropius), + SPECIES_SHINY_PAL(WHISMUR, gMonShinyPalette_Whismur), + SPECIES_SHINY_PAL(LOUDRED, gMonShinyPalette_Loudred), + SPECIES_SHINY_PAL(EXPLOUD, gMonShinyPalette_Exploud), + SPECIES_SHINY_PAL(CLAMPERL, gMonShinyPalette_Clamperl), + SPECIES_SHINY_PAL(HUNTAIL, gMonShinyPalette_Huntail), + SPECIES_SHINY_PAL(GOREBYSS, gMonShinyPalette_Gorebyss), + SPECIES_SHINY_PAL(ABSOL, gMonShinyPalette_Absol), + SPECIES_SHINY_PAL(SHUPPET, gMonShinyPalette_Shuppet), + SPECIES_SHINY_PAL(BANETTE, gMonShinyPalette_Banette), + SPECIES_SHINY_PAL(SEVIPER, gMonShinyPalette_Seviper), + SPECIES_SHINY_PAL(ZANGOOSE, gMonShinyPalette_Zangoose), + SPECIES_SHINY_PAL(RELICANTH, gMonShinyPalette_Relicanth), + SPECIES_SHINY_PAL(ARON, gMonShinyPalette_Aron), + SPECIES_SHINY_PAL(LAIRON, gMonShinyPalette_Lairon), + SPECIES_SHINY_PAL(AGGRON, gMonShinyPalette_Aggron), + SPECIES_SHINY_PAL(CASTFORM, gMonShinyPalette_Castform), + SPECIES_SHINY_PAL(VOLBEAT, gMonShinyPalette_Volbeat), + SPECIES_SHINY_PAL(ILLUMISE, gMonShinyPalette_Illumise), + SPECIES_SHINY_PAL(LILEEP, gMonShinyPalette_Lileep), + SPECIES_SHINY_PAL(CRADILY, gMonShinyPalette_Cradily), + SPECIES_SHINY_PAL(ANORITH, gMonShinyPalette_Anorith), + SPECIES_SHINY_PAL(ARMALDO, gMonShinyPalette_Armaldo), + SPECIES_SHINY_PAL(RALTS, gMonShinyPalette_Ralts), + SPECIES_SHINY_PAL(KIRLIA, gMonShinyPalette_Kirlia), + SPECIES_SHINY_PAL(GARDEVOIR, gMonShinyPalette_Gardevoir), + SPECIES_SHINY_PAL(BAGON, gMonShinyPalette_Bagon), + SPECIES_SHINY_PAL(SHELGON, gMonShinyPalette_Shelgon), + SPECIES_SHINY_PAL(SALAMENCE, gMonShinyPalette_Salamence), + SPECIES_SHINY_PAL(BELDUM, gMonShinyPalette_Beldum), + SPECIES_SHINY_PAL(METANG, gMonShinyPalette_Metang), + SPECIES_SHINY_PAL(METAGROSS, gMonShinyPalette_Metagross), + SPECIES_SHINY_PAL(REGIROCK, gMonShinyPalette_Regirock), + SPECIES_SHINY_PAL(REGICE, gMonShinyPalette_Regice), + SPECIES_SHINY_PAL(REGISTEEL, gMonShinyPalette_Registeel), + SPECIES_SHINY_PAL(KYOGRE, gMonShinyPalette_Kyogre), + SPECIES_SHINY_PAL(GROUDON, gMonShinyPalette_Groudon), + SPECIES_SHINY_PAL(RAYQUAZA, gMonShinyPalette_Rayquaza), + SPECIES_SHINY_PAL(LATIAS, gMonShinyPalette_Latias), + SPECIES_SHINY_PAL(LATIOS, gMonShinyPalette_Latios), + SPECIES_SHINY_PAL(JIRACHI, gMonShinyPalette_Jirachi), + SPECIES_SHINY_PAL(DEOXYS, gMonShinyPalette_Deoxys), + SPECIES_SHINY_PAL(CHIMECHO, gMonShinyPalette_Chimecho), + SPECIES_SHINY_PAL(EGG, gMonPalette_Egg), + SPECIES_SHINY_PAL(UNOWN_B, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_C, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_D, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_E, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_F, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_G, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_H, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_I, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_J, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_K, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_L, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_M, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_N, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_O, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_P, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_Q, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_R, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_S, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_T, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_U, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_V, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_W, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_X, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_Y, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_Z, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_EMARK, gMonShinyPalette_Unown), + SPECIES_SHINY_PAL(UNOWN_QMARK, gMonShinyPalette_Unown), +}; diff --git a/src/data/text/abilities.h b/src/data/text/abilities.h new file mode 100644 index 000000000..c2002bed7 --- /dev/null +++ b/src/data/text/abilities.h @@ -0,0 +1,242 @@ +static const u8 sNoneDescription[] = _("No special ability."); +static const u8 sStenchDescription[] = _("Helps repel wild POKéMON."); +static const u8 sDrizzleDescription[] = _("Summons rain in battle."); +static const u8 sSpeedBoostDescription[] = _("Gradually boosts SPEED."); +static const u8 sBattleArmorDescription[] = _("Blocks critical hits."); +static const u8 sSturdyDescription[] = _("Negates 1-hit KO attacks."); +static const u8 sDampDescription[] = _("Prevents self-destruction."); +static const u8 sLimberDescription[] = _("Prevents paralysis."); +static const u8 sSandVeilDescription[] = _("Ups evasion in a sandstorm."); +static const u8 sStaticDescription[] = _("Paralyzes on contact."); +static const u8 sVoltAbsorbDescription[] = _("Turns electricity into HP."); +static const u8 sWaterAbsorbDescription[] = _("Changes water into HP."); +static const u8 sObliviousDescription[] = _("Prevents attraction."); +static const u8 sCloudNineDescription[] = _("Negates weather effects."); +static const u8 sCompoundEyesDescription[] = _("Raises accuracy."); +static const u8 sInsomniaDescription[] = _("Prevents sleep."); +static const u8 sColorChangeDescription[] = _("Changes type to foe's move."); +static const u8 sImmunityDescription[] = _("Prevents poisoning."); +static const u8 sFlashFireDescription[] = _("Powers up if hit by fire."); +static const u8 sShieldDustDescription[] = _("Prevents added effects."); +static const u8 sOwnTempoDescription[] = _("Prevents confusion."); +static const u8 sSuctionCupsDescription[] = _("Firmly anchors the body."); +static const u8 sIntimidateDescription[] = _("Lowers the foe's ATTACK."); +static const u8 sShadowTagDescription[] = _("Prevents the foe's escape."); +static const u8 sRoughSkinDescription[] = _("Hurts to touch."); +static const u8 sWonderGuardDescription[] = _("“Super effective” hits."); +static const u8 sLevitateDescription[] = _("Not hit by GROUND attacks."); +static const u8 sEffectSporeDescription[] = _("Leaves spores on contact."); +static const u8 sSynchronizeDescription[] = _("Passes on status problems."); +static const u8 sClearBodyDescription[] = _("Prevents ability reduction."); +static const u8 sNaturalCureDescription[] = _("Heals upon switching out."); +static const u8 sLightningRodDescription[] = _("Draws electrical moves."); +static const u8 sSereneGraceDescription[] = _("Promotes added effects."); +static const u8 sSwiftSwimDescription[] = _("Raises SPEED in rain."); +static const u8 sChlorophyllDescription[] = _("Raises SPEED in sunshine."); +static const u8 sIlluminateDescription[] = _("Encounter rate increases."); +static const u8 sTraceDescription[] = _("Copies special ability."); +static const u8 sHugePowerDescription[] = _("Raises ATTACK."); +static const u8 sPoisonPointDescription[] = _("Poisons foe on contact."); +static const u8 sInnerFocusDescription[] = _("Prevents flinching."); +static const u8 sMagmaArmorDescription[] = _("Prevents freezing."); +static const u8 sWaterVeilDescription[] = _("Prevents burns."); +static const u8 sMagnetPullDescription[] = _("Traps STEEL-type POKéMON."); +static const u8 sSoundproofDescription[] = _("Avoids sound-based moves."); +static const u8 sRainDishDescription[] = _("Slight HP recovery in rain."); +static const u8 sSandStreamDescription[] = _("Summons a sandstorm."); +static const u8 sPressureDescription[] = _("Raises foe's PP usage."); +static const u8 sThickFatDescription[] = _("Heat-and-cold protection."); +static const u8 sEarlyBirdDescription[] = _("Awakens quickly from sleep."); +static const u8 sFlameBodyDescription[] = _("Burns the foe on contact."); +static const u8 sRunAwayDescription[] = _("Makes escaping easier."); +static const u8 sKeenEyeDescription[] = _("Prevents loss of accuracy."); +static const u8 sHyperCutterDescription[] = _("Prevents ATTACK reduction."); +static const u8 sPickupDescription[] = _("May pick up items."); +static const u8 sTruantDescription[] = _("Moves only every two turns."); +static const u8 sHustleDescription[] = _("Trades accuracy for power."); +static const u8 sCuteCharmDescription[] = _("Infatuates on contact."); +static const u8 sPlusDescription[] = _("Powers up with MINUS."); +static const u8 sMinusDescription[] = _("Powers up with PLUS."); +static const u8 sForecastDescription[] = _("Changes with the weather."); +static const u8 sStickyHoldDescription[] = _("Prevents item theft."); +static const u8 sShedSkinDescription[] = _("Heals the body by shedding."); +static const u8 sGutsDescription[] = _("Ups ATTACK if suffering."); +static const u8 sMarvelScaleDescription[] = _("Ups DEFENSE if suffering."); +static const u8 sLiquidOozeDescription[] = _("Draining causes injury."); +static const u8 sOvergrowDescription[] = _("Ups GRASS moves in a pinch."); +static const u8 sBlazeDescription[] = _("Ups FIRE moves in a pinch."); +static const u8 sTorrentDescription[] = _("Ups WATER moves in a pinch."); +static const u8 sSwarmDescription[] = _("Ups BUG moves in a pinch."); +static const u8 sRockHeadDescription[] = _("Prevents recoil damage."); +static const u8 sDroughtDescription[] = _("Summons sunlight in battle."); +static const u8 sArenaTrapDescription[] = _("Prevents fleeing."); +static const u8 sVitalSpiritDescription[] = _("Prevents sleep."); +static const u8 sWhiteSmokeDescription[] = _("Prevents ability reduction."); +static const u8 sPurePowerDescription[] = _("Raises ATTACK."); +static const u8 sShellArmorDescription[] = _("Blocks critical hits."); +static const u8 sCacophonyDescription[] = _("Avoids sound-based moves."); +static const u8 sAirLockDescription[] = _("Negates weather effects."); + +const u8 *const gAbilityDescriptionPointers[ABILITIES_COUNT] = +{ + [ABILITY_NONE] = sNoneDescription, + [ABILITY_STENCH] = sStenchDescription, + [ABILITY_DRIZZLE] = sDrizzleDescription, + [ABILITY_SPEED_BOOST] = sSpeedBoostDescription, + [ABILITY_BATTLE_ARMOR] = sBattleArmorDescription, + [ABILITY_STURDY] = sSturdyDescription, + [ABILITY_DAMP] = sDampDescription, + [ABILITY_LIMBER] = sLimberDescription, + [ABILITY_SAND_VEIL] = sSandVeilDescription, + [ABILITY_STATIC] = sStaticDescription, + [ABILITY_VOLT_ABSORB] = sVoltAbsorbDescription, + [ABILITY_WATER_ABSORB] = sWaterAbsorbDescription, + [ABILITY_OBLIVIOUS] = sObliviousDescription, + [ABILITY_CLOUD_NINE] = sCloudNineDescription, + [ABILITY_COMPOUND_EYES] = sCompoundEyesDescription, + [ABILITY_INSOMNIA] = sInsomniaDescription, + [ABILITY_COLOR_CHANGE] = sColorChangeDescription, + [ABILITY_IMMUNITY] = sImmunityDescription, + [ABILITY_FLASH_FIRE] = sFlashFireDescription, + [ABILITY_SHIELD_DUST] = sShieldDustDescription, + [ABILITY_OWN_TEMPO] = sOwnTempoDescription, + [ABILITY_SUCTION_CUPS] = sSuctionCupsDescription, + [ABILITY_INTIMIDATE] = sIntimidateDescription, + [ABILITY_SHADOW_TAG] = sShadowTagDescription, + [ABILITY_ROUGH_SKIN] = sRoughSkinDescription, + [ABILITY_WONDER_GUARD] = sWonderGuardDescription, + [ABILITY_LEVITATE] = sLevitateDescription, + [ABILITY_EFFECT_SPORE] = sEffectSporeDescription, + [ABILITY_SYNCHRONIZE] = sSynchronizeDescription, + [ABILITY_CLEAR_BODY] = sClearBodyDescription, + [ABILITY_NATURAL_CURE] = sNaturalCureDescription, + [ABILITY_LIGHTNING_ROD] = sLightningRodDescription, + [ABILITY_SERENE_GRACE] = sSereneGraceDescription, + [ABILITY_SWIFT_SWIM] = sSwiftSwimDescription, + [ABILITY_CHLOROPHYLL] = sChlorophyllDescription, + [ABILITY_ILLUMINATE] = sIlluminateDescription, + [ABILITY_TRACE] = sTraceDescription, + [ABILITY_HUGE_POWER] = sHugePowerDescription, + [ABILITY_POISON_POINT] = sPoisonPointDescription, + [ABILITY_INNER_FOCUS] = sInnerFocusDescription, + [ABILITY_MAGMA_ARMOR] = sMagmaArmorDescription, + [ABILITY_WATER_VEIL] = sWaterVeilDescription, + [ABILITY_MAGNET_PULL] = sMagnetPullDescription, + [ABILITY_SOUNDPROOF] = sSoundproofDescription, + [ABILITY_RAIN_DISH] = sRainDishDescription, + [ABILITY_SAND_STREAM] = sSandStreamDescription, + [ABILITY_PRESSURE] = sPressureDescription, + [ABILITY_THICK_FAT] = sThickFatDescription, + [ABILITY_EARLY_BIRD] = sEarlyBirdDescription, + [ABILITY_FLAME_BODY] = sFlameBodyDescription, + [ABILITY_RUN_AWAY] = sRunAwayDescription, + [ABILITY_KEEN_EYE] = sKeenEyeDescription, + [ABILITY_HYPER_CUTTER] = sHyperCutterDescription, + [ABILITY_PICKUP] = sPickupDescription, + [ABILITY_TRUANT] = sTruantDescription, + [ABILITY_HUSTLE] = sHustleDescription, + [ABILITY_CUTE_CHARM] = sCuteCharmDescription, + [ABILITY_PLUS] = sPlusDescription, + [ABILITY_MINUS] = sMinusDescription, + [ABILITY_FORECAST] = sForecastDescription, + [ABILITY_STICKY_HOLD] = sStickyHoldDescription, + [ABILITY_SHED_SKIN] = sShedSkinDescription, + [ABILITY_GUTS] = sGutsDescription, + [ABILITY_MARVEL_SCALE] = sMarvelScaleDescription, + [ABILITY_LIQUID_OOZE] = sLiquidOozeDescription, + [ABILITY_OVERGROW] = sOvergrowDescription, + [ABILITY_BLAZE] = sBlazeDescription, + [ABILITY_TORRENT] = sTorrentDescription, + [ABILITY_SWARM] = sSwarmDescription, + [ABILITY_ROCK_HEAD] = sRockHeadDescription, + [ABILITY_DROUGHT] = sDroughtDescription, + [ABILITY_ARENA_TRAP] = sArenaTrapDescription, + [ABILITY_VITAL_SPIRIT] = sVitalSpiritDescription, + [ABILITY_WHITE_SMOKE] = sWhiteSmokeDescription, + [ABILITY_PURE_POWER] = sPurePowerDescription, + [ABILITY_SHELL_ARMOR] = sShellArmorDescription, + [ABILITY_CACOPHONY] = sCacophonyDescription, + [ABILITY_AIR_LOCK] = sAirLockDescription, +}; + +const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] = +{ + [ABILITY_NONE] = _("-------"), + [ABILITY_STENCH] = _("STENCH"), + [ABILITY_DRIZZLE] = _("DRIZZLE"), + [ABILITY_SPEED_BOOST] = _("SPEED BOOST"), + [ABILITY_BATTLE_ARMOR] = _("BATTLE ARMOR"), + [ABILITY_STURDY] = _("STURDY"), + [ABILITY_DAMP] = _("DAMP"), + [ABILITY_LIMBER] = _("LIMBER"), + [ABILITY_SAND_VEIL] = _("SAND VEIL"), + [ABILITY_STATIC] = _("STATIC"), + [ABILITY_VOLT_ABSORB] = _("VOLT ABSORB"), + [ABILITY_WATER_ABSORB] = _("WATER ABSORB"), + [ABILITY_OBLIVIOUS] = _("OBLIVIOUS"), + [ABILITY_CLOUD_NINE] = _("CLOUD NINE"), + [ABILITY_COMPOUND_EYES] = _("COMPOUNDEYES"), + [ABILITY_INSOMNIA] = _("INSOMNIA"), + [ABILITY_COLOR_CHANGE] = _("COLOR CHANGE"), + [ABILITY_IMMUNITY] = _("IMMUNITY"), + [ABILITY_FLASH_FIRE] = _("FLASH FIRE"), + [ABILITY_SHIELD_DUST] = _("SHIELD DUST"), + [ABILITY_OWN_TEMPO] = _("OWN TEMPO"), + [ABILITY_SUCTION_CUPS] = _("SUCTION CUPS"), + [ABILITY_INTIMIDATE] = _("INTIMIDATE"), + [ABILITY_SHADOW_TAG] = _("SHADOW TAG"), + [ABILITY_ROUGH_SKIN] = _("ROUGH SKIN"), + [ABILITY_WONDER_GUARD] = _("WONDER GUARD"), + [ABILITY_LEVITATE] = _("LEVITATE"), + [ABILITY_EFFECT_SPORE] = _("EFFECT SPORE"), + [ABILITY_SYNCHRONIZE] = _("SYNCHRONIZE"), + [ABILITY_CLEAR_BODY] = _("CLEAR BODY"), + [ABILITY_NATURAL_CURE] = _("NATURAL CURE"), + [ABILITY_LIGHTNING_ROD] = _("LIGHTNINGROD"), + [ABILITY_SERENE_GRACE] = _("SERENE GRACE"), + [ABILITY_SWIFT_SWIM] = _("SWIFT SWIM"), + [ABILITY_CHLOROPHYLL] = _("CHLOROPHYLL"), + [ABILITY_ILLUMINATE] = _("ILLUMINATE"), + [ABILITY_TRACE] = _("TRACE"), + [ABILITY_HUGE_POWER] = _("HUGE POWER"), + [ABILITY_POISON_POINT] = _("POISON POINT"), + [ABILITY_INNER_FOCUS] = _("INNER FOCUS"), + [ABILITY_MAGMA_ARMOR] = _("MAGMA ARMOR"), + [ABILITY_WATER_VEIL] = _("WATER VEIL"), + [ABILITY_MAGNET_PULL] = _("MAGNET PULL"), + [ABILITY_SOUNDPROOF] = _("SOUNDPROOF"), + [ABILITY_RAIN_DISH] = _("RAIN DISH"), + [ABILITY_SAND_STREAM] = _("SAND STREAM"), + [ABILITY_PRESSURE] = _("PRESSURE"), + [ABILITY_THICK_FAT] = _("THICK FAT"), + [ABILITY_EARLY_BIRD] = _("EARLY BIRD"), + [ABILITY_FLAME_BODY] = _("FLAME BODY"), + [ABILITY_RUN_AWAY] = _("RUN AWAY"), + [ABILITY_KEEN_EYE] = _("KEEN EYE"), + [ABILITY_HYPER_CUTTER] = _("HYPER CUTTER"), + [ABILITY_PICKUP] = _("PICKUP"), + [ABILITY_TRUANT] = _("TRUANT"), + [ABILITY_HUSTLE] = _("HUSTLE"), + [ABILITY_CUTE_CHARM] = _("CUTE CHARM"), + [ABILITY_PLUS] = _("PLUS"), + [ABILITY_MINUS] = _("MINUS"), + [ABILITY_FORECAST] = _("FORECAST"), + [ABILITY_STICKY_HOLD] = _("STICKY HOLD"), + [ABILITY_SHED_SKIN] = _("SHED SKIN"), + [ABILITY_GUTS] = _("GUTS"), + [ABILITY_MARVEL_SCALE] = _("MARVEL SCALE"), + [ABILITY_LIQUID_OOZE] = _("LIQUID OOZE"), + [ABILITY_OVERGROW] = _("OVERGROW"), + [ABILITY_BLAZE] = _("BLAZE"), + [ABILITY_TORRENT] = _("TORRENT"), + [ABILITY_SWARM] = _("SWARM"), + [ABILITY_ROCK_HEAD] = _("ROCK HEAD"), + [ABILITY_DROUGHT] = _("DROUGHT"), + [ABILITY_ARENA_TRAP] = _("ARENA TRAP"), + [ABILITY_VITAL_SPIRIT] = _("VITAL SPIRIT"), + [ABILITY_WHITE_SMOKE] = _("WHITE SMOKE"), + [ABILITY_PURE_POWER] = _("PURE POWER"), + [ABILITY_SHELL_ARMOR] = _("SHELL ARMOR"), + [ABILITY_CACOPHONY] = _("CACOPHONY"), + [ABILITY_AIR_LOCK] = _("AIR LOCK"), +}; diff --git a/src/data/text/move_names.h b/src/data/text/move_names.h new file mode 100644 index 000000000..d45972d51 --- /dev/null +++ b/src/data/text/move_names.h @@ -0,0 +1,357 @@ +const u8 gMoveNames[][13] = { + _("-$$$$$$"), + _("POUND"), + _("KARATE CHOP"), + _("DOUBLESLAP"), + _("COMET PUNCH"), + _("MEGA PUNCH"), + _("PAY DAY"), + _("FIRE PUNCH"), + _("ICE PUNCH"), + _("THUNDERPUNCH"), + _("SCRATCH"), + _("VICEGRIP"), + _("GUILLOTINE"), + _("RAZOR WIND"), + _("SWORDS DANCE"), + _("CUT"), + _("GUST"), + _("WING ATTACK"), + _("WHIRLWIND"), + _("FLY"), + _("BIND"), + _("SLAM"), + _("VINE WHIP"), + _("STOMP"), + _("DOUBLE KICK"), + _("MEGA KICK"), + _("JUMP KICK"), + _("ROLLING KICK"), + _("SAND-ATTACK"), + _("HEADBUTT"), + _("HORN ATTACK"), + _("FURY ATTACK"), + _("HORN DRILL"), + _("TACKLE"), + _("BODY SLAM"), + _("WRAP"), + _("TAKE DOWN"), + _("THRASH"), + _("DOUBLE-EDGE"), + _("TAIL WHIP"), + _("POISON STING"), + _("TWINEEDLE"), + _("PIN MISSILE"), + _("LEER"), + _("BITE"), + _("GROWL"), + _("ROAR"), + _("SING"), + _("SUPERSONIC"), + _("SONICBOOM"), + _("DISABLE"), + _("ACID"), + _("EMBER"), + _("FLAMETHROWER"), + _("MIST"), + _("WATER GUN"), + _("HYDRO PUMP"), + _("SURF"), + _("ICE BEAM"), + _("BLIZZARD"), + _("PSYBEAM"), + _("BUBBLEBEAM"), + _("AURORA BEAM"), + _("HYPER BEAM"), + _("PECK"), + _("DRILL PECK"), + _("SUBMISSION"), + _("LOW KICK"), + _("COUNTER"), + _("SEISMIC TOSS"), + _("STRENGTH"), + _("ABSORB"), + _("MEGA DRAIN"), + _("LEECH SEED"), + _("GROWTH"), + _("RAZOR LEAF"), + _("SOLARBEAM"), + _("POISONPOWDER"), + _("STUN SPORE"), + _("SLEEP POWDER"), + _("PETAL DANCE"), + _("STRING SHOT"), + _("DRAGON RAGE"), + _("FIRE SPIN"), + _("THUNDERSHOCK"), + _("THUNDERBOLT"), + _("THUNDER WAVE"), + _("THUNDER"), + _("ROCK THROW"), + _("EARTHQUAKE"), + _("FISSURE"), + _("DIG"), + _("TOXIC"), + _("CONFUSION"), + _("PSYCHIC"), + _("HYPNOSIS"), + _("MEDITATE"), + _("AGILITY"), + _("QUICK ATTACK"), + _("RAGE"), + _("TELEPORT"), + _("NIGHT SHADE"), + _("MIMIC"), + _("SCREECH"), + _("DOUBLE TEAM"), + _("RECOVER"), + _("HARDEN"), + _("MINIMIZE"), + _("SMOKESCREEN"), + _("CONFUSE RAY"), + _("WITHDRAW"), + _("DEFENSE CURL"), + _("BARRIER"), + _("LIGHT SCREEN"), + _("HAZE"), + _("REFLECT"), + _("FOCUS ENERGY"), + _("BIDE"), + _("METRONOME"), + _("MIRROR MOVE"), + _("SELFDESTRUCT"), + _("EGG BOMB"), + _("LICK"), + _("SMOG"), + _("SLUDGE"), + _("BONE CLUB"), + _("FIRE BLAST"), + _("WATERFALL"), + _("CLAMP"), + _("SWIFT"), + _("SKULL BASH"), + _("SPIKE CANNON"), + _("CONSTRICT"), + _("AMNESIA"), + _("KINESIS"), + _("SOFTBOILED"), + _("HI JUMP KICK"), + _("GLARE"), + _("DREAM EATER"), + _("POISON GAS"), + _("BARRAGE"), + _("LEECH LIFE"), + _("LOVELY KISS"), + _("SKY ATTACK"), + _("TRANSFORM"), + _("BUBBLE"), + _("DIZZY PUNCH"), + _("SPORE"), + _("FLASH"), + _("PSYWAVE"), + _("SPLASH"), + _("ACID ARMOR"), + _("CRABHAMMER"), + _("EXPLOSION"), + _("FURY SWIPES"), + _("BONEMERANG"), + _("REST"), + _("ROCK SLIDE"), + _("HYPER FANG"), + _("SHARPEN"), + _("CONVERSION"), + _("TRI ATTACK"), + _("SUPER FANG"), + _("SLASH"), + _("SUBSTITUTE"), + _("STRUGGLE"), + _("SKETCH"), + _("TRIPLE KICK"), + _("THIEF"), + _("SPIDER WEB"), + _("MIND READER"), + _("NIGHTMARE"), + _("FLAME WHEEL"), + _("SNORE"), + _("CURSE"), + _("FLAIL"), + _("CONVERSION 2"), + _("AEROBLAST"), + _("COTTON SPORE"), + _("REVERSAL"), + _("SPITE"), + _("POWDER SNOW"), + _("PROTECT"), + _("MACH PUNCH"), + _("SCARY FACE"), + _("FAINT ATTACK"), + _("SWEET KISS"), + _("BELLY DRUM"), + _("SLUDGE BOMB"), + _("MUD-SLAP"), + _("OCTAZOOKA"), + _("SPIKES"), + _("ZAP CANNON"), + _("FORESIGHT"), + _("DESTINY BOND"), + _("PERISH SONG"), + _("ICY WIND"), + _("DETECT"), + _("BONE RUSH"), + _("LOCK-ON"), + _("OUTRAGE"), + _("SANDSTORM"), + _("GIGA DRAIN"), + _("ENDURE"), + _("CHARM"), + _("ROLLOUT"), + _("FALSE SWIPE"), + _("SWAGGER"), + _("MILK DRINK"), + _("SPARK"), + _("FURY CUTTER"), + _("STEEL WING"), + _("MEAN LOOK"), + _("ATTRACT"), + _("SLEEP TALK"), + _("HEAL BELL"), + _("RETURN"), + _("PRESENT"), + _("FRUSTRATION"), + _("SAFEGUARD"), + _("PAIN SPLIT"), + _("SACRED FIRE"), + _("MAGNITUDE"), + _("DYNAMICPUNCH"), + _("MEGAHORN"), + _("DRAGONBREATH"), + _("BATON PASS"), + _("ENCORE"), + _("PURSUIT"), + _("RAPID SPIN"), + _("SWEET SCENT"), + _("IRON TAIL"), + _("METAL CLAW"), + _("VITAL THROW"), + _("MORNING SUN"), + _("SYNTHESIS"), + _("MOONLIGHT"), + _("HIDDEN POWER"), + _("CROSS CHOP"), + _("TWISTER"), + _("RAIN DANCE"), + _("SUNNY DAY"), + _("CRUNCH"), + _("MIRROR COAT"), + _("PSYCH UP"), + _("EXTREMESPEED"), + _("ANCIENTPOWER"), + _("SHADOW BALL"), + _("FUTURE SIGHT"), + _("ROCK SMASH"), + _("WHIRLPOOL"), + _("BEAT UP"), + _("FAKE OUT"), + _("UPROAR"), + _("STOCKPILE"), + _("SPIT UP"), + _("SWALLOW"), + _("HEAT WAVE"), + _("HAIL"), + _("TORMENT"), + _("FLATTER"), + _("WILL-O-WISP"), + _("MEMENTO"), + _("FACADE"), + _("FOCUS PUNCH"), + _("SMELLINGSALT"), + _("FOLLOW ME"), + _("NATURE POWER"), + _("CHARGE"), + _("TAUNT"), + _("HELPING HAND"), + _("TRICK"), + _("ROLE PLAY"), + _("WISH"), + _("ASSIST"), + _("INGRAIN"), + _("SUPERPOWER"), + _("MAGIC COAT"), + _("RECYCLE"), + _("REVENGE"), + _("BRICK BREAK"), + _("YAWN"), + _("KNOCK OFF"), + _("ENDEAVOR"), + _("ERUPTION"), + _("SKILL SWAP"), + _("IMPRISON"), + _("REFRESH"), + _("GRUDGE"), + _("SNATCH"), + _("SECRET POWER"), + _("DIVE"), + _("ARM THRUST"), + _("CAMOUFLAGE"), + _("TAIL GLOW"), + _("LUSTER PURGE"), + _("MIST BALL"), + _("FEATHERDANCE"), + _("TEETER DANCE"), + _("BLAZE KICK"), + _("MUD SPORT"), + _("ICE BALL"), + _("NEEDLE ARM"), + _("SLACK OFF"), + _("HYPER VOICE"), + _("POISON FANG"), + _("CRUSH CLAW"), + _("BLAST BURN"), + _("HYDRO CANNON"), + _("METEOR MASH"), + _("ASTONISH"), + _("WEATHER BALL"), + _("AROMATHERAPY"), + _("FAKE TEARS"), + _("AIR CUTTER"), + _("OVERHEAT"), + _("ODOR SLEUTH"), + _("ROCK TOMB"), + _("SILVER WIND"), + _("METAL SOUND"), + _("GRASSWHISTLE"), + _("TICKLE"), + _("COSMIC POWER"), + _("WATER SPOUT"), + _("SIGNAL BEAM"), + _("SHADOW PUNCH"), + _("EXTRASENSORY"), + _("SKY UPPERCUT"), + _("SAND TOMB"), + _("SHEER COLD"), + _("MUDDY WATER"), + _("BULLET SEED"), + _("AERIAL ACE"), + _("ICICLE SPEAR"), + _("IRON DEFENSE"), + _("BLOCK"), + _("HOWL"), + _("DRAGON CLAW"), + _("FRENZY PLANT"), + _("BULK UP"), + _("BOUNCE"), + _("MUD SHOT"), + _("POISON TAIL"), + _("COVET"), + _("VOLT TACKLE"), + _("MAGICAL LEAF"), + _("WATER SPORT"), + _("CALM MIND"), + _("LEAF BLADE"), + _("DRAGON DANCE"), + _("ROCK BLAST"), + _("SHOCK WAVE"), + _("WATER PULSE"), + _("DOOM DESIRE"), + _("PSYCHO BOOST") +}; diff --git a/src/data/text/species_names.h b/src/data/text/species_names.h new file mode 100644 index 000000000..f30fe2969 --- /dev/null +++ b/src/data/text/species_names.h @@ -0,0 +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") +}; diff --git a/src/data/text/trainer_class_names.h b/src/data/text/trainer_class_names.h new file mode 100644 index 000000000..4faae43f4 --- /dev/null +++ b/src/data/text/trainer_class_names.h @@ -0,0 +1,109 @@ +const u8 gTrainerClassNames[][13] = { + _("{PKMN} TRAINER"), + _("{PKMN} TRAINER"), + _("AQUA LEADER"), + _("TEAM AQUA"), + _("AROMA LADY"), + _("RUIN MANIAC"), + _("INTERVIEWER"), + _("TUBER"), + _("TUBER"), + _("COOLTRAINER"), + _("HEX MANIAC"), + _("LADY"), + _("BEAUTY"), + _("RICH BOY"), + _("POKéMANIAC"), + _("SWIMMER♂"), + _("BLACK BELT"), + _("GUITARIST"), + _("KINDLER"), + _("CAMPER"), + _("BUG MANIAC"), + _("PSYCHIC"), + _("GENTLEMAN"), + _("ELITE FOUR"), + _("LEADER"), + _("SCHOOL KID"), + _("SR. AND JR."), + _("POKéFAN"), + _("EXPERT"), + _("YOUNGSTER"), + _("CHAMPION"), + _("FISHERMAN"), + _("TRIATHLETE"), + _("DRAGON TAMER"), + _("BIRD KEEPER"), + _("NINJA BOY"), + _("BATTLE GIRL"), + _("PARASOL LADY"), + _("SWIMMER♀"), + _("PICNICKER"), + _("TWINS"), + _("SAILOR"), + _("BOARDER"), + _("COLLECTOR"), + _("{PKMN} TRAINER"), + _("{PKMN} BREEDER"), + _("{PKMN} RANGER"), + _("MAGMA LEADER"), + _("TEAM MAGMA"), + _("LASS"), + _("BUG CATCHER"), + _("HIKER"), + _("YOUNG COUPLE"), + _("OLD COUPLE"), + _("SIS AND BRO"), + _("AQUA ADMIN"), + _("MAGMA ADMIN"), + _("YOUNGSTER"), + _("BUG CATCHER"), + _("LASS"), + _("SAILOR"), + _("CAMPER"), + _("PICNICKER"), + _("POKéMANIAC"), + _("SUPER NERD"), + _("HIKER"), + _("BIKER"), + _("BURGLAR"), + _("ENGINEER"), + _("FISHERMAN"), + _("SWIMMER♂"), + _("CUE BALL"), + _("GAMER"), + _("BEAUTY"), + _("SWIMMER♀"), + _("PSYCHIC"), + _("ROCKER"), + _("JUGGLER"), + _("TAMER"), + _("BIRD KEEPER"), + _("BLACK BELT"), + _("RIVAL"), + _("SCIENTIST"), + _("BOSS"), + _("LEADER"), + _("TEAM ROCKET"), + _("COOLTRAINER"), + _("ELITE FOUR"), + _("GENTLEMAN"), + _("RIVAL"), + _("CHAMPION"), + _("CHANNELER"), + _("TWINS"), + _("COOL COUPLE"), + _("YOUNG COUPLE"), + _("CRUSH KIN"), + _("SIS AND BRO"), + _("{PKMN} PROF."), + _("PLAYER"), + _("CRUSH GIRL"), + _("TUBER"), + _("{PKMN} BREEDER"), + _("{PKMN} RANGER"), + _("AROMA LADY"), + _("RUIN MANIAC"), + _("LADY"), + _("PAINTER"), +}; diff --git a/src/data/trainer_graphics/back_pic_anims.h b/src/data/trainer_graphics/back_pic_anims.h new file mode 100644 index 000000000..2e107c21e --- /dev/null +++ b/src/data/trainer_graphics/back_pic_anims.h @@ -0,0 +1,90 @@ +static const union AnimCmd sAnimCmd_Red_1[] = { + ANIMCMD_FRAME(1, 20), + ANIMCMD_FRAME(2, 6), + ANIMCMD_FRAME(3, 6), + ANIMCMD_FRAME(4, 24), + ANIMCMD_FRAME(0, 1), + ANIMCMD_END +}; + +static const union AnimCmd sAnimCmd_Leaf_1[] = { + ANIMCMD_FRAME(1, 20), + ANIMCMD_FRAME(2, 6), + ANIMCMD_FRAME(3, 6), + ANIMCMD_FRAME(4, 24), + ANIMCMD_FRAME(0, 1), + ANIMCMD_END +}; + +static const union AnimCmd sAnimCmd_PokeDude_1[] = { + ANIMCMD_FRAME(1, 24), + ANIMCMD_FRAME(2, 9), + ANIMCMD_FRAME(3, 24), + ANIMCMD_FRAME(0, 9), + ANIMCMD_END +}; + +static const union AnimCmd sAnimCmd_OldMan_1[] = { + ANIMCMD_FRAME(1, 24), + ANIMCMD_FRAME(2, 9), + ANIMCMD_FRAME(3, 24), + ANIMCMD_FRAME(0, 9), + ANIMCMD_END +}; + +static const union AnimCmd sAnimCmd_RSBrendan_1[] = { + ANIMCMD_FRAME(0, 24), + ANIMCMD_FRAME(1, 9), + ANIMCMD_FRAME(2, 24), + ANIMCMD_FRAME(0, 9), + ANIMCMD_FRAME(3, 50), + ANIMCMD_END +}; + +static const union AnimCmd sAnimCmd_RSMay_1[] = { + ANIMCMD_FRAME(0, 24), + ANIMCMD_FRAME(1, 9), + ANIMCMD_FRAME(2, 24), + ANIMCMD_FRAME(0, 9), + ANIMCMD_FRAME(3, 50), + ANIMCMD_END +}; + +const union AnimCmd *const sBackAnims_Red[] = { + sAnim_GeneralFrame0, + sAnimCmd_Red_1 +}; + +const union AnimCmd *const sBackAnims_Leaf[] = { + sAnim_GeneralFrame0, + sAnimCmd_Leaf_1 +}; + +const union AnimCmd *const sBackAnims_PokeDude[] = { + sAnim_GeneralFrame0, + sAnimCmd_PokeDude_1 +}; + +const union AnimCmd *const sBackAnims_OldMan[] = { + sAnim_GeneralFrame0, + sAnimCmd_OldMan_1 +}; + +const union AnimCmd *const sBackAnims_RSBrendan[] = { + sAnim_GeneralFrame3, + sAnimCmd_RSBrendan_1 +}; + +const union AnimCmd *const sBackAnims_RSMay[] = { + sAnim_GeneralFrame3, + sAnimCmd_RSMay_1 +}; + +const union AnimCmd *const *const gTrainerBackAnimsPtrTable[] = { + sBackAnims_Red, + sBackAnims_Leaf, + sBackAnims_RSBrendan, + sBackAnims_RSMay, + sBackAnims_PokeDude, + sBackAnims_OldMan +}; diff --git a/src/data/trainer_graphics/back_pic_tables.h b/src/data/trainer_graphics/back_pic_tables.h new file mode 100644 index 000000000..86e7824c1 --- /dev/null +++ b/src/data/trainer_graphics/back_pic_tables.h @@ -0,0 +1,26 @@ +const struct MonCoords gTrainerBackPicCoords[] = { + {.size = 8, .y_offset = 5}, + {.size = 8, .y_offset = 5}, + {.size = 8, .y_offset = 4}, + {.size = 8, .y_offset = 4}, + {.size = 8, .y_offset = 4}, + {.size = 8, .y_offset = 4} +}; + +const struct CompressedSpriteSheet gTrainerBackPicTable[] = { + { (const u32 *)gTrainerBackPic_Red, 0x2800, 0 }, + { (const u32 *)gTrainerBackPic_Leaf, 0x2800, 1 }, + { (const u32 *)gTrainerBackPic_RSBrendan, 0x2000, 2 }, + { (const u32 *)gTrainerBackPic_RSMay, 0x2000, 3 }, + { (const u32 *)gTrainerBackPic_PokeDude, 0x2000, 4 }, + { (const u32 *)gTrainerBackPic_OldMan, 0x2000, 5 } +}; + +const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] = { + { gTrainerPalette_RedBackPic, 0 }, + { gTrainerPalette_LeafBackPic, 1 }, + { gTrainerPalette_RSBrendan1, 2 }, + { gTrainerPalette_RSMay1, 3 }, + { gTrainerPalette_PokeDudeBackPic, 4 }, + { gTrainerPalette_OldManBackPic, 5 } +}; diff --git a/src/data/trainer_graphics/front_pic_anims.h b/src/data/trainer_graphics/front_pic_anims.h new file mode 100644 index 000000000..32d38068a --- /dev/null +++ b/src/data/trainer_graphics/front_pic_anims.h @@ -0,0 +1,891 @@ +static const union AnimCmd *const sAnims_8238E8C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238E90[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238E94[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238E98[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238E9C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EA0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EA4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EA8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EAC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EB0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EB4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EB8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EBC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EC0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EC4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EC8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238ECC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238ED0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238ED4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238ED8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EDC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EE0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EE4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EE8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EEC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EF0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EF4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EF8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238EFC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F00[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F04[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F08[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F0C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F10[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F14[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F18[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F1C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F20[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F24[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F28[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F2C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F30[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F34[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F38[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F3C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F40[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F44[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F48[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F4C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F50[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F54[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F58[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F5C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F60[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F64[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F68[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F6C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F70[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F74[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F78[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F7C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F80[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F84[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F88[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F8C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F90[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F94[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F98[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238F9C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FA0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FA4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FA8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FAC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FB0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FB4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FB8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FBC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FC0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FC4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FC8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FCC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FD0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FD4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FD8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FDC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FE0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FE4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FE8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FEC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FF0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FF4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FF8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8238FFC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239000[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239004[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239008[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823900C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239010[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239014[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239018[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823901C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239020[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239024[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239028[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823902C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239030[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239034[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239038[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823903C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239040[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239044[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239048[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823904C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239050[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239054[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239058[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823905C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239060[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239064[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239068[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823906C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239070[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239074[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239078[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823907C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239080[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239084[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239088[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823908C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239090[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239094[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_8239098[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_823909C[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390A0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390A4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390A8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390AC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390B0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390B4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390B8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390BC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390C0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390C4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390C8[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390CC[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390D0[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390D4[] = +{ + sAnim_GeneralFrame0, +}; + +static const union AnimCmd *const sAnims_82390D8[] = +{ + sAnim_GeneralFrame0, +}; + +const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[] = +{ + sAnims_8238E8C, + sAnims_8238E90, + sAnims_8238E94, + sAnims_8238E98, + sAnims_8238E9C, + sAnims_8238EA0, + sAnims_8238EA4, + sAnims_8238EA8, + sAnims_8238EAC, + sAnims_8238EB0, + sAnims_8238EB4, + sAnims_8238EB8, + sAnims_8238EBC, + sAnims_8238EC0, + sAnims_8238EC4, + sAnims_8238EC8, + sAnims_8238ECC, + sAnims_8238ED0, + sAnims_8238ED4, + sAnims_8238ED8, + sAnims_8238EDC, + sAnims_8238EE0, + sAnims_8238EE4, + sAnims_8238EE8, + sAnims_8238EEC, + sAnims_8238EF0, + sAnims_8238EF4, + sAnims_8238EF8, + sAnims_8238EFC, + sAnims_8238F00, + sAnims_8238F04, + sAnims_8238F08, + sAnims_8238F0C, + sAnims_8238F10, + sAnims_8238F14, + sAnims_8238F18, + sAnims_8238F1C, + sAnims_8238F20, + sAnims_8238F24, + sAnims_8238F28, + sAnims_8238F2C, + sAnims_8238F30, + sAnims_8238F34, + sAnims_8238F38, + sAnims_8238F3C, + sAnims_8238F40, + sAnims_8238F44, + sAnims_8238F48, + sAnims_8238F4C, + sAnims_8238F50, + sAnims_8238F54, + sAnims_8238F58, + sAnims_8238F5C, + sAnims_8238F60, + sAnims_8238F64, + sAnims_8238F68, + sAnims_8238F6C, + sAnims_8238F70, + sAnims_8238F74, + sAnims_8238F78, + sAnims_8238F7C, + sAnims_8238F80, + sAnims_8238F84, + sAnims_8238F88, + sAnims_8238F8C, + sAnims_8238F90, + sAnims_8238F94, + sAnims_8238F98, + sAnims_8238F9C, + sAnims_8238FA0, + sAnims_8238FA4, + sAnims_8238FA8, + sAnims_8238FAC, + sAnims_8238FB0, + sAnims_8238FB4, + sAnims_8238FB8, + sAnims_8238FBC, + sAnims_8238FC0, + sAnims_8238FC4, + sAnims_8238FC8, + sAnims_8238FCC, + sAnims_8238FD0, + sAnims_8238FD4, + sAnims_8238FD8, + sAnims_8238FDC, + sAnims_8238FE0, + sAnims_8238FE4, + sAnims_8238FE8, + sAnims_8238FEC, + sAnims_8238FF0, + sAnims_8238FF4, + sAnims_8238FF8, + sAnims_8238FFC, + sAnims_8239000, + sAnims_8239004, + sAnims_8239008, + sAnims_823900C, + sAnims_8239010, + sAnims_8239014, + sAnims_8239018, + sAnims_823901C, + sAnims_8239020, + sAnims_8239024, + sAnims_8239028, + sAnims_823902C, + sAnims_8239030, + sAnims_8239034, + sAnims_8239038, + sAnims_823903C, + sAnims_8239040, + sAnims_8239044, + sAnims_8239048, + sAnims_823904C, + sAnims_8239050, + sAnims_8239054, + sAnims_8239058, + sAnims_823905C, + sAnims_8239060, + sAnims_8239064, + sAnims_8239068, + sAnims_823906C, + sAnims_8239070, + sAnims_8239074, + sAnims_8239078, + sAnims_823907C, + sAnims_8239080, + sAnims_8239084, + sAnims_8239088, + sAnims_823908C, + sAnims_8239090, + sAnims_8239094, + sAnims_8239098, + sAnims_823909C, + sAnims_82390A0, + sAnims_82390A4, + sAnims_82390A8, + sAnims_82390AC, + sAnims_82390B0, + sAnims_82390B4, + sAnims_82390B8, + sAnims_82390BC, + sAnims_82390C0, + sAnims_82390C4, + sAnims_82390C8, + sAnims_82390CC, + sAnims_82390D0, + sAnims_82390D4, + sAnims_82390D8, +}; diff --git a/src/data/trainer_graphics/front_pic_tables.h b/src/data/trainer_graphics/front_pic_tables.h new file mode 100644 index 000000000..9d94103ef --- /dev/null +++ b/src/data/trainer_graphics/front_pic_tables.h @@ -0,0 +1,455 @@ +const struct MonCoords gTrainerFrontPicCoords[] = +{ + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 2}, + {.size = 8, .y_offset = 2}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 2}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 2}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, + {.size = 8, .y_offset = 1}, +}; + +const struct CompressedSpriteSheet gTrainerFrontPicTable[] = +{ + TRAINER_SPRITE(AQUA_LEADER_ARCHIE, gTrainerFrontPic_AquaLeaderArchie, 0x800), + TRAINER_SPRITE(AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, 0x800), + TRAINER_SPRITE(AQUA_GRUNT_F, gTrainerFrontPic_AquaGruntF, 0x800), + TRAINER_SPRITE(RS_AROMA_LADY, gTrainerFrontPic_RSAromaLady, 0x800), + TRAINER_SPRITE(RS_RUIN_MANIAC, gTrainerFrontPic_RSRuinManiac, 0x800), + TRAINER_SPRITE(INTERVIEWER, gTrainerFrontPic_Interviewer, 0x800), + TRAINER_SPRITE(RS_TUBER_F, gTrainerFrontPic_RSTuberF, 0x800), + TRAINER_SPRITE(TUBER_M, gTrainerFrontPic_TuberM, 0x800), + TRAINER_SPRITE(RS_COOLTRAINER_M, gTrainerFrontPic_RSCooltrainerM, 0x800), + TRAINER_SPRITE(RS_COOLTRAINER_F, gTrainerFrontPic_RSCooltrainerF, 0x800), + TRAINER_SPRITE(HEX_MANIAC, gTrainerFrontPic_HexManiac, 0x800), + TRAINER_SPRITE(RS_LADY, gTrainerFrontPic_RSLady, 0x800), + TRAINER_SPRITE(RS_BEAUTY, gTrainerFrontPic_RSBeauty, 0x800), + TRAINER_SPRITE(RICH_BOY, gTrainerFrontPic_RichBoy, 0x800), + TRAINER_SPRITE(RS_POKEMANIAC, gTrainerFrontPic_RSPokeManiac, 0x800), + TRAINER_SPRITE(RS_SWIMMER_M, gTrainerFrontPic_RSSwimmerM, 0x800), + TRAINER_SPRITE(RS_BLACK_BELT, gTrainerFrontPic_RSBlackBelt, 0x800), + TRAINER_SPRITE(GUITARIST, gTrainerFrontPic_Guitarist, 0x800), + TRAINER_SPRITE(KINDLER, gTrainerFrontPic_Kindler, 0x800), + TRAINER_SPRITE(RS_CAMPER, gTrainerFrontPic_RSCamper, 0x800), + TRAINER_SPRITE(BUG_MANIAC, gTrainerFrontPic_BugManiac, 0x800), + TRAINER_SPRITE(RS_PSYCHIC_M, gTrainerFrontPic_RSPsychicM, 0x800), + TRAINER_SPRITE(RS_PSYCHIC_F, gTrainerFrontPic_RSPsychicF, 0x800), + TRAINER_SPRITE(RS_GENTLEMAN, gTrainerFrontPic_RSGentleman, 0x800), + TRAINER_SPRITE(ELITE_FOUR_SIDNEY, gTrainerFrontPic_EliteFourSidney, 0x800), + TRAINER_SPRITE(ELITE_FOUR_PHOEBE, gTrainerFrontPic_EliteFourPhoebe, 0x800), + TRAINER_SPRITE(LEADER_ROXANNE, gTrainerFrontPic_LeaderRoxanne, 0x800), + TRAINER_SPRITE(LEADER_BRAWLY, gTrainerFrontPic_LeaderBrawly, 0x800), + TRAINER_SPRITE(LEADER_TATE_AND_LIZA, gTrainerFrontPic_LeaderTateAndLiza, 0x800), + TRAINER_SPRITE(SCHOOL_KID_M, gTrainerFrontPic_SchoolKidM, 0x800), + TRAINER_SPRITE(SCHOOL_KID_F, gTrainerFrontPic_SchoolKidF, 0x800), + TRAINER_SPRITE(SR_AND_JR, gTrainerFrontPic_SrAndJr, 0x1000), + TRAINER_SPRITE(POKEFAN_M, gTrainerFrontPic_PokefanM, 0x1000), + TRAINER_SPRITE(POKEFAN_F, gTrainerFrontPic_PokefanF, 0x800), + TRAINER_SPRITE(EXPERT_M, gTrainerFrontPic_ExpertM, 0x800), + TRAINER_SPRITE(EXPERT_F, gTrainerFrontPic_ExpertF, 0x800), + TRAINER_SPRITE(RS_YOUNGSTER, gTrainerFrontPic_RSYoungster, 0x800), + TRAINER_SPRITE(CHAMPION_STEVEN, gTrainerFrontPic_ChampionSteven, 0x800), + TRAINER_SPRITE(RS_FISHERMAN, gTrainerFrontPic_RSFisherman, 0x800), + TRAINER_SPRITE(CYCLING_TRIATHLETE_M, gTrainerFrontPic_CyclingTriathleteM, 0x1000), + TRAINER_SPRITE(CYCLING_TRIATHLETE_F, gTrainerFrontPic_CyclingTriathleteF, 0x800), + TRAINER_SPRITE(RUNNING_TRIATHLETE_M, gTrainerFrontPic_RunningTriathleteM, 0x800), + TRAINER_SPRITE(RUNNING_TRIATHLETE_F, gTrainerFrontPic_RunningTriathleteF, 0x800), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, gTrainerFrontPic_SwimmingTriathleteM, 0x800), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, gTrainerFrontPic_SwimmingTriathleteF, 0x800), + TRAINER_SPRITE(DRAGON_TAMER, gTrainerFrontPic_DragonTamer, 0x800), + TRAINER_SPRITE(RS_BIRD_KEEPER, gTrainerFrontPic_RSBirdKeeper, 0x800), + TRAINER_SPRITE(NINJA_BOY, gTrainerFrontPic_NinjaBoy, 0x800), + TRAINER_SPRITE(BATTLE_GIRL, gTrainerFrontPic_BattleGirl, 0x1000), + TRAINER_SPRITE(PARASOL_LADY, gTrainerFrontPic_ParasolLady, 0x800), + TRAINER_SPRITE(RS_SWIMMER_F, gTrainerFrontPic_RSSwimmerF, 0x800), + TRAINER_SPRITE(RS_PICNICKER, gTrainerFrontPic_RSPicnicker, 0x800), + TRAINER_SPRITE(RS_TWINS, gTrainerFrontPic_RSTwins, 0x800), + TRAINER_SPRITE(RS_SAILOR, gTrainerFrontPic_RSSailor, 0x800), + TRAINER_SPRITE(COLLECTOR, gTrainerFrontPic_Collector, 0x800), + TRAINER_SPRITE(WALLY, gTrainerFrontPic_Wally, 0x800), + TRAINER_SPRITE(RS_BRENDAN_1, gTrainerFrontPic_RSBrendan1, 0x800), + TRAINER_SPRITE(RS_MAY_1, gTrainerFrontPic_RSMay1, 0x800), + TRAINER_SPRITE(POKEMON_BREEDER_M, gTrainerFrontPic_PokemonBreederM, 0x800), + TRAINER_SPRITE(RS_POKEMON_BREEDER_F, gTrainerFrontPic_RSPokemonBreederF, 0x800), + TRAINER_SPRITE(RS_POKEMON_RANGER_M, gTrainerFrontPic_RSPokemonRangerM, 0x800), + TRAINER_SPRITE(RS_POKEMON_RANGER_F, gTrainerFrontPic_RSPokemonRangerF, 0x800), + TRAINER_SPRITE(MAGMA_LEADER_MAXIE, gTrainerFrontPic_MagmaLeaderMaxie, 0x800), + TRAINER_SPRITE(MAGMA_GRUNT_M, gTrainerFrontPic_MagmaGruntM, 0x800), + TRAINER_SPRITE(MAGMA_GRUNT_F, gTrainerFrontPic_MagmaGruntF, 0x800), + TRAINER_SPRITE(RS_LASS, gTrainerFrontPic_RSLass, 0x800), + TRAINER_SPRITE(RS_BUG_CATCHER, gTrainerFrontPic_RSBugCatcher, 0x800), + TRAINER_SPRITE(RS_HIKER, gTrainerFrontPic_RSHiker, 0x800), + TRAINER_SPRITE(RS_YOUNG_COUPLE, gTrainerFrontPic_RSYoungCouple, 0x800), + TRAINER_SPRITE(OLD_COUPLE, gTrainerFrontPic_OldCouple, 0x800), + TRAINER_SPRITE(RS_SIS_AND_BRO, gTrainerFrontPic_RSSisAndBro, 0x800), + TRAINER_SPRITE(AQUA_ADMIN_M, gTrainerFrontPic_AquaAdminM, 0x800), + TRAINER_SPRITE(AQUA_ADMIN_F, gTrainerFrontPic_AquaAdminF, 0x800), + TRAINER_SPRITE(MAGMA_ADMIN_M, gTrainerFrontPic_MagmaAdminM, 0x800), + TRAINER_SPRITE(MAGMA_ADMIN_F, gTrainerFrontPic_MagmaAdminF, 0x800), + TRAINER_SPRITE(LEADER_WATTSON, gTrainerFrontPic_LeaderWattson, 0x800), + TRAINER_SPRITE(LEADER_FLANNERY, gTrainerFrontPic_LeaderFlannery, 0x800), + TRAINER_SPRITE(LEADER_NORMAN, gTrainerFrontPic_LeaderNorman, 0x800), + TRAINER_SPRITE(LEADER_WINONA, gTrainerFrontPic_LeaderWinona, 0x800), + TRAINER_SPRITE(LEADER_WALLACE, gTrainerFrontPic_LeaderWallace, 0x800), + TRAINER_SPRITE(ELITE_FOUR_GLACIA, gTrainerFrontPic_EliteFourGlacia, 0x800), + TRAINER_SPRITE(ELITE_FOUR_DRAKE, gTrainerFrontPic_EliteFourDrake, 0x800), + TRAINER_SPRITE(YOUNGSTER, gTrainerFrontPic_Youngster, 0x800), + TRAINER_SPRITE(BUG_CATCHER, gTrainerFrontPic_BugCatcher, 0x800), + TRAINER_SPRITE(LASS, gTrainerFrontPic_Lass, 0x800), + TRAINER_SPRITE(SAILOR, gTrainerFrontPic_Sailor, 0x800), + TRAINER_SPRITE(CAMPER, gTrainerFrontPic_Camper, 0x800), + TRAINER_SPRITE(PICNICKER, gTrainerFrontPic_Picnicker, 0x800), + TRAINER_SPRITE(POKEMANIAC, gTrainerFrontPic_PokeManiac, 0x800), + TRAINER_SPRITE(SUPER_NERD, gTrainerFrontPic_SuperNerd, 0x800), + TRAINER_SPRITE(HIKER, gTrainerFrontPic_Hiker, 0x800), + TRAINER_SPRITE(BIKER, gTrainerFrontPic_Biker, 0x800), + TRAINER_SPRITE(BURGLAR, gTrainerFrontPic_Burglar, 0x800), + TRAINER_SPRITE(ENGINEER, gTrainerFrontPic_Engineer, 0x800), + TRAINER_SPRITE(FISHERMAN, gTrainerFrontPic_Fisherman, 0x800), + TRAINER_SPRITE(SWIMMER_M, gTrainerFrontPic_SwimmerM, 0x800), + TRAINER_SPRITE(CUE_BALL, gTrainerFrontPic_CueBall, 0x800), + TRAINER_SPRITE(GAMER, gTrainerFrontPic_Gamer, 0x800), + TRAINER_SPRITE(BEAUTY, gTrainerFrontPic_Beauty, 0x800), + TRAINER_SPRITE(SWIMMER_F, gTrainerFrontPic_SwimmerF, 0x800), + TRAINER_SPRITE(PSYCHIC_M, gTrainerFrontPic_PsychicM, 0x800), + TRAINER_SPRITE(ROCKER, gTrainerFrontPic_Rocker, 0x800), + TRAINER_SPRITE(JUGGLER, gTrainerFrontPic_Juggler, 0x800), + TRAINER_SPRITE(TAMER, gTrainerFrontPic_Tamer, 0x800), + TRAINER_SPRITE(BIRD_KEEPER, gTrainerFrontPic_BirdKeeper, 0x800), + TRAINER_SPRITE(BLACK_BELT, gTrainerFrontPic_BlackBelt, 0x800), + TRAINER_SPRITE(RIVAL_1, gTrainerFrontPic_Rival1, 0x800), + TRAINER_SPRITE(SCIENTIST, gTrainerFrontPic_Scientist, 0x800), + TRAINER_SPRITE(LEADER_GIOVANNI, gTrainerFrontPic_LeaderGiovanni, 0x800), + TRAINER_SPRITE(ROCKET_GRUNT_M, gTrainerFrontPic_RocketGruntM, 0x800), + TRAINER_SPRITE(COOLTRAINER_M, gTrainerFrontPic_CooltrainerM, 0x800), + TRAINER_SPRITE(COOLTRAINER_F, gTrainerFrontPic_CooltrainerF, 0x800), + TRAINER_SPRITE(ELITE_FOUR_LORELEI, gTrainerFrontPic_EliteFourLorelei, 0x800), + TRAINER_SPRITE(ELITE_FOUR_BRUNO, gTrainerFrontPic_EliteFourBruno, 0x800), + TRAINER_SPRITE(ELITE_FOUR_AGATHA, gTrainerFrontPic_EliteFourAgatha, 0x800), + TRAINER_SPRITE(ELITE_FOUR_LANCE, gTrainerFrontPic_EliteFourLance, 0x800), + TRAINER_SPRITE(LEADER_BROCK, gTrainerFrontPic_LeaderBrock, 0x800), + TRAINER_SPRITE(LEADER_MISTY, gTrainerFrontPic_LeaderMisty, 0x800), + TRAINER_SPRITE(LEADER_LT_SURGE, gTrainerFrontPic_LeaderLtSurge, 0x800), + TRAINER_SPRITE(LEADER_ERIKA, gTrainerFrontPic_LeaderErika, 0x800), + TRAINER_SPRITE(LEADER_KOGA, gTrainerFrontPic_LeaderKoga, 0x800), + TRAINER_SPRITE(LEADER_BLAINE, gTrainerFrontPic_LeaderBlaine, 0x800), + TRAINER_SPRITE(LEADER_SABRINA, gTrainerFrontPic_LeaderSabrina, 0x800), + TRAINER_SPRITE(GENTLEMAN, gTrainerFrontPic_Gentleman, 0x800), + TRAINER_SPRITE(RIVAL_2, gTrainerFrontPic_Rival2, 0x800), + TRAINER_SPRITE(CHAMPION_RIVAL, gTrainerFrontPic_ChampionRival, 0x800), + TRAINER_SPRITE(CHANNELER, gTrainerFrontPic_Channeler, 0x800), + TRAINER_SPRITE(TWINS, gTrainerFrontPic_Twins, 0x800), + TRAINER_SPRITE(COOL_COUPLE, gTrainerFrontPic_CoolCouple, 0x800), + TRAINER_SPRITE(YOUNG_COUPLE, gTrainerFrontPic_YoungCouple, 0x800), + TRAINER_SPRITE(CRUSH_KIN, gTrainerFrontPic_CrushKin, 0x800), + TRAINER_SPRITE(SIS_AND_BRO, gTrainerFrontPic_SisAndBro, 0x800), + TRAINER_SPRITE(PROFESSOR_OAK, gTrainerFrontPic_ProfessorOak, 0x800), + TRAINER_SPRITE(RS_BRENDAN_2, gTrainerFrontPic_RSBrendan2, 0x800), + TRAINER_SPRITE(RS_MAY_2, gTrainerFrontPic_RSMay2, 0x800), + TRAINER_SPRITE(RED, gTrainerFrontPic_Red, 0x800), + TRAINER_SPRITE(LEAF, gTrainerFrontPic_Leaf, 0x800), + TRAINER_SPRITE(ROCKET_GRUNT_F, gTrainerFrontPic_RocketGruntF, 0x800), + TRAINER_SPRITE(PSYCHIC_F, gTrainerFrontPic_PsychicF, 0x800), + TRAINER_SPRITE(CRUSH_GIRL, gTrainerFrontPic_CrushGirl, 0x800), + TRAINER_SPRITE(TUBER_F, gTrainerFrontPic_TuberF, 0x800), + TRAINER_SPRITE(POKEMON_BREEDER_F, gTrainerFrontPic_PokemonBreederF, 0x800), + TRAINER_SPRITE(POKEMON_RANGER_M, gTrainerFrontPic_PokemonRangerM, 0x800), + TRAINER_SPRITE(POKEMON_RANGER_F, gTrainerFrontPic_PokemonRangerF, 0x800), + TRAINER_SPRITE(AROMA_LADY, gTrainerFrontPic_AromaLady, 0x800), + TRAINER_SPRITE(RUIN_MANIAC, gTrainerFrontPic_RuinManiac, 0x800), + TRAINER_SPRITE(LADY, gTrainerFrontPic_Lady, 0x800), + TRAINER_SPRITE(PAINTER, gTrainerFrontPic_Painter, 0x800), +}; + +const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[] = +{ + TRAINER_PAL(AQUA_LEADER_ARCHIE, gTrainerPalette_AquaLeaderArchie), + TRAINER_PAL(AQUA_GRUNT_M, gTrainerPalette_AquaGruntM), + TRAINER_PAL(AQUA_GRUNT_F, gTrainerPalette_AquaGruntF), + TRAINER_PAL(RS_AROMA_LADY, gTrainerPalette_RSAromaLady), + TRAINER_PAL(RS_RUIN_MANIAC, gTrainerPalette_RSRuinManiac), + TRAINER_PAL(INTERVIEWER, gTrainerPalette_Interviewer), + TRAINER_PAL(RS_TUBER_F, gTrainerPalette_RSTuberF), + TRAINER_PAL(TUBER_M, gTrainerPalette_TuberM), + TRAINER_PAL(RS_COOLTRAINER_M, gTrainerPalette_RSCooltrainerM), + TRAINER_PAL(RS_COOLTRAINER_F, gTrainerPalette_RSCooltrainerF), + TRAINER_PAL(HEX_MANIAC, gTrainerPalette_HexManiac), + TRAINER_PAL(RS_LADY, gTrainerPalette_RSLady), + TRAINER_PAL(RS_BEAUTY, gTrainerPalette_RSBeauty), + TRAINER_PAL(RICH_BOY, gTrainerPalette_RichBoy), + TRAINER_PAL(RS_POKEMANIAC, gTrainerPalette_RSPokeManiac), + TRAINER_PAL(RS_SWIMMER_M, gTrainerPalette_RSSwimmerM), + TRAINER_PAL(RS_BLACK_BELT, gTrainerPalette_RSBlackBelt), + TRAINER_PAL(GUITARIST, gTrainerPalette_Guitarist), + TRAINER_PAL(KINDLER, gTrainerPalette_Kindler), + TRAINER_PAL(RS_CAMPER, gTrainerPalette_RSCamper), + TRAINER_PAL(BUG_MANIAC, gTrainerPalette_BugManiac), + TRAINER_PAL(RS_PSYCHIC_M, gTrainerPalette_RSPsychicM), + TRAINER_PAL(RS_PSYCHIC_F, gTrainerPalette_RSPsychicF), + TRAINER_PAL(RS_GENTLEMAN, gTrainerPalette_RSGentleman), + TRAINER_PAL(ELITE_FOUR_SIDNEY, gTrainerPalette_EliteFourSidney), + TRAINER_PAL(ELITE_FOUR_PHOEBE, gTrainerPalette_EliteFourPhoebe), + TRAINER_PAL(LEADER_ROXANNE, gTrainerPalette_LeaderRoxanne), + TRAINER_PAL(LEADER_BRAWLY, gTrainerPalette_LeaderBrawly), + TRAINER_PAL(LEADER_TATE_AND_LIZA, gTrainerPalette_LeaderTateAndLiza), + TRAINER_PAL(SCHOOL_KID_M, gTrainerPalette_SchoolKidM), + TRAINER_PAL(SCHOOL_KID_F, gTrainerPalette_SchoolKidF), + TRAINER_PAL(SR_AND_JR, gTrainerPalette_SrAndJr), + TRAINER_PAL(POKEFAN_M, gTrainerPalette_PokefanM), + TRAINER_PAL(POKEFAN_F, gTrainerPalette_PokefanF), + TRAINER_PAL(EXPERT_M, gTrainerPalette_ExpertM), + TRAINER_PAL(EXPERT_F, gTrainerPalette_ExpertF), + TRAINER_PAL(RS_YOUNGSTER, gTrainerPalette_RSYoungster), + TRAINER_PAL(CHAMPION_STEVEN, gTrainerPalette_ChampionSteven), + TRAINER_PAL(RS_FISHERMAN, gTrainerPalette_RSFisherman), + TRAINER_PAL(CYCLING_TRIATHLETE_M, gTrainerPalette_CyclingTriathleteM), + TRAINER_PAL(CYCLING_TRIATHLETE_F, gTrainerPalette_CyclingTriathleteF), + TRAINER_PAL(RUNNING_TRIATHLETE_M, gTrainerPalette_RunningTriathleteM), + TRAINER_PAL(RUNNING_TRIATHLETE_F, gTrainerPalette_RunningTriathleteF), + TRAINER_PAL(SWIMMING_TRIATHLETE_M, gTrainerPalette_SwimmingTriathleteM), + TRAINER_PAL(SWIMMING_TRIATHLETE_F, gTrainerPalette_SwimmingTriathleteF), + TRAINER_PAL(DRAGON_TAMER, gTrainerPalette_DragonTamer), + TRAINER_PAL(RS_BIRD_KEEPER, gTrainerPalette_RSBirdKeeper), + TRAINER_PAL(NINJA_BOY, gTrainerPalette_NinjaBoy), + TRAINER_PAL(BATTLE_GIRL, gTrainerPalette_BattleGirl), + TRAINER_PAL(PARASOL_LADY, gTrainerPalette_ParasolLady), + TRAINER_PAL(RS_SWIMMER_F, gTrainerPalette_RSSwimmerF), + TRAINER_PAL(RS_PICNICKER, gTrainerPalette_RSPicnicker), + TRAINER_PAL(RS_TWINS, gTrainerPalette_RSTwins), + TRAINER_PAL(RS_SAILOR, gTrainerPalette_RSSailor), + TRAINER_PAL(COLLECTOR, gTrainerPalette_Collector), + TRAINER_PAL(WALLY, gTrainerPalette_Wally), + TRAINER_PAL(RS_BRENDAN_1, gTrainerPalette_RSBrendan1), + TRAINER_PAL(RS_MAY_1, gTrainerPalette_RSMay1), + TRAINER_PAL(POKEMON_BREEDER_M, gTrainerPalette_PokemonBreederM), + TRAINER_PAL(RS_POKEMON_BREEDER_F, gTrainerPalette_RSPokemonBreederF), + TRAINER_PAL(RS_POKEMON_RANGER_M, gTrainerPalette_RSPokemonRangerM), + TRAINER_PAL(RS_POKEMON_RANGER_F, gTrainerPalette_RSPokemonRangerF), + TRAINER_PAL(MAGMA_LEADER_MAXIE, gTrainerPalette_MagmaLeaderMaxie), + TRAINER_PAL(MAGMA_GRUNT_M, gTrainerPalette_MagmaGruntM), + TRAINER_PAL(MAGMA_GRUNT_F, gTrainerPalette_MagmaGruntF), + TRAINER_PAL(RS_LASS, gTrainerPalette_RSLass), + TRAINER_PAL(RS_BUG_CATCHER, gTrainerPalette_RSBugCatcher), + TRAINER_PAL(RS_HIKER, gTrainerPalette_RSHiker), + TRAINER_PAL(RS_YOUNG_COUPLE, gTrainerPalette_RSYoungCouple), + TRAINER_PAL(OLD_COUPLE, gTrainerPalette_OldCouple), + TRAINER_PAL(RS_SIS_AND_BRO, gTrainerPalette_RSSisAndBro), + TRAINER_PAL(AQUA_ADMIN_M, gTrainerPalette_AquaAdminM), + TRAINER_PAL(AQUA_ADMIN_F, gTrainerPalette_AquaAdminF), + TRAINER_PAL(MAGMA_ADMIN_M, gTrainerPalette_MagmaAdminM), + TRAINER_PAL(MAGMA_ADMIN_F, gTrainerPalette_MagmaAdminF), + TRAINER_PAL(LEADER_WATTSON, gTrainerPalette_LeaderWattson), + TRAINER_PAL(LEADER_FLANNERY, gTrainerPalette_LeaderFlannery), + TRAINER_PAL(LEADER_NORMAN, gTrainerPalette_LeaderNorman), + TRAINER_PAL(LEADER_WINONA, gTrainerPalette_LeaderWinona), + TRAINER_PAL(LEADER_WALLACE, gTrainerPalette_LeaderWallace), + TRAINER_PAL(ELITE_FOUR_GLACIA, gTrainerPalette_EliteFourGlacia), + TRAINER_PAL(ELITE_FOUR_DRAKE, gTrainerPalette_EliteFourDrake), + TRAINER_PAL(YOUNGSTER, gTrainerPalette_Youngster), + TRAINER_PAL(BUG_CATCHER, gTrainerPalette_BugCatcher), + TRAINER_PAL(LASS, gTrainerPalette_Lass), + TRAINER_PAL(SAILOR, gTrainerPalette_Sailor), + TRAINER_PAL(CAMPER, gTrainerPalette_Camper), + TRAINER_PAL(PICNICKER, gTrainerPalette_Picnicker), + TRAINER_PAL(POKEMANIAC, gTrainerPalette_PokeManiac), + TRAINER_PAL(SUPER_NERD, gTrainerPalette_SuperNerd), + TRAINER_PAL(HIKER, gTrainerPalette_Hiker), + TRAINER_PAL(BIKER, gTrainerPalette_Biker), + TRAINER_PAL(BURGLAR, gTrainerPalette_Burglar), + TRAINER_PAL(ENGINEER, gTrainerPalette_Engineer), + TRAINER_PAL(FISHERMAN, gTrainerPalette_Fisherman), + TRAINER_PAL(SWIMMER_M, gTrainerPalette_SwimmerM), + TRAINER_PAL(CUE_BALL, gTrainerPalette_CueBall), + TRAINER_PAL(GAMER, gTrainerPalette_Gamer), + TRAINER_PAL(BEAUTY, gTrainerPalette_Beauty), + TRAINER_PAL(SWIMMER_F, gTrainerPalette_SwimmerF), + TRAINER_PAL(PSYCHIC_M, gTrainerPalette_PsychicM), + TRAINER_PAL(ROCKER, gTrainerPalette_Rocker), + TRAINER_PAL(JUGGLER, gTrainerPalette_Juggler), + TRAINER_PAL(TAMER, gTrainerPalette_Tamer), + TRAINER_PAL(BIRD_KEEPER, gTrainerPalette_BirdKeeper), + TRAINER_PAL(BLACK_BELT, gTrainerPalette_BlackBelt), + TRAINER_PAL(RIVAL_1, gTrainerPalette_Rival1), + TRAINER_PAL(SCIENTIST, gTrainerPalette_Scientist), + TRAINER_PAL(LEADER_GIOVANNI, gTrainerPalette_LeaderGiovanni), + TRAINER_PAL(ROCKET_GRUNT_M, gTrainerPalette_RocketGruntM), + TRAINER_PAL(COOLTRAINER_M, gTrainerPalette_CooltrainerM), + TRAINER_PAL(COOLTRAINER_F, gTrainerPalette_CooltrainerF), + TRAINER_PAL(ELITE_FOUR_LORELEI, gTrainerPalette_EliteFourLorelei), + TRAINER_PAL(ELITE_FOUR_BRUNO, gTrainerPalette_EliteFourBruno), + TRAINER_PAL(ELITE_FOUR_AGATHA, gTrainerPalette_EliteFourAgatha), + TRAINER_PAL(ELITE_FOUR_LANCE, gTrainerPalette_EliteFourLance), + TRAINER_PAL(LEADER_BROCK, gTrainerPalette_LeaderBrock), + TRAINER_PAL(LEADER_MISTY, gTrainerPalette_LeaderMisty), + TRAINER_PAL(LEADER_LT_SURGE, gTrainerPalette_LeaderLtSurge), + TRAINER_PAL(LEADER_ERIKA, gTrainerPalette_LeaderErika), + TRAINER_PAL(LEADER_KOGA, gTrainerPalette_LeaderKoga), + TRAINER_PAL(LEADER_BLAINE, gTrainerPalette_LeaderBlaine), + TRAINER_PAL(LEADER_SABRINA, gTrainerPalette_LeaderSabrina), + TRAINER_PAL(GENTLEMAN, gTrainerPalette_Gentleman), + TRAINER_PAL(RIVAL_2, gTrainerPalette_Rival2), + TRAINER_PAL(CHAMPION_RIVAL, gTrainerPalette_ChampionRival), + TRAINER_PAL(CHANNELER, gTrainerPalette_Channeler), + TRAINER_PAL(TWINS, gTrainerPalette_Twins), + TRAINER_PAL(COOL_COUPLE, gTrainerPalette_CoolCouple), + TRAINER_PAL(YOUNG_COUPLE, gTrainerPalette_YoungCouple), + TRAINER_PAL(CRUSH_KIN, gTrainerPalette_CrushKin), + TRAINER_PAL(SIS_AND_BRO, gTrainerPalette_SisAndBro), + TRAINER_PAL(PROFESSOR_OAK, gTrainerPalette_ProfessorOak), + TRAINER_PAL(RS_BRENDAN_2, gTrainerPalette_RSBrendan2), + TRAINER_PAL(RS_MAY_2, gTrainerPalette_RSMay2), + TRAINER_PAL(RED, gTrainerPalette_Red), + TRAINER_PAL(LEAF, gTrainerPalette_Leaf), + TRAINER_PAL(ROCKET_GRUNT_F, gTrainerPalette_RocketGruntF), + TRAINER_PAL(PSYCHIC_F, gTrainerPalette_PsychicF), + TRAINER_PAL(CRUSH_GIRL, gTrainerPalette_CrushGirl), + TRAINER_PAL(TUBER_F, gTrainerPalette_TuberF), + TRAINER_PAL(POKEMON_BREEDER_F, gTrainerPalette_PokemonBreederF), + TRAINER_PAL(POKEMON_RANGER_M, gTrainerPalette_PokemonRangerM), + TRAINER_PAL(POKEMON_RANGER_F, gTrainerPalette_PokemonRangerF), + TRAINER_PAL(AROMA_LADY, gTrainerPalette_AromaLady), + TRAINER_PAL(RUIN_MANIAC, gTrainerPalette_RuinManiac), + TRAINER_PAL(LADY, gTrainerPalette_Lady), + TRAINER_PAL(PAINTER, gTrainerPalette_Painter), +}; diff --git a/src/data/trainer_parties.h b/src/data/trainer_parties.h new file mode 100644 index 000000000..a2c4b512d --- /dev/null +++ b/src/data/trainer_parties.h @@ -0,0 +1,11557 @@ +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1A0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1A8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1B0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1B8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1C0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1C8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1D0[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1D8[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1E0[] = { + { + .iv = 100, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1E8[] = { + { + .iv = 100, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1F0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A1F8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A200[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A208[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A210[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A218[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A220[] = { + { + .iv = 100, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A228[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A230[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A238[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A240[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A248[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A250[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A258[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A260[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A268[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A270[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A278[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A280[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A288[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A290[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A298[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2A0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2A8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2B0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2B8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2C0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2C8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2D0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2D8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2E0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2E8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2F0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A2F8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A300[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A308[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A310[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A318[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A320[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A328[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A330[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A338[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A340[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A348[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A350[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A358[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A360[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A368[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A370[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A378[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A380[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A388[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A390[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A398[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3A0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3A8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3B0[] = { + { + .iv = 100, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3B8[] = { + { + .iv = 100, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3C0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3C8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3D0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3D8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3E0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3E8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A3F0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A400[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A408[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A410[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A418[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A420[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A428[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A430[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A438[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A440[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A448[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A450[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A458[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A460[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A468[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A478[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_SPEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A480[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A498[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 14, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4A8[] = { + { + .iv = 0, + .lvl = 15, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 15, + .species = SPECIES_SPEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4B8[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_SLOWPOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4C0[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 14, + .species = SPECIES_SANDSHREW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4D0[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_NIDORAN_M, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4D8[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4E0[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A4F0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A508[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_NIDORINO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A518[] = { + { + .iv = 20, + .lvl = 17, + .species = SPECIES_RATTATA, + }, + { + .iv = 20, + .lvl = 17, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A528[] = { + { + .iv = 0, + .lvl = 6, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 6, + .species = SPECIES_CATERPIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A538[] = { + { + .iv = 0, + .lvl = 7, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 7, + .species = SPECIES_KAKUNA, + }, + { + .iv = 0, + .lvl = 7, + .species = SPECIES_WEEDLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A550[] = { + { + .iv = 0, + .lvl = 9, + .species = SPECIES_WEEDLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A558[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_CATERPIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A570[] = { + { + .iv = 0, + .lvl = 9, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 9, + .species = SPECIES_KAKUNA, + }, + { + .iv = 0, + .lvl = 9, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 9, + .species = SPECIES_METAPOD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A590[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_METAPOD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A5A0[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_KAKUNA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A5B0[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_METAPOD, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_CATERPIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A5C8[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_METAPOD, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_KAKUNA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A5E8[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_WEEDLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A600[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_BUTTERFREE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A608[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_METAPOD, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_VENONAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A620[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_BEEDRILL, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_BEEDRILL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A630[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_WEEDLE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_VENONAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A648[] = { + { + .iv = 0, + .lvl = 9, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 9, + .species = SPECIES_PIDGEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A658[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A668[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_JIGGLYPUFF, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A670[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_PARAS, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_PARAS, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_PARASECT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A688[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A698[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A6A0[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A6B0[] = { + { + .iv = 0, + .lvl = 12, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 12, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 12, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A6C8[] = { + { + .iv = 0, + .lvl = 15, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 15, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A6D8[] = { + { + .iv = 0, + .lvl = 13, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_ODDISH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A6F0[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A700[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A710[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_NIDORAN_F, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_NIDORINA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A720[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A738[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A760[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A770[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_WEEPINBELL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A780[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_GLOOM, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A790[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_SHELLDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7A0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_TENTACOOL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7B0[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_SHELLDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7B8[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_TENTACOOL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7D0[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_STARYU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7E0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A7F8[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A800[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823A810[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_GEODUDE, + .moves = {MOVE_TACKLE, MOVE_DEFENSE_CURL, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_SANDSHREW, + .moves = {MOVE_SCRATCH, MOVE_DEFENSE_CURL, MOVE_SAND_ATTACK, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A830[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 14, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A840[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MANKEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A848[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_SQUIRTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A850[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A860[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A868[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_CHARMANDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A878[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_SANDSHREW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A898[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A8A0[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A8B0[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_PIDGEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A8C8[] = { + { + .iv = 0, + .lvl = 15, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 15, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A8D8[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A8F8[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A900[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A910[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A920[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_JIGGLYPUFF, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A938[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_BULBASAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A948[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_BULBASAUR, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_IVYSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A958[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A980[] = { + { + .iv = 30, + .lvl = 29, + .species = SPECIES_RHYHORN, + }, + { + .iv = 30, + .lvl = 29, + .species = SPECIES_LICKITUNG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A990[] = { + { + .iv = 30, + .lvl = 20, + .species = SPECIES_CUBONE, + }, + { + .iv = 30, + .lvl = 20, + .species = SPECIES_SLOWPOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9A0[] = { + { + .iv = 30, + .lvl = 20, + .species = SPECIES_SLOWPOKE, + }, + { + .iv = 30, + .lvl = 20, + .species = SPECIES_SLOWPOKE, + }, + { + .iv = 30, + .lvl = 20, + .species = SPECIES_SLOWPOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9B8[] = { + { + .iv = 30, + .lvl = 22, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 30, + .lvl = 22, + .species = SPECIES_CUBONE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9C8[] = { + { + .iv = 30, + .lvl = 25, + .species = SPECIES_SLOWPOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9D0[] = { + { + .iv = 30, + .lvl = 40, + .species = SPECIES_CHARMELEON, + }, + { + .iv = 30, + .lvl = 40, + .species = SPECIES_LAPRAS, + }, + { + .iv = 30, + .lvl = 40, + .species = SPECIES_LICKITUNG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9E8[] = { + { + .iv = 30, + .lvl = 23, + .species = SPECIES_CUBONE, + }, + { + .iv = 30, + .lvl = 23, + .species = SPECIES_SLOWPOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823A9F8[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_VOLTORB, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AA08[] = { + { + .iv = 0, + .lvl = 12, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 12, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 12, + .species = SPECIES_KOFFING, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AA20[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_TACKLE, MOVE_CHARGE}, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_KOFFING, + .moves = {MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS}, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_TACKLE, MOVE_CHARGE}, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MAGNEMITE, + .moves = {MOVE_SONIC_BOOM, MOVE_SUPERSONIC, MOVE_THUNDER_SHOCK, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AA60[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_MUK, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GRIMER, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AA78[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SLUDGE, MOVE_SMOKESCREEN, MOVE_SMOG, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AA88[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_KOFFING, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_WEEZING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AAA0[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_KOFFING, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MAGNEMITE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AAC0[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_VOLTORB, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AAD0[] = { + { + .iv = 0, + .lvl = 36, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_NINETALES, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AAE8[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_PONYTA, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_GROWLITHE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB08[] = { + { + .iv = 0, + .lvl = 41, + .species = SPECIES_RAPIDASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB10[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB20[] = { + { + .iv = 0, + .lvl = 10, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 10, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB38[] = { + { + .iv = 0, + .lvl = 15, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 15, + .species = SPECIES_GEODUDE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB48[] = { + { + .iv = 0, + .lvl = 13, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_GEODUDE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB68[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AB70[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_ONIX, + .moves = {MOVE_HARDEN, MOVE_ROCK_THROW, MOVE_BIND, MOVE_SCREECH}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AB90[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_GEODUDE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ABA8[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_ONIX, + .moves = {MOVE_HARDEN, MOVE_ROCK_THROW, MOVE_BIND, MOVE_SCREECH}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823ABC8[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_GRAVELER, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ABD8[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GRAVELER, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AC08[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AC18[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AC28[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_GEODUDE, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_GEODUDE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AC48[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_GEODUDE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AC60[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GEODUDE, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GRAVELER, + .moves = {MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AC80[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_POISON_GAS}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ACB0[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ACD0[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_GRIMER, + .moves = {MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE, MOVE_POUND}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AD20[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AD50[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AD70[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AD78[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_WEEZING, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AD80[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823ADB0[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ADB8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_CHARGE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_CHARGE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ADD8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_WEEZING, + .moves = {MOVE_SLUDGE, MOVE_SMOKESCREEN, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MUK, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823ADF8[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SELF_DESTRUCT, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AE48[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AE88[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823AEB8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MUK, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AED8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AEE8[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GROWLITHE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AEF0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_PONYTA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF08[] = { + { + .iv = 0, + .lvl = 36, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_NINETALES, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF20[] = { + { + .iv = 0, + .lvl = 41, + .species = SPECIES_PONYTA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF28[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_VULPIX, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_GROWLITHE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF38[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF48[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF58[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_NINETALES, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF60[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_PONYTA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF70[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MAGNEMITE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF80[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MAGNEMITE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AF88[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MAGNETON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AFA0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AFB8[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_SHELLDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AFD0[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AFE8[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823AFF8[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B000[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B020[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B040[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_CLOYSTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B050[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MAGIKARP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B080[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B090[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MAGIKARP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B0A0[] = { + { + .iv = 0, + .lvl = 16, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 16, + .species = SPECIES_SHELLDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B0B0[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SHELLDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B0C0[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_STARYU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B0D8[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_POLIWHIRL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B0E8[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_GOLDEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B108[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B120[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B130[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_TENTACRUEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B158[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_CLOYSTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B168[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_STARYU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B170[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_SEADRA, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B190[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_SEADRA, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_TENTACRUEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1A0[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1A8[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1B8[] = { + { + .iv = 0, + .lvl = 32, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 0, + .lvl = 32, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 32, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1D0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1E8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B1F8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B208[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PRIMEAPE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B218[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHAMP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B228[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B230[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MANKEY, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MACHAMP, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B250[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PRIMEAPE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B260[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_TENTACRUEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B278[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B288[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_ODDISH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B298[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_MAGNEMITE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B2A8[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B2B8[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_POLIWHIRL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B2D0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B2D8[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B2E8[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B308[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B318[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_EXEGGCUTE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B320[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_RATTATA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B338[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B348[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B350[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_CLOYSTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B368[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B378[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_WIGGLYTUFF, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B388[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_BULBASAUR, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_IVYSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B398[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_WEEPINBELL, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_WEEPINBELL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B3B0[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_POLIWAG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B3D8[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B3E8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_STARYU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B400[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SEADRA, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B418[] = { + { + .iv = 50, + .lvl = 31, + .species = SPECIES_KADABRA, + }, + { + .iv = 50, + .lvl = 31, + .species = SPECIES_SLOWPOKE, + }, + { + .iv = 50, + .lvl = 31, + .species = SPECIES_MR_MIME, + }, + { + .iv = 50, + .lvl = 31, + .species = SPECIES_KADABRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B438[] = { + { + .iv = 50, + .lvl = 34, + .species = SPECIES_MR_MIME, + }, + { + .iv = 50, + .lvl = 34, + .species = SPECIES_KADABRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B448[] = { + { + .iv = 50, + .lvl = 33, + .species = SPECIES_SLOWPOKE, + }, + { + .iv = 50, + .lvl = 33, + .species = SPECIES_SLOWPOKE, + }, + { + .iv = 50, + .lvl = 33, + .species = SPECIES_SLOWBRO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B460[] = { + { + .iv = 50, + .lvl = 38, + .species = SPECIES_SLOWBRO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B468[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_VOLTORB, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B480[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ELECTRODE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B490[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_KADABRA, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MR_MIME, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B4A0[] = { + { + .iv = 0, + .lvl = 41, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 41, + .species = SPECIES_HYPNO, + }, + { + .iv = 0, + .lvl = 41, + .species = SPECIES_KADABRA, + }, + { + .iv = 0, + .lvl = 41, + .species = SPECIES_KADABRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B4C0[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_KADABRA, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_DROWZEE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B4E0[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_HYPNO, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B4F0[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MR_MIME, + .moves = {MOVE_PSYCHIC, MOVE_ROLE_PLAY, MOVE_DOUBLE_SLAP, MOVE_ENCORE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B500[] = { + { + .iv = 0, + .lvl = 46, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SWIFT, MOVE_LIGHT_SCREEN, MOVE_SPARK, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SWIFT, MOVE_LIGHT_SCREEN, MOVE_SPARK, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_ELECTRODE, + .moves = {MOVE_SWIFT, MOVE_SPARK, MOVE_SELF_DESTRUCT, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MR_MIME, + .moves = {MOVE_PSYCHIC, MOVE_ROLE_PLAY, MOVE_REFLECT, MOVE_ENCORE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B540[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_HYPNO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B548[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_KADABRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B558[] = { + { + .iv = 40, + .lvl = 34, + .species = SPECIES_SANDSLASH, + }, + { + .iv = 40, + .lvl = 34, + .species = SPECIES_ARBOK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B568[] = { + { + .iv = 40, + .lvl = 33, + .species = SPECIES_ARBOK, + }, + { + .iv = 40, + .lvl = 33, + .species = SPECIES_SANDSLASH, + }, + { + .iv = 40, + .lvl = 33, + .species = SPECIES_ARBOK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B580[] = { + { + .iv = 40, + .lvl = 43, + .species = SPECIES_RHYHORN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B588[] = { + { + .iv = 40, + .lvl = 39, + .species = SPECIES_ARBOK, + }, + { + .iv = 40, + .lvl = 39, + .species = SPECIES_TAUROS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B598[] = { + { + .iv = 40, + .lvl = 44, + .species = SPECIES_PERSIAN, + }, + { + .iv = 40, + .lvl = 44, + .species = SPECIES_GOLDUCK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B5A8[] = { + { + .iv = 40, + .lvl = 42, + .species = SPECIES_RHYHORN, + }, + { + .iv = 40, + .lvl = 42, + .species = SPECIES_PRIMEAPE, + }, + { + .iv = 40, + .lvl = 42, + .species = SPECIES_ARBOK, + }, + { + .iv = 40, + .lvl = 42, + .species = SPECIES_TAUROS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B5C8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B5D8[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_SPEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B600[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B620[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_FARFETCHD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B628[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B638[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_FARFETCHD, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_DODUO, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B658[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DODRIO, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DODUO, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DODUO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B670[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B680[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_DODRIO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B688[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_FEAROW, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_SPEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B6A8[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_FEAROW, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_FEAROW, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B6C0[] = { + { + .iv = 0, + .lvl = 39, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 39, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 39, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 39, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B6E0[] = { + { + .iv = 0, + .lvl = 39, + .species = SPECIES_FARFETCHD, + }, + { + .iv = 0, + .lvl = 39, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B6F0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DODUO, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B708[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B728[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B738[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DODUO, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B750[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 37, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B760[] = { + { + .iv = 100, + .lvl = 31, + .species = SPECIES_MANKEY, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 31, + .species = SPECIES_MANKEY, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 31, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B778[] = { + { + .iv = 100, + .lvl = 32, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 32, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B788[] = { + { + .iv = 100, + .lvl = 36, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B790[] = { + { + .iv = 100, + .lvl = 31, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 31, + .species = SPECIES_MANKEY, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 31, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B7A8[] = { + { + .iv = 100, + .lvl = 40, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 40, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B7B8[] = { + { + .iv = 100, + .lvl = 43, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B7C0[] = { + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823B7D8[] = { + { + .iv = 100, + .lvl = 43, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 43, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 43, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B7F0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_SQUIRTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B7F8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_BULBASAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B800[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_CHARMANDER, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B808[] = { + { + .iv = 50, + .lvl = 9, + .species = SPECIES_PIDGEY, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 9, + .species = SPECIES_SQUIRTLE, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_NONE, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B828[] = { + { + .iv = 50, + .lvl = 9, + .species = SPECIES_PIDGEY, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 9, + .species = SPECIES_BULBASAUR, + .moves = {MOVE_TACKLE, MOVE_GROWL, MOVE_NONE, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B848[] = { + { + .iv = 50, + .lvl = 9, + .species = SPECIES_PIDGEY, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 9, + .species = SPECIES_CHARMANDER, + .moves = {MOVE_SCRATCH, MOVE_GROWL, MOVE_NONE, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B868[] = { + { + .iv = 50, + .lvl = 17, + .species = SPECIES_PIDGEOTTO, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_ABRA, + .moves = {MOVE_TELEPORT, MOVE_NONE, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 15, + .species = SPECIES_RATTATA, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_QUICK_ATTACK, MOVE_NONE}, + }, + { + .iv = 100, + .lvl = 18, + .species = SPECIES_SQUIRTLE, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_WITHDRAW, MOVE_WATER_GUN}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B8A8[] = { + { + .iv = 50, + .lvl = 17, + .species = SPECIES_PIDGEOTTO, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_ABRA, + .moves = {MOVE_TELEPORT, MOVE_NONE, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 15, + .species = SPECIES_RATTATA, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_QUICK_ATTACK, MOVE_NONE}, + }, + { + .iv = 100, + .lvl = 18, + .species = SPECIES_BULBASAUR, + .moves = {MOVE_SLEEP_POWDER, MOVE_POISON_POWDER, MOVE_VINE_WHIP, MOVE_LEECH_SEED}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B8E8[] = { + { + .iv = 50, + .lvl = 17, + .species = SPECIES_PIDGEOTTO, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_ABRA, + .moves = {MOVE_TELEPORT, MOVE_NONE, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 50, + .lvl = 15, + .species = SPECIES_RATTATA, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_QUICK_ATTACK, MOVE_NONE}, + }, + { + .iv = 100, + .lvl = 18, + .species = SPECIES_CHARMANDER, + .moves = {MOVE_METAL_CLAW, MOVE_EMBER, MOVE_GROWL, MOVE_SCRATCH}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B928[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ELECTRODE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_WEEZING, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B938[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_GRIMER, + .moves = {MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_SELF_DESTRUCT}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B978[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_VOLTORB, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MAGNETON, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B990[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ELECTRODE, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823B9B0[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_ELECTRODE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B9B8[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MAGNETON, + .moves = {MOVE_SPARK, MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM, MOVE_SUPERSONIC}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_MAGNEMITE, + .moves = {MOVE_SPARK, MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM, MOVE_SUPERSONIC}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823B9F8[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_MAGNETON, + .moves = {MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM, MOVE_SUPERSONIC, MOVE_THUNDER_SHOCK}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_MAGNEMITE, + .moves = {MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM, MOVE_SUPERSONIC, MOVE_THUNDER_SHOCK}, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BA48[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ELECTRODE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BA58[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ELECTRODE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BA68[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_TACKLE, MOVE_SMOG}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MAGNETON, + .moves = {MOVE_SPARK, MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM, MOVE_SUPERSONIC}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BA98[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_KOFFING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BAA8[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_MAGNETON, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_VOLTORB, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BAC0[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_MAGNEMITE, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_ELECTRODE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BAD0[] = { + { + .iv = 250, + .lvl = 25, + .species = SPECIES_ONIX, + }, + { + .iv = 250, + .lvl = 24, + .species = SPECIES_RHYHORN, + }, + { + .iv = 250, + .lvl = 29, + .species = SPECIES_KANGASKHAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BAE8[] = { + { + .iv = 250, + .lvl = 37, + .species = SPECIES_NIDORINO, + }, + { + .iv = 250, + .lvl = 35, + .species = SPECIES_KANGASKHAN, + }, + { + .iv = 250, + .lvl = 37, + .species = SPECIES_RHYHORN, + }, + { + .iv = 250, + .lvl = 41, + .species = SPECIES_NIDOQUEEN, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BB08[] = { + { + .iv = 0, + .lvl = 45, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_ROCK_BLAST, MOVE_SCARY_FACE, MOVE_EARTHQUAKE}, + }, + { + .iv = 0, + .lvl = 42, + .species = SPECIES_DUGTRIO, + .moves = {MOVE_SLASH, MOVE_SAND_TOMB, MOVE_MUD_SLAP, MOVE_EARTHQUAKE}, + }, + { + .iv = 0, + .lvl = 44, + .species = SPECIES_NIDOQUEEN, + .moves = {MOVE_BODY_SLAM, MOVE_DOUBLE_KICK, MOVE_POISON_STING, MOVE_EARTHQUAKE}, + }, + { + .iv = 0, + .lvl = 45, + .species = SPECIES_NIDOKING, + .moves = {MOVE_THRASH, MOVE_DOUBLE_KICK, MOVE_POISON_STING, MOVE_EARTHQUAKE}, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_ROCK_BLAST, MOVE_SCARY_FACE, MOVE_EARTHQUAKE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BB58[] = { + { + .iv = 0, + .lvl = 13, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BB68[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BB80[] = { + { + .iv = 0, + .lvl = 11, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 11, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BB90[] = { + { + .iv = 0, + .lvl = 13, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 13, + .species = SPECIES_SANDSHREW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BBA0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_DROWZEE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BBB0[] = { + { + .iv = 0, + .lvl = 15, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 15, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BBC0[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BBD0[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BBE0[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BBF0[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_GRIMER, + .moves = {MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE, MOVE_HARDEN}, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS, MOVE_NONE}, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BC20[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BC40[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GRIMER, + .moves = {MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE, MOVE_HARDEN}, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_KOFFING, + .moves = {MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BC60[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_ZUBAT, + .moves = {MOVE_BITE, MOVE_ASTONISH, MOVE_SUPERSONIC, MOVE_LEECH_LIFE}, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS, MOVE_NONE}, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_GRIMER, + .moves = {MOVE_SLUDGE, MOVE_DISABLE, MOVE_HARDEN, MOVE_POUND}, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_ZUBAT, + .moves = {MOVE_BITE, MOVE_ASTONISH, MOVE_SUPERSONIC, MOVE_LEECH_LIFE}, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_RATICATE, + .moves = {MOVE_HYPER_FANG, MOVE_QUICK_ATTACK, MOVE_TAIL_WHIP, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BCB0[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_DROWZEE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BCC8[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BCD8[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BCF0[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_ARBOK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD08[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_KOFFING, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD18[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_GOLBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD30[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_DROWZEE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD40[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD60[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD70[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_CUBONE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BD80[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_GOLBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDA8[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HYPNO, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDC0[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_DROWZEE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDD0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_CUBONE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDE8[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_ARBOK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDF0[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_HYPNO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BDF8[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BE08[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GOLBAT, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BE20[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_RATICATE, + .moves = {MOVE_SCARY_FACE, MOVE_HYPER_FANG, MOVE_QUICK_ATTACK, MOVE_TAIL_WHIP}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_ARBOK, + .moves = {MOVE_GLARE, MOVE_BITE, MOVE_POISON_STING, MOVE_LEER}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_GOLBAT, + .moves = {MOVE_WING_ATTACK, MOVE_BITE, MOVE_ASTONISH, MOVE_SUPERSONIC}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BE60[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_CUBONE, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_CUBONE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BE70[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BE80[] = { + { + .iv = 0, + .lvl = 26, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_GOLBAT, + }, + { + .iv = 0, + .lvl = 26, + .species = SPECIES_RATTATA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BEA0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GOLBAT, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BEB8[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_MACHOP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BED0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GOLBAT, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HYPNO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BEE8[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BEF0[] = { + { + .iv = 0, + .lvl = 25, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 25, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823BF18[] = { + { + .iv = 0, + .lvl = 32, + .species = SPECIES_CUBONE, + }, + { + .iv = 0, + .lvl = 32, + .species = SPECIES_DROWZEE, + }, + { + .iv = 0, + .lvl = 32, + .species = SPECIES_MAROWAK, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BF30[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_SANDSLASH, + .moves = {MOVE_SLASH, MOVE_SWIFT, MOVE_SAND_ATTACK, MOVE_POISON_STING}, + }, + { + .iv = 100, + .lvl = 37, + .species = SPECIES_SANDSLASH, + .moves = {MOVE_SLASH, MOVE_SWIFT, MOVE_SAND_ATTACK, MOVE_POISON_STING}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_ROCK_BLAST, MOVE_FURY_ATTACK, MOVE_SCARY_FACE}, + }, + { + .iv = 100, + .lvl = 39, + .species = SPECIES_NIDORINO, + .moves = {MOVE_FURY_ATTACK, MOVE_HORN_ATTACK, MOVE_POISON_STING, MOVE_DOUBLE_KICK}, + }, + { + .iv = 100, + .lvl = 39, + .species = SPECIES_NIDOKING, + .moves = {MOVE_THRASH, MOVE_DOUBLE_KICK, MOVE_POISON_STING, MOVE_FOCUS_ENERGY}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BF80[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_EXEGGUTOR, + .moves = {MOVE_EGG_BOMB, MOVE_CONFUSION, MOVE_STUN_SPORE, MOVE_SLEEP_POWDER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SANDSLASH, + .moves = {MOVE_FURY_SWIPES, MOVE_SWIFT, MOVE_POISON_STING, MOVE_SAND_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CLOYSTER, + .moves = {MOVE_SPIKE_CANNON, MOVE_SPIKES, MOVE_AURORA_BEAM, MOVE_SUPERSONIC}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_ELECTRODE, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_LIGHT_SCREEN}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_ARCANINE, + .moves = {MOVE_FLAME_WHEEL, MOVE_ROAR, MOVE_BITE, MOVE_TAKE_DOWN}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823BFD0[] = { + { + .iv = 100, + .lvl = 41, + .species = SPECIES_KINGLER, + .moves = {MOVE_GUILLOTINE, MOVE_STOMP, MOVE_MUD_SHOT, MOVE_BUBBLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_POLIWHIRL, + .moves = {MOVE_BODY_SLAM, MOVE_DOUBLE_SLAP, MOVE_WATER_GUN, MOVE_HYPNOSIS}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_TENTACRUEL, + .moves = {MOVE_BARRIER, MOVE_WRAP, MOVE_BUBBLE_BEAM, MOVE_ACID}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SEADRA, + .moves = {MOVE_WATER_GUN, MOVE_SMOKESCREEN, MOVE_TWISTER, MOVE_LEER}, + }, + { + .iv = 100, + .lvl = 43, + .species = SPECIES_BLASTOISE, + .moves = {MOVE_WATER_GUN, MOVE_BITE, MOVE_RAPID_SPIN, MOVE_RAIN_DANCE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C020[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SLOWPOKE, + .moves = {MOVE_HEADBUTT, MOVE_CONFUSION, MOVE_WATER_GUN, MOVE_DISABLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SHELLDER, + .moves = {MOVE_AURORA_BEAM, MOVE_CLAMP, MOVE_SUPERSONIC, MOVE_LEER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_KINGLER, + .moves = {MOVE_GUILLOTINE, MOVE_STOMP, MOVE_MUD_SHOT, MOVE_BUBBLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_STARMIE, + .moves = {MOVE_BUBBLE_BEAM, MOVE_SWIFT, MOVE_RECOVER, MOVE_RAPID_SPIN}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_GOLDUCK, + .moves = {MOVE_CONFUSION, MOVE_SCRATCH, MOVE_SCREECH, MOVE_DISABLE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C070[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RATICATE, + .moves = {MOVE_SUPER_FANG, MOVE_PURSUIT, MOVE_SCARY_FACE, MOVE_QUICK_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_IVYSAUR, + .moves = {MOVE_RAZOR_LEAF, MOVE_SLEEP_POWDER, MOVE_SWEET_SCENT, MOVE_SYNTHESIS}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_WARTORTLE, + .moves = {MOVE_WATER_GUN, MOVE_BITE, MOVE_RAPID_SPIN, MOVE_TAIL_WHIP}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CHARMELEON, + .moves = {MOVE_FLAMETHROWER, MOVE_SLASH, MOVE_SMOKESCREEN, MOVE_SCARY_FACE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CHARIZARD, + .moves = {MOVE_FLAMETHROWER, MOVE_WING_ATTACK, MOVE_SMOKESCREEN, MOVE_SCARY_FACE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C0C0[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PIDGEOTTO, + .moves = {MOVE_WING_ATTACK, MOVE_FEATHER_DANCE, MOVE_WHIRLWIND, MOVE_QUICK_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_FEAROW, + .moves = {MOVE_DRILL_PECK, MOVE_MIRROR_MOVE, MOVE_PURSUIT, MOVE_LEER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PERSIAN, + .moves = {MOVE_PAY_DAY, MOVE_FAINT_ATTACK, MOVE_SCREECH, MOVE_BITE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_LICKITUNG, + .moves = {MOVE_SLAM, MOVE_DISABLE, MOVE_WRAP, MOVE_SUPERSONIC}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_TAUROS, + .moves = {MOVE_HORN_ATTACK, MOVE_SCARY_FACE, MOVE_SWAGGER, MOVE_TAIL_WHIP}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C110[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDORINO, + .moves = {MOVE_SCRATCH, MOVE_POISON_STING, MOVE_DOUBLE_KICK, MOVE_BITE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDORINA, + .moves = {MOVE_HORN_ATTACK, MOVE_POISON_STING, MOVE_DOUBLE_KICK, MOVE_LEER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RATICATE, + .moves = {MOVE_SUPER_FANG, MOVE_PURSUIT, MOVE_SCARY_FACE, MOVE_QUICK_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SANDSLASH, + .moves = {MOVE_FURY_SWIPES, MOVE_SWIFT, MOVE_SLASH, MOVE_POISON_STING}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RHYHORN, + .moves = {MOVE_ROCK_BLAST, MOVE_SCARY_FACE, MOVE_STOMP, MOVE_TAIL_WHIP}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C160[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_SEEL, + .moves = {MOVE_TAKE_DOWN, MOVE_AURORA_BEAM, MOVE_ICY_WIND, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_GRAVELER, + .moves = {MOVE_ROCK_BLAST, MOVE_MAGNITUDE, MOVE_ROCK_THROW, MOVE_MUD_SPORT}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_KINGLER, + .moves = {MOVE_GUILLOTINE, MOVE_STOMP, MOVE_MUD_SHOT, MOVE_BUBBLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_ONIX, + .moves = {MOVE_SLAM, MOVE_SANDSTORM, MOVE_DRAGON_BREATH, MOVE_ROCK_THROW}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CLOYSTER, + .moves = {MOVE_SPIKE_CANNON, MOVE_AURORA_BEAM, MOVE_SUPERSONIC, MOVE_PROTECT}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C1B0[] = { + { + .iv = 100, + .lvl = 38, + .species = SPECIES_SANDSLASH, + .moves = {MOVE_SLASH, MOVE_SWIFT, MOVE_SAND_ATTACK, MOVE_POISON_STING}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GRAVELER, + .moves = {MOVE_ROCK_BLAST, MOVE_MAGNITUDE, MOVE_MUD_SPORT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_ONIX, + .moves = {MOVE_DRAGON_BREATH, MOVE_SANDSTORM, MOVE_ROCK_THROW, MOVE_BIND}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GRAVELER, + .moves = {MOVE_ROCK_BLAST, MOVE_MAGNITUDE, MOVE_ROLLOUT, MOVE_DEFENSE_CURL}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MAROWAK, + .moves = {MOVE_BONEMERANG, MOVE_HEADBUTT, MOVE_LEER, MOVE_GROWL}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C200[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_MAROWAK, + .moves = {MOVE_BONEMERANG, MOVE_HEADBUTT, MOVE_LEER, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 37, + .species = SPECIES_MAROWAK, + .moves = {MOVE_BONEMERANG, MOVE_HEADBUTT, MOVE_LEER, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_ROCK_BLAST, MOVE_FURY_ATTACK, MOVE_SCARY_FACE}, + }, + { + .iv = 100, + .lvl = 39, + .species = SPECIES_NIDORINA, + .moves = {MOVE_FURY_SWIPES, MOVE_BITE, MOVE_POISON_STING, MOVE_DOUBLE_KICK}, + }, + { + .iv = 100, + .lvl = 39, + .species = SPECIES_NIDOQUEEN, + .moves = {MOVE_BODY_SLAM, MOVE_BITE, MOVE_POISON_STING, MOVE_DOUBLE_KICK}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C250[] = { + { + .iv = 100, + .lvl = 22, + .species = SPECIES_BELLSPROUT, + .moves = {MOVE_WRAP, MOVE_STUN_SPORE, MOVE_POISON_POWDER, MOVE_GROWTH}, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_ODDISH, + .moves = {MOVE_POISON_POWDER, MOVE_STUN_SPORE, MOVE_ABSORB, MOVE_SWEET_SCENT}, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_WEEPINBELL, + .moves = {MOVE_VINE_WHIP, MOVE_STUN_SPORE, MOVE_POISON_POWDER, MOVE_GROWTH}, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_GLOOM, + .moves = {MOVE_ABSORB, MOVE_STUN_SPORE, MOVE_POISON_POWDER, MOVE_SWEET_SCENT}, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_IVYSAUR, + .moves = {MOVE_RAZOR_LEAF, MOVE_SLEEP_POWDER, MOVE_VINE_WHIP, MOVE_LEECH_SEED}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C2A0[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_BELLSPROUT, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_STUN_SPORE, MOVE_POISON_POWDER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_WEEPINBELL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_SLEEP_POWDER, MOVE_POISON_POWDER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VICTREEBEL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_STUN_SPORE, MOVE_SLEEP_POWDER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PARAS, + .moves = {MOVE_GROWTH, MOVE_SLASH, MOVE_LEECH_LIFE, MOVE_STUN_SPORE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PARASECT, + .moves = {MOVE_SPORE, MOVE_SLASH, MOVE_LEECH_LIFE, MOVE_POISON_POWDER}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C2F0[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CLEFAIRY, + .moves = {MOVE_LIGHT_SCREEN, MOVE_COSMIC_POWER, MOVE_DOUBLE_SLAP, MOVE_ENCORE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_JIGGLYPUFF, + .moves = {MOVE_SING, MOVE_BODY_SLAM, MOVE_ROLLOUT, MOVE_DISABLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PERSIAN, + .moves = {MOVE_PAY_DAY, MOVE_FAINT_ATTACK, MOVE_BITE, MOVE_SCREECH}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_DEWGONG, + .moves = {MOVE_SHEER_COLD, MOVE_TAKE_DOWN, MOVE_REST, MOVE_AURORA_BEAM}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_CHANSEY, + .moves = {MOVE_SING, MOVE_EGG_BOMB, MOVE_SOFT_BOILED, MOVE_MINIMIZE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C340[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_BEEDRILL, + .moves = {MOVE_PIN_MISSILE, MOVE_TWINEEDLE, MOVE_AGILITY, MOVE_PURSUIT}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_BUTTERFREE, + .moves = {MOVE_SAFEGUARD, MOVE_PSYBEAM, MOVE_GUST, MOVE_SUPERSONIC}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PARASECT, + .moves = {MOVE_SPORE, MOVE_LEECH_LIFE, MOVE_SLASH, MOVE_GROWTH}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VENONAT, + .moves = {MOVE_PSYBEAM, MOVE_STUN_SPORE, MOVE_LEECH_LIFE, MOVE_DISABLE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VENOMOTH, + .moves = {MOVE_PSYBEAM, MOVE_GUST, MOVE_SUPERSONIC, MOVE_LEECH_LIFE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C390[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PERSIAN, + .moves = {MOVE_FURY_SWIPES, MOVE_SCREECH, MOVE_FAINT_ATTACK, MOVE_PAY_DAY}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PONYTA, + .moves = {MOVE_AGILITY, MOVE_TAKE_DOWN, MOVE_FIRE_SPIN, MOVE_STOMP}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RAPIDASH, + .moves = {MOVE_FURY_ATTACK, MOVE_FIRE_SPIN, MOVE_STOMP, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VULPIX, + .moves = {MOVE_FLAMETHROWER, MOVE_CONFUSE_RAY, MOVE_QUICK_ATTACK, MOVE_IMPRISON}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NINETALES, + .moves = {MOVE_SAFEGUARD, MOVE_WILL_O_WISP, MOVE_CONFUSE_RAY, MOVE_FIRE_SPIN}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C3E0[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_TANGELA, + .moves = {MOVE_SLAM, MOVE_BIND, MOVE_MEGA_DRAIN, MOVE_INGRAIN}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_GLOOM, + .moves = {MOVE_ACID, MOVE_MOONLIGHT, MOVE_SLEEP_POWDER, MOVE_STUN_SPORE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_MEGA_DRAIN, MOVE_ACID, MOVE_STUN_SPORE, MOVE_AROMATHERAPY}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_IVYSAUR, + .moves = {MOVE_RAZOR_LEAF, MOVE_SWEET_SCENT, MOVE_GROWL, MOVE_LEECH_SEED}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_VENUSAUR, + .moves = {MOVE_RAZOR_LEAF, MOVE_GROWTH, MOVE_SLEEP_POWDER, MOVE_POISON_POWDER}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C430[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RHYHORN, + .moves = {MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_SCARY_FACE, MOVE_STOMP}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDORINA, + .moves = {MOVE_DOUBLE_KICK, MOVE_FURY_SWIPES, MOVE_BITE, MOVE_FLATTER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDOQUEEN, + .moves = {MOVE_BODY_SLAM, MOVE_DOUBLE_KICK, MOVE_BITE, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDORINO, + .moves = {MOVE_HORN_ATTACK, MOVE_POISON_STING, MOVE_FOCUS_ENERGY, MOVE_LEER}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NIDOKING, + .moves = {MOVE_THRASH, MOVE_DOUBLE_KICK, MOVE_POISON_STING, MOVE_PECK}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C480[] = { + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PERSIAN, + .moves = {MOVE_FURY_SWIPES, MOVE_BITE, MOVE_SCREECH, MOVE_FAINT_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_NINETALES, + .moves = {MOVE_FLAMETHROWER, MOVE_WILL_O_WISP, MOVE_CONFUSE_RAY, MOVE_GRUDGE}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RAPIDASH, + .moves = {MOVE_FURY_ATTACK, MOVE_FIRE_SPIN, MOVE_TAKE_DOWN, MOVE_AGILITY}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_PIKACHU, + .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_DOUBLE_TEAM, MOVE_QUICK_ATTACK}, + }, + { + .iv = 100, + .lvl = 42, + .species = SPECIES_RAICHU, + .moves = {MOVE_THUNDER, MOVE_THUNDER_WAVE, MOVE_SLAM, MOVE_DOUBLE_TEAM}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823C4D0[] = { + { + .iv = 250, + .lvl = 52, + .species = SPECIES_DEWGONG, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_HAIL, MOVE_SAFEGUARD}, + }, + { + .iv = 250, + .lvl = 51, + .species = SPECIES_CLOYSTER, + .heldItem = ITEM_NONE, + .moves = {MOVE_SPIKES, MOVE_PROTECT, MOVE_HAIL, MOVE_DIVE}, + }, + { + .iv = 250, + .lvl = 52, + .species = SPECIES_SLOWBRO, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_AMNESIA, MOVE_YAWN}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_JYNX, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_PUNCH, MOVE_DOUBLE_SLAP, MOVE_LOVELY_KISS, MOVE_ATTRACT}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_LAPRAS, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_CONFUSE_RAY, MOVE_ICE_BEAM, MOVE_SURF, MOVE_BODY_SLAM}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823C520[] = { + { + .iv = 250, + .lvl = 51, + .species = SPECIES_ONIX, + .heldItem = ITEM_NONE, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_IRON_TAIL, MOVE_ROAR}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_NONE, + .moves = {MOVE_SKY_UPPERCUT, MOVE_MACH_PUNCH, MOVE_ROCK_TOMB, MOVE_COUNTER}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_NONE, + .moves = {MOVE_MEGA_KICK, MOVE_FORESIGHT, MOVE_BRICK_BREAK, MOVE_FACADE}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_ONIX, + .heldItem = ITEM_NONE, + .moves = {MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_IRON_TAIL, MOVE_SAND_TOMB}, + }, + { + .iv = 250, + .lvl = 56, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_CROSS_CHOP, MOVE_BULK_UP, MOVE_SCARY_FACE, MOVE_ROCK_TOMB}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823C570[] = { + { + .iv = 250, + .lvl = 54, + .species = SPECIES_GENGAR, + .heldItem = ITEM_NONE, + .moves = {MOVE_SHADOW_PUNCH, MOVE_CONFUSE_RAY, MOVE_TOXIC, MOVE_DOUBLE_TEAM}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_GOLBAT, + .heldItem = ITEM_NONE, + .moves = {MOVE_CONFUSE_RAY, MOVE_POISON_FANG, MOVE_AIR_CUTTER, MOVE_BITE}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_HAUNTER, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_CURSE, MOVE_MEAN_LOOK}, + }, + { + .iv = 250, + .lvl = 56, + .species = SPECIES_ARBOK, + .heldItem = ITEM_NONE, + .moves = {MOVE_SLUDGE_BOMB, MOVE_SCREECH, MOVE_IRON_TAIL, MOVE_BITE}, + }, + { + .iv = 250, + .lvl = 58, + .species = SPECIES_GENGAR, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SHADOW_BALL, MOVE_SLUDGE_BOMB, MOVE_HYPNOSIS, MOVE_NIGHTMARE}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823C5C0[] = { + { + .iv = 250, + .lvl = 56, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_DRAGON_RAGE, MOVE_TWISTER, MOVE_BITE}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_DRAGONAIR, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_SAFEGUARD, MOVE_DRAGON_RAGE, MOVE_OUTRAGE}, + }, + { + .iv = 250, + .lvl = 54, + .species = SPECIES_DRAGONAIR, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_SAFEGUARD, MOVE_THUNDER_WAVE, MOVE_OUTRAGE}, + }, + { + .iv = 250, + .lvl = 58, + .species = SPECIES_AERODACTYL, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_ANCIENT_POWER, MOVE_WING_ATTACK, MOVE_SCARY_FACE}, + }, + { + .iv = 250, + .lvl = 60, + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_HYPER_BEAM, MOVE_SAFEGUARD, MOVE_OUTRAGE, MOVE_WING_ATTACK}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C610[] = { + { + .iv = 0, + .lvl = 12, + .species = SPECIES_GEODUDE, + .moves = {MOVE_TACKLE, MOVE_DEFENSE_CURL, MOVE_NONE, MOVE_NONE}, + }, + { + .iv = 0, + .lvl = 14, + .species = SPECIES_ONIX, + .moves = {MOVE_TACKLE, MOVE_BIND, MOVE_ROCK_TOMB, MOVE_NONE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C630[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_STARYU, + .moves = {MOVE_TACKLE, MOVE_HARDEN, MOVE_RECOVER, MOVE_WATER_PULSE}, + }, + { + .iv = 0, + .lvl = 21, + .species = SPECIES_STARMIE, + .moves = {MOVE_SWIFT, MOVE_RECOVER, MOVE_RAPID_SPIN, MOVE_WATER_PULSE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C650[] = { + { + .iv = 0, + .lvl = 21, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SONIC_BOOM, MOVE_TACKLE, MOVE_SCREECH, MOVE_SHOCK_WAVE}, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_PIKACHU, + .moves = {MOVE_QUICK_ATTACK, MOVE_THUNDER_WAVE, MOVE_DOUBLE_TEAM, MOVE_SHOCK_WAVE}, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_RAICHU, + .moves = {MOVE_QUICK_ATTACK, MOVE_THUNDER_WAVE, MOVE_DOUBLE_TEAM, MOVE_SHOCK_WAVE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C680[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VICTREEBEL, + .moves = {MOVE_STUN_SPORE, MOVE_ACID, MOVE_POISON_POWDER, MOVE_GIGA_DRAIN}, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_TANGELA, + .moves = {MOVE_POISON_POWDER, MOVE_CONSTRICT, MOVE_INGRAIN, MOVE_GIGA_DRAIN}, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_SLEEP_POWDER, MOVE_ACID, MOVE_STUN_SPORE, MOVE_GIGA_DRAIN}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C6B0[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_KOFFING, + .moves = {MOVE_SELF_DESTRUCT, MOVE_SLUDGE, MOVE_SMOKESCREEN, MOVE_TOXIC}, + }, + { + .iv = 0, + .lvl = 39, + .species = SPECIES_MUK, + .moves = {MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_ACID_ARMOR, MOVE_TOXIC}, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_KOFFING, + .moves = {MOVE_SELF_DESTRUCT, MOVE_SLUDGE, MOVE_SMOKESCREEN, MOVE_TOXIC}, + }, + { + .iv = 0, + .lvl = 43, + .species = SPECIES_WEEZING, + .moves = {MOVE_TACKLE, MOVE_SLUDGE, MOVE_SMOKESCREEN, MOVE_TOXIC}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C6F0[] = { + { + .iv = 0, + .lvl = 42, + .species = SPECIES_GROWLITHE, + .moves = {MOVE_BITE, MOVE_ROAR, MOVE_TAKE_DOWN, MOVE_FIRE_BLAST}, + }, + { + .iv = 0, + .lvl = 40, + .species = SPECIES_PONYTA, + .moves = {MOVE_STOMP, MOVE_BOUNCE, MOVE_FIRE_SPIN, MOVE_FIRE_BLAST}, + }, + { + .iv = 0, + .lvl = 42, + .species = SPECIES_RAPIDASH, + .moves = {MOVE_STOMP, MOVE_BOUNCE, MOVE_FIRE_SPIN, MOVE_FIRE_BLAST}, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_ARCANINE, + .moves = {MOVE_BITE, MOVE_ROAR, MOVE_TAKE_DOWN, MOVE_FIRE_BLAST}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C730[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_KADABRA, + .moves = {MOVE_PSYBEAM, MOVE_REFLECT, MOVE_FUTURE_SIGHT, MOVE_CALM_MIND}, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_MR_MIME, + .moves = {MOVE_BARRIER, MOVE_PSYBEAM, MOVE_BATON_PASS, MOVE_CALM_MIND}, + }, + { + .iv = 0, + .lvl = 38, + .species = SPECIES_VENOMOTH, + .moves = {MOVE_PSYBEAM, MOVE_GUST, MOVE_LEECH_LIFE, MOVE_SUPERSONIC}, + }, + { + .iv = 0, + .lvl = 43, + .species = SPECIES_ALAKAZAM, + .moves = {MOVE_PSYCHIC, MOVE_RECOVER, MOVE_FUTURE_SIGHT, MOVE_CALM_MIND}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C770[] = { + { + .iv = 0, + .lvl = 18, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 18, + .species = SPECIES_GROWLITHE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C780[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C790[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C798[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C7A0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_PONYTA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C7B0[] = { + { + .iv = 50, + .lvl = 19, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_RATICATE, + }, + { + .iv = 50, + .lvl = 18, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C7D0[] = { + { + .iv = 50, + .lvl = 19, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_RATICATE, + }, + { + .iv = 50, + .lvl = 18, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_IVYSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C7F0[] = { + { + .iv = 50, + .lvl = 19, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 50, + .lvl = 16, + .species = SPECIES_RATICATE, + }, + { + .iv = 50, + .lvl = 18, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C810[] = { + { + .iv = 100, + .lvl = 25, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 100, + .lvl = 23, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_EXEGGCUTE, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 25, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C838[] = { + { + .iv = 100, + .lvl = 25, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 100, + .lvl = 23, + .species = SPECIES_GYARADOS, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 25, + .species = SPECIES_IVYSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C860[] = { + { + .iv = 100, + .lvl = 25, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 100, + .lvl = 23, + .species = SPECIES_EXEGGCUTE, + }, + { + .iv = 100, + .lvl = 22, + .species = SPECIES_GYARADOS, + }, + { + .iv = 100, + .lvl = 20, + .species = SPECIES_KADABRA, + }, + { + .iv = 100, + .lvl = 25, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C888[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_EXEGGCUTE, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_ALAKAZAM, + }, + { + .iv = 150, + .lvl = 40, + .species = SPECIES_BLASTOISE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C8B0[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GYARADOS, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_ALAKAZAM, + }, + { + .iv = 150, + .lvl = 40, + .species = SPECIES_VENUSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823C8D8[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_EXEGGCUTE, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_GYARADOS, + }, + { + .iv = 100, + .lvl = 35, + .species = SPECIES_ALAKAZAM, + }, + { + .iv = 150, + .lvl = 40, + .species = SPECIES_CHARIZARD, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C900[] = { + { + .iv = 150, + .lvl = 47, + .species = SPECIES_PIDGEOT, + .moves = {MOVE_FEATHER_DANCE, MOVE_WING_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_FURY_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_GROWLITHE, + .moves = {MOVE_FLAME_WHEEL, MOVE_TAKE_DOWN, MOVE_LEER, MOVE_AGILITY}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_EXEGGCUTE, + .moves = {MOVE_SOLAR_BEAM, MOVE_SLEEP_POWDER, MOVE_POISON_POWDER, MOVE_STUN_SPORE}, + }, + { + .iv = 150, + .lvl = 47, + .species = SPECIES_ALAKAZAM, + .moves = {MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_FUTURE_SIGHT, MOVE_DISABLE}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_BLASTOISE, + .moves = {MOVE_WATER_GUN, MOVE_RAIN_DANCE, MOVE_BITE, MOVE_RAPID_SPIN}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C960[] = { + { + .iv = 150, + .lvl = 47, + .species = SPECIES_PIDGEOT, + .moves = {MOVE_FEATHER_DANCE, MOVE_WING_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_FURY_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_GYARADOS, + .moves = {MOVE_HYDRO_PUMP, MOVE_TWISTER, MOVE_LEER, MOVE_RAIN_DANCE}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_GROWLITHE, + .moves = {MOVE_FLAME_WHEEL, MOVE_TAKE_DOWN, MOVE_LEER, MOVE_AGILITY}, + }, + { + .iv = 150, + .lvl = 47, + .species = SPECIES_ALAKAZAM, + .moves = {MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_FUTURE_SIGHT, MOVE_DISABLE}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_VENUSAUR, + .moves = {MOVE_RAZOR_LEAF, MOVE_SWEET_SCENT, MOVE_GROWTH, MOVE_SYNTHESIS}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823C9C0[] = { + { + .iv = 150, + .lvl = 47, + .species = SPECIES_PIDGEOT, + .moves = {MOVE_FEATHER_DANCE, MOVE_WING_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_RHYHORN, + .moves = {MOVE_TAKE_DOWN, MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_FURY_ATTACK}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_EXEGGCUTE, + .moves = {MOVE_SOLAR_BEAM, MOVE_SLEEP_POWDER, MOVE_POISON_POWDER, MOVE_STUN_SPORE}, + }, + { + .iv = 150, + .lvl = 45, + .species = SPECIES_GYARADOS, + .moves = {MOVE_HYDRO_PUMP, MOVE_TWISTER, MOVE_LEER, MOVE_RAIN_DANCE}, + }, + { + .iv = 150, + .lvl = 47, + .species = SPECIES_ALAKAZAM, + .moves = {MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_FUTURE_SIGHT, MOVE_DISABLE}, + }, + { + .iv = 250, + .lvl = 53, + .species = SPECIES_CHARIZARD, + .moves = {MOVE_FLAMETHROWER, MOVE_WING_ATTACK, MOVE_SLASH, MOVE_SCARY_FACE}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823CA20[] = { + { + .iv = 255, + .lvl = 59, + .species = SPECIES_PIDGEOT, + .heldItem = ITEM_NONE, + .moves = {MOVE_AERIAL_ACE, MOVE_FEATHER_DANCE, MOVE_SAND_ATTACK, MOVE_WHIRLWIND}, + }, + { + .iv = 255, + .lvl = 57, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_FUTURE_SIGHT, MOVE_RECOVER, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_RHYDON, + .heldItem = ITEM_NONE, + .moves = {MOVE_TAKE_DOWN, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SCARY_FACE}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_ARCANINE, + .heldItem = ITEM_NONE, + .moves = {MOVE_EXTREME_SPEED, MOVE_FLAMETHROWER, MOVE_ROAR, MOVE_BITE}, + }, + { + .iv = 255, + .lvl = 61, + .species = SPECIES_EXEGGUTOR, + .heldItem = ITEM_NONE, + .moves = {MOVE_GIGA_DRAIN, MOVE_EGG_BOMB, MOVE_SLEEP_POWDER, MOVE_LIGHT_SCREEN}, + }, + { + .iv = 255, + .lvl = 63, + .species = SPECIES_BLASTOISE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_HYDRO_PUMP, MOVE_RAIN_DANCE, MOVE_SKULL_BASH, MOVE_BITE}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823CA80[] = { + { + .iv = 255, + .lvl = 59, + .species = SPECIES_PIDGEOT, + .heldItem = ITEM_NONE, + .moves = {MOVE_AERIAL_ACE, MOVE_FEATHER_DANCE, MOVE_SAND_ATTACK, MOVE_WHIRLWIND}, + }, + { + .iv = 255, + .lvl = 57, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_FUTURE_SIGHT, MOVE_RECOVER, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_RHYDON, + .heldItem = ITEM_NONE, + .moves = {MOVE_TAKE_DOWN, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SCARY_FACE}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYDRO_PUMP, MOVE_DRAGON_RAGE, MOVE_BITE, MOVE_THRASH}, + }, + { + .iv = 255, + .lvl = 61, + .species = SPECIES_ARCANINE, + .heldItem = ITEM_NONE, + .moves = {MOVE_EXTREME_SPEED, MOVE_FLAMETHROWER, MOVE_ROAR, MOVE_BITE}, + }, + { + .iv = 255, + .lvl = 63, + .species = SPECIES_VENUSAUR, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SOLAR_BEAM, MOVE_SYNTHESIS, MOVE_SUNNY_DAY, MOVE_GROWTH}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823CAE0[] = { + { + .iv = 255, + .lvl = 59, + .species = SPECIES_PIDGEOT, + .heldItem = ITEM_NONE, + .moves = {MOVE_AERIAL_ACE, MOVE_FEATHER_DANCE, MOVE_SAND_ATTACK, MOVE_WHIRLWIND}, + }, + { + .iv = 255, + .lvl = 57, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_FUTURE_SIGHT, MOVE_RECOVER, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_RHYDON, + .heldItem = ITEM_NONE, + .moves = {MOVE_TAKE_DOWN, MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SCARY_FACE}, + }, + { + .iv = 255, + .lvl = 59, + .species = SPECIES_EXEGGUTOR, + .heldItem = ITEM_NONE, + .moves = {MOVE_GIGA_DRAIN, MOVE_EGG_BOMB, MOVE_SLEEP_POWDER, MOVE_LIGHT_SCREEN}, + }, + { + .iv = 255, + .lvl = 61, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYDRO_PUMP, MOVE_DRAGON_RAGE, MOVE_BITE, MOVE_THRASH}, + }, + { + .iv = 255, + .lvl = 63, + .species = SPECIES_CHARIZARD, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_FIRE_BLAST, MOVE_AERIAL_ACE, MOVE_SLASH, MOVE_FIRE_SPIN}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB40[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB48[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB50[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB58[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB60[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB70[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB78[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB80[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB88[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB90[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CB98[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBB0[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBB8[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBC0[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBC8[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBD0[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBD8[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBE0[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CBE8[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC00[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC08[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GASTLY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC10[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC20[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC28[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GASTLY, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_HAUNTER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC40[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC50[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_HORSEA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC68[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CC90[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_POLIWAG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CCA0[] = { + { + .iv = 0, + .lvl = 27, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 27, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823CCC0[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_KOFFING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_WEEZING, + .moves = {MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CCF0[] = { + { + .iv = 0, + .lvl = 14, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 14, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD00[] = { + { + .iv = 0, + .lvl = 31, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 31, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD10[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_HORSEA, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SEEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD28[] = { + { + .iv = 0, + .lvl = 20, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 20, + .species = SPECIES_PIDGEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD40[] = { + { + .iv = 0, + .lvl = 19, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 19, + .species = SPECIES_BELLSPROUT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD60[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD70[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_NIDORINO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD80[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_TANGELA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CD98[] = { + { + .iv = 0, + .lvl = 28, + .species = SPECIES_GLOOM, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_ODDISH, + }, + { + .iv = 0, + .lvl = 28, + .species = SPECIES_ODDISH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CDB0[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_RAICHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CDC0[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CDC8[] = { + { + .iv = 0, + .lvl = 23, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CDD0[] = { + { + .iv = 0, + .lvl = 17, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 0, + .lvl = 17, + .species = SPECIES_PONYTA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CDE0[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_JIGGLYPUFF, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823CDF0[] = { + { + .iv = 100, + .lvl = 45, + .species = SPECIES_NIDOQUEEN, + .moves = {MOVE_SUPERPOWER, MOVE_BODY_SLAM, MOVE_DOUBLE_KICK, MOVE_POISON_STING}, + }, + { + .iv = 100, + .lvl = 45, + .species = SPECIES_NIDOKING, + .moves = {MOVE_MEGAHORN, MOVE_THRASH, MOVE_DOUBLE_KICK, MOVE_POISON_STING}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE10[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE20[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_CHARMANDER, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_SQUIRTLE, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823CE30[] = { + { + .iv = 50, + .lvl = 29, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 29, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE40[] = { + { + .iv = 0, + .lvl = 29, + .species = SPECIES_RAPIDASH, + }, + { + .iv = 0, + .lvl = 29, + .species = SPECIES_NINETALES, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE50[] = { + { + .iv = 0, + .lvl = 30, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 30, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE60[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_SEADRA, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE70[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE78[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE80[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE88[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE90[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CE98[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CEA0[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_RATICATE, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CEB0[] = { + { + .iv = 120, + .lvl = 48, + .species = SPECIES_RATICATE, + }, + { + .iv = 120, + .lvl = 48, + .species = SPECIES_ARBOK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CEC0[] = { + { + .iv = 20, + .lvl = 20, + .species = SPECIES_EKANS, + }, + { + .iv = 20, + .lvl = 20, + .species = SPECIES_SANDSHREW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CED0[] = { + { + .iv = 20, + .lvl = 20, + .species = SPECIES_PIDGEY, + }, + { + .iv = 20, + .lvl = 20, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CEE0[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_NIDORINA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CEF0[] = { + { + .iv = 20, + .lvl = 19, + .species = SPECIES_RATICATE, + }, + { + .iv = 20, + .lvl = 19, + .species = SPECIES_EKANS, + }, + { + .iv = 20, + .lvl = 19, + .species = SPECIES_ZUBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF08[] = { + { + .iv = 60, + .lvl = 27, + .species = SPECIES_RATICATE, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_EKANS, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_GOLBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF20[] = { + { + .iv = 120, + .lvl = 52, + .species = SPECIES_RATICATE, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_ARBOK, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_GOLBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF38[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_ARBOK, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_SANDSHREW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF48[] = { + { + .iv = 20, + .lvl = 20, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 20, + .lvl = 20, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF58[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF68[] = { + { + .iv = 80, + .lvl = 48, + .species = SPECIES_ARBOK, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF78[] = { + { + .iv = 40, + .lvl = 25, + .species = SPECIES_MACHOKE, + }, + { + .iv = 40, + .lvl = 25, + .species = SPECIES_GRAVELER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF88[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF90[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CF98[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CFA0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CFA8[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823CFB0[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_HOUNDOUR, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_HOUNDOUR, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823CFC0[] = { + { + .iv = 100, + .lvl = 48, + .species = SPECIES_NATU, + .moves = {MOVE_NIGHT_SHADE, MOVE_CONFUSE_RAY, MOVE_FUTURE_SIGHT, MOVE_WISH}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_SLOWBRO, + .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_AMNESIA, MOVE_YAWN}, + }, + { + .iv = 100, + .lvl = 49, + .species = SPECIES_KADABRA, + .moves = {MOVE_PSYCHIC, MOVE_FUTURE_SIGHT, MOVE_RECOVER, MOVE_REFLECT}, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823CFF0[] = { + { + .iv = 50, + .lvl = 37, + .species = SPECIES_MANKEY, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 37, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D000[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_POLIWAG, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_POLIWAG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D018[] = { + { + .iv = 30, + .lvl = 48, + .species = SPECIES_PIKACHU, + }, + { + .iv = 30, + .lvl = 48, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 30, + .lvl = 48, + .species = SPECIES_MARILL, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D030[] = { + { + .iv = 100, + .lvl = 51, + .species = SPECIES_WEEPINBELL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_SWEET_SCENT, MOVE_WRAP}, + }, + { + .iv = 100, + .lvl = 51, + .species = SPECIES_VICTREEBEL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_SLEEP_POWDER, MOVE_STUN_SPORE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D050[] = { + { + .iv = 100, + .lvl = 51, + .species = SPECIES_GLOOM, + .moves = {MOVE_PETAL_DANCE, MOVE_ACID, MOVE_SWEET_SCENT, MOVE_POISON_POWDER}, + }, + { + .iv = 100, + .lvl = 51, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_PETAL_DANCE, MOVE_MOONLIGHT, MOVE_ACID, MOVE_STUN_SPORE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D070[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_WEEPINBELL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D080[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRAVELER, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRAVELER, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D098[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_HOPPIP, + .heldItem = ITEM_STARDUST, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_SKIPLOOM, + .heldItem = ITEM_STARDUST, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D0A8[] = { + { + .iv = 50, + .lvl = 50, + .species = SPECIES_SMEARGLE, + .moves = {MOVE_DYNAMIC_PUNCH, MOVE_DIZZY_PUNCH, MOVE_FOCUS_PUNCH, MOVE_MEGA_PUNCH}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D0B8[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_KOFFING, + .moves = {MOVE_HAZE, MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_TACKLE}, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_GRIMER, + .moves = {MOVE_ACID_ARMOR, MOVE_SCREECH, MOVE_MINIMIZE, MOVE_SLUDGE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D0D8[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_KOFFING, + .moves = {MOVE_HAZE, MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_TACKLE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D0E8[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_GRIMER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D0F0[] = { + { + .iv = 0, + .lvl = 5, + .species = SPECIES_EKANS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D0F8[] = { + { + .iv = 0, + .lvl = 7, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 8, + .species = SPECIES_CATERPIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D108[] = { + { + .iv = 0, + .lvl = 7, + .species = SPECIES_METAPOD, + }, + { + .iv = 0, + .lvl = 7, + .species = SPECIES_CATERPIE, + }, + { + .iv = 0, + .lvl = 7, + .species = SPECIES_METAPOD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D120[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_JIGGLYPUFF, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D130[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_EKANS, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D148[] = { + { + .iv = 0, + .lvl = 22, + .species = SPECIES_KOFFING, + .moves = {MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS}, + }, + { + .iv = 0, + .lvl = 22, + .species = SPECIES_KOFFING, + .moves = {MOVE_SLUDGE, MOVE_SMOG, MOVE_TACKLE, MOVE_POISON_GAS}, + }, + { + .iv = 0, + .lvl = 23, + .species = SPECIES_GRIMER, + .moves = {MOVE_MINIMIZE, MOVE_SLUDGE, MOVE_DISABLE, MOVE_POUND}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D178[] = { + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 24, + .species = SPECIES_GRIMER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D188[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_CUBONE, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_MAROWAK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D198[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SANDSHREW, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D1B8[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 38, + .species = SPECIES_ZUBAT, + }, + { + .iv = 0, + .lvl = 38, + .species = SPECIES_GOLBAT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D1D0[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MUK, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GOLBAT, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D1E8[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MACHOP, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D200[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_HYPNO, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_HYPNO, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D210[] = { + { + .iv = 150, + .lvl = 52, + .species = SPECIES_MUK, + .moves = {MOVE_SLUDGE_BOMB, MOVE_SCREECH, MOVE_MINIMIZE, MOVE_ROCK_TOMB}, + }, + { + .iv = 150, + .lvl = 53, + .species = SPECIES_ARBOK, + .moves = {MOVE_SLUDGE_BOMB, MOVE_BITE, MOVE_EARTHQUAKE, MOVE_IRON_TAIL}, + }, + { + .iv = 150, + .lvl = 54, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN, MOVE_SLEEP_POWDER, MOVE_STUN_SPORE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D240[] = { + { + .iv = 200, + .lvl = 53, + .species = SPECIES_GOLBAT, + .moves = {MOVE_CONFUSE_RAY, MOVE_SLUDGE_BOMB, MOVE_AIR_CUTTER, MOVE_SHADOW_BALL}, + }, + { + .iv = 200, + .lvl = 54, + .species = SPECIES_WEEZING, + .moves = {MOVE_SLUDGE_BOMB, MOVE_THUNDERBOLT, MOVE_EXPLOSION, MOVE_SHADOW_BALL}, + }, + { + .iv = 200, + .lvl = 55, + .species = SPECIES_HOUNDOOM, + .moves = {MOVE_FLAMETHROWER, MOVE_CRUNCH, MOVE_IRON_TAIL, MOVE_SHADOW_BALL}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D270[] = { + { + .iv = 0, + .lvl = 46, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SWIFT, MOVE_SCREECH, MOVE_SPARK, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_ELECTRODE, + .moves = {MOVE_SPARK, MOVE_SONIC_BOOM, MOVE_SCREECH, MOVE_CHARGE}, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_MAGNEMITE, + .moves = {MOVE_SCREECH, MOVE_SWIFT, MOVE_SPARK, MOVE_THUNDER_WAVE}, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_MAGNETON, + .moves = {MOVE_TRI_ATTACK, MOVE_SPARK, MOVE_THUNDER_WAVE, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_PORYGON, + .moves = {MOVE_TRI_ATTACK, MOVE_CONVERSION, MOVE_RECOVER, MOVE_PSYBEAM}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D2C0[] = { + { + .iv = 0, + .lvl = 36, + .species = SPECIES_SEEL, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_SEEL, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_DEWGONG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D2D8[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_SEADRA, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D2E8[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_PSYDUCK, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_PSYDUCK, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_GOLDUCK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D300[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D308[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SHELLDER, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_CLOYSTER, + }, + { + .iv = 0, + .lvl = 38, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D320[] = { + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 33, + .species = SPECIES_GOLDEEN, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SEAKING, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D348[] = { + { + .iv = 50, + .lvl = 38, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 38, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D358[] = { + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D368[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_MACHOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 100, + .lvl = 37, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D378[] = { + { + .iv = 0, + .lvl = 36, + .species = SPECIES_NIDORINO, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D390[] = { + { + .iv = 0, + .lvl = 35, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_MEOWTH, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 35, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D3B0[] = { + { + .iv = 50, + .lvl = 39, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 39, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D3C0[] = { + { + .iv = 0, + .lvl = 36, + .species = SPECIES_BULBASAUR, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_IVYSAUR, + }, + { + .iv = 0, + .lvl = 36, + .species = SPECIES_IVYSAUR, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D3D8[] = { + { + .iv = 0, + .lvl = 34, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_STARYU, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_KRABBY, + }, + { + .iv = 0, + .lvl = 34, + .species = SPECIES_KRABBY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D3F8[] = { + { + .iv = 0, + .lvl = 37, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 0, + .lvl = 37, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D408[] = { + { + .iv = 0, + .lvl = 38, + .species = SPECIES_KINGLER, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D410[] = { + { + .iv = 50, + .lvl = 50, + .species = SPECIES_SMEARGLE, + .moves = {MOVE_FLY, MOVE_DIG, MOVE_DIVE, MOVE_BOUNCE}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D420[] = { + { + .iv = 50, + .lvl = 50, + .species = SPECIES_SMEARGLE, + .moves = {MOVE_CROSS_CHOP, MOVE_MEGAHORN, MOVE_DOUBLE_EDGE, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D430[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_MAREEP, + .heldItem = ITEM_STARDUST, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MAREEP, + .heldItem = ITEM_STARDUST, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_FLAAFFY, + .heldItem = ITEM_NUGGET, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D448[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_RATICATE, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D458[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_TENTACOOL, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_TENTACRUEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D470[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_RATTATA, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRIMER, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D488[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_KOFFING, + .moves = {MOVE_MEMENTO, MOVE_HAZE, MOVE_SMOKESCREEN, MOVE_SLUDGE}, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_WEEZING, + .moves = {MOVE_HAZE, MOVE_SMOKESCREEN, MOVE_SLUDGE, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D4A8[] = { + { + .iv = 50, + .lvl = 48, + .species = SPECIES_EKANS, + }, + { + .iv = 50, + .lvl = 48, + .species = SPECIES_GLOOM, + }, + { + .iv = 50, + .lvl = 48, + .species = SPECIES_GLOOM, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D4C0[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_PIDGEY, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D4D0[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_SPEAROW, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D4E0[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_HOOTHOOT, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_NOCTOWL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D4F0[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_QWILFISH, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_QWILFISH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D500[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_KINGLER, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D510[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_MARILL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D518[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D528[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_SUNKERN, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_SUNFLORA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D538[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_GYARADOS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D540[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_CHINCHOU, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_LANTURN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D550[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_PIKACHU, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D560[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D570[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_GOLEM, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D578[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_MACHOKE, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D588[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_SUDOWOODO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D590[] = { + { + .iv = 30, + .lvl = 49, + .species = SPECIES_RHYHORN, + }, + { + .iv = 30, + .lvl = 49, + .species = SPECIES_KANGASKHAN, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D5A0[] = { + { + .iv = 100, + .lvl = 52, + .species = SPECIES_GIRAFARIG, + .moves = {MOVE_CRUNCH, MOVE_PSYBEAM, MOVE_ODOR_SLEUTH, MOVE_AGILITY}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D5B0[] = { + { + .iv = 100, + .lvl = 48, + .species = SPECIES_NATU, + .moves = {MOVE_NIGHT_SHADE, MOVE_CONFUSE_RAY, MOVE_WISH, MOVE_FUTURE_SIGHT}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_DROWZEE, + .moves = {MOVE_PSYCHIC, MOVE_DISABLE, MOVE_PSYCH_UP, MOVE_FUTURE_SIGHT}, + }, + { + .iv = 100, + .lvl = 50, + .species = SPECIES_HYPNO, + .moves = {MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_PSYCH_UP, MOVE_FUTURE_SIGHT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D5E0[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_BELLOSSOM, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_BELLOSSOM, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D5F0[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_GOLDUCK, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_PSYDUCK, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D600[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SWIFT, MOVE_LIGHT_SCREEN, MOVE_SPARK, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_PINECO, + .moves = {MOVE_SPIKES, MOVE_BIDE, MOVE_RAPID_SPIN, MOVE_TAKE_DOWN}, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_VOLTORB, + .moves = {MOVE_SWIFT, MOVE_LIGHT_SCREEN, MOVE_SPARK, MOVE_SONIC_BOOM}, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_PINECO, + .moves = {MOVE_SPIKES, MOVE_BIDE, MOVE_RAPID_SPIN, MOVE_EXPLOSION}, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D640[] = { + { + .iv = 50, + .lvl = 48, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 48, + .species = SPECIES_HITMONTOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 48, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823D658[] = { + { + .iv = 50, + .lvl = 38, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 50, + .lvl = 38, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D668[] = { + { + .iv = 40, + .lvl = 48, + .species = SPECIES_SANDSLASH, + }, + { + .iv = 40, + .lvl = 48, + .species = SPECIES_LICKITUNG, + }, + { + .iv = 40, + .lvl = 49, + .species = SPECIES_URSARING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D680[] = { + { + .iv = 90, + .lvl = 33, + .species = SPECIES_RHYHORN, + }, + { + .iv = 90, + .lvl = 33, + .species = SPECIES_LICKITUNG, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D690[] = { + { + .iv = 100, + .lvl = 37, + .species = SPECIES_EXEGGCUTE, + .moves = {MOVE_SLEEP_POWDER, MOVE_POISON_POWDER, MOVE_STUN_SPORE, MOVE_CONFUSION}, + }, + { + .iv = 100, + .lvl = 40, + .species = SPECIES_EXEGGUTOR, + .moves = {MOVE_EGG_BOMB, MOVE_STOMP, MOVE_CONFUSION, MOVE_HYPNOSIS}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D6B0[] = { + { + .iv = 100, + .lvl = 49, + .species = SPECIES_TANGELA, + .moves = {MOVE_SLAM, MOVE_MEGA_DRAIN, MOVE_BIND, MOVE_INGRAIN}, + }, + { + .iv = 100, + .lvl = 49, + .species = SPECIES_EXEGGCUTE, + .moves = {MOVE_CONFUSION, MOVE_POISON_POWDER, MOVE_BARRAGE, MOVE_REFLECT}, + }, + { + .iv = 100, + .lvl = 49, + .species = SPECIES_EXEGGUTOR, + .moves = {MOVE_CONFUSION, MOVE_EGG_BOMB, MOVE_SLEEP_POWDER, MOVE_STOMP}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D6E0[] = { + { + .iv = 100, + .lvl = 38, + .species = SPECIES_BELLSPROUT, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GLOOM, + }, + { + .iv = 100, + .lvl = 38, + .species = SPECIES_GLOOM, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D6F8[] = { + { + .iv = 100, + .lvl = 52, + .species = SPECIES_CHANSEY, + .moves = {MOVE_EGG_BOMB, MOVE_DEFENSE_CURL, MOVE_MINIMIZE, MOVE_SOFT_BOILED}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D708[] = { + { + .iv = 100, + .lvl = 47, + .species = SPECIES_RHYDON, + .moves = {MOVE_TAKE_DOWN, MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_SCARY_FACE}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_SLOWBRO, + .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_AMNESIA, MOVE_DISABLE}, + }, + { + .iv = 100, + .lvl = 47, + .species = SPECIES_KANGASKHAN, + .moves = {MOVE_DIZZY_PUNCH, MOVE_BITE, MOVE_ENDURE, MOVE_REVERSAL}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_MACHOKE, + .moves = {MOVE_CROSS_CHOP, MOVE_VITAL_THROW, MOVE_REVENGE, MOVE_SEISMIC_TOSS}, + }, + { + .iv = 100, + .lvl = 50, + .species = SPECIES_URSARING, + .moves = {MOVE_SLASH, MOVE_FAINT_ATTACK, MOVE_SNORE, MOVE_REST}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D758[] = { + { + .iv = 100, + .lvl = 47, + .species = SPECIES_PERSIAN, + .moves = {MOVE_SLASH, MOVE_SCREECH, MOVE_FAINT_ATTACK, MOVE_BITE}, + }, + { + .iv = 100, + .lvl = 47, + .species = SPECIES_DEWGONG, + .moves = {MOVE_ICE_BEAM, MOVE_TAKE_DOWN, MOVE_ICY_WIND, MOVE_GROWL}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_NINETALES, + .moves = {MOVE_FLAMETHROWER, MOVE_CONFUSE_RAY, MOVE_WILL_O_WISP, MOVE_GRUDGE}, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_RAPIDASH, + .moves = {MOVE_BOUNCE, MOVE_AGILITY, MOVE_FIRE_SPIN, MOVE_TAKE_DOWN}, + }, + { + .iv = 100, + .lvl = 50, + .species = SPECIES_GIRAFARIG, + .moves = {MOVE_CRUNCH, MOVE_PSYBEAM, MOVE_STOMP, MOVE_ODOR_SLEUTH}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D7A8[] = { + { + .iv = 100, + .lvl = 52, + .species = SPECIES_MILTANK, + .moves = {MOVE_BODY_SLAM, MOVE_MILK_DRINK, MOVE_GROWL, MOVE_DEFENSE_CURL}, + }, + { + .iv = 100, + .lvl = 52, + .species = SPECIES_TAUROS, + .moves = {MOVE_THRASH, MOVE_HORN_ATTACK, MOVE_PURSUIT, MOVE_SWAGGER}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D7C8[] = { + { + .iv = 0, + .lvl = 50, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D7D0[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GEODUDE, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_BLAST, MOVE_ROLLOUT, MOVE_SELF_DESTRUCT}, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRAVELER, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_BLAST, MOVE_ROCK_THROW, MOVE_SELF_DESTRUCT}, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRAVELER, + .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_BLAST, MOVE_ROCK_THROW, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823D800[] = { + { + .iv = 50, + .lvl = 50, + .species = SPECIES_SMEARGLE, + .moves = {MOVE_FAKE_OUT, MOVE_EXTREME_SPEED, MOVE_PROTECT, MOVE_QUICK_ATTACK}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D810[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_MAROWAK, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_GOLDUCK, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823D820[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_PERSIAN, + .heldItem = ITEM_NUGGET, + .moves = {MOVE_PAY_DAY, MOVE_BITE, MOVE_TAUNT, MOVE_TORMENT}, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_PERSIAN, + .heldItem = ITEM_NUGGET, + .moves = {MOVE_PAY_DAY, MOVE_SCRATCH, MOVE_TORMENT, MOVE_TAUNT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D840[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_GRAVELER, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_MAROWAK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D858[] = { + { + .iv = 100, + .lvl = 48, + .species = SPECIES_NATU, + }, + { + .iv = 100, + .lvl = 48, + .species = SPECIES_NATU, + }, + { + .iv = 100, + .lvl = 49, + .species = SPECIES_XATU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D870[] = { + { + .iv = 30, + .lvl = 50, + .species = SPECIES_CHANSEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D878[] = { + { + .iv = 30, + .lvl = 48, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 30, + .lvl = 48, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 30, + .lvl = 48, + .species = SPECIES_CLEFABLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D890[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_HERACROSS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D898[] = { + { + .iv = 0, + .lvl = 45, + .species = SPECIES_YANMA, + }, + { + .iv = 0, + .lvl = 45, + .species = SPECIES_BEEDRILL, + }, + { + .iv = 0, + .lvl = 46, + .species = SPECIES_YANMA, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_BEEDRILL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D8B8[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_VENONAT, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_VENOMOTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D8C8[] = { + { + .iv = 0, + .lvl = 47, + .species = SPECIES_WEEPINBELL, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_WEEPINBELL, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_VICTREEBEL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D8E0[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_FARFETCHD, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_FARFETCHD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D8F0[] = { + { + .iv = 0, + .lvl = 46, + .species = SPECIES_HOPPIP, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_HOPPIP, + }, + { + .iv = 0, + .lvl = 47, + .species = SPECIES_SKIPLOOM, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_SKIPLOOM, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D910[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_SNUBBULL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D918[] = { + { + .iv = 0, + .lvl = 49, + .species = SPECIES_PINSIR, + }, + { + .iv = 0, + .lvl = 50, + .species = SPECIES_HERACROSS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D928[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_PARAS, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_PARAS, + }, + { + .iv = 0, + .lvl = 49, + .species = SPECIES_PARASECT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D940[] = { + { + .iv = 0, + .lvl = 48, + .species = SPECIES_SANDSLASH, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_ONIX, + }, + { + .iv = 0, + .lvl = 48, + .species = SPECIES_SANDSLASH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D958[] = { + { + .iv = 20, + .lvl = 21, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 20, + .lvl = 21, + .species = SPECIES_NIDORAN_F, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D968[] = { + { + .iv = 60, + .lvl = 29, + .species = SPECIES_NIDORINO, + }, + { + .iv = 60, + .lvl = 29, + .species = SPECIES_NIDORINA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D978[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_NIDORINO, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_NIDORINA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D988[] = { + { + .iv = 20, + .lvl = 22, + .species = SPECIES_SQUIRTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D990[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D998[] = { + { + .iv = 120, + .lvl = 55, + .species = SPECIES_WARTORTLE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D9A0[] = { + { + .iv = 20, + .lvl = 21, + .species = SPECIES_SPEAROW, + }, + { + .iv = 20, + .lvl = 21, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D9B0[] = { + { + .iv = 60, + .lvl = 29, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 29, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D9C0[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_FEAROW, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D9D0[] = { + { + .iv = 20, + .lvl = 21, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 20, + .lvl = 21, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 20, + .lvl = 18, + .species = SPECIES_PIDGEY, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823D9E8[] = { + { + .iv = 60, + .lvl = 29, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 29, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 26, + .species = SPECIES_PIDGEOTTO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA00[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 80, + .lvl = 50, + .species = SPECIES_PIDGEOT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA18[] = { + { + .iv = 40, + .lvl = 22, + .species = SPECIES_RATTATA, + }, + { + .iv = 40, + .lvl = 22, + .species = SPECIES_RATICATE, + }, + { + .iv = 40, + .lvl = 22, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA30[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_RATICATE, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_RATICATE, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_RATICATE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA48[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MAGNETON, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MAGNETON, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MAGNETON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA60[] = { + { + .iv = 60, + .lvl = 29, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 60, + .lvl = 29, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA70[] = { + { + .iv = 40, + .lvl = 24, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 40, + .lvl = 24, + .species = SPECIES_CHARMANDER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA80[] = { + { + .iv = 60, + .lvl = 29, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 60, + .lvl = 29, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DA90[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_ARCANINE, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_CHARMELEON, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAA0[] = { + { + .iv = 40, + .lvl = 25, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAA8[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAB0[] = { + { + .iv = 120, + .lvl = 55, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAB8[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_MACHOKE, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_ONIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAC8[] = { + { + .iv = 150, + .lvl = 54, + .species = SPECIES_RHYDON, + }, + { + .iv = 150, + .lvl = 54, + .species = SPECIES_LICKITUNG, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAD8[] = { + { + .iv = 90, + .lvl = 29, + .species = SPECIES_MAROWAK, + }, + { + .iv = 90, + .lvl = 29, + .species = SPECIES_SLOWBRO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAE8[] = { + { + .iv = 150, + .lvl = 54, + .species = SPECIES_MAROWAK, + }, + { + .iv = 150, + .lvl = 54, + .species = SPECIES_SLOWBRO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DAF8[] = { + { + .iv = 60, + .lvl = 31, + .species = SPECIES_ONIX, + }, + { + .iv = 60, + .lvl = 31, + .species = SPECIES_GRAVELER, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB08[] = { + { + .iv = 40, + .lvl = 22, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 40, + .lvl = 22, + .species = SPECIES_RATICATE, + }, + { + .iv = 40, + .lvl = 23, + .species = SPECIES_NIDORAN_M, + }, + { + .iv = 40, + .lvl = 21, + .species = SPECIES_MEOWTH, + }, + { + .iv = 40, + .lvl = 22, + .species = SPECIES_PIKACHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB30[] = { + { + .iv = 80, + .lvl = 46, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_RATICATE, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_NIDORINO, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PERSIAN, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_RAICHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB58[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MUK, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MUK, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB70[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_GROWLITHE, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_VULPIX, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB80[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_MUK, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DB90[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_CLOYSTER, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_SEAKING, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DBB0[] = { + { + .iv = 60, + .lvl = 33, + .species = SPECIES_ELECTRODE, + }, + { + .iv = 60, + .lvl = 33, + .species = SPECIES_ELECTRODE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DBC0[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DBD0[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DBF0[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DC10[] = { + { + .iv = 60, + .lvl = 27, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_MEOWTH, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_RATICATE, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_PIKACHU, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_MEOWTH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DC38[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PERSIAN, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_RATICATE, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PIKACHU, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DC60[] = { + { + .iv = 120, + .lvl = 52, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_PERSIAN, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_RATICATE, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_RAICHU, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_PERSIAN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DC88[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_KOFFING, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_KOFFING, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MUK, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_WEEZING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DCA8[] = { + { + .iv = 60, + .lvl = 32, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 32, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DCB8[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DCC8[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_DODUO, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DCE0[] = { + { + .iv = 80, + .lvl = 48, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_DODRIO, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DCF8[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_PIDGEOT, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_WIGGLYTUFF, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD08[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_DODRIO, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_DODRIO, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_DODUO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD20[] = { + { + .iv = 80, + .lvl = 48, + .species = SPECIES_DODRIO, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_DODRIO, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_DODRIO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD38[] = { + { + .iv = 60, + .lvl = 32, + .species = SPECIES_PIKACHU, + }, + { + .iv = 60, + .lvl = 32, + .species = SPECIES_RAICHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD48[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_PIKACHU, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_RAICHU, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD58[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_RAICHU, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_RAICHU, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DD68[] = { + { + .iv = 110, + .lvl = 33, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 110, + .lvl = 33, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DD78[] = { + { + .iv = 130, + .lvl = 51, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 130, + .lvl = 51, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DD88[] = { + { + .iv = 170, + .lvl = 56, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 56, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DD98[] = { + { + .iv = 80, + .lvl = 48, + .species = SPECIES_WEEZING, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_WEEZING, + }, + { + .iv = 80, + .lvl = 48, + .species = SPECIES_WEEZING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DDB0[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_PRIMEAPE, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DDC0[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_WEEZING, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_MUK, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DDD0[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_MACHOKE, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_MACHAMP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DDE0[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_PRIMEAPE, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_MACHAMP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DDF0[] = { + { + .iv = 60, + .lvl = 28, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_SPEAROW, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_FEAROW, + }, + { + .iv = 60, + .lvl = 28, + .species = SPECIES_SPEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE10[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE30[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEAKING, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE40[] = { + { + .iv = 120, + .lvl = 52, + .species = SPECIES_SEADRA, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_SEADRA, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_SEADRA, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE60[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEAKING, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE70[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_SEAKING, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DE80[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_MAGIKARP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DEB0[] = { + { + .iv = 80, + .lvl = 50, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DEB8[] = { + { + .iv = 80, + .lvl = 50, + .species = SPECIES_SEADRA, + }, + { + .iv = 80, + .lvl = 50, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DEC8[] = { + { + .iv = 120, + .lvl = 55, + .species = SPECIES_SEADRA, + }, + { + .iv = 120, + .lvl = 55, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DED8[] = { + { + .iv = 80, + .lvl = 50, + .species = SPECIES_STARMIE, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DEE0[] = { + { + .iv = 130, + .lvl = 50, + .species = SPECIES_MANKEY, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 130, + .lvl = 50, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DEF0[] = { + { + .iv = 170, + .lvl = 55, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 55, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF00[] = { + { + .iv = 130, + .lvl = 50, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 130, + .lvl = 50, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF10[] = { + { + .iv = 170, + .lvl = 55, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 55, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF20[] = { + { + .iv = 180, + .lvl = 50, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 180, + .lvl = 50, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF30[] = { + { + .iv = 220, + .lvl = 55, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF40[] = { + { + .iv = 180, + .lvl = 50, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 180, + .lvl = 50, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF50[] = { + { + .iv = 220, + .lvl = 55, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF60[] = { + { + .iv = 130, + .lvl = 51, + .species = SPECIES_MACHOKE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 130, + .lvl = 51, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823DF70[] = { + { + .iv = 170, + .lvl = 56, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 56, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DF80[] = { + { + .iv = 80, + .lvl = 47, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 80, + .lvl = 47, + .species = SPECIES_POLIWHIRL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DF98[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_CLEFAIRY, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823DFA8[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_SMEARGLE, + .moves = {MOVE_CROSS_CHOP, MOVE_MEGAHORN, MOVE_DOUBLE_EDGE, MOVE_SELF_DESTRUCT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DFB8[] = { + { + .iv = 120, + .lvl = 53, + .species = SPECIES_RATICATE, + }, + { + .iv = 120, + .lvl = 53, + .species = SPECIES_PIDGEOT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DFC8[] = { + { + .iv = 150, + .lvl = 53, + .species = SPECIES_PIKACHU, + }, + { + .iv = 150, + .lvl = 53, + .species = SPECIES_CLEFAIRY, + }, + { + .iv = 150, + .lvl = 53, + .species = SPECIES_MARILL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DFE0[] = { + { + .iv = 60, + .lvl = 30, + .species = SPECIES_NIDORINA, + }, + { + .iv = 60, + .lvl = 30, + .species = SPECIES_NIDORINO, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823DFF0[] = { + { + .iv = 120, + .lvl = 55, + .species = SPECIES_NIDOKING, + }, + { + .iv = 120, + .lvl = 55, + .species = SPECIES_NIDOQUEEN, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E000[] = { + { + .iv = 120, + .lvl = 53, + .species = SPECIES_PIDGEOTTO, + }, + { + .iv = 120, + .lvl = 55, + .species = SPECIES_PIDGEOT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E010[] = { + { + .iv = 120, + .lvl = 53, + .species = SPECIES_FEAROW, + }, + { + .iv = 120, + .lvl = 55, + .species = SPECIES_FEAROW, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E020[] = { + { + .iv = 120, + .lvl = 53, + .species = SPECIES_NOCTOWL, + }, + { + .iv = 120, + .lvl = 55, + .species = SPECIES_NOCTOWL, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E030[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_MARILL, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E038[] = { + { + .iv = 220, + .lvl = 52, + .species = SPECIES_NATU, + .moves = {MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_FUTURE_SIGHT, MOVE_WISH}, + }, + { + .iv = 220, + .lvl = 52, + .species = SPECIES_SLOWBRO, + .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_AMNESIA, MOVE_YAWN}, + }, + { + .iv = 220, + .lvl = 54, + .species = SPECIES_KADABRA, + .moves = {MOVE_PSYCHIC, MOVE_FUTURE_SIGHT, MOVE_RECOVER, MOVE_REFLECT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E068[] = { + { + .iv = 120, + .lvl = 55, + .species = SPECIES_GYARADOS, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E070[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_ONIX, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_MACHAMP, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E080[] = { + { + .iv = 120, + .lvl = 54, + .species = SPECIES_MACHOKE, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_MACHOKE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E090[] = { + { + .iv = 150, + .lvl = 55, + .species = SPECIES_RHYDON, + }, + { + .iv = 150, + .lvl = 55, + .species = SPECIES_KANGASKHAN, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E0A0[] = { + { + .iv = 220, + .lvl = 56, + .species = SPECIES_GIRAFARIG, + .moves = {MOVE_CRUNCH, MOVE_PSYBEAM, MOVE_ODOR_SLEUTH, MOVE_AGILITY}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E0B0[] = { + { + .iv = 220, + .lvl = 53, + .species = SPECIES_NATU, + .moves = {MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_WISH, MOVE_FUTURE_SIGHT}, + }, + { + .iv = 220, + .lvl = 53, + .species = SPECIES_HYPNO, + .moves = {MOVE_PSYCHIC, MOVE_DISABLE, MOVE_PSYCH_UP, MOVE_FUTURE_SIGHT}, + }, + { + .iv = 220, + .lvl = 53, + .species = SPECIES_HYPNO, + .moves = {MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_PSYCH_UP, MOVE_FUTURE_SIGHT}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E0E0[] = { + { + .iv = 120, + .lvl = 52, + .species = SPECIES_ELECTRODE, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_PINECO, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_ELECTRODE, + }, + { + .iv = 120, + .lvl = 52, + .species = SPECIES_PINECO, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E100[] = { + { + .iv = 220, + .lvl = 55, + .species = SPECIES_VICTREEBEL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_STUN_SPORE, MOVE_WRAP}, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_VICTREEBEL, + .moves = {MOVE_RAZOR_LEAF, MOVE_ACID, MOVE_SLEEP_POWDER, MOVE_SLAM}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E120[] = { + { + .iv = 220, + .lvl = 55, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_PETAL_DANCE, MOVE_MOONLIGHT, MOVE_ACID, MOVE_SLEEP_POWDER}, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_VILEPLUME, + .moves = {MOVE_PETAL_DANCE, MOVE_MOONLIGHT, MOVE_ACID, MOVE_STUN_SPORE}, + }, +}; + +static const struct TrainerMonItemDefaultMoves sTrainerMons_823E140[] = { + { + .iv = 170, + .lvl = 54, + .species = SPECIES_PRIMEAPE, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 54, + .species = SPECIES_HITMONTOP, + .heldItem = ITEM_BLACK_BELT, + }, + { + .iv = 170, + .lvl = 54, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_BLACK_BELT, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E158[] = { + { + .iv = 160, + .lvl = 52, + .species = SPECIES_SANDSLASH, + }, + { + .iv = 160, + .lvl = 52, + .species = SPECIES_LICKITUNG, + }, + { + .iv = 160, + .lvl = 55, + .species = SPECIES_URSARING, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E170[] = { + { + .iv = 220, + .lvl = 53, + .species = SPECIES_TANGELA, + .moves = {MOVE_SLAM, MOVE_MEGA_DRAIN, MOVE_BIND, MOVE_INGRAIN}, + }, + { + .iv = 220, + .lvl = 54, + .species = SPECIES_EXEGGUTOR, + .moves = {MOVE_CONFUSION, MOVE_EGG_BOMB, MOVE_STUN_SPORE, MOVE_REFLECT}, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_EXEGGUTOR, + .moves = {MOVE_CONFUSION, MOVE_EGG_BOMB, MOVE_SLEEP_POWDER, MOVE_STOMP}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E1A0[] = { + { + .iv = 220, + .lvl = 56, + .species = SPECIES_CHANSEY, + .moves = {MOVE_EGG_BOMB, MOVE_DEFENSE_CURL, MOVE_MINIMIZE, MOVE_SOFT_BOILED}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E1B0[] = { + { + .iv = 220, + .lvl = 52, + .species = SPECIES_RHYDON, + .moves = {MOVE_EARTHQUAKE, MOVE_HORN_DRILL, MOVE_ROCK_BLAST, MOVE_SCARY_FACE}, + }, + { + .iv = 220, + .lvl = 54, + .species = SPECIES_SLOWBRO, + .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_AMNESIA, MOVE_DISABLE}, + }, + { + .iv = 220, + .lvl = 52, + .species = SPECIES_KANGASKHAN, + .moves = {MOVE_DIZZY_PUNCH, MOVE_BITE, MOVE_ENDURE, MOVE_REVERSAL}, + }, + { + .iv = 220, + .lvl = 52, + .species = SPECIES_MACHAMP, + .moves = {MOVE_CROSS_CHOP, MOVE_VITAL_THROW, MOVE_REVENGE, MOVE_SEISMIC_TOSS}, + }, + { + .iv = 220, + .lvl = 55, + .species = SPECIES_URSARING, + .moves = {MOVE_SLASH, MOVE_FAINT_ATTACK, MOVE_SNORE, MOVE_REST}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E200[] = { + { + .iv = 220, + .lvl = 53, + .species = SPECIES_PERSIAN, + .moves = {MOVE_SLASH, MOVE_SCREECH, MOVE_FAINT_ATTACK, MOVE_BITE}, + }, + { + .iv = 220, + .lvl = 53, + .species = SPECIES_DEWGONG, + .moves = {MOVE_ICE_BEAM, MOVE_TAKE_DOWN, MOVE_ICY_WIND, MOVE_SHEER_COLD}, + }, + { + .iv = 220, + .lvl = 54, + .species = SPECIES_NINETALES, + .moves = {MOVE_FLAMETHROWER, MOVE_CONFUSE_RAY, MOVE_WILL_O_WISP, MOVE_GRUDGE}, + }, + { + .iv = 220, + .lvl = 54, + .species = SPECIES_RAPIDASH, + .moves = {MOVE_BOUNCE, MOVE_AGILITY, MOVE_FIRE_SPIN, MOVE_TAKE_DOWN}, + }, + { + .iv = 220, + .lvl = 56, + .species = SPECIES_GIRAFARIG, + .moves = {MOVE_CRUNCH, MOVE_PSYBEAM, MOVE_STOMP, MOVE_ODOR_SLEUTH}, + }, +}; + +static const struct TrainerMonNoItemCustomMoves sTrainerMons_823E250[] = { + { + .iv = 220, + .lvl = 57, + .species = SPECIES_MILTANK, + .moves = {MOVE_BODY_SLAM, MOVE_MILK_DRINK, MOVE_GROWL, MOVE_DEFENSE_CURL}, + }, + { + .iv = 220, + .lvl = 57, + .species = SPECIES_TAUROS, + .moves = {MOVE_TAKE_DOWN, MOVE_SCARY_FACE, MOVE_PURSUIT, MOVE_SWAGGER}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E270[] = { + { + .iv = 20, + .lvl = 19, + .species = SPECIES_METAPOD, + }, + { + .iv = 20, + .lvl = 19, + .species = SPECIES_WEEDLE, + }, + { + .iv = 20, + .lvl = 19, + .species = SPECIES_METAPOD, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E288[] = { + { + .iv = 60, + .lvl = 27, + .species = SPECIES_BUTTERFREE, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_KAKUNA, + }, + { + .iv = 60, + .lvl = 27, + .species = SPECIES_BUTTERFREE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E2A0[] = { + { + .iv = 120, + .lvl = 51, + .species = SPECIES_BUTTERFREE, + }, + { + .iv = 120, + .lvl = 54, + .species = SPECIES_BEEDRILL, + }, + { + .iv = 120, + .lvl = 51, + .species = SPECIES_BUTTERFREE, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E2B8[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_POLIWRATH, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E2C8[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEADRA, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEADRA, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E2D8[] = { + { + .iv = 80, + .lvl = 49, + .species = SPECIES_POLIWHIRL, + }, + { + .iv = 80, + .lvl = 49, + .species = SPECIES_SEAKING, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E2E8[] = { + { + .iv = 255, + .lvl = 64, + .species = SPECIES_DEWGONG, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_SIGNAL_BEAM, MOVE_DOUBLE_TEAM}, + }, + { + .iv = 255, + .lvl = 63, + .species = SPECIES_CLOYSTER, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_SUPERSONIC, MOVE_RAIN_DANCE}, + }, + { + .iv = 255, + .lvl = 63, + .species = SPECIES_PILOSWINE, + .heldItem = ITEM_NONE, + .moves = {MOVE_BLIZZARD, MOVE_EARTHQUAKE, MOVE_DOUBLE_EDGE, MOVE_ROCK_SLIDE}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_JYNX, + .heldItem = ITEM_NONE, + .moves = {MOVE_ICE_BEAM, MOVE_PSYCHIC, MOVE_LOVELY_KISS, MOVE_ATTRACT}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_LAPRAS, + .heldItem = ITEM_CHERI_BERRY, + .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_PSYCHIC, MOVE_THUNDER}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E338[] = { + { + .iv = 255, + .lvl = 65, + .species = SPECIES_STEELIX, + .heldItem = ITEM_NONE, + .moves = {MOVE_EARTHQUAKE, MOVE_IRON_TAIL, MOVE_CRUNCH, MOVE_ROCK_TOMB}, + }, + { + .iv = 255, + .lvl = 65, + .species = SPECIES_HITMONCHAN, + .heldItem = ITEM_NONE, + .moves = {MOVE_SKY_UPPERCUT, MOVE_MACH_PUNCH, MOVE_ROCK_SLIDE, MOVE_COUNTER}, + }, + { + .iv = 255, + .lvl = 65, + .species = SPECIES_HITMONLEE, + .heldItem = ITEM_NONE, + .moves = {MOVE_MEGA_KICK, MOVE_FORESIGHT, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_STEELIX, + .heldItem = ITEM_NONE, + .moves = {MOVE_EARTHQUAKE, MOVE_IRON_TAIL, MOVE_CRUNCH, MOVE_DRAGON_BREATH}, + }, + { + .iv = 255, + .lvl = 68, + .species = SPECIES_MACHAMP, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_CROSS_CHOP, MOVE_EARTHQUAKE, MOVE_BRICK_BREAK, MOVE_ROCK_SLIDE}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E388[] = { + { + .iv = 255, + .lvl = 66, + .species = SPECIES_GENGAR, + .heldItem = ITEM_NONE, + .moves = {MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_CONFUSE_RAY, MOVE_HYPNOSIS}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_CROBAT, + .heldItem = ITEM_NONE, + .moves = {MOVE_SLUDGE_BOMB, MOVE_AIR_CUTTER, MOVE_SHADOW_BALL, MOVE_CONFUSE_RAY}, + }, + { + .iv = 255, + .lvl = 65, + .species = SPECIES_MISDREAVUS, + .heldItem = ITEM_NONE, + .moves = {MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_ATTRACT}, + }, + { + .iv = 255, + .lvl = 68, + .species = SPECIES_ARBOK, + .heldItem = ITEM_NONE, + .moves = {MOVE_SLUDGE_BOMB, MOVE_EARTHQUAKE, MOVE_GIGA_DRAIN, MOVE_DOUBLE_TEAM}, + }, + { + .iv = 255, + .lvl = 70, + .species = SPECIES_GENGAR, + .heldItem = ITEM_CHESTO_BERRY, + .moves = {MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E3D8[] = { + { + .iv = 255, + .lvl = 68, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_DRAGON_DANCE, MOVE_EARTHQUAKE, MOVE_THUNDER_WAVE}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_FLAMETHROWER}, + }, + { + .iv = 255, + .lvl = 66, + .species = SPECIES_KINGDRA, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_DRAGON_DANCE, MOVE_SURF, MOVE_ICE_BEAM}, + }, + { + .iv = 255, + .lvl = 70, + .species = SPECIES_AERODACTYL, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYPER_BEAM, MOVE_ANCIENT_POWER, MOVE_AERIAL_ACE, MOVE_EARTHQUAKE}, + }, + { + .iv = 255, + .lvl = 72, + .species = SPECIES_DRAGONITE, + .heldItem = ITEM_PERSIM_BERRY, + .moves = {MOVE_HYPER_BEAM, MOVE_OUTRAGE, MOVE_THUNDERBOLT, MOVE_ICE_BEAM}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E428[] = { + { + .iv = 255, + .lvl = 72, + .species = SPECIES_HERACROSS, + .heldItem = ITEM_NONE, + .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_COUNTER, MOVE_ROCK_TOMB}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_CALM_MIND, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 72, + .species = SPECIES_TYRANITAR, + .heldItem = ITEM_NONE, + .moves = {MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_THUNDERBOLT, MOVE_AERIAL_ACE}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_ARCANINE, + .heldItem = ITEM_NONE, + .moves = {MOVE_EXTREME_SPEED, MOVE_OVERHEAT, MOVE_AERIAL_ACE, MOVE_IRON_TAIL}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_EXEGGUTOR, + .heldItem = ITEM_NONE, + .moves = {MOVE_GIGA_DRAIN, MOVE_PSYCHIC, MOVE_SLEEP_POWDER, MOVE_LIGHT_SCREEN}, + }, + { + .iv = 255, + .lvl = 75, + .species = SPECIES_BLASTOISE, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_EARTHQUAKE, MOVE_RAIN_DANCE}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E488[] = { + { + .iv = 255, + .lvl = 72, + .species = SPECIES_HERACROSS, + .heldItem = ITEM_NONE, + .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_COUNTER, MOVE_ROCK_TOMB}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_CALM_MIND, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 72, + .species = SPECIES_TYRANITAR, + .heldItem = ITEM_NONE, + .moves = {MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_THUNDERBOLT, MOVE_AERIAL_ACE}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYDRO_PUMP, MOVE_DRAGON_DANCE, MOVE_EARTHQUAKE, MOVE_HYPER_BEAM}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_ARCANINE, + .heldItem = ITEM_NONE, + .moves = {MOVE_EXTREME_SPEED, MOVE_OVERHEAT, MOVE_AERIAL_ACE, MOVE_IRON_TAIL}, + }, + { + .iv = 255, + .lvl = 75, + .species = SPECIES_VENUSAUR, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_SOLAR_BEAM, MOVE_SLUDGE_BOMB, MOVE_EARTHQUAKE, MOVE_SUNNY_DAY}, + }, +}; + +static const struct TrainerMonItemCustomMoves sTrainerMons_823E4E8[] = { + { + .iv = 255, + .lvl = 72, + .species = SPECIES_HERACROSS, + .heldItem = ITEM_NONE, + .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_COUNTER, MOVE_ROCK_TOMB}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_ALAKAZAM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_CALM_MIND, MOVE_REFLECT}, + }, + { + .iv = 255, + .lvl = 72, + .species = SPECIES_TYRANITAR, + .heldItem = ITEM_NONE, + .moves = {MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_THUNDERBOLT, MOVE_AERIAL_ACE}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_EXEGGUTOR, + .heldItem = ITEM_NONE, + .moves = {MOVE_GIGA_DRAIN, MOVE_PSYCHIC, MOVE_SLEEP_POWDER, MOVE_LIGHT_SCREEN}, + }, + { + .iv = 255, + .lvl = 73, + .species = SPECIES_GYARADOS, + .heldItem = ITEM_NONE, + .moves = {MOVE_HYDRO_PUMP, MOVE_DRAGON_DANCE, MOVE_EARTHQUAKE, MOVE_HYPER_BEAM}, + }, + { + .iv = 255, + .lvl = 75, + .species = SPECIES_CHARIZARD, + .heldItem = ITEM_SITRUS_BERRY, + .moves = {MOVE_FIRE_BLAST, MOVE_DRAGON_CLAW, MOVE_AERIAL_ACE, MOVE_EARTHQUAKE}, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTrainerMons_823E548[] = { + { + .iv = 50, + .lvl = 39, + .species = SPECIES_WEEZING, + }, + { + .iv = 50, + .lvl = 39, + .species = SPECIES_MUK, + }, +}; diff --git a/src/data/trainers.h b/src/data/trainers.h new file mode 100644 index 000000000..46c4ef210 --- /dev/null +++ b/src/data/trainers.h @@ -0,0 +1,8918 @@ +const struct Trainer gTrainers[] = { + [TRAINER_NONE] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_AQUA_LEADER_ARCHIE, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = 0, + .partySize = 0, + .party = NULL + }, + [TRAINER_AQUA_LEADER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_AQUA_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_AQUA_LEADER_ARCHIE, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1A0} + }, + [TRAINER_TEAM_AQUA_1] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_AQUA, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_AQUA_GRUNT_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1A8} + }, + [TRAINER_TEAM_AQUA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_AQUA, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_AQUA_GRUNT_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1B0} + }, + [TRAINER_AROMA_LADY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_AROMA_LADY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_AROMA_LADY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1B8} + }, + [TRAINER_RUIN_MANIAC_1] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RS_RUIN_MANIAC, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1C0} + }, + [TRAINER_INTERVIEWER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_INTERVIEWER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTERVIEWER, + .trainerPic = TRAINER_PIC_INTERVIEWER, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1C8} + }, + [TRAINER_TUBER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_TUBER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_RS_TUBER_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1D0} + }, + [TRAINER_TUBER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TUBER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_TUBER_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1D8} + }, + [TRAINER_COOLTRAINER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_COOLTRAINER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_RS_COOLTRAINER_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1E0} + }, + [TRAINER_COOLTRAINER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_COOLTRAINER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_RS_COOLTRAINER_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1E8} + }, + [TRAINER_HEX_MANIAC_1] = { + .partyFlags = 0, + .trainerClass = CLASS_HEX_MANIAC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_HEX_MANIAC, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1F0} + }, + [TRAINER_LADY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_LADY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_LADY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A1F8} + }, + [TRAINER_BEAUTY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_BEAUTY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A200} + }, + [TRAINER_RICH_BOY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_RICH_BOY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_RICH_BOY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A208} + }, + [TRAINER_POKEMANIAC_1] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_RS_POKEMANIAC, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A210} + }, + [TRAINER_SWIMMER_MALE_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_SWIMMER_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A218} + }, + [TRAINER_BLACK_BELT_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BLACK_BELT, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_RS_BLACK_BELT, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A220} + }, + [TRAINER_GUITARIST_1] = { + .partyFlags = 0, + .trainerClass = CLASS_GUITARIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_GUITARIST, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A228} + }, + [TRAINER_KINDLER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_KINDLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_KINDLER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A230} + }, + [TRAINER_CAMPER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_CAMPER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A238} + }, + [TRAINER_BUG_MANIAC_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_MANIAC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BUG_MANIAC, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A240} + }, + [TRAINER_PSYCHIC_1] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_RS_PSYCHIC_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A248} + }, + [TRAINER_PSYCHIC_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_RS_PSYCHIC_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A250} + }, + [TRAINER_GENTLEMAN_1] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_RS_GENTLEMAN, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A258} + }, + [TRAINER_ELITE_FOUR_SIDNEY] = { + .partyFlags = 0, + .trainerClass = CLASS_ELITE_FOUR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_SIDNEY, + .trainerName = _("SIDNEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A260} + }, + [TRAINER_ELITE_FOUR_PHOEBE] = { + .partyFlags = 0, + .trainerClass = CLASS_ELITE_FOUR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_PHOEBE, + .trainerName = _("PHOEBE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A268} + }, + [TRAINER_LEADER_ROXANNE] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_ROXANNE, + .trainerName = _("ROXANNE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A270} + }, + [TRAINER_LEADER_BRAWLY] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_BRAWLY, + .trainerName = _("BRAWLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A278} + }, + [TRAINER_LEADER_TATE_LIZA] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_TATE_AND_LIZA, + .trainerName = _("TATE&LIZA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A280} + }, + [TRAINER_SCHOOL_KID_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SCHOOL_KID, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SCHOOL_KID_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A288} + }, + [TRAINER_SCHOOL_KID_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SCHOOL_KID, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SCHOOL_KID_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A290} + }, + [TRAINER_SR_AND_JR_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SR_AND_JR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_SR_AND_JR, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A298} + }, + [TRAINER_POKEFAN_1] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEFAN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_POKEFAN_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2A0} + }, + [TRAINER_POKEFAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEFAN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_POKEFAN_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2A8} + }, + [TRAINER_EXPERT_1] = { + .partyFlags = 0, + .trainerClass = CLASS_EXPERT, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_EXPERT_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2B0} + }, + [TRAINER_EXPERT_2] = { + .partyFlags = 0, + .trainerClass = CLASS_EXPERT, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_EXPERT_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2B8} + }, + [TRAINER_YOUNGSTER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_YOUNGSTER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2C0} + }, + [TRAINER_CHAMPION_1] = { + .partyFlags = 0, + .trainerClass = CLASS_CHAMPION, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_STEVEN, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2C8} + }, + [TRAINER_FISHERMAN_1] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RS_FISHERMAN, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2D0} + }, + [TRAINER_TRIATHLETE_1] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CYCLING_TRIATHLETE_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2D8} + }, + [TRAINER_TRIATHLETE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_CYCLING_TRIATHLETE_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2E0} + }, + [TRAINER_TRIATHLETE_3] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RUNNING_TRIATHLETE_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2E8} + }, + [TRAINER_TRIATHLETE_4] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RUNNING_TRIATHLETE_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2F0} + }, + [TRAINER_TRIATHLETE_5] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SWIMMING_TRIATHLETE_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A2F8} + }, + [TRAINER_TRIATHLETE_6] = { + .partyFlags = 0, + .trainerClass = CLASS_TRIATHLETE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMING_TRIATHLETE_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A300} + }, + [TRAINER_DRAGON_TAMER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_DRAGON_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_DRAGON_TAMER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A308} + }, + [TRAINER_BIRD_KEEPER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_RS_BIRD_KEEPER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A310} + }, + [TRAINER_NINJA_BOY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_NINJA_BOY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_NINJA_BOY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A318} + }, + [TRAINER_BATTLE_GIRL_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BATTLE_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BATTLE_GIRL, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A320} + }, + [TRAINER_PARASOL_LADY_1] = { + .partyFlags = 0, + .trainerClass = CLASS_PARASOL_LADY, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PARASOL_LADY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A328} + }, + [TRAINER_SWIMMER_FEMALE_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_SWIMMER_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A330} + }, + [TRAINER_PICNICKER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_RS_PICNICKER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A338} + }, + [TRAINER_TWINS_1] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_RS_TWINS, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A340} + }, + [TRAINER_SAILOR_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_SAILOR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A348} + }, + [TRAINER_BOARDER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BOARDER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_YOUNGSTER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A350} + }, + [TRAINER_BOARDER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BOARDER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_YOUNGSTER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A358} + }, + [TRAINER_COLLECTOR_1] = { + .partyFlags = 0, + .trainerClass = CLASS_COLLECTOR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_COLLECTOR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A360} + }, + [TRAINER_PKMN_TRAINER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_WALLY, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A368} + }, + [TRAINER_PKMN_TRAINER_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_BRENDAN_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A370} + }, + [TRAINER_PKMN_TRAINER_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_BRENDAN_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A378} + }, + [TRAINER_PKMN_TRAINER_5] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_BRENDAN_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A380} + }, + [TRAINER_PKMN_TRAINER_6] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_MAY_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A388} + }, + [TRAINER_PKMN_TRAINER_7] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_MAY_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A390} + }, + [TRAINER_PKMN_TRAINER_8] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_TRAINER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_MAY_1, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A398} + }, + [TRAINER_PKMN_BREEDER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_POKEMON_BREEDER_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3A0} + }, + [TRAINER_PKMN_BREEDER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_POKEMON_BREEDER_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3A8} + }, + [TRAINER_PKMN_RANGER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_RANGER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_RS_POKEMON_RANGER_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3B0} + }, + [TRAINER_PKMN_RANGER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_RANGER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_RS_POKEMON_RANGER_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3B8} + }, + [TRAINER_MAGMA_LEADER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_MAGMA_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MAGMA, + .trainerPic = TRAINER_PIC_MAGMA_LEADER_MAXIE, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3C0} + }, + [TRAINER_TEAM_MAGMA_1] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_MAGMA, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MAGMA, + .trainerPic = TRAINER_PIC_MAGMA_GRUNT_M, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3C8} + }, + [TRAINER_TEAM_MAGMA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_MAGMA, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MAGMA, + .trainerPic = TRAINER_PIC_MAGMA_GRUNT_F, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3D0} + }, + [TRAINER_LASS_1] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_LASS, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3D8} + }, + [TRAINER_BUG_CATCHER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3E0} + }, + [TRAINER_HIKER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RS_HIKER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3E8} + }, + [TRAINER_YOUNG_COUPLE_1] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_RS_YOUNG_COUPLE, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A3F0} + }, + [TRAINER_OLD_COUPLE_1] = { + .partyFlags = 0, + .trainerClass = CLASS_OLD_COUPLE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_OLD_COUPLE, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A400} + }, + [TRAINER_SIS_AND_BRO_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_RS_SIS_AND_BRO, + .trainerName = _(""), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A408} + }, + [TRAINER_AQUA_ADMIN_MATT] = { + .partyFlags = 0, + .trainerClass = CLASS_AQUA_ADMIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_AQUA_ADMIN_M, + .trainerName = _("MATT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A410} + }, + [TRAINER_AQUA_ADMIN_SHELLY] = { + .partyFlags = 0, + .trainerClass = CLASS_AQUA_ADMIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_AQUA_ADMIN_F, + .trainerName = _("SHELLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A418} + }, + [TRAINER_MAGMA_ADMIN_TABITHA] = { + .partyFlags = 0, + .trainerClass = CLASS_MAGMA_ADMIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MAGMA, + .trainerPic = TRAINER_PIC_MAGMA_ADMIN_M, + .trainerName = _("TABITHA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A420} + }, + [TRAINER_MAGMA_ADMIN_COURTNEY] = { + .partyFlags = 0, + .trainerClass = CLASS_MAGMA_ADMIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MAGMA, + .trainerPic = TRAINER_PIC_MAGMA_ADMIN_F, + .trainerName = _("COURTNEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A428} + }, + [TRAINER_LEADER_WATTSON] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_WATTSON, + .trainerName = _("WATTSON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A430} + }, + [TRAINER_LEADER_FLANNERY] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_FLANNERY, + .trainerName = _("FLANNERY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A438} + }, + [TRAINER_LEADER_NORMAN] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_NORMAN, + .trainerName = _("NORMAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A440} + }, + [TRAINER_LEADER_WINONA] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_WINONA, + .trainerName = _("WINONA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A448} + }, + [TRAINER_LEADER_WALLACE] = { + .partyFlags = 0, + .trainerClass = CLASS_LEADER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_WALLACE, + .trainerName = _("WALLACE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A450} + }, + [TRAINER_ELITE_FOUR_GLACIA] = { + .partyFlags = 0, + .trainerClass = CLASS_ELITE_FOUR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_GLACIA, + .trainerName = _("GLACIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A458} + }, + [TRAINER_ELITE_FOUR_DRAKE] = { + .partyFlags = 0, + .trainerClass = CLASS_ELITE_FOUR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_DRAKE, + .trainerName = _("DRAKE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A460} + }, + [TRAINER_YOUNGSTER_BEN] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("BEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A468} + }, + [TRAINER_YOUNGSTER_CALVIN] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CALVIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A478} + }, + [TRAINER_YOUNGSTER_JOSH] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("JOSH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A480} + }, + [TRAINER_YOUNGSTER_TIMMY] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("TIMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A498} + }, + [TRAINER_YOUNGSTER_JOEY] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("JOEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4A8} + }, + [TRAINER_YOUNGSTER_DAN] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("DAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4B8} + }, + [TRAINER_YOUNGSTER_CHAD] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CHAD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4C0} + }, + [TRAINER_YOUNGSTER_TYLER] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("TYLER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4D0} + }, + [TRAINER_YOUNGSTER_EDDIE] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("EDDIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4D8} + }, + [TRAINER_YOUNGSTER_DILLON] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("DILLON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4E0} + }, + [TRAINER_YOUNGSTER_YASU] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("YASU"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A4F0} + }, + [TRAINER_YOUNGSTER_DAVE] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("DAVE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A508} + }, + [TRAINER_YOUNGSTER_BEN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("BEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A518} + }, + [TRAINER_BUG_CATCHER_RICK] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("RICK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A528} + }, + [TRAINER_BUG_CATCHER_DOUG] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("DOUG"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A538} + }, + [TRAINER_BUG_CATCHER_SAMMY] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("SAMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A550} + }, + [TRAINER_BUG_CATCHER_COLTON] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("COLTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A558} + }, + [TRAINER_BUG_CATCHER_GREG] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("GREG"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823A570} + }, + [TRAINER_BUG_CATCHER_JAMES] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("JAMES"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A590} + }, + [TRAINER_BUG_CATCHER_KENT] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("KENT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A5A0} + }, + [TRAINER_BUG_CATCHER_ROBBY] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("ROBBY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A5B0} + }, + [TRAINER_BUG_CATCHER_CALE] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("CALE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823A5C8} + }, + [TRAINER_BUG_CATCHER_KEIGO] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("KEIGO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A5E8} + }, + [TRAINER_BUG_CATCHER_ELIJAH] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("ELIJAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A600} + }, + [TRAINER_BUG_CATCHER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A608} + }, + [TRAINER_BUG_CATCHER_BRENT] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("BRENT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A620} + }, + [TRAINER_BUG_CATCHER_CONNER] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("CONNER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A630} + }, + [TRAINER_LASS_JANICE] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("JANICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A648} + }, + [TRAINER_LASS_SALLY] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("SALLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A658} + }, + [TRAINER_LASS_ROBIN] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("ROBIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A668} + }, + [TRAINER_LASS_CRISSY] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("CRISSY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A670} + }, + [TRAINER_LASS_MIRIAM] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("MIRIAM"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A688} + }, + [TRAINER_LASS_IRIS] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("IRIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A698} + }, + [TRAINER_LASS_RELI] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("RELI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A6A0} + }, + [TRAINER_LASS_ALI] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("ALI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A6B0} + }, + [TRAINER_LASS_2] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A6C8} + }, + [TRAINER_LASS_HALEY] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("HALEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A6D8} + }, + [TRAINER_LASS_ANN] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("ANN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A6F0} + }, + [TRAINER_LASS_DAWN] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("DAWN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A700} + }, + [TRAINER_LASS_PAIGE] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("PAIGE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A710} + }, + [TRAINER_LASS_ANDREA] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("ANDREA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A720} + }, + [TRAINER_LASS_MEGAN] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("MEGAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823A738} + }, + [TRAINER_LASS_JULIA] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("JULIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A760} + }, + [TRAINER_LASS_KAY] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("KAY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A770} + }, + [TRAINER_LASS_LISA] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("LISA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A780} + }, + [TRAINER_SAILOR_EDMOND] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("EDMOND"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A790} + }, + [TRAINER_SAILOR_TREVOR] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("TREVOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7A0} + }, + [TRAINER_SAILOR_LEONARD] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("LEONARD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7B0} + }, + [TRAINER_SAILOR_DUNCAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("DUNCAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7B8} + }, + [TRAINER_SAILOR_HUEY] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("HUEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7D0} + }, + [TRAINER_SAILOR_DYLAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("DYLAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7E0} + }, + [TRAINER_SAILOR_PHILLIP] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("PHILLIP"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A7F8} + }, + [TRAINER_SAILOR_DWAYNE] = { + .partyFlags = 0, + .trainerClass = CLASS_SAILOR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_SAILOR, + .trainerName = _("DWAYNE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A800} + }, + [TRAINER_CAMPER_LIAM] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("LIAM"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823A810} + }, + [TRAINER_CAMPER_SHANE] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("SHANE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A830} + }, + [TRAINER_CAMPER_ETHAN] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("ETHAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A840} + }, + [TRAINER_CAMPER_RICKY] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("RICKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A848} + }, + [TRAINER_CAMPER_JEFF] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("JEFF"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A850} + }, + [TRAINER_CAMPER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A860} + }, + [TRAINER_CAMPER_CHRIS] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("CHRIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A868} + }, + [TRAINER_CAMPER_DREW] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("DREW"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823A878} + }, + [TRAINER_PICNICKER_DIANA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("DIANA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A898} + }, + [TRAINER_PICNICKER_NANCY] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("NANCY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A8A0} + }, + [TRAINER_PICNICKER_ISABELLE] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ISABELLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A8B0} + }, + [TRAINER_PICNICKER_KELSEY] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("KELSEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A8C8} + }, + [TRAINER_PICNICKER_ALICIA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ALICIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823A8D8} + }, + [TRAINER_PICNICKER_CAITLIN] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("CAITLIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A8F8} + }, + [TRAINER_PICNICKER_HEIDI] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("HEIDI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A900} + }, + [TRAINER_PICNICKER_CAROL] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("CAROL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A910} + }, + [TRAINER_PICNICKER_SOFIA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("SOFIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A920} + }, + [TRAINER_PICNICKER_MARTHA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("MARTHA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A938} + }, + [TRAINER_PICNICKER_TINA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("TINA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A948} + }, + [TRAINER_PICNICKER_HANNAH] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("HANNAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823A958} + }, + [TRAINER_POKEMANIAC_MARK] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("MARK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A980} + }, + [TRAINER_POKEMANIAC_HERMAN] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("HERMAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A990} + }, + [TRAINER_POKEMANIAC_COOPER] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("COOPER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9A0} + }, + [TRAINER_POKEMANIAC_STEVE] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("STEVE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9B8} + }, + [TRAINER_POKEMANIAC_WINSTON] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("WINSTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9C8} + }, + [TRAINER_POKEMANIAC_DAWSON] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("DAWSON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9D0} + }, + [TRAINER_POKEMANIAC_ASHTON] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("ASHTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9E8} + }, + [TRAINER_SUPER_NERD_JOVAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("JOVAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823A9F8} + }, + [TRAINER_SUPER_NERD_MIGUEL] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("MIGUEL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AA08} + }, + [TRAINER_SUPER_NERD_AIDAN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("AIDAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823AA20} + }, + [TRAINER_SUPER_NERD_GLENN] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("GLENN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AA60} + }, + [TRAINER_SUPER_NERD_LESLIE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("LESLIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823AA78} + }, + [TRAINER_SUPER_NERD_1] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AA88} + }, + [TRAINER_SUPER_NERD_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823AAA0} + }, + [TRAINER_SUPER_NERD_3] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AAC0} + }, + [TRAINER_SUPER_NERD_ERIK] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("ERIK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AAD0} + }, + [TRAINER_SUPER_NERD_AVERY] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("AVERY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823AAE8} + }, + [TRAINER_SUPER_NERD_DEREK] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("DEREK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB08} + }, + [TRAINER_SUPER_NERD_ZAC] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("ZAC"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB10} + }, + [TRAINER_HIKER_MARCOS] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("MARCOS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB20} + }, + [TRAINER_HIKER_FRANKLIN] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("FRANKLIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB38} + }, + [TRAINER_HIKER_NOB] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("NOB"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB48} + }, + [TRAINER_HIKER_WAYNE] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("WAYNE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB68} + }, + [TRAINER_HIKER_ALAN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("ALAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823AB70} + }, + [TRAINER_HIKER_BRICE] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("BRICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AB90} + }, + [TRAINER_HIKER_CLARK] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("CLARK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823ABA8} + }, + [TRAINER_HIKER_TRENT] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("TRENT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823ABC8} + }, + [TRAINER_HIKER_DUDLEY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("DUDLEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823ABD8} + }, + [TRAINER_HIKER_ALLEN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("ALLEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823AC08} + }, + [TRAINER_HIKER_ERIC] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("ERIC"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AC18} + }, + [TRAINER_HIKER_LENNY] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("LENNY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823AC28} + }, + [TRAINER_HIKER_OLIVER] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("OLIVER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AC48} + }, + [TRAINER_HIKER_LUCAS] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("LUCAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823AC60} + }, + [TRAINER_BIKER_JARED] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("JARED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823AC80} + }, + [TRAINER_BIKER_MALIK] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("MALIK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823ACB0} + }, + [TRAINER_BIKER_ERNEST] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("ERNEST"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823ACD0} + }, + [TRAINER_BIKER_ALEX] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("ALEX"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823AD20} + }, + [TRAINER_BIKER_LAO] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("LAO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823AD50} + }, + [TRAINER_BIKER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AD70} + }, + [TRAINER_BIKER_HIDEO] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("HIDEO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AD78} + }, + [TRAINER_BIKER_RUBEN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("RUBEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823AD80} + }, + [TRAINER_BIKER_BILLY] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("BILLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823ADB0} + }, + [TRAINER_BIKER_NIKOLAS] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("NIKOLAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823ADB8} + }, + [TRAINER_BIKER_JAXON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("JAXON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823ADD8} + }, + [TRAINER_BIKER_WILLIAM] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("WILLIAM"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823ADF8} + }, + [TRAINER_BIKER_LUKAS] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("LUKAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823AE48} + }, + [TRAINER_BIKER_ISAAC] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("ISAAC"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823AE88} + }, + [TRAINER_BIKER_GERALD] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("GERALD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823AEB8} + }, + [TRAINER_BURGLAR_1] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AED8} + }, + [TRAINER_BURGLAR_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AEE8} + }, + [TRAINER_BURGLAR_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AEF0} + }, + [TRAINER_BURGLAR_QUINN] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("QUINN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF08} + }, + [TRAINER_BURGLAR_RAMON] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("RAMON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF20} + }, + [TRAINER_BURGLAR_DUSTY] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("DUSTY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF28} + }, + [TRAINER_BURGLAR_ARNIE] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("ARNIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF38} + }, + [TRAINER_BURGLAR_4] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF48} + }, + [TRAINER_BURGLAR_SIMON] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("SIMON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF58} + }, + [TRAINER_BURGLAR_LEWIS] = { + .partyFlags = 0, + .trainerClass = CLASS_BURGLAR, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_BURGLAR, + .trainerName = _("LEWIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF60} + }, + [TRAINER_ENGINEER_BAILY] = { + .partyFlags = 0, + .trainerClass = CLASS_ENGINEER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ENGINEER, + .trainerName = _("BAILY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF70} + }, + [TRAINER_ENGINEER_BRAXTON] = { + .partyFlags = 0, + .trainerClass = CLASS_ENGINEER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ENGINEER, + .trainerName = _("BRAXTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF80} + }, + [TRAINER_ENGINEER_BERNIE] = { + .partyFlags = 0, + .trainerClass = CLASS_ENGINEER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ENGINEER, + .trainerName = _("BERNIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AF88} + }, + [TRAINER_FISHERMAN_DALE] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("DALE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AFA0} + }, + [TRAINER_FISHERMAN_BARNY] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("BARNY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AFB8} + }, + [TRAINER_FISHERMAN_NED] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("NED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823AFD0} + }, + [TRAINER_FISHERMAN_CHIP] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("CHIP"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823AFE8} + }, + [TRAINER_FISHERMAN_HANK] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("HANK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823AFF8} + }, + [TRAINER_FISHERMAN_ELLIOT] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("ELLIOT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B000} + }, + [TRAINER_FISHERMAN_RONALD] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("RONALD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B020} + }, + [TRAINER_FISHERMAN_CLAUDE] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("CLAUDE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B040} + }, + [TRAINER_FISHERMAN_WADE] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("WADE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 6, + .party = {.NoItemDefaultMoves = sTrainerMons_823B050} + }, + [TRAINER_FISHERMAN_NOLAN] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("NOLAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B080} + }, + [TRAINER_FISHERMAN_ANDREW] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("ANDREW"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B090} + }, + [TRAINER_SWIMMER_MALE_LUIS] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("LUIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B0A0} + }, + [TRAINER_SWIMMER_MALE_RICHARD] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("RICHARD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B0B0} + }, + [TRAINER_SWIMMER_MALE_REECE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("REECE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B0C0} + }, + [TRAINER_SWIMMER_MALE_MATTHEW] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("MATTHEW"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B0D8} + }, + [TRAINER_SWIMMER_MALE_DOUGLAS] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("DOUGLAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B0E8} + }, + [TRAINER_SWIMMER_MALE_DAVID] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("DAVID"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B108} + }, + [TRAINER_SWIMMER_MALE_TONY] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("TONY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B120} + }, + [TRAINER_SWIMMER_MALE_AXLE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("AXLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823B130} + }, + [TRAINER_SWIMMER_MALE_BARRY] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("BARRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B158} + }, + [TRAINER_SWIMMER_MALE_DEAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("DEAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B168} + }, + [TRAINER_SWIMMER_MALE_DARRIN] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("DARRIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B170} + }, + [TRAINER_SWIMMER_MALE_SPENCER] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("SPENCER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B190} + }, + [TRAINER_SWIMMER_MALE_JACK] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("JACK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1A0} + }, + [TRAINER_SWIMMER_MALE_JEROME] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("JEROME"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1A8} + }, + [TRAINER_SWIMMER_MALE_ROLAND] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("ROLAND"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1B8} + }, + [TRAINER_CUE_BALL_KOJI] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("KOJI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1D0} + }, + [TRAINER_CUE_BALL_LUKE] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("LUKE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1E8} + }, + [TRAINER_CUE_BALL_CAMRON] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("CAMRON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B1F8} + }, + [TRAINER_CUE_BALL_RAUL] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("RAUL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B208} + }, + [TRAINER_CUE_BALL_ISAIAH] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("ISAIAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B218} + }, + [TRAINER_CUE_BALL_ZEEK] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("ZEEK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B228} + }, + [TRAINER_CUE_BALL_JAMAL] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("JAMAL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B230} + }, + [TRAINER_CUE_BALL_COREY] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("COREY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B250} + }, + [TRAINER_CUE_BALL_CHASE] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("CHASE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B260} + }, + [TRAINER_GAMER_HUGO] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("HUGO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B278} + }, + [TRAINER_GAMER_JASPER] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("JASPER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B288} + }, + [TRAINER_GAMER_DIRK] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("DIRK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B298} + }, + [TRAINER_GAMER_DARIAN] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("DARIAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B2A8} + }, + [TRAINER_GAMER_STAN] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("STAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B2B8} + }, + [TRAINER_GAMER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B2D0} + }, + [TRAINER_GAMER_RICH] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("RICH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B2D8} + }, + [TRAINER_BEAUTY_BRIDGET] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("BRIDGET"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B2E8} + }, + [TRAINER_BEAUTY_TAMIA] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("TAMIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B308} + }, + [TRAINER_BEAUTY_LORI] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("LORI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B318} + }, + [TRAINER_BEAUTY_LOLA] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("LOLA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B320} + }, + [TRAINER_BEAUTY_SHEILA] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("SHEILA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B338} + }, + [TRAINER_SWIMMER_FEMALE_TIFFANY] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("TIFFANY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B348} + }, + [TRAINER_SWIMMER_FEMALE_NORA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("NORA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B350} + }, + [TRAINER_SWIMMER_FEMALE_MELISSA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("MELISSA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B368} + }, + [TRAINER_BEAUTY_GRACE] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("GRACE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B378} + }, + [TRAINER_BEAUTY_OLIVIA] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("OLIVIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B388} + }, + [TRAINER_BEAUTY_LAUREN] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("LAUREN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B398} + }, + [TRAINER_SWIMMER_FEMALE_ANYA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("ANYA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823B3B0} + }, + [TRAINER_SWIMMER_FEMALE_ALICE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("ALICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B3D8} + }, + [TRAINER_SWIMMER_FEMALE_CONNIE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("CONNIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B3E8} + }, + [TRAINER_SWIMMER_FEMALE_SHIRLEY] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("SHIRLEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B400} + }, + [TRAINER_PSYCHIC_JOHAN] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("JOHAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B418} + }, + [TRAINER_PSYCHIC_TYRON] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("TYRON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B438} + }, + [TRAINER_PSYCHIC_CAMERON] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("CAMERON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B448} + }, + [TRAINER_PSYCHIC_PRESTON] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("PRESTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B460} + }, + [TRAINER_ROCKER_RANDALL] = { + .partyFlags = 0, + .trainerClass = CLASS_ROCKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ROCKER, + .trainerName = _("RANDALL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B468} + }, + [TRAINER_ROCKER_LUCA] = { + .partyFlags = 0, + .trainerClass = CLASS_ROCKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ROCKER, + .trainerName = _("LUCA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B480} + }, + [TRAINER_JUGGLER_DALTON] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("DALTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B490} + }, + [TRAINER_JUGGLER_NELSON] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("NELSON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B4A0} + }, + [TRAINER_JUGGLER_KIRK] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("KIRK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B4C0} + }, + [TRAINER_JUGGLER_SHAWN] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("SHAWN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B4E0} + }, + [TRAINER_JUGGLER_GREGORY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("GREGORY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823B4F0} + }, + [TRAINER_JUGGLER_EDWARD] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("EDWARD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B500} + }, + [TRAINER_JUGGLER_KAYDEN] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("KAYDEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B540} + }, + [TRAINER_JUGGLER_NATE] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("NATE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B548} + }, + [TRAINER_TAMER_PHIL] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("PHIL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B558} + }, + [TRAINER_TAMER_EDGAR] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("EDGAR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B568} + }, + [TRAINER_TAMER_JASON] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("JASON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B580} + }, + [TRAINER_TAMER_COLE] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("COLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B588} + }, + [TRAINER_TAMER_VINCENT] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("VINCENT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B598} + }, + [TRAINER_TAMER_JOHN] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("JOHN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B5A8} + }, + [TRAINER_BIRD_KEEPER_SEBASTIAN] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("SEBASTIAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B5C8} + }, + [TRAINER_BIRD_KEEPER_PERRY] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("PERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823B5D8} + }, + [TRAINER_BIRD_KEEPER_ROBERT] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("ROBERT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B600} + }, + [TRAINER_BIRD_KEEPER_DONALD] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("DONALD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B620} + }, + [TRAINER_BIRD_KEEPER_BENNY] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("BENNY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B628} + }, + [TRAINER_BIRD_KEEPER_EDWIN] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("EDWIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B638} + }, + [TRAINER_BIRD_KEEPER_CHESTER] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CHESTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B658} + }, + [TRAINER_BIRD_KEEPER_WILTON] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("WILTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B670} + }, + [TRAINER_BIRD_KEEPER_RAMIRO] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("RAMIRO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B680} + }, + [TRAINER_BIRD_KEEPER_JACOB] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("JACOB"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B688} + }, + [TRAINER_BIRD_KEEPER_ROGER] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("ROGER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B6A8} + }, + [TRAINER_BIRD_KEEPER_REED] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("REED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B6C0} + }, + [TRAINER_BIRD_KEEPER_KEITH] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("KEITH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B6E0} + }, + [TRAINER_BIRD_KEEPER_CARTER] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CARTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B6F0} + }, + [TRAINER_BIRD_KEEPER_MITCH] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MITCH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823B708} + }, + [TRAINER_BIRD_KEEPER_BECK] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("BECK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B728} + }, + [TRAINER_BIRD_KEEPER_MARLON] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MARLON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B738} + }, + [TRAINER_BLACK_BELT_KOICHI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("KOICHI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823B750} + }, + [TRAINER_BLACK_BELT_MIKE] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("MIKE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823B760} + }, + [TRAINER_BLACK_BELT_HIDEKI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("HIDEKI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823B778} + }, + [TRAINER_BLACK_BELT_AARON] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("AARON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.ItemDefaultMoves = sTrainerMons_823B788} + }, + [TRAINER_BLACK_BELT_HITOSHI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("HITOSHI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823B790} + }, + [TRAINER_BLACK_BELT_ATSUSHI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("ATSUSHI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823B7A8} + }, + [TRAINER_BLACK_BELT_KIYO] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("KIYO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.ItemDefaultMoves = sTrainerMons_823B7B8} + }, + [TRAINER_BLACK_BELT_TAKASHI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("TAKASHI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823B7C0} + }, + [TRAINER_BLACK_BELT_DAISUKE] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("DAISUKE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823B7D8} + }, + [TRAINER_RIVAL_OAKS_LAB_SQUIRTLE] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B7F0} + }, + [TRAINER_RIVAL_OAKS_LAB_BULBASAUR] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B7F8} + }, + [TRAINER_RIVAL_OAKS_LAB_CHARMANDER] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B800} + }, + [TRAINER_RIVAL_ROUTE22_EARLY_SQUIRTLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823B808} + }, + [TRAINER_RIVAL_ROUTE22_EARLY_BULBASAUR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823B828} + }, + [TRAINER_RIVAL_ROUTE22_EARLY_CHARMANDER] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823B848} + }, + [TRAINER_RIVAL_CERULEAN_SQUIRTLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B868} + }, + [TRAINER_RIVAL_CERULEAN_BULBASAUR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B8A8} + }, + [TRAINER_RIVAL_CERULEAN_CHARMANDER] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_1, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B8E8} + }, + [TRAINER_SCIENTIST_TED] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("TED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823B928} + }, + [TRAINER_SCIENTIST_CONNOR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("CONNOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B938} + }, + [TRAINER_SCIENTIST_JERRY] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("JERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823B978} + }, + [TRAINER_SCIENTIST_JOSE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("JOSE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823B990} + }, + [TRAINER_SCIENTIST_RODNEY] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("RODNEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823B9B0} + }, + [TRAINER_SCIENTIST_BEAU] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("BEAU"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823B9B8} + }, + [TRAINER_SCIENTIST_TAYLOR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("TAYLOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823B9F8} + }, + [TRAINER_SCIENTIST_JOSHUA] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("JOSHUA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BA48} + }, + [TRAINER_SCIENTIST_PARKER] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("PARKER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BA58} + }, + [TRAINER_SCIENTIST_ED] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("ED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823BA68} + }, + [TRAINER_SCIENTIST_TRAVIS] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("TRAVIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BA98} + }, + [TRAINER_SCIENTIST_BRAYDON] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("BRAYDON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BAA8} + }, + [TRAINER_SCIENTIST_IVAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("IVAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BAC0} + }, + [TRAINER_BOSS_GIOVANNI] = { + .partyFlags = 0, + .trainerClass = CLASS_BOSS, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_LEADER_GIOVANNI, + .trainerName = _("GIOVANNI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BAD0} + }, + [TRAINER_BOSS_GIOVANNI_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BOSS, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_LEADER_GIOVANNI, + .trainerName = _("GIOVANNI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823BAE8} + }, + [TRAINER_LEADER_GIOVANNI] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_LEADER_GIOVANNI, + .trainerName = _("GIOVANNI"), + .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823BB08} + }, + [TRAINER_TEAM_ROCKET_GRUNT] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BB58} + }, + [TRAINER_TEAM_ROCKET_GRUNT_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BB68} + }, + [TRAINER_TEAM_ROCKET_GRUNT_3] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BB80} + }, + [TRAINER_TEAM_ROCKET_GRUNT_4] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BB90} + }, + [TRAINER_TEAM_ROCKET_GRUNT_5] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BBA0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_6] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BBB0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_7] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BBC0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_8] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BBD0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_9] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BBE0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_10] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823BBF0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_11] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823BC20} + }, + [TRAINER_TEAM_ROCKET_GRUNT_12] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823BC40} + }, + [TRAINER_TEAM_ROCKET_GRUNT_13] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823BC60} + }, + [TRAINER_TEAM_ROCKET_GRUNT_14] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BCB0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_15] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BCC8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_16] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BCD8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_17] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BCF0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_18] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD08} + }, + [TRAINER_TEAM_ROCKET_GRUNT_19] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD18} + }, + [TRAINER_TEAM_ROCKET_GRUNT_20] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD30} + }, + [TRAINER_TEAM_ROCKET_GRUNT_21] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD40} + }, + [TRAINER_TEAM_ROCKET_GRUNT_22] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD60} + }, + [TRAINER_TEAM_ROCKET_GRUNT_23] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD70} + }, + [TRAINER_TEAM_ROCKET_GRUNT_24] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823BD80} + }, + [TRAINER_TEAM_ROCKET_GRUNT_25] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDA8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_26] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDC0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_27] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDD0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_28] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDE8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_29] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDF0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_30] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BDF8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_31] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BE08} + }, + [TRAINER_TEAM_ROCKET_GRUNT_32] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823BE20} + }, + [TRAINER_TEAM_ROCKET_GRUNT_33] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BE60} + }, + [TRAINER_TEAM_ROCKET_GRUNT_34] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823BE70} + }, + [TRAINER_TEAM_ROCKET_GRUNT_35] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823BE80} + }, + [TRAINER_TEAM_ROCKET_GRUNT_36] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BEA0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_37] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BEB8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_38] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BED0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_39] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823BEE8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_40] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823BEF0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_41] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823BF18} + }, + [TRAINER_COOLTRAINER_SAMUEL] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("SAMUEL"), + .items = {ITEM_SUPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823BF30} + }, + [TRAINER_COOLTRAINER_GEORGE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("GEORGE"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823BF80} + }, + [TRAINER_COOLTRAINER_COLBY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("COLBY"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823BFD0} + }, + [TRAINER_COOLTRAINER_PAUL] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("PAUL"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C020} + }, + [TRAINER_COOLTRAINER_ROLANDO] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("ROLANDO"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C070} + }, + [TRAINER_COOLTRAINER_GILBERT] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("GILBERT"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C0C0} + }, + [TRAINER_COOLTRAINER_OWEN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("OWEN"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C110} + }, + [TRAINER_COOLTRAINER_BERKE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("BERKE"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C160} + }, + [TRAINER_COOLTRAINER_YUJI] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("YUJI"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C1B0} + }, + [TRAINER_COOLTRAINER_WARREN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("WARREN"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C200} + }, + [TRAINER_COOLTRAINER_MARY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("MARY"), + .items = {ITEM_SUPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C250} + }, + [TRAINER_COOLTRAINER_CAROLINE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("CAROLINE"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C2A0} + }, + [TRAINER_COOLTRAINER_ALEXA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("ALEXA"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C2F0} + }, + [TRAINER_COOLTRAINER_SHANNON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("SHANNON"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C340} + }, + [TRAINER_COOLTRAINER_NAOMI] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("NAOMI"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C390} + }, + [TRAINER_COOLTRAINER_BROOKE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("BROOKE"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C3E0} + }, + [TRAINER_COOLTRAINER_AUSTINA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("AUSTINA"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C430} + }, + [TRAINER_COOLTRAINER_JULIE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("JULIE"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823C480} + }, + [TRAINER_ELITE_FOUR_LORELEI] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_ELITE_FOUR_LORELEI, + .trainerName = _("LORELEI"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823C4D0} + }, + [TRAINER_ELITE_FOUR_BRUNO] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_BRUNO, + .trainerName = _("BRUNO"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823C520} + }, + [TRAINER_ELITE_FOUR_AGATHA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_ELITE_FOUR_AGATHA, + .trainerName = _("AGATHA"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823C570} + }, + [TRAINER_ELITE_FOUR_LANCE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_LANCE, + .trainerName = _("LANCE"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823C5C0} + }, + [TRAINER_LEADER_BROCK] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_BROCK, + .trainerName = _("BROCK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823C610} + }, + [TRAINER_LEADER_MISTY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_MISTY, + .trainerName = _("MISTY"), + .items = {ITEM_SUPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823C630} + }, + [TRAINER_LEADER_LT_SURGE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_LT_SURGE, + .trainerName = _("LT. SURGE"), + .items = {ITEM_SUPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823C650} + }, + [TRAINER_LEADER_ERIKA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_ERIKA, + .trainerName = _("ERIKA"), + .items = {ITEM_HYPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823C680} + }, + [TRAINER_LEADER_KOGA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_KOGA, + .trainerName = _("KOGA"), + .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823C6B0} + }, + [TRAINER_LEADER_BLAINE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_LEADER_BLAINE, + .trainerName = _("BLAINE"), + .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823C6F0} + }, + [TRAINER_LEADER_SABRINA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_LEADER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LEADER_SABRINA, + .trainerName = _("SABRINA"), + .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_FULL_HEAL}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823C730} + }, + [TRAINER_GENTLEMAN_THOMAS] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("THOMAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823C770} + }, + [TRAINER_GENTLEMAN_ARTHUR] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("ARTHUR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823C780} + }, + [TRAINER_GENTLEMAN_TUCKER] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("TUCKER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823C790} + }, + [TRAINER_GENTLEMAN_NORTON] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("NORTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823C798} + }, + [TRAINER_GENTLEMAN_WALTER] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("WALTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823C7A0} + }, + [TRAINER_RIVAL_SS_ANNE_SQUIRTLE] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823C7B0} + }, + [TRAINER_RIVAL_SS_ANNE_BULBASAUR] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823C7D0} + }, + [TRAINER_RIVAL_SS_ANNE_CHARMANDER] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823C7F0} + }, + [TRAINER_RIVAL_POKENON_TOWER_SQUIRTLE] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C810} + }, + [TRAINER_RIVAL_POKENON_TOWER_BULBASAUR] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C838} + }, + [TRAINER_RIVAL_POKENON_TOWER_CHARMANDER] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C860} + }, + [TRAINER_RIVAL_SILPH_SQUIRTLE] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C888} + }, + [TRAINER_RIVAL_SILPH_BULBASAUR] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C8B0} + }, + [TRAINER_RIVAL_SILPH_CHARMANDER] = { + .partyFlags = 0, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823C8D8} + }, + [TRAINER_RIVAL_ROUTE22_LATE_SQUIRTLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.NoItemCustomMoves = sTrainerMons_823C900} + }, + [TRAINER_RIVAL_ROUTE22_LATE_BULBASAUR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.NoItemCustomMoves = sTrainerMons_823C960} + }, + [TRAINER_RIVAL_ROUTE22_LATE_CHARMANDER] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RIVAL_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RIVAL_2, + .trainerName = _("TERRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.NoItemCustomMoves = sTrainerMons_823C9C0} + }, + [TRAINER_CHAMPION_FIRST_SQUIRTLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823CA20} + }, + [TRAINER_CHAMPION_FIRST_BULBASAUR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823CA80} + }, + [TRAINER_CHAMPION_FIRST_CHARMANDER] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823CAE0} + }, + [TRAINER_CHANNELER_PATRICIA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("PATRICIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB40} + }, + [TRAINER_CHANNELER_CARLY] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("CARLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB48} + }, + [TRAINER_CHANNELER_HOPE] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("HOPE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB50} + }, + [TRAINER_CHANNELER_PAULA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("PAULA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB58} + }, + [TRAINER_CHANNELER_LAUREL] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("LAUREL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB60} + }, + [TRAINER_CHANNELER_JODY] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("JODY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB70} + }, + [TRAINER_CHANNELER_TAMMY] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("TAMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB78} + }, + [TRAINER_CHANNELER_RUTH] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("RUTH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB80} + }, + [TRAINER_CHANNELER_KARINA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("KARINA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB88} + }, + [TRAINER_CHANNELER_JANAE] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("JANAE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB90} + }, + [TRAINER_CHANNELER_ANGELICA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("ANGELICA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CB98} + }, + [TRAINER_CHANNELER_EMILIA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("EMILIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBB0} + }, + [TRAINER_CHANNELER_JENNIFER] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("JENNIFER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBB8} + }, + [TRAINER_CHANNELER_1] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBC0} + }, + [TRAINER_CHANNELER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBC8} + }, + [TRAINER_CHANNELER_3] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBD0} + }, + [TRAINER_CHANNELER_4] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBD8} + }, + [TRAINER_CHANNELER_5] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBE0} + }, + [TRAINER_CHANNELER_6] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CBE8} + }, + [TRAINER_CHANNELER_7] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC00} + }, + [TRAINER_CHANNELER_8] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC08} + }, + [TRAINER_CHANNELER_AMANDA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("AMANDA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC10} + }, + [TRAINER_CHANNELER_STACY] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("STACY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC20} + }, + [TRAINER_CHANNELER_TASHA] = { + .partyFlags = 0, + .trainerClass = CLASS_CHANNELER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_CHANNELER, + .trainerName = _("TASHA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC28} + }, + [TRAINER_HIKER_JEREMY] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("JEREMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC40} + }, + [TRAINER_PICNICKER_ALMA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ALMA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC50} + }, + [TRAINER_PICNICKER_SUSIE] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("SUSIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC68} + }, + [TRAINER_PICNICKER_VALERIE] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("VALERIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CC90} + }, + [TRAINER_PICNICKER_GWEN] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("GWEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823CCA0} + }, + [TRAINER_BIKER_VIRGIL] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("VIRGIL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823CCC0} + }, + [TRAINER_CAMPER_FLINT] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("FLINT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CCF0} + }, + [TRAINER_PICNICKER_MISSY] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("MISSY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD00} + }, + [TRAINER_PICNICKER_IRENE] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("IRENE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD10} + }, + [TRAINER_PICNICKER_DANA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("DANA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD28} + }, + [TRAINER_PICNICKER_ARIANA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ARIANA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD40} + }, + [TRAINER_PICNICKER_LEAH] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("LEAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD60} + }, + [TRAINER_CAMPER_JUSTIN] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("JUSTIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD70} + }, + [TRAINER_PICNICKER_YAZMIN] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("YAZMIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD80} + }, + [TRAINER_PICNICKER_KINDRA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("KINDRA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CD98} + }, + [TRAINER_PICNICKER_BECKY] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("BECKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CDB0} + }, + [TRAINER_PICNICKER_CELIA] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("CELIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CDC0} + }, + [TRAINER_GENTLEMAN_BROOKS] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("BROOKS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CDC8} + }, + [TRAINER_GENTLEMAN_LAMAR] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("LAMAR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CDD0} + }, + [TRAINER_TWINS_ELI_ANNE] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("ELI & ANNE"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CDE0} + }, + [TRAINER_COOL_COUPLE_RAY_TYRA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOL_COUPLE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOL_COUPLE, + .trainerName = _("RAY & TYRA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823CDF0} + }, + [TRAINER_YOUNG_COUPLE_GIA_JES] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_YOUNG_COUPLE, + .trainerName = _("GIA & JES"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE10} + }, + [TRAINER_TWINS_KIRI_JAN] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("KIRI & JAN"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE20} + }, + [TRAINER_CRUSH_KIN_RON_MYA] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("RON & MYA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823CE30} + }, + [TRAINER_YOUNG_COUPLE_LEA_JED] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_YOUNG_COUPLE, + .trainerName = _("LEA & JED"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE40} + }, + [TRAINER_SIS_AND_BRO_LIA_LUC] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SIS_AND_BRO, + .trainerName = _("LIA & LUC"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE50} + }, + [TRAINER_SIS_AND_BRO_LIL_IAN] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SIS_AND_BRO, + .trainerName = _("LIL & IAN"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE60} + }, + [TRAINER_BUG_CATCHER_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE70} + }, + [TRAINER_BUG_CATCHER_4] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE78} + }, + [TRAINER_BUG_CATCHER_5] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE80} + }, + [TRAINER_BUG_CATCHER_6] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE88} + }, + [TRAINER_BUG_CATCHER_7] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE90} + }, + [TRAINER_BUG_CATCHER_8] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CE98} + }, + [TRAINER_YOUNGSTER_BEN_3] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("BEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CEA0} + }, + [TRAINER_YOUNGSTER_BEN_4] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("BEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CEB0} + }, + [TRAINER_YOUNGSTER_CHAD_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CHAD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CEC0} + }, + [TRAINER_LASS_RELI_2] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("RELI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CED0} + }, + [TRAINER_LASS_RELI_3] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("RELI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CEE0} + }, + [TRAINER_YOUNGSTER_TIMMY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("TIMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CEF0} + }, + [TRAINER_YOUNGSTER_TIMMY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("TIMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF08} + }, + [TRAINER_YOUNGSTER_TIMMY_4] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("TIMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF20} + }, + [TRAINER_YOUNGSTER_CHAD_3] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CHAD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF38} + }, + [TRAINER_LASS_JANICE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("JANICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF48} + }, + [TRAINER_LASS_JANICE_3] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("JANICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF58} + }, + [TRAINER_YOUNGSTER_CHAD_4] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CHAD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF68} + }, + [TRAINER_HIKER_FRANKLIN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("FRANKLIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF78} + }, + [TRAINER_PKMN_PROF_PROF_OAK] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_PROF, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_PROFESSOR_OAK, + .trainerName = _("PROF. OAK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF88} + }, + [TRAINER_PLAYER_BRENDAN] = { + .partyFlags = 0, + .trainerClass = CLASS_PLAYER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RS_BRENDAN_2, + .trainerName = _("BRENDAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF90} + }, + [TRAINER_PLAYER_MAY] = { + .partyFlags = 0, + .trainerClass = CLASS_PLAYER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_RS_MAY_2, + .trainerName = _("MAY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CF98} + }, + [TRAINER_PLAYER_RED] = { + .partyFlags = 0, + .trainerClass = CLASS_PLAYER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_RED, + .trainerName = _("RED"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CFA0} + }, + [TRAINER_PLAYER_LEAF] = { + .partyFlags = 0, + .trainerClass = CLASS_PLAYER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LEAF, + .trainerName = _("LEAF"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823CFA8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_42] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_F, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823CFB0} + }, + [TRAINER_PSYCHIC_JACLYN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PSYCHIC_F, + .trainerName = _("JACLYN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823CFC0} + }, + [TRAINER_CRUSH_GIRL_SHARON] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("SHARON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823CFF0} + }, + [TRAINER_TUBER_AMIRA] = { + .partyFlags = 0, + .trainerClass = CLASS_TUBER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_TUBER_F, + .trainerName = _("AMIRA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D000} + }, + [TRAINER_PKMN_BREEDER_ALIZE] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_BREEDER_F, + .trainerName = _("ALIZE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D018} + }, + [TRAINER_PKMN_RANGER_NICOLAS] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_M, + .trainerName = _("NICOLAS"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D030} + }, + [TRAINER_PKMN_RANGER_MADELINE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_F, + .trainerName = _("MADELINE"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D050} + }, + [TRAINER_AROMA_LADY_NIKKI] = { + .partyFlags = 0, + .trainerClass = CLASS_AROMA_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_AROMA_LADY, + .trainerName = _("NIKKI"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D070} + }, + [TRAINER_RUIN_MANIAC_STANLY] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("STANLY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D080} + }, + [TRAINER_LADY_JACKI] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LADY, + .trainerName = _("JACKI"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D098} + }, + [TRAINER_PAINTER_DAISY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PAINTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PAINTER, + .trainerName = _("DAISY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D0A8} + }, + [TRAINER_BIKER_GOON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("GOON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D0B8} + }, + [TRAINER_BIKER_GOON_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("GOON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D0D8} + }, + [TRAINER_BIKER_GOON_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("GOON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D0E8} + }, + [TRAINER_BIKER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _(""), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D0F0} + }, + [TRAINER_BUG_CATCHER_ANTHONY] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("ANTHONY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D0F8} + }, + [TRAINER_BUG_CATCHER_CHARLIE] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("CHARLIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D108} + }, + [TRAINER_TWINS_ELI_ANNE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("ELI & ANNE"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D120} + }, + [TRAINER_YOUNGSTER_JOHNSON] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("JOHNSON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D130} + }, + [TRAINER_BIKER_RICARDO] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("RICARDO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D148} + }, + [TRAINER_BIKER_JAREN] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("JAREN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D178} + }, + [TRAINER_TEAM_ROCKET_GRUNT_43] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D188} + }, + [TRAINER_TEAM_ROCKET_GRUNT_44] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823D198} + }, + [TRAINER_TEAM_ROCKET_GRUNT_45] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D1B8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_46] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D1D0} + }, + [TRAINER_TEAM_ROCKET_GRUNT_47] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D1E8} + }, + [TRAINER_TEAM_ROCKET_GRUNT_48] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D200} + }, + [TRAINER_TEAM_ROCKET_ADMIN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_F, + .trainerName = _("ADMIN"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D210} + }, + [TRAINER_TEAM_ROCKET_ADMIN_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("ADMIN"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D240} + }, + [TRAINER_SCIENTIST_GIDEON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_SCIENTIST, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SCIENTIST, + .trainerName = _("GIDEON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823D270} + }, + [TRAINER_SWIMMER_FEMALE_AMARA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("AMARA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D2C0} + }, + [TRAINER_SWIMMER_FEMALE_MARIA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("MARIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D2D8} + }, + [TRAINER_SWIMMER_FEMALE_ABIGAIL] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("ABIGAIL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D2E8} + }, + [TRAINER_SWIMMER_MALE_FINN] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("FINN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D300} + }, + [TRAINER_SWIMMER_MALE_GARRETT] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("GARRETT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D308} + }, + [TRAINER_FISHERMAN_TOMMY] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("TOMMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823D320} + }, + [TRAINER_CRUSH_GIRL_TANYA] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("TANYA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D348} + }, + [TRAINER_BLACK_BELT_SHEA] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("SHEA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D358} + }, + [TRAINER_BLACK_BELT_HUGH] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("HUGH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D368} + }, + [TRAINER_CAMPER_BRYCE] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("BRYCE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D378} + }, + [TRAINER_PICNICKER_CLAIRE] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("CLAIRE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823D390} + }, + [TRAINER_CRUSH_KIN_MIK_KIA] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("MIK & KIA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D3B0} + }, + [TRAINER_AROMA_LADY_VIOLET] = { + .partyFlags = 0, + .trainerClass = CLASS_AROMA_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_AROMA_LADY, + .trainerName = _("VIOLET"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D3C0} + }, + [TRAINER_TUBER_ALEXIS] = { + .partyFlags = 0, + .trainerClass = CLASS_TUBER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_TUBER_F, + .trainerName = _("ALEXIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823D3D8} + }, + [TRAINER_TWINS_JOY_MEG] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("JOY & MEG"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D3F8} + }, + [TRAINER_SWIMMER_FEMALE_TISHA] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("TISHA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D408} + }, + [TRAINER_PAINTER_CELINA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PAINTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PAINTER, + .trainerName = _("CELINA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D410} + }, + [TRAINER_PAINTER_RAYNA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PAINTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PAINTER, + .trainerName = _("RAYNA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D420} + }, + [TRAINER_LADY_GILLIAN] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LADY, + .trainerName = _("GILLIAN"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823D430} + }, + [TRAINER_YOUNGSTER_DESTIN] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("DESTIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D448} + }, + [TRAINER_SWIMMER_MALE_TOBY] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("TOBY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D458} + }, + [TRAINER_TEAM_ROCKET_GRUNT_49] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D470} + }, + [TRAINER_TEAM_ROCKET_GRUNT_50] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_M, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D488} + }, + [TRAINER_TEAM_ROCKET_GRUNT_51] = { + .partyFlags = 0, + .trainerClass = CLASS_TEAM_ROCKET, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA, + .trainerPic = TRAINER_PIC_ROCKET_GRUNT_F, + .trainerName = _("GRUNT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D4A8} + }, + [TRAINER_BIRD_KEEPER_MILO] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MILO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D4C0} + }, + [TRAINER_BIRD_KEEPER_CHAZ] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CHAZ"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D4D0} + }, + [TRAINER_BIRD_KEEPER_HAROLD] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("HAROLD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D4E0} + }, + [TRAINER_FISHERMAN_TYLOR] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("TYLOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D4F0} + }, + [TRAINER_SWIMMER_MALE_MYMO] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("MYMO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D500} + }, + [TRAINER_SWIMMER_FEMALE_NICOLE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("NICOLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D510} + }, + [TRAINER_SIS_AND_BRO_AVA_GEB] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SIS_AND_BRO, + .trainerName = _("AVA & GEB"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D518} + }, + [TRAINER_AROMA_LADY_ROSE] = { + .partyFlags = 0, + .trainerClass = CLASS_AROMA_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_AROMA_LADY, + .trainerName = _("ROSE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D528} + }, + [TRAINER_SWIMMER_MALE_SAMIR] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("SAMIR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D538} + }, + [TRAINER_SWIMMER_FEMALE_DENISE] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("DENISE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D540} + }, + [TRAINER_TWINS_MIU_MIA] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("MIU & MIA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D550} + }, + [TRAINER_HIKER_EARL] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("EARL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D560} + }, + [TRAINER_RUIN_MANIAC_FOSTER] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("FOSTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D570} + }, + [TRAINER_RUIN_MANIAC_LARRY] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("LARRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D578} + }, + [TRAINER_HIKER_DARYL] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("DARYL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D588} + }, + [TRAINER_POKEMANIAC_HECTOR] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("HECTOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D590} + }, + [TRAINER_PSYCHIC_DARIO] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("DARIO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D5A0} + }, + [TRAINER_PSYCHIC_RODETTE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PSYCHIC_F, + .trainerName = _("RODETTE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D5B0} + }, + [TRAINER_AROMA_LADY_MIAH] = { + .partyFlags = 0, + .trainerClass = CLASS_AROMA_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_AROMA_LADY, + .trainerName = _("MIAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D5E0} + }, + [TRAINER_YOUNG_COUPLE_EVE_JON] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_YOUNG_COUPLE, + .trainerName = _("EVE & JON"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D5F0} + }, + [TRAINER_JUGGLER_MASON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("MASON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemCustomMoves = sTrainerMons_823D600} + }, + [TRAINER_CRUSH_GIRL_CYNDY] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("CYNDY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823D640} + }, + [TRAINER_CRUSH_GIRL_JOCELYN] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("JOCELYN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823D658} + }, + [TRAINER_TAMER_EVAN] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("EVAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D668} + }, + [TRAINER_POKEMANIAC_MARK_2] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("MARK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D680} + }, + [TRAINER_PKMN_RANGER_LOGAN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_M, + .trainerName = _("LOGAN"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D690} + }, + [TRAINER_PKMN_RANGER_JACKSON] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_M, + .trainerName = _("JACKSON"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D6B0} + }, + [TRAINER_PKMN_RANGER_BETH] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_F, + .trainerName = _("BETH"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D6E0} + }, + [TRAINER_PKMN_RANGER_KATELYN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_F, + .trainerName = _("KATELYN"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D6F8} + }, + [TRAINER_COOLTRAINER_LEROY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("LEROY"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823D708} + }, + [TRAINER_COOLTRAINER_MICHELLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("MICHELLE"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823D758} + }, + [TRAINER_COOL_COUPLE_LEX_NYA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOL_COUPLE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOL_COUPLE, + .trainerName = _("LEX & NYA"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823D7A8} + }, + [TRAINER_RUIN_MANIAC_BRANDON] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("BRANDON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D7C8} + }, + [TRAINER_RUIN_MANIAC_BENJAMIN] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("BENJAMIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823D7D0} + }, + [TRAINER_PAINTER_EDNA] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PAINTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PAINTER, + .trainerName = _("EDNA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823D800} + }, + [TRAINER_GENTLEMAN_CLIFFORD] = { + .partyFlags = 0, + .trainerClass = CLASS_GENTLEMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_RICH, + .trainerPic = TRAINER_PIC_GENTLEMAN, + .trainerName = _("CLIFFORD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D810} + }, + [TRAINER_LADY_SELPHY] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_LADY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_LADY, + .trainerName = _("SELPHY"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemCustomMoves = sTrainerMons_823D820} + }, + [TRAINER_RUIN_MANIAC_LAWSON] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("LAWSON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D840} + }, + [TRAINER_PSYCHIC_LAURA] = { + .partyFlags = 0, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PSYCHIC_F, + .trainerName = _("LAURA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D858} + }, + [TRAINER_PKMN_BREEDER_BETHANY] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_BREEDER_F, + .trainerName = _("BETHANY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D870} + }, + [TRAINER_PKMN_BREEDER_ALLISON] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_BREEDER_F, + .trainerName = _("ALLISON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D878} + }, + [TRAINER_BUG_CATCHER_GARRET] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("GARRET"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D890} + }, + [TRAINER_BUG_CATCHER_JONAH] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("JONAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823D898} + }, + [TRAINER_BUG_CATCHER_VANCE] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("VANCE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D8B8} + }, + [TRAINER_YOUNGSTER_NASH] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("NASH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D8C8} + }, + [TRAINER_YOUNGSTER_CORDELL] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("CORDELL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D8E0} + }, + [TRAINER_LASS_DALIA] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("DALIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823D8F0} + }, + [TRAINER_LASS_JOANA] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("JOANA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D910} + }, + [TRAINER_CAMPER_RILEY] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("RILEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D918} + }, + [TRAINER_PICNICKER_MARCY] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("MARCY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D928} + }, + [TRAINER_RUIN_MANIAC_LAYTON] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("LAYTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D940} + }, + [TRAINER_PICNICKER_KELSEY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("KELSEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D958} + }, + [TRAINER_PICNICKER_KELSEY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("KELSEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D968} + }, + [TRAINER_PICNICKER_KELSEY_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("KELSEY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D978} + }, + [TRAINER_CAMPER_RICKY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("RICKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D988} + }, + [TRAINER_CAMPER_RICKY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("RICKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D990} + }, + [TRAINER_CAMPER_RICKY_4] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("RICKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823D998} + }, + [TRAINER_CAMPER_JEFF_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("JEFF"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D9A0} + }, + [TRAINER_CAMPER_JEFF_3] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("JEFF"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D9B0} + }, + [TRAINER_CAMPER_JEFF_4] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("JEFF"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823D9C0} + }, + [TRAINER_PICNICKER_ISABELLE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ISABELLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D9D0} + }, + [TRAINER_PICNICKER_ISABELLE_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ISABELLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823D9E8} + }, + [TRAINER_PICNICKER_ISABELLE_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ISABELLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA00} + }, + [TRAINER_YOUNGSTER_YASU_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("YASU"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA18} + }, + [TRAINER_YOUNGSTER_YASU_3] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("YASU"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA30} + }, + [TRAINER_ENGINEER_BERNIE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_ENGINEER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ENGINEER, + .trainerName = _("BERNIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA48} + }, + [TRAINER_GAMER_DARIAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("DARIAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA60} + }, + [TRAINER_CAMPER_CHRIS_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("CHRIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA70} + }, + [TRAINER_CAMPER_CHRIS_3] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("CHRIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA80} + }, + [TRAINER_CAMPER_CHRIS_4] = { + .partyFlags = 0, + .trainerClass = CLASS_CAMPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CAMPER, + .trainerName = _("CHRIS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DA90} + }, + [TRAINER_PICNICKER_ALICIA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ALICIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAA0} + }, + [TRAINER_PICNICKER_ALICIA_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ALICIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAA8} + }, + [TRAINER_PICNICKER_ALICIA_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("ALICIA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAB0} + }, + [TRAINER_HIKER_JEREMY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("JEREMY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAB8} + }, + [TRAINER_POKEMANIAC_MARK_3] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("MARK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAC8} + }, + [TRAINER_POKEMANIAC_HERMAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("HERMAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAD8} + }, + [TRAINER_POKEMANIAC_HERMAN_3] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("HERMAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAE8} + }, + [TRAINER_HIKER_TRENT_2] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("TRENT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DAF8} + }, + [TRAINER_LASS_MEGAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("MEGAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB08} + }, + [TRAINER_LASS_MEGAN_3] = { + .partyFlags = 0, + .trainerClass = CLASS_LASS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_LASS, + .trainerName = _("MEGAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB30} + }, + [TRAINER_SUPER_NERD_GLENN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SUPER_NERD, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_SUPER_NERD, + .trainerName = _("GLENN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB58} + }, + [TRAINER_GAMER_RICH_2] = { + .partyFlags = 0, + .trainerClass = CLASS_GAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_GAMER, + .trainerName = _("RICH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB70} + }, + [TRAINER_BIKER_JAREN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("JAREN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB80} + }, + [TRAINER_FISHERMAN_ELLIOT_2] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("ELLIOT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DB90} + }, + [TRAINER_ROCKER_LUCA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_ROCKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_ROCKER, + .trainerName = _("LUCA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DBB0} + }, + [TRAINER_BEAUTY_SHEILA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("SHEILA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DBC0} + }, + [TRAINER_BIRD_KEEPER_ROBERT_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("ROBERT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DBD0} + }, + [TRAINER_BIRD_KEEPER_ROBERT_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("ROBERT"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DBF0} + }, + [TRAINER_PICNICKER_SUSIE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("SUSIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823DC10} + }, + [TRAINER_PICNICKER_SUSIE_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("SUSIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823DC38} + }, + [TRAINER_PICNICKER_SUSIE_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("SUSIE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 5, + .party = {.NoItemDefaultMoves = sTrainerMons_823DC60} + }, + [TRAINER_BIKER_LUKAS_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("LUKAS"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DC88} + }, + [TRAINER_BIRD_KEEPER_BENNY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("BENNY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DCA8} + }, + [TRAINER_BIRD_KEEPER_BENNY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("BENNY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DCB8} + }, + [TRAINER_BIRD_KEEPER_MARLON_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MARLON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DCC8} + }, + [TRAINER_BIRD_KEEPER_MARLON_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MARLON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DCE0} + }, + [TRAINER_BEAUTY_GRACE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BEAUTY_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_BEAUTY, + .trainerName = _("GRACE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DCF8} + }, + [TRAINER_BIRD_KEEPER_CHESTER_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CHESTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD08} + }, + [TRAINER_BIRD_KEEPER_CHESTER_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CHESTER"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD20} + }, + [TRAINER_PICNICKER_BECKY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("BECKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD38} + }, + [TRAINER_PICNICKER_BECKY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("BECKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD48} + }, + [TRAINER_PICNICKER_BECKY_4] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("BECKY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD58} + }, + [TRAINER_CRUSH_KIN_RON_MYA_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("RON & MYA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DD68} + }, + [TRAINER_CRUSH_KIN_RON_MYA_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("RON & MYA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DD78} + }, + [TRAINER_CRUSH_KIN_RON_MYA_4] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("RON & MYA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DD88} + }, + [TRAINER_BIKER_RUBEN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("RUBEN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DD98} + }, + [TRAINER_CUE_BALL_CAMRON_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("CAMRON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DDB0} + }, + [TRAINER_BIKER_JAXON_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIKER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BIKER, + .trainerName = _("JAXON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DDC0} + }, + [TRAINER_CUE_BALL_ISAIAH_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("ISAIAH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DDD0} + }, + [TRAINER_CUE_BALL_COREY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("COREY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DDE0} + }, + [TRAINER_BIRD_KEEPER_JACOB_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("JACOB"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DDF0} + }, + [TRAINER_BIRD_KEEPER_JACOB_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("JACOB"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE10} + }, + [TRAINER_SWIMMER_FEMALE_ALICE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("ALICE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE30} + }, + [TRAINER_SWIMMER_MALE_DARRIN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("DARRIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE40} + }, + [TRAINER_PICNICKER_MISSY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("MISSY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE60} + }, + [TRAINER_PICNICKER_MISSY_3] = { + .partyFlags = 0, + .trainerClass = CLASS_PICNICKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PICNICKER, + .trainerName = _("MISSY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE70} + }, + [TRAINER_FISHERMAN_WADE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_FISHERMAN_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_FISHERMAN, + .trainerName = _("WADE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 6, + .party = {.NoItemDefaultMoves = sTrainerMons_823DE80} + }, + [TRAINER_SWIMMER_MALE_JACK_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("JACK"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823DEB0} + }, + [TRAINER_SIS_AND_BRO_LIL_IAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SIS_AND_BRO, + .trainerName = _("LIL & IAN"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DEB8} + }, + [TRAINER_SIS_AND_BRO_LIL_IAN_3] = { + .partyFlags = 0, + .trainerClass = CLASS_SIS_AND_BRO_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SIS_AND_BRO, + .trainerName = _("LIL & IAN"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DEC8} + }, + [TRAINER_SWIMMER_MALE_FINN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("FINN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823DED8} + }, + [TRAINER_CRUSH_GIRL_SHARON_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("SHARON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DEE0} + }, + [TRAINER_CRUSH_GIRL_SHARON_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("SHARON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DEF0} + }, + [TRAINER_CRUSH_GIRL_TANYA_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("TANYA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF00} + }, + [TRAINER_CRUSH_GIRL_TANYA_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("TANYA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF10} + }, + [TRAINER_BLACK_BELT_SHEA_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("SHEA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF20} + }, + [TRAINER_BLACK_BELT_SHEA_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("SHEA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF30} + }, + [TRAINER_BLACK_BELT_HUGH_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("HUGH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF40} + }, + [TRAINER_BLACK_BELT_HUGH_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_BLACK_BELT_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_BLACK_BELT, + .trainerName = _("HUGH"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF50} + }, + [TRAINER_CRUSH_KIN_MIK_KIA_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("MIK & KIA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF60} + }, + [TRAINER_CRUSH_KIN_MIK_KIA_3] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_KIN, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_KIN, + .trainerName = _("MIK & KIA"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.ItemDefaultMoves = sTrainerMons_823DF70} + }, + [TRAINER_TUBER_AMIRA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TUBER_3, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_TUBER_F, + .trainerName = _("AMIRA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DF80} + }, + [TRAINER_TWINS_JOY_MEG_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TWINS_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_TWINS, + .trainerPic = TRAINER_PIC_TWINS, + .trainerName = _("JOY & MEG"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DF98} + }, + [TRAINER_PAINTER_RAYNA_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PAINTER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_PAINTER, + .trainerName = _("RAYNA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823DFA8} + }, + [TRAINER_YOUNGSTER_DESTIN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNGSTER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_YOUNGSTER, + .trainerName = _("DESTIN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DFB8} + }, + [TRAINER_PKMN_BREEDER_ALIZE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_PKMN_BREEDER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_BREEDER_F, + .trainerName = _("ALIZE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823DFC8} + }, + [TRAINER_YOUNG_COUPLE_GIA_JES_2] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_YOUNG_COUPLE, + .trainerName = _("GIA & JES"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DFE0} + }, + [TRAINER_YOUNG_COUPLE_GIA_JES_3] = { + .partyFlags = 0, + .trainerClass = CLASS_YOUNG_COUPLE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_GIRL, + .trainerPic = TRAINER_PIC_YOUNG_COUPLE, + .trainerName = _("GIA & JES"), + .items = {}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823DFF0} + }, + [TRAINER_BIRD_KEEPER_MILO_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("MILO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E000} + }, + [TRAINER_BIRD_KEEPER_CHAZ_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("CHAZ"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E010} + }, + [TRAINER_BIRD_KEEPER_HAROLD_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BIRD_KEEPER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_BIRD_KEEPER, + .trainerName = _("HAROLD"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E020} + }, + [TRAINER_SWIMMER_FEMALE_NICOLE_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("NICOLE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823E030} + }, + [TRAINER_PSYCHIC_JACLYN_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PSYCHIC_F, + .trainerName = _("JACLYN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823E038} + }, + [TRAINER_SWIMMER_MALE_SAMIR_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("SAMIR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemDefaultMoves = sTrainerMons_823E068} + }, + [TRAINER_HIKER_EARL_2] = { + .partyFlags = 0, + .trainerClass = CLASS_HIKER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_HIKER, + .trainerName = _("EARL"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E070} + }, + [TRAINER_RUIN_MANIAC_LARRY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_RUIN_MANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_RUIN_MANIAC, + .trainerName = _("LARRY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E080} + }, + [TRAINER_POKEMANIAC_HECTOR_2] = { + .partyFlags = 0, + .trainerClass = CLASS_POKEMANIAC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS, + .trainerPic = TRAINER_PIC_POKEMANIAC, + .trainerName = _("HECTOR"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E090} + }, + [TRAINER_PSYCHIC_DARIO_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_PSYCHIC_M, + .trainerName = _("DARIO"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823E0A0} + }, + [TRAINER_PSYCHIC_RODETTE_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PSYCHIC_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_PSYCHIC_F, + .trainerName = _("RODETTE"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823E0B0} + }, + [TRAINER_JUGGLER_MASON_2] = { + .partyFlags = 0, + .trainerClass = CLASS_JUGGLER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_JUGGLER, + .trainerName = _("MASON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 4, + .party = {.NoItemDefaultMoves = sTrainerMons_823E0E0} + }, + [TRAINER_PKMN_RANGER_NICOLAS_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_M, + .trainerName = _("NICOLAS"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823E100} + }, + [TRAINER_PKMN_RANGER_MADELINE_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_F, + .trainerName = _("MADELINE"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823E120} + }, + [TRAINER_CRUSH_GIRL_CYNDY_2] = { + .partyFlags = F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CRUSH_GIRL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_INTENSE, + .trainerPic = TRAINER_PIC_CRUSH_GIRL, + .trainerName = _("CYNDY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.ItemDefaultMoves = sTrainerMons_823E140} + }, + [TRAINER_TAMER_EVAN_2] = { + .partyFlags = 0, + .trainerClass = CLASS_TAMER, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_HIKER, + .trainerPic = TRAINER_PIC_TAMER, + .trainerName = _("EVAN"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823E158} + }, + [TRAINER_PKMN_RANGER_JACKSON_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_M, + .trainerName = _("JACKSON"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 3, + .party = {.NoItemCustomMoves = sTrainerMons_823E170} + }, + [TRAINER_PKMN_RANGER_KATELYN_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_PKMN_RANGER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_POKEMON_RANGER_F, + .trainerName = _("KATELYN"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 1, + .party = {.NoItemCustomMoves = sTrainerMons_823E1A0} + }, + [TRAINER_COOLTRAINER_LEROY_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOLTRAINER_M, + .trainerName = _("LEROY"), + .items = {ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823E1B0} + }, + [TRAINER_COOLTRAINER_MICHELLE_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOLTRAINER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_COOLTRAINER_F, + .trainerName = _("MICHELLE"), + .items = {ITEM_HYPER_POTION}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.NoItemCustomMoves = sTrainerMons_823E200} + }, + [TRAINER_COOL_COUPLE_LEX_NYA_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, + .trainerClass = CLASS_COOL_COUPLE, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_COOL, + .trainerPic = TRAINER_PIC_COOL_COUPLE, + .trainerName = _("LEX & NYA"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = TRUE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 2, + .party = {.NoItemCustomMoves = sTrainerMons_823E250} + }, + [TRAINER_BUG_CATCHER_COLTON_2] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("COLTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823E270} + }, + [TRAINER_BUG_CATCHER_COLTON_3] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("COLTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823E288} + }, + [TRAINER_BUG_CATCHER_COLTON_4] = { + .partyFlags = 0, + .trainerClass = CLASS_BUG_CATCHER_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_BUG_CATCHER, + .trainerName = _("COLTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 3, + .party = {.NoItemDefaultMoves = sTrainerMons_823E2A0} + }, + [TRAINER_SWIMMER_MALE_MATTHEW_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("MATTHEW"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E2B8} + }, + [TRAINER_SWIMMER_MALE_TONY_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_MALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_SWIMMER, + .trainerPic = TRAINER_PIC_SWIMMER_M, + .trainerName = _("TONY"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E2C8} + }, + [TRAINER_SWIMMER_FEMALE_MELISSA_2] = { + .partyFlags = 0, + .trainerClass = CLASS_SWIMMER_FEMALE_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_FEMALE | F_TRAINER_FEMALE, + .trainerPic = TRAINER_PIC_SWIMMER_F, + .trainerName = _("MELISSA"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E2D8} + }, + [TRAINER_ELITE_FOUR_LORELEI_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_LORELEI, + .trainerName = _("LORELEI"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823E2E8} + }, + [TRAINER_ELITE_FOUR_BRUNO_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_BRUNO, + .trainerName = _("BRUNO"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823E338} + }, + [TRAINER_ELITE_FOUR_AGATHA_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_AGATHA, + .trainerName = _("AGATHA"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823E388} + }, + [TRAINER_ELITE_FOUR_LANCE_2] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_ELITE_FOUR_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR, + .trainerPic = TRAINER_PIC_ELITE_FOUR_LANCE, + .trainerName = _("LANCE"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 5, + .party = {.ItemCustomMoves = sTrainerMons_823E3D8} + }, + [TRAINER_CHAMPION_REMATCH_SQUIRTLE] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823E428} + }, + [TRAINER_CHAMPION_REMATCH_BULBASAUR] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823E488} + }, + [TRAINER_CHAMPION_REMATCH_CHARMANDER] = { + .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM, + .trainerClass = CLASS_CHAMPION_2, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CHAMPION_RIVAL, + .trainerName = _("TERRY"), + .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, + .partySize = 6, + .party = {.ItemCustomMoves = sTrainerMons_823E4E8} + }, + [TRAINER_CUE_BALL_PAXTON] = { + .partyFlags = 0, + .trainerClass = CLASS_CUE_BALL, + .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, + .trainerPic = TRAINER_PIC_CUE_BALL, + .trainerName = _("PAXTON"), + .items = {}, + .doubleBattle = FALSE, + .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, + .partySize = 2, + .party = {.NoItemDefaultMoves = sTrainerMons_823E548} + }, +}; diff --git a/src/daycare.c b/src/daycare.c index fede86156..c016bbc38 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -76,7 +76,7 @@ extern const u8 gDaycareText_DontLikeOther[]; extern const u8 gDaycareText_PlayOther[]; extern const u8 gExpandedPlaceholder_Empty[]; -extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle +extern const u32 gUnknown_826601C[]; // tilemap gameboy circle extern const u8 gText_HatchedFromEgg[]; extern const u8 gText_NickHatchPrompt[]; @@ -1739,7 +1739,7 @@ static bool8 sub_8046E34(struct DayCare *daycare, u8 daycareId) return FALSE; } -bool8 sub_8046EAC(void) +bool8 DaycareMonReceivedMail(void) { return sub_8046E34(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); } @@ -1880,7 +1880,7 @@ static void CB2_EggHatch_0(void) SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); LoadPalette(gTradeGba2_Pal, 0x10, 0xA0); LoadBgTiles(1, gTradeGba_Gfx, 0x1420, 0); - CopyToBgTilemapBuffer(1, gUnknown_08331F60, 0x1000, 0); + CopyToBgTilemapBuffer(1, gUnknown_826601C, 0x1000, 0); CopyBgTilemapBufferToVram(1); gMain.state++; break; diff --git a/src/event_data.c b/src/event_data.c new file mode 100644 index 000000000..4aca57e50 --- /dev/null +++ b/src/event_data.c @@ -0,0 +1,325 @@ +#include "global.h" +#include "event_data.h" +#include "item_menu.h" +#include "quest_log.h" + +static bool8 IsFlagOrVarStoredInQuestLog(u16 idx, u8 a1); + +EWRAM_DATA u16 gSpecialVar_0x8000 = 0; +EWRAM_DATA u16 gSpecialVar_0x8001 = 0; +EWRAM_DATA u16 gSpecialVar_0x8002 = 0; +EWRAM_DATA u16 gSpecialVar_0x8003 = 0; +EWRAM_DATA u16 gSpecialVar_0x8004 = 0; +EWRAM_DATA u16 gSpecialVar_0x8005 = 0; +EWRAM_DATA u16 gSpecialVar_0x8006 = 0; +EWRAM_DATA u16 gSpecialVar_0x8007 = 0; +EWRAM_DATA u16 gSpecialVar_0x8008 = 0; +EWRAM_DATA u16 gSpecialVar_0x8009 = 0; +EWRAM_DATA u16 gSpecialVar_0x800A = 0; +EWRAM_DATA u16 gSpecialVar_0x800B = 0; +EWRAM_DATA u16 gSpecialVar_Result = 0; +EWRAM_DATA u16 gSpecialVar_LastTalked = 0; +EWRAM_DATA u16 gSpecialVar_Facing = 0; +EWRAM_DATA u16 gSpecialVar_MonBoxId = 0; +EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0; +EWRAM_DATA u16 gSpecialVar_TextColor = 0; +EWRAM_DATA u16 gSpecialVar_PrevTextColor = 0; +EWRAM_DATA u16 gUnknown_20370DE = 0; +EWRAM_DATA u8 sSpecialFlags[SPECIAL_FLAGS_COUNT] = {}; + +u16 gLastQuestLogStoredFlagOrVarIdx; + +extern u16 *const gSpecialVars[]; + +void InitEventData(void) +{ + memset(gSaveBlock1Ptr->flags, 0, FLAGS_COUNT); + memset(gSaveBlock1Ptr->vars, 0, VARS_COUNT * 2); + memset(sSpecialFlags, 0, SPECIAL_FLAGS_COUNT); +} + +void sub_806E110(void) +{ + memset(gSaveBlock1Ptr->flags, 0, 4); + memset(gSaveBlock1Ptr->vars, 0, 16 * 2); + FlagClear(FLAG_SYS_WHITE_FLUTE_ACTIVE); + FlagClear(FLAG_SYS_BLACK_FLUTE_ACTIVE); + FlagClear(FLAG_SYS_STRENGTH_ACTIVE); + FlagClear(FLAG_SYS_SPECIAL_WILD_BATTLE); + FlagClear(FLAG_SYS_INFORMED_OF_LOCAL_WIRELESS_PLAYER); +} + +void sub_806E168(void) +{ + u16 *ptr = GetVarPointer(VAR_0x403C); + gSaveBlock2Ptr->pokedex.nationalMagic = 0; + *ptr = 0; + FlagClear(FLAG_0x838); +} + +void sub_806E190(void) +{ + u16 *ptr = GetVarPointer(VAR_0x403C); + gSaveBlock2Ptr->pokedex.nationalMagic = 0xDA; + *ptr = 0x0302; + FlagSet(FLAG_0x838); +} + +bool32 sub_806E1C0(void) +{ + if (gSaveBlock2Ptr->pokedex.nationalMagic != 0xDA) + return FALSE; + if (VarGet(VAR_0x403C) != 0x0302) + return FALSE; + if (!FlagGet(FLAG_0x838)) + return FALSE; + return TRUE; +} + +void sub_806E204(void) +{ + u16 *ptr = GetVarPointer(VAR_0x404E); + gSaveBlock2Ptr->pokedex.unknown2 = 0; + *ptr = 0; + FlagClear(FLAG_SYS_NATIONAL_DEX); +} + +void EnableNationalPokedex(void) +{ + u16 *ptr = GetVarPointer(VAR_0x404E); + gSaveBlock2Ptr->pokedex.unknown2 = 0xB9; + *ptr = 0x6258; + FlagSet(FLAG_SYS_NATIONAL_DEX); +} + +bool32 IsNationalPokedexEnabled(void) +{ + if (gSaveBlock2Ptr->pokedex.unknown2 != 0xB9) + return FALSE; + if (VarGet(VAR_0x404E) != 0x6258) + return FALSE; + if (!FlagGet(FLAG_SYS_NATIONAL_DEX)) + return FALSE; + return TRUE; +} + +void DisableMysteryGift(void) +{ + FlagClear(FLAG_SYS_MYSTERY_GIFT_ENABLED); +} + +void EnableMysteryGift(void) +{ + FlagSet(FLAG_SYS_MYSTERY_GIFT_ENABLED); +} + +bool32 IsMysteryGiftEnabled(void) +{ + return FlagGet(FLAG_SYS_MYSTERY_GIFT_ENABLED); +} + +void sub_806E2D0(void) +{ + FlagClear(FLAG_MYSTERY_EVENT_DONE); + FlagClear(FLAG_0x3D9); + FlagClear(FLAG_0x3DA); + FlagClear(FLAG_0x3DB); + FlagClear(FLAG_0x3DC); + FlagClear(FLAG_0x3DD); + FlagClear(FLAG_0x3DE); + FlagClear(FLAG_0x3DF); + FlagClear(FLAG_0x3E0); + FlagClear(FLAG_0x3E1); + FlagClear(FLAG_0x3E2); + FlagClear(FLAG_0x3E3); + FlagClear(FLAG_0x3E4); + FlagClear(FLAG_0x3E5); + FlagClear(FLAG_0x3E6); + FlagClear(FLAG_0x3E7); +} + +void sub_806E370(void) +{ + VarSet(VAR_EVENT_PICHU_SLOT, 0); + VarSet(VAR_0x40B6, 0); + VarSet(VAR_0x40B7, 0); + VarSet(VAR_0x40B8, 0); + VarSet(VAR_0x40B9, 0); + VarSet(VAR_0x40BA, 0); + VarSet(VAR_0x40BB, 0); + VarSet(VAR_0x40BC, 0); + VarSet(VAR_ALTERING_CAVE_WILD_SET, 0); +} + +void DisableResetRTC(void) +{ + VarSet(VAR_0x4032, 0); + FlagClear(FLAG_0x837); +} + +void EnableResetRTC(void) +{ + VarSet(VAR_0x4032, 0x0920); + FlagSet(FLAG_0x837); +} + +bool32 CanResetRTC(void) +{ + if (!FlagGet(FLAG_0x837)) + return FALSE; + if (VarGet(VAR_0x4032) != 0x0920) + return FALSE; + return TRUE; +} + +u16 *GetVarPointer(u16 idx) +{ + u16 *ptr; + if (idx < VARS_START) + return NULL; + if (idx < SPECIAL_VARS_START) + { + switch (gUnknown_3005E88) + { + case 0: + default: + break; + case 1: + ptr = QuestLogGetFlagOrVarPtr(FALSE, idx); + if (ptr != NULL) + gSaveBlock1Ptr->vars[idx - VARS_START] = *ptr; + break; + case 2: + if (IsFlagOrVarStoredInQuestLog(idx - VARS_START, TRUE) == TRUE) + { + gLastQuestLogStoredFlagOrVarIdx = idx - VARS_START; + QuestLogSetFlagOrVar(FALSE, idx, gSaveBlock1Ptr->vars[idx - VARS_START]); + } + break; + } + return &gSaveBlock1Ptr->vars[idx - VARS_START]; + } + return gSpecialVars[idx - SPECIAL_VARS_START]; +} + +static bool8 IsFlagOrVarStoredInQuestLog(u16 idx, bool8 isVar) +{ + if (!isVar) + { + if (idx < STORY_FLAGS_START) + return FALSE; + if (idx >= SYS_FLAGS && idx < PERMA_SYS_FLAGS_START) + return FALSE; + } + else + { + if (idx < VAR_0x4030 - VARS_START) + return FALSE; + if (idx >= VAR_MAP_SCENE_PALLET_TOWN_OAK - VARS_START && idx < VAR_PORTHOLE - VARS_START) + return FALSE; + } + return TRUE; +} + +u16 VarGet(u16 idx) +{ + u16 *ptr = GetVarPointer(idx); + if (ptr == NULL) + return idx; + return *ptr; +} + +bool8 VarSet(u16 idx, u16 val) +{ + u16 *ptr = GetVarPointer(idx); + if (ptr == NULL) + return FALSE; + *ptr = val; + return TRUE; +} + +u8 VarGetFieldObjectGraphicsId(u8 idx) +{ + return VarGet(VAR_OBJ_GFX_ID_0 + idx); +} + +u8 *GetFlagAddr(u16 idx) +{ + u8 *ptr; + if (idx == 0) + return NULL; + if (idx < SPECIAL_FLAGS_START) + { + switch (gUnknown_3005E88) + { + case 0: + default: + break; + case 1: + ptr = QuestLogGetFlagOrVarPtr(TRUE, idx); + if (ptr != NULL) + gSaveBlock1Ptr->flags[idx >> 3] = *ptr; + break; + case 2: + if (IsFlagOrVarStoredInQuestLog(idx, FALSE) == TRUE) + { + gLastQuestLogStoredFlagOrVarIdx = idx; + QuestLogSetFlagOrVar(TRUE, idx, gSaveBlock1Ptr->flags[idx / 8]); + } + break; + } + return &gSaveBlock1Ptr->flags[idx / 8]; + } + return &sSpecialFlags[(idx - SPECIAL_FLAGS_START) / 8]; +} + +bool8 FlagSet(u16 idx) +{ + u8 *ptr = GetFlagAddr(idx); + if (ptr != NULL) + *ptr |= 1 << (idx & 7); + return FALSE; +} + +bool8 FlagClear(u16 idx) +{ + u8 *ptr = GetFlagAddr(idx); + if (ptr != NULL) + *ptr &= ~(1 << (idx & 7)); + return FALSE; +} + +bool8 FlagGet(u16 idx) +{ + u8 *ptr = GetFlagAddr(idx); + if (ptr == NULL) + return FALSE; + if (!(*ptr & 1 << (idx & 7))) + return FALSE; + return TRUE; +} + +void ResetSpecialVars(void) +{ + gSpecialVar_0x8000 = 0; + gSpecialVar_0x8001 = 0; + gSpecialVar_0x8002 = 0; + gSpecialVar_0x8003 = 0; + gSpecialVar_0x8004 = 0; + gSpecialVar_0x8005 = 0; + gSpecialVar_0x8006 = 0; + gSpecialVar_0x8007 = 0; + gSpecialVar_0x8008 = 0; + gSpecialVar_0x8009 = 0; + gSpecialVar_0x800A = 0; + gSpecialVar_0x800B = 0; + gSpecialVar_Facing = 0; + gSpecialVar_Result = 0; + gSpecialVar_ItemId = 0; + gSpecialVar_LastTalked = 0; + gSpecialVar_MonBoxId = 0; + gSpecialVar_MonBoxPos = 0; + gSpecialVar_TextColor = 0; + gSpecialVar_PrevTextColor = 0; + gUnknown_20370DE = 0; +} diff --git a/src/fame_checker.c b/src/fame_checker.c index e803a9700..8c8f5b4ea 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -26,6 +26,8 @@ #include "menu_indicators.h" #include "text_window.h" #include "fame_checker.h" +#include "strings.h" +#include "constants/trainers.h" #define SPRITETAG_SELECTOR_CURSOR 1000 #define SPRITETAG_QUESTION_MARK 1001 @@ -123,18 +125,6 @@ static void Task_FCOpenOrCloseInfoBox(u8 taskId); static void UpdateInfoBoxTilemap(u8 bg, s16 state); static void PlaceListMenuCursor(bool8 isActive); -extern const u8 gFameCheckerText_Cancel[]; -extern const u8 gFameCheckerText_ListMenuCursor[]; -extern const u8 gFameCheckerText_FameCheckerWillBeClosed[]; -extern const u8 gFameCheckerText_ClearTextbox[]; -extern const u8 gFameCheckerText_MainScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_A_BUTTON}OK$" -extern const u8 gFameCheckerText_PickScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_B_BUTTON}CANCEL$" -extern const u8 gFameCheckerText_FlavorTextUI[]; // "{KEYGFX_START_BUTTON}PICK {KEYGFX_A_BUTTON}READ {KEYGFX_B_BUTTON}CANCEL$" -extern const u8 gFameCheckerOakName[]; // "OAK$" -extern const u8 gFameCheckerDaisyName[]; // "DAISY$" -extern const u8 gFameCheckerBillName[]; // "BILL$" -extern const u8 gFameCheckerMrFujiName[]; // "FUJI$" - static const u16 sFameCheckerTilemap[] = INCBIN_U16("data/fame_checker/tilemap_845c600.bin"); static const u8 sQuestionMarkSpriteGfx[] = INCBIN_U8("data/fame_checker/img_845ce00.4bpp"); static const u8 sSpinningPokeballSpriteGfx[] = INCBIN_U8("data/fame_checker/img_845cf00.4bpp"); @@ -878,7 +868,7 @@ static void FC_DestroyWindow(u8 windowId) static u8 AdjustGiovanniIndexIfBeatenInGym(u8 a0) { - if (HasTrainerAlreadyBeenFought(0x15e) == TRUE) + if (HasTrainerBeenFought(TRAINER_LEADER_GIOVANNI) == TRUE) { if (a0 == 9) return FAMECHECKER_GIOVANNI; diff --git a/src/field_fadetransition.c b/src/field_fadetransition.c index 6a539b60e..58caad509 100644 --- a/src/field_fadetransition.c +++ b/src/field_fadetransition.c @@ -323,14 +323,14 @@ static void sub_807DFBC(u8 taskId) { case 0: // Never reached sub_807DCB0(0); - player_bitmagic(); + FreezeEventObjects(); PlayerGetDestCoords(x, y); FieldSetDoorOpened(*x, *y); task->data[0] = 1; break; case 5: sub_807DCB0(0); - player_bitmagic(); + FreezeEventObjects(); sub_807F114(); sub_807DBAC(); task->data[0] = 6; @@ -408,7 +408,7 @@ static void task_map_chg_seq_0807E20C(u8 taskId) { case 0: sub_807DCB0(0); - player_bitmagic(); + FreezeEventObjects(); PlayerGetDestCoords(x, y); task->data[0] = 1; break; @@ -439,7 +439,7 @@ static void task_map_chg_seq_0807E2CC(u8 taskId) switch (gTasks[taskId].data[0]) { case 0: - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); gTasks[taskId].data[0]++; break; @@ -459,7 +459,7 @@ static void sub_807E31C(u8 taskId) switch (gTasks[taskId].data[0]) { case 0: - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); sub_805DC04(); gTasks[taskId].data[0]++; @@ -639,7 +639,7 @@ static void sub_807E5EC(u8 taskId) } } -void sub_807E654(void) +void DoCableClubWarp(void) { ScriptContext2_Enable(); sub_8055F88(); @@ -689,7 +689,7 @@ static void sub_807E718(u8 taskId) switch (task->data[0]) { case 0: - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); task->data[0]++; break; @@ -711,7 +711,7 @@ static void sub_807E784(u8 taskId) switch (task->data[0]) { case 0: - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); PlaySE(SE_TK_WARPIN); sub_805DAB0(); @@ -744,7 +744,7 @@ static void sub_807E80C(u8 taskId) switch (task->data[0]) { case 0: - player_bitmagic(); + FreezeEventObjects(); PlayerGetDestCoords(xp, yp); PlaySE(GetDoorSoundEffect(*xp, *yp - 1)); task->data[1] = FieldAnimateDoorOpen(*xp, *yp - 1); @@ -798,7 +798,7 @@ static void sub_807E980(u8 taskId) { case 0: ScriptContext2_Enable(); - player_bitmagic(); + FreezeEventObjects(); CameraObjectReset2(); data[0]++; break; diff --git a/src/field_specials.c b/src/field_specials.c new file mode 100644 index 000000000..617faa017 --- /dev/null +++ b/src/field_specials.c @@ -0,0 +1,2506 @@ +#include "global.h" +#include "malloc.h" +#include "palette.h" +#include "quest_log.h" +#include "list_menu.h" +#include "diploma.h" +#include "script.h" +#include "field_player_avatar.h" +#include "overworld.h" +#include "field_message_box.h" +#include "event_data.h" +#include "string_util.h" +#include "strings.h" +#include "battle.h" +#include "fieldmap.h" +#include "field_specials.h" +#include "region_map.h" +#include "task.h" +#include "battle_tower.h" +#include "field_camera.h" +#include "field_effect.h" +#include "field_map_obj.h" +#include "menu_indicators.h" +#include "random.h" +#include "mail_data.h" +#include "help_system.h" +#include "sound.h" +#include "text.h" +#include "pokemon_storage_system.h" +#include "script_menu.h" +#include "data.h" +#include "pokedex.h" +#include "window.h" +#include "text_window.h" +#include "menu.h" +#include "mevent.h" +#include "naming_screen.h" +#include "party_menu.h" +#include "dynamic_placeholder_text_util.h" +#include "new_menu_helpers.h" +#include "constants/songs.h" +#include "constants/species.h" +#include "constants/items.h" +#include "constants/map_objects.h" +#include "constants/maps.h" +#include "constants/region_map.h" +#include "constants/moves.h" + +static EWRAM_DATA u8 sElevatorCurrentFloorWindowId = 0; +static EWRAM_DATA u16 sElevatorScroll = 0; +static EWRAM_DATA u16 sElevatorCursorPos = 0; +static EWRAM_DATA struct ListMenuItem * sListMenuItems = NULL; +static EWRAM_DATA u16 sListMenuLastScrollPosition = 0; +static EWRAM_DATA u8 sUnknownBoxId = 0; +static EWRAM_DATA u8 sBrailleTextCursorSpriteID = 0; + +struct ListMenuTemplate sFieldSpecialsListMenuTemplate; +u16 sFieldSpecialsListMenuScrollBuffer; + +static void Task_AnimatePcTurnOn(u8 taskId); +static void PcTurnOnUpdateMetatileId(bool16 flag); +static void Task_ShakeScreen(u8 taskId); +static void Task_EndScreenShake(u8 taskId); +static u16 SampleResortGorgeousMon(void); +static u16 SampleResortGorgeousReward(void); +static void Task_ElevatorShake(u8 taskId); +static void AnimateElevatorWindowView(u16 nfloors, bool8 direction); +static void Task_AnimateElevatorWindowView(u8 taskId); +static void Task_CreateScriptListMenu(u8 taskId); +static void CreateScriptListMenu(void); +static void ScriptListMenuMoveCursorFunction(s32 nothing, bool8 is, struct ListMenu * used); +static void Task_ListMenuHandleInput(u8 taskId); +static void Task_DestroyListMenu(u8 taskId); +static void Task_SuspendListMenu(u8 taskId); +static void Task_RedrawScrollArrowsAndWaitInput(u8 taskId); +static void Task_CreateMenuRemoveScrollIndicatorArrowPair(u8 taskId); +static void Task_ListMenuRemoveScrollIndicatorArrowPair(u8 taskId); +static u16 GetStarterPokemon(u16 starterIdx); +static void ChangeBoxPokemonNickname_CB(void); +static void ChangePokemonNickname_CB(void); +static void Task_RunPokemonLeagueLightingEffect(u8 taskId); +static void Task_CancelPokemonLeagueLightingEffect(u8 taskId); +static void task_deoxys_sound(u8 taskId); +static void MoveDeoxysObject(u8 num); +static void Task_WaitDeoxysFieldEffect(u8 taskId); +static void Task_WingFlapSound(u8 taskId); + +static u8 *const sStringVarPtrs[] = { + gStringVar1, + gStringVar2, + gStringVar3 +}; + +void Special_ShowDiploma(void) +{ + sub_8112364(); + SetMainCallback2(CB2_ShowDiploma); + ScriptContext2_Enable(); +} + +void Special_ForcePlayerOntoBike(void) +{ + if (gPlayerAvatar.flags & 1) + SetPlayerAvatarTransitionFlags(2); + Overworld_SetSavedMusic(MUS_CYCLING); + Overworld_ChangeMusicTo(MUS_CYCLING); +} + +void nullsub_74(void) +{ + +} + +u8 Special_GetPlayerAvatarBike(void) +{ + if (TestPlayerAvatarFlags(4)) + return 1; + else if (TestPlayerAvatarFlags(2)) + return 2; + else + return 0; +} + +void Special_ShowStringVar4AsFieldMessage(void) +{ + ShowFieldMessage(gStringVar4); +} + +void Special_GetPlayerXY(void) +{ + gSpecialVar_0x8004 = gSaveBlock1Ptr->pos.x; + gSpecialVar_0x8005 = gSaveBlock1Ptr->pos.y; +} + +u8 Special_GetPlayerTrainerIdOnesDigit(void) +{ + u16 playerId = (gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0]; + return playerId % 10; +} + +void Special_BufferBigGuyOrBigGirlString(void) +{ + if (gSaveBlock2Ptr->playerGender == MALE) + StringCopy(gStringVar1, gText_BigGuy); + else + StringCopy(gStringVar1, gText_BigGirl); +} + +void Special_BufferSonOrDaughterString(void) +{ + if (gSaveBlock2Ptr->playerGender == MALE) + StringCopy(gStringVar1, gText_Son); + else + StringCopy(gStringVar1, gText_Daughter); +} + +u8 Special_GetBattleOutcome(void) +{ + return gBattleOutcome; +} + +void Special_SetHiddenItemFlag(void) +{ + FlagSet(gSpecialVar_0x8004); +} + +u8 Special_GetLeadMonFriendship(void) +{ + struct Pokemon * pokemon = &gPlayerParty[GetLeadMonIndex()]; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == 255) + return 6; + else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) + return 5; + else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) + return 4; + else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) + return 3; + else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) + return 2; + else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) > 0) + return 1; + else + return 0; +} + +void Special_TownMap(void) +{ + sub_8112364(); + sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic); +} + +bool8 Special_PlayerHasGrassPokemonInParty(void) +{ + u8 i; + struct Pokemon * pokemon; + u16 species; + + for (i = 0; i < PARTY_SIZE; i++) + { + pokemon = &gPlayerParty[i]; + if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) + && !GetMonData(pokemon, MON_DATA_IS_EGG) + ) + { + species = GetMonData(pokemon, MON_DATA_SPECIES); + if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS) + return TRUE; + } + } + return FALSE; +} + +void Special_AnimatePcTurnOn(void) +{ + u8 taskId; + + if (FuncIsActiveTask(Task_AnimatePcTurnOn) != TRUE) + { + taskId = CreateTask(Task_AnimatePcTurnOn, 8); + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[1] = 0; + } +} + +static void Task_AnimatePcTurnOn(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + if (data[1] == 6) + { + PcTurnOnUpdateMetatileId(data[0] & 1); + DrawWholeMapView(); + data[1] = 0; + data[0]++; + if (data[0] == 5) + DestroyTask(taskId); + } + data[1]++; +} + +static void PcTurnOnUpdateMetatileId(bool16 a0) +{ + u16 metatileId = 0; + s8 deltaX = 0; + s8 deltaY = 0; + u8 direction = GetPlayerFacingDirection(); + + switch (direction) + { + case DIR_NORTH: + deltaX = 0; + deltaY = -1; + break; + case DIR_WEST: + deltaX = -1; + deltaY = -1; + break; + case DIR_EAST: + deltaX = 1; + deltaY = -1; + break; + } + if (a0) + { + if (gSpecialVar_0x8004 == 0) + metatileId = 0x62; + else if (gSpecialVar_0x8004 == 1) + metatileId = 0x28F; + else if (gSpecialVar_0x8004 == 2) + metatileId = 0x28F; + } + else + { + if (gSpecialVar_0x8004 == 0) + metatileId = 0x63; + else if (gSpecialVar_0x8004 == 1) + metatileId = 0x28A; + else if (gSpecialVar_0x8004 == 2) + metatileId = 0x28A; + } + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00); +} + +void Special_AnimatePcTurnOff() +{ + u16 metatileId = 0; + s8 deltaX = 0; + s8 deltaY = 0; + u8 direction = GetPlayerFacingDirection(); + + switch (direction) + { + case DIR_NORTH: + deltaX = 0; + deltaY = -1; + break; + case DIR_WEST: + deltaX = -1; + deltaY = -1; + break; + case DIR_EAST: + deltaX = 1; + deltaY = -1; + break; + } + if (gSpecialVar_0x8004 == 0) + metatileId = 0x62; + else if (gSpecialVar_0x8004 == 1) + metatileId = 0x28F; + else if (gSpecialVar_0x8004 == 2) + metatileId = 0x28F; + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00); + DrawWholeMapView(); +} + +void SpawnCameraObject(void) +{ + u8 mapObjectId = SpawnSpecialFieldObjectParameterized(MAP_OBJ_GFX_YOUNGSTER, 8, 127, gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7, 3); + gMapObjects[mapObjectId].mapobj_bit_13 = TRUE; + CameraObjectSetFollowedObjectId(gMapObjects[mapObjectId].spriteId); +} + +void RemoveCameraObject(void) +{ + CameraObjectSetFollowedObjectId(GetPlayerAvatarObjectId()); + RemoveFieldObjectByLocalIdAndMap(127, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); +} + +void Special_BufferEReaderTrainerName5(void) +{ + CopyEReaderTrainerName5(gStringVar1); +} + +static const u8 sUnused_83F5B04[] = { + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 12, + 2, + 4, + 5, + 1, + 8, + 7, + 11, + 3, + 10, + 9, + 6 +}; + +static const u8 sSlotMachineIndices[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 2, + 2, + 3, + 3, + 3, + 4, + 4, + 5 +}; + +u8 Special_GetRandomSlotMachine(void) +{ + u16 rval = Random() % NELEMS(sSlotMachineIndices); + return sSlotMachineIndices[rval]; +} + +bool8 LeadMonHasEffortRibbon(void) +{ + u8 leadMonIdx = GetLeadMonIndex(); + return GetMonData(&gPlayerParty[leadMonIdx], MON_DATA_EFFORT_RIBBON, NULL); +} + +void GiveLeadMonEffortRibbon(void) +{ + u8 leadMonIdx; + bool8 param; + IncrementGameStat(GAME_STAT_RECEIVED_RIBBONS); + FlagSet(FLAG_SYS_RIBBON_GET); + param = TRUE; + leadMonIdx = GetLeadMonIndex(); + SetMonData(&gPlayerParty[leadMonIdx], MON_DATA_EFFORT_RIBBON, ¶m); +} + +bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void) +{ + u8 leadMonIndex = GetLeadMonIndex(); + if (GetMonEVCount(&gPlayerParty[leadMonIndex]) >= 510) + return TRUE; + else + return FALSE; +} + +bool8 Special_IsStarterFirstStageInParty(void) +{ + u16 species = GetStarterPokemon(VarGet(VAR_STARTER_MON)); + u8 partyCount = CalculatePlayerPartyCount(); + u8 i; + for (i = 0; i < partyCount; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == species) + return TRUE; + } + return FALSE; +} + +bool8 Special_IsThereRoomInAnyBoxForMorePokemon(void) +{ + u16 i; + u16 j; + for (i = 0; i < TOTAL_BOXES_COUNT; i++) + { + for (j = 0; j < IN_BOX_COUNT; j++) + { + if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE) + return TRUE; + } + } + return FALSE; +} + +bool8 Special_CheckPartyPokerus(void) +{ + if (!CheckPartyPokerus(gPlayerParty, 0x3F)) + return FALSE; + else + return TRUE; +} + +#define tXtrans data[0] +#define tTimer data[1] +#define tNremain data[2] +#define tDuration data[3] +#define tYtrans data[4] + +void Special_ShakeScreen(void) +{ + /* + * 0x8004 = x translation + * 0x8005 = y translation + * 0x8006 = num interations + * 0x8007 = duration of an iteration + */ + u8 taskId = CreateTask(Task_ShakeScreen, 9); + gTasks[taskId].tXtrans = gSpecialVar_0x8005; + gTasks[taskId].tTimer = 0; + gTasks[taskId].tNremain = gSpecialVar_0x8006; + gTasks[taskId].tDuration = gSpecialVar_0x8007; + gTasks[taskId].tYtrans = gSpecialVar_0x8004; + SetCameraPanningCallback(NULL); + PlaySE(SE_W070); +} + +static void Task_ShakeScreen(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + tTimer++; + if (tTimer % tDuration == 0) + { + tTimer = 0; + tNremain--; + tXtrans = -tXtrans; + tYtrans = -tYtrans; + SetCameraPanning(tXtrans, tYtrans); + if (tNremain == 0) + { + Task_EndScreenShake(taskId); + InstallCameraPanAheadCallback(); + } + } +} + +static void Task_EndScreenShake(u8 taskId) +{ + DestroyTask(taskId); + EnableBothScriptContexts(); +} + +#undef tYtrans +#undef tDuration +#undef tNremain +#undef tTimer +#undef tXtrans + +u8 GetLeadMonIndex(void) +{ + u8 partyCount = CalculatePlayerPartyCount(); + u8 i; + struct Pokemon * pokemon; + 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) + return i; + } + return 0; +} + +u16 Special_GetSpeciesOfPartySlot_x8004(void) +{ + return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL); +} + +bool8 Special_BufferMonOTNameAndCompareToPlayerName(void) +{ + GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_NAME, gStringVar1); + if (!StringCompare(gSaveBlock2Ptr->playerName, gStringVar1)) + return FALSE; + else + return TRUE; +} + +void nullsub_75(void) +{ + +} + +void sub_80CADC4(void) +{ + u8 t = EOS; + AddTextPrinterParameterized(0, 2, &t, 0, 1, 0, NULL); + sub_809D424(); +} + +void Special_SetVermilionTrashCans(void) +{ + u16 idx = (Random() % 15) + 1; + gSpecialVar_0x8004 = idx; + gSpecialVar_0x8005 = idx; + switch (gSpecialVar_0x8004) + { + case 1: + idx = Random() % 2; + if (idx == 0) + gSpecialVar_0x8005 += 1; + else + gSpecialVar_0x8005 += 5; + break; + case 2: + case 3: + case 4: + idx = Random() % 3; + if (idx == 0) + gSpecialVar_0x8005 += 1; + else if (idx == 1) + gSpecialVar_0x8005 += 5; + else + gSpecialVar_0x8005 -= 1; + break; + case 5: + idx = Random() % 2; + if (idx == 0) + gSpecialVar_0x8005 += 5; + else + gSpecialVar_0x8005 -= 1; + break; + case 6: + idx = Random() % 3; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else if (idx == 1) + gSpecialVar_0x8005 += 1; + else + gSpecialVar_0x8005 += 5; + break; + case 7: + case 8: + case 9: + idx = Random() % 4; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else if (idx == 1) + gSpecialVar_0x8005 += 1; + else if (idx == 2) + gSpecialVar_0x8005 += 5; + else + gSpecialVar_0x8005 -= 1; + break; + case 10: + idx = Random() % 3; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else if (idx == 1) + gSpecialVar_0x8005 += 5; + else + gSpecialVar_0x8005 -= 1; + break; + case 11: + idx = Random() % 2; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else + gSpecialVar_0x8005 += 1; + break; + case 12: + case 13: + case 14: + idx = Random() % 3; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else if (idx == 1) + gSpecialVar_0x8005 += 1; + else + gSpecialVar_0x8005 -= 1; + break; + case 15: + idx = Random() % 2; + if (idx == 0) + gSpecialVar_0x8005 -= 5; + else + gSpecialVar_0x8005 -= 1; + break; + } + if (gSpecialVar_0x8005 > 15) + { + if (gSpecialVar_0x8004 % 5 == 1) + gSpecialVar_0x8005 = gSpecialVar_0x8004 + 1; + else if (gSpecialVar_0x8004 % 5 == 0) + gSpecialVar_0x8005 = gSpecialVar_0x8004 - 1; + else + gSpecialVar_0x8005 = gSpecialVar_0x8004 + 1; + } +} + +static const u16 sResortGorgeousDeluxeRewards[] = { + ITEM_BIG_PEARL, + ITEM_PEARL, + ITEM_STARDUST, + ITEM_STAR_PIECE, + ITEM_NUGGET, + ITEM_RARE_CANDY +}; + +void IncrementResortGorgeousStepCounter(void) +{ + u16 var4035 = VarGet(VAR_RESORT_GOREGEOUS_STEP_COUNTER); + if (VarGet(VAR_RESORT_GORGEOUS_REQUESTED_MON) != SPECIES_NONE) + { + var4035++; + if (var4035 >= 250) + { + VarSet(VAR_RESORT_GORGEOUS_REQUESTED_MON, 0xFFFF); + VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, 0); + } + else + { + VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, var4035); + } + } +} + +void Special_SampleResortGorgeousMonAndReward(void) +{ + u16 var4036 = VarGet(VAR_RESORT_GORGEOUS_REQUESTED_MON); + if (var4036 == SPECIES_NONE || var4036 == 0xFFFF) + { + VarSet(VAR_RESORT_GORGEOUS_REQUESTED_MON, SampleResortGorgeousMon()); + VarSet(VAR_RESORT_GORGEOUS_REWARD, SampleResortGorgeousReward()); + VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, 0); + } + StringCopy(gStringVar1, gSpeciesNames[VarGet(VAR_RESORT_GORGEOUS_REQUESTED_MON)]); +} + +static u16 SampleResortGorgeousMon(void) +{ + u16 i; + u16 species; + for (i = 0; i < 100; i++) + { + species = (Random() % (NUM_SPECIES - 1)) + 1; + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), 0) == TRUE) + return species; + } + while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), 0) != TRUE) + { + if (species == SPECIES_BULBASAUR) + species = NUM_SPECIES - 1; + else + species--; + } + return species; +} + +static u16 SampleResortGorgeousReward(void) +{ + if ((Random() % 100) >= 30) + return ITEM_LUXURY_BALL; + else + return sResortGorgeousDeluxeRewards[Random() % NELEMS(sResortGorgeousDeluxeRewards)]; +} + +bool8 Special_CheckAddCoins(void) +{ + if (gSpecialVar_Result + gSpecialVar_0x8006 > 9999) + return FALSE; + else + return TRUE; +} + +static const struct WindowTemplate sElevatorCurrentFloorWindowTemplate = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 1, + .width = 7, + .height = 4, + .paletteNum = 0xF, + .baseBlock = 0x008 +}; + +static const u8 *const sFloorNamePointers[] = { + gText_B4F, + gText_B3F, + gText_B2F, + gText_B1F, + gText_1F, + gText_2F, + gText_3F, + gText_4F, + gText_5F, + gText_6F, + gText_7F, + gText_8F, + gText_9F, + gText_10F, + gText_11F, + gText_Rooftop +}; + +static const u8 sUnused_83F5B84[] = { + 26, + 26, + 26, + 26, + 30, + 30, + 30, + 30, + 30, + 30, + 30, + 30, + 30, + 26, + 26, + 18 +}; + +static const u16 sElevatorWindowMetatilesGoingUp[][3] = { + {0x2e8, 0x2e9, 0x2ea}, + {0x2f0, 0x2f1, 0x2f2}, + {0x2f8, 0x2f9, 0x2fa} +}; + +static const u16 sElevatorWindowMetatilesGoingDown[][3] = { + {0x2e8, 0x2ea, 0x2e9}, + {0x2f0, 0x2f2, 0x2f1}, + {0x2f8, 0x2fa, 0x2f9} +}; + +static const u8 sElevatorAnimationDuration[] = { + 8, + 16, + 24, + 32, + 38, + 46, + 53, + 56, + 57 +}; + +static const u8 sElevatorWindowAnimDuration[] = { + 3, + 6, + 9, + 12, + 15, + 18, + 21, + 24, + 27 +}; + +void Special_GetElevatorFloor(void) +{ + u16 floor = 4; + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(SILPH_CO_1F): + floor = 4; + break; + case MAP_NUM(SILPH_CO_2F): + floor = 5; + break; + case MAP_NUM(SILPH_CO_3F): + floor = 6; + break; + case MAP_NUM(SILPH_CO_4F): + floor = 7; + break; + case MAP_NUM(SILPH_CO_5F): + floor = 8; + break; + case MAP_NUM(SILPH_CO_6F): + floor = 9; + break; + case MAP_NUM(SILPH_CO_7F): + floor = 10; + break; + case MAP_NUM(SILPH_CO_8F): + floor = 11; + break; + case MAP_NUM(SILPH_CO_9F): + floor = 12; + break; + case MAP_NUM(SILPH_CO_10F): + floor = 13; + break; + case MAP_NUM(SILPH_CO_11F): + floor = 14; + break; + case MAP_NUM(ROCKET_HIDEOUT_B1F): + floor = 3; + break; + case MAP_NUM(ROCKET_HIDEOUT_B2F): + floor = 2; + break; + case MAP_NUM(ROCKET_HIDEOUT_B4F): + floor = 0; + break; + } + } + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F): + floor = 4; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_2F): + floor = 5; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_3F): + floor = 6; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_4F): + floor = 7; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F): + floor = 8; + break; + } + } + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER_1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_1F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_2F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_3F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_4F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_5F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_6F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_7F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_8F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_ROOF): + floor = 15; + break; + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_LOBBY): + floor = 3; + break; + } + } + VarSet(VAR_ELEVATOR_FLOOR, floor); +} + +u16 Special_InitElevatorFloorSelectMenuPos(void) +{ + sElevatorScroll = 0; + sElevatorCursorPos = 0; + + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(SILPH_CO_11F): + sElevatorScroll = 0; + sElevatorCursorPos = 0; + break; + case MAP_NUM(SILPH_CO_10F): + sElevatorScroll = 0; + sElevatorCursorPos = 1; + break; + case MAP_NUM(SILPH_CO_9F): + sElevatorScroll = 0; + sElevatorCursorPos = 2; + break; + case MAP_NUM(SILPH_CO_8F): + sElevatorScroll = 0; + sElevatorCursorPos = 3; + break; + case MAP_NUM(SILPH_CO_7F): + sElevatorScroll = 0; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_6F): + sElevatorScroll = 1; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_5F): + sElevatorScroll = 2; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_4F): + sElevatorScroll = 3; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_3F): + sElevatorScroll = 4; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_2F): + sElevatorScroll = 5; + sElevatorCursorPos = 4; + break; + case MAP_NUM(SILPH_CO_1F): + sElevatorScroll = 5; + sElevatorCursorPos = 5; + break; + case MAP_NUM(ROCKET_HIDEOUT_B1F): + sElevatorScroll = 0; + sElevatorCursorPos = 0; + break; + case MAP_NUM(ROCKET_HIDEOUT_B2F): + sElevatorScroll = 0; + sElevatorCursorPos = 1; + break; + case MAP_NUM(ROCKET_HIDEOUT_B4F): + sElevatorScroll = 0; + sElevatorCursorPos = 2; + break; + } + } + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F): + sElevatorScroll = 0; + sElevatorCursorPos = 0; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_4F): + sElevatorScroll = 0; + sElevatorCursorPos = 1; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_3F): + sElevatorScroll = 0; + sElevatorCursorPos = 2; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_2F): + sElevatorScroll = 0; + sElevatorCursorPos = 3; + break; + case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F): + sElevatorScroll = 0; + sElevatorCursorPos = 4; + break; + } + } + if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER_1F)) + { + switch (gSaveBlock1Ptr->warp2.mapNum) + { + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_1F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_2F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_3F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_4F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_5F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_6F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_7F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_8F): + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_ROOF): + sElevatorScroll = 0; + sElevatorCursorPos = 0; + break; + case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_LOBBY): + sElevatorScroll = 0; + sElevatorCursorPos = 1; + break; + } + } + return sElevatorCursorPos; +} + +void Special_AnimateElevator(void) +{ + u16 nfloors; + s16 *data = gTasks[CreateTask(Task_ElevatorShake, 9)].data; + data[1] = 0; + data[2] = 0; + data[4] = 1; + if (gSpecialVar_0x8005 > gSpecialVar_0x8006) + { + nfloors = gSpecialVar_0x8005 - gSpecialVar_0x8006; + data[6] = 1; + } + else + { + nfloors = gSpecialVar_0x8006 - gSpecialVar_0x8005; + data[6] = 0; + } + if (nfloors > 8) + nfloors = 8; + data[5] = sElevatorAnimationDuration[nfloors]; + SetCameraPanningCallback(NULL); + AnimateElevatorWindowView(nfloors, data[6]); + PlaySE(SE_ELEBETA); +} + +static void Task_ElevatorShake(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + data[1]++; + if ((data[1] % 3) == 0) + { + data[1] = 0; + data[2]++; + data[4] = -data[4]; + SetCameraPanning(0, data[4]); + if (data[2] == data[5]) + { + PlaySE(SE_PINPON); + DestroyTask(taskId); + EnableBothScriptContexts(); + InstallCameraPanAheadCallback(); + } + } +} + +void Special_DrawElevatorCurrentFloorWindow(void) +{ + const u8 *floorname; + u32 strwidth; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) + { + sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate); + TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0); + DrawStdFrameWithCustomTileAndPalette(sElevatorCurrentFloorWindowId, FALSE, 0x21D, 0xD); + AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, gText_NowOn, 0, 2, 0xFF, NULL); + floorname = sFloorNamePointers[gSpecialVar_0x8005]; + strwidth = GetStringWidth(2, floorname, 0); + AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, floorname, 56 - strwidth, 16, 0xFF, NULL); + PutWindowTilemap(sElevatorCurrentFloorWindowId); + CopyWindowToVram(sElevatorCurrentFloorWindowId, 3); + } +} + +void Special_CloseElevatorCurrentFloorWindow(void) +{ + ClearStdWindowAndFrameToTransparent(sElevatorCurrentFloorWindowId, TRUE); + RemoveWindow(sElevatorCurrentFloorWindowId); +} + +static void AnimateElevatorWindowView(u16 nfloors, u8 direction) +{ + u8 taskId; + if (FuncIsActiveTask(Task_AnimateElevatorWindowView) != TRUE) + { + taskId = CreateTask(Task_AnimateElevatorWindowView, 8); + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = direction; + gTasks[taskId].data[3] = sElevatorWindowAnimDuration[nfloors]; + } +} + +static void Task_AnimateElevatorWindowView(u8 taskId) +{ + u8 i; + u8 j; + s16 *data = gTasks[taskId].data; + if (data[1] == 6) + { + data[0]++; + if (data[2] == 0) + { + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingUp[i][data[0] % 3] | 0xC00); + } + } + } + else + { + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingDown[i][data[0] % 3] | 0xC00); + } + } + } + DrawWholeMapView(); + data[1] = 0; + if (data[0] == data[3]) + DestroyTask(taskId); + } + data[1]++; +} + +void Special_ListMenu(void) +{ + u8 taskId; + struct Task * task; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) + { + taskId = CreateTask(Task_CreateScriptListMenu, 8); + task = &gTasks[taskId]; + switch (gSpecialVar_0x8004) + { + case 0: + task->data[0] = 4; + task->data[1] = 9; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 12; + task->data[5] = 7; + task->data[6] = 1; + task->data[15] = taskId; + break; + case 1: + task->data[0] = 7; + task->data[1] = 12; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 8; + task->data[5] = 12; + task->data[6] = 0; + task->data[15] = taskId; + task->data[7] = sElevatorScroll; + task->data[8] = sElevatorCursorPos; + break; + case 2: + task->data[0] = 4; + task->data[1] = 4; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 8; + task->data[5] = 8; + task->data[6] = 0; + task->data[15] = taskId; + break; + case 3: + task->data[0] = 4; + task->data[1] = 6; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 8; + task->data[5] = 8; + task->data[6] = 0; + task->data[15] = taskId; + break; + case 4: + task->data[0] = 4; + task->data[1] = 4; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 17; + task->data[5] = 8; + task->data[6] = 1; + task->data[15] = taskId; + break; + case 5: + task->data[0] = 7; + task->data[1] = 12; + task->data[2] = 16; + task->data[3] = 1; + task->data[4] = 17; + task->data[5] = 12; + task->data[6] = 0; + task->data[15] = taskId; + break; + case 6: + task->data[0] = 3; + task->data[1] = 3; + task->data[2] = 1; + task->data[3] = 1; + task->data[4] = 8; + task->data[5] = 6; + task->data[6] = 0; + task->data[15] = taskId; + break; + case 99: + break; + default: + gSpecialVar_Result = 0x7F; + DestroyTask(taskId); + break; + } + } +} + +static const u8 *const sListMenuLabels[][12] = { + { + gText_BoulderBadge, + gText_CascadeBadge, + gText_ThunderBadge, + gText_RainbowBadge, + gText_SoulBadge, + gText_MarshBadge, + gText_VolcanoBadge, + gText_EarthBadge, + gOtherText_Exit, + }, { + gText_11F, + gText_10F, + gText_9F, + gText_8F, + gText_7F, + gText_6F, + gText_5F, + gText_4F, + gText_3F, + gText_2F, + gText_1F, + gOtherText_Exit, + }, { + gText_B1F, + gText_B2F, + gText_B4F, + gOtherText_Exit, + }, { + gText_5F, + gText_4F, + gText_3F, + gText_2F, + gText_1F, + gOtherText_Exit, + }, { + gText_LinkedGamePlay, + gText_DirectCorner, + gText_UnionRoom, + gOtherText_Quit, + }, { + gText_Energypowder_50, + gText_EnergyRoot_80, + gText_HealPowder_50, + gText_RevivalHerb_300, + gText_Protein_1000, + gText_Iron_1000, + gText_Carbos_1000, + gText_Calcium_1000, + gText_Zinc_1000, + gText_HpUp_1000, + gText_PpUp_3000, + gOtherText_Exit, + }, { + gText_Rooftop, + gText_B1F, + gOtherText_Exit, + } +}; + +static void Task_CreateScriptListMenu(u8 taskId) +{ + struct WindowTemplate template; + u8 i; + s32 width; + s32 mwidth; + struct Task * task = &gTasks[taskId]; + u8 windowId; + ScriptContext2_Enable(); + if (gSpecialVar_0x8004 == 1) + sListMenuLastScrollPosition = sElevatorScroll; + else + sListMenuLastScrollPosition = 0; + sListMenuItems = AllocZeroed(task->data[1] * sizeof(struct ListMenuItem)); + CreateScriptListMenu(); + mwidth = 0; + for (i = 0; i < task->data[1]; i++) + { + sListMenuItems[i].label = sListMenuLabels[gSpecialVar_0x8004][i]; + sListMenuItems[i].index = i; + width = GetStringWidth(2, sListMenuItems[i].label, 0); + if (width > mwidth) + mwidth = width; + } + task->data[4] = (mwidth + 9) / 8 + 1; + if (task->data[2] + task->data[4] > 29) + task->data[2] = 29 - task->data[4]; + template = SetWindowTemplateFields(0, task->data[2], task->data[3], task->data[4], task->data[5], 15, 0x038); + task->data[13] = windowId = AddWindow(&template); + SetStdWindowBorderStyle(task->data[13], 0); + sFieldSpecialsListMenuTemplate.totalItems = task->data[1]; + sFieldSpecialsListMenuTemplate.maxShowed = task->data[0]; + sFieldSpecialsListMenuTemplate.windowId = task->data[13]; + Task_CreateMenuRemoveScrollIndicatorArrowPair(taskId); + task->data[14] = ListMenuInit(&sFieldSpecialsListMenuTemplate, task->data[7], task->data[8]); + PutWindowTilemap(task->data[13]); + CopyWindowToVram(task->data[13], 3); + gTasks[taskId].func = Task_ListMenuHandleInput; +} + +static void CreateScriptListMenu(void) +{ + sFieldSpecialsListMenuTemplate.items = sListMenuItems; + sFieldSpecialsListMenuTemplate.moveCursorFunc = ScriptListMenuMoveCursorFunction; + sFieldSpecialsListMenuTemplate.itemPrintFunc = NULL; + sFieldSpecialsListMenuTemplate.totalItems = 1; + sFieldSpecialsListMenuTemplate.maxShowed = 1; + sFieldSpecialsListMenuTemplate.windowId = 0; + sFieldSpecialsListMenuTemplate.header_X = 0; + sFieldSpecialsListMenuTemplate.item_X = 8; + sFieldSpecialsListMenuTemplate.cursor_X = 0; + sFieldSpecialsListMenuTemplate.upText_Y = 0; + sFieldSpecialsListMenuTemplate.cursorPal = 2; + sFieldSpecialsListMenuTemplate.fillValue = 1; + sFieldSpecialsListMenuTemplate.cursorShadowPal = 3; + sFieldSpecialsListMenuTemplate.lettersSpacing = 1; + sFieldSpecialsListMenuTemplate.itemVerticalPadding = 0; + sFieldSpecialsListMenuTemplate.scrollMultiple = 0; + sFieldSpecialsListMenuTemplate.fontId = 2; + sFieldSpecialsListMenuTemplate.cursorKind = 0; +} + +static void ScriptListMenuMoveCursorFunction(s32 nothing, bool8 is, struct ListMenu * used) +{ + u8 taskId; + struct Task * task; + PlaySE(SE_SELECT); + taskId = FindTaskIdByFunc(Task_ListMenuHandleInput); + if (taskId != 0xFF) + { + task = &gTasks[taskId]; + ListMenuGetScrollAndRow(task->data[14], &sFieldSpecialsListMenuScrollBuffer, NULL); + sListMenuLastScrollPosition = sFieldSpecialsListMenuScrollBuffer; + } +} + +static void Task_ListMenuHandleInput(u8 taskId) +{ + s32 input; + struct Task * task; + + task = &gTasks[taskId]; + task++;task--; + input = ListMenu_ProcessInput(task->data[14]); + switch (input) + { + case -1: + break; + case -2: + gSpecialVar_Result = 0x7F; + PlaySE(SE_SELECT); + Task_DestroyListMenu(taskId); + break; + default: + gSpecialVar_Result = input; + PlaySE(SE_SELECT); + if (task->data[6] == 0 || input == task->data[1] - 1) + { + Task_DestroyListMenu(taskId); + } + else + { + Task_ListMenuRemoveScrollIndicatorArrowPair(taskId); + task->func = Task_SuspendListMenu; + EnableBothScriptContexts(); + } + break; + } +} + +static void Task_DestroyListMenu(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + Task_ListMenuRemoveScrollIndicatorArrowPair(taskId); + DestroyListMenuTask(task->data[14], NULL, NULL); + Free(sListMenuItems); + ClearStdWindowAndFrameToTransparent(task->data[13], TRUE); + FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0)); + ClearWindowTilemap(task->data[13]); + CopyWindowToVram(task->data[13], 2); + RemoveWindow(task->data[13]); + DestroyTask(taskId); + EnableBothScriptContexts(); +} + +static void Task_SuspendListMenu(u8 taskId) +{ + switch (gTasks[taskId].data[6]) + { + case 1: + break; + case 2: + gTasks[taskId].data[6] = 1; + gTasks[taskId].func = Task_RedrawScrollArrowsAndWaitInput; + break; + } +} + +void Special_ReturnToListMenu(void) +{ + u8 taskId = FindTaskIdByFunc(Task_SuspendListMenu); + if (taskId == 0xFF) + EnableBothScriptContexts(); + else + gTasks[taskId].data[6]++; +} + +static void Task_RedrawScrollArrowsAndWaitInput(u8 taskId) +{ + ScriptContext2_Enable(); + Task_CreateMenuRemoveScrollIndicatorArrowPair(taskId); + gTasks[taskId].func = Task_ListMenuHandleInput; +} + +static void Task_CreateMenuRemoveScrollIndicatorArrowPair(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + struct ScrollArrowsTemplate template = { + .firstArrowType = 2, + .secondArrowType = 3, + .tileTag = 2000, + .palTag = 100 + }; + if (task->data[0] != task->data[1]) + { + template.firstX = 4 * task->data[4] + 8 * task->data[2]; + template.firstY = 8; + template.secondX = 4 * task->data[4] + 8 * task->data[2]; + template.secondY = 8 * task->data[5] + 10; + template.fullyUpThreshold = 0; + template.fullyDownThreshold = task->data[1] - task->data[0]; + task->data[12] = AddScrollIndicatorArrowPair(&template, &sListMenuLastScrollPosition); + } +} + +static void Task_ListMenuRemoveScrollIndicatorArrowPair(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + if (task->data[0] != task->data[1]) + RemoveScrollIndicatorArrowPair(task->data[12]); +} + +void Special_ForcePlayerToStartSurfing(void) +{ + HelpSystem_SetSomeVariable2(22); + SetPlayerAvatarTransitionFlags(8); +} + +static const u16 sStarterMon[] = { + SPECIES_BULBASAUR, + SPECIES_SQUIRTLE, + SPECIES_CHARMANDER +}; + +static u16 GetStarterPokemon(u16 idx) +{ + if (idx >= NELEMS(sStarterMon)) + idx = 0; + return sStarterMon[idx]; +} + +u16 ScrSpecial_GetStarter(void) +{ + return GetStarterPokemon(VarGet(VAR_STARTER_MON)); +} + +void Special_SetSeenMon(void) +{ + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gSpecialVar_0x8004), 2); +} + +void sub_80CBDE8(void) +{ + gSelectedEventObject = 0; + gSpecialVar_TextColor = 0xFF; +} + +u8 ContextNpcGetTextColor(void) +{ + u8 gfxId; + if (gSpecialVar_TextColor != 0xFF) + return gSpecialVar_TextColor; + else if (gSelectedEventObject == 0) + return 3; + else + { + gfxId = gMapObjects[gSelectedEventObject].graphicsId; + if (gfxId >= MAP_OBJ_GFX_VAR_0) + gfxId = VarGetFieldObjectGraphicsId(gfxId - MAP_OBJ_GFX_VAR_0); + return GetColorFromTextColorTable(gfxId); + } +} + +static bool8 HasMonBeenRenamed(u8 idx) +{ + struct Pokemon * pokemon = &gPlayerParty[idx]; + u8 language; + GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1); + language = GetMonData(pokemon, MON_DATA_LANGUAGE, &language); + if (language != LANGUAGE_ENGLISH) + return TRUE; + else if (StringCompare(gSpeciesNames[GetMonData(pokemon, MON_DATA_SPECIES, NULL)], gStringVar1) != 0) + return TRUE; + else + return FALSE; +} + +bool8 Special_HasLeadMonBeenRenamed(void) +{ + return HasMonBeenRenamed(GetLeadMonIndex()); +} + +void TV_PrintIntToStringVar(u8 varidx, s32 number) +{ + s32 n = CountDigits(number); + ConvertIntToDecimalStringN(sStringVarPtrs[varidx], number, STR_CONV_MODE_LEFT_ALIGN, n); +} + +s32 CountDigits(s32 number) +{ + if (number / 10 == 0) + return 1; + else if (number / 100 == 0) + return 2; + else if (number / 1000 == 0) + return 3; + else if (number / 10000 == 0) + return 4; + else if (number / 100000 == 0) + return 5; + else if (number / 1000000 == 0) + return 6; + else if (number / 10000000 == 0) + return 7; + else if (number / 100000000 == 0) + return 8; + else + return 1; +} + +bool8 NameRaterWasNicknameChanged(void) +{ + struct Pokemon * pokemon = &gPlayerParty[gSpecialVar_0x8004]; + GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1); + if (StringCompare(gStringVar3, gStringVar1) == 0) + return FALSE; + else + return TRUE; +} + +void ChangeBoxPokemonNickname(void) +{ + struct BoxPokemon * pokemon = GetBoxedMonPtr(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos); + u16 species; + u8 gender; + u32 personality; + + + GetBoxMonData(pokemon, MON_DATA_NICKNAME, gStringVar3); + GetBoxMonData(pokemon, MON_DATA_NICKNAME, gStringVar2); + species = GetBoxMonData(pokemon, MON_DATA_SPECIES, NULL); + gender = GetBoxMonGender(pokemon); + personality = GetBoxMonData(pokemon, MON_DATA_PERSONALITY, NULL); + DoNamingScreen(3, gStringVar2, species, gender, personality, ChangeBoxPokemonNickname_CB); +} + +static void ChangeBoxPokemonNickname_CB(void) +{ + SetBoxMonNickFromAnyBox(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2); + CB2_ReturnToFieldContinueScriptPlayMapMusic(); +} + +void ChangePokemonNickname(void) +{ + u16 species; + u8 gender; + u32 personality; + + GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3); + GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar2); + species = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES, NULL); + gender = GetMonGender(&gPlayerParty[gSpecialVar_0x8004]); + personality = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_PERSONALITY, NULL); + DoNamingScreen(3, gStringVar2, species, gender, personality, ChangePokemonNickname_CB); +} + +static void ChangePokemonNickname_CB(void) +{ + SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar2); + CB2_ReturnToFieldContinueScriptPlayMapMusic(); +} + +void TV_CopyNicknameToStringVar1AndEnsureTerminated(void) +{ + GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1); + StringGetEnd10(gStringVar1); +} + +void TV_CheckMonOTIDEqualsPlayerID(void) +{ + if (GetPlayerTrainerId() == GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_ID, NULL)) + gSpecialVar_Result = FALSE; + else + gSpecialVar_Result = TRUE; +} + +u32 GetPlayerTrainerId(void) +{ + return (gSaveBlock2Ptr->playerTrainerId[3] << 24) | (gSaveBlock2Ptr->playerTrainerId[2] << 16) | (gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0]; +} + +u8 GetUnlockedSeviiAreas(void) +{ + u8 result = 0; + if (FlagGet(FLAG_WORLD_MAP_ONE_ISLAND) == TRUE) + result |= 1 << 0; + if (FlagGet(FLAG_WORLD_MAP_TWO_ISLAND) == TRUE) + result |= 1 << 1; + if (FlagGet(FLAG_WORLD_MAP_THREE_ISLAND) == TRUE) + result |= 1 << 2; + if (FlagGet(FLAG_WORLD_MAP_FOUR_ISLAND) == TRUE) + result |= 1 << 3; + if (FlagGet(FLAG_WORLD_MAP_FIVE_ISLAND) == TRUE) + result |= 1 << 4; + if (FlagGet(FLAG_WORLD_MAP_SIX_ISLAND) == TRUE) + result |= 1 << 5; + if (FlagGet(FLAG_WORLD_MAP_SEVEN_ISLAND) == TRUE) + result |= 1 << 6; + return result; +} + +void Special_UpdateTrainerCardPhotoIcons(void) +{ + u16 species[PARTY_SIZE]; + u32 personality[PARTY_SIZE]; + u8 i; + u8 partyCount; + for (i = 0; i < PARTY_SIZE; i++) + species[i] = SPECIES_NONE; + partyCount = CalculatePlayerPartyCount(); + for (i = 0; i < partyCount; i++) + { + species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL); + personality[i] = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL); + } + VarSet(VAR_TRAINER_CARD_MON_ICON_1, SpeciesToMailSpecies(species[0], personality[0])); + VarSet(VAR_TRAINER_CARD_MON_ICON_2, SpeciesToMailSpecies(species[1], personality[1])); + VarSet(VAR_TRAINER_CARD_MON_ICON_3, SpeciesToMailSpecies(species[2], personality[2])); + VarSet(VAR_TRAINER_CARD_MON_ICON_4, SpeciesToMailSpecies(species[3], personality[3])); + VarSet(VAR_TRAINER_CARD_MON_ICON_5, SpeciesToMailSpecies(species[4], personality[4])); + VarSet(VAR_TRAINER_CARD_MON_ICON_6, SpeciesToMailSpecies(species[5], personality[5])); + VarSet(VAR_TRAINER_CARD_MON_ICON_TINT_IDX, gSpecialVar_0x8004); +} + +u16 Special_StickerLadyGetBragFlags(void) +{ + u16 result = 0; + u32 numEggs; + gSpecialVar_0x8004 = GetGameStat(GAME_STAT_ENTERED_HOF); + numEggs = GetGameStat(GAME_STAT_HATCHED_EGGS); + gSpecialVar_0x8006 = GetGameStat(GAME_STAT_LINK_BATTLE_WINS); + if (numEggs > 0xFFFF) + gSpecialVar_0x8005 = 0xFFFF; + else + gSpecialVar_0x8005 = numEggs; + if (gSpecialVar_0x8004 != 0) + result |= 1 << 0; + if (gSpecialVar_0x8005 != 0) + result |= 1 << 1; + if (gSpecialVar_0x8006 != 0) + result |= 1 << 2; + return result; +} + +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 + return 1; +} + +bool8 Special_PlayerPartyContainsSpecies(void) +{ + u8 partyCount = CalculatePlayerPartyCount(); + u8 i; + for (i = 0; i < partyCount; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004) + return TRUE; + } + return FALSE; +} + +static const u8 sMartMaps[][3] = { + {MAP_GROUP(VIRIDIAN_CITY_MART), MAP_NUM(VIRIDIAN_CITY_MART), 1}, + {MAP_GROUP(PEWTER_CITY_MART), MAP_NUM(PEWTER_CITY_MART), 3}, + {MAP_GROUP(CERULEAN_CITY_MART), MAP_NUM(CERULEAN_CITY_MART), 1}, + {MAP_GROUP(LAVENDER_TOWN_MART), MAP_NUM(LAVENDER_TOWN_MART), 1}, + {MAP_GROUP(VERMILION_CITY_MART), MAP_NUM(VERMILION_CITY_MART), 1}, + {MAP_GROUP(FUCHSIA_CITY_MART), MAP_NUM(FUCHSIA_CITY_MART), 1}, + {MAP_GROUP(CINNABAR_ISLAND_MART), MAP_NUM(CINNABAR_ISLAND_MART), 1}, + {MAP_GROUP(SAFFRON_CITY_MART), MAP_NUM(SAFFRON_CITY_MART), 1}, + {MAP_GROUP(THREE_ISLAND_MART), MAP_NUM(THREE_ISLAND_MART), 1}, + {MAP_GROUP(FOUR_ISLAND_MART), MAP_NUM(FOUR_ISLAND_MART), 1}, + {MAP_GROUP(SEVEN_ISLAND_MART), MAP_NUM(SEVEN_ISLAND_MART), 1}, + {MAP_GROUP(SIX_ISLAND_MART), MAP_NUM(SIX_ISLAND_MART), 1} +}; + +u8 Special_GetMartClerkObjectId(void) +{ + u8 i; + for (i = 0; i < NELEMS(sMartMaps); i++) + { + if (gSaveBlock1Ptr->location.mapGroup == sMartMaps[i][0] && gSaveBlock1Ptr->location.mapNum == sMartMaps[i][1]) + return sMartMaps[i][2]; + } + return 1; +} + +void sub_80CC524(void) +{ + sub_8113550(11, NULL); +} + +static const struct { + u16 grp; + u16 num; + u16 grp2; + u16 num2; +} sInsideOutsidePairs[51] = { + {MAP_GROUP(PALLET_TOWN_PLAYERS_HOUSE_1F), MAP_NUM(PALLET_TOWN_PLAYERS_HOUSE_1F), MAP_GROUP(PALLET_TOWN), MAP_NUM(PALLET_TOWN)}, + {MAP_GROUP(PALLET_TOWN_PROFESSOR_OAKS_LAB), MAP_NUM(PALLET_TOWN_PROFESSOR_OAKS_LAB), MAP_GROUP(PALLET_TOWN), MAP_NUM(PALLET_TOWN)}, + {MAP_GROUP(VIRIDIAN_CITY_GYM), MAP_NUM(VIRIDIAN_CITY_GYM), MAP_GROUP(VIRIDIAN_CITY), MAP_NUM(VIRIDIAN_CITY)}, + {MAP_GROUP(ROUTE22_NORTH_ENTRANCE), MAP_NUM(ROUTE22_NORTH_ENTRANCE), MAP_GROUP(ROUTE22), MAP_NUM(ROUTE22)}, + {MAP_GROUP(ROUTE22_NORTH_ENTRANCE), MAP_NUM(ROUTE22_NORTH_ENTRANCE), MAP_GROUP(ROUTE23), MAP_NUM(ROUTE23)}, + {MAP_GROUP(VIRIDIAN_FOREST), MAP_NUM(VIRIDIAN_FOREST), MAP_GROUP(ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE), MAP_NUM(ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE)}, + {MAP_GROUP(VIRIDIAN_FOREST), MAP_NUM(VIRIDIAN_FOREST), MAP_GROUP(ROUTE2_VIRIDIAN_FOREST_NORTH_ENTRANCE), MAP_NUM(ROUTE2_VIRIDIAN_FOREST_NORTH_ENTRANCE)}, + {MAP_GROUP(PEWTER_CITY_MUSEUM_1F), MAP_NUM(PEWTER_CITY_MUSEUM_1F), MAP_GROUP(PEWTER_CITY), MAP_NUM(PEWTER_CITY)}, + {MAP_GROUP(PEWTER_CITY_GYM), MAP_NUM(PEWTER_CITY_GYM), MAP_GROUP(PEWTER_CITY), MAP_NUM(PEWTER_CITY)}, + {MAP_GROUP(MT_MOON_1F), MAP_NUM(MT_MOON_1F), MAP_GROUP(ROUTE4), MAP_NUM(ROUTE4)}, + {MAP_GROUP(MT_MOON_B1F), MAP_NUM(MT_MOON_B1F), MAP_GROUP(ROUTE4), MAP_NUM(ROUTE4)}, + {MAP_GROUP(CERULEAN_CITY_GYM), MAP_NUM(CERULEAN_CITY_GYM), MAP_GROUP(CERULEAN_CITY), MAP_NUM(CERULEAN_CITY)}, + {MAP_GROUP(CERULEAN_CITY_BIKE_SHOP), MAP_NUM(CERULEAN_CITY_BIKE_SHOP), MAP_GROUP(CERULEAN_CITY), MAP_NUM(CERULEAN_CITY)}, + {MAP_GROUP(ROUTE25_SEA_COTTAGE), MAP_NUM(ROUTE25_SEA_COTTAGE), MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25)}, + {MAP_GROUP(ROUTE5_POKEMON_DAY_CARE), MAP_NUM(ROUTE5_POKEMON_DAY_CARE), MAP_GROUP(ROUTE5), MAP_NUM(ROUTE5)}, + {MAP_GROUP(UNDERGROUND_PATH_NORTH_ENTRANCE), MAP_NUM(UNDERGROUND_PATH_NORTH_ENTRANCE), MAP_GROUP(ROUTE5), MAP_NUM(ROUTE5)}, + {MAP_GROUP(UNDERGROUND_PATH_SOUTH_ENTRANCE), MAP_NUM(UNDERGROUND_PATH_SOUTH_ENTRANCE), MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6)}, + {MAP_GROUP(VERMILION_CITY_POKEMON_FAN_CLUB), MAP_NUM(VERMILION_CITY_POKEMON_FAN_CLUB), MAP_GROUP(VERMILION_CITY), MAP_NUM(VERMILION_CITY)}, + {MAP_GROUP(VERMILION_CITY_GYM), MAP_NUM(VERMILION_CITY_GYM), MAP_GROUP(VERMILION_CITY), MAP_NUM(VERMILION_CITY)}, + {MAP_GROUP(SSANNE_1F_CORRIDOR), MAP_NUM(SSANNE_1F_CORRIDOR), MAP_GROUP(VERMILION_CITY), MAP_NUM(VERMILION_CITY)}, + {MAP_GROUP(DIGLETTS_CAVE_NORTH_ENTRANCE), MAP_NUM(DIGLETTS_CAVE_NORTH_ENTRANCE), MAP_GROUP(ROUTE2), MAP_NUM(ROUTE2)}, + {MAP_GROUP(DIGLETTS_CAVE_SOUTH_ENTRANCE), MAP_NUM(DIGLETTS_CAVE_SOUTH_ENTRANCE), MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11)}, + {MAP_GROUP(ROCK_TUNNEL_1F), MAP_NUM(ROCK_TUNNEL_1F), MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10)}, + {MAP_GROUP(ROCK_TUNNEL_1F), MAP_NUM(ROCK_TUNNEL_1F), MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10)}, + {MAP_GROUP(POWER_PLANT), MAP_NUM(POWER_PLANT), MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10)}, + {MAP_GROUP(POKEMON_TOWER_1F), MAP_NUM(POKEMON_TOWER_1F), MAP_GROUP(LAVENDER_TOWN), MAP_NUM(LAVENDER_TOWN)}, + {MAP_GROUP(LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE), MAP_NUM(LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE), MAP_GROUP(LAVENDER_TOWN), MAP_NUM(LAVENDER_TOWN)}, + {MAP_GROUP(LAVENDER_TOWN_HOUSE2), MAP_NUM(LAVENDER_TOWN_HOUSE2), MAP_GROUP(LAVENDER_TOWN), MAP_NUM(LAVENDER_TOWN)}, + {MAP_GROUP(UNDERGROUND_PATH_EAST_ENTRANCE), MAP_NUM(UNDERGROUND_PATH_EAST_ENTRANCE), MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8)}, + {MAP_GROUP(UNDERGROUND_PATH_WEST_ENTRANCE), MAP_NUM(UNDERGROUND_PATH_WEST_ENTRANCE), MAP_GROUP(ROUTE7), MAP_NUM(ROUTE7)}, + {MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F), MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F), MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY)}, + {MAP_GROUP(CELADON_CITY_CONDOMINIUMS_1F), MAP_NUM(CELADON_CITY_CONDOMINIUMS_1F), MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY)}, + {MAP_GROUP(CELADON_CITY_GAME_CORNER), MAP_NUM(CELADON_CITY_GAME_CORNER), MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY)}, + {MAP_GROUP(CELADON_CITY_GYM), MAP_NUM(CELADON_CITY_GYM), MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY)}, + {MAP_GROUP(CELADON_CITY_RESTAURANT), MAP_NUM(CELADON_CITY_RESTAURANT), MAP_GROUP(CELADON_CITY), MAP_NUM(CELADON_CITY)}, + {MAP_GROUP(ROCKET_HIDEOUT_B1F), MAP_NUM(ROCKET_HIDEOUT_B1F), MAP_GROUP(CELADON_CITY_GAME_CORNER), MAP_NUM(CELADON_CITY_GAME_CORNER)}, + {MAP_GROUP(SAFARI_ZONE_CENTER), MAP_NUM(SAFARI_ZONE_CENTER), MAP_GROUP(FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE), MAP_NUM(FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE)}, + {MAP_GROUP(FUCHSIA_CITY_GYM), MAP_NUM(FUCHSIA_CITY_GYM), MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY)}, + {MAP_GROUP(FUCHSIA_CITY_BUILDING1), MAP_NUM(FUCHSIA_CITY_BUILDING1), MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY)}, + {MAP_GROUP(SAFFRON_CITY_DOJO), MAP_NUM(SAFFRON_CITY_DOJO), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)}, + {MAP_GROUP(SAFFRON_CITY_GYM), MAP_NUM(SAFFRON_CITY_GYM), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)}, + {MAP_GROUP(SILPH_CO_1F), MAP_NUM(SILPH_CO_1F), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)}, + {MAP_GROUP(SEAFOAM_ISLANDS_1F), MAP_NUM(SEAFOAM_ISLANDS_1F), MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20)}, + {MAP_GROUP(SEAFOAM_ISLANDS_1F), MAP_NUM(SEAFOAM_ISLANDS_1F), MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20)}, + {MAP_GROUP(POKEMON_MANSION_1F), MAP_NUM(POKEMON_MANSION_1F), MAP_GROUP(CINNABAR_ISLAND), MAP_NUM(CINNABAR_ISLAND)}, + {MAP_GROUP(CINNABAR_ISLAND_GYM), MAP_NUM(CINNABAR_ISLAND_GYM), MAP_GROUP(CINNABAR_ISLAND), MAP_NUM(CINNABAR_ISLAND)}, + {MAP_GROUP(CINNABAR_ISLAND_POKEMON_LAB_ENTRANCE), MAP_NUM(CINNABAR_ISLAND_POKEMON_LAB_ENTRANCE), MAP_GROUP(CINNABAR_ISLAND), MAP_NUM(CINNABAR_ISLAND)}, + {MAP_GROUP(VICTORY_ROAD_1F), MAP_NUM(VICTORY_ROAD_1F), MAP_GROUP(ROUTE23), MAP_NUM(ROUTE23)}, + {MAP_GROUP(VICTORY_ROAD_2F), MAP_NUM(VICTORY_ROAD_2F), MAP_GROUP(ROUTE23), MAP_NUM(ROUTE23)}, + {MAP_GROUP(INDIGO_PLATEAU_POKEMON_CENTER_1F), MAP_NUM(INDIGO_PLATEAU_POKEMON_CENTER_1F), MAP_GROUP(INDIGO_PLATEAU_EXTERIOR), MAP_NUM(INDIGO_PLATEAU_EXTERIOR)}, + {MAP_GROUP(CERULEAN_CAVE_1F), MAP_NUM(CERULEAN_CAVE_1F), MAP_GROUP(CERULEAN_CITY), MAP_NUM(CERULEAN_CITY)} +}; + +void sub_80CC534(void) +{ + u8 i; + for (i = 0; i < NELEMS(sInsideOutsidePairs); i++) + { + if (gSaveBlock1Ptr->location.mapGroup == sInsideOutsidePairs[i].grp && gSaveBlock1Ptr->location.mapNum == sInsideOutsidePairs[i].num) + { + if (VarGet(VAR_0x404D) != 35 || i != 32) + { + VarSet(VAR_0x404D, i); + FlagSet(FLAG_0x808); + } + break; + } + } +} + +void sub_80CC59C(void) +{ + s16 x, y; + struct { + u8 unk0; + u8 unk1; + } sp0; + u16 r5 = VarGet(VAR_0x404D); + sp0.unk0 = 0; + sp0.unk1 = 0; + if (FlagGet(FLAG_0x808)) + { + if (r5 == 5) + { + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE) && (gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE) || gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE2_VIRIDIAN_FOREST_NORTH_ENTRANCE))) + { + sp0.unk0 = MAPSEC_ROUTE_2; + if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE)) + sp0.unk1 = r5; + else + sp0.unk1 = r5 + 1; + sub_8113550(35, (void *)&sp0); + FlagClear(FLAG_0x808); + return; + } + } + else if (r5 == 3) + { + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE22) && (gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE22) || gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE23))) + { + sp0.unk0 = get_mapheader_by_bank_and_number(sInsideOutsidePairs[r5].grp, sInsideOutsidePairs[r5].num)->regionMapSectionId; + if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE22)) + sp0.unk1 = r5; + else + sp0.unk1 = r5 + 1; + sub_8113550(35, (void *)&sp0); + FlagClear(FLAG_0x808); + return; + } + } + if (gSaveBlock1Ptr->location.mapGroup == sInsideOutsidePairs[r5].grp2 && gSaveBlock1Ptr->location.mapNum == sInsideOutsidePairs[r5].num2) + { + sp0.unk0 = get_mapheader_by_bank_and_number(sInsideOutsidePairs[r5].grp, sInsideOutsidePairs[r5].num)->regionMapSectionId; + sp0.unk1 = r5; + if (r5 == 22) + { + PlayerGetDestCoords(&x, &y); + if (x != 15 || y != 26) + sp0.unk1++; + } + else if (r5 == 42) + { + PlayerGetDestCoords(&x, &y); + if (x != 67 || y != 15) + sp0.unk1++; + } + sub_8113550(35, (void *)&sp0); + FlagClear(FLAG_0x808); + if (r5 == 35) + { + VarSet(VAR_0x404D, 32); + FlagSet(FLAG_0x808); + } + } + } +} + +u16 Special_BattleCardAction(void) +{ + switch (gSpecialVar_Result) + { + case 0: + return sub_81445C0(3); + case 1: + return sub_81445C0(4); + case 2: + return sub_81445C0(0); + case 3: + return sub_81445C0(1); + case 4: + return sub_81445C0(2); + default: + AGB_ASSERT_EX(0, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/scr_tool.c", 3873); + return 0; + } +} + +void set_unknown_box_id(u8 boxId) +{ + sUnknownBoxId = boxId; +} + +u16 get_unknown_box_id(void) +{ + return sUnknownBoxId; +} + +bool8 sub_80CC7B4(void) +{ + if (FlagGet(FLAG_SYS_CHANGED_BOX_TO_STORE_MON)) + return FALSE; + if (StorageGetCurrentBox() == VarGet(VAR_0x4037)) + return FALSE; + FlagSet(FLAG_SYS_CHANGED_BOX_TO_STORE_MON); + return TRUE; +} + +bool8 sub_80CC7F8(void) +{ + s32 i; + s32 j; + set_unknown_box_id(VarGet(VAR_0x4037)); + i = StorageGetCurrentBox(); + do + { + for (j = 0; j < IN_BOX_COUNT; j++) + { + if (GetBoxMonData(GetBoxedMonPtr(i, j), MON_DATA_SPECIES, NULL) == SPECIES_NONE) + { + if (get_unknown_box_id() != i) + FlagClear(FLAG_SYS_CHANGED_BOX_TO_STORE_MON); + VarSet(VAR_0x4037, i); + return sub_80CC7B4(); + } + } + i++; + if (i == TOTAL_BOXES_COUNT) + i = 0; + } while (i != StorageGetCurrentBox()); + return FALSE; +} + +const u16 sPokeCenter1FMaps[] = { + MAP_VIRIDIAN_CITY_POKEMON_CENTER_1F, + MAP_PEWTER_CITY_POKEMON_CENTER_1F, + MAP_CERULEAN_CITY_POKEMON_CENTER_1F, + MAP_LAVENDER_TOWN_POKEMON_CENTER_1F, + MAP_VERMILION_CITY_POKEMON_CENTER_1F, + MAP_CELADON_CITY_POKEMON_CENTER_1F, + MAP_FUCHSIA_CITY_POKEMON_CENTER_1F, + MAP_CINNABAR_ISLAND_POKEMON_CENTER_1F, + MAP_INDIGO_PLATEAU_POKEMON_CENTER_1F, + MAP_SAFFRON_CITY_POKEMON_CENTER_1F, + MAP_ROUTE4_POKEMON_CENTER_1F, + MAP_ROUTE10_POKEMON_CENTER_1F, + MAP_ONE_ISLAND_POKEMON_CENTER_1F, + MAP_TWO_ISLAND_POKEMON_CENTER_1F, + MAP_THREE_ISLAND_POKEMON_CENTER_1F, + MAP_FOUR_ISLAND_POKEMON_CENTER_1F, + MAP_FIVE_ISLAND_POKEMON_CENTER_1F, + MAP_SEVEN_ISLAND_POKEMON_CENTER_1F, + MAP_SIX_ISLAND_POKEMON_CENTER_1F, + MAP_UNKNOWN_MAP_00_04, + MAP_UNDEFINED +}; + +bool8 sub_80CC87C(void) +{ + s32 i; + u16 mapno = (gUnknown_2031DB4.mapGroup << 8) + gUnknown_2031DB4.mapNum; + for (i = 0; sPokeCenter1FMaps[i] != MAP_UNDEFINED; i++) + { + if (sPokeCenter1FMaps[i] == mapno) + return TRUE; + } + return FALSE; +} + +bool8 Special_ItemIsTM_GetMoveName(void) +{ + // 8004 = item ID + if (gSpecialVar_0x8004 >= ITEM_TM01 && gSpecialVar_0x8004 <= ITEM_HM08) + { + StringCopy(gStringVar1, gMoveNames[ItemIdToBattleMoveId(gSpecialVar_0x8004)]); + return TRUE; + } + else + return FALSE; +} + +void RunMassageCooldownStepCounter(void) +{ + u16 count = VarGet(VAR_MASSAGE_COOLDOWN_STEP_COUNTER); + if (count < 500) + VarSet(VAR_MASSAGE_COOLDOWN_STEP_COUNTER, count + 1); +} + +void Special_DaisyMassageServices(void) +{ + AdjustFriendship(&gPlayerParty[gSpecialVar_0x8004], 6); + VarSet(VAR_MASSAGE_COOLDOWN_STEP_COUNTER, 0); +} + +static const u16 sEliteFourLightingPalettes[][16] = { + INCBIN_U16("data/field_specials/unk_83F5F50.gbapal"), + INCBIN_U16("data/field_specials/unk_83F5F70.gbapal"), + INCBIN_U16("data/field_specials/unk_83F5F90.gbapal"), + INCBIN_U16("data/field_specials/unk_83F5FB0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F5FD0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F5FF0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6010.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6030.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6050.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6070.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6090.gbapal"), + INCBIN_U16("data/field_specials/unk_83F60B0.gbapal") +}; + +static const u16 sChampionRoomLightingPalettes[][16] = { + INCBIN_U16("data/field_specials/unk_83F60D0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F60F0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6110.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6130.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6150.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6170.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6190.gbapal"), + INCBIN_U16("data/field_specials/unk_83F61B0.gbapal"), + INCBIN_U16("data/field_specials/unk_83F61D0.gbapal") +}; + +static const u8 sEliteFourLightingTimers[] = { + 40, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12 +}; + +static const u8 sChampionRoomLightingTimers[] = { + 20, + 8, + 8, + 8, + 8, + 8, + 8, + 8 +}; + +void Special_PokemonLeagueLightingEffect(void) +{ + u8 taskId = CreateTask(Task_RunPokemonLeagueLightingEffect, 8); + s16 *data = gTasks[taskId].data; + if (FlagGet(FLAG_TEMP_3) == TRUE) + { + gTasks[taskId].func = Task_CancelPokemonLeagueLightingEffect; + } + else + { + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(POKEMON_LEAGUE_CHAMPIONS_ROOM) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(POKEMON_LEAGUE_CHAMPIONS_ROOM)) + { + data[0] = sChampionRoomLightingTimers[0]; + data[2] = 8; + LoadPalette(sChampionRoomLightingPalettes[0], 0x70, 0x20); + } + else + { + data[0] = sEliteFourLightingTimers[0]; + data[2] = 11; + LoadPalette(sEliteFourLightingPalettes[0], 0x70, 0x20); + } + data[1] = 0; + sub_8059948(7, 1); + } +} + +static void Task_RunPokemonLeagueLightingEffect(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + if (!gPaletteFade.active + && FlagGet(FLAG_TEMP_2) != FALSE + && FlagGet(FLAG_TEMP_5) != TRUE + && gUnknown_2036E28 != 3 + && --data[0] == 0 + ) + { + if (++data[1] == data[2]) + data[1] = 0; + + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(POKEMON_LEAGUE_CHAMPIONS_ROOM) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(POKEMON_LEAGUE_CHAMPIONS_ROOM)) + { + data[0] = sChampionRoomLightingTimers[data[1]]; + LoadPalette(sChampionRoomLightingPalettes[data[1]], 0x70, 0x20); + } + else + { + data[0] = sEliteFourLightingTimers[data[1]]; + LoadPalette(sEliteFourLightingPalettes[data[1]], 0x70, 0x20); + } + sub_8059948(7, 1); + } +} + +static void Task_CancelPokemonLeagueLightingEffect(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + if (FlagGet(FLAG_TEMP_4) != FALSE) + { + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(POKEMON_LEAGUE_CHAMPIONS_ROOM) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(POKEMON_LEAGUE_CHAMPIONS_ROOM)) + { + LoadPalette(sChampionRoomLightingPalettes[8], 0x70, 0x20); + } + else + { + LoadPalette(sEliteFourLightingPalettes[11], 0x70, 0x20); + } + sub_8059948(7, 1); + if (gPaletteFade.active) + { + BlendPalettes(0x00000080, 16, RGB_BLACK); + } + DestroyTask(taskId); + } +} + +void StopPokemonLeagueLightingEffectTask(void) +{ + if (FuncIsActiveTask(Task_RunPokemonLeagueLightingEffect) == TRUE) + { + DestroyTask(FindTaskIdByFunc(Task_RunPokemonLeagueLightingEffect)); + } +} + +static const u8 sCapeBrinkCompatibleSpecies[] = { + SPECIES_VENUSAUR, + SPECIES_CHARIZARD, + SPECIES_BLASTOISE +}; + +bool8 Special_CapeBrinkGetMoveToTeachLeadPokemon(void) +{ + // Returns: + // 8005 = Move tutor index + // 8006 = Num moves known by lead mon + // 8007 = Index of lead mon + // to specialvar = whether a move can be taught in the first place + u8 r7 = 0; + u8 r6 = 0; + u8 r8 = GetLeadMonIndex(); + u8 r4; + gSpecialVar_0x8007 = r8; + for (r4 = 0; r4 < NELEMS(sCapeBrinkCompatibleSpecies); r4++) + { + if (GetMonData(&gPlayerParty[r8], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[r4]) + { + r7 = r4; + break; + } + } + if (r4 == NELEMS(sCapeBrinkCompatibleSpecies) || GetMonData(&gPlayerParty[r8], MON_DATA_FRIENDSHIP) != 255) + return FALSE; + if (r7 == 0) + { + StringCopy(gStringVar2, gMoveNames[MOVE_FRENZY_PLANT]); + gSpecialVar_0x8005 = MOVETUTOR_FRENZY_PLANT; + if (FlagGet(FLAG_TUTOR_FRENZY_PLANT) == TRUE) + return FALSE; + } + else if (r7 == 1) + { + StringCopy(gStringVar2, gMoveNames[MOVE_BLAST_BURN]); + gSpecialVar_0x8005 = MOVETUTOR_BLAST_BURN; + if (FlagGet(FLAG_TUTOR_BLAST_BURN) == TRUE) + return FALSE; + } + else + { + StringCopy(gStringVar2, gMoveNames[MOVE_HYDRO_CANNON]); + gSpecialVar_0x8005 = MOVETUTOR_HYDRO_CANNON; + if (FlagGet(FLAG_TUTOR_HYDRO_CANNON) == TRUE) + return FALSE; + } + if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE1) != MOVE_NONE) + r6++; + if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE2) != MOVE_NONE) + r6++; + if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE3) != MOVE_NONE) + r6++; + if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE4) != MOVE_NONE) + r6++; + gSpecialVar_0x8006 = r6; + return TRUE; +} + +bool8 Special_HasLearnedAllMovesFromCapeBrinkTutor(void) +{ + // 8005 is set by Special_CapeBrinkGetMoveToTeachLeadPokemon + u8 r4 = 0; + if (gSpecialVar_0x8005 == MOVETUTOR_FRENZY_PLANT) + FlagSet(FLAG_TUTOR_FRENZY_PLANT); + else if (gSpecialVar_0x8005 == MOVETUTOR_BLAST_BURN) + FlagSet(FLAG_TUTOR_BLAST_BURN); + else + FlagSet(FLAG_TUTOR_HYDRO_CANNON); + if (FlagGet(FLAG_TUTOR_FRENZY_PLANT) == TRUE) + r4++; + if (FlagGet(FLAG_TUTOR_BLAST_BURN) == TRUE) + r4++; + if (FlagGet(FLAG_TUTOR_HYDRO_CANNON) == TRUE) + r4++; + if (r4 == 3) + return TRUE; + else + return FALSE; +} + +bool8 CutMoveRuinValleyCheck(void) +{ + if (FlagGet(FLAG_USED_CUT_ON_RUIN_VALLEY_BRAILLE) != TRUE + && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SIX_ISLAND_RUIN_VALLEY) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SIX_ISLAND_RUIN_VALLEY) + && gSaveBlock1Ptr->pos.x == 24 + && gSaveBlock1Ptr->pos.y == 25 + && GetPlayerFacingDirection() == DIR_NORTH + ) + return TRUE; + else + return FALSE; +} + +void CutMoveOpenDottedHoleDoor(void) +{ + MapGridSetMetatileIdAt(31, 31, 0x358); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(FLAG_USED_CUT_ON_RUIN_VALLEY_BRAILLE); + ScriptContext2_Disable(); +} + +static const u16 sDeoxysObjectPals[][16] = { + INCBIN_U16("data/field_specials/unk_83F6206.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6226.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6246.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6266.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6286.gbapal"), + INCBIN_U16("data/field_specials/unk_83F62A6.gbapal"), + INCBIN_U16("data/field_specials/unk_83F62C6.gbapal"), + INCBIN_U16("data/field_specials/unk_83F62E6.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6306.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6326.gbapal"), + INCBIN_U16("data/field_specials/unk_83F6346.gbapal") +}; + +static const u8 sDeoxysCoords[][2] = { + {15, 12}, + {11, 14}, + {15, 8}, + {19, 14}, + {12, 11}, + {18, 11}, + {15, 14}, + {11, 14}, + {19, 14}, + {15, 15}, + {15, 10} +}; + +static const u8 sDeoxysStepCaps[] = { + 4, + 8, + 8, + 8, + 4, + 4, + 4, + 6, + 3, + 3 +}; + +void Special_DeoxysSound(void) +{ + CreateTask(task_deoxys_sound, 8); +} + +static void task_deoxys_sound(u8 taskId) +{ + u16 r5; + u16 r6; + if (FlagGet(FLAG_SYS_DEOXYS_AWAKENED) == TRUE) + { + gSpecialVar_Result = 3; + EnableBothScriptContexts(); + DestroyTask(taskId); + } + else + { + r5 = VarGet(VAR_DEOXYS_INTERACTION_NUM); + r6 = VarGet(VAR_DEOXYS_INTERACTION_STEP_COUNTER); + VarSet(VAR_DEOXYS_INTERACTION_STEP_COUNTER, 0); + if (r5 != 0 && sDeoxysStepCaps[r5 - 1] < r6) + { + MoveDeoxysObject(0); + VarSet(VAR_DEOXYS_INTERACTION_NUM, 0); + gSpecialVar_Result = 0; + DestroyTask(taskId); + } + else if (r5 == 10) + { + FlagSet(FLAG_SYS_DEOXYS_AWAKENED); + gSpecialVar_Result = 2; + EnableBothScriptContexts(); + DestroyTask(taskId); + } + else + { + r5++; + MoveDeoxysObject(r5); + VarSet(VAR_DEOXYS_INTERACTION_NUM, r5); + gSpecialVar_Result = 1; + DestroyTask(taskId); + } + } +} + +static void MoveDeoxysObject(u8 num) +{ + u8 mapObjId; + LoadPalette(sDeoxysObjectPals[num], 0x1A0, 0x08); + sub_8083598(10); + TryGetFieldObjectIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &mapObjId); + if (num == 0) + PlaySE(SE_W109); + else + PlaySE(SE_DEOMOV); + CreateTask(Task_WaitDeoxysFieldEffect, 8); + gFieldEffectArguments[0] = 1; + gFieldEffectArguments[1] = 56; + gFieldEffectArguments[2] = 2; + gFieldEffectArguments[3] = sDeoxysCoords[num][0]; + gFieldEffectArguments[4] = sDeoxysCoords[num][1]; + if (num == 0) + gFieldEffectArguments[5] = 60; + else + gFieldEffectArguments[5] = 5; + FieldEffectStart(FLDEFF_UNK_43); + Overworld_SetMapObjTemplateCoords(1, sDeoxysCoords[num][0], sDeoxysCoords[num][1]); +} + +static void Task_WaitDeoxysFieldEffect(u8 taskId) +{ + if (!FieldEffectActiveListContains(FLDEFF_UNK_43)) + { + EnableBothScriptContexts(); + DestroyTask(taskId); + } +} + +void BirthIslandDeoxysStepCounter(void) +{ + u16 count = VarGet(VAR_DEOXYS_INTERACTION_STEP_COUNTER); + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BIRTH_ISLAND_EXTERIOR) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(BIRTH_ISLAND_EXTERIOR)) + { + count++; + if (count > 99) + VarSet(VAR_DEOXYS_INTERACTION_STEP_COUNTER, 0); + else + VarSet(VAR_DEOXYS_INTERACTION_STEP_COUNTER, count); + } +} + +void Special_SetDeoxysTriangleObjectPal(void) +{ + u8 num = VarGet(VAR_DEOXYS_INTERACTION_NUM); + LoadPalette(sDeoxysObjectPals[num], 0x1A0, 0x08); + sub_8083598(10); +} + +bool8 Special_BadEggInParty(void) +{ + u8 partyCount = CalculatePlayerPartyCount(); + u8 i; + for (i = 0; i < partyCount; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG) == TRUE) + return TRUE; + } + return FALSE; +} + +bool8 Special_PlayerIsNotInTrainerTowerLobby(void) +{ + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER_LOBBY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_LOBBY)) + return FALSE; + else + return TRUE; +} + +void Special_BrailleCursorToggle(void) +{ + // 8004 = x - 27 + // 8005 = y + // 8006 = action (0 = create, 1 = delete) + u16 x; + if (gUnknown_203ADFA != 2) + { + x = gSpecialVar_0x8004 + 27; + if (gSpecialVar_0x8006 == 0) + sBrailleTextCursorSpriteID = CreateTextCursorSpriteForOakSpeech(0, x, gSpecialVar_0x8005, 0, 0); + else + sub_8006398(sBrailleTextCursorSpriteID); + } +} + +bool8 Special_PlayerPartyContainsSpeciesWithPlayerID(void) +{ + // 8004 = species + u8 playerCount = CalculatePlayerPartyCount(); + u8 i; + for (i = 0; i < playerCount; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004 && GetPlayerTrainerId() == GetMonData(&gPlayerParty[i], MON_DATA_OT_ID, NULL)) + return TRUE; + } + return FALSE; +} + +/* + * Determines which of Lorelei's doll collection to show + * based on how many times you've entered the Hall of Fame. + */ +void Special_ComputeLoreleiDollCollection(void) +{ + u32 numHofClears = GetGameStat(GAME_STAT_ENTERED_HOF); + if (numHofClears >= 25) + { + FlagClear(FLAG_HIDE_LORELEI_HOUSE_MEOWTH_DOLL); + if (numHofClears >= 50) + FlagClear(FLAG_HIDE_LORELEI_HOUSE_CHANSEY_DOLL); + if (numHofClears >= 75) + FlagClear(FLAG_HIDE_LORELEIS_HOUSE_NIDORAN_F_DOLL); + if (numHofClears >= 100) + FlagClear(FLAG_HIDE_LORELEI_HOUSE_JIGGLYPUFF_DOLL); + if (numHofClears >= 125) + FlagClear(FLAG_HIDE_LORELEIS_HOUSE_NIDORAN_M_DOLL); + if (numHofClears >= 150) + FlagClear(FLAG_HIDE_LORELEIS_HOUSE_FEAROW_DOLL); + if (numHofClears >= 175) + FlagClear(FLAG_HIDE_LORELEIS_HOUSE_PIDGEOT_DOLL); + if (numHofClears >= 200) + FlagClear(FLAG_HIDE_LORELEIS_HOUSE_LAPRAS_DOLL); + } +} + +void Special_LoopWingFlapSound(void) +{ + // 8004 = Num flaps + // 8005 = Frame delay between flaps + CreateTask(Task_WingFlapSound, 8); + PlaySE(SE_W017); +} + +static void Task_WingFlapSound(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + data[1]++; + if (data[1] == gSpecialVar_0x8005) + { + data[0]++; + data[1] = 0; + PlaySE(SE_W017); + } + if (data[0] == gSpecialVar_0x8004 - 1) + DestroyTask(taskId); +} diff --git a/src/fldeff_rocksmash.c b/src/fldeff_rocksmash.c index 56a607fff..90abda81f 100644 --- a/src/fldeff_rocksmash.c +++ b/src/fldeff_rocksmash.c @@ -16,6 +16,7 @@ #include "field_map_obj.h" #include "constants/songs.h" #include "constants/map_objects.h" +#include "constants/map_types.h" static void task08_080C9820(u8 taskId); static void sub_80C98FC(u8 taskId); diff --git a/src/ground.c b/src/ground.c index 4ae4d8370..97f42e5c5 100644 --- a/src/ground.c +++ b/src/ground.c @@ -416,8 +416,7 @@ static void sub_80B91B0(u8 taskId) task->data[12] = gBattle_BG1_X; else task->data[12] = gBattle_BG2_X; - - var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker); + var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker); task->data[14] = var0 - 32; task->data[15] = var0 + 32; ++task->data[0]; diff --git a/src/heal_location.c b/src/heal_location.c index 5c6dbc882..89d9478c0 100644 --- a/src/heal_location.c +++ b/src/heal_location.c @@ -122,10 +122,10 @@ void SetBlackoutRespawnWarpAndHealerNpc(struct WarpData * warp) { u32 healLocationIdx; - if (VarGet(VAR_0x4082) == 1) + if (VarGet(VAR_MAP_SCENE_TRAINER_TOWER) == 1) { if (!gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_2) - VarSet(VAR_0x4082, 0); + VarSet(VAR_MAP_SCENE_TRAINER_TOWER, 0); gSpecialVar_LastTalked = 1; warp->x = 4; warp->y = 11; @@ -159,7 +159,7 @@ void SetBlackoutRespawnWarpAndHealerNpc(struct WarpData * warp) { warp->x = 4; warp->y = 11; - VarSet(VAR_0x4082, 0); + VarSet(VAR_MAP_SCENE_TRAINER_TOWER, 0); } else { diff --git a/src/help_system_812B1E0.c b/src/help_system_812B1E0.c index afb792072..1f3acdb2d 100644 --- a/src/help_system_812B1E0.c +++ b/src/help_system_812B1E0.c @@ -950,7 +950,7 @@ static bool8 IsInDungeonMap(void) if ( sDungeonMaps[i][0] == gSaveBlock1Ptr->location.mapGroup && sDungeonMaps[i][1] + j == gSaveBlock1Ptr->location.mapNum - && (i != 15 /* TANOBY */ || FlagGet(FLAG_0x849) == TRUE) + && (i != 15 /* TANOBY */ || FlagGet(FLAG_SYS_UNLOCKED_TANOBY_RUINS) == TRUE) ) return TRUE; } @@ -990,10 +990,10 @@ bool8 sub_812B40C(void) if (gUnknown_203B0EE == 1) return FALSE; - if (gSaveFileStatus != SAVE_STATUS_EMPTY && gSaveFileStatus != SAVE_STATUS_INVALID && FlagGet(FLAG_0x83C)) + if (gSaveFileStatus != SAVE_STATUS_EMPTY && gSaveFileStatus != SAVE_STATUS_INVALID && FlagGet(FLAG_SYS_SAW_HELP_SYSTEM_INTRO)) return FALSE; - FlagSet(FLAG_0x83C); + FlagSet(FLAG_SYS_SAW_HELP_SYSTEM_INTRO); gUnknown_203B0EE = 1; return TRUE; } @@ -1125,7 +1125,7 @@ static void sub_812B614(struct HelpSystemListMenu * a0, struct ListMenuItem * a1 static bool8 sub_812B754(void) { - if (FlagGet(FLAG_0x4B0) == TRUE && gUnknown_3005E9C[1] == 2) + if (FlagGet(FLAG_DEFEATED_BROCK) == TRUE && gUnknown_3005E9C[1] == 2) return TRUE; return FALSE; } @@ -1150,7 +1150,7 @@ static bool8 sub_812B780(u8 id) case 43: return TRUE; case 4: - return FlagGet(FLAG_0x2CF); + return FlagGet(FLAG_VISITED_OAKS_LAB); case 6: case 10: case 16: @@ -1163,7 +1163,7 @@ static bool8 sub_812B780(u8 id) return FlagGet(FLAG_WORLD_MAP_VERMILION_CITY); case 11: case 24: - return FlagGet(FLAG_0x8A4); + return FlagGet(FLAG_WORLD_MAP_VIRIDIAN_FOREST); case 9: case 13: case 14: @@ -1175,22 +1175,22 @@ static bool8 sub_812B780(u8 id) case 29: case 31: case 37: - return FlagGet(FLAG_0x828); + return FlagGet(FLAG_SYS_POKEMON_GET); case 21: case 23: - return FlagGet(FLAG_0x829); + return FlagGet(FLAG_SYS_POKEDEX_GET); case 12: case 25: case 27: case 30: case 32: case 33: - return FlagGet(FLAG_UNK820); + return FlagGet(FLAG_BADGE01_GET); case 28: case 40: return sub_812BB10(); case 39: - return FlagGet(FLAG_0x29B); + return FlagGet(FLAG_GOT_FAME_CHECKER); case 44: return FlagGet(FLAG_WORLD_MAP_PEWTER_CITY); } @@ -1229,7 +1229,7 @@ static bool8 sub_812B780(u8 id) case 1: case 30: case 37: - return FlagGet(FLAG_0x829); + return FlagGet(FLAG_SYS_POKEDEX_GET); case 14: return CheckBagHasItem(ITEM_TOWN_MAP, 1); case 2: @@ -1244,21 +1244,21 @@ static bool8 sub_812B780(u8 id) case 35: case 43: case 44: - return FlagGet(FLAG_0x828); + return FlagGet(FLAG_SYS_POKEMON_GET); case 4: case 34: if (GetKantoPokedexCount(1) > 1) return TRUE; return FALSE; case 15: - return FlagGet(FLAG_UNK820); + return FlagGet(FLAG_BADGE01_GET); case 16: case 17: return sub_812BB10(); case 18: - return FlagGet(FLAG_0x271); + return FlagGet(FLAG_GOT_BICYCLE); case 48: - return FlagGet(FLAG_0x82C); + return FlagGet(FLAG_SYS_GAME_CLEAR); } return FALSE; } @@ -1308,7 +1308,7 @@ static bool8 sub_812B780(u8 id) case 19: case 20: case 21: - return FlagGet(FLAG_0x828); + return FlagGet(FLAG_SYS_POKEMON_GET); case 36: case 37: return sub_812BB10(); @@ -1316,7 +1316,7 @@ static bool8 sub_812B780(u8 id) case 15: case 18: case 39: - return FlagGet(FLAG_0x8A4); + return FlagGet(FLAG_WORLD_MAP_VIRIDIAN_FOREST); } return TRUE; } @@ -1325,9 +1325,9 @@ static bool8 sub_812B780(u8 id) switch (id) { case 5: - return FlagGet(FLAG_UNK820); + return FlagGet(FLAG_BADGE01_GET); case 6: - return FlagGet(FLAG_0x821); + return FlagGet(FLAG_BADGE02_GET); } return TRUE; } @@ -1341,19 +1341,19 @@ static bool8 sub_812B780(u8 id) static bool8 sub_812BB10(void) { - if (FlagGet(FLAG_0x237) == TRUE) + if (FlagGet(FLAG_GOT_HM01) == TRUE) return TRUE; - if (FlagGet(FLAG_0x238) == TRUE) + if (FlagGet(FLAG_GOT_HM02) == TRUE) return TRUE; - if (FlagGet(FLAG_0x239) == TRUE) + if (FlagGet(FLAG_GOT_HM03) == TRUE) return TRUE; - if (FlagGet(FLAG_0x23A) == TRUE) + if (FlagGet(FLAG_GOT_HM04) == TRUE) return TRUE; - if (FlagGet(FLAG_0x23B) == TRUE) + if (FlagGet(FLAG_GOT_HM05) == TRUE) return TRUE; - if (FlagGet(FLAG_0x2EF) == TRUE) + if (FlagGet(FLAG_GOT_HM06) == TRUE) return TRUE; - if (FlagGet(FLAG_0x1F1) == TRUE) + if (FlagGet(FLAG_HIDE_FOUR_ISLAND_ICEFALL_CAVE_1F_HM07) == TRUE) return TRUE; return FALSE; } diff --git a/src/item.c b/src/item.c index 42dfd334e..677c13ad7 100644 --- a/src/item.c +++ b/src/item.c @@ -73,7 +73,7 @@ void CopyItemName(u16 itemId, u8 * dest) { if (itemId == ITEM_ENIGMA_BERRY) { - StringCopy(dest, sub_809C8A0(43)->name); + StringCopy(dest, GetBerryInfo(ITEM_TO_BERRY(ITEM_ENIGMA_BERRY))->name); StringAppend(dest, gUnknown_84162BD); } else @@ -245,11 +245,11 @@ bool8 AddBagItem(u16 itemId, u16 count) return FALSE; gBagPockets[POCKET_KEY_ITEMS - 1].itemSlots[idx].itemId = ITEM_BERRY_POUCH; SetBagItemQuantity(&gBagPockets[POCKET_KEY_ITEMS - 1].itemSlots[idx].quantity, 1); - FlagSet(FLAG_0x847); + FlagSet(FLAG_SYS_GOT_BERRY_POUCH); } if (itemId == ITEM_BERRY_POUCH) - FlagSet(FLAG_0x847); + FlagSet(FLAG_SYS_GOT_BERRY_POUCH); idx = BagPocketGetFirstEmptySlot(pocket); if (idx == -1) diff --git a/src/item_use.c b/src/item_use.c index 3a189d84a..873ce4ab4 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -42,6 +42,7 @@ #include "constants/maps.h" #include "constants/moves.h" #include "constants/songs.h" +#include "constants/map_types.h" EWRAM_DATA void (*sItemUseOnFieldCB)(u8 taskId) = NULL; @@ -162,7 +163,7 @@ void sub_80A1184(void) bool8 sub_80A1194(void) { - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); sub_807DC00(); CreateTask(sub_80A11C0, 10); @@ -191,7 +192,7 @@ void sub_80A1208(void) struct MailStruct mail; mail.itemId = gSpecialVar_ItemId; - sub_80BEBEC(&mail, CB2_BagMenuFromStartMenu, 0); + ReadMail(&mail, CB2_BagMenuFromStartMenu, 0); } void FieldUseFunc_MachBike(u8 taskId) @@ -202,7 +203,7 @@ void FieldUseFunc_MachBike(u8 taskId) PlayerGetDestCoords(&x, &y); behavior = MapGridGetMetatileBehaviorAt(x, y); - if (FlagGet(FLAG_0x830) == TRUE + if (FlagGet(FLAG_SYS_ON_CYCLING_ROAD) == TRUE || MetatileBehavior_ReturnFalse_17(behavior) == TRUE || MetatileBehavior_ReturnFalse_18(behavior) == TRUE || MetatileBehavior_ReturnFalse_15(behavior) == TRUE @@ -259,7 +260,7 @@ bool8 ItemUseCheckFunc_Rod(void) { if (MetatileBehavior_IsSurfable(behavior) && !MapGridIsImpassableAt(x, y)) return TRUE; - if (MetatileBehavior_ReturnFalse_6(behavior) == TRUE) + if (MetatileBehavior_IsBridge(behavior) == TRUE) return TRUE; } return FALSE; @@ -396,7 +397,7 @@ void FieldUseFunc_TmCase(u8 taskId) } else { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); gTasks[taskId].func = Task_InitTMCaseFromField; } @@ -427,7 +428,7 @@ void FieldUseFunc_BerryPouch(u8 taskId) } else { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); gTasks[taskId].func = Task_InitBerryPouchFromField; } @@ -470,7 +471,7 @@ void FieldUseFunc_TeachyTv(u8 taskId) } else { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); gTasks[taskId].func = Task_InitTeachyTvFromField; } @@ -529,8 +530,8 @@ void FieldUseFunc_BlackFlute(u8 taskId) ItemUse_SetQuestLogEvent(4, NULL, gSpecialVar_ItemId, 0xFFFF); if (gSpecialVar_ItemId == ITEM_WHITE_FLUTE) { - FlagSet(FLAG_WHITE_FLUTE_ACTIVE); - FlagClear(FLAG_BLACK_FLUTE_ACTIVE); + FlagSet(FLAG_SYS_WHITE_FLUTE_ACTIVE); + FlagClear(FLAG_SYS_BLACK_FLUTE_ACTIVE); CopyItemName(gSpecialVar_ItemId, gStringVar2); StringExpandPlaceholders(gStringVar4, gUnknown_84165D2); gTasks[taskId].func = sub_80A1B48; @@ -538,8 +539,8 @@ void FieldUseFunc_BlackFlute(u8 taskId) } else if (gSpecialVar_ItemId == ITEM_BLACK_FLUTE) { - FlagSet(FLAG_BLACK_FLUTE_ACTIVE); - FlagClear(FLAG_WHITE_FLUTE_ACTIVE); + FlagSet(FLAG_SYS_BLACK_FLUTE_ACTIVE); + FlagClear(FLAG_SYS_WHITE_FLUTE_ACTIVE); CopyItemName(gSpecialVar_ItemId, gStringVar2); StringExpandPlaceholders(gStringVar4, gUnknown_8416600); gTasks[taskId].func = sub_80A1B48; @@ -600,7 +601,7 @@ void FieldUseFunc_TownMap(u8 taskId) } else { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); gTasks[taskId].func = sub_80A1CC0; } @@ -632,7 +633,7 @@ void FieldUseFunc_FameChecker(u8 taskId) } else { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); gTasks[taskId].func = sub_80A1D68; } diff --git a/src/itemfinder.c b/src/itemfinder.c index e6448a166..05072c49e 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -17,7 +17,7 @@ static void Task_NoResponse_CleanUp(u8 taskId); static void Task_ItemfinderResponseSoundsAndAnims(u8 taskId); static void Task_ItemfinderUnderfootSoundsAndAnims(u8 taskId); static bool8 HiddenItemIsWithinRangeOfPlayer(struct MapEvents * events, u8 taskId); -static void SetUnderfootHiddenItem(u8 taskId, struct HiddenItemStruct hiddenItem); +static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem); static void SetNormalHiddenItem(u8 taskId); static void FindHiddenItemsInConnectedMaps(u8 taskId); static void RegisterHiddenItemRelativeCoordsIfCloser(u8 taskId, s16 dx, s16 dy); @@ -239,7 +239,7 @@ static bool8 HiddenItemIsWithinRangeOfPlayer(struct MapEvents * events, u8 taskI return FALSE; } -static void SetUnderfootHiddenItem(u8 taskId, struct HiddenItemStruct hiddenItem) +static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem) { s16 *data = gTasks[taskId].data; gSpecialVar_0x8004 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_FLAG); diff --git a/src/link.c b/src/link.c index 52f5aeddb..ac9cf9cfe 100644 --- a/src/link.c +++ b/src/link.c @@ -329,7 +329,7 @@ static void InitLocalLinkPlayer(void) gLocalLinkPlayer.version = gGameVersion + 0x4000; gLocalLinkPlayer.lp_field_2 = 0x8000; gLocalLinkPlayer.name[8] = IsNationalPokedexEnabled(); - if (FlagGet(FLAG_0x844)) + if (FlagGet(FLAG_SYS_CAN_LINK_WITH_RS)) { gLocalLinkPlayer.name[8] |= 0x10; } @@ -1025,7 +1025,7 @@ bool8 IsLinkTaskFinished(void) { if (gWirelessCommType == 1) { - return IsRfuTaskFinished(); + return IsLinkRfuTaskFinished(); } return gLinkCallback == NULL; } diff --git a/src/mail.c b/src/mail.c new file mode 100644 index 000000000..a9cb66683 --- /dev/null +++ b/src/mail.c @@ -0,0 +1,738 @@ +#include "global.h" +#include "malloc.h" +#include "bg.h" +#include "scanline_effect.h" +#include "palette.h" +#include "gpu_regs.h" +#include "window.h" +#include "text_window.h" +#include "main.h" +#include "easy_chat.h" +#include "mail.h" +#include "task.h" +#include "menu.h" +#include "mail_data.h" +#include "player_pc.h" +#include "overworld.h" +#include "help_system.h" +#include "menu_helpers.h" +#include "new_menu_helpers.h" +#include "graphics.h" +#include "pokemon_icon.h" +#include "string_util.h" +#include "strings.h" +#include "constants/items.h" +#include "constants/species.h" + +enum MailIconParam +{ + MAIL_ICON_NONE = 0, + MAIL_ICON_BEAD, + MAIL_ICON_DREAM +}; + +struct MailEcWordLayout +{ + u32 numWordsInLine:2; + u32 lineXoffset:6; + u32 lineHeight:8; +}; + +struct MailAttrStruct +{ + u8 numRows; + u8 nameY; + u8 nameX; + u8 messageTop; + u8 messageLeft; + const struct MailEcWordLayout * linesLayout; +}; + +struct MailGfxData +{ + const void * pal; + const void * tiles; + const void * map; + u32 size; + u16 textpals[2]; +}; + +struct MailViewResources { + u8 messageLinesBuffer[8][26]; + u8 authorNameBuffer[12]; + void (*savedCallback)(void); + void (*showMailCallback)(void); + struct MailStruct *mail; + bool8 messageExists; + u8 nameX; + u8 mailType; + u8 monIconType; + u8 monIconSpriteId; + u8 unused; + u8 mailArrangementType; + void (*copyEasyChatWord)(u8 *dest, u16 word); + void (*convertEasyChatWordsToString)(u8 *dest, const u16 *src, u16 length1, u16 length2); + const struct MailAttrStruct * messageLayout; + u16 bg1TilemapBuffer[BG_SCREEN_SIZE]; + u16 bg2TilemapBuffer[BG_SCREEN_SIZE]; +}; + +static EWRAM_DATA struct MailViewResources * sMailViewResources = NULL; + +static void CB2_InitMailView(void); +static void BufferMailMessage(void); +static void AddMailMessagePrinters(void); +static void VBlankCB_ShowMail(void); +static void CB2_RunShowMailCB(void); +static void ShowMailCB_WaitFadeIn(void); +static void ShowMailCB_WaitButton(void); +static void ShowMailCB_Teardown(void); + +static const struct BgTemplate sBgTemplates[] = { + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0x000 + }, { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0x000 + }, { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 29, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0x000 + } +}; + +static const struct WindowTemplate sWindowTemplates[] = { + { + .bg = 0, + .tilemapLeft = 3, + .tilemapTop = 4, + .width = 24, + .height = 10, + .paletteNum = 15, + .baseBlock = 0x001 + }, { + .bg = 0, + .tilemapLeft = 15, + .tilemapTop = 15, + .width = 13, + .height = 3, + .paletteNum = 15, + .baseBlock = 0x0F2 + }, DUMMY_WIN_TEMPLATE +}; + +static const u8 sTextColor[] = { 0, 10, 11 }; + +static const u16 sGenderPals[][2] = { + { RGB(13, 22, 26), RGB(05, 13, 20) }, + { RGB(28, 15, 17), RGB(20, 06, 14) } +}; + +static const struct MailGfxData sGfxHeaders[] = { + [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { + .pal = gFile_graphics_mail_orange_palette_pal, + .tiles = gFile_graphics_mail_orange_tiles_sheet, + .map = gFile_graphics_mail_orange_map_tilemap, + .size = 0x2c0, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { + .pal = gFile_graphics_mail_harbor_palette_pal, + .tiles = gFile_graphics_mail_harbor_tiles_sheet, + .map = gFile_graphics_mail_harbor_map_tilemap, + .size = 0x2e0, + .textpals = { RGB(31, 31, 31), RGB(17, 17, 17) } + }, + [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { + .pal = gFile_graphics_mail_glitter_palette_pal, + .tiles = gFile_graphics_mail_glitter_tiles_sheet, + .map = gFile_graphics_mail_glitter_map_tilemap, + .size = 0x400, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { + .pal = gFile_graphics_mail_mech_palette_pal, + .tiles = gFile_graphics_mail_mech_tiles_sheet, + .map = gFile_graphics_mail_mech_map_tilemap, + .size = 0x1e0, + .textpals = { RGB(31, 31, 31), RGB(17, 17, 17) } + }, + [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { + .pal = gFile_graphics_mail_wood_palette_pal, + .tiles = gFile_graphics_mail_wood_tiles_sheet, + .map = gFile_graphics_mail_wood_map_tilemap, + .size = 0x2e0, + .textpals = { RGB(31, 31, 31), RGB(17, 17, 17) } + }, + [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { + .pal = gFile_graphics_mail_wave_palette_pal, + .tiles = gFile_graphics_mail_wave_tiles_sheet, + .map = gFile_graphics_mail_wave_map_tilemap, + .size = 0x300, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { + .pal = gFile_graphics_mail_bead_palette_pal, + .tiles = gFile_graphics_mail_bead_tiles_sheet, + .map = gFile_graphics_mail_bead_map_tilemap, + .size = 0x140, + .textpals = { RGB(31, 31, 31), RGB(17, 17, 17) } + }, + [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { + .pal = gFile_graphics_mail_shadow_palette_pal, + .tiles = gFile_graphics_mail_shadow_tiles_sheet, + .map = gFile_graphics_mail_shadow_map_tilemap, + .size = 0x300, + .textpals = { RGB(31, 31, 31), RGB(17, 17, 17) } + }, + [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { + .pal = gFile_graphics_mail_tropic_palette_pal, + .tiles = gFile_graphics_mail_tropic_tiles_sheet, + .map = gFile_graphics_mail_tropic_map_tilemap, + .size = 0x220, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { + .pal = gFile_graphics_mail_dream_palette_pal, + .tiles = gFile_graphics_mail_dream_tiles_sheet, + .map = gFile_graphics_mail_dream_map_tilemap, + .size = 0x340, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { + .pal = gFile_graphics_mail_fab_palette_pal, + .tiles = gFile_graphics_mail_fab_tiles_sheet, + .map = gFile_graphics_mail_fab_map_tilemap, + .size = 0x2a0, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + }, + [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { + .pal = gFile_graphics_mail_retro_palette_pal, + .tiles = gFile_graphics_mail_retro_tiles_sheet, + .map = gFile_graphics_mail_retro_map_tilemap, + .size = 0x520, + .textpals = { RGB(10, 10, 10), RGB(25, 25, 25) } + } +}; + +static const struct MailEcWordLayout sLayout_3x3[] = { + { .numWordsInLine = 3, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 3, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 3, .lineXoffset = 0, .lineHeight = 16 } +}; + +static const struct MailAttrStruct sMessageLayouts_3x3[] = { + [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { + .numRows = 3, + .nameY = 8, + .nameX = 0, + .messageTop = 2, + .messageLeft = 4, + .linesLayout = sLayout_3x3 + }, + [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { + .numRows = 3, + .nameY = 0, + .nameX = 0, + .messageTop = 2, + .messageLeft = 0, + .linesLayout = sLayout_3x3 + }, +}; + +static const struct MailEcWordLayout sLayout_5x2[] = { + { .numWordsInLine = 2, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 2, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 2, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 2, .lineXoffset = 0, .lineHeight = 16 }, + { .numWordsInLine = 1, .lineXoffset = 0, .lineHeight = 16 } +}; + +static const struct MailAttrStruct sMessageLayouts_5x2[] = { + [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 8, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { + .numRows = 5, + .nameY = 3, + .nameX = 14, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 16, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 14, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { + .numRows = 5, + .nameY = 3, + .nameX = 12, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 18, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 20, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { + .numRows = 5, + .nameY = 6, + .nameX = 20, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 16, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 14, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { + .numRows = 5, + .nameY = 8, + .nameX = 16, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, + [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { + .numRows = 5, + .nameY = 0, + .nameX = 16, + .messageTop = 3, + .messageLeft = 8, + .linesLayout = sLayout_5x2 + }, +}; + +void ReadMail(struct MailStruct * mail, void (*savedCallback)(void), bool8 messageExists) +{ + u16 sp0; + u16 species; + sMailViewResources = AllocZeroed(sizeof(struct MailViewResources)); + sMailViewResources->unused = 2; + sMailViewResources->mailArrangementType = 1; + sMailViewResources->copyEasyChatWord = CopyEasyChatWord; + sMailViewResources->convertEasyChatWordsToString = ConvertEasyChatWordsToString; + if (IS_ITEM_MAIL(mail->itemId)) + { + sMailViewResources->mailType = ITEM_TO_MAIL(mail->itemId); + } + else + { + sMailViewResources->mailType = ITEM_TO_MAIL(ITEM_ORANGE_MAIL); + messageExists = FALSE; + } + switch (sMailViewResources->mailArrangementType) + { + case 0: + default: + sMailViewResources->messageLayout = &sMessageLayouts_3x3[sMailViewResources->mailType]; + break; + case 1: + sMailViewResources->messageLayout = &sMessageLayouts_5x2[sMailViewResources->mailType]; + break; + } + species = MailSpeciesToSpecies(mail->species, &sp0); + if (species != SPECIES_NONE && species < NUM_SPECIES) + { + switch (sMailViewResources->mailType) + { + default: + sMailViewResources->monIconType = MAIL_ICON_NONE; + break; + case ITEM_TO_MAIL(ITEM_BEAD_MAIL): + sMailViewResources->monIconType = MAIL_ICON_BEAD; + break; + case ITEM_TO_MAIL(ITEM_DREAM_MAIL): + sMailViewResources->monIconType = MAIL_ICON_DREAM; + break; + } + } + else + { + sMailViewResources->monIconType = MAIL_ICON_NONE; + } + sMailViewResources->mail = mail; + sMailViewResources->savedCallback = savedCallback; + sMailViewResources->messageExists = messageExists; + SetMainCallback2(CB2_InitMailView); +} + +static bool8 DoInitMailView(void) +{ + u16 iconId; + + switch (gMain.state) + { + case 0: + SetVBlankCallback(NULL); + ScanlineEffect_Stop(); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + if (gPlayerPcMenuManager.unk_9 == 0) + HelpSystem_SetSomeVariable2(34); + else + HelpSystem_SetSomeVariable2(30); + break; + case 1: + CpuFill16(0, (void *)OAM, OAM_SIZE); + break; + case 2: + ResetPaletteFade(); + break; + case 3: + ResetTasks(); + break; + case 4: + ResetSpriteData(); + break; + case 5: + FreeAllSpritePalettes(); + ResetTempTileDataBuffers(); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG3HOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + break; + case 6: + ResetBgsAndClearDma3BusyFlags(FALSE); + InitBgsFromTemplates(0, sBgTemplates, NELEMS(sBgTemplates)); + SetBgTilemapBuffer(1, sMailViewResources->bg1TilemapBuffer); + SetBgTilemapBuffer(2, sMailViewResources->bg2TilemapBuffer); + break; + case 7: + InitWindows(sWindowTemplates); + DeactivateAllTextPrinters(); + break; + case 8: + DecompressAndCopyTileDataToVram(1, sGfxHeaders[sMailViewResources->mailType].tiles, 0, 0x000, 0); + break; + case 9: + if (FreeTempTileDataBuffersIfPossible()) + return FALSE; + break; + case 10: + FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(2, 0x001, 0, 0, 30, 20); + CopyToBgTilemapBuffer(1, sGfxHeaders[sMailViewResources->mailType].map, 0, 0x000); + break; + case 11: + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + break; + case 12: + LoadPalette(stdpal_get(0), 0xF0, 0x20); + gPlttBufferUnfaded[15 * 16 + 10] = sGfxHeaders[sMailViewResources->mailType].textpals[0]; + gPlttBufferFaded[15 * 16 + 10] = sGfxHeaders[sMailViewResources->mailType].textpals[0]; + gPlttBufferUnfaded[15 * 16 + 11] = sGfxHeaders[sMailViewResources->mailType].textpals[1]; + gPlttBufferFaded[15 * 16 + 11] = sGfxHeaders[sMailViewResources->mailType].textpals[1]; + LoadPalette(sGfxHeaders[sMailViewResources->mailType].pal, 0x00, 0x20); + gPlttBufferUnfaded[0 * 16 + 10] = sGenderPals[gSaveBlock2Ptr->playerGender][0]; + gPlttBufferFaded[0 * 16 + 10] = sGenderPals[gSaveBlock2Ptr->playerGender][0]; + gPlttBufferUnfaded[0 * 16 + 11] = sGenderPals[gSaveBlock2Ptr->playerGender][1]; + gPlttBufferFaded[0 * 16 + 11] = sGenderPals[gSaveBlock2Ptr->playerGender][1]; + break; + case 13: + if (sMailViewResources->messageExists) + BufferMailMessage(); + break; + case 14: + if (sMailViewResources->messageExists) + { + AddMailMessagePrinters(); + RunTextPrinters(); + } + break; + case 15: + if (sub_8058244() == TRUE) + return FALSE; + break; + case 16: + SetVBlankCallback(VBlankCB_ShowMail); + gPaletteFade.bufferTransferDisabled = TRUE; + break; + case 17: + iconId = MailSpeciesToIconSpecies(sMailViewResources->mail->species); + switch (sMailViewResources->monIconType) + { + case MAIL_ICON_BEAD: + LoadMonIconPalette(iconId); + sMailViewResources->monIconSpriteId = CreateMonIcon_HandleDeoxys(iconId, SpriteCallbackDummy, 0x60, 0x80, 0, FALSE); + break; + case MAIL_ICON_DREAM: + LoadMonIconPalette(iconId); + sMailViewResources->monIconSpriteId = CreateMonIcon_HandleDeoxys(iconId, SpriteCallbackDummy, 0x28, 0x80, 0, FALSE); + break; + } + break; + case 18: + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + ShowBg(0); + ShowBg(1); + ShowBg(2); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); + gPaletteFade.bufferTransferDisabled = FALSE; + sMailViewResources->showMailCallback = ShowMailCB_WaitFadeIn; + return TRUE; + default: + return FALSE; + } + gMain.state++; + return FALSE; +} + +static void CB2_InitMailView(void) +{ + do + { + if (DoInitMailView() == TRUE) + { + SetMainCallback2(CB2_RunShowMailCB); + break; + } + } while (MenuHelpers_LinkSomething() != TRUE); +} + +static void BufferMailMessage(void) +{ + u16 i; + u8 j = 0; + for (i = 0; i < sMailViewResources->messageLayout->numRows; i++) + { + ConvertEasyChatWordsToString(sMailViewResources->messageLinesBuffer[i], &sMailViewResources->mail->words[j], sMailViewResources->messageLayout->linesLayout[i].numWordsInLine, 1); + j += sMailViewResources->messageLayout->linesLayout[i].numWordsInLine; + } + if (sMailViewResources->mailArrangementType == 0) + { + StringCopy(StringCopy(sMailViewResources->authorNameBuffer, sMailViewResources->mail->playerName), gText_From); // ??? + sMailViewResources->nameX = sMailViewResources->messageLayout->nameX + 0x60 - 8 * StringLength(sMailViewResources->authorNameBuffer); + } + else + { + StringCopy(sMailViewResources->authorNameBuffer, sMailViewResources->mail->playerName); + if (StringLength(sMailViewResources->authorNameBuffer) < 6) + ConvertInternationalString(sMailViewResources->authorNameBuffer, LANGUAGE_JAPANESE); + sMailViewResources->nameX = sMailViewResources->messageLayout->nameX; + } +} + +static void AddMailMessagePrinters(void) +{ + u8 y = 0; + u16 i; + u32 width; + + PutWindowTilemap(0); + PutWindowTilemap(1); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); + for (i = 0; i < sMailViewResources->messageLayout->numRows; i++) + { + if (sMailViewResources->messageLinesBuffer[i][0] != EOS && sMailViewResources->messageLinesBuffer[i][0] != CHAR_SPACE) + { + AddTextPrinterParameterized3(0, 1, sMailViewResources->messageLayout->linesLayout[i].lineXoffset + sMailViewResources->messageLayout->messageLeft, y + sMailViewResources->messageLayout->messageTop, sTextColor, 0, sMailViewResources->messageLinesBuffer[i]); + y += sMailViewResources->messageLayout->linesLayout[i].lineHeight; + } + } + width = GetStringWidth(1, gText_From, 0); + AddTextPrinterParameterized3(1, 1, sMailViewResources->nameX, sMailViewResources->messageLayout->nameY, sTextColor, 0, gText_From); + AddTextPrinterParameterized3(1, 1, sMailViewResources->nameX + width, sMailViewResources->messageLayout->nameY, sTextColor, 0, sMailViewResources->authorNameBuffer); + CopyWindowToVram(0, 3); + CopyWindowToVram(1, 3); +} + +static void VBlankCB_ShowMail(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +static void CB2_RunShowMailCB(void) +{ + if (sMailViewResources->monIconType != MAIL_ICON_NONE) + { + AnimateSprites(); + BuildOamBuffer(); + } + sMailViewResources->showMailCallback(); +} + +static void ShowMailCB_WaitFadeIn(void) +{ + if (!UpdatePaletteFade()) + sMailViewResources->showMailCallback = ShowMailCB_WaitButton; +} + +static void ShowMailCB_WaitButton(void) +{ + if (JOY_NEW(A_BUTTON | B_BUTTON)) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); + sMailViewResources->showMailCallback = ShowMailCB_Teardown; + } +} + +static void ShowMailCB_Teardown(void) +{ + if (!UpdatePaletteFade()) + { + SetMainCallback2(sMailViewResources->savedCallback); + switch (sMailViewResources->monIconType) + { + case MAIL_ICON_BEAD: + case MAIL_ICON_DREAM: + FreeMonIconPalette(MailSpeciesToIconSpecies(sMailViewResources->mail->species)); + DestroyMonIcon(&gSprites[sMailViewResources->monIconSpriteId]); + break; + } + *sMailViewResources = (struct MailViewResources){}; + ResetPaletteFade(); + FreeAllWindowBuffers(); + FREE_AND_SET_NULL(sMailViewResources); + } +} diff --git a/src/main_menu.c b/src/main_menu.c index 72056d750..542bcf8ea 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -240,7 +240,7 @@ static void Task_SetWin0BldRegsAndCheckSaveFile(u8 taskId) { case SAVE_STATUS_OK: LoadUserFrameToBg(0); - if (Flag_0x839_IsSet() == TRUE) + if (IsMysteryGiftEnabled() == TRUE) { gTasks[taskId].tMenuType = MAIN_MENU_MYSTERYGIFT; } @@ -259,7 +259,7 @@ static void Task_SetWin0BldRegsAndCheckSaveFile(u8 taskId) SetStdFrame0OnBg(0); gTasks[taskId].tMenuType = MAIN_MENU_CONTINUE; PrintSaveErrorStatus(taskId, gText_SaveFileCorruptedPrevWillBeLoaded); - if (Flag_0x839_IsSet() == TRUE) + if (IsMysteryGiftEnabled() == TRUE) { gTasks[taskId].tMenuType = MAIN_MENU_MYSTERYGIFT; } @@ -652,7 +652,7 @@ static void PrintDexCount(void) u8 strbuf[30]; u8 *ptr; u16 dexcount; - if (FlagGet(FLAG_0x829) == TRUE) + if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { if (IsNationalPokedexEnabled()) dexcount = GetNationalPokedexCount(FLAG_GET_CAUGHT); @@ -671,7 +671,7 @@ static void PrintBadgeCount(void) u8 *ptr; u32 flagId; u8 nbadges = 0; - for (flagId = FLAG_UNK820; flagId < FLAG_UNK820 + 8; flagId++) + for (flagId = FLAG_BADGE01_GET; flagId < FLAG_BADGE01_GET + 8; flagId++) { if (FlagGet(flagId)) nbadges++; diff --git a/src/map_obj_lock.c b/src/map_obj_lock.c index f89819647..e28872fd4 100644 --- a/src/map_obj_lock.c +++ b/src/map_obj_lock.c @@ -38,7 +38,7 @@ bool8 sub_8069590(void) void ScriptFreezeMapObjects(void) { - player_bitmagic(); + FreezeEventObjects(); CreateTask(sub_8069570, 80); } diff --git a/src/menews_jisan.c b/src/menews_jisan.c index 2f6172bbc..f38de9cfd 100644 --- a/src/menews_jisan.c +++ b/src/menews_jisan.c @@ -3,16 +3,17 @@ #include "random.h" #include "event_data.h" #include "menews_jisan.h" +#include "constants/items.h" -static u32 sub_8146D74(struct MysteryEventStruct *); -static void sub_8146DD8(struct MysteryEventStruct *); -static u32 sub_8146E0C(struct MysteryEventStruct *); -static void sub_8146DA0(struct MysteryEventStruct *); -static void sub_8146D94(struct MysteryEventStruct *); +static u32 GetMENewsJisanRewardItem(struct MENewsJisanStruct *); +static void MENewsJisanIncrementCounterUnk0_5(struct MENewsJisanStruct *); +static u32 GetMENewsJisanState(struct MENewsJisanStruct *); +static void MENewsJisanIncrementCounterUnk0_2(struct MENewsJisanStruct *); +static void MENewsJisanResetCounterUnk0_2(struct MENewsJisanStruct *); -void GenerateRandomNews(u32 a0) +void MENewsJisan_SetRandomReward(u32 a0) { - struct MysteryEventStruct *r5 = sub_8143D94(); + struct MENewsJisanStruct *r5 = GetMENewsJisanStructPtr(); r5->unk_0_0 = a0; switch (a0) @@ -21,68 +22,68 @@ void GenerateRandomNews(u32 a0) break; case 1: case 2: - r5->unk_1 = (Random() % 15) + 16; + r5->berry = (Random() % 15) + ITEM_TO_BERRY(ITEM_RAZZ_BERRY); break; case 3: - r5->unk_1 = (Random() % 15) + 1; + r5->berry = (Random() % 15) + ITEM_TO_BERRY(ITEM_CHERI_BERRY); break; } } -void sub_8146C88(void) +void MENewsJisanReset(void) { - struct MysteryEventStruct *r5 = sub_8143D94(); + struct MENewsJisanStruct *r5 = GetMENewsJisanStructPtr(); r5->unk_0_0 = 0; r5->unk_0_2 = 0; r5->unk_0_5 = 0; - r5->unk_1 = 0; - VarSet(VAR_0x4028, 0); + r5->berry = 0; + VarSet(VAR_MENEWS_JISAN_STEP_COUNTER, 0); } -void sub_8146CA4(void) +void MENewsJisanStepCounter(void) { - u16 *r4 = GetVarPointer(VAR_0x4028); - struct MysteryEventStruct *r2 = sub_8143D94(); - struct MysteryEventStruct r0 = *r2; + u16 *r4 = GetVarPointer(VAR_MENEWS_JISAN_STEP_COUNTER); + struct MENewsJisanStruct *r2 = GetMENewsJisanStructPtr(); + struct MENewsJisanStruct r0 = *r2; - if ((u8)r0.unk_0_5 > 4 && ++(*r4) > 0x1f3) + if ((u8)r0.unk_0_5 > 4 && ++(*r4) >= 500) { r2->unk_0_5 = 0; *r4 = 0; } } -u16 sub_8146CE8(void) +u16 Special_GetMENewsJisanItemAndState(void) { u16 *r6 = &gSpecialVar_Result; - struct MysteryEventStruct *r4 = sub_8143D94(); + struct MENewsJisanStruct *r4 = GetMENewsJisanStructPtr(); u16 r5; - if (!Flag_0x839_IsSet() || !ValidateReceivedWonderNews()) + if (!IsMysteryGiftEnabled() || !ValidateReceivedWonderNews()) return 0; - r5 = sub_8146E0C(r4); + r5 = GetMENewsJisanState(r4); switch (r5) { case 0: break; case 1: - *r6 = sub_8146D74(r4); + *r6 = GetMENewsJisanRewardItem(r4); break; case 2: - *r6 = sub_8146D74(r4); + *r6 = GetMENewsJisanRewardItem(r4); break; case 3: break; case 4: - *r6 = sub_8146D74(r4); - sub_8146DA0(r4); + *r6 = GetMENewsJisanRewardItem(r4); + MENewsJisanIncrementCounterUnk0_2(r4); break; case 5: - *r6 = sub_8146D74(r4); - sub_8146D94(r4); + *r6 = GetMENewsJisanRewardItem(r4); + MENewsJisanResetCounterUnk0_2(r4); break; case 6: break; @@ -91,39 +92,39 @@ u16 sub_8146CE8(void) return r5; } -static u32 sub_8146D74(struct MysteryEventStruct *a0) +static u32 GetMENewsJisanRewardItem(struct MENewsJisanStruct *a0) { u32 r4; a0->unk_0_0 = 0; - r4 = a0->unk_1 + 0x84; - a0->unk_1 = 0; - sub_8146DD8(a0); + r4 = a0->berry + FIRST_BERRY_INDEX - 1; + a0->berry = 0; + MENewsJisanIncrementCounterUnk0_5(a0); return r4; } -static void sub_8146D94(struct MysteryEventStruct *a0) +static void MENewsJisanResetCounterUnk0_2(struct MENewsJisanStruct *a0) { a0->unk_0_2 = 0; } -static void sub_8146DA0(struct MysteryEventStruct *a0) +static void MENewsJisanIncrementCounterUnk0_2(struct MENewsJisanStruct *a0) { a0->unk_0_2++; if ((u8)a0->unk_0_2 > 4) a0->unk_0_2 = 4; } -static void sub_8146DD8(struct MysteryEventStruct *a0) +static void MENewsJisanIncrementCounterUnk0_5(struct MENewsJisanStruct *a0) { a0->unk_0_5++; if ((u8)a0->unk_0_5 > 5) a0->unk_0_5 = 5; } -static u32 sub_8146E0C(struct MysteryEventStruct *a0) +static u32 GetMENewsJisanState(struct MENewsJisanStruct *a0) { - struct MysteryEventStruct r0; + struct MENewsJisanStruct r0; if ((u8)a0->unk_0_5 == 5) return 6; diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 62a102a09..bca99d38f 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -69,7 +69,7 @@ bool8 MetatileBehavior_IsMB21OrSand(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsMB21OrWaterfallBottom(u8 metatileBehavior) +bool8 MetatileBehavior_IsSandOrDeepSand(u8 metatileBehavior) { if(metatileBehavior == MB_21 || metatileBehavior == MB_WATERFALL_BOTTOM) return TRUE; @@ -428,11 +428,11 @@ bool8 MetatileBehavior_IsTallGrass_2(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_ReturnFalse_3(u8 metatileBehavior) { return FALSE; } +bool8 MetatileBehavior_IsLongGrass(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_ReturnFalse_4(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_ReturnFalse_5(u8 metatileBehavior) { return FALSE; } -bool8 MetatileBehavior_ReturnFalse_6(u8 metatileBehavior) { return FALSE; } -bool8 MetatileBehavior_ReturnFalse_7(u8 metatileBehavior) { return FALSE; } +bool8 MetatileBehavior_IsBridge(u8 metatileBehavior) { return FALSE; } +bool8 MetatileBehavior_GetBridgeType(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_UnusedIsMB_01(u8 metatileBehavior) { @@ -450,7 +450,7 @@ bool8 MetatileBehavior_UnusedIsTallGrass(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsMB0B(u8 metatileBehavior) +bool8 MetatileBehavior_IsIndoorEncounter(u8 metatileBehavior) { if(metatileBehavior == MB_0B) return TRUE; @@ -458,7 +458,7 @@ bool8 MetatileBehavior_IsMB0B(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsMB0C(u8 metatileBehavior) +bool8 MetatileBehavior_IsMountain(u8 metatileBehavior) { if(metatileBehavior == MB_0C) return TRUE; diff --git a/src/mevent.c b/src/mevent.c index f1c9d8a4c..dc8df05d0 100644 --- a/src/mevent.c +++ b/src/mevent.c @@ -423,7 +423,7 @@ void sub_8143910(u8 taskId) } break; case 15: - data->t0E = ValidateTrainerTowerData((struct TrainerTowerData *)gDecompressionBuffer); + data->t0E = ValidateTrainerTowerData((struct EReaderTrainerHillSet *)gDecompressionBuffer); sub_800AA80(data->t0E); data->state = 16; break; @@ -437,7 +437,7 @@ void sub_8143910(u8 taskId) } break; case 17: - if (CEReaderTool_SaveTrainerTower((struct TrainerTowerData *)gDecompressionBuffer)) + if (CEReaderTool_SaveTrainerTower((struct EReaderTrainerHillSet *)gDecompressionBuffer)) { AddTextPrinterToWindow1(gUnknown_841DE99); ResetDelayTimer(&data->t00); @@ -505,7 +505,7 @@ struct MEventBuffer_3430_Sub * sav1_get_mevent_buffer_2(void) return &gSaveBlock1Ptr->unk_3120.buffer_310.data; } -struct MysteryEventStruct * sub_8143D94(void) +struct MENewsJisanStruct * GetMENewsJisanStructPtr(void) { return &gSaveBlock1Ptr->unk_3120.unk_340; } @@ -562,8 +562,8 @@ void sub_8143E9C(void) void sub_8143ED0(void) { - CpuFill32(0, sub_8143D94(), sizeof(struct MysteryEventStruct)); - sub_8146C88(); + CpuFill32(0, GetMENewsJisanStructPtr(), sizeof(struct MENewsJisanStruct)); + MENewsJisanReset(); } bool32 sub_8143EF4(const u8 * src) @@ -588,7 +588,7 @@ void DestroyWonderCard(void) ClearRamScript(); sub_806E2D0(); sub_806E370(); - sub_80E7524(gSaveBlock2Ptr->unk_B0.field_3F0); + sub_80E7524(&gSaveBlock2Ptr->unk_B0.field_3F0); } bool32 sub_8143F68(const struct MEventBuffer_32E0_Sub * data) diff --git a/src/mevent_8145654.c b/src/mevent_8145654.c index 9c03dc0d5..e42b49627 100644 --- a/src/mevent_8145654.c +++ b/src/mevent_8145654.c @@ -398,7 +398,7 @@ void sub_8146060(void) gUnknown_203F3C8->unk_017C = 0xFF; if (gUnknown_203F3C8->unk_014C.unk_06 != SPECIES_NONE) { - gUnknown_203F3C8->unk_017C = sub_8096ECC(sub_8096FD4(gUnknown_203F3C8->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE); + gUnknown_203F3C8->unk_017C = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(gUnknown_203F3C8->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE); gSprites[gUnknown_203F3C8->unk_017C].oam.priority = 2; } if (gUnknown_203F3C8->unk_0000.unk_09 != 0 && gUnknown_203F3C8->unk_0000.unk_08_0 == 1) @@ -412,7 +412,7 @@ void sub_8146060(void) gUnknown_203F3C8->unk_017D[r7][0] = CreateSprite(&gUnknown_8467FA0, 0xd8 - 32 * r7, 0x90, 8); if (gUnknown_203F3C8->unk_014C.unk_08[0][r7] != 0) { - gUnknown_203F3C8->unk_017D[r7][1] = sub_8096ECC(sub_8096FD4(gUnknown_203F3C8->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0); + gUnknown_203F3C8->unk_017D[r7][1] = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(gUnknown_203F3C8->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0); gSprites[gUnknown_203F3C8->unk_017D[r7][1]].oam.priority = 2; } } @@ -423,7 +423,7 @@ void sub_81461D8(void) { u8 r6 = 0; if (gUnknown_203F3C8->unk_017C != 0xFF) - sub_8097070(&gSprites[gUnknown_203F3C8->unk_017C]); + DestroyMonIcon(&gSprites[gUnknown_203F3C8->unk_017C]); if (gUnknown_203F3C8->unk_0000.unk_09 != 0 && gUnknown_203F3C8->unk_0000.unk_08_0 == 1) { for (; r6 < gUnknown_203F3C8->unk_0000.unk_09; r6++) @@ -435,7 +435,7 @@ void sub_81461D8(void) // if (gUnknown_203F3C8->unk_017D[r6][1] != 0xFF) if (gUnknown_203F3C8->unk_017D[r6][0] != 0xFF) { - sub_8097070(&gSprites[gUnknown_203F3C8->unk_017D[r6][1]]); + DestroyMonIcon(&gSprites[gUnknown_203F3C8->unk_017D[r6][1]]); } } } diff --git a/src/mevent_server.c b/src/mevent_server.c index 4e2b7280d..9fe9e9e79 100644 --- a/src/mevent_server.c +++ b/src/mevent_server.c @@ -226,7 +226,7 @@ static u32 ish_mainseq_4(struct mevent_client * svr) sub_8069EA4(svr->recvBuffer, 1000); break; case 18: - memcpy(gSaveBlock2Ptr->unk_B0.field_3F0, svr->recvBuffer, 0xbc); + memcpy(&gSaveBlock2Ptr->unk_B0.field_3F0, svr->recvBuffer, sizeof(struct BattleTowerEReaderTrainer)); ValidateEReaderTrainer(); break; case 21: diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 26cbdb145..146595272 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -281,7 +281,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx) { u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]; - memcpy(gSaveBlock2Ptr->unk_B0.field_3F0, (void *)data, 0xBC); + memcpy(&gSaveBlock2Ptr->unk_B0.field_3F0, (void *)data, sizeof(struct BattleTowerEReaderTrainer)); ValidateEReaderTrainer(); StringExpandPlaceholders(gStringVar4, gText_MysteryGiftNewTrainer); ctx->data[2] = 2; diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index 395c4e374..13a6d37e2 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -1374,7 +1374,7 @@ void task00_mystery_gift(u8 taskId) } break; case 13: - if (IsRfuTaskFinished()) + if (IsLinkRfuTaskFinished()) { DestroyWirelessStatusIndicatorSprite(); data->state = 14; @@ -1412,11 +1412,11 @@ void task00_mystery_gift(u8 taskId) { if (data->source == 1) { - GenerateRandomNews(1); + MENewsJisan_SetRandomReward(1); } else { - GenerateRandomNews(2); + MENewsJisan_SetRandomReward(2); } } if (sp0 == 0) @@ -1650,7 +1650,7 @@ void task00_mystery_gift(u8 taskId) data->state = 34; break; case 34: - if (IsRfuTaskFinished()) + if (IsLinkRfuTaskFinished()) { DestroyWirelessStatusIndicatorSprite(); data->state = 35; @@ -1661,7 +1661,7 @@ void task00_mystery_gift(u8 taskId) { if (data->source == 1 && data->prevPromptWindowId == 3) { - GenerateRandomNews(3); + MENewsJisan_SetRandomReward(3); data->state = 17; } else diff --git a/src/new_game.c b/src/new_game.c index efeea13cc..e27c862bb 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -25,6 +25,7 @@ #include "easy_chat.h" #include "union_room_chat.h" #include "mevent.h" +#include "renewable_hidden_items.h" #include "trainer_tower.h" #include "script.h" #include "berry_powder.h" @@ -102,7 +103,7 @@ void ResetMenuAndMonGlobals(void) BerryPouch_CursorResetToTop(); sub_811089C(); sub_8083214(Random()); - sub_806E6FC(); + ResetSpecialVars(); } void NewGameInitData(void) @@ -145,7 +146,7 @@ void NewGameInitData(void) copy_strings_to_sav1(); ResetMiniGamesResults(); sub_8143D24(); - sub_815D838(); + SetAllRenewableItemFlags(); WarpToPlayersRoom(); ScriptContext2_RunNewScript(EventScript_ResetAllMapFlags); StringCopy(gSaveBlock1Ptr->rivalName, rivalName); diff --git a/src/oak_speech.c b/src/oak_speech.c index d3b8b8ff0..c39ff262e 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -24,6 +24,7 @@ #include "math_util.h" #include "overworld.h" #include "random.h" +#include "data.h" #include "oak_speech.h" #include "constants/species.h" #include "constants/songs.h" @@ -110,9 +111,6 @@ extern const u8 gText_ABUTTONNext_BBUTTONBack[]; extern const u8 gText_Boy[]; extern const u8 gText_Girl[]; -extern const struct CompressedSpriteSheet gUnknown_8235194[]; -extern const struct CompressedSpritePalette gUnknown_82373F4; - ALIGNED(4) static const u16 sHelpDocsPalette[] = INCBIN_U16("data/oak_speech/help_docs_palette.gbapal"); static const u32 sOakSpeechGfx_GameStartHelpUI[] = INCBIN_U32("data/oak_speech/oak_speech_gfx_game_start_help_u_i.4bpp.lz"); static const u32 sNewGameAdventureIntroTilemap[] = INCBIN_U32("data/oak_speech/new_game_adventure_intro_tilemap.bin.lz"); @@ -1612,8 +1610,8 @@ static void CreateNidoranFSprite(u8 taskId) { u8 spriteId; - DecompressPicFromTable(gUnknown_8235194, OakSpeechNidoranFGetBuffer(0), SPECIES_NIDORAN_F); - LoadCompressedSpritePaletteUsingHeap(&gUnknown_82373F4); + DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], OakSpeechNidoranFGetBuffer(0), SPECIES_NIDORAN_F); + LoadCompressedSpritePaletteUsingHeap(&gMonPaletteTable[SPECIES_NIDORAN_F]); SetMultiuseSpriteTemplateToPokemon(SPECIES_NIDORAN_F, 0); spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x60, 0x60, 1); gSprites[spriteId].callback = SpriteCallbackDummy; diff --git a/src/player_pc.c b/src/player_pc.c index b1929b9ed..f454cd07f 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -149,7 +149,7 @@ void NewGameInitPCItems(void) ; } -void sub_80EB6AC(void) +void BedroomPC(void) { u8 taskId; @@ -161,7 +161,7 @@ void sub_80EB6AC(void) DisplayItemMessageOnField(taskId, 2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); } -void sub_80EB6FC(void) +void PlayerPC(void) { u8 taskId; @@ -566,7 +566,7 @@ static void Task_WaitFadeAndReadSelectedMail(u8 taskId) { MailboxPC_DestroyListMenuBuffer(); CleanupOverworldWindowsAndTilemaps(); - sub_80BEBEC(&SELECTED_MAIL, CB2_SetCbToReturnToMailbox, 1); + ReadMail(&SELECTED_MAIL, CB2_SetCbToReturnToMailbox, 1); DestroyTask(taskId); } } diff --git a/src/pokemon.c b/src/pokemon.c index 1159b1861..17f28c7a6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8,7 +8,7 @@ #include "data.h" #include "string_util.h" #include "battle.h" -#include "battle_main.h" +#include "battle_anim.h" #include "item.h" #include "event_data.h" #include "util.h" @@ -1467,38 +1467,38 @@ const struct SpriteTemplate gUnknown_825DEF0[] = { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, .images = gUnknown_8234698, - .affineAnims = gUnknown_82348C8, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F010, + .oam = &gOamData_824F010, .anims = NULL, .images = gUnknown_82346B8, - .affineAnims = gUnknown_8234944, - .callback = oac_poke_opponent, + .affineAnims = gSpriteAffineAnimTable_8234944, + .callback = SpriteCB_WildMon, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, .images = gUnknown_82346D8, - .affineAnims = gUnknown_82348C8, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F010, + .oam = &gOamData_824F010, .anims = NULL, .images = gUnknown_82346F8, - .affineAnims = gUnknown_8234944, - .callback = oac_poke_opponent, + .affineAnims = gSpriteAffineAnimTable_8234944, + .callback = SpriteCB_WildMon, }, }; @@ -1507,55 +1507,55 @@ const struct SpriteTemplate gUnknown_825DF50[] = { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_8234718, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_Red, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_8234740, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_Leaf, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_82347A8, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_RSBrendan, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_82347C8, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_RSMay, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_8234768, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_PokeDude, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, { .tileTag = SPRITE_INVALID_TAG, .paletteTag = 0, - .oam = &gUnknown_824F018, + .oam = &gOamData_824F018, .anims = NULL, - .images = gUnknown_8234788, - .affineAnims = gUnknown_82348C8, + .images = gTrainerBackPicTable_OldMan, + .affineAnims = gSpriteAffineAnimTable_82348C8, .callback = sub_80120C4, }, }; @@ -2362,25 +2362,25 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de // 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_UNK820) + if (FlagGet(FLAG_BADGE01_GET) && !GetBattlerSide(battlerIdAtk)) attack = (110 * attack) / 100; } if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) { - if (FlagGet(FLAG_UNK824) + if (FlagGet(FLAG_BADGE05_GET) && !GetBattlerSide(battlerIdDef)) defense = (110 * defense) / 100; } if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) { - if (FlagGet(FLAG_UNK826) + if (FlagGet(FLAG_BADGE07_GET) && !GetBattlerSide(battlerIdAtk)) spAttack = (110 * spAttack) / 100; } if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) { - if (FlagGet(FLAG_UNK826) + if (FlagGet(FLAG_BADGE07_GET) && !GetBattlerSide(battlerIdDef)) spDefense = (110 * spDefense) / 100; } @@ -2698,7 +2698,7 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) } } gMultiuseSpriteTemplate.paletteTag = speciesTag; - gMultiuseSpriteTemplate.anims = gUnknown_82349BC; + gMultiuseSpriteTemplate.anims = gSpriteAnimTable_82349BC; } void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosition) @@ -3634,7 +3634,7 @@ static u8 SendMonToPC(struct Pokemon* mon) gSpecialVar_MonBoxId = boxNo; gSpecialVar_MonBoxPos = boxPos; if (get_unknown_box_id() != boxNo) - FlagClear(FLAG_UNK843); + FlagClear(FLAG_SYS_CHANGED_BOX_TO_STORE_MON); VarSet(VAR_0x4037, boxNo); return MON_GIVEN_TO_PC; } @@ -4652,8 +4652,7 @@ bool8 PokemonUseItemEffects2(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo sp18 = itemEffect[r10]; r10++; break; - case 7:\ - + case 7: if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && retVal == FALSE && sp18 == 0) @@ -5406,7 +5405,7 @@ u16 GetMonEVCount(struct Pokemon *mon) return count; } -void sub_8043A68(void) +void RandomlyGivePartyPokerus(struct Pokemon *party) { u8 foo[4]; // huh? } @@ -5472,7 +5471,7 @@ static void sub_8043B38(void) u8 foo[4]; // huh? } -void sub_8043B40(void) +void PartySpreadPokerus(struct Pokemon *party) { u8 foo[4]; // huh? } @@ -6089,7 +6088,7 @@ static void OakSpeechNidoranFSetupTemplateDummy(struct OakSpeechNidoranFStruct * 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].anims = gUnknown_82349BC; + structPtr->templates[i].anims = gSpriteAnimTable_82349BC; structPtr->templates[i].paletteTag = i; } } diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c new file mode 100644 index 000000000..f3492593c --- /dev/null +++ b/src/pokemon_icon.c @@ -0,0 +1,1284 @@ +#include "global.h" +#include "palette.h" +#include "mail_data.h" +#include "pokemon_icon.h" +#include "graphics.h" +#include "constants/species.h" + +#define POKE_ICON_BASE_PAL_TAG 56000 + +struct MonIconSpriteTemplate +{ + const struct OamData * oam; + const u8 *image; + const union AnimCmd *const * anims; + const union AffineAnimCmd *const * affineAnims; + SpriteCallback callback; + u16 paletteTag; +}; + +static u8 CreateMonIconSprite(const struct MonIconSpriteTemplate * template, s16 x, s16 y, u8 subpriority); +static void DestroyMonIconInternal(struct Sprite * sprite); + +const u16 gMonIconPalettes[][16] = { + INCBIN_U16("graphics/pokemon/icon_palettes/icon_palette_0.gbapal"), + INCBIN_U16("graphics/pokemon/icon_palettes/icon_palette_1.gbapal"), + INCBIN_U16("graphics/pokemon/icon_palettes/icon_palette_2.gbapal") +}; + +const u8 *const gMonIconTable[] = { + [SPECIES_NONE] = gMonIcon_QuestionMark, + [SPECIES_BULBASAUR] = gMonIcon_Bulbasaur, + [SPECIES_IVYSAUR] = gMonIcon_Ivysaur, + [SPECIES_VENUSAUR] = gMonIcon_Venusaur, + [SPECIES_CHARMANDER] = gMonIcon_Charmander, + [SPECIES_CHARMELEON] = gMonIcon_Charmeleon, + [SPECIES_CHARIZARD] = gMonIcon_Charizard, + [SPECIES_SQUIRTLE] = gMonIcon_Squirtle, + [SPECIES_WARTORTLE] = gMonIcon_Wartortle, + [SPECIES_BLASTOISE] = gMonIcon_Blastoise, + [SPECIES_CATERPIE] = gMonIcon_Caterpie, + [SPECIES_METAPOD] = gMonIcon_Metapod, + [SPECIES_BUTTERFREE] = gMonIcon_Butterfree, + [SPECIES_WEEDLE] = gMonIcon_Weedle, + [SPECIES_KAKUNA] = gMonIcon_Kakuna, + [SPECIES_BEEDRILL] = gMonIcon_Beedrill, + [SPECIES_PIDGEY] = gMonIcon_Pidgey, + [SPECIES_PIDGEOTTO] = gMonIcon_Pidgeotto, + [SPECIES_PIDGEOT] = gMonIcon_Pidgeot, + [SPECIES_RATTATA] = gMonIcon_Rattata, + [SPECIES_RATICATE] = gMonIcon_Raticate, + [SPECIES_SPEAROW] = gMonIcon_Spearow, + [SPECIES_FEAROW] = gMonIcon_Fearow, + [SPECIES_EKANS] = gMonIcon_Ekans, + [SPECIES_ARBOK] = gMonIcon_Arbok, + [SPECIES_PIKACHU] = gMonIcon_Pikachu, + [SPECIES_RAICHU] = gMonIcon_Raichu, + [SPECIES_SANDSHREW] = gMonIcon_Sandshrew, + [SPECIES_SANDSLASH] = gMonIcon_Sandslash, + [SPECIES_NIDORAN_F] = gMonIcon_NidoranF, + [SPECIES_NIDORINA] = gMonIcon_Nidorina, + [SPECIES_NIDOQUEEN] = gMonIcon_Nidoqueen, + [SPECIES_NIDORAN_M] = gMonIcon_NidoranM, + [SPECIES_NIDORINO] = gMonIcon_Nidorino, + [SPECIES_NIDOKING] = gMonIcon_Nidoking, + [SPECIES_CLEFAIRY] = gMonIcon_Clefairy, + [SPECIES_CLEFABLE] = gMonIcon_Clefable, + [SPECIES_VULPIX] = gMonIcon_Vulpix, + [SPECIES_NINETALES] = gMonIcon_Ninetales, + [SPECIES_JIGGLYPUFF] = gMonIcon_Jigglypuff, + [SPECIES_WIGGLYTUFF] = gMonIcon_Wigglytuff, + [SPECIES_ZUBAT] = gMonIcon_Zubat, + [SPECIES_GOLBAT] = gMonIcon_Golbat, + [SPECIES_ODDISH] = gMonIcon_Oddish, + [SPECIES_GLOOM] = gMonIcon_Gloom, + [SPECIES_VILEPLUME] = gMonIcon_Vileplume, + [SPECIES_PARAS] = gMonIcon_Paras, + [SPECIES_PARASECT] = gMonIcon_Parasect, + [SPECIES_VENONAT] = gMonIcon_Venonat, + [SPECIES_VENOMOTH] = gMonIcon_Venomoth, + [SPECIES_DIGLETT] = gMonIcon_Diglett, + [SPECIES_DUGTRIO] = gMonIcon_Dugtrio, + [SPECIES_MEOWTH] = gMonIcon_Meowth, + [SPECIES_PERSIAN] = gMonIcon_Persian, + [SPECIES_PSYDUCK] = gMonIcon_Psyduck, + [SPECIES_GOLDUCK] = gMonIcon_Golduck, + [SPECIES_MANKEY] = gMonIcon_Mankey, + [SPECIES_PRIMEAPE] = gMonIcon_Primeape, + [SPECIES_GROWLITHE] = gMonIcon_Growlithe, + [SPECIES_ARCANINE] = gMonIcon_Arcanine, + [SPECIES_POLIWAG] = gMonIcon_Poliwag, + [SPECIES_POLIWHIRL] = gMonIcon_Poliwhirl, + [SPECIES_POLIWRATH] = gMonIcon_Poliwrath, + [SPECIES_ABRA] = gMonIcon_Abra, + [SPECIES_KADABRA] = gMonIcon_Kadabra, + [SPECIES_ALAKAZAM] = gMonIcon_Alakazam, + [SPECIES_MACHOP] = gMonIcon_Machop, + [SPECIES_MACHOKE] = gMonIcon_Machoke, + [SPECIES_MACHAMP] = gMonIcon_Machamp, + [SPECIES_BELLSPROUT] = gMonIcon_Bellsprout, + [SPECIES_WEEPINBELL] = gMonIcon_Weepinbell, + [SPECIES_VICTREEBEL] = gMonIcon_Victreebel, + [SPECIES_TENTACOOL] = gMonIcon_Tentacool, + [SPECIES_TENTACRUEL] = gMonIcon_Tentacruel, + [SPECIES_GEODUDE] = gMonIcon_Geodude, + [SPECIES_GRAVELER] = gMonIcon_Graveler, + [SPECIES_GOLEM] = gMonIcon_Golem, + [SPECIES_PONYTA] = gMonIcon_Ponyta, + [SPECIES_RAPIDASH] = gMonIcon_Rapidash, + [SPECIES_SLOWPOKE] = gMonIcon_Slowpoke, + [SPECIES_SLOWBRO] = gMonIcon_Slowbro, + [SPECIES_MAGNEMITE] = gMonIcon_Magnemite, + [SPECIES_MAGNETON] = gMonIcon_Magneton, + [SPECIES_FARFETCHD] = gMonIcon_Farfetchd, + [SPECIES_DODUO] = gMonIcon_Doduo, + [SPECIES_DODRIO] = gMonIcon_Dodrio, + [SPECIES_SEEL] = gMonIcon_Seel, + [SPECIES_DEWGONG] = gMonIcon_Dewgong, + [SPECIES_GRIMER] = gMonIcon_Grimer, + [SPECIES_MUK] = gMonIcon_Muk, + [SPECIES_SHELLDER] = gMonIcon_Shellder, + [SPECIES_CLOYSTER] = gMonIcon_Cloyster, + [SPECIES_GASTLY] = gMonIcon_Gastly, + [SPECIES_HAUNTER] = gMonIcon_Haunter, + [SPECIES_GENGAR] = gMonIcon_Gengar, + [SPECIES_ONIX] = gMonIcon_Onix, + [SPECIES_DROWZEE] = gMonIcon_Drowzee, + [SPECIES_HYPNO] = gMonIcon_Hypno, + [SPECIES_KRABBY] = gMonIcon_Krabby, + [SPECIES_KINGLER] = gMonIcon_Kingler, + [SPECIES_VOLTORB] = gMonIcon_Voltorb, + [SPECIES_ELECTRODE] = gMonIcon_Electrode, + [SPECIES_EXEGGCUTE] = gMonIcon_Exeggcute, + [SPECIES_EXEGGUTOR] = gMonIcon_Exeggutor, + [SPECIES_CUBONE] = gMonIcon_Cubone, + [SPECIES_MAROWAK] = gMonIcon_Marowak, + [SPECIES_HITMONLEE] = gMonIcon_Hitmonlee, + [SPECIES_HITMONCHAN] = gMonIcon_Hitmonchan, + [SPECIES_LICKITUNG] = gMonIcon_Lickitung, + [SPECIES_KOFFING] = gMonIcon_Koffing, + [SPECIES_WEEZING] = gMonIcon_Weezing, + [SPECIES_RHYHORN] = gMonIcon_Rhyhorn, + [SPECIES_RHYDON] = gMonIcon_Rhydon, + [SPECIES_CHANSEY] = gMonIcon_Chansey, + [SPECIES_TANGELA] = gMonIcon_Tangela, + [SPECIES_KANGASKHAN] = gMonIcon_Kangaskhan, + [SPECIES_HORSEA] = gMonIcon_Horsea, + [SPECIES_SEADRA] = gMonIcon_Seadra, + [SPECIES_GOLDEEN] = gMonIcon_Goldeen, + [SPECIES_SEAKING] = gMonIcon_Seaking, + [SPECIES_STARYU] = gMonIcon_Staryu, + [SPECIES_STARMIE] = gMonIcon_Starmie, + [SPECIES_MR_MIME] = gMonIcon_Mrmime, + [SPECIES_SCYTHER] = gMonIcon_Scyther, + [SPECIES_JYNX] = gMonIcon_Jynx, + [SPECIES_ELECTABUZZ] = gMonIcon_Electabuzz, + [SPECIES_MAGMAR] = gMonIcon_Magmar, + [SPECIES_PINSIR] = gMonIcon_Pinsir, + [SPECIES_TAUROS] = gMonIcon_Tauros, + [SPECIES_MAGIKARP] = gMonIcon_Magikarp, + [SPECIES_GYARADOS] = gMonIcon_Gyarados, + [SPECIES_LAPRAS] = gMonIcon_Lapras, + [SPECIES_DITTO] = gMonIcon_Ditto, + [SPECIES_EEVEE] = gMonIcon_Eevee, + [SPECIES_VAPOREON] = gMonIcon_Vaporeon, + [SPECIES_JOLTEON] = gMonIcon_Jolteon, + [SPECIES_FLAREON] = gMonIcon_Flareon, + [SPECIES_PORYGON] = gMonIcon_Porygon, + [SPECIES_OMANYTE] = gMonIcon_Omanyte, + [SPECIES_OMASTAR] = gMonIcon_Omastar, + [SPECIES_KABUTO] = gMonIcon_Kabuto, + [SPECIES_KABUTOPS] = gMonIcon_Kabutops, + [SPECIES_AERODACTYL] = gMonIcon_Aerodactyl, + [SPECIES_SNORLAX] = gMonIcon_Snorlax, + [SPECIES_ARTICUNO] = gMonIcon_Articuno, + [SPECIES_ZAPDOS] = gMonIcon_Zapdos, + [SPECIES_MOLTRES] = gMonIcon_Moltres, + [SPECIES_DRATINI] = gMonIcon_Dratini, + [SPECIES_DRAGONAIR] = gMonIcon_Dragonair, + [SPECIES_DRAGONITE] = gMonIcon_Dragonite, + [SPECIES_MEWTWO] = gMonIcon_Mewtwo, + [SPECIES_MEW] = gMonIcon_Mew, + [SPECIES_CHIKORITA] = gMonIcon_Chikorita, + [SPECIES_BAYLEEF] = gMonIcon_Bayleef, + [SPECIES_MEGANIUM] = gMonIcon_Meganium, + [SPECIES_CYNDAQUIL] = gMonIcon_Cyndaquil, + [SPECIES_QUILAVA] = gMonIcon_Quilava, + [SPECIES_TYPHLOSION] = gMonIcon_Typhlosion, + [SPECIES_TOTODILE] = gMonIcon_Totodile, + [SPECIES_CROCONAW] = gMonIcon_Croconaw, + [SPECIES_FERALIGATR] = gMonIcon_Feraligatr, + [SPECIES_SENTRET] = gMonIcon_Sentret, + [SPECIES_FURRET] = gMonIcon_Furret, + [SPECIES_HOOTHOOT] = gMonIcon_Hoothoot, + [SPECIES_NOCTOWL] = gMonIcon_Noctowl, + [SPECIES_LEDYBA] = gMonIcon_Ledyba, + [SPECIES_LEDIAN] = gMonIcon_Ledian, + [SPECIES_SPINARAK] = gMonIcon_Spinarak, + [SPECIES_ARIADOS] = gMonIcon_Ariados, + [SPECIES_CROBAT] = gMonIcon_Crobat, + [SPECIES_CHINCHOU] = gMonIcon_Chinchou, + [SPECIES_LANTURN] = gMonIcon_Lanturn, + [SPECIES_PICHU] = gMonIcon_Pichu, + [SPECIES_CLEFFA] = gMonIcon_Cleffa, + [SPECIES_IGGLYBUFF] = gMonIcon_Igglybuff, + [SPECIES_TOGEPI] = gMonIcon_Togepi, + [SPECIES_TOGETIC] = gMonIcon_Togetic, + [SPECIES_NATU] = gMonIcon_Natu, + [SPECIES_XATU] = gMonIcon_Xatu, + [SPECIES_MAREEP] = gMonIcon_Mareep, + [SPECIES_FLAAFFY] = gMonIcon_Flaaffy, + [SPECIES_AMPHAROS] = gMonIcon_Ampharos, + [SPECIES_BELLOSSOM] = gMonIcon_Bellossom, + [SPECIES_MARILL] = gMonIcon_Marill, + [SPECIES_AZUMARILL] = gMonIcon_Azumarill, + [SPECIES_SUDOWOODO] = gMonIcon_Sudowoodo, + [SPECIES_POLITOED] = gMonIcon_Politoed, + [SPECIES_HOPPIP] = gMonIcon_Hoppip, + [SPECIES_SKIPLOOM] = gMonIcon_Skiploom, + [SPECIES_JUMPLUFF] = gMonIcon_Jumpluff, + [SPECIES_AIPOM] = gMonIcon_Aipom, + [SPECIES_SUNKERN] = gMonIcon_Sunkern, + [SPECIES_SUNFLORA] = gMonIcon_Sunflora, + [SPECIES_YANMA] = gMonIcon_Yanma, + [SPECIES_WOOPER] = gMonIcon_Wooper, + [SPECIES_QUAGSIRE] = gMonIcon_Quagsire, + [SPECIES_ESPEON] = gMonIcon_Espeon, + [SPECIES_UMBREON] = gMonIcon_Umbreon, + [SPECIES_MURKROW] = gMonIcon_Murkrow, + [SPECIES_SLOWKING] = gMonIcon_Slowking, + [SPECIES_MISDREAVUS] = gMonIcon_Misdreavus, + [SPECIES_UNOWN] = gMonIcon_UnownA, + [SPECIES_WOBBUFFET] = gMonIcon_Wobbuffet, + [SPECIES_GIRAFARIG] = gMonIcon_Girafarig, + [SPECIES_PINECO] = gMonIcon_Pineco, + [SPECIES_FORRETRESS] = gMonIcon_Forretress, + [SPECIES_DUNSPARCE] = gMonIcon_Dunsparce, + [SPECIES_GLIGAR] = gMonIcon_Gligar, + [SPECIES_STEELIX] = gMonIcon_Steelix, + [SPECIES_SNUBBULL] = gMonIcon_Snubbull, + [SPECIES_GRANBULL] = gMonIcon_Granbull, + [SPECIES_QWILFISH] = gMonIcon_Qwilfish, + [SPECIES_SCIZOR] = gMonIcon_Scizor, + [SPECIES_SHUCKLE] = gMonIcon_Shuckle, + [SPECIES_HERACROSS] = gMonIcon_Heracross, + [SPECIES_SNEASEL] = gMonIcon_Sneasel, + [SPECIES_TEDDIURSA] = gMonIcon_Teddiursa, + [SPECIES_URSARING] = gMonIcon_Ursaring, + [SPECIES_SLUGMA] = gMonIcon_Slugma, + [SPECIES_MAGCARGO] = gMonIcon_Magcargo, + [SPECIES_SWINUB] = gMonIcon_Swinub, + [SPECIES_PILOSWINE] = gMonIcon_Piloswine, + [SPECIES_CORSOLA] = gMonIcon_Corsola, + [SPECIES_REMORAID] = gMonIcon_Remoraid, + [SPECIES_OCTILLERY] = gMonIcon_Octillery, + [SPECIES_DELIBIRD] = gMonIcon_Delibird, + [SPECIES_MANTINE] = gMonIcon_Mantine, + [SPECIES_SKARMORY] = gMonIcon_Skarmory, + [SPECIES_HOUNDOUR] = gMonIcon_Houndour, + [SPECIES_HOUNDOOM] = gMonIcon_Houndoom, + [SPECIES_KINGDRA] = gMonIcon_Kingdra, + [SPECIES_PHANPY] = gMonIcon_Phanpy, + [SPECIES_DONPHAN] = gMonIcon_Donphan, + [SPECIES_PORYGON2] = gMonIcon_Porygon2, + [SPECIES_STANTLER] = gMonIcon_Stantler, + [SPECIES_SMEARGLE] = gMonIcon_Smeargle, + [SPECIES_TYROGUE] = gMonIcon_Tyrogue, + [SPECIES_HITMONTOP] = gMonIcon_Hitmontop, + [SPECIES_SMOOCHUM] = gMonIcon_Smoochum, + [SPECIES_ELEKID] = gMonIcon_Elekid, + [SPECIES_MAGBY] = gMonIcon_Magby, + [SPECIES_MILTANK] = gMonIcon_Miltank, + [SPECIES_BLISSEY] = gMonIcon_Blissey, + [SPECIES_RAIKOU] = gMonIcon_Raikou, + [SPECIES_ENTEI] = gMonIcon_Entei, + [SPECIES_SUICUNE] = gMonIcon_Suicune, + [SPECIES_LARVITAR] = gMonIcon_Larvitar, + [SPECIES_PUPITAR] = gMonIcon_Pupitar, + [SPECIES_TYRANITAR] = gMonIcon_Tyranitar, + [SPECIES_LUGIA] = gMonIcon_Lugia, + [SPECIES_HO_OH] = gMonIcon_HoOh, + [SPECIES_CELEBI] = gMonIcon_Celebi, + [SPECIES_OLD_UNOWN_B] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_C] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_D] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_E] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_F] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_G] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_H] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_I] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_J] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_K] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_L] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_M] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_N] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_O] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_P] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_Q] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_R] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_S] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_T] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_U] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_V] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_W] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_X] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_Y] = gMonIcon_QuestionMark, + [SPECIES_OLD_UNOWN_Z] = gMonIcon_QuestionMark, + [SPECIES_TREECKO] = gMonIcon_Treecko, + [SPECIES_GROVYLE] = gMonIcon_Grovyle, + [SPECIES_SCEPTILE] = gMonIcon_Sceptile, + [SPECIES_TORCHIC] = gMonIcon_Torchic, + [SPECIES_COMBUSKEN] = gMonIcon_Combusken, + [SPECIES_BLAZIKEN] = gMonIcon_Blaziken, + [SPECIES_MUDKIP] = gMonIcon_Mudkip, + [SPECIES_MARSHTOMP] = gMonIcon_Marshtomp, + [SPECIES_SWAMPERT] = gMonIcon_Swampert, + [SPECIES_POOCHYENA] = gMonIcon_Poochyena, + [SPECIES_MIGHTYENA] = gMonIcon_Mightyena, + [SPECIES_ZIGZAGOON] = gMonIcon_Zigzagoon, + [SPECIES_LINOONE] = gMonIcon_Linoone, + [SPECIES_WURMPLE] = gMonIcon_Wurmple, + [SPECIES_SILCOON] = gMonIcon_Silcoon, + [SPECIES_BEAUTIFLY] = gMonIcon_Beautifly, + [SPECIES_CASCOON] = gMonIcon_Cascoon, + [SPECIES_DUSTOX] = gMonIcon_Dustox, + [SPECIES_LOTAD] = gMonIcon_Lotad, + [SPECIES_LOMBRE] = gMonIcon_Lombre, + [SPECIES_LUDICOLO] = gMonIcon_Ludicolo, + [SPECIES_SEEDOT] = gMonIcon_Seedot, + [SPECIES_NUZLEAF] = gMonIcon_Nuzleaf, + [SPECIES_SHIFTRY] = gMonIcon_Shiftry, + [SPECIES_NINCADA] = gMonIcon_Nincada, + [SPECIES_NINJASK] = gMonIcon_Ninjask, + [SPECIES_SHEDINJA] = gMonIcon_Shedinja, + [SPECIES_TAILLOW] = gMonIcon_Taillow, + [SPECIES_SWELLOW] = gMonIcon_Swellow, + [SPECIES_SHROOMISH] = gMonIcon_Shroomish, + [SPECIES_BRELOOM] = gMonIcon_Breloom, + [SPECIES_SPINDA] = gMonIcon_Spinda, + [SPECIES_WINGULL] = gMonIcon_Wingull, + [SPECIES_PELIPPER] = gMonIcon_Pelipper, + [SPECIES_SURSKIT] = gMonIcon_Surskit, + [SPECIES_MASQUERAIN] = gMonIcon_Masquerain, + [SPECIES_WAILMER] = gMonIcon_Wailmer, + [SPECIES_WAILORD] = gMonIcon_Wailord, + [SPECIES_SKITTY] = gMonIcon_Skitty, + [SPECIES_DELCATTY] = gMonIcon_Delcatty, + [SPECIES_KECLEON] = gMonIcon_Kecleon, + [SPECIES_BALTOY] = gMonIcon_Baltoy, + [SPECIES_CLAYDOL] = gMonIcon_Claydol, + [SPECIES_NOSEPASS] = gMonIcon_Nosepass, + [SPECIES_TORKOAL] = gMonIcon_Torkoal, + [SPECIES_SABLEYE] = gMonIcon_Sableye, + [SPECIES_BARBOACH] = gMonIcon_Barboach, + [SPECIES_WHISCASH] = gMonIcon_Whiscash, + [SPECIES_LUVDISC] = gMonIcon_Luvdisc, + [SPECIES_CORPHISH] = gMonIcon_Corphish, + [SPECIES_CRAWDAUNT] = gMonIcon_Crawdaunt, + [SPECIES_FEEBAS] = gMonIcon_Feebas, + [SPECIES_MILOTIC] = gMonIcon_Milotic, + [SPECIES_CARVANHA] = gMonIcon_Carvanha, + [SPECIES_SHARPEDO] = gMonIcon_Sharpedo, + [SPECIES_TRAPINCH] = gMonIcon_Trapinch, + [SPECIES_VIBRAVA] = gMonIcon_Vibrava, + [SPECIES_FLYGON] = gMonIcon_Flygon, + [SPECIES_MAKUHITA] = gMonIcon_Makuhita, + [SPECIES_HARIYAMA] = gMonIcon_Hariyama, + [SPECIES_ELECTRIKE] = gMonIcon_Electrike, + [SPECIES_MANECTRIC] = gMonIcon_Manectric, + [SPECIES_NUMEL] = gMonIcon_Numel, + [SPECIES_CAMERUPT] = gMonIcon_Camerupt, + [SPECIES_SPHEAL] = gMonIcon_Spheal, + [SPECIES_SEALEO] = gMonIcon_Sealeo, + [SPECIES_WALREIN] = gMonIcon_Walrein, + [SPECIES_CACNEA] = gMonIcon_Cacnea, + [SPECIES_CACTURNE] = gMonIcon_Cacturne, + [SPECIES_SNORUNT] = gMonIcon_Snorunt, + [SPECIES_GLALIE] = gMonIcon_Glalie, + [SPECIES_LUNATONE] = gMonIcon_Lunatone, + [SPECIES_SOLROCK] = gMonIcon_Solrock, + [SPECIES_AZURILL] = gMonIcon_Azurill, + [SPECIES_SPOINK] = gMonIcon_Spoink, + [SPECIES_GRUMPIG] = gMonIcon_Grumpig, + [SPECIES_PLUSLE] = gMonIcon_Plusle, + [SPECIES_MINUN] = gMonIcon_Minun, + [SPECIES_MAWILE] = gMonIcon_Mawile, + [SPECIES_MEDITITE] = gMonIcon_Meditite, + [SPECIES_MEDICHAM] = gMonIcon_Medicham, + [SPECIES_SWABLU] = gMonIcon_Swablu, + [SPECIES_ALTARIA] = gMonIcon_Altaria, + [SPECIES_WYNAUT] = gMonIcon_Wynaut, + [SPECIES_DUSKULL] = gMonIcon_Duskull, + [SPECIES_DUSCLOPS] = gMonIcon_Dusclops, + [SPECIES_ROSELIA] = gMonIcon_Roselia, + [SPECIES_SLAKOTH] = gMonIcon_Slakoth, + [SPECIES_VIGOROTH] = gMonIcon_Vigoroth, + [SPECIES_SLAKING] = gMonIcon_Slaking, + [SPECIES_GULPIN] = gMonIcon_Gulpin, + [SPECIES_SWALOT] = gMonIcon_Swalot, + [SPECIES_TROPIUS] = gMonIcon_Tropius, + [SPECIES_WHISMUR] = gMonIcon_Whismur, + [SPECIES_LOUDRED] = gMonIcon_Loudred, + [SPECIES_EXPLOUD] = gMonIcon_Exploud, + [SPECIES_CLAMPERL] = gMonIcon_Clamperl, + [SPECIES_HUNTAIL] = gMonIcon_Huntail, + [SPECIES_GOREBYSS] = gMonIcon_Gorebyss, + [SPECIES_ABSOL] = gMonIcon_Absol, + [SPECIES_SHUPPET] = gMonIcon_Shuppet, + [SPECIES_BANETTE] = gMonIcon_Banette, + [SPECIES_SEVIPER] = gMonIcon_Seviper, + [SPECIES_ZANGOOSE] = gMonIcon_Zangoose, + [SPECIES_RELICANTH] = gMonIcon_Relicanth, + [SPECIES_ARON] = gMonIcon_Aron, + [SPECIES_LAIRON] = gMonIcon_Lairon, + [SPECIES_AGGRON] = gMonIcon_Aggron, + [SPECIES_CASTFORM] = gMonIcon_Castform, + [SPECIES_VOLBEAT] = gMonIcon_Volbeat, + [SPECIES_ILLUMISE] = gMonIcon_Illumise, + [SPECIES_LILEEP] = gMonIcon_Lileep, + [SPECIES_CRADILY] = gMonIcon_Cradily, + [SPECIES_ANORITH] = gMonIcon_Anorith, + [SPECIES_ARMALDO] = gMonIcon_Armaldo, + [SPECIES_RALTS] = gMonIcon_Ralts, + [SPECIES_KIRLIA] = gMonIcon_Kirlia, + [SPECIES_GARDEVOIR] = gMonIcon_Gardevoir, + [SPECIES_BAGON] = gMonIcon_Bagon, + [SPECIES_SHELGON] = gMonIcon_Shelgon, + [SPECIES_SALAMENCE] = gMonIcon_Salamence, + [SPECIES_BELDUM] = gMonIcon_Beldum, + [SPECIES_METANG] = gMonIcon_Metang, + [SPECIES_METAGROSS] = gMonIcon_Metagross, + [SPECIES_REGIROCK] = gMonIcon_Regirock, + [SPECIES_REGICE] = gMonIcon_Regice, + [SPECIES_REGISTEEL] = gMonIcon_Registeel, + [SPECIES_KYOGRE] = gMonIcon_Kyogre, + [SPECIES_GROUDON] = gMonIcon_Groudon, + [SPECIES_RAYQUAZA] = gMonIcon_Rayquaza, + [SPECIES_LATIAS] = gMonIcon_Latias, + [SPECIES_LATIOS] = gMonIcon_Latios, + [SPECIES_JIRACHI] = gMonIcon_Jirachi, + [SPECIES_DEOXYS] = gMonIcon_Deoxys, + [SPECIES_CHIMECHO] = gMonIcon_Chimecho, + [SPECIES_EGG] = gMonIcon_Egg, + [SPECIES_UNOWN_B] = gMonIcon_UnownB, + [SPECIES_UNOWN_C] = gMonIcon_UnownC, + [SPECIES_UNOWN_D] = gMonIcon_UnownD, + [SPECIES_UNOWN_E] = gMonIcon_UnownE, + [SPECIES_UNOWN_F] = gMonIcon_UnownF, + [SPECIES_UNOWN_G] = gMonIcon_UnownG, + [SPECIES_UNOWN_H] = gMonIcon_UnownH, + [SPECIES_UNOWN_I] = gMonIcon_UnownI, + [SPECIES_UNOWN_J] = gMonIcon_UnownJ, + [SPECIES_UNOWN_K] = gMonIcon_UnownK, + [SPECIES_UNOWN_L] = gMonIcon_UnownL, + [SPECIES_UNOWN_M] = gMonIcon_UnownM, + [SPECIES_UNOWN_N] = gMonIcon_UnownN, + [SPECIES_UNOWN_O] = gMonIcon_UnownO, + [SPECIES_UNOWN_P] = gMonIcon_UnownP, + [SPECIES_UNOWN_Q] = gMonIcon_UnownQ, + [SPECIES_UNOWN_R] = gMonIcon_UnownR, + [SPECIES_UNOWN_S] = gMonIcon_UnownS, + [SPECIES_UNOWN_T] = gMonIcon_UnownT, + [SPECIES_UNOWN_U] = gMonIcon_UnownU, + [SPECIES_UNOWN_V] = gMonIcon_UnownV, + [SPECIES_UNOWN_W] = gMonIcon_UnownW, + [SPECIES_UNOWN_X] = gMonIcon_UnownX, + [SPECIES_UNOWN_Y] = gMonIcon_UnownY, + [SPECIES_UNOWN_Z] = gMonIcon_UnownZ, + [SPECIES_UNOWN_EMARK] = gMonIcon_UnownExclamationMark, + [SPECIES_UNOWN_QMARK] = gMonIcon_UnownQuestionMark +}; + +const u8 gMonIconPaletteIndices[] = { + [SPECIES_NONE] = 0, + [SPECIES_BULBASAUR] = 1, + [SPECIES_IVYSAUR] = 1, + [SPECIES_VENUSAUR] = 1, + [SPECIES_CHARMANDER] = 0, + [SPECIES_CHARMELEON] = 0, + [SPECIES_CHARIZARD] = 0, + [SPECIES_SQUIRTLE] = 0, + [SPECIES_WARTORTLE] = 2, + [SPECIES_BLASTOISE] = 2, + [SPECIES_CATERPIE] = 1, + [SPECIES_METAPOD] = 1, + [SPECIES_BUTTERFREE] = 0, + [SPECIES_WEEDLE] = 1, + [SPECIES_KAKUNA] = 2, + [SPECIES_BEEDRILL] = 2, + [SPECIES_PIDGEY] = 0, + [SPECIES_PIDGEOTTO] = 0, + [SPECIES_PIDGEOT] = 0, + [SPECIES_RATTATA] = 2, + [SPECIES_RATICATE] = 1, + [SPECIES_SPEAROW] = 0, + [SPECIES_FEAROW] = 0, + [SPECIES_EKANS] = 2, + [SPECIES_ARBOK] = 2, + [SPECIES_PIKACHU] = 2, + [SPECIES_RAICHU] = 0, + [SPECIES_SANDSHREW] = 2, + [SPECIES_SANDSLASH] = 2, + [SPECIES_NIDORAN_F] = 2, + [SPECIES_NIDORINA] = 2, + [SPECIES_NIDOQUEEN] = 2, + [SPECIES_NIDORAN_M] = 2, + [SPECIES_NIDORINO] = 2, + [SPECIES_NIDOKING] = 2, + [SPECIES_CLEFAIRY] = 0, + [SPECIES_CLEFABLE] = 0, + [SPECIES_VULPIX] = 2, + [SPECIES_NINETALES] = 1, + [SPECIES_JIGGLYPUFF] = 0, + [SPECIES_WIGGLYTUFF] = 0, + [SPECIES_ZUBAT] = 2, + [SPECIES_GOLBAT] = 2, + [SPECIES_ODDISH] = 1, + [SPECIES_GLOOM] = 0, + [SPECIES_VILEPLUME] = 0, + [SPECIES_PARAS] = 0, + [SPECIES_PARASECT] = 0, + [SPECIES_VENONAT] = 0, + [SPECIES_VENOMOTH] = 2, + [SPECIES_DIGLETT] = 2, + [SPECIES_DUGTRIO] = 2, + [SPECIES_MEOWTH] = 1, + [SPECIES_PERSIAN] = 1, + [SPECIES_PSYDUCK] = 1, + [SPECIES_GOLDUCK] = 2, + [SPECIES_MANKEY] = 1, + [SPECIES_PRIMEAPE] = 2, + [SPECIES_GROWLITHE] = 0, + [SPECIES_ARCANINE] = 0, + [SPECIES_POLIWAG] = 0, + [SPECIES_POLIWHIRL] = 0, + [SPECIES_POLIWRATH] = 0, + [SPECIES_ABRA] = 2, + [SPECIES_KADABRA] = 2, + [SPECIES_ALAKAZAM] = 2, + [SPECIES_MACHOP] = 0, + [SPECIES_MACHOKE] = 2, + [SPECIES_MACHAMP] = 0, + [SPECIES_BELLSPROUT] = 1, + [SPECIES_WEEPINBELL] = 1, + [SPECIES_VICTREEBEL] = 1, + [SPECIES_TENTACOOL] = 2, + [SPECIES_TENTACRUEL] = 2, + [SPECIES_GEODUDE] = 1, + [SPECIES_GRAVELER] = 1, + [SPECIES_GOLEM] = 1, + [SPECIES_PONYTA] = 0, + [SPECIES_RAPIDASH] = 0, + [SPECIES_SLOWPOKE] = 0, + [SPECIES_SLOWBRO] = 0, + [SPECIES_MAGNEMITE] = 0, + [SPECIES_MAGNETON] = 0, + [SPECIES_FARFETCHD] = 1, + [SPECIES_DODUO] = 2, + [SPECIES_DODRIO] = 2, + [SPECIES_SEEL] = 2, + [SPECIES_DEWGONG] = 2, + [SPECIES_GRIMER] = 2, + [SPECIES_MUK] = 2, + [SPECIES_SHELLDER] = 2, + [SPECIES_CLOYSTER] = 2, + [SPECIES_GASTLY] = 2, + [SPECIES_HAUNTER] = 2, + [SPECIES_GENGAR] = 2, + [SPECIES_ONIX] = 2, + [SPECIES_DROWZEE] = 2, + [SPECIES_HYPNO] = 1, + [SPECIES_KRABBY] = 2, + [SPECIES_KINGLER] = 2, + [SPECIES_VOLTORB] = 0, + [SPECIES_ELECTRODE] = 0, + [SPECIES_EXEGGCUTE] = 0, + [SPECIES_EXEGGUTOR] = 1, + [SPECIES_CUBONE] = 1, + [SPECIES_MAROWAK] = 1, + [SPECIES_HITMONLEE] = 2, + [SPECIES_HITMONCHAN] = 2, + [SPECIES_LICKITUNG] = 1, + [SPECIES_KOFFING] = 2, + [SPECIES_WEEZING] = 2, + [SPECIES_RHYHORN] = 1, + [SPECIES_RHYDON] = 1, + [SPECIES_CHANSEY] = 0, + [SPECIES_TANGELA] = 0, + [SPECIES_KANGASKHAN] = 1, + [SPECIES_HORSEA] = 0, + [SPECIES_SEADRA] = 0, + [SPECIES_GOLDEEN] = 0, + [SPECIES_SEAKING] = 0, + [SPECIES_STARYU] = 2, + [SPECIES_STARMIE] = 2, + [SPECIES_MR_MIME] = 0, + [SPECIES_SCYTHER] = 1, + [SPECIES_JYNX] = 2, + [SPECIES_ELECTABUZZ] = 1, + [SPECIES_MAGMAR] = 0, + [SPECIES_PINSIR] = 2, + [SPECIES_TAUROS] = 2, + [SPECIES_MAGIKARP] = 0, + [SPECIES_GYARADOS] = 0, + [SPECIES_LAPRAS] = 2, + [SPECIES_DITTO] = 2, + [SPECIES_EEVEE] = 2, + [SPECIES_VAPOREON] = 0, + [SPECIES_JOLTEON] = 0, + [SPECIES_FLAREON] = 0, + [SPECIES_PORYGON] = 0, + [SPECIES_OMANYTE] = 0, + [SPECIES_OMASTAR] = 0, + [SPECIES_KABUTO] = 2, + [SPECIES_KABUTOPS] = 2, + [SPECIES_AERODACTYL] = 0, + [SPECIES_SNORLAX] = 1, + [SPECIES_ARTICUNO] = 0, + [SPECIES_ZAPDOS] = 0, + [SPECIES_MOLTRES] = 0, + [SPECIES_DRATINI] = 0, + [SPECIES_DRAGONAIR] = 0, + [SPECIES_DRAGONITE] = 2, + [SPECIES_MEWTWO] = 2, + [SPECIES_MEW] = 0, + [SPECIES_CHIKORITA] = 1, + [SPECIES_BAYLEEF] = 1, + [SPECIES_MEGANIUM] = 1, + [SPECIES_CYNDAQUIL] = 1, + [SPECIES_QUILAVA] = 1, + [SPECIES_TYPHLOSION] = 1, + [SPECIES_TOTODILE] = 2, + [SPECIES_CROCONAW] = 2, + [SPECIES_FERALIGATR] = 2, + [SPECIES_SENTRET] = 2, + [SPECIES_FURRET] = 2, + [SPECIES_HOOTHOOT] = 2, + [SPECIES_NOCTOWL] = 2, + [SPECIES_LEDYBA] = 0, + [SPECIES_LEDIAN] = 0, + [SPECIES_SPINARAK] = 1, + [SPECIES_ARIADOS] = 0, + [SPECIES_CROBAT] = 2, + [SPECIES_CHINCHOU] = 2, + [SPECIES_LANTURN] = 0, + [SPECIES_PICHU] = 0, + [SPECIES_CLEFFA] = 0, + [SPECIES_IGGLYBUFF] = 1, + [SPECIES_TOGEPI] = 2, + [SPECIES_TOGETIC] = 2, + [SPECIES_NATU] = 0, + [SPECIES_XATU] = 0, + [SPECIES_MAREEP] = 2, + [SPECIES_FLAAFFY] = 0, + [SPECIES_AMPHAROS] = 0, + [SPECIES_BELLOSSOM] = 1, + [SPECIES_MARILL] = 2, + [SPECIES_AZUMARILL] = 2, + [SPECIES_SUDOWOODO] = 1, + [SPECIES_POLITOED] = 1, + [SPECIES_HOPPIP] = 1, + [SPECIES_SKIPLOOM] = 1, + [SPECIES_JUMPLUFF] = 2, + [SPECIES_AIPOM] = 2, + [SPECIES_SUNKERN] = 1, + [SPECIES_SUNFLORA] = 1, + [SPECIES_YANMA] = 1, + [SPECIES_WOOPER] = 0, + [SPECIES_QUAGSIRE] = 0, + [SPECIES_ESPEON] = 2, + [SPECIES_UMBREON] = 2, + [SPECIES_MURKROW] = 2, + [SPECIES_SLOWKING] = 0, + [SPECIES_MISDREAVUS] = 0, + [SPECIES_UNOWN] = 0, + [SPECIES_WOBBUFFET] = 0, + [SPECIES_GIRAFARIG] = 1, + [SPECIES_PINECO] = 0, + [SPECIES_FORRETRESS] = 2, + [SPECIES_DUNSPARCE] = 2, + [SPECIES_GLIGAR] = 2, + [SPECIES_STEELIX] = 0, + [SPECIES_SNUBBULL] = 0, + [SPECIES_GRANBULL] = 2, + [SPECIES_QWILFISH] = 0, + [SPECIES_SCIZOR] = 0, + [SPECIES_SHUCKLE] = 1, + [SPECIES_HERACROSS] = 2, + [SPECIES_SNEASEL] = 0, + [SPECIES_TEDDIURSA] = 0, + [SPECIES_URSARING] = 2, + [SPECIES_SLUGMA] = 0, + [SPECIES_MAGCARGO] = 0, + [SPECIES_SWINUB] = 2, + [SPECIES_PILOSWINE] = 2, + [SPECIES_CORSOLA] = 0, + [SPECIES_REMORAID] = 0, + [SPECIES_OCTILLERY] = 0, + [SPECIES_DELIBIRD] = 0, + [SPECIES_MANTINE] = 2, + [SPECIES_SKARMORY] = 0, + [SPECIES_HOUNDOUR] = 0, + [SPECIES_HOUNDOOM] = 0, + [SPECIES_KINGDRA] = 0, + [SPECIES_PHANPY] = 0, + [SPECIES_DONPHAN] = 0, + [SPECIES_PORYGON2] = 0, + [SPECIES_STANTLER] = 2, + [SPECIES_SMEARGLE] = 1, + [SPECIES_TYROGUE] = 2, + [SPECIES_HITMONTOP] = 2, + [SPECIES_SMOOCHUM] = 1, + [SPECIES_ELEKID] = 1, + [SPECIES_MAGBY] = 1, + [SPECIES_MILTANK] = 1, + [SPECIES_BLISSEY] = 1, + [SPECIES_RAIKOU] = 0, + [SPECIES_ENTEI] = 2, + [SPECIES_SUICUNE] = 0, + [SPECIES_LARVITAR] = 1, + [SPECIES_PUPITAR] = 0, + [SPECIES_TYRANITAR] = 1, + [SPECIES_LUGIA] = 0, + [SPECIES_HO_OH] = 1, + [SPECIES_CELEBI] = 1, + [SPECIES_OLD_UNOWN_B] = 0, + [SPECIES_OLD_UNOWN_C] = 0, + [SPECIES_OLD_UNOWN_D] = 0, + [SPECIES_OLD_UNOWN_E] = 0, + [SPECIES_OLD_UNOWN_F] = 0, + [SPECIES_OLD_UNOWN_G] = 0, + [SPECIES_OLD_UNOWN_H] = 0, + [SPECIES_OLD_UNOWN_I] = 0, + [SPECIES_OLD_UNOWN_J] = 0, + [SPECIES_OLD_UNOWN_K] = 0, + [SPECIES_OLD_UNOWN_L] = 0, + [SPECIES_OLD_UNOWN_M] = 0, + [SPECIES_OLD_UNOWN_N] = 0, + [SPECIES_OLD_UNOWN_O] = 0, + [SPECIES_OLD_UNOWN_P] = 0, + [SPECIES_OLD_UNOWN_Q] = 0, + [SPECIES_OLD_UNOWN_R] = 0, + [SPECIES_OLD_UNOWN_S] = 0, + [SPECIES_OLD_UNOWN_T] = 0, + [SPECIES_OLD_UNOWN_U] = 0, + [SPECIES_OLD_UNOWN_V] = 0, + [SPECIES_OLD_UNOWN_W] = 0, + [SPECIES_OLD_UNOWN_X] = 0, + [SPECIES_OLD_UNOWN_Y] = 0, + [SPECIES_OLD_UNOWN_Z] = 0, + [SPECIES_TREECKO] = 1, + [SPECIES_GROVYLE] = 0, + [SPECIES_SCEPTILE] = 1, + [SPECIES_TORCHIC] = 0, + [SPECIES_COMBUSKEN] = 0, + [SPECIES_BLAZIKEN] = 0, + [SPECIES_MUDKIP] = 0, + [SPECIES_MARSHTOMP] = 0, + [SPECIES_SWAMPERT] = 0, + [SPECIES_POOCHYENA] = 2, + [SPECIES_MIGHTYENA] = 2, + [SPECIES_ZIGZAGOON] = 2, + [SPECIES_LINOONE] = 2, + [SPECIES_WURMPLE] = 0, + [SPECIES_SILCOON] = 2, + [SPECIES_BEAUTIFLY] = 0, + [SPECIES_CASCOON] = 2, + [SPECIES_DUSTOX] = 1, + [SPECIES_LOTAD] = 1, + [SPECIES_LOMBRE] = 1, + [SPECIES_LUDICOLO] = 1, + [SPECIES_SEEDOT] = 1, + [SPECIES_NUZLEAF] = 1, + [SPECIES_SHIFTRY] = 0, + [SPECIES_NINCADA] = 1, + [SPECIES_NINJASK] = 1, + [SPECIES_SHEDINJA] = 1, + [SPECIES_TAILLOW] = 2, + [SPECIES_SWELLOW] = 2, + [SPECIES_SHROOMISH] = 1, + [SPECIES_BRELOOM] = 1, + [SPECIES_SPINDA] = 1, + [SPECIES_WINGULL] = 0, + [SPECIES_PELIPPER] = 0, + [SPECIES_SURSKIT] = 2, + [SPECIES_MASQUERAIN] = 0, + [SPECIES_WAILMER] = 2, + [SPECIES_WAILORD] = 0, + [SPECIES_SKITTY] = 0, + [SPECIES_DELCATTY] = 2, + [SPECIES_KECLEON] = 1, + [SPECIES_BALTOY] = 1, + [SPECIES_CLAYDOL] = 0, + [SPECIES_NOSEPASS] = 0, + [SPECIES_TORKOAL] = 1, + [SPECIES_SABLEYE] = 2, + [SPECIES_BARBOACH] = 0, + [SPECIES_WHISCASH] = 0, + [SPECIES_LUVDISC] = 0, + [SPECIES_CORPHISH] = 0, + [SPECIES_CRAWDAUNT] = 0, + [SPECIES_FEEBAS] = 2, + [SPECIES_MILOTIC] = 0, + [SPECIES_CARVANHA] = 0, + [SPECIES_SHARPEDO] = 0, + [SPECIES_TRAPINCH] = 1, + [SPECIES_VIBRAVA] = 1, + [SPECIES_FLYGON] = 1, + [SPECIES_MAKUHITA] = 2, + [SPECIES_HARIYAMA] = 1, + [SPECIES_ELECTRIKE] = 1, + [SPECIES_MANECTRIC] = 0, + [SPECIES_NUMEL] = 1, + [SPECIES_CAMERUPT] = 0, + [SPECIES_SPHEAL] = 2, + [SPECIES_SEALEO] = 2, + [SPECIES_WALREIN] = 0, + [SPECIES_CACNEA] = 1, + [SPECIES_CACTURNE] = 1, + [SPECIES_SNORUNT] = 2, + [SPECIES_GLALIE] = 0, + [SPECIES_LUNATONE] = 1, + [SPECIES_SOLROCK] = 0, + [SPECIES_AZURILL] = 2, + [SPECIES_SPOINK] = 0, + [SPECIES_GRUMPIG] = 2, + [SPECIES_PLUSLE] = 0, + [SPECIES_MINUN] = 0, + [SPECIES_MAWILE] = 2, + [SPECIES_MEDITITE] = 0, + [SPECIES_MEDICHAM] = 0, + [SPECIES_SWABLU] = 0, + [SPECIES_ALTARIA] = 0, + [SPECIES_WYNAUT] = 0, + [SPECIES_DUSKULL] = 0, + [SPECIES_DUSCLOPS] = 0, + [SPECIES_ROSELIA] = 0, + [SPECIES_SLAKOTH] = 2, + [SPECIES_VIGOROTH] = 2, + [SPECIES_SLAKING] = 1, + [SPECIES_GULPIN] = 1, + [SPECIES_SWALOT] = 2, + [SPECIES_TROPIUS] = 1, + [SPECIES_WHISMUR] = 0, + [SPECIES_LOUDRED] = 2, + [SPECIES_EXPLOUD] = 2, + [SPECIES_CLAMPERL] = 0, + [SPECIES_HUNTAIL] = 0, + [SPECIES_GOREBYSS] = 0, + [SPECIES_ABSOL] = 0, + [SPECIES_SHUPPET] = 0, + [SPECIES_BANETTE] = 0, + [SPECIES_SEVIPER] = 2, + [SPECIES_ZANGOOSE] = 0, + [SPECIES_RELICANTH] = 1, + [SPECIES_ARON] = 2, + [SPECIES_LAIRON] = 2, + [SPECIES_AGGRON] = 2, + [SPECIES_CASTFORM] = 0, + [SPECIES_VOLBEAT] = 0, + [SPECIES_ILLUMISE] = 2, + [SPECIES_LILEEP] = 2, + [SPECIES_CRADILY] = 0, + [SPECIES_ANORITH] = 0, + [SPECIES_ARMALDO] = 0, + [SPECIES_RALTS] = 1, + [SPECIES_KIRLIA] = 1, + [SPECIES_GARDEVOIR] = 1, + [SPECIES_BAGON] = 2, + [SPECIES_SHELGON] = 2, + [SPECIES_SALAMENCE] = 0, + [SPECIES_BELDUM] = 0, + [SPECIES_METANG] = 0, + [SPECIES_METAGROSS] = 0, + [SPECIES_REGIROCK] = 2, + [SPECIES_REGICE] = 2, + [SPECIES_REGISTEEL] = 2, + [SPECIES_KYOGRE] = 2, + [SPECIES_GROUDON] = 0, + [SPECIES_RAYQUAZA] = 1, + [SPECIES_LATIAS] = 0, + [SPECIES_LATIOS] = 2, + [SPECIES_JIRACHI] = 0, + [SPECIES_DEOXYS] = 0, + [SPECIES_CHIMECHO] = 0, + [SPECIES_EGG] = 1, + [SPECIES_UNOWN_B] = 0, + [SPECIES_UNOWN_C] = 0, + [SPECIES_UNOWN_D] = 0, + [SPECIES_UNOWN_E] = 0, + [SPECIES_UNOWN_F] = 0, + [SPECIES_UNOWN_G] = 0, + [SPECIES_UNOWN_H] = 0, + [SPECIES_UNOWN_I] = 0, + [SPECIES_UNOWN_J] = 0, + [SPECIES_UNOWN_K] = 0, + [SPECIES_UNOWN_L] = 0, + [SPECIES_UNOWN_M] = 0, + [SPECIES_UNOWN_N] = 0, + [SPECIES_UNOWN_O] = 0, + [SPECIES_UNOWN_P] = 0, + [SPECIES_UNOWN_Q] = 0, + [SPECIES_UNOWN_R] = 0, + [SPECIES_UNOWN_S] = 0, + [SPECIES_UNOWN_T] = 0, + [SPECIES_UNOWN_U] = 0, + [SPECIES_UNOWN_V] = 0, + [SPECIES_UNOWN_W] = 0, + [SPECIES_UNOWN_X] = 0, + [SPECIES_UNOWN_Y] = 0, + [SPECIES_UNOWN_Z] = 0, + [SPECIES_UNOWN_EMARK] = 0, + [SPECIES_UNOWN_QMARK] = 0 +}; + +const struct SpritePalette gMonIconPaletteTable[] = { + { gMonIconPalettes[0], POKE_ICON_BASE_PAL_TAG + 0 }, + { gMonIconPalettes[1], POKE_ICON_BASE_PAL_TAG + 1 }, + { gMonIconPalettes[2], POKE_ICON_BASE_PAL_TAG + 2 }, + // The following three point outside the gMonIconPalettes array + // and are therefore invalid. Fortunately, they are never used. + { gMonIconPalettes[3], POKE_ICON_BASE_PAL_TAG + 3 }, + { gMonIconPalettes[4], POKE_ICON_BASE_PAL_TAG + 4 }, + { gMonIconPalettes[5], POKE_ICON_BASE_PAL_TAG + 5 } +}; + +static const struct OamData sMonIconOamData = { + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .matrixNum = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0x000, + .priority = 1, + .paletteNum = 0 +}; + +static const union AnimCmd sMonIconAnim_Fast[] = { + ANIMCMD_FRAME(0, 6), + ANIMCMD_FRAME(1, 6), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sMonIconAnim_MediumFast[] = { + ANIMCMD_FRAME(0, 8), + ANIMCMD_FRAME(1, 8), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sMonIconAnim_MediumSlow[] = { + ANIMCMD_FRAME(0, 14), + ANIMCMD_FRAME(1, 14), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sMonIconAnim_Slow[] = { + ANIMCMD_FRAME(0, 22), + ANIMCMD_FRAME(1, 22), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sMonIconAnim_Still[] = { + ANIMCMD_FRAME(0, 29), + ANIMCMD_FRAME(0, 29), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sMonIconAnims[] = { + sMonIconAnim_Fast, + sMonIconAnim_MediumFast, + sMonIconAnim_MediumSlow, + sMonIconAnim_Slow, + sMonIconAnim_Still +}; + +static const union AffineAnimCmd sMonIconAffineAnim_0[] = { + AFFINEANIMCMD_FRAME(0, 0, 0, 10), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sMonIconAffineAnim_1[] = { + AFFINEANIMCMD_FRAME(-2, -2, 0, 122), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd *const sMonIconAffineAnims[] = { + sMonIconAffineAnim_0, + sMonIconAffineAnim_1 +}; + +static const u16 sSpriteImageSizes[][4] = { + [ST_OAM_SQUARE] = { + [ST_OAM_SIZE_0] = 0x020, + [ST_OAM_SIZE_1] = 0x080, + [ST_OAM_SIZE_2] = 0x200, + [ST_OAM_SIZE_3] = 0x800, + }, + [ST_OAM_H_RECTANGLE] = { + [ST_OAM_SIZE_0] = 0x040, + [ST_OAM_SIZE_1] = 0x080, + [ST_OAM_SIZE_2] = 0x100, + [ST_OAM_SIZE_3] = 0x400, + }, + [ST_OAM_V_RECTANGLE] = { + [ST_OAM_SIZE_0] = 0x040, + [ST_OAM_SIZE_1] = 0x080, + [ST_OAM_SIZE_2] = 0x100, + [ST_OAM_SIZE_3] = 0x400, + }, +}; + +u8 CreateMonIcon(u16 species, SpriteCallback callback, s16 x, s16 y, u8 subpriority, u32 personality, bool32 extra) +{ + u8 spriteId; + struct MonIconSpriteTemplate iconTemplate = + { + .oam = &sMonIconOamData, + .image = GetMonIconPtr(species, personality, extra), + .anims = sMonIconAnims, + .affineAnims = sMonIconAffineAnims, + .callback = callback, + .paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndices[species], + }; + + if (species > NUM_SPECIES) + iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; + + spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); + + UpdateMonIconFrame(&gSprites[spriteId]); + + return spriteId; +} + +u8 CreateMonIcon_HandleDeoxys(u16 species, SpriteCallback callback, s16 x, s16 y, u8 subpriority, bool32 extra) +{ + u8 spriteId; + struct MonIconSpriteTemplate iconTemplate = + { + .oam = &sMonIconOamData, + .image = NULL, + .anims = sMonIconAnims, + .affineAnims = sMonIconAffineAnims, + .callback = callback, + .paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndices[species], + }; + + iconTemplate.image = GetMonIconTiles(species, extra); + spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); + + UpdateMonIconFrame(&gSprites[spriteId]); + + return spriteId; +} + +u16 GetIconSpecies(u16 species, u32 personality) +{ + u16 result; + + if (species == SPECIES_UNOWN) + { + u16 letter = GetUnownLetterByPersonality(personality); + if (letter == 0) + letter = SPECIES_UNOWN; + else + letter += (SPECIES_UNOWN_B - 1); + result = letter; + } + else + { + if (species > NUM_SPECIES) + result = SPECIES_NONE; + else + result = species; + } + + return result; +} + +u16 GetUnownLetterByPersonality(u32 personality) +{ + if (!personality) + return 0; + else + return (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 0x1C; +} + +u16 MailSpeciesToIconSpecies(u16 species) +{ + u16 value; + + if (MailSpeciesToSpecies(species, &value) == SPECIES_UNOWN) + { + if (value == 0) + value += SPECIES_UNOWN; + else + value += (SPECIES_UNOWN_B - 1); + return value; + } + else + { + if (species > (SPECIES_UNOWN_B - 1)) + species = SPECIES_NONE; + return GetIconSpecies(species, 0); + } +} + +const u8 *GetMonIconTiles(u16 species, bool32 extra) +{ + const u8 *iconSprite = gMonIconTable[species]; + if (species == SPECIES_DEOXYS && extra == TRUE) + iconSprite += 0x400; + return iconSprite; +} + +const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 extra) +{ + return GetMonIconTiles(GetIconSpecies(species, personality), extra); +} + +void DestroyMonIcon(struct Sprite * sprite) +{ + DestroyMonIconInternal(sprite); +} + +void LoadMonIconPalettes(void) +{ + u8 i; + for (i = 0; i < NELEMS(gMonIconPaletteTable); i++) + LoadSpritePalette(&gMonIconPaletteTable[i]); +} + +void SafeLoadMonIconPalette(u16 species) +{ + u8 palIndex; + if (species > NUM_SPECIES) + species = SPECIES_NONE; + palIndex = gMonIconPaletteIndices[species]; + if (IndexOfSpritePaletteTag(gMonIconPaletteTable[palIndex].tag) == 0xFF) + LoadSpritePalette(&gMonIconPaletteTable[palIndex]); +} + +void LoadMonIconPalette(u16 species) +{ + u8 palIndex; + palIndex = gMonIconPaletteIndices[species]; + if (IndexOfSpritePaletteTag(gMonIconPaletteTable[palIndex].tag) == 0xFF) + LoadSpritePalette(&gMonIconPaletteTable[palIndex]); +} + +void FreeMonIconPalettes(void) +{ + u8 i; + for (i = 0; i < 6; i++) + FreeSpritePaletteByTag(gMonIconPaletteTable[i].tag); +} + +void SafeFreeMonIconPalette(u16 species) +{ + u8 palIndex; + if (species > NUM_SPECIES) + species = SPECIES_NONE; + palIndex = gMonIconPaletteIndices[species]; + FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag); +} + +void FreeMonIconPalette(u16 species) +{ + u8 palIndex; + palIndex = gMonIconPaletteIndices[species]; + FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag); +} + +void SpriteCB_MonIcon(struct Sprite * sprite) +{ + UpdateMonIconFrame(sprite); +} + +void LoadMonIconPalettesAt(u16 offset) +{ + int i; + if (offset <= 0x100 - 0x60) + { + for (i = 0; i < (int)NELEMS(gMonIconPaletteTable); i++) + { + LoadPalette(gMonIconPaletteTable[i].data, offset, 0x20); + offset += 0x10; + } + } +} + +const u16 *GetValidMonIconPalettePtr(u16 species) +{ + if (species > NUM_SPECIES) + species = SPECIES_NONE; + return gMonIconPaletteTable[gMonIconPaletteIndices[species]].data; +} + +u8 GetValidMonIconPalIndex(u16 species) +{ + if (species > NUM_SPECIES) + species = SPECIES_NONE; + return gMonIconPaletteIndices[species]; +} + +u8 GetMonIconPaletteIndexFromSpecies(u16 species) +{ + return gMonIconPaletteIndices[species]; +} + +u8 UpdateMonIconFrame(struct Sprite * sprite) +{ + u8 result = 0; + + if (sprite->animDelayCounter == 0) + { + s16 frame = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.imageValue; + + switch (frame) + { + case -1: + break; + case -2: + sprite->animCmdIndex = 0; + break; + default: + RequestSpriteCopy( + // pointer arithmetic is needed to get the correct pointer to perform the sprite copy on. + // because sprite->images is a struct def, it has to be casted to (u8 *) before any + // arithmetic can be performed. + (u8 *)sprite->images + (sSpriteImageSizes[sprite->oam.shape][sprite->oam.size] * frame), + (u8 *)(OBJ_VRAM0 + sprite->oam.tileNum * TILE_SIZE_4BPP), + sSpriteImageSizes[sprite->oam.shape][sprite->oam.size]); + sprite->animDelayCounter = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration & 0xFF; + sprite->animCmdIndex++; + result = sprite->animCmdIndex; + break; + } + } + else + { + sprite->animDelayCounter--; + } + return result; +} + +static u8 CreateMonIconSprite(const struct MonIconSpriteTemplate * iconTemplate, s16 x, s16 y, u8 subpriority) +{ + u8 spriteId; + + struct SpriteFrameImage image = { NULL, sSpriteImageSizes[iconTemplate->oam->shape][iconTemplate->oam->size] }; + + struct SpriteTemplate spriteTemplate = + { + .tileTag = SPRITE_INVALID_TAG, + .paletteTag = iconTemplate->paletteTag, + .oam = iconTemplate->oam, + .anims = iconTemplate->anims, + .images = &image, + .affineAnims = iconTemplate->affineAnims, + .callback = iconTemplate->callback, + }; + + spriteId = CreateSprite(&spriteTemplate, x, y, subpriority); + gSprites[spriteId].animPaused = TRUE; + gSprites[spriteId].animBeginning = FALSE; + gSprites[spriteId].images = (const struct SpriteFrameImage *)iconTemplate->image; + return spriteId; +} + +static void DestroyMonIconInternal(struct Sprite * sprite) +{ + struct SpriteFrameImage image = { NULL, sSpriteImageSizes[sprite->oam.shape][sprite->oam.size] }; + sprite->images = ℑ + DestroySprite(sprite); +} + +void MonIcon_SetAnim(struct Sprite * sprite, u8 animNum) +{ + sprite->animNum = animNum; + sprite->animDelayCounter = 0; + sprite->animCmdIndex = 0; +} diff --git a/src/prof_pc.c b/src/prof_pc.c index aeabc8644..d1f06a2ba 100644 --- a/src/prof_pc.c +++ b/src/prof_pc.c @@ -36,7 +36,7 @@ u16 Special_GetPokedexCount(void) return IsNationalPokedexEnabled(); } -const u8 * sub_80CA424(u16 count) +static const u8 *GetProfOaksRatingMessageByCount(u16 count) { gSpecialVar_Result = FALSE; @@ -102,7 +102,7 @@ const u8 * sub_80CA424(u16 count) return gUnknown_81A6D17; } -void sub_80CA524(void) +void Special_GetProfOaksRatingMessage(void) { - ShowFieldMessage(sub_80CA424(gSpecialVar_0x8004)); + ShowFieldMessage(GetProfOaksRatingMessageByCount(gSpecialVar_0x8004)); } diff --git a/src/psychic.c b/src/psychic.c index 662320a2b..a8108c55a 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -47,7 +47,7 @@ const struct SpriteTemplate gUnknown_83E6DF8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_83E6DF4, - .callback = sub_8075D9C, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_83E6E10 = @@ -376,7 +376,7 @@ const struct SpriteTemplate gUnknown_83E7148 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_83E7144, - .callback = sub_8075D9C, + .callback = AnimSpriteOnMonPos, }; static const union AffineAnimCmd gUnknown_83E7160[] = diff --git a/src/quest_log.c b/src/quest_log.c index ef8f56249..896a44d17 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -38,6 +38,7 @@ #include "quest_log_8150454.h" #include "quest_log.h" #include "new_menu_helpers.h" +#include "strings.h" u8 gUnknown_3005E88; @@ -72,9 +73,9 @@ struct UnkStruct_203AE98 struct UnkStruct_300201C { - u16 unk_0_0:15; - u16 unk_0_f:1; - u16 unk_2; + u16 idx:15; + u16 isFlag:1; + u16 value; }; struct UnkStruct_203B044 @@ -85,30 +86,30 @@ struct UnkStruct_203B044 }; u8 gUnknown_3005E88; -u16 gUnknown_3005E8C; +u16 sNumQuestLogs; struct UnkStruct_3005E90 gUnknown_3005E90; struct UnkStruct_203AE98 * gUnknown_3005E94; -static struct UnkStruct_300201C * gUnknown_300201C; -static u16 gUnknown_3002020; +static struct UnkStruct_300201C * sFlagOrVarRecords; +static u16 sNumFlagsOrVars; static EWRAM_DATA u8 gUnknown_203ADF8 = 0; static EWRAM_DATA u8 sNumScenes = 0; EWRAM_DATA u8 gUnknown_203ADFA = 0; static EWRAM_DATA u16 gUnknown_203ADFC = 0; static EWRAM_DATA u8 gUnknown_203ADFE[3] = {0}; -static EWRAM_DATA u16 * gUnknown_203AE04 = NULL; -static EWRAM_DATA u16 * gUnknown_203AE08 = NULL; -static EWRAM_DATA u16 * gUnknown_203AE0C[32] = {NULL}; -static EWRAM_DATA void (* gUnknown_203AE8C)(void) = NULL; +static EWRAM_DATA u16 *gUnknown_203AE04 = NULL; +static EWRAM_DATA u16 *gUnknown_203AE08 = NULL; +static EWRAM_DATA u16 *gUnknown_203AE0C[32] = {NULL}; +static EWRAM_DATA void (* sQuestLogCB)(void) = NULL; static EWRAM_DATA u16 *gUnknown_203AE90 = NULL; static EWRAM_DATA struct UnkStruct_203AE94 gUnknown_203AE94 = {0}; static EWRAM_DATA struct UnkStruct_203AE98 gUnknown_203AE98[32] = {0}; -static EWRAM_DATA u16 gUnknown_203AF98 = 0; +static EWRAM_DATA u16 sQuestLogIdx = 0; static EWRAM_DATA u8 gUnknown_203AF9A[64][2] = {{0}}; static EWRAM_DATA u16 gUnknown_203B01A = 0; static EWRAM_DATA u16 gUnknown_203B01C = 0; -static EWRAM_DATA u16 gUnknown_203B01E = 0; +static EWRAM_DATA u16 sFlagOrVarPlayhead = 0; static EWRAM_DATA u8 sHelpMessageWindowId = 0; static EWRAM_DATA struct UnkStruct_203B024 gUnknown_203B024 = {0}; static EWRAM_DATA struct UnkStruct_203B044 gUnknown_203B044 = {0}; @@ -129,23 +130,23 @@ static u8 sub_8110E68(struct UnkStruct_203AE98 *); static void sub_8110F90(u8); static void sub_8111150(u8); static void sub_8111368(void); -static void sub_81115E8(void); -static u16 sub_8111618(void); -static u16 sub_811164C(void); +static void QuestLog_GetSaneMonCounts(void); +static u16 QuestLog_GetSanePartyCount(void); +static u16 QuestLog_GetSaneBoxCount(void); static void sub_8111688(void); static void sub_811175C(u8, struct UnkStruct_203AE98 *); static void sub_81118F4(s8); -static void sub_8111914(void); -static void sub_8111984(void); -static void sub_8111A34(u8); +static void QuestLog_AdvancePlayhead(void); +static void QuestLog_EndPlayback(void); +static void Task_RunPlaybackCB(u8); static void sub_8111AD8(void); static void sub_8111B80(void); static u8 sub_8111BD4(void); static void sub_8111D10(void); static void sub_8111D90(u8); static void sub_8111E20(void); -static void sub_8111E64(s8); -static void sub_8111E84(void); +static void QuestLog_SkipToEndOfPlayback(s8); +static void QuestLog_WaitFadeAndCancelPlayback(void); static bool8 sub_8111F60(void); static void sub_8111F8C(u8); static void sub_8111FCC(u8); @@ -171,106 +172,106 @@ static void sub_8113524(struct Var4038Struct *); static bool8 sub_81136D4(void); static bool8 sub_8113778(u16, u16 *); static bool8 sub_81137E4(u16, u16 *); -static u16 * sub_8113828(u16, u16 *); +static u16 *sub_8113828(u16, u16 *); static bool8 sub_81138A0(u16, u16 *); static bool8 sub_8113954(u16, u16 *); static void sub_8113A1C(u16); static void sub_811381C(void); static bool8 sub_8113A44(u16, u16 *); -static u16 * sub_8113A78(u16 *, u16 **); +static u16 *QuestLog_SkipCommand(u16 *, u16 **); static void sub_8113ABC(u16 *); static bool8 sub_8113AE8(u16 *); static bool8 sub_8113B44(u16 *); static void sub_8113B88(void); static void sub_8113B94(u16); static void sub_8113BD8(void); -static u16 * sub_8113BF4(u16 *); -static u16 * sub_8113C20(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113C5C(u16 *, u16); -static u16 * sub_8113C8C(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113CC8(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113D08(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113D48(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113D94(u16 *, struct UnkStruct_203AE98 *); -static u16 * sub_8113F14(u16 *, const u16 *); -static const u16 * sub_8113F3C(const u16 *); -static u16 * sub_8113F80(u16 *, const u16 *); -static const u16 * sub_8113FBC(const u16 *); -static u16 * sub_8114174(u16 *, const u16 *); -static const u16 * sub_8114188(const u16 *); -static u16 * sub_81141D0(u16 *, const u16 *); -static const u16 * sub_81141E4(const u16 *); -static u16 * sub_811422C(u16 *, const u16 *); -static const u16 * sub_8114240(const u16 *); -static u16 * sub_8114288(u16 *, const u16 *); -static const u16 * sub_811429C(const u16 *); -static u16 * sub_8114310(u16 *, const u16 *); -static const u16 * sub_8114324(const u16 *); -static u16 * sub_8114380(u16 *, const u16 *); -static const u16 * sub_8114394(const u16 *); -static u16 * sub_81143F0(u16 *, const u16 *); -static const u16 * sub_811443C(const u16 *); -static u16 * sub_811445C(u16 *, const u16 *); -static const u16 * sub_811448C(const u16 *); -static u16 * sub_81144EC(u16 *, const u16 *); -static const u16 * sub_8114518(const u16 *); -static u16 * sub_8114578(u16 *, const u16 *); -static const u16 * sub_81145A4(const u16 *); -static u16 * sub_8114604(u16 *, const u16 *); -static const u16 * sub_811464C(const u16 *); -static u16 * sub_8114710(u16 *, const u16 *); -static const u16 * sub_8114724(const u16 *); -static u16 * sub_8114744(u16 *, const u16 *); -static const u16 * sub_8114758(const u16 *); -static u16 * sub_8114778(u16 *, const u16 *); -static const u16 * sub_81147A8(const u16 *); -static u16 * sub_8114808(u16 *, const u16 *); -static const u16 * sub_8114834(const u16 *); -static u16 * sub_811488C(u16 *, const u16 *); -static const u16 * sub_81148BC(const u16 *); -static u16 * sub_8114918(u16 *, const u16 *); -static const u16 * sub_8114944(const u16 *); -static u16 * sub_8114990(u16 *, const u16 *); -static const u16 * sub_81149D0(const u16 *); -static u16 * sub_8114A1C(u16 *, const u16 *); -static const u16 * sub_8114A4C(const u16 *); -static u16 * sub_8114AA0(u16 *, const u16 *); -static const u16 * sub_8114AC8(const u16 *); -static u16 * sub_8114B0C(u16 *, const u16 *); -static const u16 * sub_8114B34(const u16 *); -static u16 * sub_8114B78(u16 *, const u16 *); -static const u16 * sub_8114BA0(const u16 *); -static u16 * sub_8114BE4(u16 *, const u16 *); -static const u16 * sub_8114C0C(const u16 *); -static u16 * sub_8114C68(u16 *, const u16 *); -static const u16 * sub_8114C8C(const u16 *); -static u16 * sub_8114CC0(u16 *, const u16 *); -static const u16 * sub_8114CE4(const u16 *); -static u16 * sub_8114D4C(u16 *, const u16 *); -static const u16 * sub_8114D68(const u16 *); -static u16 * sub_8114DE8(u16 *, const u16 *); -static const u16 * sub_8114E68(const u16 *); +static u16 *sub_8113BF4(u16 *); +static u16 *sub_8113C20(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113C5C(u16 *, u16); +static u16 *sub_8113C8C(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113CC8(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113D08(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113D48(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113D94(u16 *, struct UnkStruct_203AE98 *); +static u16 *sub_8113F14(u16 *, const u16 *); +static const u16 *sub_8113F3C(const u16 *); +static u16 *sub_8113F80(u16 *, const u16 *); +static const u16 *sub_8113FBC(const u16 *); +static u16 *sub_8114174(u16 *, const u16 *); +static const u16 *sub_8114188(const u16 *); +static u16 *sub_81141D0(u16 *, const u16 *); +static const u16 *sub_81141E4(const u16 *); +static u16 *sub_811422C(u16 *, const u16 *); +static const u16 *sub_8114240(const u16 *); +static u16 *sub_8114288(u16 *, const u16 *); +static const u16 *sub_811429C(const u16 *); +static u16 *sub_8114310(u16 *, const u16 *); +static const u16 *sub_8114324(const u16 *); +static u16 *sub_8114380(u16 *, const u16 *); +static const u16 *sub_8114394(const u16 *); +static u16 *sub_81143F0(u16 *, const u16 *); +static const u16 *sub_811443C(const u16 *); +static u16 *sub_811445C(u16 *, const u16 *); +static const u16 *sub_811448C(const u16 *); +static u16 *sub_81144EC(u16 *, const u16 *); +static const u16 *sub_8114518(const u16 *); +static u16 *sub_8114578(u16 *, const u16 *); +static const u16 *sub_81145A4(const u16 *); +static u16 *sub_8114604(u16 *, const u16 *); +static const u16 *sub_811464C(const u16 *); +static u16 *sub_8114710(u16 *, const u16 *); +static const u16 *sub_8114724(const u16 *); +static u16 *sub_8114744(u16 *, const u16 *); +static const u16 *sub_8114758(const u16 *); +static u16 *sub_8114778(u16 *, const u16 *); +static const u16 *sub_81147A8(const u16 *); +static u16 *sub_8114808(u16 *, const u16 *); +static const u16 *sub_8114834(const u16 *); +static u16 *sub_811488C(u16 *, const u16 *); +static const u16 *sub_81148BC(const u16 *); +static u16 *sub_8114918(u16 *, const u16 *); +static const u16 *sub_8114944(const u16 *); +static u16 *sub_8114990(u16 *, const u16 *); +static const u16 *sub_81149D0(const u16 *); +static u16 *sub_8114A1C(u16 *, const u16 *); +static const u16 *sub_8114A4C(const u16 *); +static u16 *sub_8114AA0(u16 *, const u16 *); +static const u16 *sub_8114AC8(const u16 *); +static u16 *sub_8114B0C(u16 *, const u16 *); +static const u16 *sub_8114B34(const u16 *); +static u16 *sub_8114B78(u16 *, const u16 *); +static const u16 *sub_8114BA0(const u16 *); +static u16 *sub_8114BE4(u16 *, const u16 *); +static const u16 *sub_8114C0C(const u16 *); +static u16 *sub_8114C68(u16 *, const u16 *); +static const u16 *sub_8114C8C(const u16 *); +static u16 *sub_8114CC0(u16 *, const u16 *); +static const u16 *sub_8114CE4(const u16 *); +static u16 *sub_8114D4C(u16 *, const u16 *); +static const u16 *sub_8114D68(const u16 *); +static u16 *sub_8114DE8(u16 *, const u16 *); +static const u16 *sub_8114E68(const u16 *); static bool8 sub_8114FBC(u16); -static u16 * sub_8114FF0(u16 *, const u16 *); -static const u16 * sub_811500C(const u16 *); -static u16 * sub_8115078(u16 *, const u16 *); -static const u16 * sub_81150CC(const u16 *); -static u16 * sub_81151C0(u16 *, const u16 *); -static const u16 * sub_81151DC(const u16 *); -static u16 * sub_8115280(u16 *, const u16 *); -static const u16 * sub_81152BC(const u16 *); +static u16 *sub_8114FF0(u16 *, const u16 *); +static const u16 *sub_811500C(const u16 *); +static u16 *sub_8115078(u16 *, const u16 *); +static const u16 *sub_81150CC(const u16 *); +static u16 *sub_81151C0(u16 *, const u16 *); +static const u16 *sub_81151DC(const u16 *); +static u16 *sub_8115280(u16 *, const u16 *); +static const u16 *sub_81152BC(const u16 *); static bool8 sub_81153A8(u16, u16 *); static bool8 sub_81153E4(u16, u16 *); -static u16 * sub_8115410(u16 *, const u16 *); -static const u16 * sub_8115460(const u16 *); -static u16 * sub_81154DC(u16 *, const u16 *); -static const u16 * sub_8115518(const u16 *); -static u16 * sub_81155A4(u16 *, const u16 *); -static const u16 * sub_81155E0(const u16 *); -static u16 * sub_81156D8(u16 *, const u16 *); -static const u16 * sub_8115700(const u16 *); -static u16 * sub_81157DC(u16 *, const u16 *); -static const u16 * sub_8115800(const u16 *); +static u16 *sub_8115410(u16 *, const u16 *); +static const u16 *sub_8115460(const u16 *); +static u16 *sub_81154DC(u16 *, const u16 *); +static const u16 *sub_8115518(const u16 *); +static u16 *sub_81155A4(u16 *, const u16 *); +static const u16 *sub_81155E0(const u16 *); +static u16 *sub_81156D8(u16 *, const u16 *); +static const u16 *sub_8115700(const u16 *); +static u16 *sub_81157DC(u16 *, const u16 *); +static const u16 *sub_8115800(const u16 *); void sub_8115834(u8 *); extern const u8 gUnknown_841A155[]; @@ -364,40 +365,40 @@ extern const u8 gUnknown_841B005[]; extern const u8 gUnknown_841B03F[]; extern const u8 gUnknown_841B064[]; extern const u8 gUnknown_841B073[]; -extern const u8 gUnknown_841B09F[]; -extern const u8 gUnknown_841B0A4[]; -extern const u8 gUnknown_841B0B5[]; -extern const u8 gUnknown_841B0B9[]; -extern const u8 gUnknown_841B0CD[]; -extern const u8 gUnknown_841B0DD[]; -extern const u8 gUnknown_841B0F6[]; -extern const u8 gUnknown_841B0FF[]; -extern const u8 gUnknown_841B109[]; -extern const u8 gUnknown_841B116[]; -extern const u8 gUnknown_841B11F[]; -extern const u8 gUnknown_841B130[]; -extern const u8 gUnknown_841B141[]; -extern const u8 gUnknown_841B14B[]; -extern const u8 gUnknown_841B15A[]; -extern const u8 gUnknown_841B166[]; -extern const u8 gUnknown_841B172[]; -extern const u8 gUnknown_841B180[]; -extern const u8 gUnknown_841B190[]; -extern const u8 gUnknown_841B1A3[]; -extern const u8 gUnknown_841B1B7[]; -extern const u8 gUnknown_841B1C7[]; -extern const u8 gUnknown_841B1DA[]; -extern const u8 gUnknown_841B1E5[]; -extern const u8 gUnknown_841B1F4[]; -extern const u8 gUnknown_841B200[]; -extern const u8 gUnknown_841B20E[]; -extern const u8 gUnknown_841B21C[]; -extern const u8 gUnknown_841B226[]; -extern const u8 gUnknown_841B236[]; -extern const u8 gUnknown_841B246[]; -extern const u8 gUnknown_841B25B[]; -extern const u8 gUnknown_841B268[]; -extern const u8 gUnknown_841B277[]; +extern const u8 gQuestLogString_Home[]; +extern const u8 gQuestLogString_OakResearchLab[]; +extern const u8 gQuestLogString_Gym[]; +extern const u8 gQuestLogString_PokemonLeagueGate[]; +extern const u8 gQuestLogString_ViridianForest[]; +extern const u8 gQuestLogString_PewterMuseumOfScience[]; +extern const u8 gQuestLogString_MtMoon[]; +extern const u8 gQuestLogString_BikeShop[]; +extern const u8 gQuestLogString_BillSHouse[]; +extern const u8 gQuestLogString_DayCare[]; +extern const u8 gQuestLogString_UndergroundPath[]; +extern const u8 gQuestLogString_PokemonFanClub[]; +extern const u8 gQuestLogString_SSAnne[]; +extern const u8 gQuestLogString_DiglettSCave[]; +extern const u8 gQuestLogString_RockTunnel[]; +extern const u8 gQuestLogString_PowerPlant[]; +extern const u8 gQuestLogString_PokemonTower[]; +extern const u8 gQuestLogString_VolunteerHouse[]; +extern const u8 gQuestLogString_NameRaterSHouse[]; +extern const u8 gQuestLogString_CeladonDeptStore[]; +extern const u8 gQuestLogString_CeladonMansion[]; +extern const u8 gQuestLogString_RocketGameCorner[]; +extern const u8 gQuestLogString_Restaurant[]; +extern const u8 gQuestLogString_RocketHideout[]; +extern const u8 gQuestLogString_SafariZone[]; +extern const u8 gQuestLogString_WardenSHome[]; +extern const u8 gQuestLogString_FightingDojo[]; +extern const u8 gQuestLogString_SilphCo[]; +extern const u8 gQuestLogString_SeafoamIslands[]; +extern const u8 gQuestLogString_PokemonMansion[]; +extern const u8 gQuestLogString_PokemonResearchLab[]; +extern const u8 gQuestLogString_VictoryRoad[]; +extern const u8 gQuestLogString_PokemonLeague[]; +extern const u8 gQuestLogString_CeruleanCave[]; extern const u8 gUnknown_8418C1B[]; @@ -437,9 +438,9 @@ void sub_811089C(void) memset(gSaveBlock1Ptr->questLog, 0, sizeof(gSaveBlock1Ptr->questLog)); gUnknown_203ADF8 = 0; gUnknown_203ADFA = 0; - gUnknown_203AE8C = 0; + sQuestLogCB = NULL; gUnknown_203AE08 = NULL; - gUnknown_203AE04 = 0; + gUnknown_203AE04 = NULL; sub_8113BD8(); sub_81138F8(); } @@ -455,10 +456,10 @@ void sub_8110920(void) gUnknown_203AE04 = NULL; } -void sub_811092C(void) +void RunQuestLogCB(void) { - if (gUnknown_203AE8C) - gUnknown_203AE8C(); + if (sQuestLogCB != NULL) + sQuestLogCB(); } bool8 sub_8110944(const void * a0, size_t a1) @@ -471,7 +472,7 @@ bool8 sub_8110944(const void * a0, size_t a1) return TRUE; } -bool8 sub_8110988(u16 * a0, size_t a1) +bool8 sub_8110988(u16 *a0, size_t a1) { void * r2 = gSaveBlock1Ptr->questLog[gUnknown_203ADF8].unk_568; void * r0 = gSaveBlock1Ptr->questLog[gUnknown_203ADF8].end; @@ -485,9 +486,9 @@ void sub_81109CC(u8 a0) { gUnknown_203ADFA = a0; if (a0 == 1) - gUnknown_203AE8C = sub_8110A00; + sQuestLogCB = sub_8110A00; else - gUnknown_203AE8C = sub_8110A3C; + sQuestLogCB = sub_8110A3C; } static void sub_8110A00(void) @@ -497,7 +498,7 @@ static void sub_8110A00(void) gUnknown_3005E88 = 0; sub_8110E3C(); gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } } @@ -541,7 +542,7 @@ void sub_8110AEC(u16 a0) gSaveBlock1Ptr->questLog[gUnknown_203ADF8].unk_000 = 2; else gSaveBlock1Ptr->questLog[gUnknown_203ADF8].unk_000 = 1; - sub_81115E8(); + QuestLog_GetSaneMonCounts(); sub_8110BB0(gUnknown_203ADF8); sub_8110BE8(gUnknown_203ADF8); sub_8110D94(); @@ -807,19 +808,19 @@ static bool8 sub_8110E68(struct UnkStruct_203AE98 * a0) { u16 i; - for (i = gUnknown_203ADFC; i < gUnknown_203AF98; i++) + for (i = gUnknown_203ADFC; i < sQuestLogIdx; i++) { if (gUnknown_203AE08 == NULL) return FALSE; switch (a0[i].unk_6) { - case 0: - case 1: - gUnknown_203AE08 = sub_8113D48(gUnknown_203AE08, &a0[i]); - break; - default: - gUnknown_203AE08 = sub_8113CC8(gUnknown_203AE08, &a0[i]); - break; + case 0: + case 1: + gUnknown_203AE08 = sub_8113D48(gUnknown_203AE08, &a0[i]); + break; + default: + gUnknown_203AE08 = sub_8113CC8(gUnknown_203AE08, &a0[i]); + break; } if (gUnknown_203AE08 == NULL) { @@ -833,7 +834,7 @@ static bool8 sub_8110E68(struct UnkStruct_203AE98 * a0) gUnknown_203AE08 = sub_8113BF4(gUnknown_203AE08); return FALSE; } - gUnknown_203ADFC = gUnknown_203AF98; + gUnknown_203ADFC = sQuestLogIdx; return TRUE; } @@ -982,7 +983,7 @@ void sub_8111274(u8 a0, u8 a1) static void sub_8111368(void) { gUnknown_203ADFA = 2; - sub_806E6FC(); + ResetSpecialVars(); ClearBag(); ClearPCItemSlots(); if (sub_8110AC8() == 1) @@ -1012,8 +1013,8 @@ void sub_81113E4(void) struct PokemonAndSomethingElse { struct Pokemon mon; - u16 unk_64; - u16 unk_66; + u16 sanePartyCount; + u16 saneBoxesCount; }; void sub_8111438(void) @@ -1022,32 +1023,32 @@ void sub_8111438(void) u16 r0, r3, r5, r6; CreateMon(&r9->mon, SPECIES_RATTATA, 1, 0x20, FALSE, 0, 0, 0); - r0 = VarGet(VAR_0x4027); - r9->unk_64 = r0 >> 12; - r9->unk_66 = r0 % 0x1000; + r0 = VarGet(VAR_QUEST_LOG_MON_COUNTS); + r9->sanePartyCount = r0 >> 12; + r9->saneBoxesCount = r0 % 0x1000; - r5 = sub_8111618(); - if (r5 > r9->unk_64) + r5 = QuestLog_GetSanePartyCount(); + if (r5 > r9->sanePartyCount) { - for (r3 = 0; r3 < r5 - r9->unk_64; r3++) + for (r3 = 0; r3 < r5 - r9->sanePartyCount; r3++) { ZeroMonData(&gPlayerParty[5 - r3]); } } - else if (r5 < r9->unk_64) + else if (r5 < r9->sanePartyCount) { for (r3 = 0; r3 < 5; r3++) { sub_808BCB4(0, r3); } - for (r3 = r5; r3 < r9->unk_64; r3++) + for (r3 = r5; r3 < r9->sanePartyCount; r3++) { CopyMon(&gPlayerParty[r3], &r9->mon, sizeof(struct Pokemon)); } } - r5 = sub_811164C(); - if (r5 > r9->unk_66) + r5 = QuestLog_GetSaneBoxCount(); + if (r5 > r9->saneBoxesCount) { for (r3 = 0; r3 < 14; r3++) { @@ -1057,15 +1058,15 @@ void sub_8111438(void) { sub_808BCB4(r3, r6); r5--; - if (r5 == r9->unk_66) + if (r5 == r9->saneBoxesCount) break; } } - if (r5 == r9->unk_66) + if (r5 == r9->saneBoxesCount) break; } } - else if (r5 < r9->unk_66) + else if (r5 < r9->saneBoxesCount) { for (r3 = 0; r3 < TOTAL_BOXES_COUNT; r3++) { @@ -1076,11 +1077,11 @@ void sub_8111438(void) { CopyMon(boxMon, &r9->mon.box, sizeof(struct BoxPokemon)); r5++; - if (r5 == r9->unk_66) + if (r5 == r9->saneBoxesCount) break; } } - if (r5 == r9->unk_66) + if (r5 == r9->saneBoxesCount) break; } } @@ -1088,14 +1089,14 @@ void sub_8111438(void) Free(r9); } -static void sub_81115E8(void) +static void QuestLog_GetSaneMonCounts(void) { - u16 r4 = sub_8111618(); - u16 r1 = sub_811164C(); - VarSet(VAR_0x4027, (r4 << 12) + r1); + u16 partyCount = QuestLog_GetSanePartyCount(); + u16 boxesCount = QuestLog_GetSaneBoxCount(); + VarSet(VAR_QUEST_LOG_MON_COUNTS, (partyCount << 12) + boxesCount); } -static u16 sub_8111618(void) +static u16 QuestLog_GetSanePartyCount(void) { u16 count = 0; u16 i; @@ -1109,7 +1110,7 @@ static u16 sub_8111618(void) return count; } -static u16 sub_811164C(void) +static u16 QuestLog_GetSaneBoxCount(void) { u16 count = 0; u16 i, j; @@ -1176,29 +1177,29 @@ static void sub_811175C(u8 a0, struct UnkStruct_203AE98 * a1) { switch (r4[0] & 0xFFF) { - case 0: - r4 = sub_8113D08(r4, &a1[r6]); - r6++; - break; - case 1: - case 2: - r4 = sub_8113D94(r4, &a1[r6]); - r6++; - break; - case 39: - r4 = sub_8113C20(r4, &a1[r6]); - r6++; - break; - case 41: - r4 = sub_8113C8C(r4, &a1[r6]); - r6++; - break; - default: - r4 = sub_8113A78(r4, &gUnknown_203AE0C[r9]); - if (r9 == 0) - sub_8113ABC(gUnknown_203AE0C[0]); - r9++; - break; + case 0: + r4 = sub_8113D08(r4, &a1[r6]); + r6++; + break; + case 1: + case 2: + r4 = sub_8113D94(r4, &a1[r6]); + r6++; + break; + case 39: + r4 = sub_8113C20(r4, &a1[r6]); + r6++; + break; + case 41: + r4 = sub_8113C8C(r4, &a1[r6]); + r6++; + break; + default: + r4 = QuestLog_SkipCommand(r4, &gUnknown_203AE0C[r9]); + if (r9 == 0) + sub_8113ABC(gUnknown_203AE0C[0]); + r9++; + break; } if (r4 == NULL) break; @@ -1208,10 +1209,10 @@ static void sub_811175C(u8 a0, struct UnkStruct_203AE98 * a1) static void sub_81118F4(s8 a0) { fade_screen(1, a0); - gUnknown_203AE8C = sub_8111914; + sQuestLogCB = QuestLog_AdvancePlayhead; } -static void sub_8111914(void) +static void QuestLog_AdvancePlayhead(void) { if (!gPaletteFade.active) { @@ -1224,29 +1225,29 @@ static void sub_8111914(void) else { gUnknown_3005E88 = 0; - sub_8111984(); + QuestLog_EndPlayback(); } } } -static void sub_8111984(void) +static void QuestLog_EndPlayback(void) { - sub_806E6FC(); + ResetSpecialVars(); Save_ResetSaveCounters(); Save_LoadGameData(0); SetMainCallback2(sub_8057430); gFieldCallback2 = sub_8111F60; FreeAllWindowBuffers(); gUnknown_203ADFA = 3; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } void sub_81119C8(void) { - sub_8111914(); + QuestLog_AdvancePlayhead(); } -bool8 sub_81119D4(void (*a0)(void)) +bool8 QuestLog_SchedulePlaybackCB(void (*callback)(void)) { u8 taskId; @@ -1257,41 +1258,41 @@ bool8 sub_81119D4(void (*a0)(void)) break; case 2: gUnknown_3005E88 = 3; - taskId = CreateTask(sub_8111A34, 80); + taskId = CreateTask(Task_RunPlaybackCB, 80); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; - SetWordTaskArg(taskId, 14, (u32)a0); + SetWordTaskArg(taskId, 14, (uintptr_t)callback); return TRUE; } return FALSE; } -static void sub_8111A34(u8 taskId) +static void Task_RunPlaybackCB(u8 taskId) { void (*routine)(void); - s16 * data = gTasks[taskId].data; + s16 *data = gTasks[taskId].data; switch (data[1]) { - case 0: - if (++data[0] == 0x7F) - { - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); - gUnknown_203AE94.unk_0_6 = 2; - data[1]++; - } - break; - case 1: - if (!gPaletteFade.active) - { - gUnknown_3005E88 = 0; - routine = (void (*)(void)) GetWordTaskArg(taskId, 14); - if (routine != NULL) - routine(); - DestroyTask(taskId); - gUnknown_203AE8C = sub_8111914; - } - break; + case 0: + if (++data[0] == 0x7F) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + gUnknown_203AE94.unk_0_6 = 2; + data[1]++; + } + break; + case 1: + if (!gPaletteFade.active) + { + gUnknown_3005E88 = 0; + routine = (void (*)(void)) GetWordTaskArg(taskId, 14); + if (routine != NULL) + routine(); + DestroyTask(taskId); + sQuestLogCB = QuestLog_AdvancePlayhead; + } + break; } } @@ -1384,7 +1385,7 @@ void sub_8111C68(void) { gUnknown_203AE94.unk_0_6 = 1; gUnknown_3005E88 = 0; - sub_8111E64(-3); + QuestLog_SkipToEndOfPlayback(-3); } } } @@ -1421,8 +1422,8 @@ static void sub_8111D10(void) static void sub_8111D90(u8 a0) { - const u16 * src = gUnknown_8456638; - u16 * buffer = Alloc(0x1680); + const u16 *src = gUnknown_8456638; + u16 *buffer = Alloc(0x1680); u8 i, j, y; if (buffer) @@ -1431,15 +1432,15 @@ static void sub_8111D90(u8 a0) { switch (i) { - default: - y = 1; - break; - case 0: - y = 0; - break; - case 5: - y = 2; - break; + default: + y = 1; + break; + case 0: + y = 0; + break; + case 5: + y = 2; + break; } // r6 = y * 32 @@ -1465,13 +1466,13 @@ static void sub_8111E20(void) CopyWindowToVram(gUnknown_203ADFE[1], 1); } -static void sub_8111E64(s8 a0) +static void QuestLog_SkipToEndOfPlayback(s8 a0) { fade_screen(1, a0); - gUnknown_203AE8C = sub_8111E84; + sQuestLogCB = QuestLog_WaitFadeAndCancelPlayback; } -static void sub_8111E84(void) +static void QuestLog_WaitFadeAndCancelPlayback(void) { if (!gPaletteFade.active) { @@ -1483,7 +1484,7 @@ static void sub_8111E84(void) sub_811175C(gUnknown_203ADF8, gUnknown_203AE98); } gUnknown_3005E88 = 0; - sub_8111984(); + QuestLog_EndPlayback(); } } @@ -1513,7 +1514,7 @@ static void sub_8111F8C(u8 taskId) if (ScriptContext2_IsEnabled() != TRUE) { - player_bitmagic(); + FreezeEventObjects(); sub_805C270(); sub_805C780(); ScriptContext2_Enable(); @@ -1536,7 +1537,7 @@ static void sub_8111FCC(u8 taskId) task->data[0] = 0; task->data[1] = 0; task->func = sub_8112044; - player_bitmagic(); + FreezeEventObjects(); ScriptContext2_Enable(); } } @@ -1558,57 +1559,57 @@ static void sub_8112044(u8 taskId) static void sub_81120AC(u8 taskId) { - s16 * data = gTasks[taskId].data; + s16 *data = gTasks[taskId].data; u8 i; switch (data[0]) { - case 0: - gDisableMapMusicChangeOnMapLoad = 0; - Overworld_PlaySpecialMapMusic(); - sub_811229C(); - FillWindowPixelRect(gUnknown_203ADFE[0], 0xF, 0, 0, gUnknown_845661C[0].width * 8, gUnknown_845661C[0].height * 8); - data[0]++; - break; - case 1: - if (sub_81121D8(taskId)) + case 0: + gDisableMapMusicChangeOnMapLoad = 0; + Overworld_PlaySpecialMapMusic(); + sub_811229C(); + FillWindowPixelRect(gUnknown_203ADFE[0], 0xF, 0, 0, gUnknown_845661C[0].width * 8, gUnknown_845661C[0].height * 8); + data[0]++; + break; + case 1: + if (sub_81121D8(taskId)) + { + for (i = 0; i < 3; i++) { - for (i = 0; i < 3; i++) - { - ClearWindowTilemap(gUnknown_203ADFE[i]); - CopyWindowToVram(gUnknown_203ADFE[i], 1); - RemoveWindow(gUnknown_203ADFE[i]); - } - data[1] = 0; - data[0]++; + ClearWindowTilemap(gUnknown_203ADFE[i]); + CopyWindowToVram(gUnknown_203ADFE[i], 1); + RemoveWindow(gUnknown_203ADFE[i]); } - break; - case 2: - if (data[1] < 32) - data[1]++; - else - data[0]++; - break; - default: - if (gUnknown_203AE94.unk_0_6 == 1) - sub_8098110(1); - CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400); - Free(gUnknown_203AE90); - gUnknown_203AE94 = (struct UnkStruct_203AE94){}; - sub_80696C0(); - ScriptContext2_Disable(); - gTextFlags.autoScroll = FALSE; - gUnknown_2036E28 = 0; - sub_8082740(0); - gHelpSystemEnabled = TRUE; - DestroyTask(taskId); - break; + data[1] = 0; + data[0]++; + } + break; + case 2: + if (data[1] < 32) + data[1]++; + else + data[0]++; + break; + default: + if (gUnknown_203AE94.unk_0_6 == 1) + sub_8098110(1); + CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400); + Free(gUnknown_203AE90); + gUnknown_203AE94 = (struct UnkStruct_203AE94){}; + sub_80696C0(); + ScriptContext2_Disable(); + gTextFlags.autoScroll = FALSE; + gUnknown_2036E28 = 0; + sub_8082740(0); + gHelpSystemEnabled = TRUE; + DestroyTask(taskId); + break; } } static bool8 sub_81121D8(u8 taskId) { - s16 * data = gTasks[taskId].data; + s16 *data = gTasks[taskId].data; if (data[1] > 15) return TRUE; @@ -1625,7 +1626,7 @@ static bool8 sub_81121D8(u8 taskId) static void sub_811229C(void) { - u16 * buffer = Alloc(0x400); + u16 *buffer = Alloc(0x400); CpuCopy16(gUnknown_203AE90, buffer, 0x400); sub_807B0C4(gUnknown_203AE90, gUnknown_203AE90, 0xd0); sub_807B0C4(gUnknown_203AE90 + 0x110, gUnknown_203AE90 + 0x110, 0x10); @@ -1643,7 +1644,7 @@ void sub_811231C(void) sub_8110E68(gUnknown_203AE98); sub_8110E3C(); gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; gUnknown_203AE04 = NULL; gUnknown_203AE08 = NULL; gUnknown_3005E88 = 0; @@ -1659,7 +1660,7 @@ void sub_8112364(void) sub_8110E3C(); gUnknown_3005E88 = 0; gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } gUnknown_203AE04 = NULL; gUnknown_203AE08 = NULL; @@ -1728,13 +1729,13 @@ void sub_81124EC(u8 a0, u8 a1, u8 a2, u8 a3) { if (!sub_8112CEC()) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = a0; - gUnknown_3005E94[gUnknown_203AF98].unk_1 = a1; - gUnknown_3005E94[gUnknown_203AF98].unk_2 = a2; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a3; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = a0; + gUnknown_3005E94[sQuestLogIdx].unk_1 = a1; + gUnknown_3005E94[sQuestLogIdx].unk_2 = a2; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a3; + sQuestLogIdx++; gUnknown_203B01A = 0; } } @@ -1743,13 +1744,13 @@ void sub_8112588(u8 a0, u8 a1, u8 a2, u8 a3, u8 a4) { if (!sub_8112D1C()) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = a0; - gUnknown_3005E94[gUnknown_203AF98].unk_1 = a1; - gUnknown_3005E94[gUnknown_203AF98].unk_2 = a2; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a3; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = a0; + gUnknown_3005E94[sQuestLogIdx].unk_1 = a1; + gUnknown_3005E94[sQuestLogIdx].unk_2 = a2; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a3; + sQuestLogIdx++; gUnknown_203B01A = a4; } } @@ -1760,12 +1761,12 @@ void sub_8112628(u8 a0) { if (a0 != gUnknown_3005E94[gUnknown_203B01C].unk_3 || a0 > 3) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a0; - gUnknown_203B01C = gUnknown_203AF98; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a0; + gUnknown_203B01C = sQuestLogIdx; + sQuestLogIdx++; gUnknown_203B01A = 0; } } @@ -1775,12 +1776,12 @@ void sub_81126AC(u8 a0, u8 a1) { if (!sub_8112D1C()) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a0; - gUnknown_203B01C = gUnknown_203AF98; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a0; + gUnknown_203B01C = sQuestLogIdx; + sQuestLogIdx++; gUnknown_203B01A = a1; } } @@ -1789,11 +1790,11 @@ void sub_8112720(u8 a0) { if (!sub_8112D1C()) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 1; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a0; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 1; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a0; + sQuestLogIdx++; gUnknown_203B01A = 0; } } @@ -1802,27 +1803,27 @@ void sub_811278C(u8 a0, u8 a1) { if (!sub_8112D1C()) { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 1; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = a0; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 1; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = a0; + sQuestLogIdx++; gUnknown_203B01A = a1; } } void sub_81127F8(struct UnkStruct_3005E90 * a0) { - if (gUnknown_203AF98 < gUnknown_3005E8C) + if (sQuestLogIdx < sNumQuestLogs) { u32 r2 = *(u32 *)a0 & 0x00FF00F3; - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 2; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = r2; - gUnknown_3005E94[gUnknown_203AF98].unk_1 = r2 >> 8; - gUnknown_3005E94[gUnknown_203AF98].unk_2 = r2 >> 16; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = r2 >> 24; - gUnknown_203AF98++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 2; + gUnknown_3005E94[sQuestLogIdx].unk_0 = r2; + gUnknown_3005E94[sQuestLogIdx].unk_1 = r2 >> 8; + gUnknown_3005E94[sQuestLogIdx].unk_2 = r2 >> 16; + gUnknown_3005E94[sQuestLogIdx].unk_3 = r2 >> 24; + sQuestLogIdx++; if (ScriptContext2_IsEnabled()) gUnknown_203B01A = TRUE; else @@ -1834,14 +1835,14 @@ static void sub_8112888(u8 a0) { switch (a0) { - case 1: - if (gUnknown_3005E88 == 1) - gUnknown_3005E88 = 3; - break; - case 2: - if (gUnknown_3005E88 == 3) - gUnknown_3005E88 = 1; - break; + case 1: + if (gUnknown_3005E88 == 1) + gUnknown_3005E88 = 3; + break; + case 2: + if (gUnknown_3005E88 == 3) + gUnknown_3005E88 = 1; + break; } } @@ -1851,24 +1852,24 @@ void sub_81128BC(u8 a0) switch (a0) { - case 1: - if (r1 == 1) - gUnknown_3005E88 = 3; - else if (r1 == 2) - { - gUnknown_3005E94[gUnknown_203AF98].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 3; - gUnknown_203AF98++; - gUnknown_203B01A = 0; - gUnknown_3005E88 = 4; - } - break; - case 2: - if (r1 == 1) - gUnknown_3005E88 = 1; - else if (r1 == 2) - gUnknown_3005E88 = 2; - break; + case 1: + if (r1 == 1) + gUnknown_3005E88 = 3; + else if (r1 == 2) + { + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 3; + sQuestLogIdx++; + gUnknown_203B01A = 0; + gUnknown_3005E88 = 4; + } + break; + case 2: + if (r1 == 1) + gUnknown_3005E88 = 1; + else if (r1 == 2) + gUnknown_3005E88 = 2; + break; } } @@ -1878,64 +1879,64 @@ static void sub_8112940(u8 a0, struct UnkStruct_203AE98 *a1, u16 a2) switch (a0) { - default: - gUnknown_3005E88 = 0; - break; + default: + gUnknown_3005E88 = 0; + break; + case 1: + gUnknown_3005E94 = a1; + sNumQuestLogs = a2 / 8; + for (i = 0; i < 0x40; i++) + { + gUnknown_203AF9A[i][0] |= 0xFF; + gUnknown_203AF9A[i][1] |= 0xFF; + } + sQuestLogIdx = 0; + gUnknown_203B01C = 0; + gUnknown_3005E90 = (struct UnkStruct_3005E90){}; + gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; + gUnknown_203AF9A[0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + gUnknown_203AF9A[0][1] = 0xFF; + gUnknown_3005E88 = 1; + break; + case 2: + gUnknown_3005E94 = a1; + sNumQuestLogs = a2 / 8; + for (i = 0; i < sNumQuestLogs; i++) + { + gUnknown_3005E94[i] = (struct UnkStruct_203AE98){ 0, 0, 0, 0, 0xFFFF, 0xFF }; + } + sQuestLogIdx = 0; + gUnknown_203B01A = 0; + gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + switch (GetPlayerFacingDirection()) + { + case 0: case 1: - gUnknown_3005E94 = a1; - gUnknown_3005E8C = a2 / 8; - for (i = 0; i < 0x40; i++) - { - gUnknown_203AF9A[i][0] |= 0xFF; - gUnknown_203AF9A[i][1] |= 0xFF; - } - gUnknown_203AF98 = 0; - gUnknown_203B01C = 0; - gUnknown_3005E90 = (struct UnkStruct_3005E90){}; - gUnknown_203B01A = gUnknown_3005E94[gUnknown_203AF98].unk_4; - gUnknown_203AF9A[0][0] = gUnknown_3005E94[gUnknown_203AF98].unk_3; - gUnknown_203AF9A[0][1] = 0xFF; - gUnknown_3005E88 = 1; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; + break; + case 4: + gUnknown_3005E94[sQuestLogIdx].unk_3 = 3; break; case 2: - gUnknown_3005E94 = a1; - gUnknown_3005E8C = a2 / 8; - for (i = 0; i < gUnknown_3005E8C; i++) - { - gUnknown_3005E94[i] = (struct UnkStruct_203AE98){ 0, 0, 0, 0, 0xFFFF, 0xFF }; - } - gUnknown_203AF98 = 0; - gUnknown_203B01A = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_4 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - switch (GetPlayerFacingDirection()) - { - case 0: - case 1: - gUnknown_3005E94[gUnknown_203AF98].unk_3 = 0; - break; - case 4: - gUnknown_3005E94[gUnknown_203AF98].unk_3 = 3; - break; - case 2: - gUnknown_3005E94[gUnknown_203AF98].unk_3 = 1; - break; - case 3: - gUnknown_3005E94[gUnknown_203AF98].unk_3 = 2; - break; - } - gUnknown_203B01C = 0; - gUnknown_203AF98++; - gUnknown_3005E94[gUnknown_203AF98].unk_4 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_6 = 2; - gUnknown_3005E94[gUnknown_203AF98].unk_0 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_1 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_2 = 0; - gUnknown_3005E94[gUnknown_203AF98].unk_3 = 0; - gUnknown_203AF98++; - gUnknown_3005E88 = 2; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 1; + break; + case 3: + gUnknown_3005E94[sQuestLogIdx].unk_3 = 2; break; + } + gUnknown_203B01C = 0; + sQuestLogIdx++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 2; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_1 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_2 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; + sQuestLogIdx++; + gUnknown_3005E88 = 2; + break; } } @@ -1944,67 +1945,67 @@ void sub_8112B3C(void) { switch (gUnknown_3005E88) { - case 0: - break; - case 1: - if (sub_8112CEC()) + case 0: + break; + case 1: + if (sub_8112CEC()) + { + if (gUnknown_203B01A != 0) + gUnknown_203B01A--; + else { - if (gUnknown_203B01A != 0) - gUnknown_203B01A--; - else + while (1) { - while (1) + switch (gUnknown_3005E94[sQuestLogIdx].unk_6) { - switch (gUnknown_3005E94[gUnknown_203AF98].unk_6) - { - case 0: - gUnknown_203AF9A[gUnknown_3005E94[gUnknown_203AF98].unk_0][0] = gUnknown_3005E94[gUnknown_203AF98].unk_3; - break; - case 1: - gUnknown_203AF9A[gUnknown_3005E94[gUnknown_203AF98].unk_0][1] = gUnknown_3005E94[gUnknown_203AF98].unk_3; - break; - case 2: - *(u32 *)&gUnknown_3005E90 = ((gUnknown_3005E94[gUnknown_203AF98].unk_3 << 24) | (gUnknown_3005E94[gUnknown_203AF98].unk_2 << 16) | (gUnknown_3005E94[gUnknown_203AF98].unk_1 << 8) | (gUnknown_3005E94[gUnknown_203AF98].unk_0 << 0)); - break; - case 3: - gUnknown_3005E88 = 3; - break; - case 0xFE: - break; - case 0xFF: - gUnknown_3005E88 = 0; - break; - } - if (gUnknown_3005E88 == 0) - break; - if (++gUnknown_203AF98 >= gUnknown_3005E8C) - { - gUnknown_3005E88 = 0; - break; - } - gUnknown_203B01A = gUnknown_3005E94[gUnknown_203AF98].unk_4; - if (gUnknown_3005E88 == 3) - break; - if (gUnknown_203B01A == 0) - continue; - if (gUnknown_203B01A == 0xFFFF) - break; - } + case 0: + gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + break; + case 1: + gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][1] = gUnknown_3005E94[sQuestLogIdx].unk_3; + break; + case 2: + *(u32 *)&gUnknown_3005E90 = ((gUnknown_3005E94[sQuestLogIdx].unk_3 << 24) | (gUnknown_3005E94[sQuestLogIdx].unk_2 << 16) | (gUnknown_3005E94[sQuestLogIdx].unk_1 << 8) | (gUnknown_3005E94[sQuestLogIdx].unk_0 << 0)); + break; + case 3: + gUnknown_3005E88 = 3; + break; + case 0xFE: + break; + case 0xFF: + gUnknown_3005E88 = 0; + break; + } + if (gUnknown_3005E88 == 0) + break; + if (++sQuestLogIdx >= sNumQuestLogs) + { + gUnknown_3005E88 = 0; + break; + } + gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; + if (gUnknown_3005E88 == 3) + break; + if (gUnknown_203B01A == 0) + continue; + if (gUnknown_203B01A == 0xFFFF) + break; } } - else if (gUnknown_203AF98 >= gUnknown_3005E8C) - gUnknown_3005E88 = 0; - break; - case 2: - if (ScriptContext2_IsEnabled() != 1) - gUnknown_203B01A++; - if (gUnknown_203AF98 >= gUnknown_3005E8C) - gUnknown_3005E88 = 0; - break; - case 3: - break; - case 4: - break; + } + else if (sQuestLogIdx >= sNumQuestLogs) + gUnknown_3005E88 = 0; + break; + case 2: + if (ScriptContext2_IsEnabled() != 1) + gUnknown_203B01A++; + if (sQuestLogIdx >= sNumQuestLogs) + gUnknown_3005E88 = 0; + break; + case 3: + break; + case 4: + break; } } #else @@ -2052,18 +2053,18 @@ void sub_8112B3C(void) "_08112B8C: .4byte gUnknown_203B01A\n" "_08112B90:\n" "\tldr r5, _08112B98 @ =gUnknown_3005E88\n" - "\tldr r4, _08112B9C @ =gUnknown_203AF98\n" + "\tldr r4, _08112B9C @ =sQuestLogIdx\n" "\tldr r6, _08112BA0 @ =gUnknown_3005E94\n" "\tb _08112BD4\n" "\t.align 2, 0\n" "_08112B98: .4byte gUnknown_3005E88\n" - "_08112B9C: .4byte gUnknown_203AF98\n" + "_08112B9C: .4byte sQuestLogIdx\n" "_08112BA0: .4byte gUnknown_3005E94\n" "_08112BA4:\n" "\tldrh r0, [r4]\n" "\tadds r0, 0x1\n" "\tstrh r0, [r4]\n" - "\tldr r1, _08112BF0 @ =gUnknown_3005E8C\n" + "\tldr r1, _08112BF0 @ =sNumQuestLogs\n" "\tlsls r0, 16\n" "\tlsrs r0, 16\n" "\tldrh r1, [r1]\n" @@ -2100,7 +2101,7 @@ void sub_8112B3C(void) "\tbeq _08112C18\n" "\tb _08112C50\n" "\t.align 2, 0\n" - "_08112BF0: .4byte gUnknown_3005E8C\n" + "_08112BF0: .4byte sNumQuestLogs\n" "_08112BF4: .4byte 0x0000ffff\n" "_08112BF8:\n" "\tcmp r0, 0xFE\n" @@ -2173,8 +2174,8 @@ void sub_8112B3C(void) "\tadds r0, 0x1\n" "\tstrh r0, [r1]\n" "_08112C72:\n" - "\tldr r0, _08112C90 @ =gUnknown_203AF98\n" - "\tldr r1, _08112C94 @ =gUnknown_3005E8C\n" + "\tldr r0, _08112C90 @ =sQuestLogIdx\n" + "\tldr r1, _08112C94 @ =sNumQuestLogs\n" "\tldrh r0, [r0]\n" "\tldrh r1, [r1]\n" "\tcmp r0, r1\n" @@ -2188,8 +2189,8 @@ void sub_8112B3C(void) "\tbx r0\n" "\t.align 2, 0\n" "_08112C8C: .4byte gUnknown_203B01A\n" - "_08112C90: .4byte gUnknown_203AF98\n" - "_08112C94: .4byte gUnknown_3005E8C\n" + "_08112C90: .4byte sQuestLogIdx\n" + "_08112C94: .4byte sNumQuestLogs\n" "_08112C98: .4byte gUnknown_3005E88"); } #endif @@ -2203,28 +2204,28 @@ u8 sub_8112CAC(void) { switch (gUnknown_3005E88) { - case 0: - default: - return 0; - case 1: - case 3: - return 1; - case 2: - case 4: - return 2; + case 0: + default: + return 0; + case 1: + case 3: + return 1; + case 2: + case 4: + return 2; } } static bool8 sub_8112CEC(void) { - if (gUnknown_203AF98 >= gUnknown_3005E8C || ScriptContext2_IsEnabled() == TRUE) + if (sQuestLogIdx >= sNumQuestLogs || ScriptContext2_IsEnabled() == TRUE) return TRUE; return FALSE; } static bool8 sub_8112D1C(void) { - if (gUnknown_203AF98 >= gUnknown_3005E8C) + if (sQuestLogIdx >= sNumQuestLogs) return TRUE; return FALSE; } @@ -2235,37 +2236,37 @@ static const struct UnkStruct_300201C gUnknown_84566A4 = { 0x7FFF }; -u16 * sub_8112D40(u8 a0, u16 a1) +void * QuestLogGetFlagOrVarPtr(bool8 isFlag, u16 idx) { - u16 * response; - if (gUnknown_203AF98 == 0) + void * response; + if (sQuestLogIdx == 0) return NULL; - if (gUnknown_203AF98 >= gUnknown_3005E8C) + if (sQuestLogIdx >= sNumQuestLogs) return NULL; - if (gUnknown_203B01E >= gUnknown_3002020) + if (sFlagOrVarPlayhead >= sNumFlagsOrVars) return NULL; - if (gUnknown_300201C[gUnknown_203B01E].unk_0_0 == a1 && gUnknown_300201C[gUnknown_203B01E].unk_0_f == a0) + if (sFlagOrVarRecords[sFlagOrVarPlayhead].idx == idx && sFlagOrVarRecords[sFlagOrVarPlayhead].isFlag == isFlag) { - response = &gUnknown_300201C[gUnknown_203B01E].unk_2; - gUnknown_203B01E++; + response = &sFlagOrVarRecords[sFlagOrVarPlayhead].value; + sFlagOrVarPlayhead++; } else response = NULL; return response; } -void sub_8112DB0(u8 a0, u16 a1, u16 a2) +void QuestLogSetFlagOrVar(bool8 isFlag, u16 idx, u16 value) { - if (gUnknown_203AF98 == 0) + if (sQuestLogIdx == 0) return; - if (gUnknown_203AF98 >= gUnknown_3005E8C) + if (sQuestLogIdx >= sNumQuestLogs) return; - if (gUnknown_203B01E >= gUnknown_3002020) + if (sFlagOrVarPlayhead >= sNumFlagsOrVars) return; - gUnknown_300201C[gUnknown_203B01E].unk_0_0 = a1; - gUnknown_300201C[gUnknown_203B01E].unk_0_f = a0; - gUnknown_300201C[gUnknown_203B01E].unk_2 = a2; - gUnknown_203B01E++; + sFlagOrVarRecords[sFlagOrVarPlayhead].idx = idx; + sFlagOrVarRecords[sFlagOrVarPlayhead].isFlag = isFlag; + sFlagOrVarRecords[sFlagOrVarPlayhead].value = value; + sFlagOrVarPlayhead++; } void sub_8112E3C(u8 a0, struct UnkStruct_300201C * a1, u16 a2) @@ -2276,14 +2277,14 @@ void sub_8112E3C(u8 a0, struct UnkStruct_300201C * a1, u16 a2) gUnknown_3005E88 = 0; else { - gUnknown_300201C = a1; - gUnknown_3002020 = a2 >> 2; - gUnknown_203B01E = 0; + sFlagOrVarRecords = a1; + sNumFlagsOrVars = a2 >> 2; + sFlagOrVarPlayhead = 0; if (a0 == 2) { - for (i = 0; i < gUnknown_3005E8C; i++) + for (i = 0; i < sNumQuestLogs; i++) { - gUnknown_300201C[i] = gUnknown_84566A4; + sFlagOrVarRecords[i] = gUnknown_84566A4; } } } @@ -2330,7 +2331,7 @@ void sub_8112F18(u8 a0) { u8 width = GetWindowAttribute(a0, WINDOW_WIDTH); u8 height = GetWindowAttribute(a0, WINDOW_HEIGHT); - u8 * buffer = Alloc(32 * width * height); + u8 *buffer = Alloc(32 * width * height); u8 i, j; u8 k; @@ -2464,12 +2465,12 @@ static const u8 gUnknown_8456930[3] = { 0, 10, 2 }; -void sub_8112FE4(const u8 * a0) +void sub_8112FE4(const u8 *a0) { AddTextPrinterParameterized4(sHelpMessageWindowId, 0x02, 2, 5, 1, 1, gUnknown_8456930, -1, a0); } -void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode) +void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode) { sub_8112FD0(); sub_8112FE4(text); @@ -2509,10 +2510,10 @@ static void sub_81130BC(struct Var4038Struct * varPtr) sub_8113524(varPtr); sub_8113390(varPtr); VarSet(VAR_0x4039, gSaveBlock2Ptr->playTimeHours); - FlagClear(FLAG_0x06C); - FlagClear(FLAG_0x06D); - FlagClear(FLAG_0x06E); - FlagClear(FLAG_0x06F); + FlagClear(FLAG_HIDE_SAFFRON_FAN_CLUB_BLACKBELT); + FlagClear(FLAG_HIDE_SAFFRON_FAN_CLUB_ROCKER); + FlagClear(FLAG_HIDE_SAFFRON_FAN_CLUB_WOMAN); + FlagClear(FLAG_HIDE_SAFFRON_FAN_CLUB_BEAUTY); VarSet(VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 1); } } @@ -2594,7 +2595,7 @@ u8 sub_81131FC(struct Var4038Struct * a0) return gUnknown_8456940[retval]; } -u16 sub_8113288(void) +u16 GetNumMovedSaffronFanClubMembers(void) { return sub_81132A0(VAR_0x4038_STRUCT); } @@ -2613,7 +2614,7 @@ static u16 sub_81132A0(struct Var4038Struct * a0) return count; } -void sub_81132CC(void) +void UpdateMovedSaffronFanClubMembers(void) { sub_81132E0(VAR_0x4038_STRUCT); } @@ -2645,7 +2646,7 @@ static void sub_81132E0(struct Var4038Struct * a0) } } -bool16 sub_8113364(void) +bool16 ShouldMoveSaffronFanClubMember(void) { return sub_811337C(VAR_0x4038_STRUCT); } @@ -2662,58 +2663,58 @@ static void sub_8113390(struct Var4038Struct * a0) a0->unk_1 |= 4; } -void sub_81133A4(void) +void BufferStreakTrainerText(void) { u8 r3 = 0; u8 r2 = 0; switch (gSpecialVar_0x8004) { - case 0: - r2 = 0; - r3 = 0; - break; - case 1: - case 2: - case 3: - case 7: - break; - case 4: - r2 = 1; - r3 = 0; - break; - case 5: - r2 = 0; - r3 = 1; - break; - case 6: - r2 = 2; - r3 = 1; - break; + case 0: + r2 = 0; + r3 = 0; + break; + case 1: + case 2: + case 3: + case 7: + break; + case 4: + r2 = 1; + r3 = 0; + break; + case 5: + r2 = 0; + r3 = 1; + break; + case 6: + r2 = 2; + r3 = 1; + break; } sub_8113414(&gSaveBlock2Ptr->linkBattleRecords, r3, r2); } static void sub_8113414(struct LinkBattleRecords * a0, u8 a1, u8 a2) { - u8 * str; - const u8 * src = a0->entries[a1].name; + u8 *str; + const u8 *src = a0->entries[a1].name; if (src[0] == EOS) { switch (a2) { - case 0: - StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); - break; - case 1: - StringCopy(gStringVar1, gUnknown_84178D0); - break; - case 2: - StringCopy(gStringVar1, gUnknown_84178DA); - break; - default: - StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); - break; + case 0: + StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); + break; + case 1: + StringCopy(gStringVar1, gUnknown_84178D0); // LT. SURGE + break; + case 2: + StringCopy(gStringVar1, gUnknown_84178DA); // KOGA + break; + default: + StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); + break; } } else @@ -2771,7 +2772,7 @@ u8 sub_8113530(void) return sub_8113114(VAR_0x4038_STRUCT, gSpecialVar_0x8004); } -static u16 * (*const sQuestLogStorageCBs[])(u16 *, const u16 *) = { +static u16 *(*const sQuestLogStorageCBs[])(u16 *, const u16 *) = { NULL, NULL, NULL, @@ -2818,9 +2819,9 @@ static u16 * (*const sQuestLogStorageCBs[])(u16 *, const u16 *) = { }; #ifdef NONMATCHING -void sub_8113550(u16 a0, const u16 * a1) +void sub_8113550(u16 a0, const u16 *a1) { - u16 * r1; + u16 *r1; if (a0 == 35 && gUnknown_203B048 == 2) { @@ -2905,7 +2906,7 @@ void sub_8113550(u16 a0, const u16 * a1) } #else NAKED -void sub_8113550(u16 a0, const u16 * a1) +void sub_8113550(u16 a0, const u16 *a1) { asm_unified("\tpush {r4,r5,lr}\n" "\tadds r5, r1, 0\n" @@ -3120,18 +3121,18 @@ bool8 sub_8113748(void) return FALSE; } -static bool8 sub_8113778(u16 a0, u16 * a1) +static bool8 sub_8113778(u16 a0, u16 *a1) { if (a0 == 36 || a0 == 11) return TRUE; - if (!FlagGet(0x82C)) + if (!FlagGet(FLAG_SYS_GAME_CLEAR)) { if (a0 == 3 || a0 == 31 || sub_81137E4(a0, a1) == TRUE) return TRUE; } - if (!FlagGet(0x844)) + if (!FlagGet(FLAG_SYS_CAN_LINK_WITH_RS)) { if (a0 == 4 || a0 == 5 || a0 == 6 || a0 == 7 || a0 == 8 || a0 == 9 || a0 == 10 || a0 == 22 || a0 == 25 || a0 == 26) return TRUE; @@ -3140,7 +3141,7 @@ static bool8 sub_8113778(u16 a0, u16 * a1) return FALSE; } -static bool8 sub_81137E4(u16 a0, u16 * a1) +static bool8 sub_81137E4(u16 a0, u16 *a1) { if (a0 == 34) { @@ -3160,7 +3161,7 @@ static void sub_811381C(void) gUnknown_203B048 = 0; } -static u16 * sub_8113828(u16 a0, u16 * a1) +static u16 *sub_8113828(u16 a0, u16 *a1) { if (sub_8113778(a0, a1) == TRUE) return NULL; @@ -3179,7 +3180,7 @@ static u16 * sub_8113828(u16 a0, u16 * a1) return sQuestLogStorageCBs[a0](gUnknown_203AE08, a1); } -static bool8 sub_81138A0(u16 a0, u16 * a1) +static bool8 sub_81138A0(u16 a0, u16 *a1) { if (a0 < 12 || a0 > 19) return FALSE; @@ -3206,7 +3207,7 @@ void sub_811390C(void) { if (gUnknown_203B024.unk_00 != 0) { - u16 * resp; + u16 *resp; gUnknown_203B04A = 0; sub_8110AEC(gUnknown_203B024.unk_00); resp = sQuestLogStorageCBs[gUnknown_203B024.unk_00](gUnknown_203AE08, gUnknown_203B024.unk_04); @@ -3215,12 +3216,12 @@ void sub_811390C(void) } } -static bool8 sub_8113954(u16 a0, u16 * a1) +static bool8 sub_8113954(u16 a0, u16 *a1) { if (a0 != 34 && a0 != 30 && a0 != 32 && a0 != 33) return FALSE; sub_81138F8(); - if (gUnknown_3005E88 || FlagGet(0x82C) || sub_81137E4(a0, a1) != TRUE) + if (gUnknown_3005E88 || FlagGet(FLAG_SYS_GAME_CLEAR) || sub_81137E4(a0, a1) != TRUE) { gUnknown_203B024.unk_00 = a0; memcpy(gUnknown_203B024.unk_04, a1, 8); @@ -3232,7 +3233,7 @@ void sub_81139BC(void) { if (gUnknown_203B024.unk_00 != 0) { - u16 * resp; + u16 *resp; if (gUnknown_3005E88 == 0) { gUnknown_203B04A = 0; @@ -3250,7 +3251,7 @@ void sub_81139BC(void) static void sub_8113A1C(u16 a0) { gUnknown_203AE08 = sub_8113C5C(gUnknown_203AE08, a0); - gUnknown_203AF98++; + sQuestLogIdx++; } static bool8 sub_8113A44(u16 a0, u16 *a1) @@ -3267,7 +3268,7 @@ static bool8 sub_8113A44(u16 a0, u16 *a1) return FALSE; } -static const u16 * (*const sQuestLogScriptParsingCBs[])(const u16 *) = { +static const u16 *(*const sQuestLogScriptParsingCBs[])(const u16 *) = { NULL, NULL, NULL, @@ -3313,7 +3314,7 @@ static const u16 * (*const sQuestLogScriptParsingCBs[])(const u16 *) = { sub_8115800 }; -static const u8 gUnknown_8456AA0[] = { +static const u8 sQuestLogEventCmdSizes[] = { 0x08, 0x08, 0x08, @@ -3359,21 +3360,21 @@ static const u8 gUnknown_8456AA0[] = { 0x06 }; -static u16 * sub_8113A78(u16 * a0, u16 **a1) +static u16 *QuestLog_SkipCommand(u16 *curPtr, u16 **prevPtr_p) { - u16 r2 = a0[0] & 0xfff; - u16 r4 = a0[0] >> 12; - if (r2 == 33) - r4 = 0; - if (r2 < 3 || r2 > 42) + u16 idx = curPtr[0] & 0xfff; + u16 cnt = curPtr[0] >> 12; + if (idx == 33) + cnt = 0; + if (idx < 3 || idx > 42) return NULL; - *a1 = a0; - return gUnknown_8456AA0[r2] + (gUnknown_8456AA0[r2] - 4) * r4 + (void *)a0; + *prevPtr_p = curPtr; + return sQuestLogEventCmdSizes[idx] + (sQuestLogEventCmdSizes[idx] - 4) * cnt + (void *)curPtr; } -static void sub_8113ABC(u16 * a0) +static void sub_8113ABC(u16 *a0) { - u8 * r2 = (u8 *)(a0 + 2); + u8 *r2 = (u8 *)(a0 + 2); if ((a0[0] & 0xFFF) != 35) gUnknown_203B04A = 0; else @@ -3381,9 +3382,9 @@ static void sub_8113ABC(u16 * a0) } #ifdef NONMATCHING -static bool8 sub_8113AE8(u16 * a0) +static bool8 sub_8113AE8(u16 *a0) { - if (a0 == NULL || a0[1] > gUnknown_203AF98) + if (a0 == NULL || a0[1] > sQuestLogIdx) return FALSE; sQuestLogScriptParsingCBs[a0[0] & 0xFFF](a0); @@ -3395,13 +3396,13 @@ static bool8 sub_8113AE8(u16 * a0) } #else NAKED -static bool8 sub_8113AE8(u16 * a0) +static bool8 sub_8113AE8(u16 *a0) { asm_unified("\tpush {r4,lr}\n" "\tadds r4, r0, 0\n" "\tcmp r0, 0\n" "\tbeq _08113AFA\n" - "\tldr r1, _08113B00 @ =gUnknown_203AF98\n" + "\tldr r1, _08113B00 @ =sQuestLogIdx\n" "\tldrh r0, [r0, 0x2]\n" "\tldrh r1, [r1]\n" "\tcmp r0, r1\n" @@ -3410,7 +3411,7 @@ static bool8 sub_8113AE8(u16 * a0) "\tmovs r0, 0\n" "\tb _08113B32\n" "\t.align 2, 0\n" - "_08113B00: .4byte gUnknown_203AF98\n" + "_08113B00: .4byte sQuestLogIdx\n" "_08113B04:\n" "\tldr r2, _08113B38 @ =sQuestLogScriptParsingCBs\n" "\tldrh r1, [r4]\n" @@ -3446,7 +3447,7 @@ static bool8 sub_8113AE8(u16 * a0) } #endif -static bool8 sub_8113B44(u16 * a0) +static bool8 sub_8113B44(u16 *a0) { if (gUnknown_203B044.unk_2 == 0) return FALSE; @@ -3465,11 +3466,11 @@ static void sub_8113B88(void) static void sub_8113B94(u16 a0) { - if (gUnknown_203B044.unk_0 != (u8)a0 || gUnknown_203B044.unk_2 != gUnknown_203AF98) + if (gUnknown_203B044.unk_0 != (u8)a0 || gUnknown_203B044.unk_2 != sQuestLogIdx) { gUnknown_203B044.unk_0 = a0; gUnknown_203B044.unk_1 = 0; - gUnknown_203B044.unk_2 = gUnknown_203AF98; + gUnknown_203B044.unk_2 = sQuestLogIdx; } else if (gUnknown_203B044.unk_1 < 5) gUnknown_203B044.unk_1++; @@ -3482,17 +3483,17 @@ static void sub_8113BD8(void) gUnknown_203B04B = 0; } -static u16 * sub_8113BF4(u16 * a0) +static u16 *sub_8113BF4(u16 *a0) { - if (!sub_8110988(a0, gUnknown_8456AA0[39])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[39])) return NULL; a0[0] = 39; return a0 + 1; } -static u16 * sub_8113C20(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113C20(u16 *a0, struct UnkStruct_203AE98 * a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[39])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[39])) return NULL; a1->unk_6 = 0xFF; a1->unk_4 = 0; @@ -3503,18 +3504,18 @@ static u16 * sub_8113C20(u16 * a0, struct UnkStruct_203AE98 * a1) return a0 + 1; } -static u16 * sub_8113C5C(u16 * a0, u16 a1) +static u16 *sub_8113C5C(u16 *a0, u16 a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[41])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[41])) return NULL; a0[0] = 41; a0[1] = a1; return a0 + 2; } -static u16 * sub_8113C8C(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113C8C(u16 *a0, struct UnkStruct_203AE98 * a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[41])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[41])) return NULL; a1->unk_6 = 0xFE; a1->unk_4 = a0[1]; @@ -3525,11 +3526,11 @@ static u16 * sub_8113C8C(u16 * a0, struct UnkStruct_203AE98 * a1) return a0 + 2; } -static u16 * sub_8113CC8(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113CC8(u16 *a0, struct UnkStruct_203AE98 * a1) { - u8 * r6 = (u8 *)a0 + 4; + u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(a0, gUnknown_8456AA0[0])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[0])) return NULL; a0[0] = 0; a0[1] = a1->unk_4; @@ -3540,11 +3541,11 @@ static u16 * sub_8113CC8(u16 * a0, struct UnkStruct_203AE98 * a1) return (u16 *)(r6 + 4); } -static u16 * sub_8113D08(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113D08(u16 *a0, struct UnkStruct_203AE98 * a1) { - u8 * r6 = (u8 *)a0 + 4; + u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(a0, gUnknown_8456AA0[0])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[0])) return NULL; a1->unk_6 = 2; a1->unk_4 = a0[1]; @@ -3555,12 +3556,12 @@ static u16 * sub_8113D08(u16 * a0, struct UnkStruct_203AE98 * a1) return (u16 *)(r6 + 4); } -static u16 * sub_8113D48(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113D48(u16 *a0, struct UnkStruct_203AE98 * a1) { - u16 * r4 = a0; - u8 * r6 = (u8 *)a0 + 4; + u16 *r4 = a0; + u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(r4, gUnknown_8456AA0[2])) + if (!sub_8110988(r4, sQuestLogEventCmdSizes[2])) return NULL; if (a1->unk_6 == 0) r4[0] = 2; @@ -3574,12 +3575,12 @@ static u16 * sub_8113D48(u16 * a0, struct UnkStruct_203AE98 * a1) return (u16 *)(r6 + 4); } -static u16 * sub_8113D94(u16 * a0, struct UnkStruct_203AE98 * a1) +static u16 *sub_8113D94(u16 *a0, struct UnkStruct_203AE98 * a1) { - u16 * r5 = a0; - u8 * r6 = (u8 *)a0 + 4; + u16 *r5 = a0; + u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(r5, gUnknown_8456AA0[2])) + if (!sub_8110988(r5, sQuestLogEventCmdSizes[2])) return NULL; if (r5[0] == 2) a1->unk_6 = 0; @@ -3593,17 +3594,17 @@ static u16 * sub_8113D94(u16 * a0, struct UnkStruct_203AE98 * a1) return (u16 *)(r6 + 4); } -u16 * sub_8113DE0(u16 a0, u16 * a1) +u16 *sub_8113DE0(u16 a0, u16 *a1) { u8 r6; - u16 * r5; + u16 *r5; u8 r4; u8 r1; if (gUnknown_203B044.unk_1 == 0) - r6 = gUnknown_8456AA0[a0]; + r6 = sQuestLogEventCmdSizes[a0]; else - r6 = gUnknown_8456AA0[a0] - 4; + r6 = sQuestLogEventCmdSizes[a0] - 4; if (!sub_8110944(a1, r6)) return NULL; @@ -3628,21 +3629,18 @@ u16 * sub_8113DE0(u16 a0, u16 * a1) r1 = gUnknown_203B044.unk_1; r5[0] = a0 + (r1 << 12); - r5[1] = gUnknown_203AF98; + r5[1] = sQuestLogIdx; r5 = (void *)r5 + (r1 * r6 + 4); return r5; } -static const u16 * sub_8113E88(u16 a0, const u16 * a1) +static const u16 *sub_8113E88(u16 a0, const u16 *a1) { - a1 = (const void *)a1 + (gUnknown_203B044.unk_2 * (gUnknown_8456AA0[a0] - 4) + 4); + a1 = (const void *)a1 + (gUnknown_203B044.unk_2 * (sQuestLogEventCmdSizes[a0] - 4) + 4); return a1; } -// TODO: delete this declaration once data_83FECCC.s is decompiled -extern const u8 gText_EggNickname[]; - -void QuestLog_AutoGetSpeciesName(u16 a0, u8 * a1, u8 a2) +void QuestLog_AutoGetSpeciesName(u16 a0, u8 *a1, u8 a2) { if (a1 != NULL) { @@ -3660,9 +3658,9 @@ void QuestLog_AutoGetSpeciesName(u16 a0, u8 * a1, u8 a2) } } -static u16 * sub_8113F14(u16 * a0, const u16 * a1) +static u16 *sub_8113F14(u16 *a0, const u16 *a1) { - u16 * r2 = sub_8113DE0(3, a0); + u16 *r2 = sub_8113DE0(3, a0); if (r2 == NULL) return NULL; @@ -3671,9 +3669,9 @@ static u16 * sub_8113F14(u16 * a0, const u16 * a1) return r2 + 2; } -static const u16 * sub_8113F3C(const u16 * a0) +static const u16 *sub_8113F3C(const u16 *a0) { - const u16 * r4 = sub_8113E88(3, a0); + const u16 *r4 = sub_8113E88(3, a0); QuestLog_AutoGetSpeciesName(r4[0], gStringVar1, 0); QuestLog_AutoGetSpeciesName(r4[1], gStringVar2, 0); StringExpandPlaceholders(gStringVar4, gUnknown_841A16F); @@ -3681,9 +3679,9 @@ static const u16 * sub_8113F3C(const u16 * a0) return r4; } -static u16 * sub_8113F80(u16 * a0, const u16 * a1) +static u16 *sub_8113F80(u16 *a0, const u16 *a1) { - u16 * r2 = sub_8113DE0(4, a0); + u16 *r2 = sub_8113DE0(4, a0); if (r2 == NULL) return NULL; @@ -3697,61 +3695,61 @@ static u16 * sub_8113F80(u16 * a0, const u16 * a1) return r2 + 3; } -static const u16 * sub_8113FBC(const u16 * a0) +static const u16 *sub_8113FBC(const u16 *a0) { - const u16 * r5 = sub_8113E88(4, a0); + const u16 *r5 = sub_8113E88(4, a0); switch (ItemId_GetPocket(r5[0])) { - case POCKET_ITEMS: - case POCKET_POKE_BALLS: - case POCKET_BERRY_POUCH: - StringCopy(gStringVar1, ItemId_GetName(r5[0])); - if (r5[0] == ITEM_ESCAPE_ROPE) - { - sub_80C4DF8(gStringVar2, r5[2]); - StringExpandPlaceholders(gStringVar4, gUnknown_841AFA6); - } - else if (r5[1] != 0xFFFF) - { - QuestLog_AutoGetSpeciesName(r5[1], gStringVar2, 0); - StringExpandPlaceholders(gStringVar4, gUnknown_841A1E7); - } + case POCKET_ITEMS: + case POCKET_POKE_BALLS: + case POCKET_BERRY_POUCH: + StringCopy(gStringVar1, ItemId_GetName(r5[0])); + if (r5[0] == ITEM_ESCAPE_ROPE) + { + sub_80C4DF8(gStringVar2, r5[2]); + StringExpandPlaceholders(gStringVar4, gUnknown_841AFA6); + } + else if (r5[1] != 0xFFFF) + { + QuestLog_AutoGetSpeciesName(r5[1], gStringVar2, 0); + StringExpandPlaceholders(gStringVar4, gUnknown_841A1E7); + } + else + { + StringExpandPlaceholders(gStringVar4, gUnknown_841A210); + } + break; + case POCKET_KEY_ITEMS: + StringCopy(gStringVar1, ItemId_GetName(r5[0])); + StringExpandPlaceholders(gStringVar4, gUnknown_841A220); + break; + case POCKET_TM_CASE: + QuestLog_AutoGetSpeciesName(r5[1], gStringVar1, 0); + StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(r5[0])]); + if (r5[2] != 0xFFFF) + { + StringCopy(gStringVar3, gMoveNames[r5[2]]); + if (r5[0] > ITEM_TM50) + StringExpandPlaceholders(gStringVar4, gUnknown_841A965); else - { - StringExpandPlaceholders(gStringVar4, gUnknown_841A210); - } - break; - case POCKET_KEY_ITEMS: - StringCopy(gStringVar1, ItemId_GetName(r5[0])); - StringExpandPlaceholders(gStringVar4, gUnknown_841A220); - break; - case POCKET_TM_CASE: - QuestLog_AutoGetSpeciesName(r5[1], gStringVar1, 0); - StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(r5[0])]); - if (r5[2] != 0xFFFF) - { - StringCopy(gStringVar3, gMoveNames[r5[2]]); - if (r5[0] > ITEM_TM50) - StringExpandPlaceholders(gStringVar4, gUnknown_841A965); - else - StringExpandPlaceholders(gStringVar4, gUnknown_841A277); - } + StringExpandPlaceholders(gStringVar4, gUnknown_841A277); + } + else + { + if (r5[0] > ITEM_TM50) + StringExpandPlaceholders(gStringVar4, gUnknown_841A938); else - { - if (r5[0] > ITEM_TM50) - StringExpandPlaceholders(gStringVar4, gUnknown_841A938); - else - StringExpandPlaceholders(gStringVar4, gUnknown_841A255); - } - break; + StringExpandPlaceholders(gStringVar4, gUnknown_841A255); + } + break; } return r5 + 3; } -u16 * sub_811414C(u16 a0, u16 * a1, const u16 * a2) +u16 *sub_811414C(u16 a0, u16 *a1, const u16 *a2) { - u16 * r1 = sub_8113DE0(a0, a1); + u16 *r1 = sub_8113DE0(a0, a1); if (r1 == NULL) return NULL; @@ -3760,14 +3758,14 @@ u16 * sub_811414C(u16 a0, u16 * a1, const u16 * a2) return r1 + 2; } -static u16 * sub_8114174(u16 * a0, const u16 * a1) +static u16 *sub_8114174(u16 *a0, const u16 *a1) { return sub_811414C(5, a0, a1); } -static const u16 * sub_8114188(const u16 * a0) +static const u16 *sub_8114188(const u16 *a0) { - const u16 * r4 = sub_8113E88(5, a0); + const u16 *r4 = sub_8113E88(5, a0); QuestLog_AutoGetSpeciesName(r4[1], gStringVar1, 0); StringCopy(gStringVar2, ItemId_GetName(r4[0])); StringExpandPlaceholders(gStringVar4, gUnknown_841AB74); @@ -3775,14 +3773,14 @@ static const u16 * sub_8114188(const u16 * a0) return r4; } -static u16 * sub_81141D0(u16 * a0, const u16 * a1) +static u16 *sub_81141D0(u16 *a0, const u16 *a1) { return sub_811414C(6, a0, a1); } -static const u16 * sub_81141E4(const u16 * a0) +static const u16 *sub_81141E4(const u16 *a0) { - const u16 * r4 = sub_8113E88(6, a0); + const u16 *r4 = sub_8113E88(6, a0); QuestLog_AutoGetSpeciesName(r4[1], gStringVar1, 0); StringCopy(gStringVar2, ItemId_GetName(r4[0])); @@ -3791,14 +3789,14 @@ static const u16 * sub_81141E4(const u16 * a0) return r4; } -static u16 * sub_811422C(u16 * a0, const u16 * a1) +static u16 *sub_811422C(u16 *a0, const u16 *a1) { return sub_811414C(7, a0, a1); } -static const u16 * sub_8114240(const u16 * a0) +static const u16 *sub_8114240(const u16 *a0) { - const u16 * r4 = sub_8113E88(7, a0); + const u16 *r4 = sub_8113E88(7, a0); QuestLog_AutoGetSpeciesName(r4[1], gStringVar2, 0); StringCopy(gStringVar1, ItemId_GetName(r4[0])); @@ -3807,14 +3805,14 @@ static const u16 * sub_8114240(const u16 * a0) return r4; } -static u16 * sub_8114288(u16 * a0, const u16 * a1) +static u16 *sub_8114288(u16 *a0, const u16 *a1) { return sub_811414C(8, a0, a1); } -static const u16 * sub_811429C(const u16 * a0) +static const u16 *sub_811429C(const u16 *a0) { - const u16 * r4 = sub_8113E88(8, a0); + const u16 *r4 = sub_8113E88(8, a0); QuestLog_AutoGetSpeciesName(r4[1], gStringVar1, 0); StringCopy(gStringVar2, ItemId_GetName(r4[0])); @@ -3823,9 +3821,9 @@ static const u16 * sub_811429C(const u16 * a0) return r4; } -u16 * sub_81142E4(u16 a0, u16 * a1, const u16 * a2) +u16 *sub_81142E4(u16 a0, u16 *a1, const u16 *a2) { - u16 * r1 = sub_8113DE0(a0, a1); + u16 *r1 = sub_8113DE0(a0, a1); if (r1 == NULL) return NULL; @@ -3835,14 +3833,14 @@ u16 * sub_81142E4(u16 a0, u16 * a1, const u16 * a2) return r1 + 3; } -static u16 * sub_8114310(u16 * a0, const u16 * a1) +static u16 *sub_8114310(u16 *a0, const u16 *a1) { return sub_81142E4(9, a0, a1); } -static const u16 * sub_8114324(const u16 * a0) +static const u16 *sub_8114324(const u16 *a0) { - const u16 * r4 = sub_8113E88(9, a0); + const u16 *r4 = sub_8113E88(9, a0); QuestLog_AutoGetSpeciesName(r4[2], gStringVar1, 0); StringCopy(gStringVar2, ItemId_GetName(r4[0])); StringCopy(gStringVar3, ItemId_GetName(r4[1])); @@ -3851,14 +3849,14 @@ static const u16 * sub_8114324(const u16 * a0) return r4; } -static u16 * sub_8114380(u16 * a0, const u16 * a1) +static u16 *sub_8114380(u16 *a0, const u16 *a1) { return sub_81142E4(10, a0, a1); } -static const u16 * sub_8114394(const u16 * a0) +static const u16 *sub_8114394(const u16 *a0) { - const u16 * r4 = sub_8113E88(10, a0); + const u16 *r4 = sub_8113E88(10, a0); QuestLog_AutoGetSpeciesName(r4[2], gStringVar2, 0); StringCopy(gStringVar3, ItemId_GetName(r4[0])); StringCopy(gStringVar1, ItemId_GetName(r4[1])); @@ -3867,33 +3865,33 @@ static const u16 * sub_8114394(const u16 * a0) return r4; } -static u16 * sub_81143F0(u16 * a0, const u16 * a1) +static u16 *sub_81143F0(u16 *a0, const u16 *a1) { - u16 * r4 = a0; + u16 *r4 = a0; if (gUnknown_203B044.unk_0 == 11 && gUnknown_203B044.unk_1 != 0) return r4; - if (!sub_8110944(a0, gUnknown_8456AA0[11])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[11])) return NULL; r4[0] = 11; - r4[1] = gUnknown_203AF98; + r4[1] = sQuestLogIdx; return r4 + 2; } -static const u16 * sub_811443C(const u16 * a0) +static const u16 *sub_811443C(const u16 *a0) { StringExpandPlaceholders(gStringVar4, gUnknown_841A2B0); a0 += 2; return a0; } -static u16 * sub_811445C(u16 * a0, const u16 * a1) +static u16 *sub_811445C(u16 *a0, const u16 *a1) { - u16 * r4 = a0 + 4; + u16 *r4 = a0 + 4; a0[0] = 12; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; a0[2] = a1[0]; a0[3] = a1[1]; a1 += 2; @@ -3902,9 +3900,9 @@ static u16 * sub_811445C(u16 * a0, const u16 * a1) return r4; } -static const u16 * sub_811448C(const u16 * a0) +static const u16 *sub_811448C(const u16 *a0) { - const u16 * r6 = a0 + 4; + const u16 *r6 = a0 + 4; memset(gStringVar1, EOS, 8); memcpy(gStringVar1, r6, 7); @@ -3935,17 +3933,17 @@ static const u8 *const gUnknown_8456AE4[] = { gUnknown_841AFD1 }; -static u16 * sub_81144EC(u16 * a0, const u16 * a1) +static u16 *sub_81144EC(u16 *a0, const u16 *a1) { a0[0] = 13; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; *((u8 *)a0 + 4) = *((const u8 *)a1 + 0); memcpy((u8 *)a0 + 5, (const u8 *)a1 + 1, 7); a0 += 6; return a0; } -static const u16 * sub_8114518(const u16 * a0) +static const u16 *sub_8114518(const u16 *a0) { DynamicPlaceholderTextUtil_Reset(); @@ -3959,17 +3957,17 @@ static const u16 * sub_8114518(const u16 * a0) return a0; } -static u16 * sub_8114578(u16 * a0, const u16 * a1) +static u16 *sub_8114578(u16 *a0, const u16 *a1) { a0[0] = 14; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; *((u8 *)a0 + 4) = *((const u8 *)a1 + 0); memcpy((u8 *)a0 + 5, (const u8 *)a1 + 1, 7); a0 += 6; return a0; } -static const u16 * sub_81145A4(const u16 * a0) +static const u16 *sub_81145A4(const u16 *a0) { DynamicPlaceholderTextUtil_Reset(); @@ -3983,10 +3981,10 @@ static const u16 * sub_81145A4(const u16 * a0) return a0; } -static u16 * sub_8114604(u16 * a0, const u16 * a1) +static u16 *sub_8114604(u16 *a0, const u16 *a1) { a0[0] = 15; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; *((u8 *)a0 + 4) = *((const u8 *)a1 + 0); memcpy((u8 *)a0 + 5, (const u8 *)a1 + 1, 7); memcpy((u8 *)a0 + 12, (const u8 *)a1 + 8, 7); @@ -3995,7 +3993,7 @@ static u16 * sub_8114604(u16 * a0, const u16 * a1) return a0; } -static const u16 * sub_811464C(const u16 * a0) +static const u16 *sub_811464C(const u16 *a0) { DynamicPlaceholderTextUtil_Reset(); @@ -4018,39 +4016,39 @@ static const u16 * sub_811464C(const u16 * a0) return a0; } -static u16 * sub_8114710(u16 * a0, const u16 * a1) +static u16 *sub_8114710(u16 *a0, const u16 *a1) { a0[0] = 16; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; return a0 + 2; } -static const u16 * sub_8114724(const u16 * a0) +static const u16 *sub_8114724(const u16 *a0) { StringExpandPlaceholders(gStringVar4, gUnknown_841A50B); a0 += 2; return a0; } -static u16 * sub_8114744(u16 * a0, const u16 * a1) +static u16 *sub_8114744(u16 *a0, const u16 *a1) { a0[0] = 17; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; return a0 + 2; } -static const u16 * sub_8114758(const u16 * a0) +static const u16 *sub_8114758(const u16 *a0) { StringExpandPlaceholders(gStringVar4, gUnknown_841A732); a0 += 2; return a0; } -static u16 * sub_8114778(u16 * a0, const u16 * a1) +static u16 *sub_8114778(u16 *a0, const u16 *a1) { - u8 * r4 = (u8 *)(a0 + 4); + u8 *r4 = (u8 *)(a0 + 4); a0[0] = 18; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; a0[2] = a1[0]; a0[3] = a1[1]; memcpy(r4, a1 + 2, 7); @@ -4058,9 +4056,9 @@ static u16 * sub_8114778(u16 * a0, const u16 * a1) return (u16 *)r4; } -static const u16 * sub_81147A8(const u16 * a0) +static const u16 *sub_81147A8(const u16 *a0) { - const u8 * r6 = (const u8 *)(a0 + 4); + const u8 *r6 = (const u8 *)(a0 + 4); memset(gStringVar1, EOS, 8); memcpy(gStringVar1, r6, 7); sub_8115834(gStringVar1); @@ -4071,17 +4069,17 @@ static const u16 * sub_81147A8(const u16 * a0) return (const u16 *)r6; } -static u16 * sub_8114808(u16 * a0, const u16 * a1) +static u16 *sub_8114808(u16 *a0, const u16 *a1) { a0[0] = 19; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; *(u8 *)&a0[2] = *(const u8 *)&a1[0]; memcpy((u8 *)a0 + 5, (const u8 *)a1 + 1, 7); a0 += 6; return a0; } -static const u16 * sub_8114834(const u16 * a0) +static const u16 *sub_8114834(const u16 *a0) { memset(gStringVar1, EOS, 8); memcpy(gStringVar1, (const u8 *)a0 + 5, 7); @@ -4092,7 +4090,7 @@ static const u16 * sub_8114834(const u16 * a0) return a0; } -static u16 * sub_811488C(u16 * a0, const u16 * a1) +static u16 *sub_811488C(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(20, a0); if (a0 == NULL) @@ -4104,9 +4102,9 @@ static u16 * sub_811488C(u16 * a0, const u16 * a1) return a0 + 3; } -static const u16 * sub_81148BC(const u16 * a0) +static const u16 *sub_81148BC(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(20, a0); boxIdxs = (const u8 *)a0 + 4; DynamicPlaceholderTextUtil_Reset(); @@ -4118,7 +4116,7 @@ static const u16 * sub_81148BC(const u16 * a0) return a0 + 3; } -static u16 * sub_8114918(u16 * a0, const u16 * a1) +static u16 *sub_8114918(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(21, a0); if (a0 == NULL) @@ -4129,9 +4127,9 @@ static u16 * sub_8114918(u16 * a0, const u16 * a1) return a0 + 3; } -static const u16 * sub_8114944(const u16 * a0) +static const u16 *sub_8114944(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(21, a0); boxIdxs = (const u8 *)a0 + 4; DynamicPlaceholderTextUtil_Reset(); @@ -4142,10 +4140,10 @@ static const u16 * sub_8114944(const u16 * a0) return a0 + 3; } -static u16 * sub_8114990(u16 * a0, const u16 * a1) +static u16 *sub_8114990(u16 *a0, const u16 *a1) { - u16 * r2; - u16 * ret; + u16 *r2; + u16 *ret; r2 = sub_8113DE0(22, a0); if (r2 == NULL) return NULL; @@ -4165,9 +4163,9 @@ static u16 * sub_8114990(u16 * a0, const u16 * a1) return ret + 1; } -static const u16 * sub_81149D0(const u16 * a0) +static const u16 *sub_81149D0(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(22, a0); boxIdxs = (const u8 *)a0 + 4; DynamicPlaceholderTextUtil_Reset(); @@ -4178,10 +4176,10 @@ static const u16 * sub_81149D0(const u16 * a0) return a0 + 3; } -static u16 * sub_8114A1C(u16 * a0, const u16 * a1) +static u16 *sub_8114A1C(u16 *a0, const u16 *a1) { - u16 * r2; - u16 * ret; + u16 *r2; + u16 *ret; r2 = sub_8113DE0(23, a0); if (r2 == NULL) return NULL; @@ -4192,9 +4190,9 @@ static u16 * sub_8114A1C(u16 * a0, const u16 * a1) return ret + 1; } -static const u16 * sub_8114A4C(const u16 * a0) +static const u16 *sub_8114A4C(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(23, a0); boxIdxs = (const u8 *)a0 + 2; DynamicPlaceholderTextUtil_Reset(); @@ -4205,9 +4203,9 @@ static const u16 * sub_8114A4C(const u16 * a0) return (const u16 *)boxIdxs + 1; } -static u16 * sub_8114AA0(u16 * a0, const u16 * a1) +static u16 *sub_8114AA0(u16 *a0, const u16 *a1) { - u16 * r2; + u16 *r2; r2 = sub_8113DE0(24, a0); if (r2 == NULL) return NULL; @@ -4216,9 +4214,9 @@ static u16 * sub_8114AA0(u16 * a0, const u16 * a1) return r2 + 2; } -static const u16 * sub_8114AC8(const u16 * a0) +static const u16 *sub_8114AC8(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(24, a0); boxIdxs = (const u8 *)a0 + 2; DynamicPlaceholderTextUtil_Reset(); @@ -4228,9 +4226,9 @@ static const u16 * sub_8114AC8(const u16 * a0) return (const u16 *)boxIdxs + 1; } -static u16 * sub_8114B0C(u16 * a0, const u16 * a1) +static u16 *sub_8114B0C(u16 *a0, const u16 *a1) { - u16 * r2; + u16 *r2; r2 = sub_8113DE0(25, a0); if (r2 == NULL) return NULL; @@ -4239,9 +4237,9 @@ static u16 * sub_8114B0C(u16 * a0, const u16 * a1) return r2 + 2; } -static const u16 * sub_8114B34(const u16 * a0) +static const u16 *sub_8114B34(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(25, a0); boxIdxs = (const u8 *)a0 + 2; DynamicPlaceholderTextUtil_Reset(); @@ -4251,9 +4249,9 @@ static const u16 * sub_8114B34(const u16 * a0) return (const u16 *)boxIdxs + 1; } -static u16 * sub_8114B78(u16 * a0, const u16 * a1) +static u16 *sub_8114B78(u16 *a0, const u16 *a1) { - u16 * r2; + u16 *r2; r2 = sub_8113DE0(26, a0); if (r2 == NULL) return NULL; @@ -4262,9 +4260,9 @@ static u16 * sub_8114B78(u16 * a0, const u16 * a1) return r2 + 2; } -static const u16 * sub_8114BA0(const u16 * a0) +static const u16 *sub_8114BA0(const u16 *a0) { - const u8 * boxIdxs; + const u8 *boxIdxs; a0 = sub_8113E88(26, a0); boxIdxs = (const u8 *)a0 + 2; DynamicPlaceholderTextUtil_Reset(); @@ -4274,9 +4272,9 @@ static const u16 * sub_8114BA0(const u16 * a0) return (const u16 *)boxIdxs + 1; } -static u16 * sub_8114BE4(u16 * a0, const u16 * a1) +static u16 *sub_8114BE4(u16 *a0, const u16 *a1) { - u16 * r2; + u16 *r2; r2 = sub_8113DE0(27, a0); if (r2 == NULL) return NULL; @@ -4285,7 +4283,7 @@ static u16 * sub_8114BE4(u16 * a0, const u16 * a1) return r2 + 1; } -static const u16 * sub_8114C0C(const u16 * a0) +static const u16 *sub_8114C0C(const u16 *a0) { const u16 *r4 = sub_8113E88(27, a0); DynamicPlaceholderTextUtil_Reset(); @@ -4298,7 +4296,7 @@ static const u16 * sub_8114C0C(const u16 * a0) return r4 + 1; } -static u16 * sub_8114C68(u16 * a0, const u16 * a1) +static u16 *sub_8114C68(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(28, a0); if (a0 == NULL) @@ -4307,7 +4305,7 @@ static u16 * sub_8114C68(u16 * a0, const u16 * a1) return a0 + 1; } -static const u16 * sub_8114C8C(const u16 * a0) +static const u16 *sub_8114C8C(const u16 *a0) { const u16 *r4 = sub_8113E88(28, a0); CopyItemName(r4[0], gStringVar1); @@ -4315,7 +4313,7 @@ static const u16 * sub_8114C8C(const u16 * a0) return r4 + 1; } -static u16 * sub_8114CC0(u16 * a0, const u16 * a1) +static u16 *sub_8114CC0(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(29, a0); if (a0 == NULL) @@ -4324,7 +4322,7 @@ static u16 * sub_8114CC0(u16 * a0, const u16 * a1) return a0 + 1; } -static const u16 * sub_8114CE4(const u16 * a0) +static const u16 *sub_8114CE4(const u16 *a0) { const u16 *r4 = sub_8113E88(29, a0); CopyItemName(r4[0], gStringVar1); @@ -4332,7 +4330,7 @@ static const u16 * sub_8114CE4(const u16 * a0) return r4 + 1; } -u16 * sub_8114D18(u16 a0, u16 * a1, const u16 * a2) +u16 *sub_8114D18(u16 a0, u16 *a1, const u16 *a2) { a1 = sub_8113DE0(a0, a1); if (a1 == NULL) @@ -4345,15 +4343,15 @@ u16 * sub_8114D18(u16 a0, u16 * a1, const u16 * a2) return a1 + 4; } -static u16 * sub_8114D4C(u16 * a0, const u16 * a1) +static u16 *sub_8114D4C(u16 *a0, const u16 *a1) { gUnknown_203B048 = TRUE; return sub_8114D18(30, a0, a1); } -static const u16 * sub_8114D68(const u16 * a0) +static const u16 *sub_8114D68(const u16 *a0) { - const u8 * r6; + const u8 *r6; a0 = sub_8113E88(30, a0); r6 = (const u8 *)a0 + 6; DynamicPlaceholderTextUtil_Reset(); @@ -4367,16 +4365,16 @@ static const u16 * sub_8114D68(const u16 * a0) return a0 + 4; } -static u16 * sub_8114DE8(u16 * a0, const u16 * a1) +static u16 *sub_8114DE8(u16 *a0, const u16 *a1) { - u16 * r4 = a0; - u8 * r5 = (u8 *)a0 + 8; - if (!sub_8110944(r4, gUnknown_8456AA0[31])) + u16 *r4 = a0; + u8 *r5 = (u8 *)a0 + 8; + if (!sub_8110944(r4, sQuestLogEventCmdSizes[31])) return NULL; if (r5[0] == 0 && r5[1] == 0) { r4[0] = 31; - r4[1] = gUnknown_203AF98; + r4[1] = sQuestLogIdx; } if (a1[0]) r4[2] = a1[0]; @@ -4390,10 +4388,10 @@ static u16 * sub_8114DE8(u16 * a0, const u16 * a1) return (u16 *)(r5 + 4); } -static const u16 * sub_8114E68(const u16 * a0) +static const u16 *sub_8114E68(const u16 *a0) { - const u8 * r6; - if (!sub_8110944(a0, gUnknown_8456AA0[31])) + const u8 *r6; + if (!sub_8110944(a0, sQuestLogEventCmdSizes[31])) return NULL; r6 = (const u8 *)a0 + 8; @@ -4442,24 +4440,24 @@ static bool8 sub_8114FBC(u16 a0) { switch (a0) { - case 0x96: - case 0x8F ... 0x92: - case 0xF9 ... 0xFA: - case 0x19A: - return TRUE; + case 0x96: + case 0x8F ... 0x92: + case 0xF9 ... 0xFA: + case 0x19A: + return TRUE; } return FALSE; } -static u16 * sub_8114FF0(u16 * a0, const u16 * a1) +static u16 *sub_8114FF0(u16 *a0, const u16 *a1) { gUnknown_203B048 = TRUE; return sub_8114D18(32, a0, a1); } -static const u16 * sub_811500C(const u16 * a0) +static const u16 *sub_811500C(const u16 *a0) { - const u8 * r5; + const u8 *r5; a0 = sub_8113E88(32, a0); r5 = (const u8 *)a0 + 6; DynamicPlaceholderTextUtil_Reset(); @@ -4471,12 +4469,12 @@ static const u16 * sub_811500C(const u16 * a0) return a0 + 4; } -static u16 * sub_8115078(u16 * a0, const u16 * a1) +static u16 *sub_8115078(u16 *a0, const u16 *a1) { - if (!sub_8110944(a0, gUnknown_8456AA0[33])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[33])) return NULL; a0[0] = 0x2021; - a0[1] = gUnknown_203AF98; + a0[1] = sQuestLogIdx; a0[2] = a1[1]; a0[3] = a1[2]; *((u8 *)a0 + 8) = *((const u8 *)a1 + 6); @@ -4484,10 +4482,10 @@ static u16 * sub_8115078(u16 * a0, const u16 * a1) return a0 + 5; } -static const u16 * sub_81150CC(const u16 * a0) +static const u16 *sub_81150CC(const u16 *a0) { - const u8 * r5; - if (!sub_8110944(a0, gUnknown_8456AA0[33])) + const u8 *r5; + if (!sub_8110944(a0, sQuestLogEventCmdSizes[33])) return NULL; r5 = (const u8 *)a0 + 8; @@ -4495,36 +4493,36 @@ static const u16 * sub_81150CC(const u16 * a0) switch (gUnknown_203B044.unk_2) { - case 0: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock2Ptr->playerName); - DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gSaveBlock1Ptr->rivalName); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A2E1); - break; - case 1: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock1Ptr->rivalName); - QuestLog_AutoGetSpeciesName(a0[2], NULL, 1); - DynamicPlaceholderTextUtil_SetPlaceholderPtr(2, gSaveBlock2Ptr->playerName); - QuestLog_AutoGetSpeciesName(a0[3], NULL, 3); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A312); - break; - case 2: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_8456AD8[r5[0]]); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A349); - break; + case 0: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock2Ptr->playerName); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gSaveBlock1Ptr->rivalName); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A2E1); + break; + case 1: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock1Ptr->rivalName); + QuestLog_AutoGetSpeciesName(a0[2], NULL, 1); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(2, gSaveBlock2Ptr->playerName); + QuestLog_AutoGetSpeciesName(a0[3], NULL, 3); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A312); + break; + case 2: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_8456AD8[r5[0]]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A349); + break; } return (const u16 *)(r5 + 2); } -static u16 * sub_81151C0(u16 * a0, const u16 * a1) +static u16 *sub_81151C0(u16 *a0, const u16 *a1) { gUnknown_203B048 = TRUE; return sub_8114D18(34, a0, a1); } -static const u16 * sub_81151DC(const u16 * a0) +static const u16 *sub_81151DC(const u16 *a0) { - const u16 * r5 = sub_8113E88(34, a0); - const u8 * r6 = (const u8 *)r5 + 6; + const u16 *r5 = sub_8113E88(34, a0); + const u8 *r6 = (const u8 *)r5 + 6; DynamicPlaceholderTextUtil_Reset(); sub_80C4DF8(gStringVar1, r6[0]); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); @@ -4544,155 +4542,155 @@ static const u16 * sub_81151DC(const u16 * a0) } static const u8 *const gUnknown_8456AF0[] = { - gUnknown_841B09F, - gUnknown_841B0A4, - gUnknown_841B0B5, - gUnknown_841B0B9, - gUnknown_841B0B9, - gUnknown_841B0CD, - gUnknown_841B0CD, - gUnknown_841B0DD, - gUnknown_841B0B5, - gUnknown_841B0F6, - gUnknown_841B0F6, - gUnknown_841B0B5, - gUnknown_841B0FF, - gUnknown_841B109, - gUnknown_841B116, - gUnknown_841B11F, - gUnknown_841B11F, - gUnknown_841B130, - gUnknown_841B0B5, - gUnknown_841B141, - gUnknown_841B14B, - gUnknown_841B14B, - gUnknown_841B15A, - gUnknown_841B15A, - gUnknown_841B166, - gUnknown_841B172, - gUnknown_841B180, - gUnknown_841B190, - gUnknown_841B11F, - gUnknown_841B11F, - gUnknown_841B1A3, - gUnknown_841B1B7, - gUnknown_841B1C7, - gUnknown_841B0B5, - gUnknown_841B1DA, - gUnknown_841B1E5, - gUnknown_841B1F4, - gUnknown_841B0B5, - gUnknown_841B200, - gUnknown_841B20E, - gUnknown_841B0B5, - gUnknown_841B21C, - gUnknown_841B226, - gUnknown_841B226, - gUnknown_841B236, - gUnknown_841B0B5, - gUnknown_841B246, - gUnknown_841B25B, - gUnknown_841B25B, - gUnknown_841B268, - gUnknown_841B277 + gQuestLogString_Home, + gQuestLogString_OakResearchLab, + gQuestLogString_Gym, + gQuestLogString_PokemonLeagueGate, + gQuestLogString_PokemonLeagueGate, + gQuestLogString_ViridianForest, + gQuestLogString_ViridianForest, + gQuestLogString_PewterMuseumOfScience, + gQuestLogString_Gym, + gQuestLogString_MtMoon, + gQuestLogString_MtMoon, + gQuestLogString_Gym, + gQuestLogString_BikeShop, + gQuestLogString_BillSHouse, + gQuestLogString_DayCare, + gQuestLogString_UndergroundPath, + gQuestLogString_UndergroundPath, + gQuestLogString_PokemonFanClub, + gQuestLogString_Gym, + gQuestLogString_SSAnne, + gQuestLogString_DiglettSCave, + gQuestLogString_DiglettSCave, + gQuestLogString_RockTunnel, + gQuestLogString_RockTunnel, + gQuestLogString_PowerPlant, + gQuestLogString_PokemonTower, + gQuestLogString_VolunteerHouse, + gQuestLogString_NameRaterSHouse, + gQuestLogString_UndergroundPath, + gQuestLogString_UndergroundPath, + gQuestLogString_CeladonDeptStore, + gQuestLogString_CeladonMansion, + gQuestLogString_RocketGameCorner, + gQuestLogString_Gym, + gQuestLogString_Restaurant, + gQuestLogString_RocketHideout, + gQuestLogString_SafariZone, + gQuestLogString_Gym, + gQuestLogString_WardenSHome, + gQuestLogString_FightingDojo, + gQuestLogString_Gym, + gQuestLogString_SilphCo, + gQuestLogString_SeafoamIslands, + gQuestLogString_SeafoamIslands, + gQuestLogString_PokemonMansion, + gQuestLogString_Gym, + gQuestLogString_PokemonResearchLab, + gQuestLogString_VictoryRoad, + gQuestLogString_VictoryRoad, + gQuestLogString_PokemonLeague, + gQuestLogString_CeruleanCave }; static const u8 *const gUnknown_8456BBC[] = { - gUnknown_841A53A, - gUnknown_841AD9E, - gUnknown_841ADC8, - gUnknown_841ADFF, - gUnknown_841AE1E, - gUnknown_841AE48, - gUnknown_841AEA7, - gUnknown_841AEDC, - gUnknown_841AFD6, - gUnknown_841B005 + gUnknown_841A53A, + gUnknown_841AD9E, + gUnknown_841ADC8, + gUnknown_841ADFF, + gUnknown_841AE1E, + gUnknown_841AE48, + gUnknown_841AEA7, + gUnknown_841AEDC, + gUnknown_841AFD6, + gUnknown_841B005 }; static const u8 gUnknown_8456BE4[] = { - 0x03, - 0x04, - 0x05, - 0x08, - 0x08, - 0x07, - 0x07, - 0x01, - 0x05, - 0x07, - 0x07, - 0x05, - 0x00, - 0x00, - 0x00, - 0x08, - 0x08, - 0x00, - 0x05, - 0x08, - 0x07, - 0x07, - 0x07, - 0x07, - 0x08, - 0x08, - 0x00, - 0x00, - 0x08, - 0x08, - 0x00, - 0x00, - 0x02, - 0x05, - 0x00, - 0x08, - 0x06, - 0x05, - 0x00, - 0x00, - 0x05, - 0x09, - 0x07, - 0x07, - 0x09, - 0x05, - 0x00, - 0x07, - 0x07, - 0x08, - 0x07 + 0x03, + 0x04, + 0x05, + 0x08, + 0x08, + 0x07, + 0x07, + 0x01, + 0x05, + 0x07, + 0x07, + 0x05, + 0x00, + 0x00, + 0x00, + 0x08, + 0x08, + 0x00, + 0x05, + 0x08, + 0x07, + 0x07, + 0x07, + 0x07, + 0x08, + 0x08, + 0x00, + 0x00, + 0x08, + 0x08, + 0x00, + 0x00, + 0x02, + 0x05, + 0x00, + 0x08, + 0x06, + 0x05, + 0x00, + 0x00, + 0x05, + 0x09, + 0x07, + 0x07, + 0x09, + 0x05, + 0x00, + 0x07, + 0x07, + 0x08, + 0x07 }; static const u8 gUnknown_8456C17[] = { - 0x5a, - 0x5b, - 0x5d, - 0x5e, - 0x5f, - 0x62, - 0x60, - 0x59 + 0x5a, + 0x5b, + 0x5d, + 0x5e, + 0x5f, + 0x62, + 0x60, + 0x59 }; static const u8 *const gUnknown_8456C20[] = { - gUnknown_841AC51, - gUnknown_841ABAB, - gUnknown_841ABCD, - gUnknown_841AC2A, - gUnknown_841ABF9, - gUnknown_841AC93, - gUnknown_841ACBC, - gUnknown_841AD69, - gUnknown_841AD1D, - gUnknown_841A90C, - gUnknown_841A8E0, - gUnknown_841AD3C + gUnknown_841AC51, + gUnknown_841ABAB, + gUnknown_841ABCD, + gUnknown_841AC2A, + gUnknown_841ABF9, + gUnknown_841AC93, + gUnknown_841ACBC, + gUnknown_841AD69, + gUnknown_841AD1D, + gUnknown_841A90C, + gUnknown_841A8E0, + gUnknown_841AD3C }; -static u16 * sub_8115280(u16 * a0, const u16 * a1) +static u16 *sub_8115280(u16 *a0, const u16 *a1) { - u16 * r2 = sub_8113DE0(35, a0); + u16 *r2 = sub_8113DE0(35, a0); if (r2 == NULL) return NULL; *((u8 *)r2 + 0) = *((const u8 *)a1 + 0); @@ -4701,11 +4699,11 @@ static u16 * sub_8115280(u16 * a0, const u16 * a1) return r2 + 1; } -static const u16 * sub_81152BC(const u16 * a0) +static const u16 *sub_81152BC(const u16 *a0) { u8 r4, r6; - const u16 * r5 = sub_8113E88(35, a0); - const u8 * r5_2 = (const u8 *)r5 + 0; + const u16 *r5 = sub_8113E88(35, a0); + const u8 *r5_2 = (const u8 *)r5 + 0; r6 = r5_2[1]; sub_80C4DF8(gStringVar1, r5_2[0]); StringCopy(gStringVar2, gUnknown_8456AF0[r6]); @@ -4715,7 +4713,7 @@ static const u16 * sub_81152BC(const u16 * a0) { if (r5_2[0] != gUnknown_8456C17[r4]) continue; - if (FlagGet(0x820 + r4) == TRUE) + if (FlagGet(FLAG_BADGE01_GET + r4) == TRUE) StringExpandPlaceholders(gStringVar4, gUnknown_841AE8F); else StringExpandPlaceholders(gStringVar4, gUnknown_841AE48); @@ -4735,7 +4733,7 @@ void sub_811539C(void) gUnknown_203B04B = TRUE; } -static bool8 sub_81153A8(u16 a0, u16 * a1) +static bool8 sub_81153A8(u16 a0, u16 *a1) { if (a0 != 35) { @@ -4748,7 +4746,7 @@ static bool8 sub_81153A8(u16 a0, u16 * a1) return TRUE; } -static bool8 sub_81153E4(u16 a0, u16 * a1) +static bool8 sub_81153E4(u16 a0, u16 *a1) { if (a0 != 35) return TRUE; @@ -4758,9 +4756,9 @@ static bool8 sub_81153E4(u16 a0, u16 * a1) return TRUE; } -static u16 * sub_8115410(u16 * a0, const u16 * a1) +static u16 *sub_8115410(u16 *a0, const u16 *a1) { - u8 * r3; + u8 *r3; a0 = sub_8113DE0(36, a0); if (a0 == NULL) return NULL; @@ -4775,17 +4773,17 @@ static u16 * sub_8115410(u16 * a0, const u16 * a1) return (u16 *)(r3 + 2); } -static const u16 * sub_8115460(const u16 * a0) +static const u16 *sub_8115460(const u16 *a0) { - const u16 * r4 = sub_8113E88(36, a0); - const u8 * r5 = (const u8 *)r4 + 2; + const u16 *r4 = sub_8113E88(36, a0); + const u8 *r5 = (const u8 *)r4 + 2; QuestLog_AutoGetSpeciesName(r4[0], gStringVar1, 0); if (r5[1] != 0xFF) sub_80C4DF8(gStringVar2, r5[1]); if (r5[0] == 7) { if (r5[1] == 0x58) - StringCopy(gStringVar3, gUnknown_841B09F); + StringCopy(gStringVar3, gQuestLogString_Home); else StringCopy(gStringVar3, gUnknown_8418C1B); } @@ -4793,7 +4791,7 @@ static const u16 * sub_8115460(const u16 * a0) return (const u16 *)(r5 + 2); } -static u16 * sub_81154DC(u16 * a0, const u16 * a1) +static u16 *sub_81154DC(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(37, a0); if (a0 == NULL) @@ -4807,10 +4805,10 @@ static u16 * sub_81154DC(u16 * a0, const u16 * a1) return a0 + 5; } -static const u16 * sub_8115518(const u16 * a0) +static const u16 *sub_8115518(const u16 *a0) { - const u16 * r4 = sub_8113E88(37, a0); - const u8 * r7 = (const u8 *)r4 + 8; + const u16 *r4 = sub_8113E88(37, a0); + const u8 *r7 = (const u8 *)r4 + 8; u32 r6 = (r4[2] << 16) + r4[3]; DynamicPlaceholderTextUtil_Reset(); sub_80C4DF8(gStringVar1, r7[0]); @@ -4827,7 +4825,7 @@ static const u16 * sub_8115518(const u16 * a0) return (const u16 *)(r7 + 2); } -static u16 * sub_81155A4(u16 * a0, const u16 * a1) +static u16 *sub_81155A4(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(38, a0); if (a0 == NULL) @@ -4841,7 +4839,7 @@ static u16 * sub_81155A4(u16 * a0, const u16 * a1) return a0 + 5; } -static const u16 * sub_81155E0(const u16 * a0) { +static const u16 *sub_81155E0(const u16 *a0) { const u16 *r5 = sub_8113E88(38, a0); const u8 *r7 = (const u8 *) r5 + 8; u32 r6 = (r5[2] << 16) + r5[3]; @@ -4873,7 +4871,7 @@ static const u16 * sub_81155E0(const u16 * a0) { return (const u16 *)(r7 + 2); } -static u16 * sub_81156D8(u16 * a0, const u16 * a1) +static u16 *sub_81156D8(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(40, a0); if (a0 == NULL) @@ -4883,10 +4881,10 @@ static u16 * sub_81156D8(u16 * a0, const u16 * a1) return a0 + 2; } -static const u16 * sub_8115700(const u16 * a0) +static const u16 *sub_8115700(const u16 *a0) { - const u16 * r4 = sub_8113E88(40, a0); - const u8 * r5 = (const u8 *)r4 + 2; + const u16 *r4 = sub_8113E88(40, a0); + const u8 *r5 = (const u8 *)r4 + 2; sub_80C4DF8(gStringVar1, r5[0]); StringCopy(gStringVar2, ItemId_GetName(r4[0])); StringExpandPlaceholders(gStringVar4, gUnknown_841B03F); @@ -4913,7 +4911,6 @@ static const u16 gUnknown_8456C50[] = { 0x08a1 }; -#ifdef NONMATCHING void sub_8115748(u16 a0) { s32 i; @@ -4921,60 +4918,22 @@ void sub_8115748(u16 a0) return; for (i = 0; i < 17; i++) { - if (a0 != gUnknown_8456C50[i]) - continue; - if (!FlagGet(a0)) - gUnknown_203B049 = TRUE; - else - gUnknown_203B049 = FALSE; - break; + if (a0 == gUnknown_8456C50[i]) + { + if (!FlagGet(a0)) + { + gUnknown_203B049 = TRUE; + break; + } + else + { + gUnknown_203B049 += 0; + gUnknown_203B049 = FALSE; + break; + } + } } } -#else -NAKED -void sub_8115748(u16 a0) -{ - asm_unified("\tpush {r4,lr}\n" - "\tlsls r0, 16\n" - "\tlsrs r2, r0, 16\n" - "\tldr r0, =gUnknown_203ADFA\n" - "\tldrb r0, [r0]\n" - "\tsubs r0, 0x2\n" - "\tlsls r0, 24\n" - "\tlsrs r0, 24\n" - "\tcmp r0, 0x1\n" - "\tbls _08115792\n" - "\tmovs r1, 0\n" - "\tldr r4, =gUnknown_203B049\n" - "\tldr r0, =gUnknown_8456C50\n" - "\tb _08115778\n" - "\t.pool\n" - "_08115770:\n" - "\tmovs r0, 0\n" - "\tb _08115790\n" - "_08115774:\n" - "\tadds r0, 0x2\n" - "\tadds r1, 0x1\n" - "_08115778:\n" - "\tcmp r1, 0x10\n" - "\tbgt _08115792\n" - "\tldrh r3, [r0]\n" - "\tcmp r2, r3\n" - "\tbne _08115774\n" - "\tadds r0, r2, 0\n" - "\tbl FlagGet\n" - "\tlsls r0, 24\n" - "\tcmp r0, 0\n" - "\tbne _08115770\n" - "\tmovs r0, 0x1\n" - "_08115790:\n" - "\tstrb r0, [r4]\n" - "_08115792:\n" - "\tpop {r4}\n" - "\tpop {r0}\n" - "\tbx r0"); -} -#endif // NONMATCHING void sub_8115798(void) { @@ -4990,7 +4949,7 @@ void sub_8115798(void) } } -static u16 * sub_81157DC(u16 * a0, const u16 * a1) +static u16 *sub_81157DC(u16 *a0, const u16 *a1) { a0 = sub_8113DE0(42, a0); if (a0 == NULL) @@ -4999,15 +4958,15 @@ static u16 * sub_81157DC(u16 * a0, const u16 * a1) return a0 + 1; } -static const u16 * sub_8115800(const u16 * a0) +static const u16 *sub_8115800(const u16 *a0) { - const u16 * r4 = sub_8113E88(42, a0); + const u16 *r4 = sub_8113E88(42, a0); sub_80C4DF8(gStringVar1, r4[0]); StringExpandPlaceholders(gStringVar4, gUnknown_841B064); return r4 + 1; } -void sub_8115834(u8 * a0) +void sub_8115834(u8 *a0) { s32 i; if (*a0++ == EXT_CTRL_CODE_BEGIN && *a0++ == EXT_CTRL_CODE_JPN) diff --git a/src/quest_log_8150454.c b/src/quest_log_8150454.c index 3d61dee72..fbd3b4487 100644 --- a/src/quest_log_8150454.c +++ b/src/quest_log_8150454.c @@ -88,7 +88,7 @@ void sub_8150530(void) else { sub_81507BC(mapObject, sub_805C808(4)); - StartSpriteAnim(sprite, sub_80634F0(mapObject->mapobj_unk_18)); + StartSpriteAnim(sprite, sub_80634F0(mapObject->facingDirection)); } } @@ -103,7 +103,7 @@ void sub_81505C4(u8 taskId) FieldObjectClearAnimIfSpecialAnimActive(mapObject); mapObject->mapobj_bit_11 = TRUE; sub_81507BC(mapObject, sub_805C808(4)); - StartSpriteAnim(sprite, sub_80634F0(mapObject->mapobj_unk_18)); + StartSpriteAnim(sprite, sub_80634F0(mapObject->facingDirection)); gTasks[taskId].data[0]++; gTasks[taskId].data[1] = 0; break; diff --git a/src/quest_log_battle.c b/src/quest_log_battle.c index 2687e4ea5..efe866dea 100644 --- a/src/quest_log_battle.c +++ b/src/quest_log_battle.c @@ -2,6 +2,7 @@ #include "constants/species.h" #include "malloc.h" #include "battle.h" +#include "battle_anim.h" #include "link.h" #include "overworld.h" #include "quest_log.h" @@ -22,11 +23,11 @@ struct QuestLogStruct_WildBattleRecord u8 v4; }; -void sub_812C334(s32 *, s32 *); +static void sub_812C334(s32 *, s32 *); void sub_812BFDC(void) { - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_OLDMAN_TUTORIAL | BATTLE_TYPE_POKEDUDE)) && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_POKEDUDE)) && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) { struct QuestLogStruct_TrainerBattleRecord * questLogTrainerBattleRecord = Alloc(sizeof(struct QuestLogStruct_TrainerBattleRecord)); struct QuestLogStruct_WildBattleRecord * questLogWildBattleRecord = Alloc(sizeof(struct QuestLogStruct_WildBattleRecord)); @@ -38,18 +39,18 @@ void sub_812BFDC(void) { switch (gTrainers[gTrainerBattleOpponent_A].trainerClass) { - case 0x54: - questLogMessageType = 30; - break; - case 0x5a: - questLogMessageType = 33; - break; - case 0x57: - questLogMessageType = 32; - break; - default: - questLogMessageType = 34; - break; + case 0x54: + questLogMessageType = 30; + break; + case 0x5a: + questLogMessageType = 33; + break; + case 0x57: + questLogMessageType = 32; + break; + default: + questLogMessageType = 34; + break; } questLogTrainerBattleRecord->v0 = gTrainerBattleOpponent_A; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) @@ -141,7 +142,7 @@ void sub_812C224(void) } for (r3 = 0; r3 < 7; r3++) { - r5->v1[0][r3] = gLinkPlayers[gBattleStruct->field_B5 ^ 1].name[r3]; + r5->v1[0][r3] = gLinkPlayers[gBattleStruct->multiplayerId ^ 1].name[r3]; } } sub_8113550(r8, (const u16 *)r5); @@ -149,16 +150,16 @@ void sub_812C224(void) } } -void sub_812C334(s32 * a0, s32 * a1) +static void sub_812C334(s32 * a0, s32 * a1) { s32 r5; s32 _optimized_out = 0; - u8 r2 = gLinkPlayers[gBattleStruct->field_B5].id ^ 2; + u8 r2 = gLinkPlayers[gBattleStruct->multiplayerId].id ^ 2; for (r5 = 0; r5 < 4; r5++) { if (r2 == gLinkPlayers[r5].id) a0[0] = r5; - else if (r5 != gBattleStruct->field_B5) + else if (r5 != gBattleStruct->multiplayerId) a1[_optimized_out++] = r5; } } diff --git a/src/renewable_hidden_items.c b/src/renewable_hidden_items.c new file mode 100644 index 000000000..cbaa780e6 --- /dev/null +++ b/src/renewable_hidden_items.c @@ -0,0 +1,609 @@ +#include "global.h" +#include "event_data.h" +#include "random.h" +#include "constants/maps.h" +#include "constants/flags.h" + +struct RenewableHiddenItemData +{ + s8 mapGroup; + s8 mapNum; + u8 filler[2]; + u8 rare[8]; // 10% + u8 uncommon[8]; // 30% + u8 common[8]; // 60% +}; + +static void SampleRenewableItemFlags(void); + +static const struct RenewableHiddenItemData sRenewableHiddenItems[] = { + { + .mapGroup = MAP_GROUP(ROUTE20), + .mapNum = MAP_NUM(ROUTE20), + .rare = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_ROUTE20_STARDUST, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(ROUTE21_NORTH), + .mapNum = MAP_NUM(ROUTE21_NORTH), + .rare = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_ROUTE21_NORTH_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL), + .mapNum = MAP_NUM(UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL), + .rare = { + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_ETHER, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_POTION, + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_ANTIDOTE, + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_PARALYZE_HEAL, + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_AWAKENING, + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_BURN_HEAL, + HIDDEN_ITEM_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL_ICE_HEAL, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(UNDERGROUND_PATH_EAST_WEST_TUNNEL), + .mapNum = MAP_NUM(UNDERGROUND_PATH_EAST_WEST_TUNNEL), + .rare = { + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_ETHER, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_POTION, + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_ANTIDOTE, + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_PARALYZE_HEAL, + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_AWAKENING, + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_BURN_HEAL, + HIDDEN_ITEM_UNDERGROUND_PATH_EAST_WEST_TUNNEL_ICE_HEAL, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS), + .mapNum = MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS), + .rare = { + HIDDEN_ITEM_SEVEN_ISLAND_TANOBY_RUINS_HEART_SCALE_4, + HIDDEN_ITEM_SEVEN_ISLAND_TANOBY_RUINS_HEART_SCALE, + HIDDEN_ITEM_SEVEN_ISLAND_TANOBY_RUINS_HEART_SCALE_2, + HIDDEN_ITEM_SEVEN_ISLAND_TANOBY_RUINS_HEART_SCALE_3, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(MT_MOON_B1F), + .mapNum = MAP_NUM(MT_MOON_B1F), + .rare = { + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM, + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM_2, + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM_3, + HIDDEN_ITEM_MT_MOON_B1F_BIG_MUSHROOM, + HIDDEN_ITEM_MT_MOON_B1F_BIG_MUSHROOM_2, + HIDDEN_ITEM_MT_MOON_B1F_BIG_MUSHROOM_3, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM, + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM_2, + HIDDEN_ITEM_MT_MOON_B1F_TINY_MUSHROOM_3, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(THREE_ISLAND_BERRY_FOREST), + .mapNum = MAP_NUM(THREE_ISLAND_BERRY_FOREST), + .rare = { + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_BLUK_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_WEPEAR_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_ORAN_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_CHERI_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_ASPEAR_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_PERSIM_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_PINAP_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_LUM_BERRY + }, + .uncommon = { + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_BLUK_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_WEPEAR_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_ORAN_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_CHERI_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_ASPEAR_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_PERSIM_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_PINAP_BERRY, + 0xFF + }, + .common = { + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_RAZZ_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_NANAB_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_CHESTO_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_PECHA_BERRY, + HIDDEN_ITEM_THREE_ISLAND_BERRY_FOREST_RAWST_BERRY, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(ONE_ISLAND_TREASURE_BEACH), + .mapNum = MAP_NUM(ONE_ISLAND_TREASURE_BEACH), + .rare = { + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL_2, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_STAR_PIECE, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_BIG_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_STARDUST, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_STARDUST_2, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_PEARL, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_PEARL_2, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL_2, + 0xFF, + 0xFF + }, + .common = { + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL, + HIDDEN_ITEM_ONE_ISLAND_TREASURE_BEACH_ULTRA_BALL_2, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), + .mapNum = MAP_NUM(THREE_ISLAND_BOND_BRIDGE), + .rare = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_THREE_ISLAND_BOND_BRIDGE_PEARL, + HIDDEN_ITEM_THREE_ISLAND_BOND_BRIDGE_STARDUST, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(FOUR_ISLAND), + .mapNum = MAP_NUM(FOUR_ISLAND), + .rare = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_FOUR_ISLAND_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + HIDDEN_ITEM_FOUR_ISLAND_ULTRA_BALL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(FIVE_ISLAND_MEMORIAL_PILLAR), + .mapNum = MAP_NUM(FIVE_ISLAND_MEMORIAL_PILLAR), + .rare = { + HIDDEN_ITEM_FIVE_ISLAND_MEMORIAL_PILLAR_BIG_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), + .mapNum = MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS), + .rare = { + HIDDEN_ITEM_FIVE_ISLAND_RESORT_GORGEOUS_NEST_BALL, + HIDDEN_ITEM_FIVE_ISLAND_RESORT_GORGEOUS_STAR_PIECE, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_FIVE_ISLAND_RESORT_GORGEOUS_STARDUST, + HIDDEN_ITEM_FIVE_ISLAND_RESORT_GORGEOUS_STARDUST_2, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(SIX_ISLAND_OUTCAST_ISLAND), + .mapNum = MAP_NUM(SIX_ISLAND_OUTCAST_ISLAND), + .rare = { + HIDDEN_ITEM_SIX_ISLAND_OUTCAST_ISLAND_STAR_PIECE, + HIDDEN_ITEM_SIX_ISLAND_OUTCAST_ISLAND_NET_BALL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(SIX_ISLAND_GREEN_PATH), + .mapNum = MAP_NUM(SIX_ISLAND_GREEN_PATH), + .rare = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + HIDDEN_ITEM_SIX_ISLAND_GREEN_PATH_ULTRA_BALL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, + { + .mapGroup = MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER), + .mapNum = MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER), + .rare = { + HIDDEN_ITEM_SEVEN_ISLAND_TRAINER_TOWER_BIG_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .uncommon = { + HIDDEN_ITEM_SEVEN_ISLAND_TRAINER_TOWER_PEARL, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + .common = { + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF + } + }, +}; + +bool32 sub_815D834(void) +{ + // Stubbed out? + return FALSE; +} + +void SetAllRenewableItemFlags(void) +{ + u8 i, j; + + for (i = 0; i < 15; i++) + { + const u8 * rare = sRenewableHiddenItems[i].rare; + const u8 * uncommon = sRenewableHiddenItems[i].uncommon; + const u8 * common = sRenewableHiddenItems[i].common; + for (j = 0; j < 8; j++) + { + if (rare[j] != 0xFF) + FlagSet(FLAG_HIDDEN_ITEMS_START + rare[j]); + if (uncommon[j] != 0xFF) + FlagSet(FLAG_HIDDEN_ITEMS_START + uncommon[j]); + if (common[j] != 0xFF) + FlagSet(FLAG_HIDDEN_ITEMS_START + common[j]); + } + } +} + +void IncrementRenewableHiddenItemStepCounter(void) +{ + u16 var = VarGet(VAR_RENEWABLE_ITEM_STEP_COUNTER); + if (var < 1500) + { + VarSet(VAR_RENEWABLE_ITEM_STEP_COUNTER, var + 1); + } +} + +void TryRegenerateRenewableHiddenItems(void) +{ + u8 i; + u8 found_map = 0xFF; + for (i = 0; i < 15; i++) + { + if (sRenewableHiddenItems[i].mapGroup == gSaveBlock1Ptr->location.mapGroup && sRenewableHiddenItems[i].mapNum == gSaveBlock1Ptr->location.mapNum) + found_map = i; + } + + if (found_map == 0xFF) + return; + if (VarGet(VAR_RENEWABLE_ITEM_STEP_COUNTER) >= 1500) + { + VarSet(VAR_RENEWABLE_ITEM_STEP_COUNTER, 0); + SetAllRenewableItemFlags(); + SampleRenewableItemFlags(); + } +} + +static void SampleRenewableItemFlags(void) +{ + u8 i, j; + const u8 * flags; + u16 rval; + + for (i = 0; i < 15; i++) + { + rval = Random() % 100; + if (rval >= 90) + flags = sRenewableHiddenItems[i].rare; + else if (rval >= 60) + flags = sRenewableHiddenItems[i].uncommon; + else + flags = sRenewableHiddenItems[i].common; + for (j = 0; j < 8; j++) + { + if (flags[j] != 0xFF) + FlagClear(FLAG_HIDDEN_ITEMS_START + flags[j]); + } + } +} diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 6dd743176..5ab38e461 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -211,7 +211,7 @@ static bool8 LoadBattlerSpriteGfx(u8 battler) } else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler. DecompressTrainerBackPalette(gSaveBlock2Ptr->playerGender, battler); - else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler. + else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler. DecompressTrainerBackPalette(5, battler); else if (!gBattleSpritesDataPtr->battlerData[battler].behindSubstitute) BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battler]], battler); @@ -256,7 +256,7 @@ static void CreateBattlerSprite(u8 battler) gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy; gSprites[gBattlerSpriteIds[battler]].data[0] = battler; } - else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) + else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) { SetMultiuseSpriteTemplateToTrainerBack(5, GetBattlerPosition(0)); gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, 0x50, @@ -292,7 +292,7 @@ static void CreateHealthboxSprite(u8 battler) if (gBattleTypeFlags & BATTLE_TYPE_SAFARI && battler == B_POSITION_PLAYER_LEFT) healthboxSpriteId = CreateSafariPlayerHealthboxSprites(); - else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) + else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) return; else healthboxSpriteId = CreateBattlerHealthboxSprites(battler); diff --git a/src/scrcmd.c b/src/scrcmd.c index ae994fceb..9675a132e 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -50,15 +50,15 @@ extern const u8 *const gStdScriptsEnd[]; static bool8 sub_806B93C(struct ScriptContext * ctx); static u8 sub_806B96C(struct ScriptContext * ctx); -EWRAM_DATA ptrdiff_t gVScriptOffset = 0; -EWRAM_DATA u8 gUnknown_20370AC = 0; -EWRAM_DATA u16 sPauseCounter = 0; -EWRAM_DATA u16 sMovingNpcId = 0; -EWRAM_DATA u16 sMovingNpcMapBank = 0; -EWRAM_DATA u16 sMovingNpcMapId = 0; -EWRAM_DATA u16 sFieldEffectScriptId = 0; +static EWRAM_DATA ptrdiff_t gVScriptOffset = 0; +static EWRAM_DATA u8 gUnknown_20370AC = 0; +static EWRAM_DATA u16 sPauseCounter = 0; +static EWRAM_DATA u16 sMovingNpcId = 0; +static EWRAM_DATA u16 sMovingNpcMapBank = 0; +static EWRAM_DATA u16 sMovingNpcMapId = 0; +static EWRAM_DATA u16 sFieldEffectScriptId = 0; -IWRAM_DATA struct ScriptContext * gUnknown_3005070; +struct ScriptContext * gUnknown_3005070; extern u8 gSelectedEventObject; @@ -1263,8 +1263,8 @@ bool8 ScrCmd_release(struct ScriptContext *ctx) bool8 ScrCmd_textcolor(struct ScriptContext *ctx) { - gUnknown_20370DC = gUnknown_20370DA; - gUnknown_20370DA = ScriptReadByte(ctx); + gSpecialVar_PrevTextColor = gSpecialVar_TextColor; + gSpecialVar_TextColor = ScriptReadByte(ctx); return FALSE; } @@ -1835,7 +1835,7 @@ bool8 ScrCmd_showmoneybox(struct ScriptContext *ctx) u8 y = ScriptReadByte(ctx); u8 ignore = ScriptReadByte(ctx); - if (!ignore && sub_81119D4(sub_809D6D4) != TRUE) + if (!ignore && QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) DrawMoneyBox(GetMoney(&gSaveBlock1Ptr->money), x, y); return FALSE; } @@ -1865,7 +1865,7 @@ bool8 ScrCmd_showcoinsbox(struct ScriptContext *ctx) u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) ShowCoinsWindow(GetCoins(), x, y); return FALSE; } @@ -1916,7 +1916,7 @@ bool8 ScrCmd_checktrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); - ctx->comparisonResult = HasTrainerAlreadyBeenFought(index); + ctx->comparisonResult = HasTrainerBeenFought(index); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c new file mode 100644 index 000000000..b3826322b --- /dev/null +++ b/src/script_menu.c @@ -0,0 +1,1293 @@ +#include "global.h" +#include "palette.h" +#include "text.h" +#include "menu.h" +#include "task.h" +#include "sound.h" +#include "script_menu.h" +#include "quest_log.h" +#include "window.h" +#include "new_menu_helpers.h" +#include "event_data.h" +#include "script.h" +#include "strings.h" +#include "string_util.h" +#include "field_effect.h" +#include "event_scripts.h" +#include "constants/songs.h" +#include "constants/species.h" +#include "constants/seagallop.h" +#include "constants/menu.h" + +struct MultichoiceListStruct +{ + const struct MenuAction * list; + u8 count; +}; + +static EWRAM_DATA u8 sDelay = 0; + +static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); +static u8 GetMCWindowHeight(u8 count); +static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); +static void Task_MultichoiceMenu_HandleInput(u8 taskId); +static void MultiChoicePrintHelpDescription(u8 mcId); +static void Task_YesNoMenu_HandleInput(u8 taskId); +static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId); +static void CreatePCMenuWindow(void); +static bool8 PicboxWait(void); +static void DestroyScriptMenuWindow(u8 windowId); +static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); + + +static const struct MenuAction sScriptMultiChoiceMenu_YesNo[] = { + { gText_Yes }, + { gText_No } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TrainerCardIconTint[] = { + { gText_Normal }, + { gText_Black }, + { gText_Pink }, + { gText_Sepia } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Quit[] = { + { gText_HallOfFame }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Quit[] = { + { gText_Eggs }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Victories_Quit[] = { + { gText_Victories }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Quit[] = { + { gText_HallOfFame }, + { gText_Eggs }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Victories_Quit[] = { + { gText_HallOfFame }, + { gText_Victories }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Victories_Quit[] = { + { gText_Eggs }, + { gText_Victories }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit[] = { + { gText_HallOfFame }, + { gText_Eggs }, + { gText_Victories }, + { gText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] = { + { gText_Slp }, + { gText_Psn }, + { gText_Par }, + { gText_Brn }, + { gText_Frz }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo[] = { + { gText_Yes }, + { gText_No }, + { gText_Info } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[] = { + { gText_SingleBattle }, + { gText_DoubleBattle }, + { gText_MultiBattle }, + { gText_Info }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo2[] = { + { gText_Yes }, + { gText_No }, + { gText_Info } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ChallengeInfoExit[] = { + { gText_MakeAChallenge }, + { gText_Info_2 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_RooftopB1F[] = { + { gText_Rooftop }, + { gText_B1F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Helix[] = { + { gText_HelixFossil }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Dome[] = { + { gText_DomeFossil }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Amber[] = { + { gText_OldAmber }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_HelixAmber[] = { + { gText_HelixFossil }, + { gText_OldAmber }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_DomeAmber[] = { + { gText_DomeFossil }, + { gText_OldAmber }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_CeladonVendingMachine[] = { + { gText_FreshWater_200 }, + { gText_SodaPop_300 }, + { gText_Lemonade_350 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { + { gText_Tm13_4000Coins }, + { gText_Tm23_3500Coins }, + { gText_Tm24_4000Coins }, + { gText_Tm30_4500Coins }, + { gText_Tm35_4000Coins }, + { gText_NoThanks_2 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes[] = { + { gText_SmokeBall_800Coins }, + { gText_MiracleSeed_1000Coins }, + { gText_Charcoal_1000Coins }, + { gText_MysticWater_1000Coins }, + { gText_YellowFlute_1600Coins }, + { gText_NoThanks_2 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter[] = { + { gText_50Coins_1000 }, + { gText_500Coins_10000 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Excellent_NotSoBad[] = { + { gText_Excellent }, + { gText_NotSoBad } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_RightLeft[] = { + { gText_Right }, + { gText_Left } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { + { gText_5F_2 }, + { gText_4F_2 }, + { gText_3F_2 }, + { gText_2F_2 }, + { gText_1F_2 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWater[] = { + { gText_FreshWater }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPop[] = { + { gText_SodaPop }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop[] = { + { gText_FreshWater }, + { gText_SodaPop }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlLemonade[] = { + { gText_Lemonade }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade[] = { + { gText_FreshWater }, + { gText_Lemonade }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade[] = { + { gText_SodaPop }, + { gText_Lemonade }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade[] = { + { gText_FreshWater }, + { gText_SodaPop }, + { gText_Lemonade }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_0[] = { + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_1[] = { + { gText_RedShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_2[] = { + { gText_YellowShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_3[] = { + { gText_RedShard }, + { gText_YellowShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_4[] = { + { gText_BlueShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_5[] = { + { gText_RedShard }, + { gText_BlueShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_6[] = { + { gText_YellowShard }, + { gText_BlueShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { + { gText_RedShard }, + { gText_YellowShard }, + { gText_BlueShard }, + { gText_GreenShard }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { + { gText_Eevee }, + { gText_Flareon }, + { gText_Jolteon }, + { gText_Vaporeon }, + { gText_QuitLooking } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_BikeShop[] = { + { gText_Bicycle_1000000 }, + { gText_NoThanks } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] = { + { gText_Abra_180Coins }, + { gText_Clefairy_500Coins }, + { gText_Dratini_2800Coins }, + { gText_Scyther_5500Coins }, + { gText_Porygon_9999Coins }, + { gText_NoThanks_2 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TradeCenter_Colosseum[] = { + { gText_TradeCenter }, + { gText_Colosseum }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Link_Wireless[] = { + { gText_GameLinkCable }, + { gText_Wireless }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_RocketHideoutElevator[] = { + { gText_B1F }, + { gText_B2F }, + { gText_B4F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_LinkedDirectUnion[] = { + { gText_LinkedGamePlay }, + { gText_DirectCorner }, + { gText_UnionRoom }, + { gOtherText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Island23[] = { + { gText_TwoIsland }, + { gText_ThreeIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Island13[] = { + { gText_OneIsland }, + { gText_ThreeIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Island12[] = { + { gText_OneIsland }, + { gText_TwoIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumCrush[] = { + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_BerryCrush }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_48[] = { + { gText_Dummy_8417E66 }, + { gText_Dummy_8417E67 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseum_2[] = { + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_PokejumpDodrio[] = { + { gText_PokemonJump }, + { gText_DodrioBerryPicking }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Mushrooms[] = { + { gText_2Tinymushrooms }, + { gText_1BigMushroom } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] = { + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_Dummy_8417E71 }, + { gText_BerryCrush }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlank[] = { + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_Dummy_8417E71 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavel[] = { + { gText_SeviiIslands }, + { gText_NavelRock }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeviiBirth[] = { + { gText_SeviiIslands }, + { gText_BirthIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { + { gText_SeviiIslands }, + { gText_NavelRock }, + { gText_BirthIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Seagallop123[] = { + { gText_OneIsland }, + { gText_TwoIsland }, + { gText_ThreeIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV23[] = { + { gText_Vermilion }, + { gText_TwoIsland }, + { gText_ThreeIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV13[] = { + { gText_Vermilion }, + { gText_OneIsland }, + { gText_ThreeIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV12[] = { + { gText_Vermilion }, + { gText_OneIsland }, + { gText_TwoIsland }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopVermilion[] = { + { gText_Vermilion }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_62[] = { + { gText_Dummy_8417F68 }, + { gText_Dummy_8417F67 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_JoinOrLead[] = { + { gText_JoinGroup }, + { gText_BecomeLeader }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { + { gOtherText_Single }, + { gOtherText_Double }, + { gOtherText_Knockout }, + { gOtherText_Mixed }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_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) } +}; + +const u8 *const gStdStringPtrs[] = { + gText_Cool, + gText_Beauty, + gText_Cute, + gText_Smart, + gText_Tough, + gText_Cool_2, + gText_Beauty_2, + gText_Cute_2, + gText_Smart_2, + gText_Tough_2, + gText_Items, + gText_KeyItems, + gText_PokeBalls, + gText_TmsgUnknown_8417B2CHms, + gText_Berries, + gText_Boulderbadge, + gText_Cascadebadge, + gText_Thunderbadge, + gText_Rainbowbadge, + gText_Soulbadge, + gText_Marshbadge, + gText_Volcanobadge, + gText_Earthbadge, + gText_Coins_2, + gText_ItemsPocket, + gText_KeyItemsPocket, + gText_PokeBallsPocket, + gText_TmCase, + gText_BerryPouch_2 +}; + +static const u8 *const sDescriptionPtrs_CableClub_TradeBattleCancel[] = { + Text_1BC388, + Text_1BC3C7, + Text_1BCB42 +}; + +static const u8 *const sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[] = { + Text_1BCA95, + Text_1BCACB, + Text_1BCAF2, + Text_1BCB42 +}; + +static const u8 *const sDescriptionPtrs_WirelessCenter_TradeBattleCancel[] = { + Text_1BCA95, + Text_1BCACB, + Text_1BCB42 +}; + +static const union AnimCmd sMuseumFossilAnim0[] = { + ANIMCMD_FRAME(0, 10), + ANIMCMD_END +}; + +static const union AnimCmd *const sMuseumFossilAnimCmdTable[] = { + sMuseumFossilAnim0 +}; + +static const struct OamData sMuseumFossilOamData = { + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64) +}; + +static const struct SpriteTemplate sMuseumFossilSprTemplate = { + .tileTag = 7000, + .paletteTag = 0xFFFF, + .oam = &sMuseumFossilOamData, + .anims = sMuseumFossilAnimCmdTable, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const u16 sMuseumAerodactylSprTiles[] = INCBIN_U16("data/script_menu/aerodactyl_fossil.4bpp"); +static const u16 sMuseumAerodactylSprPalette[] = INCBIN_U16("data/script_menu/aerodactyl_fossil.gbapal"); +static const u16 sMuseumKabutopsSprTiles[] = INCBIN_U16("data/script_menu/kabutops_fossil.4bpp"); +static const u16 sMuseumKabutopsSprPalette[] = INCBIN_U16("data/script_menu/kabutops_fossil.gbapal"); + +static const struct SpriteSheet sMuseumKabutopsSprSheets[] = { + {sMuseumKabutopsSprTiles, 0x800, 7000}, + {} +}; + +static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { + {sMuseumAerodactylSprTiles, 0x800, 7000}, + {} +}; + + +static const u8 *const sSeagallopDestStrings[] = { + gText_Vermilion, + gText_OneIsland, + gText_TwoIsland, + gText_ThreeIsland, + gText_FourIsland, + gText_FiveIsland, + gText_SixIsland, + gText_SevenIsland +}; + +static u16 GetStringTilesWide(const u8 *str) +{ + return (GetStringWidth(1, str, 0) + 7) / 8; +} + +static u8 GetMenuWidthFromList(const struct MenuAction * items, u8 count) +{ + u16 i; + u8 width = GetStringTilesWide(items[0].text); + u8 tmp; + + for (i = 1; i < count; i++) + { + tmp = GetStringTilesWide(items[i].text); + if (width < tmp) + width = tmp; + } + return width; +} + +bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 mcId, u8 ignoreBpress) +{ + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) + return FALSE; + gSpecialVar_Result = SCR_MENU_UNSET; + DrawVerticalMultichoiceMenu(left, top, mcId, ignoreBpress, 0); + return TRUE; +} + +bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 cursorPos) +{ + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) + return FALSE; + gSpecialVar_Result = SCR_MENU_UNSET; + DrawVerticalMultichoiceMenu(left, top, mcId, ignoreBpress, cursorPos); + return TRUE; +} + +static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) +{ + s32 i; + s32 strWidth; + s32 tmp; + u8 width; + u8 height; + u8 count; + u8 windowId; + const struct MenuAction * list; + + if ((ignoreBpress & 2) || QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) + { + ignoreBpress &= 1; + count = gScriptMultiChoiceMenus[mcId].count; + list = gScriptMultiChoiceMenus[mcId].list; + strWidth = 0; + for (i = 0; i < count; i++) + { + tmp = GetStringWidth(2, list[i].text, 0); + if (tmp > strWidth) + strWidth = tmp; + } + width = (strWidth + 9) / 8 + 1; + if (left + width > 28) + left = 28 - width; + height = GetMCWindowHeight(count); + windowId = CreateWindowFromRect(left, top, width, height); + SetStdWindowBorderStyle(windowId, FALSE); + if (mcId == 30 || mcId == 13 || mcId == 41) + MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); + else + MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); + Menu_InitCursor(windowId, 2, 0, 2, 14, count, initPos); + CreateMCMenuInputHandlerTask(ignoreBpress, count, windowId, mcId); + ScheduleBgCopyTilemapToVram(0); + } +} + +static u8 GetMCWindowHeight(u8 count) +{ + switch (count) + { + case 0: + return 1; + case 1: + return 2; + case 2: + return 4; + case 3: + return 6; + case 4: + return 7; + case 5: + return 9; + case 6: + return 11; + case 7: + return 13; + case 8: + return 14; + default: + return 1; + } +} + +static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) +{ + u8 taskId; + if (mcId == 39 || mcId == 47 || mcId == 50) + sDelay = 12; + else + sDelay = 0; + taskId = CreateTask(Task_MultichoiceMenu_HandleInput, 80); + gTasks[taskId].data[4] = ignoreBpress; + if (count > 3) + gTasks[taskId].data[5] = TRUE; + else + gTasks[taskId].data[5] = FALSE; + gTasks[taskId].data[6] = windowId; + gTasks[taskId].data[7] = mcId; + MultiChoicePrintHelpDescription(mcId); +} + +static void Task_MultichoiceMenu_HandleInput(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s8 input; + if (!gPaletteFade.active) + { + if (sDelay != 0) + sDelay--; + else + { + if (data[5] == FALSE) + input = Menu_ProcessInputNoWrapAround(); + else + input = Menu_ProcessInput(); + if (JOY_NEW(DPAD_UP | DPAD_DOWN)) + MultiChoicePrintHelpDescription(data[7]); + switch (input) + { + case -2: + return; + case -1: + if (data[4]) + return; + PlaySE(SE_SELECT); + gSpecialVar_Result = SCR_MENU_CANCEL; + break; + default: + gSpecialVar_Result = input; + break; + } + DestroyScriptMenuWindow(data[6]); + DestroyTask(taskId); + EnableBothScriptContexts(); + } + } +} + +static void MultiChoicePrintHelpDescription(u8 mcId) +{ + switch (mcId) + { + case 39: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + case 47: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + case 50: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + } +} + +bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) +{ + if (FuncIsActiveTask(Task_YesNoMenu_HandleInput) == TRUE) + return FALSE; + gSpecialVar_Result = SCR_MENU_UNSET; + if (!QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites)) + { + DisplayYesNoMenuDefaultYes(); + CreateTask(Task_YesNoMenu_HandleInput, 80); + } + return TRUE; +} + +bool8 sub_809CE38(void) +{ + if (gSpecialVar_Result == SCR_MENU_UNSET) + return FALSE; + else + return TRUE; +} + +static void Task_YesNoMenu_HandleInput(u8 taskId) +{ + s8 input; + if (gTasks[taskId].data[2] < 5) + { + gTasks[taskId].data[2]++; + } + else + { + input = Menu_ProcessInputNoWrapClearOnChoose(); + switch (input) + { + case -2: + return; + case -1: + case 1: + PlaySE(SE_SELECT); + gSpecialVar_Result = FALSE; + break; + case 0: + gSpecialVar_Result = TRUE; + break; + } + DestroyTask(taskId); + EnableBothScriptContexts(); + } +} + +bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount) +{ + const struct MenuAction * list; + u8 count; + u8 width; + u8 rowCount; + u8 taskId; + if (FuncIsActiveTask(Hask_MultichoiceGridMenu_HandleInput) == TRUE) + return FALSE; + gSpecialVar_Result = SCR_MENU_UNSET; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) + { + list = gScriptMultiChoiceMenus[multichoiceId].list; + count = gScriptMultiChoiceMenus[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], 1, width * 8, 16, columnCount, rowCount, list); + MultichoiceGrid_InitCursor(gTasks[taskId].data[6], 1, 0, 1, width * 8, columnCount, rowCount, 0); + ScheduleBgCopyTilemapToVram(0); + } + return TRUE; +} + +static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s8 input = Menu_ProcessInputGridLayout(); + switch (input) + { + case -2: + return; + case -1: + if (data[4]) + return; + PlaySE(SE_SELECT); + gSpecialVar_Result = SCR_MENU_CANCEL; + break; + default: + gSpecialVar_Result = input; + break; + } + DestroyScriptMenuWindow(data[6]); + DestroyTask(taskId); + EnableBothScriptContexts(); +} + +bool8 ScrSpecial_CreatePCMenu(void) +{ + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) + return FALSE; + gSpecialVar_Result = SCR_MENU_UNSET; + CreatePCMenuWindow(); + return TRUE; +} + +static void CreatePCMenuWindow(void) +{ + u8 cursorWidth = GetMenuCursorDimensionByFont(2, 0); + u8 height = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + u8 windowWidth; + u8 nitems; + u8 windowId; + switch (GetStringTilesWide(gText_SPc)) + { + default: + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + windowWidth = 14; + else + windowWidth = 13; + break; + case 9: + case 10: + windowWidth = 14; + break; + } + if (FlagGet(FLAG_SYS_GAME_CLEAR)) + { + nitems = 5; + windowId = CreateWindowFromRect(0, 0, windowWidth, 10); + SetStdWindowBorderStyle(windowId, FALSE); + AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 66, 0xFF, NULL); + } + else + { + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + nitems = 4; + else + nitems = 3; + windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); + SetStdWindowBorderStyle(windowId, FALSE); + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + } + if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) + AddTextPrinterParameterized(windowId, 2, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); + else + AddTextPrinterParameterized(windowId, 2, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); + StringExpandPlaceholders(gStringVar4, gText_SPc); + Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); + Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + ScheduleBgCopyTilemapToVram(0); +} + +void ScriptMenu_DisplayPCStartupPrompt(void) +{ + sub_80F7768(0, TRUE); + AddTextPrinterParameterized2(0, 2, gUnknown_81A508A, 0, NULL, 2, 1, 3); +} + +static void Task_ScriptShowMonPic(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + task->data[0]++; + break; + case 1: + break; + case 2: + sub_8083A5C(&gSprites[task->data[2]], task->data[2]); + task->data[0]++; + break; + case 3: + DestroyScriptMenuWindow(task->data[5]); + DestroyTask(taskId); + break; + } +} + +bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) +{ + u8 spriteId; + u8 taskId; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) + return TRUE; + if (FindTaskIdByFunc(Task_ScriptShowMonPic) != 0xFF) + return FALSE; + spriteId = sub_8083970(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; + gSprites[spriteId].callback = SpriteCallbackDummy; + gSprites[spriteId].oam.priority = 0; + SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + ScheduleBgCopyTilemapToVram(0); + return TRUE; +} + +bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) +{ + u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); + if (taskId == 0xFF) + return NULL; + gTasks[taskId].data[0]++; + return PicboxWait; +} + +static bool8 PicboxWait(void) +{ + if (FindTaskIdByFunc(Task_ScriptShowMonPic) == 0xFF) + return TRUE; + else + return FALSE; +} + +void sub_809D424(void) +{ + u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); + struct Task * task; + if (taskId != 0xFF) + { + task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + case 1: + case 2: + sub_8083A5C(&gSprites[task->data[2]], task->data[2]); + DestroyScriptMenuWindow(task->data[5]); + DestroyTask(taskId); + break; + case 3: + DestroyScriptMenuWindow(task->data[5]); + DestroyTask(taskId); + break; + } + } +} + +void Task_WaitMuseumFossilPic(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + task->data[0]++; + break; + case 1: + break; + case 2: + DestroySprite(&gSprites[task->data[2]]); + FreeSpriteTilesByTag(7000); + task->data[0]++; + break; + case 3: + DestroyScriptMenuWindow(task->data[5]); + DestroyTask(taskId); + break; + } +} + +bool8 Special_OpenMuseumFossilPic(void) +{ + u8 spriteId; + u8 taskId; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) + return TRUE; + if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != 0xFF) + return FALSE; + if (gSpecialVar_0x8004 == SPECIES_KABUTOPS) + { + LoadSpriteSheets(sMuseumKabutopsSprSheets); + LoadPalette(sMuseumKabutopsSprPalette, 0x1D0, 0x20); + } + else if (gSpecialVar_0x8004 == SPECIES_AERODACTYL) + { + LoadSpriteSheets(sMuseumAerodactylSprSheets); + LoadPalette(sMuseumAerodactylSprPalette, 0x1D0, 0x20); + } + else + { + return FALSE; + } + 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); + ScheduleBgCopyTilemapToVram(0); + return TRUE; +} + +bool8 Special_CloseMuseumFossilPic(void) +{ + u8 taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); + if (taskId == 0xFF) + return FALSE; + gTasks[taskId].data[0]++; + return TRUE; +} + +static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height) +{ + struct WindowTemplate template = SetWindowTemplateFields(0, left + 1, top + 1, width, height, 15, 0x038); + u8 windowId = AddWindow(&template); + PutWindowTilemap(windowId); + return windowId; +} + +static void DestroyScriptMenuWindow(u8 windowId) +{ + ClearWindowTilemap(windowId); + ClearStdWindowAndFrameToTransparent(windowId, TRUE); + RemoveWindow(windowId); +} + +void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) +{ + u8 taskId; + s16 *data; + ScriptContext1_SetupScript(EventScript_1A7AE0); + taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); + if (taskId != 0xFF) + { + data = gTasks[taskId].data; + if (data[0] < 2) + sub_8083A5C(&gSprites[data[2]], data[2]); + } + taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); + if (taskId != 0xFF) + { + data = gTasks[taskId].data; + if (data[0] < 2) + { + DestroySprite(&gSprites[data[2]]); + FreeSpriteTilesByTag(7000); + } + } +} + +void Special_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 top; + u8 nitems; + u8 cursorWidth; + u8 fontHeight; + u8 windowId; + u8 i; + gSpecialVar_Result = SCR_MENU_UNSET; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) + { + if (gSpecialVar_0x8005 == 1) + { + if (gSpecialVar_0x8004 < SEAGALLOP_FIVE_ISLAND) + r4 = SEAGALLOP_FIVE_ISLAND; + else + r4 = SEAGALLOP_FOUR_ISLAND; + nitems = 5; + top = 2; + } + else + { + r4 = SEAGALLOP_VERMILION_CITY; + nitems = 6; + top = 0; + } + cursorWidth = GetMenuCursorDimensionByFont(2, 0); + fontHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + windowId = CreateWindowFromRect(17, top, 11, nitems * 2); + SetStdWindowBorderStyle(windowId, FALSE); + for (i = 0; i < nitems - 2; i++) + { + if (r4 != gSpecialVar_0x8004) + AddTextPrinterParameterized(windowId, 2, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + else + i--; + r4++; + if (r4 == SEAGALLOP_CINNABAR_ISLAND) + r4 = SEAGALLOP_VERMILION_CITY; + } + AddTextPrinterParameterized(windowId, 2, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); + i++; + AddTextPrinterParameterized(windowId, 2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); + Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + ScheduleBgCopyTilemapToVram(0); + } +} + +u16 Special_GetSelectedSeagallopDestination(void) +{ + // 8004 = Starting location + // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) + if (gSpecialVar_Result == SCR_MENU_CANCEL) + return SCR_MENU_CANCEL; + if (gSpecialVar_0x8005 == 1) + { + if (gSpecialVar_Result == 3) + { + return SEAGALLOP_MORE; + } + else if (gSpecialVar_Result == 4) + { + return SCR_MENU_CANCEL; + } + else if (gSpecialVar_Result == 0) + { + if (gSpecialVar_0x8004 > SEAGALLOP_FOUR_ISLAND) + return SEAGALLOP_FOUR_ISLAND; + else + return SEAGALLOP_FIVE_ISLAND; + } + else if (gSpecialVar_Result == 1) + { + if (gSpecialVar_0x8004 > SEAGALLOP_FIVE_ISLAND) + return SEAGALLOP_FIVE_ISLAND; + else + return SEAGALLOP_SIX_ISLAND; + } + else if (gSpecialVar_Result == 2) + { + if (gSpecialVar_0x8004 > SEAGALLOP_SIX_ISLAND) + return SEAGALLOP_SIX_ISLAND; + else + return SEAGALLOP_SEVEN_ISLAND; + } + } + else + { + if (gSpecialVar_Result == 4) + return SEAGALLOP_MORE; + else if (gSpecialVar_Result == 5) + return SCR_MENU_CANCEL; + else if (gSpecialVar_Result >= gSpecialVar_0x8004) + return gSpecialVar_Result + 1; + else + return gSpecialVar_Result; + } + return SEAGALLOP_VERMILION_CITY; +} diff --git a/src/seagallop.c b/src/seagallop.c index 006a356e4..cf07f9880 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -25,13 +25,13 @@ static EWRAM_DATA void * sBg3TilemapBuffer = NULL; -static void CB2_SetUpSeaGallopScene(void); +static void CB2_SetUpSeagallopScene(void); static void VBlankCB_SeaGallop(void); static void MainCB2_SeaGallop(void); -static void Task_SeaGallop_0(u8 taskId); -static void Task_SeaGallop_1(u8 taskId); -static void Task_SeaGallop_2(u8 taskId); -static void Task_SeaGallop_3(void); +static void Task_Seagallop_0(u8 taskId); +static void Task_Seagallop_1(u8 taskId); +static void Task_Seagallop_2(u8 taskId); +static void Task_Seagallop_3(void); static void ResetGPU(void); static void ResetAllAssets(void); static void SetDispcnt(void); @@ -64,7 +64,7 @@ static const struct BgTemplate sBGTemplates[] = { } }; -static const s8 sSeaGallopSpawnTable[][4] = { +static const s8 sSeag[][4] = { // Map X Y [SEAGALLOP_VERMILION_CITY] = {MAP(VERMILION_CITY), 0x17, 0x20}, [SEAGALLOP_ONE_ISLAND] = {MAP(ONE_ISLAND_HARBOR), 0x08, 0x05}, @@ -176,14 +176,14 @@ static const struct SpriteTemplate sWakeSpriteTemplate = { SpriteCB_Wake }; -void ScrSpecial_SeaGallopFerry(void) +void ScrSpecial_SeagallopFerry(void) { SetVBlankCallback(NULL); HelpSystem_Disable(); - SetMainCallback2(CB2_SetUpSeaGallopScene); + SetMainCallback2(CB2_SetUpSeagallopScene); } -static void CB2_SetUpSeaGallopScene(void) +static void CB2_SetUpSeagallopScene(void) { void ** ptr; switch (gMain.state) @@ -248,7 +248,7 @@ static void CB2_SetUpSeaGallopScene(void) SetGpuReg(REG_OFFSET_WINOUT, 0x00); SetGpuReg(REG_OFFSET_WIN0H, 0x00F0); SetGpuReg(REG_OFFSET_WIN0V, 0x1888); - CreateTask(Task_SeaGallop_0, 8); + CreateTask(Task_Seagallop_0, 8); SetMainCallback2(MainCB2_SeaGallop); gMain.state = 0; break; @@ -270,9 +270,9 @@ static void MainCB2_SeaGallop(void) UpdatePaletteFade(); } -static void Task_SeaGallop_0(u8 taskId) +static void Task_Seagallop_0(u8 taskId) { - gTasks[taskId].func = Task_SeaGallop_1; + gTasks[taskId].func = Task_Seagallop_1; } static void ScrollBG(void) @@ -287,7 +287,7 @@ static void ScrollBG(void) } } -static void Task_SeaGallop_1(u8 taskId) +static void Task_Seagallop_1(u8 taskId) { struct Task * task = &gTasks[taskId]; @@ -296,29 +296,29 @@ static void Task_SeaGallop_1(u8 taskId) { Overworld_FadeOutMapMusic(); sub_807DC18(); - task->func = Task_SeaGallop_2; + task->func = Task_Seagallop_2; } } -static void Task_SeaGallop_2(u8 taskId) +static void Task_Seagallop_2(u8 taskId) { ScrollBG(); if (sub_8055FC4() && !gPaletteFade.active) { - Task_SeaGallop_3(); + Task_Seagallop_3(); HelpSystem_Enable(); DestroyTask(taskId); } } -static void Task_SeaGallop_3(void) +static void Task_Seagallop_3(void) { const s8 * warpInfo; - if (gSpecialVar_0x8006 >= NELEMS(sSeaGallopSpawnTable)) + if (gSpecialVar_0x8006 >= NELEMS(sSeag)) gSpecialVar_0x8006 = 0; - warpInfo = sSeaGallopSpawnTable[gSpecialVar_0x8006]; + warpInfo = sSeag[gSpecialVar_0x8006]; SetWarpDestination(warpInfo[0], warpInfo[1], -1, warpInfo[2], warpInfo[3]); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); diff --git a/src/start_menu.c b/src/start_menu.c index e3854b803..dddb5f44e 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -207,9 +207,9 @@ static void AppendToStartMenuItems(u8 newEntry) static void SetUpStartMenu_NormalField(void) { - if (FlagGet(FLAG_0x829) == TRUE) + if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) AppendToStartMenuItems(STARTMENU_POKEDEX); - if (FlagGet(FLAG_0x828) == TRUE) + if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE) AppendToStartMenuItems(STARTMENU_POKEMON); AppendToStartMenuItems(STARTMENU_BAG); AppendToStartMenuItems(STARTMENU_PLAYER); @@ -392,7 +392,7 @@ void ShowStartMenu(void) { if (!IsUpdateLinkStateCBActive()) { - player_bitmagic(); + FreezeEventObjects(); sub_805C270(); sub_805C780(); } @@ -445,7 +445,7 @@ static void StartMenu_FadeScreenIfLeavingOverworld(void) && sStartMenuCallback != StartMenuExitCallback && sStartMenuCallback != StartMenuSafariZoneRetireCallback) { - sub_80CCB68(); + StopPokemonLeagueLightingEffectTask(); fade_screen(1, 0); } } @@ -973,7 +973,7 @@ static void PrintSaveStats(void) SaveStatToString(SAVE_STAT_BADGES, gStringVar4, 2); AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 60, 28, sTextColor_StatValue, -1, gStringVar4); y = 42; - if (FlagGet(FLAG_0x829) == TRUE) + if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 2, 42, sTextColor_StatName, -1, gSaveStatName_Pokedex); SaveStatToString(SAVE_STAT_POKEDEX, gStringVar4, 2); diff --git a/src/teachy_tv.c b/src/teachy_tv.c index aa273073b..e33cb9d2e 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -1192,7 +1192,7 @@ static void TeachyTvPrepBattle(u8 taskId) gSpecialVar_0x8004 = sStaticResources.whichScript; gMain.savedCallback = TeachyTvRestorePlayerPartyCallback; SavePlayerParty(); - sub_8159F40(); + InitPokedudePartyAndOpponent(); PlayMapChosenOrBattleBGM(MUS_DUMMY); if (sStaticResources.whichScript == TTVSCR_BATTLE) data[6] = 9; @@ -1214,7 +1214,7 @@ static void TeachyTvPreBattleAnimAndSetBattleCallback(u8 taskId) case 1: if (BT_IsDone()) { - SetMainCallback2(sub_800FD9C); + SetMainCallback2(CB2_InitBattle); DestroyTask(taskId); } break; diff --git a/src/trade.c b/src/trade.c index ee28ff224..08e0d6372 100644 --- a/src/trade.c +++ b/src/trade.c @@ -237,7 +237,7 @@ void sub_804C728(void) case 5: if (gWirelessCommType) { - if (IsRfuTaskFinished()) + if (IsLinkRfuTaskFinished()) { gMain.state++; LoadWirelessStatusIndicatorSpriteGfx(); @@ -267,7 +267,7 @@ void sub_804C728(void) { struct Pokemon *mon = &gPlayerParty[i]; gUnknown_2031DA8->partyIcons[0][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), - sub_809718C, + SpriteCB_MonIcon, (gTradeMonSpriteCoords[i][0] * 8) + 14, (gTradeMonSpriteCoords[i][1] * 8) - 12, 1, @@ -279,7 +279,7 @@ void sub_804C728(void) { struct Pokemon *mon = &gEnemyParty[i]; gUnknown_2031DA8->partyIcons[1][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), - sub_809718C, + SpriteCB_MonIcon, (gTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (gTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, 1, @@ -698,7 +698,7 @@ void sub_804C728(void) "\tldrb r0, [r0]\n" "\tcmp r0, 0\n" "\tbeq _0804C9E8\n" - "\tbl IsRfuTaskFinished\n" + "\tbl IsLinkRfuTaskFinished\n" "\tlsls r0, 24\n" "\tcmp r0, 0\n" "\tbne _0804C9C4\n" @@ -797,7 +797,7 @@ void sub_804C728(void) "\tstr r0, [sp, 0x4]\n" "\tstr r1, [sp, 0x8]\n" "\tadds r0, r5, 0\n" - "\tldr r1, _0804CB44 @ =sub_809718C\n" + "\tldr r1, _0804CB44 @ =SpriteCB_MonIcon\n" "\tbl CreateMonIcon\n" "\tmov r2, r8\n" "\tldr r1, [r2]\n" @@ -856,7 +856,7 @@ void sub_804C728(void) "\tmovs r0, 0\n" "\tstr r0, [sp, 0x8]\n" "\tadds r0, r5, 0\n" - "\tldr r1, _0804CB44 @ =sub_809718C\n" + "\tldr r1, _0804CB44 @ =SpriteCB_MonIcon\n" "\tbl CreateMonIcon\n" "\tmov r2, r8\n" "\tldr r1, [r2]\n" @@ -883,7 +883,7 @@ void sub_804C728(void) "_0804CB38: .4byte gTradeMonSpriteCoords\n" "_0804CB3C: .4byte gPlayerParty\n" "_0804CB40: .4byte 0xfff40000\n" - "_0804CB44: .4byte sub_809718C\n" + "_0804CB44: .4byte SpriteCB_MonIcon\n" "_0804CB48: .4byte gEnemyParty\n" "_0804CB4C: .4byte gMain\n" "_0804CB50:\n" diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 2ef5e02f0..7262954c9 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -14,7 +14,7 @@ extern const struct CompressedSpriteSheet gMonBackPicTable[]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; -extern const union AnimCmd *const gUnknown_82349BC[]; +extern const union AnimCmd *const gSpriteAnimTable_82349BC[]; extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[]; // Static type declarations @@ -138,7 +138,7 @@ void LoadPicPaletteBySlot(u16 species, u32 otId, u32 personality, u8 paletteSlot void AssignSpriteAnimsTable(bool8 isTrainer) { if (!isTrainer) - sCreatingSpriteTemplate.anims = gUnknown_82349BC; + sCreatingSpriteTemplate.anims = gSpriteAnimTable_82349BC; else sCreatingSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[0]; } diff --git a/src/trainer_tower.c b/src/trainer_tower.c index 9512e73d1..cd796bf3a 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -1,10 +1,6 @@ #include "global.h" #include "main.h" #include "task.h" -#include "constants/flags.h" -#include "constants/vars.h" -#include "constants/items.h" -#include "constants/species.h" #include "malloc.h" #include "save.h" #include "util.h" @@ -24,419 +20,326 @@ #include "menu.h" #include "new_menu_helpers.h" #include "sound.h" - -struct UnkStruct_8479D34 -{ - s8 mapGroup; - s8 mapNum; - u8 filler[2]; - u8 flags1[8]; - u8 flags2[8]; - u8 flags3[8]; -}; +#include "renewable_hidden_items.h" +#include "constants/flags.h" +#include "constants/vars.h" +#include "constants/items.h" +#include "constants/species.h" +#include "constants/maps.h" +#include "constants/songs.h" +#include "constants/layouts.h" +#include "constants/trainers.h" +#include "constants/facility_trainer_classes.h" +#include "constants/map_objects.h" struct UnkStruct_203F458 { - /* 0x0000 */ u8 unk_0000; - /* 0x0004 */ struct TrainerTowerData unk_0004; + /* 0x0000 */ u8 floorIdx; + /* 0x0004 */ struct EReaderTrainerHillSet unk_0004; }; struct UnkStruct_203F45C { - /* 0x00 */ u8 unk_00[11]; - /* 0x0C */ u16 unk_0C[6]; - /* 0x18 */ u16 unk_18[6]; - /* 0x24 */ u16 unk_24[6]; - /* 0x30 */ u16 unk_30[6]; - /* 0x3C */ u8 unk_3C; - /* 0x3D */ u8 unk_3D; - /* 0x3E */ u8 unk_3E; + /* 0x00 */ u8 name[11]; + /* 0x0C */ u16 speechWin[6]; + /* 0x18 */ u16 speechLose[6]; + /* 0x24 */ u16 speechWin2[6]; + /* 0x30 */ u16 speechLose2[6]; + /* 0x3C */ u8 battleType; + /* 0x3D */ u8 facilityClass; + /* 0x3E */ u8 gender; }; -struct UnkStruct_8479ED8 +struct SinglesTrainerInfo { - u8 unk0; - u8 unk1; - bool8 unk2; + u8 mapObjGfx; + u8 facilityClass; + bool8 gender; }; -struct UnkStruct_847A024 +struct DoublesTrainerInfo { - u8 unk0; - u8 unk1; - u8 unk2; - bool8 unk3; - bool8 unk4; + u8 mapObjGfx1; + u8 mapObjGfx2; + u8 facilityClass; + bool8 gender1; + bool8 gender2; }; -struct UnkStruct_847A074 +struct TrainerEncounterMusicPairs { u8 unk0; u8 unk1; }; -EWRAM_DATA struct UnkStruct_203F458 * gUnknown_203F458 = NULL; -EWRAM_DATA struct UnkStruct_203F45C * gUnknown_203F45C = NULL; -EWRAM_DATA u8 unused_variable = 0; - -void sub_815D96C(void); -void sub_815DC8C(void); // setup -void sub_815DD2C(void); // teardown -void sub_815DD44(void); -void sub_815DDB0(void); -void sub_815DEFC(u16 * ecWords, u8 * dest); -void sub_815DF54(void); -void sub_815E068(u8 battleType, u8 facilityClass); -void sub_815E160(void); -void sub_815E1C0(void); -void sub_815E1F0(void); -void sub_815E218(void); -void sub_815E28C(void); -void sub_815E394(void); -void sub_815E408(void); -void sub_815E4B0(void); -void sub_815E56C(void); -void sub_815E5C4(void); -void sub_815E5F0(void); -void sub_815E658(void); -void sub_815E720(void); -void sub_815E88C(void); -void sub_815E8B4(void); -void sub_815E8CC(void); -void sub_815E908(void); -void sub_815E948(void); -void sub_815E9C8(void); -void sub_815E9FC(void); +static EWRAM_DATA struct UnkStruct_203F458 * sTrainerTowerState = NULL; +static EWRAM_DATA struct UnkStruct_203F45C * sTrainerTowerOpponent = NULL; +static EWRAM_DATA u8 sUnused_203F460 = 0; + +static void sub_815DC8C(void); // setup +static void sub_815DD2C(void); // teardown +static void sub_815DD44(void); +static void SetTrainerTowerNPCGraphics(void); +static void TT_ConvertEasyChatMessageToString(u16 *ecWords, u8 *dest); +static void sub_815DF54(void); +static void TrainerTowerGetOpponentTextColor(u8 battleType, u8 facilityClass); +static void sub_815E160(void); +static void sub_815E1C0(void); +static void sub_815E1F0(void); +static void TTSpecial_HasReachedTheRoof(void); +static void sub_815E28C(void); +static void sub_815E394(void); +static void sub_815E408(void); +static void sub_815E4B0(void); +static void TTSpecial_StartTimer(void); +static void sub_815E5C4(void); +static void sub_815E5F0(void); +static void sub_815E658(void); +static void sub_815E720(void); +static void sub_815E88C(void); +static void sub_815E8B4(void); +static void sub_815E8CC(void); +static void sub_815E908(void); +static void sub_815E948(void); +static void sub_815E9C8(void); +static void BuildEnemyParty(void); static s32 GetPartyMaxLevel(void); -void sub_815EC0C(void); -u32 sub_815EDDC(u32 *); -void sub_815EDF4(u32 *, u32); +static void ValidateOrResetCurTrainerTowerRecord(void); +static u32 GetTrainerTowerRecordTime(u32 *); +static void SetTrainerTowerRecordTime(u32 *, u32); extern const u8 gUnknown_83FE982[]; extern const u8 gUnknown_83FE998[]; extern const u8 *const gUnknown_83FE9C4[]; -const struct UnkStruct_8479D34 gUnknown_8479D34[] = { - { - 0x03, 0x26, - .flags1 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x27, - .flags1 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0x9a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x01, 0x1f, - .flags1 = {0x4c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x01, 0x22, - .flags1 = {0x53, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x41, - .flags1 = {0x40, 0x41, 0x42, 0x43, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x01, 0x02, - .flags1 = {0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0xff, 0xff}, - .flags2 = {0x54, 0x55, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x01, 0x6d, - .flags1 = {0x5b, 0x5d, 0x5e, 0x5f, 0x63, 0x64, 0x65, 0x66}, - .flags2 = {0x5b, 0x5d, 0x5e, 0x5f, 0x63, 0x64, 0x65, 0xff}, - .flags3 = {0x5a, 0x5c, 0x60, 0x61, 0x62, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x2e, - .flags1 = {0x6b, 0x6c, 0x6d, 0x6e, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0xff, 0xff}, - .flags3 = {0x6b, 0x6c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x30, - .flags1 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xa6, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x0f, - .flags1 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xa9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x39, - .flags1 = {0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x36, - .flags1 = {0xae, 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xaf, 0xb1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x3a, - .flags1 = {0xb2, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x3b, - .flags1 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, - { - 0x03, 0x3e, - .flags1 = {0xb9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags2 = {0xba, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - .flags3 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }, -}; - -const struct UnkStruct_8479ED8 gUnknown_8479ED8[] = { - {0x1c, 0x03, 0x01}, - {0x38, 0x04, 0x00}, - {0x25, 0x06, 0x01}, - {0x26, 0x07, 0x00}, - {0x29, 0x08, 0x00}, - {0x2a, 0x09, 0x01}, - {0x34, 0x0a, 0x00}, - {0x1c, 0x0b, 0x01}, - {0x1d, 0x0c, 0x01}, - {0x13, 0x0d, 0x00}, - {0x34, 0x0e, 0x00}, - {0x2d, 0x0f, 0x00}, - {0x36, 0x10, 0x00}, - {0x1a, 0x11, 0x00}, - {0x1a, 0x12, 0x00}, - {0x27, 0x13, 0x00}, - {0x34, 0x14, 0x00}, - {0x13, 0x15, 0x00}, - {0x17, 0x16, 0x01}, - {0x3d, 0x17, 0x00}, - {0x13, 0x1d, 0x00}, - {0x17, 0x1e, 0x01}, - {0x1e, 0x20, 0x00}, - {0x1f, 0x21, 0x01}, - {0x20, 0x22, 0x00}, - {0x23, 0x23, 0x01}, - {0x12, 0x24, 0x00}, - {0x39, 0x26, 0x00}, - {0x29, 0x2d, 0x00}, - {0x1a, 0x2e, 0x00}, - {0x10, 0x2f, 0x00}, - {0x18, 0x30, 0x01}, - {0x1d, 0x31, 0x01}, - {0x2e, 0x32, 0x01}, - {0x28, 0x33, 0x01}, - {0x3e, 0x35, 0x00}, - {0x1b, 0x38, 0x00}, - {0x19, 0x40, 0x00}, - {0x1c, 0x41, 0x01}, - {0x27, 0x42, 0x00}, - {0x28, 0x43, 0x01}, - {0x16, 0x47, 0x01}, - {0x14, 0x48, 0x00}, - {0x38, 0x49, 0x00}, - {0x12, 0x58, 0x00}, - {0x14, 0x59, 0x00}, - {0x16, 0x5a, 0x01}, - {0x3e, 0x5b, 0x00}, - {0x27, 0x5c, 0x00}, - {0x28, 0x5d, 0x01}, - {0x34, 0x5e, 0x00}, - {0x34, 0x5f, 0x00}, - {0x38, 0x60, 0x00}, - {0x35, 0x61, 0x00}, - {0x34, 0x62, 0x00}, - {0x1e, 0x63, 0x00}, - {0x39, 0x64, 0x00}, - {0x2d, 0x65, 0x00}, - {0x35, 0x66, 0x00}, - {0x20, 0x67, 0x00}, - {0x1d, 0x68, 0x01}, - {0x2e, 0x69, 0x01}, - {0x13, 0x6a, 0x00}, - {0x1a, 0x6b, 0x00}, - {0x1a, 0x6c, 0x00}, - {0x19, 0x6d, 0x00}, - {0x1a, 0x6e, 0x00}, - {0x36, 0x6f, 0x00}, - {0x37, 0x71, 0x00}, - {0x29, 0x74, 0x00}, - {0x2a, 0x75, 0x01}, - {0x3d, 0x7a, 0x00}, - {0x3a, 0x7d, 0x01}, - {0x17, 0x89, 0x01}, - {0x18, 0x8a, 0x01}, - {0x25, 0x8b, 0x01}, - {0x1c, 0x8c, 0x01}, - {0x27, 0x8d, 0x00}, - {0x28, 0x8e, 0x01}, - {0x1c, 0x8f, 0x01}, - {0x38, 0x90, 0x00}, - {0x1c, 0x91, 0x01}, - {0x16, 0x92, 0x01} +static const struct SinglesTrainerInfo sSingleBattleTrainerInfo[] = { + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_AROMA_LADY, FEMALE}, + {MAP_OBJ_GFX_HIKER, FACILITY_CLASS_RUIN_MANIAC, MALE}, + {MAP_OBJ_GFX_TUBER_F, FACILITY_CLASS_TUBER, FEMALE}, + {MAP_OBJ_GFX_TUBER_M_2, FACILITY_CLASS_TUBER_2, MALE}, + {MAP_OBJ_GFX_COOLTRAINER_M, FACILITY_CLASS_COOLTRAINER, MALE}, + {MAP_OBJ_GFX_COOLTRAINER_F, FACILITY_CLASS_COOLTRAINER_2, FEMALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_HEX_MANIAC, MALE}, + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_LADY, FEMALE}, + {MAP_OBJ_GFX_BEAUTY, FACILITY_CLASS_BEAUTY, FEMALE}, + {MAP_OBJ_GFX_BOY, FACILITY_CLASS_RICH_BOY, MALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_POKEMANIAC, MALE}, + {MAP_OBJ_GFX_SWIMMER_M_LAND, FACILITY_CLASS_SWIMMER_MALE, MALE}, + {MAP_OBJ_GFX_BLACKBELT, FACILITY_CLASS_BLACK_BELT, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_GUITARIST, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_KINDLER, MALE}, + {MAP_OBJ_GFX_CAMPER, FACILITY_CLASS_CAMPER, MALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_BUG_MANIAC, MALE}, + {MAP_OBJ_GFX_BOY, FACILITY_CLASS_PSYCHIC, MALE}, + {MAP_OBJ_GFX_WOMAN_1, FACILITY_CLASS_PSYCHIC_2, FEMALE}, + {MAP_OBJ_GFX_GENTLEMAN, FACILITY_CLASS_GENTLEMAN, MALE}, + {MAP_OBJ_GFX_BOY, FACILITY_CLASS_SCHOOL_KID, MALE}, + {MAP_OBJ_GFX_WOMAN_1, FACILITY_CLASS_SCHOOL_KID_2, FEMALE}, + {MAP_OBJ_GFX_BALDING_MAN, FACILITY_CLASS_POKEFAN, MALE}, + {MAP_OBJ_GFX_WOMAN_3, FACILITY_CLASS_POKEFAN_2, FEMALE}, + {MAP_OBJ_GFX_OLD_MAN_1, FACILITY_CLASS_EXPERT, MALE}, + {MAP_OBJ_GFX_OLD_WOMAN, FACILITY_CLASS_EXPERT_2, FEMALE}, + {MAP_OBJ_GFX_YOUNGSTER, FACILITY_CLASS_YOUNGSTER, MALE}, + {MAP_OBJ_GFX_FISHER, FACILITY_CLASS_FISHERMAN, MALE}, + {MAP_OBJ_GFX_COOLTRAINER_M, FACILITY_CLASS_DRAGON_TAMER, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_BIRD_KEEPER, MALE}, + {MAP_OBJ_GFX_LITTLE_BOY, FACILITY_CLASS_NINJA_BOY, MALE}, + {MAP_OBJ_GFX_BATTLE_GIRL, FACILITY_CLASS_BATTLE_GIRL, FEMALE}, + {MAP_OBJ_GFX_BEAUTY, FACILITY_CLASS_PARASOL_LADY, FEMALE}, + {MAP_OBJ_GFX_SWIMMER_F_LAND, FACILITY_CLASS_SWIMMER_FEMALE, FEMALE}, + {MAP_OBJ_GFX_PICNICKER, FACILITY_CLASS_PICNICKER, FEMALE}, + {MAP_OBJ_GFX_SAILOR, FACILITY_CLASS_SAILOR, MALE}, + {MAP_OBJ_GFX_FAT_MAN, FACILITY_CLASS_COLLECTOR, MALE}, + {MAP_OBJ_GFX_MAN, FACILITY_CLASS_PKMN_BREEDER, MALE}, + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_PKMN_BREEDER_2, FEMALE}, + {MAP_OBJ_GFX_CAMPER, FACILITY_CLASS_PKMN_RANGER, MALE}, + {MAP_OBJ_GFX_PICNICKER, FACILITY_CLASS_PKMN_RANGER_2, FEMALE}, + {MAP_OBJ_GFX_LASS, FACILITY_CLASS_LASS, FEMALE}, + {MAP_OBJ_GFX_BUG_CATCHER, FACILITY_CLASS_BUG_CATCHER, MALE}, + {MAP_OBJ_GFX_HIKER, FACILITY_CLASS_HIKER, MALE}, + {MAP_OBJ_GFX_YOUNGSTER, FACILITY_CLASS_YOUNGSTER_2, MALE}, + {MAP_OBJ_GFX_BUG_CATCHER, FACILITY_CLASS_BUG_CATCHER_2, MALE}, + {MAP_OBJ_GFX_LASS, FACILITY_CLASS_LASS_2, FEMALE}, + {MAP_OBJ_GFX_SAILOR, FACILITY_CLASS_SAILOR_2, MALE}, + {MAP_OBJ_GFX_CAMPER, FACILITY_CLASS_CAMPER_2, MALE}, + {MAP_OBJ_GFX_PICNICKER, FACILITY_CLASS_PICNICKER_2, FEMALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_POKEMANIAC_2, MALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_SUPER_NERD, MALE}, + {MAP_OBJ_GFX_HIKER, FACILITY_CLASS_HIKER_2, MALE}, + {MAP_OBJ_GFX_BIKER, FACILITY_CLASS_BIKER, MALE}, + {MAP_OBJ_GFX_SUPER_NERD, FACILITY_CLASS_BURGLAR, MALE}, + {MAP_OBJ_GFX_BALDING_MAN, FACILITY_CLASS_ENGINEER, MALE}, + {MAP_OBJ_GFX_FISHER, FACILITY_CLASS_FISHERMAN_2, MALE}, + {MAP_OBJ_GFX_SWIMMER_M_LAND, FACILITY_CLASS_SWIMMER_MALE_2, MALE}, + {MAP_OBJ_GFX_BIKER, FACILITY_CLASS_CUE_BALL, MALE}, + {MAP_OBJ_GFX_OLD_MAN_1, FACILITY_CLASS_GAMER, MALE}, + {MAP_OBJ_GFX_BEAUTY, FACILITY_CLASS_BEAUTY_2, FEMALE}, + {MAP_OBJ_GFX_SWIMMER_F_LAND, FACILITY_CLASS_SWIMMER_FEMALE_2, FEMALE}, + {MAP_OBJ_GFX_BOY, FACILITY_CLASS_PSYCHIC_3, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_ROCKER, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_JUGGLER, MALE}, + {MAP_OBJ_GFX_MAN, FACILITY_CLASS_TAMER, MALE}, + {MAP_OBJ_GFX_ROCKER, FACILITY_CLASS_BIRD_KEEPER_2, MALE}, + {MAP_OBJ_GFX_BLACKBELT, FACILITY_CLASS_BLACK_BELT_2, MALE}, + {MAP_OBJ_GFX_SCIENTIST, FACILITY_CLASS_SCIENTIST, MALE}, + {MAP_OBJ_GFX_COOLTRAINER_M, FACILITY_CLASS_COOLTRAINER_3, MALE}, + {MAP_OBJ_GFX_COOLTRAINER_F, FACILITY_CLASS_COOLTRAINER_4, FEMALE}, + {MAP_OBJ_GFX_GENTLEMAN, FACILITY_CLASS_GENTLEMAN_2, MALE}, + {MAP_OBJ_GFX_CHANNELER, FACILITY_CLASS_CHANNELER, FEMALE}, + {MAP_OBJ_GFX_WOMAN_1, FACILITY_CLASS_PSYCHIC_4, FEMALE}, + {MAP_OBJ_GFX_BATTLE_GIRL, FACILITY_CLASS_CRUSH_GIRL, FEMALE}, + {MAP_OBJ_GFX_TUBER_F, FACILITY_CLASS_TUBER_3, FEMALE}, + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_PKMN_BREEDER_3, FEMALE}, + {MAP_OBJ_GFX_CAMPER, FACILITY_CLASS_PKMN_RANGER_3, MALE}, + {MAP_OBJ_GFX_PICNICKER, FACILITY_CLASS_PKMN_RANGER_4, FEMALE}, + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_AROMA_LADY_2, FEMALE}, + {MAP_OBJ_GFX_HIKER, FACILITY_CLASS_RUIN_MANIAC_2, MALE}, + {MAP_OBJ_GFX_WOMAN_2, FACILITY_CLASS_LADY_2, FEMALE}, + {MAP_OBJ_GFX_LASS, FACILITY_CLASS_PAINTER, FEMALE} }; -const struct UnkStruct_847A024 gUnknown_847A024[] = { - {0x1d, 0x17, 0x1f, 0x01, 0x01}, - {0x11, 0x11, 0x34, 0x01, 0x01}, - {0x1d, 0x19, 0x4a, 0x01, 0x00}, - {0x20, 0x23, 0x4b, 0x00, 0x01}, - {0x26, 0x2e, 0x4c, 0x00, 0x01}, - {0x11, 0x11, 0x7e, 0x01, 0x01}, - {0x29, 0x2a, 0x7f, 0x00, 0x01}, - {0x1d, 0x19, 0x80, 0x01, 0x00}, - {0x18, 0x36, 0x81, 0x01, 0x00}, - {0x2e, 0x26, 0x82, 0x01, 0x00} +static const struct DoublesTrainerInfo sDoubleBattleTrainerInfo[] = { + {MAP_OBJ_GFX_BEAUTY, MAP_OBJ_GFX_WOMAN_1, FACILITY_CLASS_SR_AND_JR, FEMALE, FEMALE}, + {MAP_OBJ_GFX_LITTLE_GIRL, MAP_OBJ_GFX_LITTLE_GIRL, FACILITY_CLASS_TWINS, FEMALE, FEMALE}, + {MAP_OBJ_GFX_BEAUTY, MAP_OBJ_GFX_MAN, FACILITY_CLASS_YOUNG_COUPLE, FEMALE, MALE}, + {MAP_OBJ_GFX_OLD_MAN_1, MAP_OBJ_GFX_OLD_WOMAN, FACILITY_CLASS_OLD_COUPLE, MALE, FEMALE}, + {MAP_OBJ_GFX_TUBER_M_2, MAP_OBJ_GFX_SWIMMER_F_LAND, FACILITY_CLASS_SIS_AND_BRO, MALE, FEMALE}, + {MAP_OBJ_GFX_LITTLE_GIRL, MAP_OBJ_GFX_LITTLE_GIRL, FACILITY_CLASS_TWINS_2, FEMALE, FEMALE}, + {MAP_OBJ_GFX_COOLTRAINER_M, MAP_OBJ_GFX_COOLTRAINER_F, FACILITY_CLASS_COOL_COUPLE, MALE, FEMALE}, + {MAP_OBJ_GFX_BEAUTY, MAP_OBJ_GFX_MAN, FACILITY_CLASS_YOUNG_COUPLE_2, FEMALE, MALE}, + {MAP_OBJ_GFX_BATTLE_GIRL, MAP_OBJ_GFX_BLACKBELT, FACILITY_CLASS_CRUSH_KIN, FEMALE, MALE}, + {MAP_OBJ_GFX_SWIMMER_F_LAND, MAP_OBJ_GFX_TUBER_M_2, FACILITY_CLASS_SIS_AND_BRO_2, FEMALE, MALE} }; -const struct UnkStruct_847A074 gUnknown_847A074[105] = { - {0x03, 0x06}, - {0x37, 0x06}, - {0x02, 0x06}, - {0x67, 0x01}, - {0x04, 0x01}, - {0x24, 0x04}, - {0x4a, 0x01}, - {0x26, 0x01}, - {0x2a, 0x00}, - {0x42, 0x03}, - {0x1b, 0x09}, - {0x4c, 0x03}, - {0x44, 0x03}, - {0x21, 0x04}, - {0x43, 0x03}, - {0x6a, 0x01}, - {0x5d, 0x05}, - {0x56, 0x05}, - {0x09, 0x05}, - {0x11, 0x04}, - {0x48, 0x03}, - {0x3c, 0x00}, - {0x29, 0x00}, - {0x5c, 0x09}, - {0x28, 0x09}, - {0x06, 0x0c}, - {0x68, 0x0b}, - {0x05, 0x0b}, - {0x58, 0x0d}, - {0x16, 0x0d}, - {0x46, 0x08}, - {0x0f, 0x01}, - {0x3f, 0x03}, - {0x0e, 0x03}, - {0x5f, 0x04}, - {0x63, 0x04}, - {0x50, 0x04}, - {0x10, 0x04}, - {0x52, 0x03}, - {0x35, 0x04}, - {0x5b, 0x03}, - {0x14, 0x03}, - {0x3d, 0x00}, - {0x13, 0x00}, - {0x12, 0x0b}, - {0x30, 0x07}, - {0x38, 0x07}, - {0x2f, 0x07}, - {0x3b, 0x01}, - {0x31, 0x01}, - {0x4e, 0x0b}, - {0x3a, 0x00}, - {0x32, 0x00}, - {0x23, 0x03}, - {0x0d, 0x0d}, - {0x0a, 0x03}, - {0x49, 0x01}, - {0x0c, 0x01}, - {0x69, 0x01}, - {0x0b, 0x01}, - {0x25, 0x01}, - {0x3e, 0x02}, - {0x27, 0x02}, - {0x65, 0x01}, - {0x2d, 0x01}, - {0x61, 0x01}, - {0x2b, 0x03}, - {0x66, 0x05}, - {0x2e, 0x05}, - {0x2c, 0x00}, - {0x5e, 0x02}, - {0x34, 0x02}, - {0x51, 0x00}, - {0x59, 0x00}, - {0x40, 0x03}, - {0x55, 0x06}, - {0x53, 0x06}, - {0x4b, 0x04}, - {0x15, 0x04}, - {0x1a, 0x09}, - {0x57, 0x0a}, - {0x17, 0x01}, - {0x47, 0x03}, - {0x62, 0x01}, - {0x39, 0x00}, - {0x1d, 0x00}, - {0x1c, 0x04}, - {0x20, 0x00}, - {0x4f, 0x05}, - {0x22, 0x05}, - {0x45, 0x0b}, - {0x1f, 0x0b}, - {0x5a, 0x00}, - {0x1e, 0x00}, - {0x08, 0x00}, - {0x64, 0x02}, - {0x07, 0x02}, - {0x60, 0x08}, - {0x36, 0x08}, - {0x41, 0x0b}, - {0x33, 0x0b}, - {0x54, 0x00}, - {0x18, 0x01}, - {0x4d, 0x0b}, - {0x19, 0x00} +static const struct TrainerEncounterMusicPairs sTrainerEncounterMusicLUT[105] = { + {FACILITY_CLASS_AROMA_LADY, TRAINER_ENCOUNTER_MUSIC_AQUA}, + {FACILITY_CLASS_BOARDER_2, TRAINER_ENCOUNTER_MUSIC_AQUA}, + {FACILITY_CLASS_TEAM_AQUA_2, TRAINER_ENCOUNTER_MUSIC_AQUA}, + {FACILITY_CLASS_GAMER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_RUIN_MANIAC, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_YOUNGSTER, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_YOUNG_COUPLE, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_FISHERMAN, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_TRIATHLETE_4, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_PKMN_RANGER, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_LEADER_2, TRAINER_ENCOUNTER_MUSIC_TWINS}, + {FACILITY_CLASS_SIS_AND_BRO, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_MAGMA_LEADER, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_POKEFAN_2, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_PKMN_RANGER_2, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_PSYCHIC_3, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_PICNICKER_2, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_ELITE_FOUR_3, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_COOLTRAINER_2, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_GUITARIST, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_BUG_CATCHER, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_PKMN_TRAINER_4, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_TRIATHLETE_3, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_CAMPER_2, TRAINER_ENCOUNTER_MUSIC_TWINS}, + {FACILITY_CLASS_TRIATHLETE_2, TRAINER_ENCOUNTER_MUSIC_TWINS}, + {FACILITY_CLASS_TUBER, TRAINER_ENCOUNTER_MUSIC_INTERVIEWER}, + {FACILITY_CLASS_BEAUTY_2, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_INTERVIEWER, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_YOUNGSTER_2, TRAINER_ENCOUNTER_MUSIC_RICH}, + {FACILITY_CLASS_PSYCHIC_2, TRAINER_ENCOUNTER_MUSIC_RICH}, + {FACILITY_CLASS_TEAM_MAGMA_2, TRAINER_ENCOUNTER_MUSIC_SWIMMER}, + {FACILITY_CLASS_SWIMMER_MALE, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_PKMN_TRAINER_7, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_POKEMANIAC, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_SUPER_NERD, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_ENGINEER, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_MAGMA_ADMIN_2, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_BLACK_BELT, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_LEADER_5, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_SAILOR, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_SAILOR_2, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_BUG_MANIAC, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_PKMN_TRAINER_5, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_CAMPER, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_KINDLER, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_BATTLE_GIRL, TRAINER_ENCOUNTER_MUSIC_MAGMA}, + {FACILITY_CLASS_COLLECTOR, TRAINER_ENCOUNTER_MUSIC_MAGMA}, + {FACILITY_CLASS_NINJA_BOY, TRAINER_ENCOUNTER_MUSIC_MAGMA}, + {FACILITY_CLASS_PKMN_TRAINER_3, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_PARASOL_LADY, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_AQUA_ADMIN_2, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_PKMN_TRAINER_2, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_SWIMMER_FEMALE, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_EXPERT_2, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_RICH_BOY, TRAINER_ENCOUNTER_MUSIC_RICH}, + {FACILITY_CLASS_HEX_MANIAC, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_HIKER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_BEAUTY, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_SWIMMER_FEMALE_2, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_LADY, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_CHAMPION, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_PKMN_TRAINER_6, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_TRIATHLETE, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_SWIMMER_MALE_2, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_DRAGON_TAMER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_BIKER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_TRIATHLETE_5, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_CUE_BALL, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_BIRD_KEEPER, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_TRIATHLETE_6, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_POKEMANIAC_2, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_TWINS, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_LEADER_4, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_BUG_CATCHER_2, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_PKMN_BREEDER, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_LEADER_8, TRAINER_ENCOUNTER_MUSIC_AQUA}, + {FACILITY_CLASS_LEADER_6, TRAINER_ENCOUNTER_MUSIC_AQUA}, + {FACILITY_CLASS_OLD_COUPLE, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_PSYCHIC, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_LEADER, TRAINER_ENCOUNTER_MUSIC_TWINS}, + {FACILITY_CLASS_ELITE_FOUR_4, TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR}, + {FACILITY_CLASS_GENTLEMAN, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_LASS, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, + {FACILITY_CLASS_BURGLAR, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_PKMN_TRAINER, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_SCHOOL_KID, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_LEADER_3, TRAINER_ENCOUNTER_MUSIC_INTENSE}, + {FACILITY_CLASS_POKEFAN, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_MAGMA_ADMIN, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_EXPERT, TRAINER_ENCOUNTER_MUSIC_COOL}, + {FACILITY_CLASS_TEAM_MAGMA, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_SR_AND_JR, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_LASS_2, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_SCHOOL_KID_2, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_COOLTRAINER, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_FISHERMAN_2, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_TUBER_2, TRAINER_ENCOUNTER_MUSIC_GIRL}, + {FACILITY_CLASS_HIKER_2, TRAINER_ENCOUNTER_MUSIC_SWIMMER}, + {FACILITY_CLASS_BOARDER, TRAINER_ENCOUNTER_MUSIC_SWIMMER}, + {FACILITY_CLASS_PKMN_BREEDER_2, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_PICNICKER, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_LEADER_7, TRAINER_ENCOUNTER_MUSIC_MALE}, + {FACILITY_CLASS_ELITE_FOUR, TRAINER_ENCOUNTER_MUSIC_FEMALE}, + {FACILITY_CLASS_AQUA_ADMIN, TRAINER_ENCOUNTER_MUSIC_HIKER}, + {FACILITY_CLASS_ELITE_FOUR_2, TRAINER_ENCOUNTER_MUSIC_MALE} }; -const struct WindowTemplate gUnknown_847A218[] = { +static const struct WindowTemplate gUnknown_847A218[] = { {0, 3, 1, 27, 18, 15, 0x001}, DUMMY_WIN_TEMPLATE }; -const u32 gUnknown_847A228 = 0x70; // unused +static const u32 gUnknown_847A228 = 0x70; // unused -const u8 gUnknown_847A22C[3] = {0, 2, 3}; +static const u8 gUnknown_847A22C[3] = {0, 2, 3}; -void (*const gUnknown_847A230[])(void) = { +static void (*const gUnknown_847A230[])(void) = { sub_815DD44, sub_815DF54, sub_815E160, sub_815E1C0, sub_815E1F0, - sub_815E218, + TTSpecial_HasReachedTheRoof, sub_815E28C, sub_815E394, sub_815E408, sub_815E4B0, - sub_815E56C, + TTSpecial_StartTimer, sub_815E5C4, sub_815E5F0, sub_815E658, @@ -449,18 +352,18 @@ void (*const gUnknown_847A230[])(void) = { sub_815E9C8 }; -const u16 gUnknown_847A284[8][3] = { - {0x012a, 0x016e, 0x0176}, - {0x012b, 0x016f, 0x0177}, - {0x012c, 0x0170, 0x0178}, - {0x012d, 0x0171, 0x0179}, - {0x012e, 0x0172, 0x017a}, - {0x012f, 0x0173, 0x017b}, - {0x0130, 0x0174, 0x017c}, - {0x0131, 0x0175, 0x017d} +static const u16 sFloorLayouts[8][3] = { + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_1F, LAYOUT_UNUSED_LAYOUT_834BC2C, LAYOUT_UNUSED_LAYOUT_834D06C}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_2F, LAYOUT_UNUSED_LAYOUT_834BEB4, LAYOUT_UNUSED_LAYOUT_834D2F4}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_3F, LAYOUT_UNUSED_LAYOUT_834C13C, LAYOUT_UNUSED_LAYOUT_834D57C}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_4F, LAYOUT_UNUSED_LAYOUT_834C3C4, LAYOUT_UNUSED_LAYOUT_834D804}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_5F, LAYOUT_UNUSED_LAYOUT_834C64C, LAYOUT_UNUSED_LAYOUT_834DA8C}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_6F, LAYOUT_UNUSED_LAYOUT_834C8D4, LAYOUT_UNUSED_LAYOUT_834DD14}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_7F, LAYOUT_UNUSED_LAYOUT_834CB5C, LAYOUT_UNUSED_LAYOUT_834DF9C}, + {LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_8F, LAYOUT_UNUSED_LAYOUT_834CDE4, LAYOUT_UNUSED_LAYOUT_834E224} }; -const u16 gUnknown_847A2B4[] = { +static const u16 gUnknown_847A2B4[] = { ITEM_HP_UP, ITEM_PROTEIN, ITEM_IRON, @@ -478,24 +381,24 @@ const u16 gUnknown_847A2B4[] = { ITEM_UP_GRADE }; -const u16 gUnknown_847A2D2[] = { - 0x011d, - 0x011c, - 0x011c, - 0x011b, - 0x011d, - 0x011d, - 0x011b, - 0x011b, - 0x011d, - 0x011c, - 0x011d, - 0x011d, - 0x011d, - 0x011d +static const u16 gUnknown_847A2D2[] = { + MUS_SHOUNEN, + MUS_SHOUJO, + MUS_SHOUJO, + MUS_ROCKET, + MUS_SHOUNEN, + MUS_SHOUNEN, + MUS_ROCKET, + MUS_ROCKET, + MUS_SHOUNEN, + MUS_SHOUJO, + MUS_SHOUNEN, + MUS_SHOUNEN, + MUS_SHOUNEN, + MUS_SHOUNEN }; -const u8 gUnknown_847A2EE[][2] = { +static const u8 sSingleBattleChallengeMonIdxs[][2] = { {0x00, 0x02}, {0x01, 0x03}, {0x02, 0x04}, @@ -506,7 +409,7 @@ const u8 gUnknown_847A2EE[][2] = { {0x01, 0x04} }; -const u8 gUnknown_847A2FE[][2] = { +static const u8 sDoubleBattleChallengeMonIdxs[][2] = { {0x00, 0x01}, {0x01, 0x03}, {0x02, 0x00}, @@ -517,7 +420,7 @@ const u8 gUnknown_847A2FE[][2] = { {0x01, 0x05} }; -const u8 gUnknown_847A30E[][3] = { +static const u8 sKnockoutChallengeMonIdxs[][3] = { {0x00, 0x02, 0x04}, {0x01, 0x03, 0x05}, {0x02, 0x03, 0x01}, @@ -529,85 +432,7 @@ const u8 gUnknown_847A30E[][3] = { }; extern const struct Unk_203F458_Header gUnknown_84827AC; -extern const struct TrainerTowerTrainer *const gUnknown_84827B4[][8]; - -bool32 sub_815D834(void) -{ - // Stubbed out? - return FALSE; -} - -void sub_815D838(void) -{ - u8 i, j; - - for (i = 0; i < 15; i++) - { - const u8 * flags1 = gUnknown_8479D34[i].flags1; - const u8 * flags2 = gUnknown_8479D34[i].flags2; - const u8 * flags3 = gUnknown_8479D34[i].flags3; - for (j = 0; j < 8; j++) - { - if (flags1[j] != 0xFF) - FlagSet(FLAG_TRAINER_TOWER_START + flags1[j]); - if (flags2[j] != 0xFF) - FlagSet(FLAG_TRAINER_TOWER_START + flags2[j]); - if (flags3[j] != 0xFF) - FlagSet(FLAG_TRAINER_TOWER_START + flags3[j]); - } - } -} - -void sub_815D8C8(void) -{ - u16 var = VarGet(VAR_0x4023); - if (var < 1500) { - VarSet(VAR_0x4023, var + 1); - } -} - -void sub_815D8F8(void) -{ - u8 i; - u8 found_map = 0xFF; - for (i = 0; i < 15; i++) - { - if (gUnknown_8479D34[i].mapGroup == gSaveBlock1Ptr->location.mapGroup && gUnknown_8479D34[i].mapNum == gSaveBlock1Ptr->location.mapNum) - found_map = i; - } - - if (found_map == 0xFF) - return; - if (VarGet(VAR_0x4023) >= 1500) - { - VarSet(VAR_0x4023, 0); - sub_815D838(); - sub_815D96C(); - } -} - -void sub_815D96C(void) -{ - u8 i, j; - const u8 * flags; - u16 rval; - - for (i = 0; i < 15; i++) - { - rval = Random() % 100; - if (rval >= 90) - flags = gUnknown_8479D34[i].flags1; - else if (rval >= 60) - flags = gUnknown_8479D34[i].flags2; - else - flags = gUnknown_8479D34[i].flags3; - for (j = 0; j < 8; j++) - { - if (flags[j] != 0xFF) - FlagClear(FLAG_TRAINER_TOWER_START + flags[j]); - } - } -} +extern const struct TrainerTowerFloor *const gUnknown_84827B4[][8]; void sub_815D9E8(void) { @@ -618,17 +443,17 @@ void sub_815D9E8(void) u8 sub_815DA10(void) { - return gFacilityClassToTrainerClass[gUnknown_203F45C->unk_3D]; + return gFacilityClassToTrainerClass[sTrainerTowerOpponent->facilityClass]; } -void sub_815DA28(u8 * dest) +void sub_815DA28(u8 *dest) { - StringCopyN(dest, gUnknown_203F45C->unk_00, 11); + StringCopyN(dest, sTrainerTowerOpponent->name, 11); } u8 GetTrainerTowerTrainerFrontSpriteId(void) { - return gFacilityClassToPicIndex[gUnknown_203F45C->unk_3D]; + return gFacilityClassToPicIndex[sTrainerTowerOpponent->facilityClass]; } void InitTrainerTowerBattleStruct(void) @@ -637,91 +462,91 @@ void InitTrainerTowerBattleStruct(void) s32 r9; sub_815DC8C(); - gUnknown_203F45C = AllocZeroed(sizeof(*gUnknown_203F45C)); + sTrainerTowerOpponent = AllocZeroed(sizeof(*sTrainerTowerOpponent)); r10 = VarGet(VAR_0x4001); - StringCopyN(gUnknown_203F45C->unk_00, gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10].unk_000, 11); + StringCopyN(sTrainerTowerOpponent->name, sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].name, 11); for (r9 = 0; r9 < 6; r9++) { - gUnknown_203F45C->unk_0C[r9] = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10].unk_01A[r9]; - gUnknown_203F45C->unk_18[r9] = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10].unk_026[r9]; + sTrainerTowerOpponent->speechWin[r9] = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].speechWin[r9]; + sTrainerTowerOpponent->speechLose[r9] = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].speechLose[r9]; - if (gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002 == 1) + if (sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType == 1) { - gUnknown_203F45C->unk_24[r9] = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10 + 1].unk_01A[r9]; - gUnknown_203F45C->unk_30[r9] = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10 + 1].unk_026[r9]; + sTrainerTowerOpponent->speechWin2[r9] = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10 + 1].speechWin[r9]; + sTrainerTowerOpponent->speechLose2[r9] = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10 + 1].speechLose[r9]; } } - gUnknown_203F45C->unk_3C = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002; - gUnknown_203F45C->unk_3D = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10].unk_00B; - gUnknown_203F45C->unk_3E = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r10].unk_00C; + sTrainerTowerOpponent->battleType = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType; + sTrainerTowerOpponent->facilityClass = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].facilityClass; + sTrainerTowerOpponent->gender = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r10].gender; SetVBlankCounter1Ptr(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0); sub_815DD2C(); } void FreeTrainerTowerBattleStruct(void) { - Free(gUnknown_203F45C); - gUnknown_203F45C = NULL; + Free(sTrainerTowerOpponent); + sTrainerTowerOpponent = NULL; } -void sub_815DBF4(u8 * dest, u8 opponentIdx) +void sub_815DBF4(u8 *dest, u8 opponentIdx) // TTower_GetBeforeBattleMessage? { VarSet(VAR_0x4003, opponentIdx); - sub_815E068(gUnknown_203F45C->unk_3C, gUnknown_203F45C->unk_3D); + TrainerTowerGetOpponentTextColor(sTrainerTowerOpponent->battleType, sTrainerTowerOpponent->facilityClass); if (opponentIdx == 0) - sub_815DEFC(gUnknown_203F45C->unk_0C, dest); + TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechWin, dest); else - sub_815DEFC(gUnknown_203F45C->unk_24, dest); + TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechWin2, dest); } -void sub_815DC40(u8 * dest, u8 opponentIdx) +void sub_815DC40(u8 *dest, u8 opponentIdx) // TTower_GetAfterBattleMessage? { VarSet(VAR_0x4003, opponentIdx); - sub_815E068(gUnknown_203F45C->unk_3C, gUnknown_203F45C->unk_3D); + TrainerTowerGetOpponentTextColor(sTrainerTowerOpponent->battleType, sTrainerTowerOpponent->facilityClass); if (opponentIdx == 0) - sub_815DEFC(gUnknown_203F45C->unk_18, dest); + TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechLose, dest); else - sub_815DEFC(gUnknown_203F45C->unk_30, dest); + TT_ConvertEasyChatMessageToString(sTrainerTowerOpponent->speechLose2, dest); } #ifdef NONMATCHING -void sub_815DC8C(void) // fakematching +static void sub_815DC8C(void) // fakematching { u32 whichTimer = gSaveBlock1Ptr->unkArrayIdx; s32 r4; - const struct TrainerTowerTrainer *const * r7; + const struct TrainerTowerFloor *const * r7; - gUnknown_203F458 = AllocZeroed(sizeof(*gUnknown_203F458)); - gUnknown_203F458->unk_0000 = gMapHeader.mapDataId - 0x2A; + sTrainerTowerState = AllocZeroed(sizeof(*sTrainerTowerState)); + sTrainerTowerState->floorIdx = gMapHeader.mapDataId - 42; if (sub_815D834() == TRUE) - CEReaderTool_LoadTrainerTower(&gUnknown_203F458->unk_0004); + CEReaderTool_LoadTrainerTower(&sTrainerTowerState->unk_0004); else { - struct UnkStruct_203F458 * r0_ = gUnknown_203F458; + struct UnkStruct_203F458 * r0_ = sTrainerTowerState; const struct Unk_203F458_Header * r1 = &gUnknown_84827AC; // *r0_ = *r1; - memcpy(&r0_->unk_0004.unk_0000, r1, sizeof(struct Unk_203F458_Header)); -// gUnknown_203F458->unk_0004.unk_0000 = gUnknown_84827AC; + memcpy(&r0_->unk_0004.floorIdx, r1, sizeof(struct Unk_203F458_Header)); +// sTrainerTowerState->unk_0004.floorIdx = gUnknown_84827AC; r7 = gUnknown_84827B4[whichTimer]; for (r4 = 0; r4 < 8; r4++) { - void * r0 = gUnknown_203F458; - r0 = r4 * sizeof(struct TrainerTowerTrainer) + r0; - r0 += offsetof(struct UnkStruct_203F458, unk_0004.trainers); - memcpy(r0, r7[r4], sizeof(struct TrainerTowerTrainer)); + void * r0 = sTrainerTowerState; + r0 = r4 * sizeof(struct TrainerTowerFloor) + r0; + r0 += offsetof(struct UnkStruct_203F458, unk_0004.floors); + memcpy(r0, r7[r4], sizeof(struct TrainerTowerFloor)); // r0[r4] = *r7[r4]; } - gUnknown_203F458->unk_0004.unk4 = CalcByteArraySum((void *)gUnknown_203F458->unk_0004.trainers, sizeof(gUnknown_203F458->unk_0004.trainers)); - sub_815EC0C(); + sTrainerTowerState->unk_0004.unk4 = CalcByteArraySum((void *)sTrainerTowerState->unk_0004.floors, sizeof(sTrainerTowerState->unk_0004.floors)); + ValidateOrResetCurTrainerTowerRecord(); } } #else NAKED -void sub_815DC8C(void) +static void sub_815DC8C(void) { asm_unified("\tpush {r4-r7,lr}\n" "\tldr r0, _0815DCBC @ =gSaveBlock1Ptr\n" @@ -729,7 +554,7 @@ void sub_815DC8C(void) "\tldr r1, _0815DCC0 @ =0x00003d34\n" "\tadds r0, r1\n" "\tldr r5, [r0]\n" - "\tldr r4, _0815DCC4 @ =gUnknown_203F458\n" + "\tldr r4, _0815DCC4 @ =sTrainerTowerState\n" "\tldr r0, _0815DCC8 @ =0x00001f0c\n" "\tbl AllocZeroed\n" "\tstr r0, [r4]\n" @@ -747,7 +572,7 @@ void sub_815DC8C(void) "\t.align 2, 0\n" "_0815DCBC: .4byte gSaveBlock1Ptr\n" "_0815DCC0: .4byte 0x00003d34\n" - "_0815DCC4: .4byte gUnknown_203F458\n" + "_0815DCC4: .4byte sTrainerTowerState\n" "_0815DCC8: .4byte 0x00001f0c\n" "_0815DCCC: .4byte gMapHeader\n" "_0815DCD0:\n" @@ -762,7 +587,7 @@ void sub_815DC8C(void) "\tmovs r5, 0\n" "\tmovs r4, 0x7\n" "_0815DCE6:\n" - "\tldr r6, _0815DD28 @ =gUnknown_203F458\n" + "\tldr r6, _0815DD28 @ =sTrainerTowerState\n" "\tldr r0, [r6]\n" "\tadds r0, r5, r0\n" "\tadds r0, 0xC\n" @@ -783,7 +608,7 @@ void sub_815DC8C(void) "\tbl CalcByteArraySum\n" "\tldr r1, [r6]\n" "\tstr r0, [r1, 0x8]\n" - "\tbl sub_815EC0C\n" + "\tbl ValidateOrResetCurTrainerTowerRecord\n" "_0815DD18:\n" "\tpop {r4-r7}\n" "\tpop {r0}\n" @@ -791,100 +616,100 @@ void sub_815DC8C(void) "\t.align 2, 0\n" "_0815DD20: .4byte gUnknown_84827AC\n" "_0815DD24: .4byte gUnknown_84827B4\n" - "_0815DD28: .4byte gUnknown_203F458"); + "_0815DD28: .4byte sTrainerTowerState"); } #endif // NONMATCHING -void sub_815DD2C(void) +static void sub_815DD2C(void) { - Free(gUnknown_203F458); - gUnknown_203F458 = NULL; + Free(sTrainerTowerState); + sTrainerTowerState = NULL; } -void sub_815DD44(void) +static void sub_815DD44(void) { - if (gMapHeader.mapDataId - 0x129 > gUnknown_203F458->unk_0004.count) + if (gMapHeader.mapDataId - LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_LOBBY > sTrainerTowerState->unk_0004.count) { gSpecialVar_Result = 3; - SetCurrentMapLayout(0x132); + SetCurrentMapLayout(LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_ROOF); } else { - gSpecialVar_Result = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002; - SetCurrentMapLayout(gUnknown_847A284[gUnknown_203F458->unk_0000][gSpecialVar_Result]); - sub_815DDB0(); + gSpecialVar_Result = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType; + SetCurrentMapLayout(sFloorLayouts[sTrainerTowerState->floorIdx][gSpecialVar_Result]); + SetTrainerTowerNPCGraphics(); } } -void sub_815DDB0(void) +static void SetTrainerTowerNPCGraphics(void) { s32 r3, r4; u8 r1, r2, r4_; - switch (gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002) + switch (sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType) { - case 0: - r2 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[0].unk_00B; - for (r3 = 0; r3 < NELEMS(gUnknown_8479ED8); r3++) - { - if (gUnknown_8479ED8[r3].unk1 == r2) - break; - } - if (r3 != NELEMS(gUnknown_8479ED8)) - r1 = gUnknown_8479ED8[r3].unk0; - else - r1 = 18; - VarSet(VAR_0x4011, r1); - break; - case 1: - r2 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[0].unk_00B; - for (r3 = 0; r3 < NELEMS(gUnknown_847A024); r3++) + case 0: + r2 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[0].facilityClass; + for (r3 = 0; r3 < NELEMS(sSingleBattleTrainerInfo); r3++) + { + if (sSingleBattleTrainerInfo[r3].facilityClass == r2) + break; + } + if (r3 != NELEMS(sSingleBattleTrainerInfo)) + r1 = sSingleBattleTrainerInfo[r3].mapObjGfx; + else + r1 = 18; + VarSet(VAR_OBJ_GFX_ID_1, r1); + break; + case 1: + r2 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[0].facilityClass; + for (r3 = 0; r3 < NELEMS(sDoubleBattleTrainerInfo); r3++) + { + if (sDoubleBattleTrainerInfo[r3].facilityClass == r2) + break; + } + if (r3 != NELEMS(sDoubleBattleTrainerInfo)) + { + r1 = sDoubleBattleTrainerInfo[r3].mapObjGfx1; + r4_ = sDoubleBattleTrainerInfo[r3].mapObjGfx2; + } + else + { + r1 = MAP_OBJ_GFX_YOUNGSTER; + r4_ = MAP_OBJ_GFX_YOUNGSTER; + } + VarSet(VAR_OBJ_GFX_ID_0, r1); + VarSet(VAR_OBJ_GFX_ID_3, r4_); + break; + case 2: + for (r4 = 0; r4 < 3; r4++) + { + r2 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r4].facilityClass; + for (r3 = 0; r3 < NELEMS(sSingleBattleTrainerInfo); r3++) { - if (gUnknown_847A024[r3].unk2 == r2) + if (sSingleBattleTrainerInfo[r3].facilityClass == r2) break; } - if (r3 != NELEMS(gUnknown_847A024)) - { - r1 = gUnknown_847A024[r3].unk0; - r4_ = gUnknown_847A024[r3].unk1; - } + if (r3 != NELEMS(sSingleBattleTrainerInfo)) + r1 = sSingleBattleTrainerInfo[r3].mapObjGfx; else + r1 = MAP_OBJ_GFX_YOUNGSTER; + switch (r4) { - r1 = 18; - r4_ = 18; - } - VarSet(VAR_0x4010, r1); - VarSet(VAR_0x4013, r4_); - break; - case 2: - for (r4 = 0; r4 < 3; r4++) - { - r2 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_00B; - for (r3 = 0; r3 < NELEMS(gUnknown_8479ED8); r3++) - { - if (gUnknown_8479ED8[r3].unk1 == r2) - break; - } - if (r3 != NELEMS(gUnknown_8479ED8)) - r1 = gUnknown_8479ED8[r3].unk0; - else - r1 = 18; - switch (r4) - { - case 0: - VarSet(VAR_0x4012, r1); - break; - case 1: - VarSet(VAR_0x4010, r1); - break; - case 2: - VarSet(VAR_0x4011, r1); - break; - } + case 0: + VarSet(VAR_OBJ_GFX_ID_2, r1); + break; + case 1: + VarSet(VAR_OBJ_GFX_ID_0, r1); + break; + case 2: + VarSet(VAR_OBJ_GFX_ID_1, r1); + break; } + } } } -void sub_815DEFC(u16 * ecWords, u8 * dest) +static void TT_ConvertEasyChatMessageToString(u16 *ecWords, u8 *dest) { s32 r1; ConvertEasyChatWordsToString(dest, ecWords, 3, 2); @@ -901,40 +726,40 @@ void sub_815DEFC(u16 * ecWords, u8 * dest) } #ifdef NONMATCHING -void sub_815DF54(void) +static void sub_815DF54(void) { u16 r4 = gSpecialVar_0x8006; u8 r1; - u8 r5 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002; + u8 r5 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType; // HOW DO I MATCH THIS CONTROL FLOW?!?! - r1 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r5 == 1 ? 0 : r4].unk_00B; + r1 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r5 == 1 ? 0 : r4].facilityClass; switch (gSpecialVar_0x8005) { - case 2: - sub_815E068(r5, r1); - sub_815DEFC(gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_00E, gStringVar4); - break; - case 3: - sub_815E068(r5, r1); - sub_815DEFC(gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_01A, gStringVar4); - break; - case 4: - sub_815E068(r5, r1); - sub_815DEFC(gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_026, gStringVar4); - break; - case 5: - sub_815DEFC(gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_032, gStringVar4); - break; + case 2: + TrainerTowerGetOpponentTextColor(r5, r1); + TT_ConvertEasyChatMessageToString(sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r4].speechBefore, gStringVar4); + break; + case 3: + TrainerTowerGetOpponentTextColor(r5, r1); + TT_ConvertEasyChatMessageToString(sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r4].speechWin, gStringVar4); + break; + case 4: + TrainerTowerGetOpponentTextColor(r5, r1); + TT_ConvertEasyChatMessageToString(sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r4].speechLose, gStringVar4); + break; + case 5: + TT_ConvertEasyChatMessageToString(sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[r4].speechAfter, gStringVar4); + break; } } #else NAKED -void sub_815DF54(void) +static void sub_815DF54(void) { asm_unified("\tpush {r4,r5,lr}\n" "\tldr r0, _0815DF90 @ =gSpecialVar_0x8006\n" "\tldrh r4, [r0]\n" - "\tldr r2, _0815DF94 @ =gUnknown_203F458\n" + "\tldr r2, _0815DF94 @ =sTrainerTowerState\n" "\tldr r3, [r2]\n" "\tldrb r1, [r3]\n" "\tlsls r0, r1, 5\n" @@ -964,7 +789,7 @@ void sub_815DF54(void) "\tb _0815E05C\n" "\t.align 2, 0\n" "_0815DF90: .4byte gSpecialVar_0x8006\n" - "_0815DF94: .4byte gUnknown_203F458\n" + "_0815DF94: .4byte sTrainerTowerState\n" "_0815DF98: .4byte gSpecialVar_0x8005\n" "_0815DF9C:\n" "\tcmp r0, 0x4\n" @@ -974,8 +799,8 @@ void sub_815DF54(void) "\tb _0815E05C\n" "_0815DFA6:\n" "\tadds r0, r5, 0\n" - "\tbl sub_815E068\n" - "\tldr r0, _0815DFD0 @ =gUnknown_203F458\n" + "\tbl TrainerTowerGetOpponentTextColor\n" + "\tldr r0, _0815DFD0 @ =sTrainerTowerState\n" "\tldr r0, [r0]\n" "\tldrb r2, [r0]\n" "\tlsls r1, r2, 5\n" @@ -993,11 +818,11 @@ void sub_815DF54(void) "\tadds r0, 0xE\n" "\tb _0815E026\n" "\t.align 2, 0\n" - "_0815DFD0: .4byte gUnknown_203F458\n" + "_0815DFD0: .4byte sTrainerTowerState\n" "_0815DFD4:\n" "\tadds r0, r5, 0\n" - "\tbl sub_815E068\n" - "\tldr r0, _0815DFFC @ =gUnknown_203F458\n" + "\tbl TrainerTowerGetOpponentTextColor\n" + "\tldr r0, _0815DFFC @ =sTrainerTowerState\n" "\tldr r0, [r0]\n" "\tldrb r2, [r0]\n" "\tlsls r1, r2, 5\n" @@ -1015,11 +840,11 @@ void sub_815DF54(void) "\tadds r0, 0x1A\n" "\tb _0815E026\n" "\t.align 2, 0\n" - "_0815DFFC: .4byte gUnknown_203F458\n" + "_0815DFFC: .4byte sTrainerTowerState\n" "_0815E000:\n" "\tadds r0, r5, 0\n" - "\tbl sub_815E068\n" - "\tldr r0, _0815E030 @ =gUnknown_203F458\n" + "\tbl TrainerTowerGetOpponentTextColor\n" + "\tldr r0, _0815E030 @ =sTrainerTowerState\n" "\tldr r0, [r0]\n" "\tldrb r2, [r0]\n" "\tlsls r1, r2, 5\n" @@ -1037,10 +862,10 @@ void sub_815DF54(void) "\tadds r0, 0x26\n" "_0815E026:\n" "\tldr r1, _0815E034 @ =gStringVar4\n" - "\tbl sub_815DEFC\n" + "\tbl TT_ConvertEasyChatMessageToString\n" "\tb _0815E05C\n" "\t.align 2, 0\n" - "_0815E030: .4byte gUnknown_203F458\n" + "_0815E030: .4byte sTrainerTowerState\n" "_0815E034: .4byte gStringVar4\n" "_0815E038:\n" "\tldr r0, [r2]\n" @@ -1059,7 +884,7 @@ void sub_815DF54(void) "\tadds r0, r1\n" "\tadds r0, 0x32\n" "\tldr r1, _0815E064 @ =gStringVar4\n" - "\tbl sub_815DEFC\n" + "\tbl TT_ConvertEasyChatMessageToString\n" "_0815E05C:\n" "\tpop {r4,r5}\n" "\tpop {r0}\n" @@ -1069,95 +894,95 @@ void sub_815DF54(void) } #endif // NONMATCHING -void sub_815E068(u8 battleType, u8 facilityClass) +static void TrainerTowerGetOpponentTextColor(u8 battleType, u8 facilityClass) { u16 r5 = FALSE; s32 r4; switch (battleType) { - case 0: - case 2: - for (r4 = 0; r4 < NELEMS(gUnknown_8479ED8); r4++) - { - if (gUnknown_8479ED8[r4].unk1 == facilityClass) - break; - } - if (r4 != NELEMS(gUnknown_8479ED8)) - r5 = gUnknown_8479ED8[r4].unk2; - break; - case 1: - for (r4 = 0; r4 < NELEMS(gUnknown_847A024); r4++) - { - if (gUnknown_847A024[r4].unk2 == facilityClass) - break; - } - if (r4 != NELEMS(gUnknown_847A024)) - { - if (VarGet(VAR_0x4003)) - r5 = gUnknown_847A024[r4].unk4; - else - r5 = gUnknown_847A024[r4].unk3; - } - break; + case 0: + case 2: + for (r4 = 0; r4 < NELEMS(sSingleBattleTrainerInfo); r4++) + { + if (sSingleBattleTrainerInfo[r4].facilityClass == facilityClass) + break; + } + if (r4 != NELEMS(sSingleBattleTrainerInfo)) + r5 = sSingleBattleTrainerInfo[r4].gender; + break; + case 1: + for (r4 = 0; r4 < NELEMS(sDoubleBattleTrainerInfo); r4++) + { + if (sDoubleBattleTrainerInfo[r4].facilityClass == facilityClass) + break; + } + if (r4 != NELEMS(sDoubleBattleTrainerInfo)) + { + if (VarGet(VAR_0x4003)) + r5 = sDoubleBattleTrainerInfo[r4].gender2; + else + r5 = sDoubleBattleTrainerInfo[r4].gender1; + } + break; } - gUnknown_20370DC = gUnknown_20370DA; - gUnknown_20370DA = r5; + gSpecialVar_PrevTextColor = gSpecialVar_TextColor; + gSpecialVar_TextColor = r5; } -void sub_815E114(void) +static void sub_815E114(void) { SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); } -void sub_815E124(u8 taskId) +static void sub_815E124(u8 taskId) { if (BT_IsDone() == TRUE) { gMain.savedCallback = sub_815E114; CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(sub_800FD9C); + SetMainCallback2(CB2_InitBattle); DestroyTask(taskId); } } -void sub_815E160(void) +static void sub_815E160(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_TRAINER_TOWER; - if (gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002 == 1) + if (sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType == 1) gBattleTypeFlags |= BATTLE_TYPE_DOUBLE; gTrainerBattleOpponent_A = 0; - sub_815E9FC(); + BuildEnemyParty(); CreateTask(sub_815E124, 1); PlayMapChosenOrBattleBGM(0); BT_StartOnField(sub_8080060()); } -void sub_815E1C0(void) +static void sub_815E1C0(void) { if (!gSpecialVar_0x8005) - gSpecialVar_Result = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002; + gSpecialVar_Result = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType; } -void sub_815E1F0(void) +static void sub_815E1F0(void) { gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8++; } -void sub_815E218(void) +static void TTSpecial_HasReachedTheRoof(void) { u16 mapDataId = gMapHeader.mapDataId; - if (mapDataId - 0x12A == gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8 && mapDataId - 0x129 <= gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_001) + if (mapDataId - LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_1F == gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8 && mapDataId - LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_LOBBY <= sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].floorIdx) gSpecialVar_Result = FALSE; else gSpecialVar_Result = TRUE; } -void sub_815E28C(void) +static void sub_815E28C(void) { gSaveBlock1Ptr->unkArrayIdx = gSpecialVar_0x8005; if (gSaveBlock1Ptr->unkArrayIdx >= NELEMS(gSaveBlock1Ptr->unkArray)) gSaveBlock1Ptr->unkArrayIdx = 0; - sub_815EC0C(); + ValidateOrResetCurTrainerTowerRecord(); if (!sub_815D834()) gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_5 = TRUE; else @@ -1169,7 +994,7 @@ void sub_815E28C(void) gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_1 = FALSE; } -void sub_815E394(void) +static void sub_815E394(void) { DisableVBlankCounter1(); gSpecialVar_Result = 0; @@ -1180,9 +1005,9 @@ void sub_815E394(void) gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_2 = TRUE; } -void sub_815E408(void) +static void sub_815E408(void) { - u16 itemId = gUnknown_847A2B4[gUnknown_203F458->unk_0004.trainers->unk_003]; + u16 itemId = gUnknown_847A2B4[sTrainerTowerState->unk_0004.floors->prize]; if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_0) gSpecialVar_Result = 2; else if (AddBagItem(itemId, 1) == 1) @@ -1195,13 +1020,13 @@ void sub_815E408(void) gSpecialVar_Result = 1; } -void sub_815E4B0(void) +static void sub_815E4B0(void) { if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_1) gSpecialVar_Result = 2; - else if (sub_815EDDC(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4) > gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0) + else if (GetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4) > gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0) { - sub_815EDF4(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4, gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0); + SetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4, gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0); gSpecialVar_Result = 0; } else @@ -1209,7 +1034,7 @@ void sub_815E4B0(void) gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_1 = TRUE; } -void sub_815E56C(void) +static void TTSpecial_StartTimer(void) { if (!gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_2) { @@ -1220,12 +1045,12 @@ void sub_815E56C(void) } } -void sub_815E5C4(void) +static void sub_815E5C4(void) { gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_3 = 1; } -void sub_815E5F0(void) +static void sub_815E5F0(void) { if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_3) { @@ -1259,7 +1084,7 @@ void sub_815E5F0(void) ConvertIntToDecimalStringN(gStringVar3, centiseconds, STR_CONV_MODE_LEADING_ZEROS, 2); \ }) -void sub_815E658(void) +static void sub_815E658(void) { if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0 >= 215999) { @@ -1270,13 +1095,12 @@ void sub_815E658(void) PRINT_TOWER_TIME(gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk0); } -void sub_815E720(void) +static void sub_815E720(void) { u8 windowId; s32 i; - s32 minutes, seconds, centiseconds; - sub_815EC0C(); + ValidateOrResetCurTrainerTowerRecord(); windowId = AddWindow(gUnknown_847A218); LoadStdWindowFrameGfx(); DrawStdWindowFrame(windowId, FALSE); @@ -1284,7 +1108,7 @@ void sub_815E720(void) for (i = 0; i < 4; i++) { - PRINT_TOWER_TIME(sub_815EDDC(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4)); + PRINT_TOWER_TIME(GetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4)); StringExpandPlaceholders(gStringVar4, gUnknown_83FE998); AddTextPrinterParameterized(windowId, 2, gUnknown_83FE9C4[i - 1], 0x18, 0x24 + 0x14 * i, 0xFF, NULL); @@ -1296,23 +1120,23 @@ void sub_815E720(void) VarSet(VAR_0x4001, windowId); } -void sub_815E88C(void) +static void sub_815E88C(void) { u8 windowId = VarGet(VAR_0x4001); ClearStdWindowAndFrameToTransparent(windowId, TRUE); RemoveWindow(windowId); } -void sub_815E8B4(void) +static void sub_815E8B4(void) { gSpecialVar_Result = GetMonsStateToDoubles(); } -void sub_815E8CC(void) +static void sub_815E8CC(void) { - if (gUnknown_203F458->unk_0004.count != gUnknown_203F458->unk_0004.trainers[0].unk_001) + if (sTrainerTowerState->unk_0004.count != sTrainerTowerState->unk_0004.floors[0].floorIdx) { - ConvertIntToDecimalStringN(gStringVar1, gUnknown_203F458->unk_0004.count, STR_CONV_MODE_LEFT_ALIGN, 1); + ConvertIntToDecimalStringN(gStringVar1, sTrainerTowerState->unk_0004.count, STR_CONV_MODE_LEFT_ALIGN, 1); gSpecialVar_Result = TRUE; } else @@ -1321,9 +1145,9 @@ void sub_815E8CC(void) } } -void sub_815E908(void) +static void sub_815E908(void) { - if (gMapHeader.mapDataId == 0x0129 && VarGet(VAR_0x4082) == 0) + if (gMapHeader.mapDataId == LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_LOBBY && VarGet(VAR_MAP_SCENE_TRAINER_TOWER) == 0) { gSpecialVar_Result = FALSE; } @@ -1333,20 +1157,20 @@ void sub_815E908(void) } } -void sub_815E948(void) +static void sub_815E948(void) { s32 i; u16 var_4001 = VarGet(VAR_0x4001); - u8 r1 = gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[var_4001].unk_00B; + u8 r1 = sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[var_4001].facilityClass; - for (i = 0; i < NELEMS(gUnknown_847A074); i++) + for (i = 0; i < NELEMS(sTrainerEncounterMusicLUT); i++) { - if (gUnknown_847A074[i].unk0 == gFacilityClassToTrainerClass[r1]) + if (sTrainerEncounterMusicLUT[i].unk0 == gFacilityClassToTrainerClass[r1]) break; } - if (i != NELEMS(gUnknown_847A074)) + if (i != NELEMS(sTrainerEncounterMusicLUT)) { - var_4001 = gUnknown_847A074[i].unk1; + var_4001 = sTrainerEncounterMusicLUT[i].unk1; } else { @@ -1355,45 +1179,46 @@ void sub_815E948(void) PlayNewMapMusic(gUnknown_847A2D2[var_4001]); } -void sub_815E9C8(void) +static void sub_815E9C8(void) { gSpecialVar_Result = gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_2; } -void sub_815E9FC(void) +static void BuildEnemyParty(void) { - u16 r4 = VarGet(VAR_0x4001); - s32 r9 = GetPartyMaxLevel(); - u8 r5 = gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8; - s32 r6; - u8 r2; + u16 trainerIdx = VarGet(VAR_0x4001); + s32 level = GetPartyMaxLevel(); + u8 floorIdx = gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk8; + s32 i; + u8 monIdx; ZeroEnemyPartyMons(); - switch (gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_002) + switch (sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].challengeType) { - case 0: - default: - for (r6 = 0; r6 < 2; r6++) - { - r2 = gUnknown_847A2EE[r5][r6]; - gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_040[r2].level = r9; - CreateBattleTowerMon(&gEnemyParty[r6], &gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_040[r2]); - } - break; - case 1: - r2 = gUnknown_847A2FE[r5][0]; - gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[0].unk_040[r2].level = r9; - CreateBattleTowerMon(&gEnemyParty[0], &gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[0].unk_040[r2]); - r2 = gUnknown_847A2FE[r5][1]; - gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[1].unk_040[r2].level = r9; - CreateBattleTowerMon(&gEnemyParty[1], &gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[1].unk_040[r2]); - break; - case 2: - r2 = gUnknown_847A30E[r5][r4]; - gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_040[r2].level = r9; - CreateBattleTowerMon(&gEnemyParty[0], &gUnknown_203F458->unk_0004.trainers[gUnknown_203F458->unk_0000].unk_004[r4].unk_040[r2]); - break; + case 0: + default: + for (i = 0; i < 2; i++) + { + monIdx = sSingleBattleChallengeMonIdxs[floorIdx][i]; + sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[trainerIdx].mons[monIdx].level = level; + CreateBattleTowerMon(&gEnemyParty[i], &sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[trainerIdx].mons[monIdx]); + } + break; + case 1: + monIdx = sDoubleBattleChallengeMonIdxs[floorIdx][0]; + sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[0].mons[monIdx].level = level; + CreateBattleTowerMon(&gEnemyParty[0], &sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[0].mons[monIdx]); + + monIdx = sDoubleBattleChallengeMonIdxs[floorIdx][1]; + sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[1].mons[monIdx].level = level; + CreateBattleTowerMon(&gEnemyParty[1], &sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[1].mons[monIdx]); + break; + case 2: + monIdx = sKnockoutChallengeMonIdxs[floorIdx][trainerIdx]; + sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[trainerIdx].mons[monIdx].level = level; + CreateBattleTowerMon(&gEnemyParty[0], &sTrainerTowerState->unk_0004.floors[sTrainerTowerState->floorIdx].trainers[trainerIdx].mons[monIdx]); + break; } } @@ -1415,12 +1240,12 @@ static s32 GetPartyMaxLevel(void) return topLevel; } -void sub_815EC0C(void) +static void ValidateOrResetCurTrainerTowerRecord(void) { - if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk9 != gUnknown_203F458->unk_0004.id) + if (gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk9 != sTrainerTowerState->unk_0004.id) { - gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk9 = gUnknown_203F458->unk_0004.id; - sub_815EDF4(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4, 215999); + gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk9 = sTrainerTowerState->unk_0004.id; + SetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unk4, 215999); gSaveBlock1Ptr->unkArray[gSaveBlock1Ptr->unkArrayIdx].unkA_0 = FALSE; } } @@ -1432,12 +1257,12 @@ void PrintTrainerTowerRecords(void) sub_815DC8C(); FillWindowPixelRect(0, 0, 0, 0, 0xd8, 0x90); - sub_815EC0C(); + ValidateOrResetCurTrainerTowerRecord(); AddTextPrinterParameterized3(0, 2, 0x4a, 0, gUnknown_847A22C, 0, gUnknown_83FE982); for (i = 0; i < 4; i++) { - PRINT_TOWER_TIME(sub_815EDDC(&gSaveBlock1Ptr->unkArray[i].unk4)); + PRINT_TOWER_TIME(GetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[i].unk4)); StringExpandPlaceholders(gStringVar4, gUnknown_83FE998); AddTextPrinterParameterized3(windowId, 2, 0x18, 0x24 + 0x14 * i, gUnknown_847A22C, 0, gUnknown_83FE9C4[i]); AddTextPrinterParameterized3(windowId, 2, 0x60, 0x24 + 0x14 * i, gUnknown_847A22C, 0, gStringVar4); @@ -1448,12 +1273,12 @@ void PrintTrainerTowerRecords(void) sub_815DD2C(); } -u32 sub_815EDDC(u32 * counter) +static u32 GetTrainerTowerRecordTime(u32 *counter) { return *counter ^ gSaveBlock2Ptr->encryptionKey; } -void sub_815EDF4(u32 * counter, u32 value) +static void SetTrainerTowerRecordTime(u32 *counter, u32 value) { *counter = value ^ gSaveBlock2Ptr->encryptionKey; } @@ -1464,6 +1289,6 @@ void ResetTrainerTowerResults(void) for (i = 0; i < 4; i++) { - sub_815EDF4(&gSaveBlock1Ptr->unkArray[i].unk4, 215999); + SetTrainerTowerRecordTime(&gSaveBlock1Ptr->unkArray[i].unk4, 215999); } } diff --git a/src/unk_8159F40.c b/src/unk_8159F40.c index ab27cea63..ef21d19d0 100644 --- a/src/unk_8159F40.c +++ b/src/unk_8159F40.c @@ -7,36 +7,133 @@ #include "metatile_behavior.h" #include "link.h" #include "link_rfu.h" +#include "constants/species.h" +#include "constants/moves.h" +#include "constants/pokemon.h" -struct UnkStruct_84792D0 +struct PokedudeBattlePartyInfo { - u8 field_0; - u8 field_1; - u16 field_2; - u16 field_4[4]; - u8 field_C; - u8 field_D; + u8 side; + u8 level; + u16 species; + u16 moves[4]; + u8 nature; + u8 gender; +}; + +static const struct PokedudeBattlePartyInfo sParties_Battle[] = { + { + .side = 0, + .level = 15, + .species = SPECIES_RATTATA, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_HYPER_FANG, MOVE_QUICK_ATTACK}, + .nature = NATURE_LONELY, + .gender = MALE + }, + { + .side = 1, + .level = 18, + .species = SPECIES_PIDGEY, + .moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK}, + .nature = NATURE_NAUGHTY, + .gender = MALE + }, + {0xFF} +}; + +static const struct PokedudeBattlePartyInfo sParties_Status[] = { + { + .side = 0, + .level = 15, + .species = SPECIES_RATTATA, + .moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_HYPER_FANG, MOVE_QUICK_ATTACK}, + .nature = NATURE_LONELY, + .gender = MALE + }, + { + .side = 1, + .level = 14, + .species = SPECIES_ODDISH, + .moves = {MOVE_ABSORB, MOVE_SWEET_SCENT, MOVE_POISON_POWDER}, + .nature = NATURE_RASH, + .gender = MALE + }, + {0xFF} +}; + +static const struct PokedudeBattlePartyInfo sParties_Matchups[] = { + { + .side = 0, + .level = 15, + .species = SPECIES_POLIWAG, + .moves = {MOVE_WATER_GUN, MOVE_HYPNOSIS, MOVE_BUBBLE}, + .nature = NATURE_RASH, + .gender = MALE + }, + { + .side = 0, + .level = 15, + .species = SPECIES_BUTTERFREE, + .moves = {MOVE_CONFUSION, MOVE_POISON_POWDER, MOVE_STUN_SPORE, MOVE_SLEEP_POWDER}, + .nature = NATURE_RASH, + .gender = MALE + }, + { + .side = 1, + .level = 14, + .species = SPECIES_ODDISH, + .moves = {MOVE_ABSORB, MOVE_SWEET_SCENT, MOVE_POISON_POWDER}, + .nature = NATURE_RASH, + .gender = MALE + }, + {0xFF} +}; + +static const struct PokedudeBattlePartyInfo sParties_Catching[] = { + { + .side = 0, + .level = 15, + .species = SPECIES_BUTTERFREE, + .moves = {MOVE_CONFUSION, MOVE_POISON_POWDER, MOVE_SLEEP_POWDER, MOVE_STUN_SPORE}, + .nature = NATURE_RASH, + .gender = MALE + }, + { + .side = 1, + .level = 11, + .species = SPECIES_JIGGLYPUFF, + .moves = {MOVE_SING, MOVE_DEFENSE_CURL, MOVE_POUND}, + .nature = NATURE_CAREFUL, + .gender = MALE + }, + {0xFF} }; -extern const struct UnkStruct_84792D0 *const gUnknown_84792D0[]; -void sub_8159F40(void) +static const struct PokedudeBattlePartyInfo *const sPokedudeBattlePartyPointers[] = { + sParties_Battle, + sParties_Status, + sParties_Matchups, + sParties_Catching +}; + +void InitPokedudePartyAndOpponent(void) { s32 i, j; - struct Pokemon *mon; + struct Pokemon * mon; s32 myIdx = 0; s32 opIdx = 0; - const struct UnkStruct_84792D0 * data; + const struct PokedudeBattlePartyInfo * data; gBattleTypeFlags = BATTLE_TYPE_POKEDUDE; ZeroPlayerPartyMons(); ZeroEnemyPartyMons(); - data = gUnknown_84792D0[gSpecialVar_0x8004]; + data = sPokedudeBattlePartyPointers[gSpecialVar_0x8004]; i = 0; do { - if (data[i].field_0 == 0) + if (data[i].side == 0) { mon = &gPlayerParty[myIdx]; myIdx++; @@ -46,15 +143,17 @@ void sub_8159F40(void) mon = &gEnemyParty[opIdx]; opIdx++; } - CreateMonWithGenderNatureLetter(mon, data[i].field_2, data[i].field_1, 0, data[i].field_D, data[i].field_C, 0); + CreateMonWithGenderNatureLetter(mon, data[i].species, data[i].level, 0, data[i].gender, data[i].nature, 0); for (j = 0; j < 4; j++) { - SetMonMoveSlot(mon, data[i].field_4[j], j); + SetMonMoveSlot(mon, data[i].moves[j], j); } i++; - } while (data[i].field_0 != 0xFF); + } while (data[i].side != 0xFF); } +// file boundary? + void sub_815A008(struct QuestLog * questLog) { u32 i; @@ -78,7 +177,7 @@ void sub_815A008(struct QuestLog * questLog) questLog->unk_008[i].mapobj_bit_24 = gMapObjects[i].mapobj_bit_24; questLog->unk_008[i].mapobj_bit_25 = gMapObjects[i].mapobj_bit_25; questLog->unk_008[i].mapobj_bit_26 = gMapObjects[i].mapobj_bit_26; - questLog->unk_008[i].mapobj_unk_18 = gMapObjects[i].mapobj_unk_18; + questLog->unk_008[i].mapobj_unk_18 = gMapObjects[i].facingDirection; questLog->unk_008[i].mapobj_unk_0B_0 = gMapObjects[i].mapobj_unk_0B_0; questLog->unk_008[i].elevation = gMapObjects[i].elevation; questLog->unk_008[i].graphicsId = gMapObjects[i].graphicsId; @@ -123,7 +222,7 @@ void sub_815A1F8(const struct QuestLog * questLog, const struct MapObjectTemplat gMapObjects[i].mapobj_bit_24 = questLogMapObjects[i].mapobj_bit_24; gMapObjects[i].mapobj_bit_25 = questLogMapObjects[i].mapobj_bit_25; gMapObjects[i].mapobj_bit_26 = questLogMapObjects[i].mapobj_bit_26; - gMapObjects[i].mapobj_unk_18 = questLogMapObjects[i].mapobj_unk_18; + gMapObjects[i].facingDirection = questLogMapObjects[i].mapobj_unk_18; gMapObjects[i].mapobj_unk_0B_0 = questLogMapObjects[i].mapobj_unk_0B_0; gMapObjects[i].elevation = questLogMapObjects[i].elevation; gMapObjects[i].graphicsId = questLogMapObjects[i].graphicsId; @@ -614,7 +713,7 @@ void sub_815A540(void) PlayerGetDestCoords(&x, &y); if (!MetatileBehavior_IsSurfable(MapGridGetMetatileBehaviorAt(x, y)) && TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) { - struct MapObject *mapObject = &gMapObjects[gPlayerAvatar.mapObjectId]; + struct MapObject * mapObject = &gMapObjects[gPlayerAvatar.mapObjectId]; SetPlayerAvatarTransitionFlags(0x01); DestroySprite(&gSprites[mapObject->mapobj_unk_1A]); } diff --git a/src/vs_seeker.c b/src/vs_seeker.c index cfc99551a..9a8ff5dd6 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -22,8 +22,11 @@ #include "map_obj_80688E4.h" #include "map_obj_8097404.h" #include "unk_810c3a4.h" -#include "constants/movement_commands.h" #include "vs_seeker.h" +#include "constants/movement_commands.h" +#include "constants/map_objects.h" +#include "constants/trainers.h" +#include "constants/maps.h" typedef enum { @@ -97,448 +100,448 @@ static void StartAllRespondantIdleMovements(void); // rodata static const VsSeekerData sVsSeekerData[] = { - { {0x0059, 0x0065, 0xffff, 0x01f2, 0x01f3, 0x0000}, - 0x0003, 0x0015 }, - { {0x005a, 0x005a, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x0069, 0x02d9, 0xffff, 0x02da, 0xffff, 0x02db}, - 0x0003, 0x0015 }, - { {0x006a, 0x006a, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x006b, 0x006b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x0074, 0x01fb, 0xffff, 0x01fc, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x0075, 0x0075, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x0076, 0x0076, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0015 }, - { {0x0077, 0x0077, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0016 }, - { {0x005c, 0x01f7, 0xffff, 0x01f8, 0xffff, 0x01f9}, - 0x0003, 0x002b }, - { {0x006e, 0x006e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002b }, - { {0x007a, 0x01f5, 0xffff, 0x01f6, 0x0000, 0x0000}, - 0x0003, 0x002b }, - { {0x007b, 0x007b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002b }, - { {0x008f, 0x008f, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002b }, - { {0x0090, 0x0090, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002b }, - { {0x005d, 0x005d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x005e, 0x005e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x005f, 0x01f4, 0xffff, 0x01fa, 0x01fd, 0x0000}, - 0x0003, 0x002c }, - { {0x0099, 0x026d, 0xffff, 0x026e, 0x026f, 0x0000}, - 0x0003, 0x002c }, - { {0x007d, 0x007d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x00b6, 0xffff, 0x01fe, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x00b7, 0x00b7, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x00b8, 0x00b8, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x01d7, 0x01d7, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002c }, - { {0x006f, 0x006f, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0018 }, - { {0x0070, 0x0070, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0018 }, - { {0x0091, 0x0270, 0xffff, 0x0271, 0xffff, 0x0272}, - 0x0003, 0x0018 }, - { {0x0092, 0x0273, 0xffff, 0x0274, 0xffff, 0x0275}, - 0x0003, 0x0018 }, - { {0x0097, 0x0097, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0018 }, - { {0x0098, 0x0276, 0xffff, 0x0277, 0x0278, 0x0000}, - 0x0003, 0x0018 }, - { {0x0061, 0x0061, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0062, 0x0062, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0063, 0xffff, 0x0279, 0xffff, 0x027a, 0x0000}, - 0x0003, 0x001d }, - { {0x0064, 0x0064, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x00dd, 0x00dd, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x00de, 0xffff, 0xffff, 0x027b, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0102, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0103, 0x0103, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0104, 0x0104, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0105, 0xffff, 0xffff, 0x027c, 0x0000, 0x0000}, - 0x0003, 0x001d }, - { {0x0072, 0x0072, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x0073, 0x0073, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x0094, 0xffff, 0x027d, 0x027e, 0xffff, 0x027f}, - 0x0003, 0x001b }, - { {0x0095, 0x0095, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x009a, 0xffff, 0x0280, 0x0281, 0xffff, 0x0282}, - 0x0003, 0x001b }, - { {0x009b, 0x009b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x00b9, 0x00b9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x00ba, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x01d1, 0xffff, 0xffff, 0x0283, 0x0000, 0x0000}, - 0x0003, 0x001b }, - { {0x009c, 0x009c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001c }, - { {0x009d, 0x009d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001c }, - { {0x00a2, 0xffff, 0xffff, 0x0252, 0xffff, 0x0284}, - 0x0003, 0x001c }, - { {0x00a3, 0xffff, 0xffff, 0x0285, 0xffff, 0x0286}, - 0x0003, 0x001c }, - { {0x00bb, 0x00bb, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001c }, - { {0x00bc, 0xffff, 0xffff, 0x0287, 0x0000, 0x0000}, - 0x0003, 0x001c }, - { {0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0081, 0x0081, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0082, 0xffff, 0x0288, 0xffff, 0x0289, 0x0000}, - 0x0003, 0x001a }, - { {0x0083, 0x0083, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x00ab, 0x00ab, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x00ac, 0xffff, 0xffff, 0x028a, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x00ad, 0x00ad, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0106, 0x0106, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0108, 0xffff, 0xffff, 0x028b, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x01e4, 0xffff, 0xffff, 0x0215, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0217, 0x0217, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x0218, 0xffff, 0xffff, 0x028c, 0x0000, 0x0000}, - 0x0003, 0x001a }, - { {0x00e1, 0x00e1, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x00e2, 0x00e2, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x00e3, 0x00e3, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x00e4, 0xffff, 0xffff, 0x028d, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x00e9, 0x00e9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x011d, 0xffff, 0xffff, 0x028e, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x01dd, 0x01dd, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001e }, - { {0x01e6, 0xffff, 0xffff, 0x02c2, 0xffff, 0x02c3}, - 0x0003, 0x001e }, - { {0x00c3, 0x00c3, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x010c, 0x010c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x010d, 0xffff, 0xffff, 0xffff, 0x028f, 0x0000}, - 0x0003, 0x001f }, - { {0x012c, 0x012c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x012d, 0x012d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x012e, 0xffff, 0xffff, 0x0290, 0x0291, 0x0000}, - 0x0003, 0x001f }, - { {0x01d2, 0x01d2, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x01d3, 0xffff, 0xffff, 0x0292, 0x0293, 0x0294}, - 0x0003, 0x001f }, - { {0x01d4, 0x01d4, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x01d5, 0x01d5, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x001f }, - { {0x00c4, 0x00c4, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x00cf, 0xffff, 0xffff, 0xffff, 0x0295, 0x0000}, - 0x0003, 0x0020 }, - { {0x00d0, 0x00d0, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x00d1, 0x00d1, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x012f, 0x012f, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x0130, 0xffff, 0xffff, 0x0296, 0x0297, 0x0000}, - 0x0003, 0x0020 }, - { {0x0139, 0x0139, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x013a, 0x013a, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x013b, 0x013b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x013c, 0xffff, 0xffff, 0x0298, 0x0299, 0x0000}, - 0x0003, 0x0020 }, - { {0x01e7, 0x01e7, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0020 }, - { {0x00c5, 0x00c5, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x00c6, 0x00c6, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x0111, 0xffff, 0xffff, 0xffff, 0x029a, 0x0000}, - 0x0003, 0x0021 }, - { {0x0112, 0x0112, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x0131, 0x0131, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x0132, 0xffff, 0xffff, 0x029b, 0x029c, 0x0000}, - 0x0003, 0x0021 }, - { {0x01de, 0x01de, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x01df, 0x01df, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x01e0, 0xffff, 0xffff, 0x029d, 0x029e, 0x029f}, - 0x0003, 0x0021 }, - { {0x01e1, 0x01e1, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0021 }, - { {0x01e8, 0xffff, 0xffff, 0x02a0, 0x02a1, 0x02a2}, - 0x0003, 0x0021 }, - { {0x00c7, 0x00c7, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0022 }, - { {0x00c9, 0x00c9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0022 }, - { {0x00ca, 0xffff, 0xffff, 0xffff, 0x02a3, 0x0000}, - 0x0003, 0x0022 }, - { {0x00f9, 0x00f9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0022 }, - { {0x00fa, 0x00fa, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0022 }, - { {0x00fb, 0xffff, 0xffff, 0xffff, 0x02a4, 0x0000}, - 0x0003, 0x0022 }, - { {0x01e9, 0x01e9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0022 }, - { {0x00cb, 0x00cb, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x00cc, 0x00cc, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x00cd, 0xffff, 0xffff, 0xffff, 0x02a5, 0x0000}, - 0x0003, 0x0023 }, - { {0x00ce, 0x00ce, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x00fc, 0x00fc, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x00fd, 0xffff, 0xffff, 0xffff, 0x02a6, 0x0000}, - 0x0003, 0x0023 }, - { {0x00fe, 0x00fe, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x00ff, 0x00ff, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x0100, 0xffff, 0xffff, 0xffff, 0x02a7, 0x0000}, - 0x0003, 0x0023 }, - { {0x01d6, 0x01d6, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0023 }, - { {0x0133, 0x0133, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0024 }, - { {0x0134, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0024 }, - { {0x0135, 0xffff, 0xffff, 0x02a8, 0x02a9, 0x0000}, - 0x0003, 0x0024 }, - { {0x00eb, 0x00eb, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x00ec, 0x00ec, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x00ed, 0xffff, 0xffff, 0xffff, 0x02dc, 0x0000}, - 0x0003, 0x0025 }, - { {0x00ee, 0x00ee, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x00ef, 0x00ef, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x00f0, 0xffff, 0xffff, 0xffff, 0x02dd, 0x0000}, - 0x0003, 0x0025 }, - { {0x00f1, 0x00f1, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x0114, 0x0114, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x0115, 0xffff, 0xffff, 0xffff, 0x02aa, 0x0000}, - 0x0003, 0x0025 }, - { {0x0116, 0x0116, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x01ea, 0x01ea, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0025 }, - { {0x00f2, 0x00f2, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x00f3, 0x00f3, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x00f4, 0xffff, 0xffff, 0xffff, 0xffff, 0x02ab}, - 0x0003, 0x0026 }, - { {0x010e, 0x010e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x010f, 0x010f, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x0110, 0xffff, 0xffff, 0xffff, 0x02de, 0x0000}, - 0x0003, 0x0026 }, - { {0x0117, 0x0117, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x0136, 0x0136, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x01d8, 0xffff, 0xffff, 0xffff, 0x02ac, 0x02ad}, - 0x0003, 0x0026 }, - { {0x01d9, 0x01d9, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0026 }, - { {0x00e5, 0x00e5, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x00e6, 0x00e6, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x00e7, 0xffff, 0xffff, 0xffff, 0x02ae, 0x0000}, - 0x0003, 0x0027 }, - { {0x00e8, 0x00e8, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x00f5, 0x00f5, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x00f6, 0xffff, 0xffff, 0xffff, 0x02af, 0x0000}, - 0x0003, 0x0027 }, - { {0x00f7, 0x00f7, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x00f8, 0x00f8, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0027 }, - { {0x01eb, 0xffff, 0xffff, 0xffff, 0x02b0, 0x02b1}, - 0x0003, 0x0027 }, - { {0x0223, 0x0223, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x0224, 0x0224, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x0225, 0xffff, 0xffff, 0xffff, 0x02b2, 0x0000}, - 0x0003, 0x002d }, - { {0x0226, 0x0226, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x0227, 0x0227, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x0206, 0xffff, 0xffff, 0xffff, 0x02b3, 0x02b4}, - 0x0003, 0x002d }, - { {0x0228, 0xffff, 0xffff, 0xffff, 0x02b5, 0x02b6}, - 0x0003, 0x002d }, - { {0x0229, 0xffff, 0xffff, 0xffff, 0x02b7, 0x02b8}, - 0x0003, 0x002d }, - { {0x022a, 0xffff, 0xffff, 0xffff, 0x02b9, 0x02ba}, - 0x0003, 0x002d }, - { {0x022b, 0x022b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x022c, 0x022c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002d }, - { {0x022d, 0xffff, 0xffff, 0xffff, 0x02bb, 0x02bc}, - 0x0003, 0x002d }, - { {0x0222, 0x0222, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x002e }, - { {0x020b, 0x020b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0030 }, - { {0x022e, 0x022e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0030 }, - { {0x0207, 0xffff, 0xffff, 0xffff, 0x02bd, 0x0000}, - 0x0003, 0x0030 }, - { {0x022f, 0x022f, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0030 }, - { {0x0231, 0x0231, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0030 }, - { {0x0230, 0xffff, 0xffff, 0xffff, 0x02be, 0x0000}, - 0x0003, 0x0030 }, - { {0x020e, 0x020e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0036 }, - { {0x0232, 0x0232, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0036 }, - { {0x0233, 0xffff, 0xffff, 0xffff, 0xffff, 0x02bf}, - 0x0003, 0x0036 }, - { {0x020d, 0x020d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0036 }, - { {0x0234, 0x0234, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0036 }, - { {0x0235, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c0}, - 0x0003, 0x0036 }, - { {0x0236, 0x0236, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0036 }, - { {0x0208, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c1}, - 0x0003, 0x0037 }, - { {0x023a, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c4}, - 0x0003, 0x0039 }, - { {0x023b, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c5}, - 0x0003, 0x0039 }, - { {0x023c, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c6}, - 0x0003, 0x0039 }, - { {0x023d, 0x023d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003a }, - { {0x023e, 0x023e, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003a }, - { {0x023f, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c7}, - 0x0003, 0x003a }, - { {0x0240, 0x0240, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003a }, - { {0x0205, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c8}, - 0x0003, 0x003b }, - { {0x0241, 0x0241, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003c }, - { {0x0123, 0x0123, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003c }, - { {0x0242, 0xffff, 0xffff, 0xffff, 0xffff, 0x02c9}, - 0x0003, 0x003c }, - { {0x0243, 0x0243, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003c }, - { {0x0244, 0x0244, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003c }, - { {0x0245, 0xffff, 0xffff, 0xffff, 0xffff, 0x02ca}, - 0x0003, 0x003c }, - { {0x020c, 0x020c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003d }, - { {0x0246, 0x0246, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003d }, - { {0x0247, 0xffff, 0xffff, 0xffff, 0xffff, 0x02cb}, - 0x0003, 0x003d }, - { {0x0248, 0x0248, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003d }, - { {0x0249, 0xffff, 0xffff, 0xffff, 0xffff, 0x02cc}, - 0x0003, 0x003d }, - { {0x024a, 0xffff, 0xffff, 0xffff, 0xffff, 0x02cd}, - 0x0003, 0x003e }, - { {0x024b, 0xffff, 0xffff, 0xffff, 0xffff, 0x02ce}, - 0x0003, 0x003e }, - { {0x024c, 0x024c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003f }, - { {0x024d, 0x024d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x003f }, - { {0x024e, 0xffff, 0xffff, 0xffff, 0xffff, 0x02cf}, - 0x0003, 0x003f }, - { {0x0209, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d0}, - 0x0003, 0x003f }, - { {0x020a, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d1}, - 0x0003, 0x003f }, - { {0x024f, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d2}, - 0x0003, 0x0040 }, - { {0x0251, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d3}, - 0x0003, 0x0040 }, - { {0x0254, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d4}, - 0x0003, 0x0040 }, - { {0x0256, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d5}, - 0x0003, 0x0040 }, - { {0x0257, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d6}, - 0x0003, 0x0040 }, - { {0x0258, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d7}, - 0x0003, 0x0040 }, - { {0x0259, 0xffff, 0xffff, 0xffff, 0xffff, 0x02d8}, - 0x0003, 0x0040 }, - { {0x025a, 0x025a, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0041 }, - { {0x025b, 0x025b, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0041 }, - { {0x025c, 0x025c, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0041 }, - { {0x025d, 0x025d, 0x0000, 0x0000, 0x0000, 0x0000}, - 0x0003, 0x0041 } + { {TRAINER_YOUNGSTER_BEN, TRAINER_YOUNGSTER_BEN_2, 0xFFFF, TRAINER_YOUNGSTER_BEN_3, TRAINER_YOUNGSTER_BEN_4}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_YOUNGSTER_CALVIN, TRAINER_YOUNGSTER_CALVIN}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_BUG_CATCHER_COLTON, TRAINER_BUG_CATCHER_COLTON_2, 0xFFFF, TRAINER_BUG_CATCHER_COLTON_3, 0xFFFF, TRAINER_BUG_CATCHER_COLTON_4}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_BUG_CATCHER_GREG, TRAINER_BUG_CATCHER_GREG}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_BUG_CATCHER_JAMES, TRAINER_BUG_CATCHER_JAMES}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_LASS_JANICE, TRAINER_LASS_JANICE_2, 0xFFFF, TRAINER_LASS_JANICE_3}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_LASS_SALLY, TRAINER_LASS_SALLY}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_LASS_ROBIN, TRAINER_LASS_ROBIN}, + MAP_GROUP(ROUTE3), MAP_NUM(ROUTE3) }, + { {TRAINER_LASS_CRISSY, TRAINER_LASS_CRISSY}, + MAP_GROUP(ROUTE4), MAP_NUM(ROUTE4) }, + { {TRAINER_YOUNGSTER_TIMMY, TRAINER_YOUNGSTER_TIMMY_2, 0xFFFF, TRAINER_YOUNGSTER_TIMMY_3, 0xFFFF, TRAINER_YOUNGSTER_TIMMY_4}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_BUG_CATCHER_CALE, TRAINER_BUG_CATCHER_CALE}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_LASS_RELI, TRAINER_LASS_RELI_2, 0xFFFF, TRAINER_LASS_RELI_3}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_LASS_ALI, TRAINER_LASS_ALI}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_CAMPER_SHANE, TRAINER_CAMPER_SHANE}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_CAMPER_ETHAN, TRAINER_CAMPER_ETHAN}, + MAP_GROUP(ROUTE24), MAP_NUM(ROUTE24) }, + { {TRAINER_YOUNGSTER_JOEY, TRAINER_YOUNGSTER_JOEY}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_YOUNGSTER_DAN, TRAINER_YOUNGSTER_DAN}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_YOUNGSTER_CHAD, TRAINER_YOUNGSTER_CHAD_2, 0xFFFF, TRAINER_YOUNGSTER_CHAD_3, TRAINER_YOUNGSTER_CHAD_4}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_PICNICKER_KELSEY, TRAINER_PICNICKER_KELSEY_2, 0xFFFF, TRAINER_PICNICKER_KELSEY_3, TRAINER_PICNICKER_KELSEY_4}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_LASS_HALEY, TRAINER_LASS_HALEY}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_HIKER_FRANKLIN, 0xFFFF, TRAINER_HIKER_FRANKLIN_2}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_HIKER_NOB, TRAINER_HIKER_NOB}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_HIKER_WAYNE, TRAINER_HIKER_WAYNE}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_CAMPER_FLINT, TRAINER_CAMPER_FLINT}, + MAP_GROUP(ROUTE25), MAP_NUM(ROUTE25) }, + { {TRAINER_BUG_CATCHER_KEIGO, TRAINER_BUG_CATCHER_KEIGO}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_BUG_CATCHER_ELIJAH, TRAINER_BUG_CATCHER_ELIJAH}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_CAMPER_RICKY, TRAINER_CAMPER_RICKY_2, 0xFFFF, TRAINER_CAMPER_RICKY_3, 0xFFFF, TRAINER_CAMPER_RICKY_4}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_CAMPER_JEFF, TRAINER_CAMPER_JEFF_2, 0xFFFF, TRAINER_CAMPER_JEFF_3, 0xFFFF, TRAINER_CAMPER_JEFF_4}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_PICNICKER_NANCY, TRAINER_PICNICKER_NANCY}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_PICNICKER_ISABELLE, TRAINER_PICNICKER_ISABELLE_2, 0xFFFF, TRAINER_PICNICKER_ISABELLE_3, TRAINER_PICNICKER_ISABELLE_4}, + MAP_GROUP(ROUTE6), MAP_NUM(ROUTE6) }, + { {TRAINER_YOUNGSTER_EDDIE, TRAINER_YOUNGSTER_EDDIE}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_YOUNGSTER_DILLON, TRAINER_YOUNGSTER_DILLON}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_YOUNGSTER_YASU, 0xFFFF, TRAINER_YOUNGSTER_YASU_2, 0xFFFF, TRAINER_YOUNGSTER_YASU_3}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_YOUNGSTER_DAVE, TRAINER_YOUNGSTER_DAVE}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_ENGINEER_BRAXTON, TRAINER_ENGINEER_BRAXTON}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_ENGINEER_BERNIE, 0xFFFF, 0xFFFF, TRAINER_ENGINEER_BERNIE_2}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_GAMER_HUGO, TRAINER_GAMER_HUGO}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_GAMER_JASPER, TRAINER_GAMER_JASPER}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_GAMER_DIRK, TRAINER_GAMER_DIRK}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_GAMER_DARIAN, 0xFFFF, 0xFFFF, TRAINER_GAMER_DARIAN_2}, + MAP_GROUP(ROUTE11), MAP_NUM(ROUTE11) }, + { {TRAINER_BUG_CATCHER_BRENT, TRAINER_BUG_CATCHER_BRENT}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_BUG_CATCHER_CONNER, TRAINER_BUG_CATCHER_CONNER}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_CAMPER_CHRIS, 0xFFFF, TRAINER_CAMPER_CHRIS_2, TRAINER_CAMPER_CHRIS_3, 0xFFFF, TRAINER_CAMPER_CHRIS_4}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_CAMPER_DREW, TRAINER_CAMPER_DREW}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_PICNICKER_ALICIA, 0xFFFF, TRAINER_PICNICKER_ALICIA_2, TRAINER_PICNICKER_ALICIA_3, 0xFFFF, TRAINER_PICNICKER_ALICIA_4}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_PICNICKER_CAITLIN, TRAINER_PICNICKER_CAITLIN}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_HIKER_ALAN, TRAINER_HIKER_ALAN}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_HIKER_BRICE, TRAINER_HIKER_BRICE}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_HIKER_JEREMY, 0xFFFF, 0xFFFF, TRAINER_HIKER_JEREMY_2}, + MAP_GROUP(ROUTE9), MAP_NUM(ROUTE9) }, + { {TRAINER_PICNICKER_HEIDI, TRAINER_PICNICKER_HEIDI}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_PICNICKER_CAROL, TRAINER_PICNICKER_CAROL}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_POKEMANIAC_MARK, 0xFFFF, 0xFFFF, TRAINER_POKEMANIAC_MARK_2, 0xFFFF, TRAINER_POKEMANIAC_MARK_3}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_POKEMANIAC_HERMAN, 0xFFFF, 0xFFFF, TRAINER_POKEMANIAC_HERMAN_2, 0xFFFF, TRAINER_POKEMANIAC_HERMAN_3}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_HIKER_CLARK, TRAINER_HIKER_CLARK}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_HIKER_TRENT, 0xFFFF, 0xFFFF, TRAINER_HIKER_TRENT_2}, + MAP_GROUP(ROUTE10), MAP_NUM(ROUTE10) }, + { {TRAINER_LASS_PAIGE, TRAINER_LASS_PAIGE}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_LASS_ANDREA, TRAINER_LASS_ANDREA}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_LASS_MEGAN, 0xFFFF, TRAINER_LASS_MEGAN_2, 0xFFFF, TRAINER_LASS_MEGAN_3}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_LASS_JULIA, TRAINER_LASS_JULIA}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_SUPER_NERD_AIDAN, TRAINER_SUPER_NERD_AIDAN}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_SUPER_NERD_GLENN, 0xFFFF, 0xFFFF, TRAINER_SUPER_NERD_GLENN_2}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_SUPER_NERD_LESLIE, TRAINER_SUPER_NERD_LESLIE}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_GAMER_STAN, TRAINER_GAMER_STAN}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_GAMER_RICH, 0xFFFF, 0xFFFF, TRAINER_GAMER_RICH_2}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_TWINS_ELI_ANNE, 0xFFFF, 0xFFFF, TRAINER_TWINS_ELI_ANNE_2}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_BIKER_RICARDO, TRAINER_BIKER_RICARDO}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_BIKER_JAREN, 0xFFFF, 0xFFFF, TRAINER_BIKER_JAREN_2}, + MAP_GROUP(ROUTE8), MAP_NUM(ROUTE8) }, + { {TRAINER_FISHERMAN_NED, TRAINER_FISHERMAN_NED}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_FISHERMAN_CHIP, TRAINER_FISHERMAN_CHIP}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_FISHERMAN_HANK, TRAINER_FISHERMAN_HANK}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_FISHERMAN_ELLIOT, 0xFFFF, 0xFFFF, TRAINER_FISHERMAN_ELLIOT_2}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_FISHERMAN_ANDREW, TRAINER_FISHERMAN_ANDREW}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_ROCKER_LUCA, 0xFFFF, 0xFFFF, TRAINER_ROCKER_LUCA_2}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_CAMPER_JUSTIN, TRAINER_CAMPER_JUSTIN}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_YOUNG_COUPLE_GIA_JES, 0xFFFF, 0xFFFF, TRAINER_YOUNG_COUPLE_GIA_JES_2, 0xFFFF, TRAINER_YOUNG_COUPLE_GIA_JES_3}, + MAP_GROUP(ROUTE12), MAP_NUM(ROUTE12) }, + { {TRAINER_BIKER_JARED, TRAINER_BIKER_JARED}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BEAUTY_LOLA, TRAINER_BEAUTY_LOLA}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BEAUTY_SHEILA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BEAUTY_SHEILA_2}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BIRD_KEEPER_SEBASTIAN, TRAINER_BIRD_KEEPER_SEBASTIAN}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BIRD_KEEPER_PERRY, TRAINER_BIRD_KEEPER_PERRY}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BIRD_KEEPER_ROBERT, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_ROBERT_2, TRAINER_BIRD_KEEPER_ROBERT_3}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_PICNICKER_ALMA, TRAINER_PICNICKER_ALMA}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_PICNICKER_SUSIE, 0xFFFF, 0xFFFF, TRAINER_PICNICKER_SUSIE_2, TRAINER_PICNICKER_SUSIE_3, TRAINER_PICNICKER_SUSIE_4}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_PICNICKER_VALERIE, TRAINER_PICNICKER_VALERIE}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_PICNICKER_GWEN, TRAINER_PICNICKER_GWEN}, + MAP_GROUP(ROUTE13), MAP_NUM(ROUTE13) }, + { {TRAINER_BIKER_MALIK, TRAINER_BIKER_MALIK}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIKER_LUKAS, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIKER_LUKAS_2}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIKER_ISAAC, TRAINER_BIKER_ISAAC}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIKER_GERALD, TRAINER_BIKER_GERALD}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_DONALD, TRAINER_BIRD_KEEPER_DONALD}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_BENNY, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_BENNY_2, TRAINER_BIRD_KEEPER_BENNY_3}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_CARTER, TRAINER_BIRD_KEEPER_CARTER}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_MITCH, TRAINER_BIRD_KEEPER_MITCH}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_BECK, TRAINER_BIRD_KEEPER_BECK}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIRD_KEEPER_MARLON, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_MARLON_2, TRAINER_BIRD_KEEPER_MARLON_3}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_TWINS_KIRI_JAN, TRAINER_TWINS_KIRI_JAN}, + MAP_GROUP(ROUTE14), MAP_NUM(ROUTE14) }, + { {TRAINER_BIKER_ERNEST, TRAINER_BIKER_ERNEST}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BIKER_ALEX, TRAINER_BIKER_ALEX}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BEAUTY_GRACE, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BEAUTY_GRACE_2}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BEAUTY_OLIVIA, TRAINER_BEAUTY_OLIVIA}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BIRD_KEEPER_EDWIN, TRAINER_BIRD_KEEPER_EDWIN}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BIRD_KEEPER_CHESTER, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_CHESTER_2, TRAINER_BIRD_KEEPER_CHESTER_3}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_PICNICKER_YAZMIN, TRAINER_PICNICKER_YAZMIN}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_PICNICKER_KINDRA, TRAINER_PICNICKER_KINDRA}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_PICNICKER_BECKY, 0xFFFF, 0xFFFF, TRAINER_PICNICKER_BECKY_2, TRAINER_PICNICKER_BECKY_3, TRAINER_PICNICKER_BECKY_4}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_PICNICKER_CELIA, TRAINER_PICNICKER_CELIA}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_CRUSH_KIN_RON_MYA, 0xFFFF, 0xFFFF, TRAINER_CRUSH_KIN_RON_MYA_2, TRAINER_CRUSH_KIN_RON_MYA_3, TRAINER_CRUSH_KIN_RON_MYA_4}, + MAP_GROUP(ROUTE15), MAP_NUM(ROUTE15) }, + { {TRAINER_BIKER_LAO, TRAINER_BIKER_LAO}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_BIKER_HIDEO, TRAINER_BIKER_HIDEO}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_BIKER_RUBEN, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIKER_RUBEN_2}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_CUE_BALL_KOJI, TRAINER_CUE_BALL_KOJI}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_CUE_BALL_LUKE, TRAINER_CUE_BALL_LUKE}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_CUE_BALL_CAMRON, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CUE_BALL_CAMRON_2}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_YOUNG_COUPLE_LEA_JED, TRAINER_YOUNG_COUPLE_LEA_JED}, + MAP_GROUP(ROUTE16), MAP_NUM(ROUTE16) }, + { {TRAINER_BIKER_BILLY, TRAINER_BIKER_BILLY}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_BIKER_NIKOLAS, TRAINER_BIKER_NIKOLAS}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_BIKER_JAXON, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIKER_JAXON_2}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_BIKER_WILLIAM, TRAINER_BIKER_WILLIAM}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_CUE_BALL_RAUL, TRAINER_CUE_BALL_RAUL}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_CUE_BALL_ISAIAH, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CUE_BALL_ISAIAH_2}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_CUE_BALL_ZEEK, TRAINER_CUE_BALL_ZEEK}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_CUE_BALL_JAMAL, TRAINER_CUE_BALL_JAMAL}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_CUE_BALL_COREY, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CUE_BALL_COREY_2}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_BIKER_VIRGIL, TRAINER_BIKER_VIRGIL}, + MAP_GROUP(ROUTE17), MAP_NUM(ROUTE17) }, + { {TRAINER_BIRD_KEEPER_WILTON, TRAINER_BIRD_KEEPER_WILTON}, + MAP_GROUP(ROUTE18), MAP_NUM(ROUTE18) }, + { {TRAINER_BIRD_KEEPER_RAMIRO, TRAINER_BIRD_KEEPER_RAMIRO}, + MAP_GROUP(ROUTE18), MAP_NUM(ROUTE18) }, + { {TRAINER_BIRD_KEEPER_JACOB, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_JACOB_2, TRAINER_BIRD_KEEPER_JACOB_3}, + MAP_GROUP(ROUTE18), MAP_NUM(ROUTE18) }, + { {TRAINER_SWIMMER_MALE_RICHARD, TRAINER_SWIMMER_MALE_RICHARD}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_REECE, TRAINER_SWIMMER_MALE_REECE}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_MATTHEW, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_MATTHEW_2}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_DOUGLAS, TRAINER_SWIMMER_MALE_DOUGLAS}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_DAVID, TRAINER_SWIMMER_MALE_DAVID}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_TONY, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_TONY_2}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_AXLE, TRAINER_SWIMMER_MALE_AXLE}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_FEMALE_ANYA, TRAINER_SWIMMER_FEMALE_ANYA}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_FEMALE_ALICE, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_FEMALE_ALICE_2}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_FEMALE_CONNIE, TRAINER_SWIMMER_FEMALE_CONNIE}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SIS_AND_BRO_LIA_LUC, TRAINER_SIS_AND_BRO_LIA_LUC}, + MAP_GROUP(ROUTE19), MAP_NUM(ROUTE19) }, + { {TRAINER_SWIMMER_MALE_BARRY, TRAINER_SWIMMER_MALE_BARRY}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_MALE_DEAN, TRAINER_SWIMMER_MALE_DEAN}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_MALE_DARRIN, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_DARRIN_2}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_FEMALE_TIFFANY, TRAINER_SWIMMER_FEMALE_TIFFANY}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_FEMALE_NORA, TRAINER_SWIMMER_FEMALE_NORA}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_FEMALE_MELISSA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_FEMALE_MELISSA_2}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_SWIMMER_FEMALE_SHIRLEY, TRAINER_SWIMMER_FEMALE_SHIRLEY}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_BIRD_KEEPER_ROGER, TRAINER_BIRD_KEEPER_ROGER}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_PICNICKER_MISSY, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PICNICKER_MISSY_2, TRAINER_PICNICKER_MISSY_3}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_PICNICKER_IRENE, TRAINER_PICNICKER_IRENE}, + MAP_GROUP(ROUTE20), MAP_NUM(ROUTE20) }, + { {TRAINER_FISHERMAN_RONALD, TRAINER_FISHERMAN_RONALD}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_FISHERMAN_CLAUDE, TRAINER_FISHERMAN_CLAUDE}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_FISHERMAN_WADE, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_FISHERMAN_WADE_2}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_FISHERMAN_NOLAN, TRAINER_FISHERMAN_NOLAN}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SWIMMER_MALE_SPENCER, TRAINER_SWIMMER_MALE_SPENCER}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SWIMMER_MALE_JACK, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_JACK_2}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SWIMMER_MALE_JEROME, TRAINER_SWIMMER_MALE_JEROME}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SWIMMER_MALE_ROLAND, TRAINER_SWIMMER_MALE_ROLAND}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SIS_AND_BRO_LIL_IAN, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SIS_AND_BRO_LIL_IAN_2, TRAINER_SIS_AND_BRO_LIL_IAN_3}, + MAP_GROUP(ROUTE21_NORTH), MAP_NUM(ROUTE21_NORTH) }, + { {TRAINER_SWIMMER_FEMALE_MARIA, TRAINER_SWIMMER_FEMALE_MARIA}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_SWIMMER_FEMALE_ABIGAIL, TRAINER_SWIMMER_FEMALE_ABIGAIL}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_SWIMMER_MALE_FINN, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_FINN_2}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_SWIMMER_MALE_GARRETT, TRAINER_SWIMMER_MALE_GARRETT}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_FISHERMAN_TOMMY, TRAINER_FISHERMAN_TOMMY}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_CRUSH_GIRL_SHARON, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CRUSH_GIRL_SHARON_2, TRAINER_CRUSH_GIRL_SHARON_3}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_CRUSH_GIRL_TANYA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CRUSH_GIRL_TANYA_2, TRAINER_CRUSH_GIRL_TANYA_3}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_BLACK_BELT_SHEA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BLACK_BELT_SHEA_2, TRAINER_BLACK_BELT_SHEA_3}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_BLACK_BELT_HUGH, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BLACK_BELT_HUGH_2, TRAINER_BLACK_BELT_HUGH_3}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_CAMPER_BRYCE, TRAINER_CAMPER_BRYCE}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_PICNICKER_CLAIRE, TRAINER_PICNICKER_CLAIRE}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_CRUSH_KIN_MIK_KIA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CRUSH_KIN_MIK_KIA_2, TRAINER_CRUSH_KIN_MIK_KIA_3}, + MAP_GROUP(ONE_ISLAND_KINDLE_ROAD), MAP_NUM(ONE_ISLAND_KINDLE_ROAD) }, + { {TRAINER_SWIMMER_FEMALE_AMARA, TRAINER_SWIMMER_FEMALE_AMARA}, + MAP_GROUP(ONE_ISLAND_TREASURE_BEACH), MAP_NUM(ONE_ISLAND_TREASURE_BEACH) }, + { {TRAINER_AROMA_LADY_NIKKI, TRAINER_AROMA_LADY_NIKKI}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_AROMA_LADY_VIOLET, TRAINER_AROMA_LADY_VIOLET}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_TUBER_AMIRA, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_TUBER_AMIRA_2}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_TUBER_ALEXIS, TRAINER_TUBER_ALEXIS}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_SWIMMER_FEMALE_TISHA, TRAINER_SWIMMER_FEMALE_TISHA}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_TWINS_JOY_MEG, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_TWINS_JOY_MEG_2}, + MAP_GROUP(THREE_ISLAND_BOND_BRIDGE), MAP_NUM(THREE_ISLAND_BOND_BRIDGE) }, + { {TRAINER_PAINTER_DAISY, TRAINER_PAINTER_DAISY}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_PAINTER_CELINA, TRAINER_PAINTER_CELINA}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_PAINTER_RAYNA, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PAINTER_RAYNA_2}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_LADY_JACKI, TRAINER_LADY_JACKI}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_LADY_GILLIAN, TRAINER_LADY_GILLIAN}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_YOUNGSTER_DESTIN, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_YOUNGSTER_DESTIN_2}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_SWIMMER_MALE_TOBY, TRAINER_SWIMMER_MALE_TOBY}, + MAP_GROUP(FIVE_ISLAND_RESORT_GORGEOUS), MAP_NUM(FIVE_ISLAND_RESORT_GORGEOUS) }, + { {TRAINER_PKMN_BREEDER_ALIZE, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PKMN_BREEDER_ALIZE_2}, + MAP_GROUP(FIVE_ISLAND_WATER_LABYRINTH), MAP_NUM(FIVE_ISLAND_WATER_LABYRINTH) }, + { {TRAINER_BIRD_KEEPER_MILO, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_MILO_2}, + MAP_GROUP(FIVE_ISLAND_MEMORIAL_PILLAR), MAP_NUM(FIVE_ISLAND_MEMORIAL_PILLAR) }, + { {TRAINER_BIRD_KEEPER_CHAZ, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_CHAZ_2}, + MAP_GROUP(FIVE_ISLAND_MEMORIAL_PILLAR), MAP_NUM(FIVE_ISLAND_MEMORIAL_PILLAR) }, + { {TRAINER_BIRD_KEEPER_HAROLD, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_BIRD_KEEPER_HAROLD_2}, + MAP_GROUP(FIVE_ISLAND_MEMORIAL_PILLAR), MAP_NUM(FIVE_ISLAND_MEMORIAL_PILLAR) }, + { {TRAINER_FISHERMAN_TYLOR, TRAINER_FISHERMAN_TYLOR}, + MAP_GROUP(SIX_ISLAND_OUTCAST_ISLAND), MAP_NUM(SIX_ISLAND_OUTCAST_ISLAND) }, + { {TRAINER_SWIMMER_MALE_MYMO, TRAINER_SWIMMER_MALE_MYMO}, + MAP_GROUP(SIX_ISLAND_OUTCAST_ISLAND), MAP_NUM(SIX_ISLAND_OUTCAST_ISLAND) }, + { {TRAINER_SWIMMER_FEMALE_NICOLE, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_FEMALE_NICOLE_2}, + MAP_GROUP(SIX_ISLAND_OUTCAST_ISLAND), MAP_NUM(SIX_ISLAND_OUTCAST_ISLAND) }, + { {TRAINER_SIS_AND_BRO_AVA_GEB, TRAINER_SIS_AND_BRO_AVA_GEB}, + MAP_GROUP(SIX_ISLAND_OUTCAST_ISLAND), MAP_NUM(SIX_ISLAND_OUTCAST_ISLAND) }, + { {TRAINER_PSYCHIC_JACLYN, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PSYCHIC_JACLYN_2}, + MAP_GROUP(SIX_ISLAND_GREEN_PATH), MAP_NUM(SIX_ISLAND_GREEN_PATH) }, + { {TRAINER_AROMA_LADY_ROSE, TRAINER_AROMA_LADY_ROSE}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_JUGGLER_EDWARD, TRAINER_JUGGLER_EDWARD}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_SWIMMER_MALE_SAMIR, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_SWIMMER_MALE_SAMIR_2}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_SWIMMER_FEMALE_DENISE, TRAINER_SWIMMER_FEMALE_DENISE}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_TWINS_MIU_MIA, TRAINER_TWINS_MIU_MIA}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_HIKER_EARL, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_HIKER_EARL_2}, + MAP_GROUP(SIX_ISLAND_WATER_PATH), MAP_NUM(SIX_ISLAND_WATER_PATH) }, + { {TRAINER_RUIN_MANIAC_STANLY, TRAINER_RUIN_MANIAC_STANLY}, + MAP_GROUP(SIX_ISLAND_RUIN_VALLEY), MAP_NUM(SIX_ISLAND_RUIN_VALLEY) }, + { {TRAINER_RUIN_MANIAC_FOSTER, TRAINER_RUIN_MANIAC_FOSTER}, + MAP_GROUP(SIX_ISLAND_RUIN_VALLEY), MAP_NUM(SIX_ISLAND_RUIN_VALLEY) }, + { {TRAINER_RUIN_MANIAC_LARRY, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_RUIN_MANIAC_LARRY_2}, + MAP_GROUP(SIX_ISLAND_RUIN_VALLEY), MAP_NUM(SIX_ISLAND_RUIN_VALLEY) }, + { {TRAINER_HIKER_DARYL, TRAINER_HIKER_DARYL}, + MAP_GROUP(SIX_ISLAND_RUIN_VALLEY), MAP_NUM(SIX_ISLAND_RUIN_VALLEY) }, + { {TRAINER_POKEMANIAC_HECTOR, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_POKEMANIAC_HECTOR_2}, + MAP_GROUP(SIX_ISLAND_RUIN_VALLEY), MAP_NUM(SIX_ISLAND_RUIN_VALLEY) }, + { {TRAINER_PSYCHIC_DARIO, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PSYCHIC_DARIO_2}, + MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER), MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER) }, + { {TRAINER_PSYCHIC_RODETTE, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PSYCHIC_RODETTE_2}, + MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER), MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER) }, + { {TRAINER_AROMA_LADY_MIAH, TRAINER_AROMA_LADY_MIAH}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE) }, + { {TRAINER_YOUNG_COUPLE_EVE_JON, TRAINER_YOUNG_COUPLE_EVE_JON}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE) }, + { {TRAINER_JUGGLER_MASON, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_JUGGLER_MASON_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE) }, + { {TRAINER_PKMN_RANGER_NICOLAS, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PKMN_RANGER_NICOLAS_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE) }, + { {TRAINER_PKMN_RANGER_MADELINE, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PKMN_RANGER_MADELINE_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE) }, + { {TRAINER_CRUSH_GIRL_CYNDY, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_CRUSH_GIRL_CYNDY_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_TAMER_EVAN, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_TAMER_EVAN_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_PKMN_RANGER_JACKSON, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PKMN_RANGER_JACKSON_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_PKMN_RANGER_KATELYN, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_PKMN_RANGER_KATELYN_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_COOLTRAINER_LEROY, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_COOLTRAINER_LEROY_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_COOLTRAINER_MICHELLE, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_COOLTRAINER_MICHELLE_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_COOL_COUPLE_LEX_NYA, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, TRAINER_COOL_COUPLE_LEX_NYA_2}, + MAP_GROUP(SEVEN_ISLAND_SEVAULT_CANYON), MAP_NUM(SEVEN_ISLAND_SEVAULT_CANYON) }, + { {TRAINER_RUIN_MANIAC_BRANDON, TRAINER_RUIN_MANIAC_BRANDON}, + MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS), MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS) }, + { {TRAINER_RUIN_MANIAC_BENJAMIN, TRAINER_RUIN_MANIAC_BENJAMIN}, + MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS), MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS) }, + { {TRAINER_PAINTER_EDNA, TRAINER_PAINTER_EDNA}, + MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS), MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS) }, + { {TRAINER_GENTLEMAN_CLIFFORD, TRAINER_GENTLEMAN_CLIFFORD}, + MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS), MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS) }, }; static const u8 gUnknown_8453F5C[] = { @@ -625,7 +628,7 @@ void sub_810C444(void) mapObject = &gMapObjects[sp0]; if (sub_810CF04(sp0) == TRUE) { - npc_set_running_behaviour_etc(mapObject, r6); + SetTrainerMovementType(mapObject, r6); } templates[i].movementType = r6; } @@ -641,7 +644,7 @@ bool8 sub_810C4EC(void) gSaveBlock1Ptr->trainerRematchStepCounter++; } - if (FlagGet(0x801) == TRUE) + if (FlagGet(FLAG_SYS_VS_SEEKER_CHARGING) == TRUE) { u16 x; do { @@ -657,7 +660,7 @@ bool8 sub_810C4EC(void) } while (0); if (x == 100) { - FlagClear(0x801); + FlagClear(FLAG_SYS_VS_SEEKER_CHARGING); sub_810C640(); sub_810D0D0(); return TRUE; @@ -743,7 +746,7 @@ bool8 sub_810C4EC(void) void sub_810C578(void) { - FlagClear(0x801); + FlagClear(FLAG_SYS_VS_SEEKER_CHARGING); sub_810C640(); sub_810D0D0(); sub_810C594(); @@ -763,7 +766,7 @@ static void sub_810C594(void) { gSprites[mapObject->spriteId].pos2.x = 0; gSprites[mapObject->spriteId].pos2.y = 0; - npc_set_running_behaviour_etc(mapObject, r3); + SetTrainerMovementType(mapObject, r3); } } } @@ -928,7 +931,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0) if (IsTrainerVisibleOnScreen(&sVsSeeker->trainerInfo[vsSeekerIdx]) == 1) { r8 = sVsSeeker->trainerInfo[vsSeekerIdx].trainerIdx; - if (!HasTrainerAlreadyBeenFought(r8)) + if (!HasTrainerBeenFought(r8)) { StartTrainerObjectMovementScript(&sVsSeeker->trainerInfo[vsSeekerIdx], gUnknown_8453F60); sVsSeeker->trainerHasNotYetBeenFought = 1; @@ -972,7 +975,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0) if (sVsSeeker->trainerWantsRematch) { PlaySE(SE_PIN); - FlagSet(0x801); // TODO: make this an enum + FlagSet(FLAG_SYS_VS_SEEKER_CHARGING); sub_810C640(); return 2; } @@ -1024,7 +1027,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0) "\tadds r0, r5\n" "\tldrh r0, [r0, 0x4]\n" "\tmov r8, r0\n" - "\tbl HasTrainerAlreadyBeenFought\n" + "\tbl HasTrainerBeenFought\n" "\tlsls r0, 24\n" "\tcmp r0, 0\n" "\tbne _0810CA20\n" @@ -1236,10 +1239,10 @@ void sub_810CB90(void) TryGetFieldObjectIdByLocalIdAndMap(r4[r8].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &sp0); r4_2 = &gMapObjects[sp0]; sub_810CF54(&r4[r8]); // You are using this function incorrectly. Please consult the manual. - sub_805FE7C(r4_2, gUnknown_8453F67[r4_2->mapobj_unk_18]); + sub_805FE7C(r4_2, gUnknown_8453F67[r4_2->facingDirection]); gSaveBlock1Ptr->trainerRematches[r4[r8].localId] = 0; if (gSelectedEventObject == sp0) - r4_2->animPattern = gUnknown_8453F67[r4_2->mapobj_unk_18]; + r4_2->animPattern = gUnknown_8453F67[r4_2->facingDirection]; else r4_2->animPattern = 0x08; } @@ -1254,23 +1257,23 @@ static void TryGetRematchTrainerIdGivenGameState(const u16 * a0, u8 * a1) case 0: break; case 1: - if (!FlagGet(FLAG_0x292)) + if (!FlagGet(FLAG_GOT_VS_SEEKER)) *a1 = GetRematchTrainerIdGivenGameState(a0, *a1); break; case 2: - if (!FlagGet(FLAG_SYS_NATIONAL_DEX)) + if (!FlagGet(FLAG_WORLD_MAP_CELADON_CITY)) *a1 = GetRematchTrainerIdGivenGameState(a0, *a1); break; case 3: - if (!FlagGet(FLAG_SYS_CAVE_SHIP)) + if (!FlagGet(FLAG_WORLD_MAP_FUCHSIA_CITY)) *a1 = GetRematchTrainerIdGivenGameState(a0, *a1); break; case 4: - if (!FlagGet(FLAG_TRAINER_FLAG_START + 0x32c)) + if (!FlagGet(FLAG_SYS_GAME_CLEAR)) *a1 = GetRematchTrainerIdGivenGameState(a0, *a1); break; case 5: - if (!FlagGet(FLAG_TRAINER_FLAG_START + 0x344)) + if (!FlagGet(FLAG_SYS_CAN_LINK_WITH_RS)) *a1 = GetRematchTrainerIdGivenGameState(a0, *a1); break; } @@ -1287,7 +1290,7 @@ static u8 GetRematchTrainerIdGivenGameState(const u16 * a0, u8 a1) return 0; } -u8 sub_810CD4C(void) // unreferenced, or reference not disassembled +u8 ShouldTryRematchBattle(void) { if (sub_810CD80(sVsSeekerData, gTrainerBattleOpponent_A)) { @@ -1302,7 +1305,7 @@ static bool8 sub_810CD80(const VsSeekerData *vsSeekerData, u16 trainerBattleOppo if (rematchIdx == -1) return FALSE; - if (rematchIdx >= 0 && rematchIdx < ARRAY_COUNT(sVsSeekerData)) + if (rematchIdx >= 0 && rematchIdx < NELEMS(sVsSeekerData)) { if (IsThisTrainerRematchable(gSpecialVar_LastTalked)) return TRUE; @@ -1316,7 +1319,7 @@ static bool8 HasRematchTrainerAlreadyBeenFought(const VsSeekerData *vsSeekerData if (rematchIdx == -1) return FALSE; - if (!HasTrainerAlreadyBeenFought(vsSeekerData[rematchIdx].trainerIdxs[0])) + if (!HasTrainerBeenFought(vsSeekerData[rematchIdx].trainerIdxs[0])) return FALSE; return TRUE; } @@ -1324,7 +1327,7 @@ static bool8 HasRematchTrainerAlreadyBeenFought(const VsSeekerData *vsSeekerData void sub_810CDE8(void) { gSaveBlock1Ptr->trainerRematches[gSpecialVar_LastTalked] = 0; - sub_80803FC(); + SetBattledTrainerFlag(); } static s32 sub_810CE10(const VsSeekerData * a0, u16 a1) @@ -1332,7 +1335,7 @@ static s32 sub_810CE10(const VsSeekerData * a0, u16 a1) u32 r1; s32 r3; - for (r1 = 0; r1 < ARRAY_COUNT(sVsSeekerData); r1++) + for (r1 = 0; r1 < NELEMS(sVsSeekerData); r1++) { for (r3 = 0; r3 < 6; r3++) { @@ -1350,7 +1353,7 @@ static s32 sub_810CE10(const VsSeekerData * a0, u16 a1) return -1; } -s32 sub_810CE64(u16 a0) +s32 GetRematchTrainerId(u16 a0) { u8 i; u8 j; @@ -1361,7 +1364,7 @@ s32 sub_810CE64(u16 a0) return sVsSeekerData[i].trainerIdxs[j]; } -u8 sub_810CEB4(void) // unreferenced, or reference not disassembled +u8 ScrSpecial_GetTrainerEyeRematchFlag(void) // unreferenced, or reference not disassembled { return sub_810CED0(sVsSeekerData, gTrainerBattleOpponent_A); } @@ -1372,7 +1375,7 @@ static bool8 sub_810CED0(const VsSeekerData * a0, u16 a1) if (r1 == -1) return FALSE; - if ((u32)r1 >= ARRAY_COUNT(sVsSeekerData)) + if ((u32)r1 >= NELEMS(sVsSeekerData)) return FALSE; if (!IsThisTrainerRematchable(gSpecialVar_LastTalked)) return FALSE; @@ -1411,32 +1414,32 @@ static u8 GetRunningBehaviorFromGraphicsId(u8 graphicsId) { switch (graphicsId) { - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x25: - case 0x27: - case 0x28: - case 0x29: - case 0x2a: - case 0x2d: - case 0x2e: - case 0x36: - case 0x38: - case 0x3e: + case MAP_OBJ_GFX_LITTLE_GIRL: + case MAP_OBJ_GFX_YOUNGSTER: + case MAP_OBJ_GFX_BOY: + case MAP_OBJ_GFX_BUG_CATCHER: + case MAP_OBJ_GFX_LASS: + case MAP_OBJ_GFX_WOMAN_1: + case MAP_OBJ_GFX_BATTLE_GIRL: + case MAP_OBJ_GFX_MAN: + case MAP_OBJ_GFX_ROCKER: + case MAP_OBJ_GFX_WOMAN_2: + case MAP_OBJ_GFX_BEAUTY: + case MAP_OBJ_GFX_BALDING_MAN: + case MAP_OBJ_GFX_TUBER_F: + case MAP_OBJ_GFX_CAMPER: + case MAP_OBJ_GFX_PICNICKER: + case MAP_OBJ_GFX_COOLTRAINER_M: + case MAP_OBJ_GFX_COOLTRAINER_F: + case MAP_OBJ_GFX_SWIMMER_M_LAND: + case MAP_OBJ_GFX_SWIMMER_F_LAND: + case MAP_OBJ_GFX_BLACKBELT: + case MAP_OBJ_GFX_HIKER: + case MAP_OBJ_GFX_SAILOR: return 0x4e; - case 0x24: - case 0x2b: - case 0x2c: + case MAP_OBJ_GFX_TUBER_M_1: + case MAP_OBJ_GFX_SWIMMER_M_WATER: + case MAP_OBJ_GFX_SWIMMER_F_WATER: return 0x4f; default: return 0x4d; @@ -1468,7 +1471,7 @@ static s32 GetRematchIdx(const VsSeekerData * vsSeekerData, u16 trainerFlagIdx) { u32 i; - for (i = 0; i < ARRAY_COUNT(sVsSeekerData); i++) + for (i = 0; i < NELEMS(sVsSeekerData); i++) { if (vsSeekerData[i].trainerIdxs[0] == trainerFlagIdx) return i; @@ -1488,7 +1491,7 @@ void sub_810D0D0(void) { u8 i; - for (i = 0; i < 100; i++) + for (i = 0; i < NELEMS(gSaveBlock1Ptr->trainerRematches); i++) gSaveBlock1Ptr->trainerRematches[i] = 0; } @@ -1515,7 +1518,7 @@ static u8 GetNextAvailableRematchTrainer(const VsSeekerData * vsSeekerData, u16 u32 i; s32 j; - for (i = 0; i < ARRAY_COUNT(sVsSeekerData); i++) + for (i = 0; i < NELEMS(sVsSeekerData); i++) { if (vsSeekerData[i].trainerIdxs[0] == trainerFlagNo) { @@ -1526,7 +1529,7 @@ static u8 GetNextAvailableRematchTrainer(const VsSeekerData * vsSeekerData, u16 return j - 1; if (vsSeekerData[i].trainerIdxs[j] == 0xffff) continue; - if (HasTrainerAlreadyBeenFought(vsSeekerData[i].trainerIdxs[j])) + if (HasTrainerBeenFought(vsSeekerData[i].trainerIdxs[j])) continue; return j; } @@ -1547,7 +1550,7 @@ static u8 GetRematchableTrainerLocalId(void) { if (IsTrainerVisibleOnScreen(&sVsSeeker->trainerInfo[i]) == 1) { - if (HasTrainerAlreadyBeenFought(sVsSeeker->trainerInfo[i].trainerIdx) != 1 || GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[i].trainerIdx, &idx)) + if (HasTrainerBeenFought(sVsSeeker->trainerInfo[i].trainerIdx) != 1 || GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[i].trainerIdx, &idx)) return sVsSeeker->trainerInfo[i].localId; } } @@ -1596,7 +1599,7 @@ static void StartAllRespondantIdleMovements(void) struct MapObject *r4 = &gMapObjects[sVsSeeker->trainerInfo[j].fieldObjectId]; if (sub_810CF04(sVsSeeker->trainerInfo[j].fieldObjectId) == 1) - npc_set_running_behaviour_etc(r4, sVsSeeker->runningBehaviourEtcArray[i]); + SetTrainerMovementType(r4, sVsSeeker->runningBehaviourEtcArray[i]); sub_805FE7C(r4, sVsSeeker->runningBehaviourEtcArray[i]); gSaveBlock1Ptr->trainerRematches[sVsSeeker->trainerInfo[j].localId] = GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[j].trainerIdx, &dummy); } diff --git a/src/wild_pokemon_area.c b/src/wild_pokemon_area.c index 5ea9d1610..df8f9b8d9 100644 --- a/src/wild_pokemon_area.c +++ b/src/wild_pokemon_area.c @@ -180,7 +180,7 @@ s32 BuildPokedexAreaSubspriteBuffer(u16 species, struct Subsprite * subsprites) seviiAreas = GetUnlockedSeviiAreas(); alteringCaveCount = 0; - alteringCaveNum = VarGet(VAR_0x4024); + alteringCaveNum = VarGet(VAR_ALTERING_CAVE_WILD_SET); if (alteringCaveNum > 8) alteringCaveNum = 0; for (i = 0, areaCount = 0; gWildMonHeaders[i].mapGroup != 0xFF; i++) |