From d5fe2240b84153cdbeb0ab8f07ecdd88c1614264 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Sun, 8 May 2022 21:07:44 -0400 Subject: [PATCH 01/51] fix IsAbilityPreventingEscape message in party menu --- src/battle_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index f260e5aaff..2a78759248 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4028,8 +4028,8 @@ static void HandleTurnActionSelectionState(void) { BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); } - else if ((i = IsAbilityPreventingEscape(gActiveBattler) - && ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL)) + else if (ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL + && (i = IsAbilityPreventingEscape(gActiveBattler))) // must be last to keep i value integrity { BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gBattleMons[i - 1].ability, gBattleStruct->battlerPartyOrders[gActiveBattler]); } From 03c21c3b71f848340baf90bad318c0027622b6e5 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sun, 15 May 2022 21:28:23 -0700 Subject: [PATCH 02/51] implementation of EXP candies --- src/data/items.h | 36 ++++++++++++++++++++++++--------- src/data/pokemon/item_effects.h | 10 ++++----- src/pokemon.c | 26 +++++++++++++++++++++++- 3 files changed, 56 insertions(+), 16 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index 63ad66dfec..298f65b4a6 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1354,11 +1354,17 @@ const struct Item gItems[] = // Candy +#define ONE_HUNDRED 1 << 4 +#define ONE_THOUSAND 1 << 5 +#define TEN_THOUSAND 1 << 6 +#define FULL_LEVEL 1 << 7 + [ITEM_RARE_CANDY] = { .name = _("Rare Candy"), .itemId = ITEM_RARE_CANDY, .price = 10000, + .holdEffectParam = FULL_LEVEL, .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1371,10 +1377,11 @@ const struct Item gItems[] = .name = _("Exp.Candy XS"), .itemId = ITEM_EXP_CANDY_XS, .price = 20, + .holdEffectParam = 1 | ONE_HUNDRED, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo .flingPower = 30, }, @@ -1383,10 +1390,11 @@ const struct Item gItems[] = .name = _("Exp.Candy S"), .itemId = ITEM_EXP_CANDY_S, .price = 240, + .holdEffectParam = 8 | ONE_HUNDRED, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo .flingPower = 30, }, @@ -1395,10 +1403,11 @@ const struct Item gItems[] = .name = _("Exp.Candy M"), .itemId = ITEM_EXP_CANDY_M, .price = 1000, + .holdEffectParam = 3 | ONE_THOUSAND, .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo .flingPower = 30, }, @@ -1407,10 +1416,11 @@ const struct Item gItems[] = .name = _("Exp.Candy L"), .itemId = ITEM_EXP_CANDY_L, .price = 3000, + .holdEffectParam = 1 | TEN_THOUSAND, .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo .flingPower = 30, }, @@ -1419,10 +1429,11 @@ const struct Item gItems[] = .name = _("Exp.Candy XL"), .itemId = ITEM_EXP_CANDY_XL, .price = 10000, + .holdEffectParam = 3 | TEN_THOUSAND, .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo .flingPower = 30, }, @@ -1438,6 +1449,11 @@ const struct Item gItems[] = .flingPower = 30, }, +#undef ONE_HUNDRED +#undef ONE_THOUSAND +#undef TEN_THOUSAND +#undef FULL_LEVEL + // Medicinal Flutes [ITEM_BLUE_FLUTE] = diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index ff621356e1..8892cb66f3 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -532,11 +532,11 @@ const u8 *const gItemEffectTable[] = // Candy [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, - //[ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, // Todo + [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, // Todo + [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, // Todo + [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, // Todo + [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, // Todo //[ITEM_DYNAMAX_CANDY - ITEM_POTION] = gItemEffect_DynamaxCandy, // Todo // Medicinal Flutes diff --git a/src/pokemon.c b/src/pokemon.c index 11be4da1f7..f987b24a89 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4873,16 +4873,40 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } +#define ONE_HUNDRED 1 << 4 +#define ONE_THOUSAND 1 << 5 +#define TEN_THOUSAND 1 << 6 +#define FULL_LEVEL 1 << 7 + // Rare Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + if (ItemId_GetHoldEffectParam(item) & FULL_LEVEL) + dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + else + { + temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; + if (ItemId_GetHoldEffectParam(item) & ONE_HUNDRED) + temp1 *= 100; + if (ItemId_GetHoldEffectParam(item) & ONE_THOUSAND) + temp1 *= 1000; + if (ItemId_GetHoldEffectParam(item) & TEN_THOUSAND) + temp1 *= 10000; + dataUnsigned = temp1 + gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL)]; + if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) + dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; + } SetMonData(mon, MON_DATA_EXP, &dataUnsigned); CalculateMonStats(mon); retVal = FALSE; } +#undef ONE_HUNDRED +#undef ONE_THOUSAND +#undef TEN_THOUSAND +#undef FULL_LEVEL + // Cure status if ((itemEffect[i] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battlerId) == 0) From 3e44ce08b35e5f97ba6eb8c11b0492e332732182 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sun, 15 May 2022 21:34:50 -0700 Subject: [PATCH 03/51] Revert "implementation of EXP candies" This reverts commit 03c21c3b71f848340baf90bad318c0027622b6e5. --- src/data/items.h | 36 +++++++++------------------------ src/data/pokemon/item_effects.h | 10 ++++----- src/pokemon.c | 26 +----------------------- 3 files changed, 16 insertions(+), 56 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index 298f65b4a6..63ad66dfec 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1354,17 +1354,11 @@ const struct Item gItems[] = // Candy -#define ONE_HUNDRED 1 << 4 -#define ONE_THOUSAND 1 << 5 -#define TEN_THOUSAND 1 << 6 -#define FULL_LEVEL 1 << 7 - [ITEM_RARE_CANDY] = { .name = _("Rare Candy"), .itemId = ITEM_RARE_CANDY, .price = 10000, - .holdEffectParam = FULL_LEVEL, .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1377,11 +1371,10 @@ const struct Item gItems[] = .name = _("Exp.Candy XS"), .itemId = ITEM_EXP_CANDY_XS, .price = 20, - .holdEffectParam = 1 | ONE_HUNDRED, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, @@ -1390,11 +1383,10 @@ const struct Item gItems[] = .name = _("Exp.Candy S"), .itemId = ITEM_EXP_CANDY_S, .price = 240, - .holdEffectParam = 8 | ONE_HUNDRED, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, @@ -1403,11 +1395,10 @@ const struct Item gItems[] = .name = _("Exp.Candy M"), .itemId = ITEM_EXP_CANDY_M, .price = 1000, - .holdEffectParam = 3 | ONE_THOUSAND, .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, @@ -1416,11 +1407,10 @@ const struct Item gItems[] = .name = _("Exp.Candy L"), .itemId = ITEM_EXP_CANDY_L, .price = 3000, - .holdEffectParam = 1 | TEN_THOUSAND, .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, @@ -1429,11 +1419,10 @@ const struct Item gItems[] = .name = _("Exp.Candy XL"), .itemId = ITEM_EXP_CANDY_XL, .price = 10000, - .holdEffectParam = 3 | TEN_THOUSAND, .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, @@ -1449,11 +1438,6 @@ const struct Item gItems[] = .flingPower = 30, }, -#undef ONE_HUNDRED -#undef ONE_THOUSAND -#undef TEN_THOUSAND -#undef FULL_LEVEL - // Medicinal Flutes [ITEM_BLUE_FLUTE] = diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 8892cb66f3..ff621356e1 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -532,11 +532,11 @@ const u8 *const gItemEffectTable[] = // Candy [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, // Todo + //[ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + //[ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + //[ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + //[ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + //[ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_ExpCandy, // Todo //[ITEM_DYNAMAX_CANDY - ITEM_POTION] = gItemEffect_DynamaxCandy, // Todo // Medicinal Flutes diff --git a/src/pokemon.c b/src/pokemon.c index f987b24a89..11be4da1f7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4873,40 +4873,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } -#define ONE_HUNDRED 1 << 4 -#define ONE_THOUSAND 1 << 5 -#define TEN_THOUSAND 1 << 6 -#define FULL_LEVEL 1 << 7 - // Rare Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - if (ItemId_GetHoldEffectParam(item) & FULL_LEVEL) - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; - else - { - temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; - if (ItemId_GetHoldEffectParam(item) & ONE_HUNDRED) - temp1 *= 100; - if (ItemId_GetHoldEffectParam(item) & ONE_THOUSAND) - temp1 *= 1000; - if (ItemId_GetHoldEffectParam(item) & TEN_THOUSAND) - temp1 *= 10000; - dataUnsigned = temp1 + gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL)]; - if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; - } + dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; SetMonData(mon, MON_DATA_EXP, &dataUnsigned); CalculateMonStats(mon); retVal = FALSE; } -#undef ONE_HUNDRED -#undef ONE_THOUSAND -#undef TEN_THOUSAND -#undef FULL_LEVEL - // Cure status if ((itemEffect[i] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battlerId) == 0) From 793e8ef5a47504cc60f96c06040186dbf63f9e67 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 13:12:41 -0700 Subject: [PATCH 04/51] fixed learning moves --- src/data/items.h | 12 +++---- src/party_menu.c | 89 +++++++++++++++++++++++++++++++----------------- src/pokemon.c | 20 +++++------ 3 files changed, 74 insertions(+), 47 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index 298f65b4a6..12ca812475 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1381,7 +1381,7 @@ const struct Item gItems[] = .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1394,7 +1394,7 @@ const struct Item gItems[] = .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1407,7 +1407,7 @@ const struct Item gItems[] = .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1420,7 +1420,7 @@ const struct Item gItems[] = .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1433,7 +1433,7 @@ const struct Item gItems[] = .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_RareCandy, // Todo + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1445,7 +1445,7 @@ const struct Item gItems[] = .description = sDynamaxCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, .flingPower = 30, }, diff --git a/src/party_menu.c b/src/party_menu.c index 4091437772..cef8e617e9 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -151,6 +151,8 @@ EWRAM_DATA u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE] = {0}; static EWRAM_DATA u16 sPartyMenuItemId = 0; static EWRAM_DATA u16 sUnused = 0; EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on +static EWRAM_DATA u8 sInitialLevel = 0; +static EWRAM_DATA u8 sFinalLevel = 0; // IWRAM common void (*gItemUseCB)(u8, TaskFunc); @@ -4822,7 +4824,10 @@ static void Task_LearnNextMoveOrClosePartyMenu(u8 taskId) if (IsFanfareTaskInactive() && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) { if (gPartyMenu.learnMoveState == 1) - Task_TryLearningNextMove(taskId); + if (sInitialLevel < sFinalLevel) + Task_TryLearnNewMoves(taskId); + else + Task_TryLearningNextMove(taskId); else { if (gPartyMenu.learnMoveState == 2) // never occurs @@ -4874,6 +4879,7 @@ static void CB2_ShowSummaryScreenToForgetMove(void) static void CB2_ReturnToPartyMenuWhileLearningMove(void) { + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback); } @@ -4979,8 +4985,9 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) s16 *arrayPtr = ptr->data; u16 *itemPtr = &gSpecialVar_ItemId; bool8 cannotUseEffect; + sInitialLevel = GetMonData(mon, MON_DATA_LEVEL); - if (GetMonData(mon, MON_DATA_LEVEL) != MAX_LEVEL) + if (sInitialLevel != MAX_LEVEL) { BufferMonStatsToTaskData(mon, arrayPtr); cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, *itemPtr, 0); @@ -5009,6 +5016,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); DisplayPartyMenuMessage(gStringVar4, TRUE); ScheduleBgCopyTilemapToVram(2); + sFinalLevel = GetMonData(mon, MON_DATA_LEVEL, NULL); gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; } } @@ -5067,49 +5075,68 @@ static void DisplayLevelUpStatsPg2(u8 taskId) static void Task_TryLearnNewMoves(u8 taskId) { + u8 i; u16 learnMove; if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) { RemoveLevelUpStatsWindow(); - learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); - gPartyMenu.learnMoveState = 1; - switch (learnMove) + for (; sInitialLevel < sFinalLevel; sInitialLevel++) { - case 0: // No moves to learn - PartyMenuTryEvolution(taskId); - break; - case MON_HAS_MAX_MOVES: - DisplayMonNeedsToReplaceMove(taskId); - break; - case MON_ALREADY_KNOWS_MOVE: - gTasks[taskId].func = Task_TryLearningNextMove; - break; - default: - DisplayMonLearnedMove(taskId, learnMove); - break; + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); + learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); + gPartyMenu.learnMoveState = 1; + switch (learnMove) + { + case 0: // No moves to learn + if(sInitialLevel >= sFinalLevel) + PartyMenuTryEvolution(taskId); + break; + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); + break; + case MON_ALREADY_KNOWS_MOVE: + gTasks[taskId].func = Task_TryLearningNextMove; + break; + default: + DisplayMonLearnedMove(taskId, learnMove); + break; + } + if (learnMove) + break; } } } static void Task_TryLearningNextMove(u8 taskId) { - u16 result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); - - switch (result) + u8 i; + u16 result; + for (; sInitialLevel < sFinalLevel; sInitialLevel++) { - case 0: // No moves to learn - PartyMenuTryEvolution(taskId); - break; - case MON_HAS_MAX_MOVES: - DisplayMonNeedsToReplaceMove(taskId); - break; - case MON_ALREADY_KNOWS_MOVE: - return; - default: - DisplayMonLearnedMove(taskId, result); - break; + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); + result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); + gPartyMenu.learnMoveState = 1; + switch (result) + { + case 0: // No moves to learn + if(sInitialLevel >= sFinalLevel) + PartyMenuTryEvolution(taskId); + break; + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); + break; + case MON_ALREADY_KNOWS_MOVE: + return; + default: + DisplayMonLearnedMove(taskId, result); + break; + } + if (result) + break; } + if(sInitialLevel >= sFinalLevel) + PartyMenuTryEvolution(taskId); } static void PartyMenuTryEvolution(u8 taskId) diff --git a/src/pokemon.c b/src/pokemon.c index f987b24a89..a064d6acc6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4708,6 +4708,11 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, } \ } +#define ONE_HUNDRED 1 << 4 +#define ONE_THOUSAND 1 << 5 +#define TEN_THOUSAND 1 << 6 +#define FULL_LEVEL 1 << 7 + // Returns TRUE if the item has no effect on the Pokémon, FALSE otherwise bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) { @@ -4873,11 +4878,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } -#define ONE_HUNDRED 1 << 4 -#define ONE_THOUSAND 1 << 5 -#define TEN_THOUSAND 1 << 6 -#define FULL_LEVEL 1 << 7 - // Rare Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) @@ -4902,11 +4902,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } -#undef ONE_HUNDRED -#undef ONE_THOUSAND -#undef TEN_THOUSAND -#undef FULL_LEVEL - // Cure status if ((itemEffect[i] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battlerId) == 0) @@ -5301,6 +5296,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov return retVal; } +#undef ONE_HUNDRED +#undef ONE_THOUSAND +#undef TEN_THOUSAND +#undef FULL_LEVEL + bool8 HealStatusConditions(struct Pokemon *mon, u32 battlePartyId, u32 healMask, u8 battlerId) { u32 status = GetMonData(mon, MON_DATA_STATUS, 0); From d212a136dacfc2f4223186067cd4fbedc824cb7d Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 13:25:30 -0700 Subject: [PATCH 05/51] clean-up --- src/party_menu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index cef8e617e9..1b1755d0c7 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5075,7 +5075,6 @@ static void DisplayLevelUpStatsPg2(u8 taskId) static void Task_TryLearnNewMoves(u8 taskId) { - u8 i; u16 learnMove; if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) @@ -5110,7 +5109,6 @@ static void Task_TryLearnNewMoves(u8 taskId) static void Task_TryLearningNextMove(u8 taskId) { - u8 i; u16 result; for (; sInitialLevel < sFinalLevel; sInitialLevel++) { From 0de15db56417f57c52fbd006519c8650036f1c19 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 13:26:26 -0700 Subject: [PATCH 06/51] clean-up --- src/data/pokemon/item_effects.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 8892cb66f3..49293889a7 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -532,11 +532,11 @@ const u8 *const gItemEffectTable[] = // Candy [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, // Todo - [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, // Todo + [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, //[ITEM_DYNAMAX_CANDY - ITEM_POTION] = gItemEffect_DynamaxCandy, // Todo // Medicinal Flutes From 6cb152e45271884603c32d7e227ebeb01261defd Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 13:51:28 -0700 Subject: [PATCH 07/51] removing nonessential stuff --- src/party_menu.c | 12 +++--------- src/pokemon.c | 2 ++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index 1b1755d0c7..f0069300bf 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4824,10 +4824,7 @@ static void Task_LearnNextMoveOrClosePartyMenu(u8 taskId) if (IsFanfareTaskInactive() && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) { if (gPartyMenu.learnMoveState == 1) - if (sInitialLevel < sFinalLevel) - Task_TryLearnNewMoves(taskId); - else - Task_TryLearningNextMove(taskId); + Task_TryLearningNextMove(taskId); else { if (gPartyMenu.learnMoveState == 2) // never occurs @@ -5088,7 +5085,7 @@ static void Task_TryLearnNewMoves(u8 taskId) switch (learnMove) { case 0: // No moves to learn - if(sInitialLevel >= sFinalLevel) + if (sInitialLevel >= sFinalLevel) PartyMenuTryEvolution(taskId); break; case MON_HAS_MAX_MOVES: @@ -5114,12 +5111,9 @@ static void Task_TryLearningNextMove(u8 taskId) { SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); - gPartyMenu.learnMoveState = 1; switch (result) { case 0: // No moves to learn - if(sInitialLevel >= sFinalLevel) - PartyMenuTryEvolution(taskId); break; case MON_HAS_MAX_MOVES: DisplayMonNeedsToReplaceMove(taskId); @@ -5133,7 +5127,7 @@ static void Task_TryLearningNextMove(u8 taskId) if (result) break; } - if(sInitialLevel >= sFinalLevel) + if (sInitialLevel >= sFinalLevel) PartyMenuTryEvolution(taskId); } diff --git a/src/pokemon.c b/src/pokemon.c index a064d6acc6..953278846a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4883,7 +4883,9 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { if (ItemId_GetHoldEffectParam(item) & FULL_LEVEL) + { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + } else { temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; From 01665c0213fd52219d6b9b118295dca3a3ac5f27 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 13:52:38 -0700 Subject: [PATCH 08/51] reverted todo for dynamax candy --- src/data/items.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/items.h b/src/data/items.h index 12ca812475..af62f0abed 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1445,7 +1445,7 @@ const struct Item gItems[] = .description = sDynamaxCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo .flingPower = 30, }, From bd008e4c80515c4d299b9ba98f9ed689bb2b2fe7 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 15:25:13 -0700 Subject: [PATCH 09/51] fixed softlocks / messages --- include/strings.h | 1 + src/party_menu.c | 31 ++++++++++++++++++++++--------- src/strings.c | 1 + 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/strings.h b/include/strings.h index a22aa307bb..f3a86eb464 100644 --- a/include/strings.h +++ b/include/strings.h @@ -498,6 +498,7 @@ extern const u8 gText_12PoofForgotMove[]; extern const u8 gText_StopLearningMove2[]; extern const u8 gText_MoveNotLearned[]; extern const u8 gText_PkmnElevatedToLvVar2[]; +extern const u8 gText_PkmnGainedExp[]; extern const u8 gText_RemoveMailBeforeItem[]; extern const u8 gText_PkmnHoldingItemCantHoldMail[]; extern const u8 gText_MailTransferredFromMailbox[]; diff --git a/src/party_menu.c b/src/party_menu.c index f0069300bf..07d4d9a155 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5004,17 +5004,29 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) } else { + sFinalLevel = GetMonData(mon, MON_DATA_LEVEL, NULL); gPartyMenuUseExitCallback = TRUE; - PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); GetMonNickname(mon, gStringVar1); - ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3); - StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); - DisplayPartyMenuMessage(gStringVar4, TRUE); - ScheduleBgCopyTilemapToVram(2); - sFinalLevel = GetMonData(mon, MON_DATA_LEVEL, NULL); - gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; + if (sFinalLevel > sInitialLevel) + { + PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); + ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3); + StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); + DisplayPartyMenuMessage(gStringVar4, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; + } + else + { + PlaySE(SE_USE_ITEM); + gPartyMenuUseExitCallback = FALSE; + StringExpandPlaceholders(gStringVar4, gText_PkmnGainedExp); + DisplayPartyMenuMessage(gStringVar4, FALSE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = task; + } } } @@ -5047,6 +5059,7 @@ static void Task_DisplayLevelUpStatsPg2(u8 taskId) { PlaySE(SE_SELECT); DisplayLevelUpStatsPg2(taskId); + sInitialLevel += 1; // so the Pokemon doesn't learn a move meant for its previous level gTasks[taskId].func = Task_TryLearnNewMoves; } } @@ -5077,7 +5090,7 @@ static void Task_TryLearnNewMoves(u8 taskId) if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) { RemoveLevelUpStatsWindow(); - for (; sInitialLevel < sFinalLevel; sInitialLevel++) + for (; sInitialLevel <= sFinalLevel; sInitialLevel++) { SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); @@ -5107,7 +5120,7 @@ static void Task_TryLearnNewMoves(u8 taskId) static void Task_TryLearningNextMove(u8 taskId) { u16 result; - for (; sInitialLevel < sFinalLevel; sInitialLevel++) + for (; sInitialLevel <= sFinalLevel; sInitialLevel++) { SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); diff --git a/src/strings.c b/src/strings.c index 492a9601d2..731cde1a36 100644 --- a/src/strings.c +++ b/src/strings.c @@ -417,6 +417,7 @@ const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNT const u8 gText_PkmnBecameHealthy[] = _("{STR_VAR_1} became healthy.{PAUSE_UNTIL_PRESS}"); const u8 gText_MovesPPIncreased[] = _("{STR_VAR_1}'s PP increased.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnElevatedToLvVar2[] = _("{STR_VAR_1} was elevated to\nLv. {STR_VAR_2}."); +const u8 gText_PkmnGainedExp[] = _("{STR_VAR_1} gained EXP. POINTS.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnBaseVar2StatIncreased[] = _("{STR_VAR_1}'s base {STR_VAR_2}\nstat was raised.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnFriendlyBaseVar2Fell[] = _("{STR_VAR_1} turned friendly.\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnAdoresBaseVar2Fell[] = _("{STR_VAR_1} adores you!\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); From d385b838c8fd6ca32f35a4327dc17f9d2a7434b3 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 16 May 2022 15:53:42 -0700 Subject: [PATCH 10/51] fixed exp resetting --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 953278846a..7cb72b37f6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4895,7 +4895,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov temp1 *= 1000; if (ItemId_GetHoldEffectParam(item) & TEN_THOUSAND) temp1 *= 10000; - dataUnsigned = temp1 + gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL)]; + dataUnsigned = temp1 + GetMonData(mon, MON_DATA_EXP, NULL); if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; } From b197da077f6c14a1108f50aa643c556a12fc071e Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Mon, 16 May 2022 16:08:26 -0700 Subject: [PATCH 11/51] Update src/strings.c Co-authored-by: LOuroboros --- src/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strings.c b/src/strings.c index 731cde1a36..edd9522072 100644 --- a/src/strings.c +++ b/src/strings.c @@ -417,7 +417,7 @@ const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNT const u8 gText_PkmnBecameHealthy[] = _("{STR_VAR_1} became healthy.{PAUSE_UNTIL_PRESS}"); const u8 gText_MovesPPIncreased[] = _("{STR_VAR_1}'s PP increased.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnElevatedToLvVar2[] = _("{STR_VAR_1} was elevated to\nLv. {STR_VAR_2}."); -const u8 gText_PkmnGainedExp[] = _("{STR_VAR_1} gained EXP. POINTS.{PAUSE_UNTIL_PRESS}"); +const u8 gText_PkmnGainedExp[] = _("{STR_VAR_1} gained Exp. Points!{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnBaseVar2StatIncreased[] = _("{STR_VAR_1}'s base {STR_VAR_2}\nstat was raised.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnFriendlyBaseVar2Fell[] = _("{STR_VAR_1} turned friendly.\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnAdoresBaseVar2Fell[] = _("{STR_VAR_1} adores you!\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); From 2d25cd56b987062357806ca1ba652abe78b89e39 Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Mon, 16 May 2022 16:58:08 -0700 Subject: [PATCH 12/51] Apply suggestions from code review Co-authored-by: sneed <56992013+Sneed69@users.noreply.github.com> --- src/pokemon.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 7cb72b37f6..095d7f414b 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4885,9 +4885,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (ItemId_GetHoldEffectParam(item) & FULL_LEVEL) { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + SetMonData(mon, MON_DATA_EXP, &dataUnsigned); + CalculateMonStats(mon); } else { + u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; if (ItemId_GetHoldEffectParam(item) & ONE_HUNDRED) temp1 *= 100; @@ -4896,11 +4900,12 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (ItemId_GetHoldEffectParam(item) & TEN_THOUSAND) temp1 *= 10000; dataUnsigned = temp1 + GetMonData(mon, MON_DATA_EXP, NULL); - if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; + if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]) + dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]; + SetMonData(mon, MON_DATA_EXP, &dataUnsigned); + if (dataUnsigned >= gExperienceTables[gBaseStats[species].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]) + CalculateMonStats(mon); } - SetMonData(mon, MON_DATA_EXP, &dataUnsigned); - CalculateMonStats(mon); retVal = FALSE; } From e9669ccbfeaef5cfd03ae37298af0f88dd8d311a Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Mon, 16 May 2022 17:41:18 -0700 Subject: [PATCH 13/51] Update src/pokemon.c Co-authored-by: sneed <56992013+Sneed69@users.noreply.github.com> --- src/pokemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pokemon.c b/src/pokemon.c index 095d7f414b..d0f4f8a717 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4892,6 +4892,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov { u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + gBattleScripting.levelUpHP = 0; // Prevents reviving mons that don't level up. temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; if (ItemId_GetHoldEffectParam(item) & ONE_HUNDRED) temp1 *= 100; From aa5c6a3f0126bf693b84cb2ce6ae4a271dd45148 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 19 Jun 2022 16:43:22 -0300 Subject: [PATCH 14/51] Implemented affection-now-friendship mechanics --- data/battle_anim_scripts.s | 12 ++++++ data/battle_scripts_1.s | 55 +++++++++++++++++++++++++++ include/battle.h | 1 + include/battle_scripts.h | 2 + include/battle_util.h | 1 + include/constants/battle.h | 21 +++++----- include/constants/battle_anim.h | 1 + include/constants/battle_config.h | 1 + include/constants/battle_string_ids.h | 8 +++- src/battle_message.c | 12 ++++++ src/battle_script_commands.c | 54 +++++++++++++++++++++++++- src/battle_util.c | 37 ++++++++++++++++++ 12 files changed, 193 insertions(+), 12 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index d76aff05a6..1ea6fc2b4d 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -831,6 +831,7 @@ gBattleAnims_General:: .4byte General_AquaRingHeal @ B_ANIM_AQUA_RING_HEAL .4byte General_BeakBlastSetUp @ B_ANIM_BEAK_BLAST_SETUP .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP + .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON .align 2 gBattleAnims_Special:: @@ -24774,6 +24775,17 @@ PrimalReversionParticles: delay 3 return +General_AffectionHangedOn:: @ Shameless copy of General_HangedOn + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 7, 0, 9, RGB_RED + playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER + createvisualtask AnimTask_SlideMonForFocusBand, 5, 30, 128, 0, 1, 2, 0, 1 + waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 4, 9, 0, RGB_RED + waitforvisualfinish + delay 6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 0, 0, 0, 15 + end + SnatchMoveTrySwapFromSubstitute: createvisualtask AnimTask_IsAttackerBehindSubstitute, 2 jumprettrue SnatchMoveSwapSubstituteForMon diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a9c15040d3..80df7a9943 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -412,6 +412,61 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE .4byte BattleScript_EffectSteelBeam @ EFFECT_STEEL_BEAM +BattleScript_AffectionBasedEndurance:: + playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON + printstring STRINGID_TARGETTOUGHEDITOUT + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_AffectionBasedStatusHeal:: + jumpifstatus BS_ATTACKER, STATUS1_POISON, BattleScript_AffectionBasedStatusHeal_Poison + jumpifstatus BS_ATTACKER, STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatusHeal_Poison + jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatusHeal_Sleep + jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatusHeal_Paralysis + jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatusHeal_Burn + jumpifstatus BS_ATTACKER, STATUS1_FREEZE, BattleScript_AffectionBasedStatusHeal_Freeze + end2 +BattleScript_AffectionBasedStatusHeal_Poison: + printstring STRINGID_ATTACKEREXPELLEDTHEPOISON + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 +BattleScript_AffectionBasedStatusHeal_Sleep: + printstring STRINGID_ATTACKERSHOOKITSELFAWAKE + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 +BattleScript_AffectionBasedStatusHeal_Paralysis: + printstring STRINGID_ATTACKERBROKETHROUGHPARALYSIS + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 +BattleScript_AffectionBasedStatusHeal_Burn: + printstring STRINGID_ATTACKERHEALEDITSBURN + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 +BattleScript_AffectionBasedStatusHeal_Freeze: + printstring STRINGID_ATTACKERMELTEDTHEICE + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 + BattleScript_EffectSteelBeam:: attackcanceler attackstring diff --git a/include/battle.h b/include/battle.h index ea556c012a..6d6dc46959 100644 --- a/include/battle.h +++ b/include/battle.h @@ -184,6 +184,7 @@ struct SpecialStatus u8 physicalBattlerId; u8 specialBattlerId; u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self. + bool8 affectionEndured:1; }; struct SideTimer diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 4134a87dcf..071a0846af 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -420,5 +420,7 @@ extern const u8 BattleScript_MagicianActivates[]; extern const u8 BattleScript_BeakBlastSetUp[]; extern const u8 BattleScript_BeakBlastBurn[]; extern const u8 BattleScript_DefDownSpeedUp[]; +extern const u8 BattleScript_AffectionBasedStatusHeal[]; +extern const u8 BattleScript_AffectionBasedEndurance[]; #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/battle_util.h b/include/battle_util.h index f1864f0967..0f982423ee 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -189,5 +189,6 @@ bool32 CanBeParalyzed(u8 battlerId); bool32 CanBeFrozen(u8 battlerId); bool32 CanBeConfused(u8 battlerId); bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag); +u32 GetMonFriendshipScore(struct Pokemon *pokemon); #endif // GUARD_BATTLE_UTIL_H diff --git a/include/constants/battle.h b/include/constants/battle.h index d651dab189..6a078f7a18 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -248,16 +248,17 @@ #define STATUS_FIELD_TERRAIN_ANY (STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN) // Flags describing move's result -#define MOVE_RESULT_MISSED (1 << 0) -#define MOVE_RESULT_SUPER_EFFECTIVE (1 << 1) -#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2) -#define MOVE_RESULT_DOESNT_AFFECT_FOE (1 << 3) -#define MOVE_RESULT_ONE_HIT_KO (1 << 4) -#define MOVE_RESULT_FAILED (1 << 5) -#define MOVE_RESULT_FOE_ENDURED (1 << 6) -#define MOVE_RESULT_FOE_HUNG_ON (1 << 7) -#define MOVE_RESULT_STURDIED (1 << 8) -#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) +#define MOVE_RESULT_MISSED (1 << 0) +#define MOVE_RESULT_SUPER_EFFECTIVE (1 << 1) +#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2) +#define MOVE_RESULT_DOESNT_AFFECT_FOE (1 << 3) +#define MOVE_RESULT_ONE_HIT_KO (1 << 4) +#define MOVE_RESULT_FAILED (1 << 5) +#define MOVE_RESULT_FOE_ENDURED (1 << 6) +#define MOVE_RESULT_FOE_HUNG_ON (1 << 7) +#define MOVE_RESULT_STURDIED (1 << 8) +#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) +#define MOVE_RESULT_FOE_ENDURED_AFFECTION (1 << 9) // Battle Weather flags #define B_WEATHER_RAIN_TEMPORARY (1 << 0) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index bddb727fd7..8e34fbcc09 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -534,6 +534,7 @@ #define B_ANIM_AQUA_RING_HEAL 32 #define B_ANIM_BEAK_BLAST_SETUP 33 #define B_ANIM_SHELL_TRAP_SETUP 34 +#define B_ANIM_AFFECTION_HANGED_ON 35 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 74ac9e1299..0a58ba94d8 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -254,6 +254,7 @@ #define B_MULTI_BATTLE_WHITEOUT GEN_8 // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight. #define B_EVOLUTION_AFTER_WHITEOUT GEN_6 // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses. #define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper) +#define B_AFFECTION_MECHANICS FALSE // In Gen6+, there's a stat called affection that can trigger different effects in battle. From LGPE onwards, those effects use friendship instead. // Animation Settings #define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 4eff91c857..bfc0472994 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -613,8 +613,14 @@ #define STRINGID_METEORBEAMCHARGING 611 #define STRINGID_HEATUPBEAK 612 #define STRINGID_COURTCHANGE 613 +#define STRINGID_ATTACKEREXPELLEDTHEPOISON 614 +#define STRINGID_ATTACKERSHOOKITSELFAWAKE 615 +#define STRINGID_ATTACKERBROKETHROUGHPARALYSIS 616 +#define STRINGID_ATTACKERHEALEDITSBURN 617 +#define STRINGID_ATTACKERMELTEDTHEICE 618 +#define STRINGID_TARGETTOUGHEDITOUT 619 -#define BATTLESTRINGS_COUNT 614 +#define BATTLESTRINGS_COUNT 620 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_message.c b/src/battle_message.c index 8cf9a508b2..dae30f176c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -738,9 +738,21 @@ static const u8 sText_TargetTooHeavy[] = _("But the target\nwas too heavy!"); static const u8 sText_MeteorBeamCharging[] = _("{B_ATK_NAME_WITH_PREFIX} is overflowing\nwith space energy!"); static const u8 sText_HeatingUpBeak[] = _("{B_ATK_NAME_WITH_PREFIX} started\nheating up its beak!"); static const u8 sText_CourtChange[] = _("{B_ATK_NAME_WITH_PREFIX} swapped the battle\neffects affecting each side!"); +static const u8 sText_AttackerExpelledThePoison[] = _("{B_ATK_NAME_WITH_PREFIX} managed to\nexpel the poison!"); +static const u8 sText_AttackerShookItselfAwake[] = _("{B_ATK_NAME_WITH_PREFIX} shook itself awake!"); +static const u8 sText_AttackerBrokeThroughParalysis[] = _("{B_ATK_NAME_WITH_PREFIX} gathered all its energy\nto overcome its paralysis!"); +static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!"); +static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!"); +static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut, + [STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce, + [STRINGID_ATTACKERHEALEDITSBURN - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsBurn, + [STRINGID_ATTACKERBROKETHROUGHPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_AttackerBrokeThroughParalysis, + [STRINGID_ATTACKERSHOOKITSELFAWAKE - BATTLESTRINGS_TABLE_START] = sText_AttackerShookItselfAwake, + [STRINGID_ATTACKEREXPELLEDTHEPOISON - BATTLESTRINGS_TABLE_START] = sText_AttackerExpelledThePoison, [STRINGID_COURTCHANGE - BATTLESTRINGS_TABLE_START] = sText_CourtChange, [STRINGID_HEATUPBEAK - BATTLESTRINGS_TABLE_START] = sText_HeatingUpBeak, [STRINGID_METEORBEAMCHARGING - BATTLESTRINGS_TABLE_START] = sText_MeteorBeamCharging, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 15915c71a6..1d42e55116 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1719,6 +1719,13 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move) if (gFieldStatuses & STATUS_FIELD_GRAVITY) calc = (calc * 5) / 3; // 1.66 Gravity acc boost +#if B_AFFECTION_MECHANICS == TRUE + // With high affection/friendship there's a chance to evade a move by substracting 10% of its accuracy. + // I can't find exact information about that chance, so I'm just gonna write it as a 20% chance for now. + if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= 4 && (Random() % 100) <= 20) + calc = (calc * 90) / 100; +#endif + return calc; } @@ -1885,7 +1892,10 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi + (holdEffectAtk == HOLD_EFFECT_SCOPE_LENS) + 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk) - + (abilityAtk == ABILITY_SUPER_LUCK); + + (abilityAtk == ABILITY_SUPER_LUCK) + #if B_AFFECTION_MECHANICS == TRUE + *= 2 (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= 5); + #endif if (critChance >= ARRAY_COUNT(sCriticalHitChance)) critChance = ARRAY_COUNT(sCriticalHitChance) - 1; @@ -1983,12 +1993,27 @@ static void Cmd_adjustdamage(void) RecordAbilityBattle(gBattlerTarget, ABILITY_STURDY); gSpecialStatuses[gBattlerTarget].sturdied = TRUE; } +#if B_AFFECTION_MECHANICS == TRUE + else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) >= 3) + { + if ((GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 6 && (Random() % 100) < 25) + || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 5 && (Random() % 100) < 20) + || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 4 && (Random() % 100) < 15) + || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 3 && (Random() % 100) < 10)) + gSpecialStatuses[gBattlerTarget].affectionEndured = TRUE; + } +#endif if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBattlerTarget].endured && !gSpecialStatuses[gBattlerTarget].focusBanded && !gSpecialStatuses[gBattlerTarget].focusSashed +#if B_AFFECTION_MECHANICS == TRUE + && !gSpecialStatuses[gBattlerTarget].sturdied + && !gSpecialStatuses[gBattlerTarget].affectionEndured) +#else && !gSpecialStatuses[gBattlerTarget].sturdied) +#endif goto END; // Handle reducing the dmg to 1 hp. @@ -2008,6 +2033,12 @@ static void Cmd_adjustdamage(void) gMoveResultFlags |= MOVE_RESULT_STURDIED; gLastUsedAbility = ABILITY_STURDY; } +#if B_AFFECTION_MECHANICS == TRUE + else if (gSpecialStatuses[gBattlerTarget].affectionEndured) + { + gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED_AFFECTION; + } +#endif END: gBattlescriptCurrInstr++; @@ -2463,6 +2494,16 @@ static void Cmd_resultmessage(void) { stringId = STRINGID_BUTITFAILED; } + #if B_AFFECTION_MECHANICS == TRUE + else if (gMoveResultFlags & MOVE_RESULT_FOE_ENDURED_AFFECTION) + { + gSpecialStatuses[gBattlerTarget].affectionEndured = FALSE; + gMoveResultFlags &= ~MOVE_RESULT_FOE_ENDURED_AFFECTION; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AffectionBasedEndurance; + return; + } + #endif else { gBattleCommunication[MSG_DISPLAY] = 0; @@ -4008,6 +4049,10 @@ static void Cmd_getexp(void) gBattleMoveDamage = value + 1; } #endif + #if B_AFFECTION_MECHANICS == TRUE + if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= 2) + gBattleMoveDamage = (gBattleMoveDamage * 120) / 100; + #endif if (IsTradedMon(&gPlayerParty[gBattleStruct->expGetterMonId])) { @@ -10932,6 +10977,13 @@ static void Cmd_tryKO(void) gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON; gLastUsedItem = gBattleMons[gBattlerTarget].item; } + #if B_AFFECTION_MECHANICS == TRUE + else if (gSpecialStatuses[gBattlerTarget].affectionEndured) + { + gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1; + gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED_AFFECTION; + } + #endif else { gBattleMoveDamage = gBattleMons[gBattlerTarget].hp; diff --git a/src/battle_util.c b/src/battle_util.c index ebd7917d47..89f2b86fab 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2077,6 +2077,24 @@ void TryToRevertMimicry(void) } } +u32 GetMonFriendshipScore(struct Pokemon *pokemon) // Based on GetLeadMonFriendshipScore +{ + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == 255) + return 6; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) + return 5; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) + return 4; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) + return 3; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) + return 2; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) + return 1; + + return 0; +} + enum { ENDTURN_ORDER, @@ -2105,6 +2123,9 @@ enum ENDTURN_ION_DELUGE, ENDTURN_FAIRY_LOCK, ENDTURN_RETALIATE, +#if B_AFFECTION_MECHANICS == TRUE + ENDTURN_STATUS_HEAL, +#endif ENDTURN_FIELD_COUNT, }; @@ -2552,6 +2573,22 @@ u8 DoFieldEndTurnEffects(void) gSideTimers[B_SIDE_OPPONENT].retaliateTimer--; gBattleStruct->turnCountersTracker++; break; + #if B_AFFECTION_MECHANICS == TRUE + case ENDTURN_STATUS_HEAL: + for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) + { + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER + && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= 4 + && (Random() % 100 < 20)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + BattleScriptExecute(BattleScript_AffectionBasedStatusHeal); + break; + } + } + gBattleStruct->turnCountersTracker++; + break; + #endif case ENDTURN_FIELD_COUNT: effect++; break; From deef09112f75f0d6de4bc32e9bb35776d42a7edc Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 22 Jun 2022 08:42:31 -0300 Subject: [PATCH 15/51] Corrected usage of B_AFFECTION_MECHANICS in CalcCritChanceStage --- src/battle_script_commands.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 1d42e55116..4e238c54d2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1892,9 +1892,11 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi + (holdEffectAtk == HOLD_EFFECT_SCOPE_LENS) + 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk) - + (abilityAtk == ABILITY_SUPER_LUCK) #if B_AFFECTION_MECHANICS == TRUE + + (abilityAtk == ABILITY_SUPER_LUCK) *= 2 (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= 5); + #else + + (abilityAtk == ABILITY_SUPER_LUCK); #endif if (critChance >= ARRAY_COUNT(sCriticalHitChance)) From 9c73cb322e83deb528a58d58223b2a5d0ce9320e Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Wed, 20 Jul 2022 10:48:09 -0700 Subject: [PATCH 16/51] replaced bitfield with LUT --- src/data/items.h | 22 ++++++---------------- src/pokemon.c | 28 ++++++++-------------------- 2 files changed, 14 insertions(+), 36 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index af62f0abed..8d08f0fde8 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1354,17 +1354,12 @@ const struct Item gItems[] = // Candy -#define ONE_HUNDRED 1 << 4 -#define ONE_THOUSAND 1 << 5 -#define TEN_THOUSAND 1 << 6 -#define FULL_LEVEL 1 << 7 - [ITEM_RARE_CANDY] = { .name = _("Rare Candy"), .itemId = ITEM_RARE_CANDY, .price = 10000, - .holdEffectParam = FULL_LEVEL, + .holdEffectParam = 0xFF, .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1377,7 +1372,7 @@ const struct Item gItems[] = .name = _("Exp.Candy XS"), .itemId = ITEM_EXP_CANDY_XS, .price = 20, - .holdEffectParam = 1 | ONE_HUNDRED, + .holdEffectParam = 0, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1390,7 +1385,7 @@ const struct Item gItems[] = .name = _("Exp.Candy S"), .itemId = ITEM_EXP_CANDY_S, .price = 240, - .holdEffectParam = 8 | ONE_HUNDRED, + .holdEffectParam = 1, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1403,7 +1398,7 @@ const struct Item gItems[] = .name = _("Exp.Candy M"), .itemId = ITEM_EXP_CANDY_M, .price = 1000, - .holdEffectParam = 3 | ONE_THOUSAND, + .holdEffectParam = 2, .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1416,7 +1411,7 @@ const struct Item gItems[] = .name = _("Exp.Candy L"), .itemId = ITEM_EXP_CANDY_L, .price = 3000, - .holdEffectParam = 1 | TEN_THOUSAND, + .holdEffectParam = 3, .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1429,7 +1424,7 @@ const struct Item gItems[] = .name = _("Exp.Candy XL"), .itemId = ITEM_EXP_CANDY_XL, .price = 10000, - .holdEffectParam = 3 | TEN_THOUSAND, + .holdEffectParam = 4, .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1449,11 +1444,6 @@ const struct Item gItems[] = .flingPower = 30, }, -#undef ONE_HUNDRED -#undef ONE_THOUSAND -#undef TEN_THOUSAND -#undef FULL_LEVEL - // Medicinal Flutes [ITEM_BLUE_FLUTE] = diff --git a/src/pokemon.c b/src/pokemon.c index 7cb72b37f6..9ebfcd1a57 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4708,10 +4708,9 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, } \ } -#define ONE_HUNDRED 1 << 4 -#define ONE_THOUSAND 1 << 5 -#define TEN_THOUSAND 1 << 6 -#define FULL_LEVEL 1 << 7 +// EXP candies store an index for this table in their holdEffectParam. +#define NUM_EXP_CANDY_SIZES 5 +static const u32 sExpCandyExperienceTable[] = {100, 800, 3000, 10000, 30000}; // Returns TRUE if the item has no effect on the Pokémon, FALSE otherwise bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) @@ -4878,24 +4877,18 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } - // Rare Candy + // Rare Candy / EXP Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - if (ItemId_GetHoldEffectParam(item) & FULL_LEVEL) + u8 param = ItemId_GetHoldEffectParam(item); + if (param == 0xFF) // Rare Candy { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; } - else + else if (param < NUM_EXP_CANDY_SIZES) // EXP Candies { - temp1 = ItemId_GetHoldEffectParam(item) & 0x0F; - if (ItemId_GetHoldEffectParam(item) & ONE_HUNDRED) - temp1 *= 100; - if (ItemId_GetHoldEffectParam(item) & ONE_THOUSAND) - temp1 *= 1000; - if (ItemId_GetHoldEffectParam(item) & TEN_THOUSAND) - temp1 *= 10000; - dataUnsigned = temp1 + GetMonData(mon, MON_DATA_EXP, NULL); + dataUnsigned = sExpCandyExperienceTable[param] + GetMonData(mon, MON_DATA_EXP, NULL); if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; } @@ -5298,11 +5291,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov return retVal; } -#undef ONE_HUNDRED -#undef ONE_THOUSAND -#undef TEN_THOUSAND -#undef FULL_LEVEL - bool8 HealStatusConditions(struct Pokemon *mon, u32 battlePartyId, u32 healMask, u8 battlerId) { u32 status = GetMonData(mon, MON_DATA_STATUS, 0); From 56f4c319a425fa80b39c881d5c922fd2bda4308d Mon Sep 17 00:00:00 2001 From: Blackforest92 Date: Fri, 22 Jul 2022 22:17:29 +0700 Subject: [PATCH 17/51] Fix multiple pokemon graphics, tidying pokemon graphic folders --- .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_absol => absol/mega}/back.png | Bin .../{mega_absol => absol/mega}/front.png | Bin .../{mega_absol => absol/mega}/icon.png | Bin .../{mega_absol => absol/mega}/normal.pal | 0 .../{mega_absol => absol/mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_aggron => aggron/mega}/back.png | Bin .../{mega_aggron => aggron/mega}/front.png | Bin .../{mega_aggron => aggron/mega}/icon.png | Bin .../{mega_aggron => aggron/mega}/normal.pal | 0 .../{mega_aggron => aggron/mega}/shiny.pal | 0 .../{mega_alakazam => alakazam/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_alakazam => alakazam/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_altaria => altaria/mega}/back.png | Bin .../{mega_altaria => altaria/mega}/front.png | Bin .../{mega_altaria => altaria/mega}/icon.png | Bin .../{mega_altaria => altaria/mega}/normal.pal | 0 .../{mega_altaria => altaria/mega}/shiny.pal | 0 .../{mega_ampharos => ampharos/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_ampharos => ampharos/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 graphics/pokemon/appletun/icon.png | Bin 440 -> 409 bytes graphics/pokemon/applin/icon.png | Bin 295 -> 331 bytes graphics/pokemon/articuno/galarian/icon.png | Bin 316 -> 413 bytes .../{mega_audino => audino/mega}/back.png | Bin .../{mega_audino => audino/mega}/front.png | Bin .../{mega_audino => audino/mega}/icon.png | Bin .../{mega_audino => audino/mega}/normal.pal | 0 .../{mega_audino => audino/mega}/shiny.pal | 0 .../{mega_banette => banette/mega}/back.png | Bin .../{mega_banette => banette/mega}/front.png | Bin .../{mega_banette => banette/mega}/icon.png | Bin .../{mega_banette => banette/mega}/normal.pal | 0 .../{mega_banette => banette/mega}/shiny.pal | 0 .../{mega_beedrill => beedrill/mega}/back.png | Bin .../mega}/front.png | Bin graphics/pokemon/beedrill/mega/icon.png | Bin 0 -> 453 bytes .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_blaziken => blaziken/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_blaziken => blaziken/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 graphics/pokemon/blipbug/icon.png | Bin 373 -> 361 bytes .../{mega_camerupt => camerupt/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_camerupt => camerupt/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega_x}/back.png | Bin .../mega_x}/front.png | Bin .../mega_x}/icon.png | Bin .../mega_x}/normal.pal | 0 .../mega_x}/shiny.pal | 0 .../mega_y}/back.png | Bin .../mega_y}/front.png | Bin .../mega_y}/icon.png | Bin .../mega_y}/normal.pal | 0 .../mega_y}/shiny.pal | 0 .../{mega_diancie => diancie/mega}/back.png | Bin .../{mega_diancie => diancie/mega}/front.png | Bin .../{mega_diancie => diancie/mega}/icon.png | Bin .../{mega_diancie => diancie/mega}/normal.pal | 0 .../{mega_diancie => diancie/mega}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_gallade => gallade/mega}/back.png | Bin .../{mega_gallade => gallade/mega}/front.png | Bin .../{mega_gallade => gallade/mega}/icon.png | Bin .../{mega_gallade => gallade/mega}/normal.pal | 0 .../{mega_gallade => gallade/mega}/shiny.pal | 0 .../{mega_garchomp => garchomp/mega}/back.png | Bin .../mega}/front.png | Bin graphics/pokemon/garchomp/mega/icon.png | Bin 0 -> 485 bytes .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_gengar => gengar/mega}/back.png | Bin .../{mega_gengar => gengar/mega}/front.png | Bin .../{mega_gengar => gengar/mega}/icon.png | Bin .../{mega_gengar => gengar/mega}/normal.pal | 0 .../{mega_gengar => gengar/mega}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_glalie => glalie/mega}/back.png | Bin .../{mega_glalie => glalie/mega}/front.png | Bin graphics/pokemon/glalie/mega/icon.png | Bin 0 -> 406 bytes .../{mega_glalie => glalie/mega}/normal.pal | 0 .../{mega_glalie => glalie/mega}/shiny.pal | 0 .../{alolan_golem => golem/alolan}/back.png | Bin .../{alolan_golem => golem/alolan}/front.png | Bin .../{alolan_golem => golem/alolan}/icon.png | Bin .../{alolan_golem => golem/alolan}/normal.pal | 0 .../{alolan_golem => golem/alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{alolan_grimer => grimer/alolan}/back.png | Bin .../alolan}/front.png | Bin .../{alolan_grimer => grimer/alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../primal}/back.png | Bin .../primal}/front.png | Bin .../primal}/icon.png | Bin .../primal}/normal.pal | 0 .../primal}/shiny.pal | 0 .../{mega_gyarados => gyarados/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_gyarados => gyarados/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_houndoom => houndoom/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_houndoom => houndoom/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{primal_kyogre => kyogre/primal}/back.png | Bin .../primal}/front.png | Bin .../{primal_kyogre => kyogre/primal}/icon.png | Bin .../primal}/normal.pal | 0 .../primal}/shiny.pal | 0 .../{mega_latias => latias/mega}/back.png | Bin .../{mega_latias => latias/mega}/front.png | Bin graphics/pokemon/latias/mega/icon.png | Bin 0 -> 373 bytes .../{mega_latias => latias/mega}/normal.pal | 0 .../{mega_latias => latias/mega}/shiny.pal | 0 .../{mega_latios => latios/mega}/back.png | Bin .../{mega_latios => latios/mega}/front.png | Bin graphics/pokemon/latios/mega/icon.png | Bin 0 -> 372 bytes .../{mega_latios => latios/mega}/normal.pal | 0 .../{mega_latios => latios/mega}/shiny.pal | 0 .../{mega_lopunny => lopunny/mega}/back.png | Bin .../{mega_lopunny => lopunny/mega}/front.png | Bin .../{mega_lopunny => lopunny/mega}/icon.png | Bin .../{mega_lopunny => lopunny/mega}/normal.pal | 0 .../{mega_lopunny => lopunny/mega}/shiny.pal | 0 .../{mega_lucario => lucario/mega}/back.png | Bin .../{mega_lucario => lucario/mega}/front.png | Bin .../{mega_lucario => lucario/mega}/icon.png | Bin .../{mega_lucario => lucario/mega}/normal.pal | 0 .../{mega_lucario => lucario/mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_mawile => mawile/mega}/back.png | Bin .../{mega_mawile => mawile/mega}/front.png | Bin graphics/pokemon/mawile/mega/icon.png | Bin 0 -> 565 bytes .../{mega_mawile => mawile/mega}/normal.pal | 0 .../{mega_mawile => mawile/mega}/shiny.pal | 0 .../{mega_medicham => medicham/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_medicham => medicham/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 graphics/pokemon/mega_beedrill/icon.png | Bin 415 -> 0 bytes graphics/pokemon/mega_garchomp/icon.png | Bin 462 -> 0 bytes graphics/pokemon/mega_glalie/icon.png | Bin 375 -> 0 bytes graphics/pokemon/mega_latias/icon.png | Bin 388 -> 0 bytes graphics/pokemon/mega_latios/icon.png | Bin 388 -> 0 bytes graphics/pokemon/mega_mawile/icon.png | Bin 511 -> 0 bytes graphics/pokemon/mega_pidgeot/icon.png | Bin 586 -> 0 bytes graphics/pokemon/mega_scizor/icon.png | Bin 446 -> 0 bytes graphics/pokemon/mega_slowbro/icon.png | Bin 399 -> 0 bytes .../{alolan_meowth => meowth/alolan}/back.png | Bin .../alolan}/front.png | Bin .../{alolan_meowth => meowth/alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_mewtwo_x => mewtwo/mega_x}/back.png | Bin .../mega_x}/front.png | Bin .../{mega_mewtwo_x => mewtwo/mega_x}/icon.png | Bin .../mega_x}/normal.pal | 0 .../mega_x}/shiny.pal | 0 .../{mega_mewtwo_y => mewtwo/mega_y}/back.png | Bin .../mega_y}/front.png | Bin .../{mega_mewtwo_y => mewtwo/mega_y}/icon.png | Bin .../mega_y}/normal.pal | 0 .../mega_y}/shiny.pal | 0 graphics/pokemon/moltres/galarian/icon.png | Bin 368 -> 453 bytes .../{alolan_muk => muk/alolan}/back.png | Bin .../{alolan_muk => muk/alolan}/front.png | Bin .../{alolan_muk => muk/alolan}/icon.png | Bin .../{alolan_muk => muk/alolan}/normal.pal | 0 .../{alolan_muk => muk/alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_pidgeot => pidgeot/mega}/back.png | Bin .../{mega_pidgeot => pidgeot/mega}/front.png | Bin graphics/pokemon/pidgeot/mega/icon.png | Bin 0 -> 579 bytes .../{mega_pidgeot => pidgeot/mega}/normal.pal | 0 .../{mega_pidgeot => pidgeot/mega}/shiny.pal | 0 .../{mega_pinsir => pinsir/mega}/back.png | Bin .../{mega_pinsir => pinsir/mega}/front.png | Bin .../{mega_pinsir => pinsir/mega}/icon.png | Bin .../{mega_pinsir => pinsir/mega}/normal.pal | 0 .../{mega_pinsir => pinsir/mega}/shiny.pal | 0 .../{alolan_raichu => raichu/alolan}/back.png | Bin .../alolan}/front.png | Bin .../{alolan_raichu => raichu/alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_rayquaza => rayquaza/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_rayquaza => rayquaza/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 graphics/pokemon/regidrago/icon.png | Bin 395 -> 478 bytes graphics/pokemon/regieleki/icon.png | Bin 456 -> 478 bytes .../{mega_sableye => sableye/mega}/back.png | Bin .../{mega_sableye => sableye/mega}/front.png | Bin .../{mega_sableye => sableye/mega}/icon.png | Bin .../{mega_sableye => sableye/mega}/normal.pal | 0 .../{mega_sableye => sableye/mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../alolan}/back.png | Bin .../alolan}/front.png | Bin .../alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 .../{mega_sceptile => sceptile/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_sceptile => sceptile/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_scizor => scizor/mega}/back.png | Bin .../{mega_scizor => scizor/mega}/front.png | Bin graphics/pokemon/scizor/mega/icon.png | Bin 0 -> 484 bytes .../{mega_scizor => scizor/mega}/normal.pal | 0 .../{mega_scizor => scizor/mega}/shiny.pal | 0 graphics/pokemon/scorbunny/icon.png | Bin 362 -> 347 bytes graphics/pokemon/scyther/anim_front.png | Bin 1358 -> 1326 bytes graphics/pokemon/scyther/front.png | Bin 840 -> 801 bytes .../{mega_sharpedo => sharpedo/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_sharpedo => sharpedo/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_slowbro => slowbro/mega}/back.png | Bin .../{mega_slowbro => slowbro/mega}/front.png | Bin graphics/pokemon/slowbro/mega/icon.png | Bin 0 -> 434 bytes .../{mega_slowbro => slowbro/mega}/normal.pal | 0 .../{mega_slowbro => slowbro/mega}/shiny.pal | 0 .../{mega_steelix => steelix/mega}/back.png | Bin .../{mega_steelix => steelix/mega}/front.png | Bin .../{mega_steelix => steelix/mega}/icon.png | Bin .../{mega_steelix => steelix/mega}/normal.pal | 0 .../{mega_steelix => steelix/mega}/shiny.pal | 0 .../{mega_swampert => swampert/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_swampert => swampert/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../mega}/back.png | Bin .../mega}/front.png | Bin .../mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{mega_venusaur => venusaur/mega}/back.png | Bin .../mega}/front.png | Bin .../{mega_venusaur => venusaur/mega}/icon.png | Bin .../mega}/normal.pal | 0 .../mega}/shiny.pal | 0 .../{alolan_vulpix => vulpix/alolan}/back.png | Bin .../alolan}/front.png | Bin .../{alolan_vulpix => vulpix/alolan}/icon.png | Bin .../alolan}/normal.pal | 0 .../alolan}/shiny.pal | 0 graphics/pokemon/zapdos/galarian/icon.png | Bin 342 -> 442 bytes src/data/graphics/pokemon.h | 680 +++++++++--------- src/pokemon_icon.c | 2 +- 362 files changed, 341 insertions(+), 341 deletions(-) rename graphics/pokemon/{mega_abomasnow => abomasnow/mega}/back.png (100%) rename graphics/pokemon/{mega_abomasnow => abomasnow/mega}/front.png (100%) rename graphics/pokemon/{mega_abomasnow => abomasnow/mega}/icon.png (100%) rename graphics/pokemon/{mega_abomasnow => abomasnow/mega}/normal.pal (100%) rename graphics/pokemon/{mega_abomasnow => abomasnow/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_absol => absol/mega}/back.png (100%) rename graphics/pokemon/{mega_absol => absol/mega}/front.png (100%) rename graphics/pokemon/{mega_absol => absol/mega}/icon.png (100%) rename graphics/pokemon/{mega_absol => absol/mega}/normal.pal (100%) rename graphics/pokemon/{mega_absol => absol/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_aerodactyl => aerodactyl/mega}/back.png (100%) rename graphics/pokemon/{mega_aerodactyl => aerodactyl/mega}/front.png (100%) rename graphics/pokemon/{mega_aerodactyl => aerodactyl/mega}/icon.png (100%) rename graphics/pokemon/{mega_aerodactyl => aerodactyl/mega}/normal.pal (100%) rename graphics/pokemon/{mega_aerodactyl => aerodactyl/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_aggron => aggron/mega}/back.png (100%) rename graphics/pokemon/{mega_aggron => aggron/mega}/front.png (100%) rename graphics/pokemon/{mega_aggron => aggron/mega}/icon.png (100%) rename graphics/pokemon/{mega_aggron => aggron/mega}/normal.pal (100%) rename graphics/pokemon/{mega_aggron => aggron/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_alakazam => alakazam/mega}/back.png (100%) rename graphics/pokemon/{mega_alakazam => alakazam/mega}/front.png (100%) rename graphics/pokemon/{mega_alakazam => alakazam/mega}/icon.png (100%) rename graphics/pokemon/{mega_alakazam => alakazam/mega}/normal.pal (100%) rename graphics/pokemon/{mega_alakazam => alakazam/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_altaria => altaria/mega}/back.png (100%) rename graphics/pokemon/{mega_altaria => altaria/mega}/front.png (100%) rename graphics/pokemon/{mega_altaria => altaria/mega}/icon.png (100%) rename graphics/pokemon/{mega_altaria => altaria/mega}/normal.pal (100%) rename graphics/pokemon/{mega_altaria => altaria/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_ampharos => ampharos/mega}/back.png (100%) rename graphics/pokemon/{mega_ampharos => ampharos/mega}/front.png (100%) rename graphics/pokemon/{mega_ampharos => ampharos/mega}/icon.png (100%) rename graphics/pokemon/{mega_ampharos => ampharos/mega}/normal.pal (100%) rename graphics/pokemon/{mega_ampharos => ampharos/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_audino => audino/mega}/back.png (100%) rename graphics/pokemon/{mega_audino => audino/mega}/front.png (100%) rename graphics/pokemon/{mega_audino => audino/mega}/icon.png (100%) rename graphics/pokemon/{mega_audino => audino/mega}/normal.pal (100%) rename graphics/pokemon/{mega_audino => audino/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_banette => banette/mega}/back.png (100%) rename graphics/pokemon/{mega_banette => banette/mega}/front.png (100%) rename graphics/pokemon/{mega_banette => banette/mega}/icon.png (100%) rename graphics/pokemon/{mega_banette => banette/mega}/normal.pal (100%) rename graphics/pokemon/{mega_banette => banette/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_beedrill => beedrill/mega}/back.png (100%) rename graphics/pokemon/{mega_beedrill => beedrill/mega}/front.png (100%) create mode 100644 graphics/pokemon/beedrill/mega/icon.png rename graphics/pokemon/{mega_beedrill => beedrill/mega}/normal.pal (100%) rename graphics/pokemon/{mega_beedrill => beedrill/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_blastoise => blastoise/mega}/back.png (100%) rename graphics/pokemon/{mega_blastoise => blastoise/mega}/front.png (100%) rename graphics/pokemon/{mega_blastoise => blastoise/mega}/icon.png (100%) rename graphics/pokemon/{mega_blastoise => blastoise/mega}/normal.pal (100%) rename graphics/pokemon/{mega_blastoise => blastoise/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_blaziken => blaziken/mega}/back.png (100%) rename graphics/pokemon/{mega_blaziken => blaziken/mega}/front.png (100%) rename graphics/pokemon/{mega_blaziken => blaziken/mega}/icon.png (100%) rename graphics/pokemon/{mega_blaziken => blaziken/mega}/normal.pal (100%) rename graphics/pokemon/{mega_blaziken => blaziken/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_camerupt => camerupt/mega}/back.png (100%) rename graphics/pokemon/{mega_camerupt => camerupt/mega}/front.png (100%) rename graphics/pokemon/{mega_camerupt => camerupt/mega}/icon.png (100%) rename graphics/pokemon/{mega_camerupt => camerupt/mega}/normal.pal (100%) rename graphics/pokemon/{mega_camerupt => camerupt/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_charizard_x => charizard/mega_x}/back.png (100%) rename graphics/pokemon/{mega_charizard_x => charizard/mega_x}/front.png (100%) rename graphics/pokemon/{mega_charizard_x => charizard/mega_x}/icon.png (100%) rename graphics/pokemon/{mega_charizard_x => charizard/mega_x}/normal.pal (100%) rename graphics/pokemon/{mega_charizard_x => charizard/mega_x}/shiny.pal (100%) rename graphics/pokemon/{mega_charizard_y => charizard/mega_y}/back.png (100%) rename graphics/pokemon/{mega_charizard_y => charizard/mega_y}/front.png (100%) rename graphics/pokemon/{mega_charizard_y => charizard/mega_y}/icon.png (100%) rename graphics/pokemon/{mega_charizard_y => charizard/mega_y}/normal.pal (100%) rename graphics/pokemon/{mega_charizard_y => charizard/mega_y}/shiny.pal (100%) rename graphics/pokemon/{mega_diancie => diancie/mega}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_diancie => diancie/mega}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_diancie => diancie/mega}/icon.png (100%) rename graphics/pokemon/{mega_diancie => diancie/mega}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_diancie => diancie/mega}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_diglett => diglett/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_diglett => diglett/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_diglett => diglett/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_diglett => diglett/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_diglett => diglett/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_dugtrio => dugtrio/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_dugtrio => dugtrio/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_dugtrio => dugtrio/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_dugtrio => dugtrio/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_dugtrio => dugtrio/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_exeggutor => exeggutor/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_exeggutor => exeggutor/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_exeggutor => exeggutor/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_exeggutor => exeggutor/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_exeggutor => exeggutor/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_gallade => gallade/mega}/back.png (100%) rename graphics/pokemon/{mega_gallade => gallade/mega}/front.png (100%) rename graphics/pokemon/{mega_gallade => gallade/mega}/icon.png (100%) rename graphics/pokemon/{mega_gallade => gallade/mega}/normal.pal (100%) rename graphics/pokemon/{mega_gallade => gallade/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_garchomp => garchomp/mega}/back.png (100%) rename graphics/pokemon/{mega_garchomp => garchomp/mega}/front.png (100%) create mode 100644 graphics/pokemon/garchomp/mega/icon.png rename graphics/pokemon/{mega_garchomp => garchomp/mega}/normal.pal (100%) rename graphics/pokemon/{mega_garchomp => garchomp/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_gardevoir => gardevoir/mega}/back.png (100%) rename graphics/pokemon/{mega_gardevoir => gardevoir/mega}/front.png (100%) rename graphics/pokemon/{mega_gardevoir => gardevoir/mega}/icon.png (100%) rename graphics/pokemon/{mega_gardevoir => gardevoir/mega}/normal.pal (100%) rename graphics/pokemon/{mega_gardevoir => gardevoir/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_gengar => gengar/mega}/back.png (100%) rename graphics/pokemon/{mega_gengar => gengar/mega}/front.png (100%) rename graphics/pokemon/{mega_gengar => gengar/mega}/icon.png (100%) rename graphics/pokemon/{mega_gengar => gengar/mega}/normal.pal (100%) rename graphics/pokemon/{mega_gengar => gengar/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_geodude => geodude/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_geodude => geodude/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_geodude => geodude/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_geodude => geodude/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_geodude => geodude/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_glalie => glalie/mega}/back.png (100%) rename graphics/pokemon/{mega_glalie => glalie/mega}/front.png (100%) create mode 100644 graphics/pokemon/glalie/mega/icon.png rename graphics/pokemon/{mega_glalie => glalie/mega}/normal.pal (100%) rename graphics/pokemon/{mega_glalie => glalie/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_golem => golem/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_golem => golem/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_golem => golem/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_golem => golem/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_golem => golem/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_graveler => graveler/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_graveler => graveler/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_graveler => graveler/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_graveler => graveler/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_graveler => graveler/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_grimer => grimer/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_grimer => grimer/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_grimer => grimer/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_grimer => grimer/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_grimer => grimer/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_groudon => groudon/primal}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_groudon => groudon/primal}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_groudon => groudon/primal}/icon.png (100%) rename graphics/pokemon/{primal_groudon => groudon/primal}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_groudon => groudon/primal}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_gyarados => gyarados/mega}/back.png (100%) rename graphics/pokemon/{mega_gyarados => gyarados/mega}/front.png (100%) rename graphics/pokemon/{mega_gyarados => gyarados/mega}/icon.png (100%) rename graphics/pokemon/{mega_gyarados => gyarados/mega}/normal.pal (100%) rename graphics/pokemon/{mega_gyarados => gyarados/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_heracross => heracross/mega}/back.png (100%) rename graphics/pokemon/{mega_heracross => heracross/mega}/front.png (100%) rename graphics/pokemon/{mega_heracross => heracross/mega}/icon.png (100%) rename graphics/pokemon/{mega_heracross => heracross/mega}/normal.pal (100%) rename graphics/pokemon/{mega_heracross => heracross/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_houndoom => houndoom/mega}/back.png (100%) rename graphics/pokemon/{mega_houndoom => houndoom/mega}/front.png (100%) rename graphics/pokemon/{mega_houndoom => houndoom/mega}/icon.png (100%) rename graphics/pokemon/{mega_houndoom => houndoom/mega}/normal.pal (100%) rename graphics/pokemon/{mega_houndoom => houndoom/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_kangaskhan => kangaskhan/mega}/back.png (100%) rename graphics/pokemon/{mega_kangaskhan => kangaskhan/mega}/front.png (100%) rename graphics/pokemon/{mega_kangaskhan => kangaskhan/mega}/icon.png (100%) rename graphics/pokemon/{mega_kangaskhan => kangaskhan/mega}/normal.pal (100%) rename graphics/pokemon/{mega_kangaskhan => kangaskhan/mega}/shiny.pal (100%) rename graphics/pokemon/{primal_kyogre => kyogre/primal}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_kyogre => kyogre/primal}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_kyogre => kyogre/primal}/icon.png (100%) rename graphics/pokemon/{primal_kyogre => kyogre/primal}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{primal_kyogre => kyogre/primal}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_latias => latias/mega}/back.png (100%) rename graphics/pokemon/{mega_latias => latias/mega}/front.png (100%) create mode 100644 graphics/pokemon/latias/mega/icon.png rename graphics/pokemon/{mega_latias => latias/mega}/normal.pal (100%) rename graphics/pokemon/{mega_latias => latias/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_latios => latios/mega}/back.png (100%) rename graphics/pokemon/{mega_latios => latios/mega}/front.png (100%) create mode 100644 graphics/pokemon/latios/mega/icon.png rename graphics/pokemon/{mega_latios => latios/mega}/normal.pal (100%) rename graphics/pokemon/{mega_latios => latios/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_lopunny => lopunny/mega}/back.png (100%) rename graphics/pokemon/{mega_lopunny => lopunny/mega}/front.png (100%) rename graphics/pokemon/{mega_lopunny => lopunny/mega}/icon.png (100%) rename graphics/pokemon/{mega_lopunny => lopunny/mega}/normal.pal (100%) rename graphics/pokemon/{mega_lopunny => lopunny/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_lucario => lucario/mega}/back.png (100%) rename graphics/pokemon/{mega_lucario => lucario/mega}/front.png (100%) rename graphics/pokemon/{mega_lucario => lucario/mega}/icon.png (100%) rename graphics/pokemon/{mega_lucario => lucario/mega}/normal.pal (100%) rename graphics/pokemon/{mega_lucario => lucario/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_manectric => manectric/mega}/back.png (100%) rename graphics/pokemon/{mega_manectric => manectric/mega}/front.png (100%) rename graphics/pokemon/{mega_manectric => manectric/mega}/icon.png (100%) rename graphics/pokemon/{mega_manectric => manectric/mega}/normal.pal (100%) rename graphics/pokemon/{mega_manectric => manectric/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_marowak => marowak/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_marowak => marowak/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_marowak => marowak/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_marowak => marowak/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_marowak => marowak/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_mawile => mawile/mega}/back.png (100%) rename graphics/pokemon/{mega_mawile => mawile/mega}/front.png (100%) create mode 100644 graphics/pokemon/mawile/mega/icon.png rename graphics/pokemon/{mega_mawile => mawile/mega}/normal.pal (100%) rename graphics/pokemon/{mega_mawile => mawile/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_medicham => medicham/mega}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_medicham => medicham/mega}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_medicham => medicham/mega}/icon.png (100%) rename graphics/pokemon/{mega_medicham => medicham/mega}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_medicham => medicham/mega}/shiny.pal (100%) mode change 100755 => 100644 delete mode 100644 graphics/pokemon/mega_beedrill/icon.png delete mode 100644 graphics/pokemon/mega_garchomp/icon.png delete mode 100644 graphics/pokemon/mega_glalie/icon.png delete mode 100644 graphics/pokemon/mega_latias/icon.png delete mode 100644 graphics/pokemon/mega_latios/icon.png delete mode 100644 graphics/pokemon/mega_mawile/icon.png delete mode 100644 graphics/pokemon/mega_pidgeot/icon.png delete mode 100644 graphics/pokemon/mega_scizor/icon.png delete mode 100644 graphics/pokemon/mega_slowbro/icon.png rename graphics/pokemon/{alolan_meowth => meowth/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_meowth => meowth/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_meowth => meowth/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_meowth => meowth/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_meowth => meowth/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_metagross => metagross/mega}/back.png (100%) rename graphics/pokemon/{mega_metagross => metagross/mega}/front.png (100%) rename graphics/pokemon/{mega_metagross => metagross/mega}/icon.png (100%) rename graphics/pokemon/{mega_metagross => metagross/mega}/normal.pal (100%) rename graphics/pokemon/{mega_metagross => metagross/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_mewtwo_x => mewtwo/mega_x}/back.png (100%) rename graphics/pokemon/{mega_mewtwo_x => mewtwo/mega_x}/front.png (100%) rename graphics/pokemon/{mega_mewtwo_x => mewtwo/mega_x}/icon.png (100%) rename graphics/pokemon/{mega_mewtwo_x => mewtwo/mega_x}/normal.pal (100%) rename graphics/pokemon/{mega_mewtwo_x => mewtwo/mega_x}/shiny.pal (100%) rename graphics/pokemon/{mega_mewtwo_y => mewtwo/mega_y}/back.png (100%) rename graphics/pokemon/{mega_mewtwo_y => mewtwo/mega_y}/front.png (100%) rename graphics/pokemon/{mega_mewtwo_y => mewtwo/mega_y}/icon.png (100%) rename graphics/pokemon/{mega_mewtwo_y => mewtwo/mega_y}/normal.pal (100%) rename graphics/pokemon/{mega_mewtwo_y => mewtwo/mega_y}/shiny.pal (100%) rename graphics/pokemon/{alolan_muk => muk/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_muk => muk/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_muk => muk/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_muk => muk/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_muk => muk/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_ninetales => ninetales/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_ninetales => ninetales/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_ninetales => ninetales/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_ninetales => ninetales/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_ninetales => ninetales/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_persian => persian/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_persian => persian/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_persian => persian/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_persian => persian/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_persian => persian/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_pidgeot => pidgeot/mega}/back.png (100%) rename graphics/pokemon/{mega_pidgeot => pidgeot/mega}/front.png (100%) create mode 100644 graphics/pokemon/pidgeot/mega/icon.png rename graphics/pokemon/{mega_pidgeot => pidgeot/mega}/normal.pal (100%) rename graphics/pokemon/{mega_pidgeot => pidgeot/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_pinsir => pinsir/mega}/back.png (100%) rename graphics/pokemon/{mega_pinsir => pinsir/mega}/front.png (100%) rename graphics/pokemon/{mega_pinsir => pinsir/mega}/icon.png (100%) rename graphics/pokemon/{mega_pinsir => pinsir/mega}/normal.pal (100%) rename graphics/pokemon/{mega_pinsir => pinsir/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_raichu => raichu/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raichu => raichu/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raichu => raichu/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raichu => raichu/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raichu => raichu/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raticate => raticate/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raticate => raticate/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raticate => raticate/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raticate => raticate/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_raticate => raticate/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_rattata => rattata/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_rattata => rattata/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_rattata => rattata/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_rattata => rattata/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_rattata => rattata/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_rayquaza => rayquaza/mega}/back.png (100%) rename graphics/pokemon/{mega_rayquaza => rayquaza/mega}/front.png (100%) rename graphics/pokemon/{mega_rayquaza => rayquaza/mega}/icon.png (100%) rename graphics/pokemon/{mega_rayquaza => rayquaza/mega}/normal.pal (100%) rename graphics/pokemon/{mega_rayquaza => rayquaza/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_sableye => sableye/mega}/back.png (100%) rename graphics/pokemon/{mega_sableye => sableye/mega}/front.png (100%) rename graphics/pokemon/{mega_sableye => sableye/mega}/icon.png (100%) rename graphics/pokemon/{mega_sableye => sableye/mega}/normal.pal (100%) rename graphics/pokemon/{mega_sableye => sableye/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_salamence => salamence/mega}/back.png (100%) rename graphics/pokemon/{mega_salamence => salamence/mega}/front.png (100%) rename graphics/pokemon/{mega_salamence => salamence/mega}/icon.png (100%) rename graphics/pokemon/{mega_salamence => salamence/mega}/normal.pal (100%) rename graphics/pokemon/{mega_salamence => salamence/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_sandshrew => sandshrew/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandshrew => sandshrew/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandshrew => sandshrew/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandshrew => sandshrew/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandshrew => sandshrew/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandslash => sandslash/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandslash => sandslash/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandslash => sandslash/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandslash => sandslash/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_sandslash => sandslash/alolan}/shiny.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{mega_sceptile => sceptile/mega}/back.png (100%) rename graphics/pokemon/{mega_sceptile => sceptile/mega}/front.png (100%) rename graphics/pokemon/{mega_sceptile => sceptile/mega}/icon.png (100%) rename graphics/pokemon/{mega_sceptile => sceptile/mega}/normal.pal (100%) rename graphics/pokemon/{mega_sceptile => sceptile/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_scizor => scizor/mega}/back.png (100%) rename graphics/pokemon/{mega_scizor => scizor/mega}/front.png (100%) create mode 100644 graphics/pokemon/scizor/mega/icon.png rename graphics/pokemon/{mega_scizor => scizor/mega}/normal.pal (100%) rename graphics/pokemon/{mega_scizor => scizor/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_sharpedo => sharpedo/mega}/back.png (100%) rename graphics/pokemon/{mega_sharpedo => sharpedo/mega}/front.png (100%) rename graphics/pokemon/{mega_sharpedo => sharpedo/mega}/icon.png (100%) rename graphics/pokemon/{mega_sharpedo => sharpedo/mega}/normal.pal (100%) rename graphics/pokemon/{mega_sharpedo => sharpedo/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_slowbro => slowbro/mega}/back.png (100%) rename graphics/pokemon/{mega_slowbro => slowbro/mega}/front.png (100%) create mode 100644 graphics/pokemon/slowbro/mega/icon.png rename graphics/pokemon/{mega_slowbro => slowbro/mega}/normal.pal (100%) rename graphics/pokemon/{mega_slowbro => slowbro/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_steelix => steelix/mega}/back.png (100%) rename graphics/pokemon/{mega_steelix => steelix/mega}/front.png (100%) rename graphics/pokemon/{mega_steelix => steelix/mega}/icon.png (100%) rename graphics/pokemon/{mega_steelix => steelix/mega}/normal.pal (100%) rename graphics/pokemon/{mega_steelix => steelix/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_swampert => swampert/mega}/back.png (100%) rename graphics/pokemon/{mega_swampert => swampert/mega}/front.png (100%) rename graphics/pokemon/{mega_swampert => swampert/mega}/icon.png (100%) rename graphics/pokemon/{mega_swampert => swampert/mega}/normal.pal (100%) rename graphics/pokemon/{mega_swampert => swampert/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_tyranitar => tyranitar/mega}/back.png (100%) rename graphics/pokemon/{mega_tyranitar => tyranitar/mega}/front.png (100%) rename graphics/pokemon/{mega_tyranitar => tyranitar/mega}/icon.png (100%) rename graphics/pokemon/{mega_tyranitar => tyranitar/mega}/normal.pal (100%) rename graphics/pokemon/{mega_tyranitar => tyranitar/mega}/shiny.pal (100%) rename graphics/pokemon/{mega_venusaur => venusaur/mega}/back.png (100%) rename graphics/pokemon/{mega_venusaur => venusaur/mega}/front.png (100%) rename graphics/pokemon/{mega_venusaur => venusaur/mega}/icon.png (100%) rename graphics/pokemon/{mega_venusaur => venusaur/mega}/normal.pal (100%) rename graphics/pokemon/{mega_venusaur => venusaur/mega}/shiny.pal (100%) rename graphics/pokemon/{alolan_vulpix => vulpix/alolan}/back.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_vulpix => vulpix/alolan}/front.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_vulpix => vulpix/alolan}/icon.png (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_vulpix => vulpix/alolan}/normal.pal (100%) mode change 100755 => 100644 rename graphics/pokemon/{alolan_vulpix => vulpix/alolan}/shiny.pal (100%) mode change 100755 => 100644 diff --git a/graphics/pokemon/mega_abomasnow/back.png b/graphics/pokemon/abomasnow/mega/back.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/back.png rename to graphics/pokemon/abomasnow/mega/back.png diff --git a/graphics/pokemon/mega_abomasnow/front.png b/graphics/pokemon/abomasnow/mega/front.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/front.png rename to graphics/pokemon/abomasnow/mega/front.png diff --git a/graphics/pokemon/mega_abomasnow/icon.png b/graphics/pokemon/abomasnow/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/icon.png rename to graphics/pokemon/abomasnow/mega/icon.png diff --git a/graphics/pokemon/mega_abomasnow/normal.pal b/graphics/pokemon/abomasnow/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_abomasnow/normal.pal rename to graphics/pokemon/abomasnow/mega/normal.pal diff --git a/graphics/pokemon/mega_abomasnow/shiny.pal b/graphics/pokemon/abomasnow/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_abomasnow/shiny.pal rename to graphics/pokemon/abomasnow/mega/shiny.pal diff --git a/graphics/pokemon/mega_absol/back.png b/graphics/pokemon/absol/mega/back.png similarity index 100% rename from graphics/pokemon/mega_absol/back.png rename to graphics/pokemon/absol/mega/back.png diff --git a/graphics/pokemon/mega_absol/front.png b/graphics/pokemon/absol/mega/front.png similarity index 100% rename from graphics/pokemon/mega_absol/front.png rename to graphics/pokemon/absol/mega/front.png diff --git a/graphics/pokemon/mega_absol/icon.png b/graphics/pokemon/absol/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_absol/icon.png rename to graphics/pokemon/absol/mega/icon.png diff --git a/graphics/pokemon/mega_absol/normal.pal b/graphics/pokemon/absol/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_absol/normal.pal rename to graphics/pokemon/absol/mega/normal.pal diff --git a/graphics/pokemon/mega_absol/shiny.pal b/graphics/pokemon/absol/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_absol/shiny.pal rename to graphics/pokemon/absol/mega/shiny.pal diff --git a/graphics/pokemon/mega_aerodactyl/back.png b/graphics/pokemon/aerodactyl/mega/back.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/back.png rename to graphics/pokemon/aerodactyl/mega/back.png diff --git a/graphics/pokemon/mega_aerodactyl/front.png b/graphics/pokemon/aerodactyl/mega/front.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/front.png rename to graphics/pokemon/aerodactyl/mega/front.png diff --git a/graphics/pokemon/mega_aerodactyl/icon.png b/graphics/pokemon/aerodactyl/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/icon.png rename to graphics/pokemon/aerodactyl/mega/icon.png diff --git a/graphics/pokemon/mega_aerodactyl/normal.pal b/graphics/pokemon/aerodactyl/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_aerodactyl/normal.pal rename to graphics/pokemon/aerodactyl/mega/normal.pal diff --git a/graphics/pokemon/mega_aerodactyl/shiny.pal b/graphics/pokemon/aerodactyl/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_aerodactyl/shiny.pal rename to graphics/pokemon/aerodactyl/mega/shiny.pal diff --git a/graphics/pokemon/mega_aggron/back.png b/graphics/pokemon/aggron/mega/back.png similarity index 100% rename from graphics/pokemon/mega_aggron/back.png rename to graphics/pokemon/aggron/mega/back.png diff --git a/graphics/pokemon/mega_aggron/front.png b/graphics/pokemon/aggron/mega/front.png similarity index 100% rename from graphics/pokemon/mega_aggron/front.png rename to graphics/pokemon/aggron/mega/front.png diff --git a/graphics/pokemon/mega_aggron/icon.png b/graphics/pokemon/aggron/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_aggron/icon.png rename to graphics/pokemon/aggron/mega/icon.png diff --git a/graphics/pokemon/mega_aggron/normal.pal b/graphics/pokemon/aggron/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_aggron/normal.pal rename to graphics/pokemon/aggron/mega/normal.pal diff --git a/graphics/pokemon/mega_aggron/shiny.pal b/graphics/pokemon/aggron/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_aggron/shiny.pal rename to graphics/pokemon/aggron/mega/shiny.pal diff --git a/graphics/pokemon/mega_alakazam/back.png b/graphics/pokemon/alakazam/mega/back.png similarity index 100% rename from graphics/pokemon/mega_alakazam/back.png rename to graphics/pokemon/alakazam/mega/back.png diff --git a/graphics/pokemon/mega_alakazam/front.png b/graphics/pokemon/alakazam/mega/front.png similarity index 100% rename from graphics/pokemon/mega_alakazam/front.png rename to graphics/pokemon/alakazam/mega/front.png diff --git a/graphics/pokemon/mega_alakazam/icon.png b/graphics/pokemon/alakazam/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_alakazam/icon.png rename to graphics/pokemon/alakazam/mega/icon.png diff --git a/graphics/pokemon/mega_alakazam/normal.pal b/graphics/pokemon/alakazam/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_alakazam/normal.pal rename to graphics/pokemon/alakazam/mega/normal.pal diff --git a/graphics/pokemon/mega_alakazam/shiny.pal b/graphics/pokemon/alakazam/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_alakazam/shiny.pal rename to graphics/pokemon/alakazam/mega/shiny.pal diff --git a/graphics/pokemon/mega_altaria/back.png b/graphics/pokemon/altaria/mega/back.png similarity index 100% rename from graphics/pokemon/mega_altaria/back.png rename to graphics/pokemon/altaria/mega/back.png diff --git a/graphics/pokemon/mega_altaria/front.png b/graphics/pokemon/altaria/mega/front.png similarity index 100% rename from graphics/pokemon/mega_altaria/front.png rename to graphics/pokemon/altaria/mega/front.png diff --git a/graphics/pokemon/mega_altaria/icon.png b/graphics/pokemon/altaria/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_altaria/icon.png rename to graphics/pokemon/altaria/mega/icon.png diff --git a/graphics/pokemon/mega_altaria/normal.pal b/graphics/pokemon/altaria/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_altaria/normal.pal rename to graphics/pokemon/altaria/mega/normal.pal diff --git a/graphics/pokemon/mega_altaria/shiny.pal b/graphics/pokemon/altaria/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_altaria/shiny.pal rename to graphics/pokemon/altaria/mega/shiny.pal diff --git a/graphics/pokemon/mega_ampharos/back.png b/graphics/pokemon/ampharos/mega/back.png similarity index 100% rename from graphics/pokemon/mega_ampharos/back.png rename to graphics/pokemon/ampharos/mega/back.png diff --git a/graphics/pokemon/mega_ampharos/front.png b/graphics/pokemon/ampharos/mega/front.png similarity index 100% rename from graphics/pokemon/mega_ampharos/front.png rename to graphics/pokemon/ampharos/mega/front.png diff --git a/graphics/pokemon/mega_ampharos/icon.png b/graphics/pokemon/ampharos/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_ampharos/icon.png rename to graphics/pokemon/ampharos/mega/icon.png diff --git a/graphics/pokemon/mega_ampharos/normal.pal b/graphics/pokemon/ampharos/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_ampharos/normal.pal rename to graphics/pokemon/ampharos/mega/normal.pal diff --git a/graphics/pokemon/mega_ampharos/shiny.pal b/graphics/pokemon/ampharos/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_ampharos/shiny.pal rename to graphics/pokemon/ampharos/mega/shiny.pal diff --git a/graphics/pokemon/appletun/icon.png b/graphics/pokemon/appletun/icon.png index 66de1521a90dff63cbed4b47fe3565e9b6d94928..3b474c0f08440f37e48cdb3796e860aab15fbfe4 100644 GIT binary patch delta 315 zcmV-B0mS~e1DOMmXMYaF000ie0hKEb8vp(3? zlG{*u3{Uhe7%oO)wo|EdoF`}$HBaEO)Itc~o&utG(~J- zKowOQ00KA|2b9tQfOd&@N^kdJ0FjQ`9cM~cN8g8~f7Pylr_~{IFlR8< z-THP}8ta|(@H7}-C)Rp@vi^nn9bv+`FwPGr%*c;cn2{gE&i~~5`UIHj4rohA{8s<~ N002ovPDHLkV1jLul2`x$ delta 346 zcmV-g0j2(#1Goc_XMYP5000XU0RWnu7ytkPE=fc|R5*>@(miU!Fcb%H-$1<4rqE+# z$!KrIU97Dn$I#T=L8DC|c$9C^(O}{eC|N8@ONccz6c-#dwd4(X%7JGeheCz=dnkJ5q|{pBx4@k3_+Zv;HBeE zlcb(Yfw}!olLAX)%AgOvT*_!nvta_oxtrXrq3nBAti8<5i>2vXE{Yc@3T!r7KHK50 zYCS+W;o{N;xRNH|Tm%>kGx15t^DYcCHw(-Uhbfqj!=VE+_~4e0p2Ofna~OSS s4%Ng*$3cxg42Ovi&0*q0*DZZ~1N(01zRK870ssI207*qoM6N<$f>flQ!vFvP diff --git a/graphics/pokemon/applin/icon.png b/graphics/pokemon/applin/icon.png index c518f91a04da56e4dd177e07fd22a086d543db21..ce9fee4a9a87f608c35b7576988065d7279b56c4 100644 GIT binary patch delta 236 zcmVJNR5*=eU>HEa{{cs`8D?$bToHHk9{z3nbWXS)SGm*I<5j6e? z2SY4<@FNL;)5m}G^bv}b9Kh)V$z_oAfo#oCNFM+{KzJfr^mft!0000y}h*m|NnDy&7`dMw1Zmi#f!zPDfad$_F__$d(Fk9 z&Alm{Vq#iBK|$$6v|j)K010qNS#tmY4#WTe4#WYKD-Ig~009$8L_t(Ijm?rhZUi9= zh35u7%$6%nZjwFZD3uW$03@yuX-Zarv?T}!mVt>=MNx`%$A6RY^Ut>|FBTNp6G$s2 zBqxap1@AngNd3u51SbO%ZbZCB{&+7>v*{v(eVX-d2oj|#fbUjdvh`@<0vHa#=AuNT zB>RtSjHPUX$D>5nriO6R9~o)AqSnGY?5==o3!_GFu-WEi@E zlJbd(gF04KrF!#=ojCFX_@z)G&%=UKcCL|fV0Ci=PIr52#DAX9xoK-H7!Ym1+gPC* zOJ?nPY6eJd=v2V*e3ryi*uN{@B1NyGv5H+<)mfswVZwZ zysAgY!%r75Ux9-Ei4Xe0!F~vE_>o$o9|`P!h}|B3$nC%PLmIUEAsk~rl7-QaDV$zlA&(HFc60Q2B&BmO&-Du7z!yjh)i2J zHaIw3F7$3cQt7je-U+@by--TS0SP_yWGd!=>$L=`#k-T)P_w z9DFEnXF%-ED!a^G#+jkjs8PkXWLS@Hp~^f0Cs7F9#Njreg+S~hFsB#ch63U~;Q7sw zo-M%Z*s3=qZvNza`^7)q$@!}=E`FsK#?j3TyfBdDVf;xLcAvs@H^NMQEQOi;SO_!w vu@GkR1EVm(kLK2o{#QS)AovkC|C1kI4gm{{OeX>&00000NkvXXu0mjfi#)_a literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mega_beedrill/normal.pal b/graphics/pokemon/beedrill/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_beedrill/normal.pal rename to graphics/pokemon/beedrill/mega/normal.pal diff --git a/graphics/pokemon/mega_beedrill/shiny.pal b/graphics/pokemon/beedrill/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_beedrill/shiny.pal rename to graphics/pokemon/beedrill/mega/shiny.pal diff --git a/graphics/pokemon/mega_blastoise/back.png b/graphics/pokemon/blastoise/mega/back.png similarity index 100% rename from graphics/pokemon/mega_blastoise/back.png rename to graphics/pokemon/blastoise/mega/back.png diff --git a/graphics/pokemon/mega_blastoise/front.png b/graphics/pokemon/blastoise/mega/front.png similarity index 100% rename from graphics/pokemon/mega_blastoise/front.png rename to graphics/pokemon/blastoise/mega/front.png diff --git a/graphics/pokemon/mega_blastoise/icon.png b/graphics/pokemon/blastoise/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_blastoise/icon.png rename to graphics/pokemon/blastoise/mega/icon.png diff --git a/graphics/pokemon/mega_blastoise/normal.pal b/graphics/pokemon/blastoise/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_blastoise/normal.pal rename to graphics/pokemon/blastoise/mega/normal.pal diff --git a/graphics/pokemon/mega_blastoise/shiny.pal b/graphics/pokemon/blastoise/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_blastoise/shiny.pal rename to graphics/pokemon/blastoise/mega/shiny.pal diff --git a/graphics/pokemon/mega_blaziken/back.png b/graphics/pokemon/blaziken/mega/back.png similarity index 100% rename from graphics/pokemon/mega_blaziken/back.png rename to graphics/pokemon/blaziken/mega/back.png diff --git a/graphics/pokemon/mega_blaziken/front.png b/graphics/pokemon/blaziken/mega/front.png similarity index 100% rename from graphics/pokemon/mega_blaziken/front.png rename to graphics/pokemon/blaziken/mega/front.png diff --git a/graphics/pokemon/mega_blaziken/icon.png b/graphics/pokemon/blaziken/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_blaziken/icon.png rename to graphics/pokemon/blaziken/mega/icon.png diff --git a/graphics/pokemon/mega_blaziken/normal.pal b/graphics/pokemon/blaziken/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_blaziken/normal.pal rename to graphics/pokemon/blaziken/mega/normal.pal diff --git a/graphics/pokemon/mega_blaziken/shiny.pal b/graphics/pokemon/blaziken/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_blaziken/shiny.pal rename to graphics/pokemon/blaziken/mega/shiny.pal diff --git a/graphics/pokemon/blipbug/icon.png b/graphics/pokemon/blipbug/icon.png index e4ce3a937b61cacd14906f2c4bc90f8c718fe442..b3cf1cf79296e5bf970ef0dd8e51bde853c04ed9 100644 GIT binary patch delta 274 zcmV+t0qy?v0_g&fV1M*UL_t(Ijop$h62dSLg>!?w0|%(VSE0dB3%3AQY%r}YhTN?b z2xgn%uhb-TQ2U~pVTN^idD(rl`IP!;x#&!WTqL|Ak1yfg5j**YjMe2!cxbO#YuUtW zZLRD=mUST=w{&cc9CPFJ0)kI!Zl!QdMhzsTBTq2;W8NwkgnuJHJ1S+6E;rsfaGWYg z_E@Yc2txO48LceDTm7G+Sm@+B)K4oGXBsFL!diGz z2ltUU$~QCw*R8@scgN1jCds)FWETqTTIrar34k?hz*5PF$Yv9erl^?!;=VUr8}2)RRn0<0seG%5LJ+i}Q} zk1e!2LeRmrEfTali+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vpzk}+<>FbqX?g7OZzK-Ww;MFXUB0K#7C zQxss9a0{ZvI$Y5pnJl0%VJ%^)SZ?54py6bGkn|V%ocp)X_>lW~Fu}ieK!BQXe6>C4RyM{bO>c;7M z8>*n~?Z<*q+s}8YhIE+(sV`o31CQRJaZm?Et~mY)iw>}9v$ z=O6j7qq@vTKpy$XLgquOQ24MLWi+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vp@lCf@sFc60Q1_))1KpcCl=B6z0LV1a9 z9x9ix@CycXP~Ung}O_SA}+4LhVlYPz3sm9+2{LzA!dt!r+}uUC9Zi4+gFSi zFDx7kBqoH29L8PVEHFxKu9kHNPTH0+zkbC16_2w%Aby9T1I^nd0t-~_<~WuSuCwK* zbgyPqAp#o*xT1B=0N`dbUzp#E1i0)k2>>43BH@x8kcLkT4c**dexzh$fol^+O#lNsa-{b8- z6FYb*y&b&zogK`ees70C{mu@%vHHJuSk0;a6D&C5%TVhtegFUf07*qoM6N<$f(LJ~ AsQ>@~ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mega_glalie/normal.pal b/graphics/pokemon/glalie/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_glalie/normal.pal rename to graphics/pokemon/glalie/mega/normal.pal diff --git a/graphics/pokemon/mega_glalie/shiny.pal b/graphics/pokemon/glalie/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_glalie/shiny.pal rename to graphics/pokemon/glalie/mega/shiny.pal diff --git a/graphics/pokemon/alolan_golem/back.png b/graphics/pokemon/golem/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/back.png rename to graphics/pokemon/golem/alolan/back.png diff --git a/graphics/pokemon/alolan_golem/front.png b/graphics/pokemon/golem/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/front.png rename to graphics/pokemon/golem/alolan/front.png diff --git a/graphics/pokemon/alolan_golem/icon.png b/graphics/pokemon/golem/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/icon.png rename to graphics/pokemon/golem/alolan/icon.png diff --git a/graphics/pokemon/alolan_golem/normal.pal b/graphics/pokemon/golem/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/normal.pal rename to graphics/pokemon/golem/alolan/normal.pal diff --git a/graphics/pokemon/alolan_golem/shiny.pal b/graphics/pokemon/golem/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/shiny.pal rename to graphics/pokemon/golem/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_graveler/back.png b/graphics/pokemon/graveler/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/back.png rename to graphics/pokemon/graveler/alolan/back.png diff --git a/graphics/pokemon/alolan_graveler/front.png b/graphics/pokemon/graveler/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/front.png rename to graphics/pokemon/graveler/alolan/front.png diff --git a/graphics/pokemon/alolan_graveler/icon.png b/graphics/pokemon/graveler/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/icon.png rename to graphics/pokemon/graveler/alolan/icon.png diff --git a/graphics/pokemon/alolan_graveler/normal.pal b/graphics/pokemon/graveler/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/normal.pal rename to graphics/pokemon/graveler/alolan/normal.pal diff --git a/graphics/pokemon/alolan_graveler/shiny.pal b/graphics/pokemon/graveler/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/shiny.pal rename to graphics/pokemon/graveler/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_grimer/back.png b/graphics/pokemon/grimer/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/back.png rename to graphics/pokemon/grimer/alolan/back.png diff --git a/graphics/pokemon/alolan_grimer/front.png b/graphics/pokemon/grimer/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/front.png rename to graphics/pokemon/grimer/alolan/front.png diff --git a/graphics/pokemon/alolan_grimer/icon.png b/graphics/pokemon/grimer/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/icon.png rename to graphics/pokemon/grimer/alolan/icon.png diff --git a/graphics/pokemon/alolan_grimer/normal.pal b/graphics/pokemon/grimer/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/normal.pal rename to graphics/pokemon/grimer/alolan/normal.pal diff --git a/graphics/pokemon/alolan_grimer/shiny.pal b/graphics/pokemon/grimer/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/shiny.pal rename to graphics/pokemon/grimer/alolan/shiny.pal diff --git a/graphics/pokemon/primal_groudon/back.png b/graphics/pokemon/groudon/primal/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/back.png rename to graphics/pokemon/groudon/primal/back.png diff --git a/graphics/pokemon/primal_groudon/front.png b/graphics/pokemon/groudon/primal/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/front.png rename to graphics/pokemon/groudon/primal/front.png diff --git a/graphics/pokemon/primal_groudon/icon.png b/graphics/pokemon/groudon/primal/icon.png similarity index 100% rename from graphics/pokemon/primal_groudon/icon.png rename to graphics/pokemon/groudon/primal/icon.png diff --git a/graphics/pokemon/primal_groudon/normal.pal b/graphics/pokemon/groudon/primal/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/normal.pal rename to graphics/pokemon/groudon/primal/normal.pal diff --git a/graphics/pokemon/primal_groudon/shiny.pal b/graphics/pokemon/groudon/primal/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/shiny.pal rename to graphics/pokemon/groudon/primal/shiny.pal diff --git a/graphics/pokemon/mega_gyarados/back.png b/graphics/pokemon/gyarados/mega/back.png similarity index 100% rename from graphics/pokemon/mega_gyarados/back.png rename to graphics/pokemon/gyarados/mega/back.png diff --git a/graphics/pokemon/mega_gyarados/front.png b/graphics/pokemon/gyarados/mega/front.png similarity index 100% rename from graphics/pokemon/mega_gyarados/front.png rename to graphics/pokemon/gyarados/mega/front.png diff --git a/graphics/pokemon/mega_gyarados/icon.png b/graphics/pokemon/gyarados/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_gyarados/icon.png rename to graphics/pokemon/gyarados/mega/icon.png diff --git a/graphics/pokemon/mega_gyarados/normal.pal b/graphics/pokemon/gyarados/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_gyarados/normal.pal rename to graphics/pokemon/gyarados/mega/normal.pal diff --git a/graphics/pokemon/mega_gyarados/shiny.pal b/graphics/pokemon/gyarados/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_gyarados/shiny.pal rename to graphics/pokemon/gyarados/mega/shiny.pal diff --git a/graphics/pokemon/mega_heracross/back.png b/graphics/pokemon/heracross/mega/back.png similarity index 100% rename from graphics/pokemon/mega_heracross/back.png rename to graphics/pokemon/heracross/mega/back.png diff --git a/graphics/pokemon/mega_heracross/front.png b/graphics/pokemon/heracross/mega/front.png similarity index 100% rename from graphics/pokemon/mega_heracross/front.png rename to graphics/pokemon/heracross/mega/front.png diff --git a/graphics/pokemon/mega_heracross/icon.png b/graphics/pokemon/heracross/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_heracross/icon.png rename to graphics/pokemon/heracross/mega/icon.png diff --git a/graphics/pokemon/mega_heracross/normal.pal b/graphics/pokemon/heracross/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_heracross/normal.pal rename to graphics/pokemon/heracross/mega/normal.pal diff --git a/graphics/pokemon/mega_heracross/shiny.pal b/graphics/pokemon/heracross/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_heracross/shiny.pal rename to graphics/pokemon/heracross/mega/shiny.pal diff --git a/graphics/pokemon/mega_houndoom/back.png b/graphics/pokemon/houndoom/mega/back.png similarity index 100% rename from graphics/pokemon/mega_houndoom/back.png rename to graphics/pokemon/houndoom/mega/back.png diff --git a/graphics/pokemon/mega_houndoom/front.png b/graphics/pokemon/houndoom/mega/front.png similarity index 100% rename from graphics/pokemon/mega_houndoom/front.png rename to graphics/pokemon/houndoom/mega/front.png diff --git a/graphics/pokemon/mega_houndoom/icon.png b/graphics/pokemon/houndoom/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_houndoom/icon.png rename to graphics/pokemon/houndoom/mega/icon.png diff --git a/graphics/pokemon/mega_houndoom/normal.pal b/graphics/pokemon/houndoom/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_houndoom/normal.pal rename to graphics/pokemon/houndoom/mega/normal.pal diff --git a/graphics/pokemon/mega_houndoom/shiny.pal b/graphics/pokemon/houndoom/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_houndoom/shiny.pal rename to graphics/pokemon/houndoom/mega/shiny.pal diff --git a/graphics/pokemon/mega_kangaskhan/back.png b/graphics/pokemon/kangaskhan/mega/back.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/back.png rename to graphics/pokemon/kangaskhan/mega/back.png diff --git a/graphics/pokemon/mega_kangaskhan/front.png b/graphics/pokemon/kangaskhan/mega/front.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/front.png rename to graphics/pokemon/kangaskhan/mega/front.png diff --git a/graphics/pokemon/mega_kangaskhan/icon.png b/graphics/pokemon/kangaskhan/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/icon.png rename to graphics/pokemon/kangaskhan/mega/icon.png diff --git a/graphics/pokemon/mega_kangaskhan/normal.pal b/graphics/pokemon/kangaskhan/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_kangaskhan/normal.pal rename to graphics/pokemon/kangaskhan/mega/normal.pal diff --git a/graphics/pokemon/mega_kangaskhan/shiny.pal b/graphics/pokemon/kangaskhan/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_kangaskhan/shiny.pal rename to graphics/pokemon/kangaskhan/mega/shiny.pal diff --git a/graphics/pokemon/primal_kyogre/back.png b/graphics/pokemon/kyogre/primal/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/back.png rename to graphics/pokemon/kyogre/primal/back.png diff --git a/graphics/pokemon/primal_kyogre/front.png b/graphics/pokemon/kyogre/primal/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/front.png rename to graphics/pokemon/kyogre/primal/front.png diff --git a/graphics/pokemon/primal_kyogre/icon.png b/graphics/pokemon/kyogre/primal/icon.png similarity index 100% rename from graphics/pokemon/primal_kyogre/icon.png rename to graphics/pokemon/kyogre/primal/icon.png diff --git a/graphics/pokemon/primal_kyogre/normal.pal b/graphics/pokemon/kyogre/primal/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/normal.pal rename to graphics/pokemon/kyogre/primal/normal.pal diff --git a/graphics/pokemon/primal_kyogre/shiny.pal b/graphics/pokemon/kyogre/primal/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/shiny.pal rename to graphics/pokemon/kyogre/primal/shiny.pal diff --git a/graphics/pokemon/mega_latias/back.png b/graphics/pokemon/latias/mega/back.png similarity index 100% rename from graphics/pokemon/mega_latias/back.png rename to graphics/pokemon/latias/mega/back.png diff --git a/graphics/pokemon/mega_latias/front.png b/graphics/pokemon/latias/mega/front.png similarity index 100% rename from graphics/pokemon/mega_latias/front.png rename to graphics/pokemon/latias/mega/front.png diff --git a/graphics/pokemon/latias/mega/icon.png b/graphics/pokemon/latias/mega/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0d022d80273d9ea474722d230fae73b9a9a645fb GIT binary patch literal 373 zcmV-*0gC>KP)DV$04m2xWFch?4wPVIQ5FJp>0W~4v{+Mjp?yR9n2 zwXOGj4aAM$un!{ky_>y01H85&f|4$lc%+{GJN!+*`wmYseNp>$IDNRJ5O?Sd1%LGT TLjB1O00000NkvXXu0mjf$ULQ@ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mega_latias/normal.pal b/graphics/pokemon/latias/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_latias/normal.pal rename to graphics/pokemon/latias/mega/normal.pal diff --git a/graphics/pokemon/mega_latias/shiny.pal b/graphics/pokemon/latias/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_latias/shiny.pal rename to graphics/pokemon/latias/mega/shiny.pal diff --git a/graphics/pokemon/mega_latios/back.png b/graphics/pokemon/latios/mega/back.png similarity index 100% rename from graphics/pokemon/mega_latios/back.png rename to graphics/pokemon/latios/mega/back.png diff --git a/graphics/pokemon/mega_latios/front.png b/graphics/pokemon/latios/mega/front.png similarity index 100% rename from graphics/pokemon/mega_latios/front.png rename to graphics/pokemon/latios/mega/front.png diff --git a/graphics/pokemon/latios/mega/icon.png b/graphics/pokemon/latios/mega/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8d594c2fa7365e4cf054d13057f2441e8ecc00df GIT binary patch literal 372 zcmV-)0gL{LP)DV$i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vpblA&(oFc60G2BV2oI+h0(I4UhUayX|} z4JkNKu;AXRs&pX0`%LyW0R^tJtqugN&q=)5BnJ-F@YDP=;lNv zP({Tw6PxN@U7OdEeoQUVR5{(6P^tuok>51>lNx#i#JH7wI|wL?v12TVTV6ZyX+;<- z1ar~f#v!(O95w#P9%|G6z&yBYU{Lm$b64J z^uPC)lMO$Ia5*ddcS9HXw1y4M1Vnnv-F*_)5H^vo0?d3KtKp>|D|j4uHg5 zKvm9m38J~uDildGx&0&^77IX6*px+@IRwV)7_4#5;O^C(JZSoEUK6k~SGA6A4*O)DV$@O>d=$`tEbq0XH9csf)819_jv zrrflJ>^;%03hba~d!Ptxo<@OoEAT3Qe06@Zs`~fz{ipF$VAfwb1B2ME9SjVxBSm-s zWB&&*6CYb(CO$U6EPQN$nfRazOyOgE=41CQAFELKSb-5=#|LsvnL%`ycV7Si002ov JPDHLkV1l>cx%mJ9 diff --git a/graphics/pokemon/mega_garchomp/icon.png b/graphics/pokemon/mega_garchomp/icon.png deleted file mode 100644 index 168638243439461e66b5fcd824cc1013a5b0f0a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 462 zcmV;<0WtoGP)i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00045 zNklg>>Z+#o*aQ)x?tq z=K_sZ)<=^6NYA-{3r!Ds=w}jy?o6CCL6xEV+7fZ#9BSS0Mnq?dA=Z|S<@-Rn(^|0E z5?|<;ZxzFq_QSJtWyQ$>vn38*HKH_T z7LKHB0(L=hp*wb&_BL4BgL-Vk$nFx$5NW;B%_25YyX%hylXf5P(v120CP@1oWH<8U z9lV1!Dssc=PgwSVzTs+Al5N$5`&-Hf;LqoL*C*9kUK-~C?)l>BfvJ2zD!{C4$CVH1 zvlKo^D<5`P17^YFF3MW_^0K_y;~-`~x4Qa~`$f7gx<3KwDuIh5!Hn07*qoM6N<$ Ef)cjYqyPW_ diff --git a/graphics/pokemon/mega_glalie/icon.png b/graphics/pokemon/mega_glalie/icon.png deleted file mode 100644 index 02596508e7c70b16a773c247a476f90a75db41d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 375 zcmV--0f_#IP)i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00033 zNklN7P(3%Xy9WUYV00w}Sz{-Io$OO!I?g6yTXJ2h7J002ovPDHLkV1ms8ts(#b diff --git a/graphics/pokemon/mega_latias/icon.png b/graphics/pokemon/mega_latias/icon.png deleted file mode 100644 index 9c4c1c20f92eaf59991bfb3b8f61dce808c799d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmV-~0ek+5P)DV$gPpy>nPrXd9J&+)f>)(O?%;SCGiRt|IYIKGbk)*X zNe}7INdGJKcco3aRkj2##@1#B4mr?GO&w@Z!QRBSaeV8?ln;IjO7Gy7)j7m>=fOU=R z8`6m7@Be!J`#3z^-{O$FALCHCAL3Ab@BU0X_hlSP_ragR{m}L4zVoOAnb|20)jke7 icOR)?{`D(XKd3JDV$gPpy>nPrXd9J&+)f_LqZJ2+m(%o!?KPLRAPUA1&p z(nI<)(*H{RU1?Kpl`X-Gv9;NOLk@IPQ&&icl%V373JKeDDM4%x`4!C{)^>>HopPVoeq_Sl~3y=Ui>7SJ>kh_52%G1`HsmxcMV5{(-XgxNF4cG^`lbwk|C z5>GhX0$BPBZ&!k5I}Rgz*+>{^;_Kb}vmlUF)HpA9A7+i?rp5@R1=))xqta6zU|l2o zhBRXN`@dfQJ`PX!w>aeP$2b)3hd5N+KXiS%?>s6&W_F50wU2|& i-A8JefBlNp59$jx_?7CnZbS0`0000i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@0004s zNkl;WawW71v+@pKT(N2WY9O1 ze#n*Gp;N2DfDgyhiFZZumj~8>(JMgFasYk+Xcsdo8q1lk0*sFBHv$-}wUP8pU?Tu? z0sz{Bbs_@uL|t37$dfxY03G3L$N=gXYozfX+WN(ne5-IjN&?pgcMO%=C);4}9yB^V z62ukVub?U#6|i?%M%aYGh%kgu?&Olt9)}ritX2(oZ??URMht1?@f;|Q-jzjAS3E~| znf42?70vT|*CgwOE2dC67={YPg&@h?aHl76u+h?rah5SBB@)@4tTJ;o3XWfM^r z?ZQj}gdRYc30NB&azMhR;2_D4X`f{2lmU2xwxa33FARGr)^Jas?&E>39-sN9lWpS~ zFKPF{6hAgn!oWr9hhx8mDoIFd;luMLy2+NZq(q_>Ym-x{ed$s9aZLSSU2-S=7z?8a z9yD${>BlqzS}D&@b3X>w1s44%`j@N4QrE%F=L^zLhNG=@;}8G<002ovPDHLkV1hkl B;c)-} diff --git a/graphics/pokemon/mega_pidgeot/icon.png b/graphics/pokemon/mega_pidgeot/icon.png deleted file mode 100644 index 255fffe58960d980250a243927faae14294a660b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 586 zcmV-Q0=4~#P)i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@0005i zNklBjE6vyvbzBXKc%T3z;JCJn35aF?MuXIF z+#eoEV3o<0%0l_G?TrF~AzTR^g__THkctG_MJUPU6QLc-=1Fr+&`?IYufQ`$(5-6O-m5I=so=+86U(Ggts0-Q; z1^5O~Y}iU5z%(m2!cgC}J=drBKu9eNq@m*mh4w=V9S)Mv@q`jc`60D16q|p%(J0^f zp~2U5$;~%E2!a>!*j@6vAGasnbi+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@0003= zNklb{m42JCsR5(a)U_j#a1T@mSPxPb=Z^)fkGBD&$s9T1dp~lcAp;9}v zk0DZi?B6#20RHi)<{v{NTpB@{fOJe4VmQU%V~sJu9)k-D3j428Hf`Igv=@Q+OGI{7 zT4w>*pa9A0fI(7_-4y5O0fU&b5ChS8OGbM!G{)G8Jt$pE5lpKgyTp`S>BCw-D~i#s zHf9CAzd9anK(oe~ld$g{*R`p0hP!3qJ@-dxqN^EmgmemaSvJDg`{yt?goQ8aFj<&P z+z9qJ!ZF#$czowhVQd62^HD%(gsk1$UFmPjgXf=T0fW170jBOY9|4B?-9>;QUn25e z1el705G24DS(y+-0!$%F2&%xiV#oxYfg#eDBQT(KC&0K04Cwyt1Pr|71~V{JfswH@ oFzQEO#sbVfe@DLo^Cvz&0DaSYh9M}4T>t<807*qoM6N<$f}~l*6#xJL diff --git a/graphics/pokemon/mega_slowbro/icon.png b/graphics/pokemon/mega_slowbro/icon.png deleted file mode 100644 index 621fe41840d3adc1b34432ec2db188cb7c5bc3f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 399 zcmV;A0dW3_P)i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@0003R zNkl&PIo8yBjkRekbpul0&E3ZcyHq)T93m=1WK)UV^l#mO`i{;2gPUkv{hje zT;=O&r;yzW4pPb&m6>I!iXW{!IWU)$dvn<|*QVwCrwiTdF0XUEG??J)qpbu*u tlvd{j%sQyIu-U9b@Z;}vNdMID`2xXPg(Y=5h$a94002ovPDHLkV1gGnuWkSU diff --git a/graphics/pokemon/alolan_meowth/back.png b/graphics/pokemon/meowth/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/back.png rename to graphics/pokemon/meowth/alolan/back.png diff --git a/graphics/pokemon/alolan_meowth/front.png b/graphics/pokemon/meowth/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/front.png rename to graphics/pokemon/meowth/alolan/front.png diff --git a/graphics/pokemon/alolan_meowth/icon.png b/graphics/pokemon/meowth/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/icon.png rename to graphics/pokemon/meowth/alolan/icon.png diff --git a/graphics/pokemon/alolan_meowth/normal.pal b/graphics/pokemon/meowth/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/normal.pal rename to graphics/pokemon/meowth/alolan/normal.pal diff --git a/graphics/pokemon/alolan_meowth/shiny.pal b/graphics/pokemon/meowth/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/shiny.pal rename to graphics/pokemon/meowth/alolan/shiny.pal diff --git a/graphics/pokemon/mega_metagross/back.png b/graphics/pokemon/metagross/mega/back.png similarity index 100% rename from graphics/pokemon/mega_metagross/back.png rename to graphics/pokemon/metagross/mega/back.png diff --git a/graphics/pokemon/mega_metagross/front.png b/graphics/pokemon/metagross/mega/front.png similarity index 100% rename from graphics/pokemon/mega_metagross/front.png rename to graphics/pokemon/metagross/mega/front.png diff --git a/graphics/pokemon/mega_metagross/icon.png b/graphics/pokemon/metagross/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_metagross/icon.png rename to graphics/pokemon/metagross/mega/icon.png diff --git a/graphics/pokemon/mega_metagross/normal.pal b/graphics/pokemon/metagross/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_metagross/normal.pal rename to graphics/pokemon/metagross/mega/normal.pal diff --git a/graphics/pokemon/mega_metagross/shiny.pal b/graphics/pokemon/metagross/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_metagross/shiny.pal rename to graphics/pokemon/metagross/mega/shiny.pal diff --git a/graphics/pokemon/mega_mewtwo_x/back.png b/graphics/pokemon/mewtwo/mega_x/back.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/back.png rename to graphics/pokemon/mewtwo/mega_x/back.png diff --git a/graphics/pokemon/mega_mewtwo_x/front.png b/graphics/pokemon/mewtwo/mega_x/front.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/front.png rename to graphics/pokemon/mewtwo/mega_x/front.png diff --git a/graphics/pokemon/mega_mewtwo_x/icon.png b/graphics/pokemon/mewtwo/mega_x/icon.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/icon.png rename to graphics/pokemon/mewtwo/mega_x/icon.png diff --git a/graphics/pokemon/mega_mewtwo_x/normal.pal b/graphics/pokemon/mewtwo/mega_x/normal.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/normal.pal rename to graphics/pokemon/mewtwo/mega_x/normal.pal diff --git a/graphics/pokemon/mega_mewtwo_x/shiny.pal b/graphics/pokemon/mewtwo/mega_x/shiny.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/shiny.pal rename to graphics/pokemon/mewtwo/mega_x/shiny.pal diff --git a/graphics/pokemon/mega_mewtwo_y/back.png b/graphics/pokemon/mewtwo/mega_y/back.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/back.png rename to graphics/pokemon/mewtwo/mega_y/back.png diff --git a/graphics/pokemon/mega_mewtwo_y/front.png b/graphics/pokemon/mewtwo/mega_y/front.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/front.png rename to graphics/pokemon/mewtwo/mega_y/front.png diff --git a/graphics/pokemon/mega_mewtwo_y/icon.png b/graphics/pokemon/mewtwo/mega_y/icon.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/icon.png rename to graphics/pokemon/mewtwo/mega_y/icon.png diff --git a/graphics/pokemon/mega_mewtwo_y/normal.pal b/graphics/pokemon/mewtwo/mega_y/normal.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/normal.pal rename to graphics/pokemon/mewtwo/mega_y/normal.pal diff --git a/graphics/pokemon/mega_mewtwo_y/shiny.pal b/graphics/pokemon/mewtwo/mega_y/shiny.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/shiny.pal rename to graphics/pokemon/mewtwo/mega_y/shiny.pal diff --git a/graphics/pokemon/moltres/galarian/icon.png b/graphics/pokemon/moltres/galarian/icon.png index 90edae52194d51e112b187e2277b618c8af0acf3..0f469cbf5ae5373abd6359d972a371b1fc0cf4ec 100644 GIT binary patch delta 422 zcmV;X0a^a=0>uN6DSu*|gM))}y}iBv|Np(DLH713)nY;RlqrjQ|6)qb?sJ^~w4|iP z|7xt9Vq#iBK|xumkYoS=010qNS#tmY4#WTe4#WYKD-Ig~00BEmL_t(IjpdRpa>OtU zh20ZqL<|g)YxFuHp3Z{kOiK&`HfJ(fupqX{0)wcE?Rck)OMf~QiSrWuSnpHn4+Xpn zIW~zoR)KOk02(S!J-f(}RdP%F;AX;+K(Aa=lXkS32;&x;fO_);J1!%)oI%Q^LFcJf zRjj>9hygB_mb4=w4p9aexqqCsM-C9zevEZgIGZW%r~ecHvD~}6kn_5#;(FZ&Xm`2GF}bz=@We^W zz6FQwKB8>3;{dW+SuYhFiXf|n&7@(>Q#W__lrZyiJqJPIW3cvRL!u8flcSCUQu2t` zC7c`{I0O`LPx}uXW=1{NDh&rQ`%&F*I7q4qKX8!Zr60%(2hi_8u=K=AM=&|pCDkSK_F_+UuL=x~_$u%Mv8 z_-Lq@U|?84KtSkZbJ+j@0Q*TqK~#90<(!ypU>U@nm7Lss&@5N^_AFubAMDnkaB ziJ^mC2Mi_ID?RD4kO2N=lFzw6GxFsfk}ZKqo1>)qz!Z<2g@5rCKp?~J>&C)67N(Nf zOD$c1JTfK6{IpP_m9{LjKP;7rC<;-CE!6?9l!%_W#MFy6Jtf*m?~ySaRj=U2f}X(e zYoS_F^u)de-!la7vTB29mnwL>X90RxuLVPGQZI)!wusanU}~u{zRY;~*CX3Jd~`6~ z#{uT-L&5yaK1mvwlMjFPp i#{kn+3@~GS56m0oE&@|1y}m*K0000i+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vprlD|&FFc63R2KNp|LTn7#=|UKpl8jUW zVWAB5fJEK^bxPkNgNJ%=2i^tLP<2SGlo;enIqar?5@rP6?$bH>`R*g+HxHod*GBM8 ziA1wF>$KF!I0}VFP;vzV$GaYcFfWP8(($AvbrW0cN&kkgD5Z*^9!ALYVi($1NO=F>e8{wiDUHfq+Bs4ik+H!KE6C4f*hMJ*~`>9)SqtR}Exf2FdeKWEG@nzbY2*btY!h+^ux%IK&@>9jof;lNd< zncn+>1U3Q(nsxnnIUO_|KQ{AOb)q|dY$UD+T|b~%tuK0hprk+iK>TYzz5!ypLbq8< RBCP-b002ovPDHLkV1lRp0rmg@ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mega_pidgeot/normal.pal b/graphics/pokemon/pidgeot/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_pidgeot/normal.pal rename to graphics/pokemon/pidgeot/mega/normal.pal diff --git a/graphics/pokemon/mega_pidgeot/shiny.pal b/graphics/pokemon/pidgeot/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_pidgeot/shiny.pal rename to graphics/pokemon/pidgeot/mega/shiny.pal diff --git a/graphics/pokemon/mega_pinsir/back.png b/graphics/pokemon/pinsir/mega/back.png similarity index 100% rename from graphics/pokemon/mega_pinsir/back.png rename to graphics/pokemon/pinsir/mega/back.png diff --git a/graphics/pokemon/mega_pinsir/front.png b/graphics/pokemon/pinsir/mega/front.png similarity index 100% rename from graphics/pokemon/mega_pinsir/front.png rename to graphics/pokemon/pinsir/mega/front.png diff --git a/graphics/pokemon/mega_pinsir/icon.png b/graphics/pokemon/pinsir/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_pinsir/icon.png rename to graphics/pokemon/pinsir/mega/icon.png diff --git a/graphics/pokemon/mega_pinsir/normal.pal b/graphics/pokemon/pinsir/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_pinsir/normal.pal rename to graphics/pokemon/pinsir/mega/normal.pal diff --git a/graphics/pokemon/mega_pinsir/shiny.pal b/graphics/pokemon/pinsir/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_pinsir/shiny.pal rename to graphics/pokemon/pinsir/mega/shiny.pal diff --git a/graphics/pokemon/alolan_raichu/back.png b/graphics/pokemon/raichu/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/back.png rename to graphics/pokemon/raichu/alolan/back.png diff --git a/graphics/pokemon/alolan_raichu/front.png b/graphics/pokemon/raichu/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/front.png rename to graphics/pokemon/raichu/alolan/front.png diff --git a/graphics/pokemon/alolan_raichu/icon.png b/graphics/pokemon/raichu/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/icon.png rename to graphics/pokemon/raichu/alolan/icon.png diff --git a/graphics/pokemon/alolan_raichu/normal.pal b/graphics/pokemon/raichu/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/normal.pal rename to graphics/pokemon/raichu/alolan/normal.pal diff --git a/graphics/pokemon/alolan_raichu/shiny.pal b/graphics/pokemon/raichu/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/shiny.pal rename to graphics/pokemon/raichu/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_raticate/back.png b/graphics/pokemon/raticate/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/back.png rename to graphics/pokemon/raticate/alolan/back.png diff --git a/graphics/pokemon/alolan_raticate/front.png b/graphics/pokemon/raticate/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/front.png rename to graphics/pokemon/raticate/alolan/front.png diff --git a/graphics/pokemon/alolan_raticate/icon.png b/graphics/pokemon/raticate/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/icon.png rename to graphics/pokemon/raticate/alolan/icon.png diff --git a/graphics/pokemon/alolan_raticate/normal.pal b/graphics/pokemon/raticate/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/normal.pal rename to graphics/pokemon/raticate/alolan/normal.pal diff --git a/graphics/pokemon/alolan_raticate/shiny.pal b/graphics/pokemon/raticate/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/shiny.pal rename to graphics/pokemon/raticate/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_rattata/back.png b/graphics/pokemon/rattata/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/back.png rename to graphics/pokemon/rattata/alolan/back.png diff --git a/graphics/pokemon/alolan_rattata/front.png b/graphics/pokemon/rattata/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/front.png rename to graphics/pokemon/rattata/alolan/front.png diff --git a/graphics/pokemon/alolan_rattata/icon.png b/graphics/pokemon/rattata/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/icon.png rename to graphics/pokemon/rattata/alolan/icon.png diff --git a/graphics/pokemon/alolan_rattata/normal.pal b/graphics/pokemon/rattata/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/normal.pal rename to graphics/pokemon/rattata/alolan/normal.pal diff --git a/graphics/pokemon/alolan_rattata/shiny.pal b/graphics/pokemon/rattata/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/shiny.pal rename to graphics/pokemon/rattata/alolan/shiny.pal diff --git a/graphics/pokemon/mega_rayquaza/back.png b/graphics/pokemon/rayquaza/mega/back.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/back.png rename to graphics/pokemon/rayquaza/mega/back.png diff --git a/graphics/pokemon/mega_rayquaza/front.png b/graphics/pokemon/rayquaza/mega/front.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/front.png rename to graphics/pokemon/rayquaza/mega/front.png diff --git a/graphics/pokemon/mega_rayquaza/icon.png b/graphics/pokemon/rayquaza/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/icon.png rename to graphics/pokemon/rayquaza/mega/icon.png diff --git a/graphics/pokemon/mega_rayquaza/normal.pal b/graphics/pokemon/rayquaza/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_rayquaza/normal.pal rename to graphics/pokemon/rayquaza/mega/normal.pal diff --git a/graphics/pokemon/mega_rayquaza/shiny.pal b/graphics/pokemon/rayquaza/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_rayquaza/shiny.pal rename to graphics/pokemon/rayquaza/mega/shiny.pal diff --git a/graphics/pokemon/regidrago/icon.png b/graphics/pokemon/regidrago/icon.png index b6cfa5d9d81d1413b77ce43561b009c486125ee1..3b994684b44181a5581d21f9fabe786770c5d0f8 100644 GIT binary patch delta 447 zcmV;w0YLtX1KtCWDSu*|gM))}y}iBv|Np(DLH713)nY;RlqrjQ|6)qb?sJ^~w4|iP z|7xt9Vq#iBK|xumkYoS=010qNS#tmY4#WTe4#WYKD-Ig~00C4FCm`m@-c%vWaDS!2MCr@`+egQmyGzC#o zG?bBBc>>T`k_M2<00?6oGEgUG#hsB}PHz}{V+yDD8zSBzl$`S<;0`IvY8+v>0H|_) z`PHJ1EeA54@3(h!7lDPO<_`$DHO1rY*V?5`M?qUDy0J#x0PZYpjm4ms_Oe$#j4@V1 zQY&gzIgBm2gnw2w%kR8+k1UhivvMR%Af&&Kfmo84$4^6@InN9G?*lWSc_INYFp+^~ z9|nWuHVPt2l~Jk4vmkLYNQ41?1fUv01SuTC_kfzSn)%FlbtJzR@kf91AYKAL^ zp$fBo93!s62)OnJ7^*PRMW?GNN>RrYFx_)o(Zh&Z%{T@{d#Zj&h`zv)n;-G63eAr? pNq7R=)ii8?)`uhHij^J^>a_V%;~XnzbVz?p4}*pP~m9oN8O zv^oNr6(C@J1Mog`l|p!&oag2-9ns|6aA=zK2;KYMjRMvqd~Bcl5k41S4Np(54S)>! zj*T>RoqHVt7Jw-;gYq9jc<)?0$bm8m5e5kzW&|t%zS6Vj0EAdFF7fKU4~)PCyqVk8 zhmXiqQlqqUnPkr|ER(D~GD`zi$fH=clzPUhX`5z_s_DO9`{(|xA7<}|T+x0cp!^V^ z{g4dphcTNU3$Voxz%|qsKLEFqvLE%AvmaDfko-`UWIukmz5xUG_~im5?YaN}002ov JPDHLkV1gNCu)_cV diff --git a/graphics/pokemon/regieleki/icon.png b/graphics/pokemon/regieleki/icon.png index 268208caf988ea3deb8cad6bf9a4b50f11473e36..bf3b3f3a8921c9755c7f0bdf8707c6f1eb9cd615 100644 GIT binary patch delta 447 zcmV;w0YLu91KtCWDSu*|gM))}y}iBv|Np(DLH713)nY;RlqrjQ|6)qb?sJ^~w4|iP z|7xt9Vq#iBK|xumkYoS=010qNS#tmY4#WTe4#WYKD-Ig~00C46Ck3Qbm3%$G5P!RsGF1wLb^P2N=Khbd zCoK;2!L?A)_6lALXN)#iEGpDK3W9@cQK(iT<;EKQQYfX`p6jKHn`y7)n}gK$?1jdp z1a|vW>ZrOg3t#8sQK^p+vJf(+Q=gQ1^gX9{k**cyL_IrE*UO*Q-P|;dsml^#f~au3 zOlZZRlfZ7fSATFt8=7!g0!LbW5QDFALkqk)>@`JEs5P^#k`lNpwXdjv@k>7&imjp; zeVPT^`+k@o%<|jQ`Xlg%);wc9!~w&>9S8K!U*ix4w89~dkY=*rVB(Nzgcxy1HqekG z4#_C8!37+$m9qQ}I3%;Zl^Yzq5OB!ABpi75M3{iX{Wy6PdK@+*@HlJ)dD!=B!AiPj pUBfTfnN3Lpc5AkSUuOR=3_ojy-{fYkHv|9x002ovPDHLkV1lsD(-!~$ delta 425 zcmV;a0apIr1IPoADSu#?fPjE-xVX6Z`1rV>K=AM=&|pCDkSK_F_+UuL=x~_$u%Mv8 z_-Lq@U|?84KtSkZbJ+j@0aHmtK~#90&62ThgfI+-^90Sq05b!y!ay?TdAi?n3w;XS zr&8~vqDo+iM7pXHuALALTB%EiHUo10*be#q3Gqiu0)22VuwX?uYIreYX_U)GlokO zm8IjJ!%G^kO{WX>tka@c|Fo!=vMi?}%OE7AIdE5#O?73TvGWaQe_~KmTc3O zYg}7_EYBxHQGXB$BW$IW0_ift6*&kwHp@h@)f6MAS+EWF!|lOhdwX2p1S$Ug`jHRx z2X{V@{n+#29oz8{JSCG>KBnM0d5VFLI2Up~@DV3Rb8()JZMG`=@O;GS^K1`%u;BUF z2#S2HV0(f*ANS``$b1|uU_K6lI-i=oU=>}nuaP6x(;}gy1bb*oCViRyuju#$XN}+F T+gyB~00000NkvXXu0mjf?qkq4 diff --git a/graphics/pokemon/mega_sableye/back.png b/graphics/pokemon/sableye/mega/back.png similarity index 100% rename from graphics/pokemon/mega_sableye/back.png rename to graphics/pokemon/sableye/mega/back.png diff --git a/graphics/pokemon/mega_sableye/front.png b/graphics/pokemon/sableye/mega/front.png similarity index 100% rename from graphics/pokemon/mega_sableye/front.png rename to graphics/pokemon/sableye/mega/front.png diff --git a/graphics/pokemon/mega_sableye/icon.png b/graphics/pokemon/sableye/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_sableye/icon.png rename to graphics/pokemon/sableye/mega/icon.png diff --git a/graphics/pokemon/mega_sableye/normal.pal b/graphics/pokemon/sableye/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_sableye/normal.pal rename to graphics/pokemon/sableye/mega/normal.pal diff --git a/graphics/pokemon/mega_sableye/shiny.pal b/graphics/pokemon/sableye/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_sableye/shiny.pal rename to graphics/pokemon/sableye/mega/shiny.pal diff --git a/graphics/pokemon/mega_salamence/back.png b/graphics/pokemon/salamence/mega/back.png similarity index 100% rename from graphics/pokemon/mega_salamence/back.png rename to graphics/pokemon/salamence/mega/back.png diff --git a/graphics/pokemon/mega_salamence/front.png b/graphics/pokemon/salamence/mega/front.png similarity index 100% rename from graphics/pokemon/mega_salamence/front.png rename to graphics/pokemon/salamence/mega/front.png diff --git a/graphics/pokemon/mega_salamence/icon.png b/graphics/pokemon/salamence/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_salamence/icon.png rename to graphics/pokemon/salamence/mega/icon.png diff --git a/graphics/pokemon/mega_salamence/normal.pal b/graphics/pokemon/salamence/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_salamence/normal.pal rename to graphics/pokemon/salamence/mega/normal.pal diff --git a/graphics/pokemon/mega_salamence/shiny.pal b/graphics/pokemon/salamence/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_salamence/shiny.pal rename to graphics/pokemon/salamence/mega/shiny.pal diff --git a/graphics/pokemon/alolan_sandshrew/back.png b/graphics/pokemon/sandshrew/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/back.png rename to graphics/pokemon/sandshrew/alolan/back.png diff --git a/graphics/pokemon/alolan_sandshrew/front.png b/graphics/pokemon/sandshrew/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/front.png rename to graphics/pokemon/sandshrew/alolan/front.png diff --git a/graphics/pokemon/alolan_sandshrew/icon.png b/graphics/pokemon/sandshrew/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/icon.png rename to graphics/pokemon/sandshrew/alolan/icon.png diff --git a/graphics/pokemon/alolan_sandshrew/normal.pal b/graphics/pokemon/sandshrew/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/normal.pal rename to graphics/pokemon/sandshrew/alolan/normal.pal diff --git a/graphics/pokemon/alolan_sandshrew/shiny.pal b/graphics/pokemon/sandshrew/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/shiny.pal rename to graphics/pokemon/sandshrew/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_sandslash/back.png b/graphics/pokemon/sandslash/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/back.png rename to graphics/pokemon/sandslash/alolan/back.png diff --git a/graphics/pokemon/alolan_sandslash/front.png b/graphics/pokemon/sandslash/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/front.png rename to graphics/pokemon/sandslash/alolan/front.png diff --git a/graphics/pokemon/alolan_sandslash/icon.png b/graphics/pokemon/sandslash/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/icon.png rename to graphics/pokemon/sandslash/alolan/icon.png diff --git a/graphics/pokemon/alolan_sandslash/normal.pal b/graphics/pokemon/sandslash/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/normal.pal rename to graphics/pokemon/sandslash/alolan/normal.pal diff --git a/graphics/pokemon/alolan_sandslash/shiny.pal b/graphics/pokemon/sandslash/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/shiny.pal rename to graphics/pokemon/sandslash/alolan/shiny.pal diff --git a/graphics/pokemon/mega_sceptile/back.png b/graphics/pokemon/sceptile/mega/back.png similarity index 100% rename from graphics/pokemon/mega_sceptile/back.png rename to graphics/pokemon/sceptile/mega/back.png diff --git a/graphics/pokemon/mega_sceptile/front.png b/graphics/pokemon/sceptile/mega/front.png similarity index 100% rename from graphics/pokemon/mega_sceptile/front.png rename to graphics/pokemon/sceptile/mega/front.png diff --git a/graphics/pokemon/mega_sceptile/icon.png b/graphics/pokemon/sceptile/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_sceptile/icon.png rename to graphics/pokemon/sceptile/mega/icon.png diff --git a/graphics/pokemon/mega_sceptile/normal.pal b/graphics/pokemon/sceptile/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_sceptile/normal.pal rename to graphics/pokemon/sceptile/mega/normal.pal diff --git a/graphics/pokemon/mega_sceptile/shiny.pal b/graphics/pokemon/sceptile/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_sceptile/shiny.pal rename to graphics/pokemon/sceptile/mega/shiny.pal diff --git a/graphics/pokemon/mega_scizor/back.png b/graphics/pokemon/scizor/mega/back.png similarity index 100% rename from graphics/pokemon/mega_scizor/back.png rename to graphics/pokemon/scizor/mega/back.png diff --git a/graphics/pokemon/mega_scizor/front.png b/graphics/pokemon/scizor/mega/front.png similarity index 100% rename from graphics/pokemon/mega_scizor/front.png rename to graphics/pokemon/scizor/mega/front.png diff --git a/graphics/pokemon/scizor/mega/icon.png b/graphics/pokemon/scizor/mega/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2ba3e8243933bf012e259cd9581ead7c0aed62e3 GIT binary patch literal 484 zcmVi+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vpblD%$&Fc5(633@`=gG3(yrAS@u zU)S|RZhf~Nyo=D;`Iu(53=!NZxTfg{ANOCwV0CH|4Mt4hXk|w*zY&(bJCw_J9yH1o z09!8s!U_boU+>C%TOQp1+)Ego6Gvf;m;ehyMLGc%hITO`?1hCHbzp;77@Kg?U=Xn| z(I_@(6ef=ey+OCa5Si;z7%*mFVe(NJFvZi2Fz`@N6oy7&cP0000R5*?8k}(RyFbqX~1Kpqn8@d`I zI(6_NN=^`PPS9k`p*(uXm7ExwQT5bFE_7nQ3Pm&x-*vgg=!|8;+Qm(C3TV_; zP)J`yUrasHZlP4T8Q(K7Okf(?x!}9pSj8gNR0P$xwS?B0000jnJ`WQ5f{#h&TI-U z-K`VC)yG}O76ba|>l@oK9Jf9?jy(oMo&}(_MOHvW$A1+HSXO-J7=kM;6Z%CM z4X1!XV+DoGTJ)1?i8Na%P27mD8E9H4E1J2W7ei$gx9n@$i0F@#>iKIZNT9X61T;-{ z8p?wGrvCrq-T$D0L@?L1$Y;RnmEfxWQE&^8u?N25u8Sln<8mdTK>1z1swa8%I`sSE9D*`j@E##E;v@9%*>@To(4he;Ydi5nr?)eOTBYC|Z&Df^2 zmwlH+em}oA?@99iuWA2x>}<)SgDrq*Z7Fd0(|-ia<`O{4<9-1Qe=|~b=(gK_nRmO5 zb--zvZ=Nau8-SAw0NumpYt<3#X1iSnz&vcW*8v>>kPD!y10u~K1;FkO*8ts42LPS4 zIvr&P)TMMlFM=)|4$tsfU_e@w;`(4M00k(f)ZYZ0Q8l2SP+Er$7m$}bAWf?+fR?g= zxr1B|1YKT01w^KIe^MMl-2niX#B?wq&(s|>(PX>3vxW04LS7KmzW{e;mee2!I}t zAAJP?1u%(ue@4eomH^x@3Z$g}vG^)FUOnXkKvyj2&)=2+Sq0E{1+aUSdh_x0GZ0q+ zbYsTgq{Qfil8~fwU^(tV)gjv44 zMA`1`^LMKqy!mvJuUx;|y*(Cyqw(Z^wU zx8%RRK*pB5x!Hywv$4_0K)$Wgt7SM#i?F5uX|^}o6z&j8z%W$9@B#&37_R3j4$FnV z<8uq*e>NJ8Q@OwhgrAxw+wCc?#? zg^6K~3lR{Ua$%MM18z60pq~?dqXJPjc^*VGd00gH=L_t(o!`+raZ{kK6hG)bdz@{?J?q1?VR#oNTFp+WF%Sr+9 z1GF^Im&!qNb}XS$Z&6NZPt{7R#^DbvLy^?oiG5b;baFe91H-c(cWO7oq&go#q8Q2 zvdQF<>;z)kV~n)pod7gogfVX)aLM#Q?Sip3Ot=PJoq!Q)t%06@wt-p4jsX0jXrKc^ z)4eE`pq~JMLn9W)w5gwfOp{XD4w3@U9fIk<zSvFd^17z>WX_31de5hC*P&afHqT zi;!d*MpfMkuUtB%JmQ>2+zzQHKh+iur*uSZ8gRp)fz9pIl%|+J-vSW6qft5?SwX_> z#MuV0doO?&0Qhi!8bLw=Q+kU5cn?#4pp@J=?kGqYainFMzx;V`!5Zx}y@K5a&G@7W zyuXD#hMc4nc1u|Nt?OxkQHseFJ{qhg1K53hc%~t>Jv;Hmc{f`QtpGFRPa}eC4%_r< z;?z880suAQA=9~n70MvZi_A~%AAT$z6jj)CU zEY}TEI{r}n6rXReat+{H?vGc0l>pra@OK4pbep=X$N489ssi}F(K^fKS@}y#+J{+m zXtbQwV>Ux;Kw5+VYAt7+J!Z=_ARRU?bT?nYgf#$fLFK_U-8{=S69AB(2zW2XpwBme z<;eF7_O;4?7NF0h=foAhGFbzPymMExNcq7VA3Cdcp`#0olZwh0C)<<&n_;{uR5K+ zE@R-~WCG3?&<-RBU4*cNB?_Gl`h8stDgXjHBnV{yY>Ip%8i;(r*qiDAe2k2fVbP$+ zVggkKT*Eo(l?|@j8vDks=|;Vx!F5mP|M(c3x6Mc+WQDHSHx}00j&0v4@`GyMrU1YZ z{bo;pA26)K+#_PeLRV81zA4NdjGK_QMu*!(g}L(}F)T5-pHefSpGPRU<1JhCTj;4VRK$P&rjFbk#yFKE=2#6qh04&o8;4|P2 z(oz9ylzJF^4?y0GZ)oK#8>6W3<}{!w=gpRX0+{5-JK>xOApuVyA1J`D!i?;c*l8_j zu;1J&AkG)crz91|tO5qyZa9K*PQ{J#W!n@wNTOER2LaS7`2fxlBvFrxS)q{11T)Xd znrBaiBJ#*~gR^W=7BD3sq z`u?2m2>IX7)`mFU+W=U3LxTNx{|H!Z38=B%KcK`yQ-!!*_ZD#;f4^M^ju-LTu>sf! zj?NMC{n~p|3wEtuuOeXkwfZ{HKtMS{Qw0jOjznO`oi!kCG!R&D+GrRn&{)d0JojVS z>70nQpbe)|ifVf;zywlA={*Hbq#0O8QdY6TImRDXpoCO%aB57zwkXelA7=?nAY|^* zyajUw1RNsSZo@Nke+9xA091qS9GEtNaTg#GBE$-9LjuY(fFx{7;g=r?TH-v5tH2hb z+Y6)BxE-Fk&;u1I1(9+>@bpt{L)e2RI1s2(2?9qs3Dc^u4}ApTcZiZ+(+;}I>GC3= z?qvpc5cs$oL01G!yTu4@u*z!y@rk?5pgR*>Ymie@>E|;k3c-{oX3L>En!{ z5((h6Vs`)1^$ehyP|?Gm@~ol*>JF}dLI{rMbp33xU8NDxQin4XpGnx|Dj zU@o+mf3N)3>4L%G5ygLFu8 zpf!;JtHN99ARXsG+iW_IyVD6)$N}Dhm4nONX__u8Aka?)-isE-M@wLH{d?hDlk^tj z(|qmVxzNu{E4@wA>G;8aQ9nLk6oHKsrqkt;rrXy$M_0uP?qoEa7S>nW*M}N77!1dS zwdK(ZA~Y~6#VGd00N;&L_t(Y$F0-PYTGav0B{MvK%#)_b~~xXjM0M|702u}=t3W0 z3pu+sAKA#w4LWCrAa)Bqbvup1Se?8;(;mFb4j~V<&xzYvsnWnYT@v&C{QZ$7^50i& zOPua+0j#kl!NL1y0@i+i0JQcrsI$;iA?|d%Rh-A~Hi5URc>ApZ*a(i#5%Pof2U81n zyVGeQUi>sZPbRyfD_;|i3JW(iJ>30RHt0{C%}zyv~n<{mFwFjqjpA(BY~ zJLU?6F#u=#Y3xFg{r0^S$1g&#k#8qGmF&u@_dfX1rTo{3h zl!8b(A$a!3F0Um)3b_Q^Rx;GEa4HVR80tC72iZ} zVV18_A#hSc{72w!^~X_41PCl2TAl%50s&DGv4m`BATJYtq|pDpe3c$myDR}6E5ASg zz5-AM^z{<#j#GC&ncahE9ni~0^Dvubt2b?J4z|qDX!7|ao01Y}O%%Xt@_shS@)Bs9 zO_y*iqL1;}1F*UNy>PC1c8l>v`Rw4i(9cXiyUnsi ze(%4kpIi+lfKO3m(bod2|>q{aVgtej$ET0ucUS*eg@00009 za7bBm000ie000ie0hKEb8vpzlCf@sFcd}o2T!ECBm4m%HCrMDRi#U} zO7RzVb0rwEVTt}qA=xS!64C`EyDs2hEOm_9J6>I$?|U4CZYNNV(Xtw;dS;~REww-4 zJkQ=OqvL#?TM4+t`zD)afPA8lD>l7!I?|Wjnn@D@yrq;rvvXxi1>u9BJ9aLHNVh2t zm-rZ`p}*_{8=l-njXX4j^afHa@t3RUJ`h7f_fClKdEV!KoPnSqS^>`z^R8TIBg|N2 zib_F;?x2lhHO>v2#MAAg5~ c`=@@_H%yM(aoz4bpa1{>07*qoM6N<$f;W4*hyVZp literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mega_slowbro/normal.pal b/graphics/pokemon/slowbro/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_slowbro/normal.pal rename to graphics/pokemon/slowbro/mega/normal.pal diff --git a/graphics/pokemon/mega_slowbro/shiny.pal b/graphics/pokemon/slowbro/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_slowbro/shiny.pal rename to graphics/pokemon/slowbro/mega/shiny.pal diff --git a/graphics/pokemon/mega_steelix/back.png b/graphics/pokemon/steelix/mega/back.png similarity index 100% rename from graphics/pokemon/mega_steelix/back.png rename to graphics/pokemon/steelix/mega/back.png diff --git a/graphics/pokemon/mega_steelix/front.png b/graphics/pokemon/steelix/mega/front.png similarity index 100% rename from graphics/pokemon/mega_steelix/front.png rename to graphics/pokemon/steelix/mega/front.png diff --git a/graphics/pokemon/mega_steelix/icon.png b/graphics/pokemon/steelix/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_steelix/icon.png rename to graphics/pokemon/steelix/mega/icon.png diff --git a/graphics/pokemon/mega_steelix/normal.pal b/graphics/pokemon/steelix/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_steelix/normal.pal rename to graphics/pokemon/steelix/mega/normal.pal diff --git a/graphics/pokemon/mega_steelix/shiny.pal b/graphics/pokemon/steelix/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_steelix/shiny.pal rename to graphics/pokemon/steelix/mega/shiny.pal diff --git a/graphics/pokemon/mega_swampert/back.png b/graphics/pokemon/swampert/mega/back.png similarity index 100% rename from graphics/pokemon/mega_swampert/back.png rename to graphics/pokemon/swampert/mega/back.png diff --git a/graphics/pokemon/mega_swampert/front.png b/graphics/pokemon/swampert/mega/front.png similarity index 100% rename from graphics/pokemon/mega_swampert/front.png rename to graphics/pokemon/swampert/mega/front.png diff --git a/graphics/pokemon/mega_swampert/icon.png b/graphics/pokemon/swampert/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_swampert/icon.png rename to graphics/pokemon/swampert/mega/icon.png diff --git a/graphics/pokemon/mega_swampert/normal.pal b/graphics/pokemon/swampert/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_swampert/normal.pal rename to graphics/pokemon/swampert/mega/normal.pal diff --git a/graphics/pokemon/mega_swampert/shiny.pal b/graphics/pokemon/swampert/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_swampert/shiny.pal rename to graphics/pokemon/swampert/mega/shiny.pal diff --git a/graphics/pokemon/mega_tyranitar/back.png b/graphics/pokemon/tyranitar/mega/back.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/back.png rename to graphics/pokemon/tyranitar/mega/back.png diff --git a/graphics/pokemon/mega_tyranitar/front.png b/graphics/pokemon/tyranitar/mega/front.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/front.png rename to graphics/pokemon/tyranitar/mega/front.png diff --git a/graphics/pokemon/mega_tyranitar/icon.png b/graphics/pokemon/tyranitar/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/icon.png rename to graphics/pokemon/tyranitar/mega/icon.png diff --git a/graphics/pokemon/mega_tyranitar/normal.pal b/graphics/pokemon/tyranitar/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_tyranitar/normal.pal rename to graphics/pokemon/tyranitar/mega/normal.pal diff --git a/graphics/pokemon/mega_tyranitar/shiny.pal b/graphics/pokemon/tyranitar/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_tyranitar/shiny.pal rename to graphics/pokemon/tyranitar/mega/shiny.pal diff --git a/graphics/pokemon/mega_venusaur/back.png b/graphics/pokemon/venusaur/mega/back.png similarity index 100% rename from graphics/pokemon/mega_venusaur/back.png rename to graphics/pokemon/venusaur/mega/back.png diff --git a/graphics/pokemon/mega_venusaur/front.png b/graphics/pokemon/venusaur/mega/front.png similarity index 100% rename from graphics/pokemon/mega_venusaur/front.png rename to graphics/pokemon/venusaur/mega/front.png diff --git a/graphics/pokemon/mega_venusaur/icon.png b/graphics/pokemon/venusaur/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_venusaur/icon.png rename to graphics/pokemon/venusaur/mega/icon.png diff --git a/graphics/pokemon/mega_venusaur/normal.pal b/graphics/pokemon/venusaur/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_venusaur/normal.pal rename to graphics/pokemon/venusaur/mega/normal.pal diff --git a/graphics/pokemon/mega_venusaur/shiny.pal b/graphics/pokemon/venusaur/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_venusaur/shiny.pal rename to graphics/pokemon/venusaur/mega/shiny.pal diff --git a/graphics/pokemon/alolan_vulpix/back.png b/graphics/pokemon/vulpix/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/back.png rename to graphics/pokemon/vulpix/alolan/back.png diff --git a/graphics/pokemon/alolan_vulpix/front.png b/graphics/pokemon/vulpix/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/front.png rename to graphics/pokemon/vulpix/alolan/front.png diff --git a/graphics/pokemon/alolan_vulpix/icon.png b/graphics/pokemon/vulpix/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/icon.png rename to graphics/pokemon/vulpix/alolan/icon.png diff --git a/graphics/pokemon/alolan_vulpix/normal.pal b/graphics/pokemon/vulpix/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/normal.pal rename to graphics/pokemon/vulpix/alolan/normal.pal diff --git a/graphics/pokemon/alolan_vulpix/shiny.pal b/graphics/pokemon/vulpix/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/shiny.pal rename to graphics/pokemon/vulpix/alolan/shiny.pal diff --git a/graphics/pokemon/zapdos/galarian/icon.png b/graphics/pokemon/zapdos/galarian/icon.png index df9bb29b5c9bf39840be1d49bcf4da2546510abd..2d9f031ffdfc6a23c70d0cb71afc081d6eecd21c 100644 GIT binary patch delta 411 zcmV;M0c8Hx0=ff`DSu*|gM))}y}iBv|Np(DLH713)nY;RlqrjQ|6)qb?sJ^~w4|iP z|7xt9Vq#iBK|xumkYoS=010qNS#tmY4#WTe4#WYKD-Ig~00A&bL_t(Ijop$llEWYj zMY(~-7qD-Z(sWK2b>gfk0-eA`Oovw3B*8hr?#$8vZ@xd^|9_47y8)@6bmSzu2A!G! z#VW`_ToaJh6>NytCO~9?I>p^3BL#F&vXUJXd<06s5%Dku|KvFWdp<18I;zJ~*b?tw zz%W@)bFu2QgLO(dZg#HDyI@LsXFW44T(8$2Pyt(X@8{)kTgXRwgKhIm2p@qF81JL& zfZlh#C+YSQVShUPGfr{>Pk|xzK+?0EfTG72Fk=44XqmpB2M(lfkjZXyeS-i!CipZ+ z8-o<37AC%8WbH~V%n?5Xy5LcmW?HTnUkk&rc@6=|>;4t~I&5Ua%*{as0whQ`_J?AX z8a@*FCfS{}Fo75OWTk~+!Y(_3QbO*-to?uv{B}Qn02EDG>i%w~x<&v1002ovPDHLk FV1i3cyK?{l delta 310 zcmV-60m=Tl1J(kNDSu#?fPjE-xVX6Z`1rV>K=AM=&|pCDkSK_F_+UuL=x~_$u%Mv8 z_-Lq@U|?84KtSkZbJ+j@0O3hQK~#90)sj87gdhw?vxDq#?6kwqbYZv91*)MV6Gc?s z2IdU~KbJ2#aLxtz;?Q9MK#%)gJ>~|Ae|y91O9M!OY^Mut4Sy6OPB}+gv;|0ra#zA4P* z$0^L^M;9h`KQFp4uKRHb)BWheY@;70%;?AJ+~5ah{bzoB0NMifL8D7gi2wiq07*qo IM6N<$f&)8}-~a#s diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 05332ea459..e53f6e7f49 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -912,74 +912,74 @@ const u32 gMonFrontPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/fron const u32 gMonFrontPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/front.4bpp.lz"); const u32 gMonFrontPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/front.4bpp.lz"); const u32 gMonFrontPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/front.4bpp.lz"); -const u32 gMonFrontPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/front.4bpp.lz"); -const u32 gMonFrontPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/front.4bpp.lz"); -const u32 gMonFrontPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/front.4bpp.lz"); -const u32 gMonFrontPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/front.4bpp.lz"); -const u32 gMonFrontPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/front.4bpp.lz"); -const u32 gMonFrontPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/front.4bpp.lz"); -const u32 gMonFrontPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/front.4bpp.lz"); -const u32 gMonFrontPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/front.4bpp.lz"); -const u32 gMonFrontPic_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/front.4bpp.lz"); -const u32 gMonFrontPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/front.4bpp.lz"); -const u32 gMonFrontPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/front.4bpp.lz"); -const u32 gMonFrontPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/front.4bpp.lz"); -const u32 gMonFrontPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/front.4bpp.lz"); -const u32 gMonFrontPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/front.4bpp.lz"); -const u32 gMonFrontPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/front.4bpp.lz"); -const u32 gMonFrontPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/front.4bpp.lz"); -const u32 gMonFrontPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/front.4bpp.lz"); -const u32 gMonFrontPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/front.4bpp.lz"); -const u32 gMonFrontPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/front.4bpp.lz"); -const u32 gMonFrontPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/front.4bpp.lz"); -const u32 gMonFrontPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/front.4bpp.lz"); -const u32 gMonFrontPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/front.4bpp.lz"); -const u32 gMonFrontPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/front.4bpp.lz"); -const u32 gMonFrontPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/front.4bpp.lz"); -const u32 gMonFrontPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/front.4bpp.lz"); -const u32 gMonFrontPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/front.4bpp.lz"); -const u32 gMonFrontPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/front.4bpp.lz"); -const u32 gMonFrontPic_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/front.4bpp.lz"); -const u32 gMonFrontPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/front.4bpp.lz"); -const u32 gMonFrontPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/front.4bpp.lz"); -const u32 gMonFrontPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/front.4bpp.lz"); -const u32 gMonFrontPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/front.4bpp.lz"); -const u32 gMonFrontPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/front.4bpp.lz"); -const u32 gMonFrontPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/front.4bpp.lz"); -const u32 gMonFrontPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/front.4bpp.lz"); -const u32 gMonFrontPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/front.4bpp.lz"); -const u32 gMonFrontPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/front.4bpp.lz"); -const u32 gMonFrontPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/front.4bpp.lz"); -const u32 gMonFrontPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/front.4bpp.lz"); -const u32 gMonFrontPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/front.4bpp.lz"); -const u32 gMonFrontPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/front.4bpp.lz"); -const u32 gMonFrontPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/front.4bpp.lz"); -const u32 gMonFrontPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/front.4bpp.lz"); -const u32 gMonFrontPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/front.4bpp.lz"); -const u32 gMonFrontPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/front.4bpp.lz"); -const u32 gMonFrontPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/front.4bpp.lz"); -const u32 gMonFrontPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/front.4bpp.lz"); -const u32 gMonFrontPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/front.4bpp.lz"); -const u32 gMonFrontPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/front.4bpp.lz"); -const u32 gMonFrontPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/front.4bpp.lz"); -const u32 gMonFrontPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/front.4bpp.lz"); -const u32 gMonFrontPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/front.4bpp.lz"); -const u32 gMonFrontPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/front.4bpp.lz"); -const u32 gMonFrontPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/front.4bpp.lz"); -const u32 gMonFrontPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/front.4bpp.lz"); -const u32 gMonFrontPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/front.4bpp.lz"); -const u32 gMonFrontPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/front.4bpp.lz"); -const u32 gMonFrontPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/front.4bpp.lz"); -const u32 gMonFrontPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/front.4bpp.lz"); -const u32 gMonFrontPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/front.4bpp.lz"); -const u32 gMonFrontPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/front.4bpp.lz"); -const u32 gMonFrontPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/front.4bpp.lz"); -const u32 gMonFrontPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/front.4bpp.lz"); -const u32 gMonFrontPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/front.4bpp.lz"); -const u32 gMonFrontPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/front.4bpp.lz"); -const u32 gMonFrontPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/front.4bpp.lz"); -const u32 gMonFrontPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/front.4bpp.lz"); -const u32 gMonFrontPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/front.4bpp.lz"); +const u32 gMonFrontPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/front.4bpp.lz"); +const u32 gMonFrontPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/front.4bpp.lz"); +const u32 gMonFrontPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/front.4bpp.lz"); +const u32 gMonFrontPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/front.4bpp.lz"); +const u32 gMonFrontPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/front.4bpp.lz"); +const u32 gMonFrontPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/front.4bpp.lz"); +const u32 gMonFrontPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/front.4bpp.lz"); +const u32 gMonFrontPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/front.4bpp.lz"); +const u32 gMonFrontPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/front.4bpp.lz"); +const u32 gMonFrontPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/front.4bpp.lz"); +const u32 gMonFrontPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/front.4bpp.lz"); +const u32 gMonFrontPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/front.4bpp.lz"); +const u32 gMonFrontPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/front.4bpp.lz"); +const u32 gMonFrontPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/front.4bpp.lz"); +const u32 gMonFrontPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/front.4bpp.lz"); +const u32 gMonFrontPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/front.4bpp.lz"); +const u32 gMonFrontPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/front.4bpp.lz"); +const u32 gMonFrontPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/front.4bpp.lz"); +const u32 gMonFrontPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/front.4bpp.lz"); +const u32 gMonFrontPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/front.4bpp.lz"); const u32 gMonFrontPic_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/front.4bpp.lz"); const u32 gMonFrontPic_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/front.4bpp.lz"); const u32 gMonFrontPic_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/front.4bpp.lz"); @@ -2064,74 +2064,74 @@ const u32 gMonBackPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/back. const u32 gMonBackPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/back.4bpp.lz"); const u32 gMonBackPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/back.4bpp.lz"); const u32 gMonBackPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/back.4bpp.lz"); -const u32 gMonBackPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/back.4bpp.lz"); -const u32 gMonBackPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/back.4bpp.lz"); -const u32 gMonBackPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/back.4bpp.lz"); -const u32 gMonBackPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/back.4bpp.lz"); -const u32 gMonBackPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/back.4bpp.lz"); -const u32 gMonBackPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/back.4bpp.lz"); -const u32 gMonBackPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/back.4bpp.lz"); -const u32 gMonBackPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/back.4bpp.lz"); -const u32 gMonBackPic_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/back.4bpp.lz"); -const u32 gMonBackPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/back.4bpp.lz"); -const u32 gMonBackPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/back.4bpp.lz"); -const u32 gMonBackPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/back.4bpp.lz"); -const u32 gMonBackPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/back.4bpp.lz"); -const u32 gMonBackPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/back.4bpp.lz"); -const u32 gMonBackPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/back.4bpp.lz"); -const u32 gMonBackPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/back.4bpp.lz"); -const u32 gMonBackPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/back.4bpp.lz"); -const u32 gMonBackPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/back.4bpp.lz"); -const u32 gMonBackPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/back.4bpp.lz"); -const u32 gMonBackPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/back.4bpp.lz"); -const u32 gMonBackPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/back.4bpp.lz"); -const u32 gMonBackPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/back.4bpp.lz"); -const u32 gMonBackPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/back.4bpp.lz"); -const u32 gMonBackPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/back.4bpp.lz"); -const u32 gMonBackPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/back.4bpp.lz"); -const u32 gMonBackPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/back.4bpp.lz"); -const u32 gMonBackPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/back.4bpp.lz"); -const u32 gMonBackPic_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/back.4bpp.lz"); -const u32 gMonBackPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/back.4bpp.lz"); -const u32 gMonBackPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/back.4bpp.lz"); -const u32 gMonBackPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/back.4bpp.lz"); -const u32 gMonBackPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/back.4bpp.lz"); -const u32 gMonBackPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/back.4bpp.lz"); -const u32 gMonBackPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/back.4bpp.lz"); -const u32 gMonBackPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/back.4bpp.lz"); -const u32 gMonBackPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/back.4bpp.lz"); -const u32 gMonBackPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/back.4bpp.lz"); -const u32 gMonBackPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/back.4bpp.lz"); -const u32 gMonBackPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/back.4bpp.lz"); -const u32 gMonBackPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/back.4bpp.lz"); -const u32 gMonBackPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/back.4bpp.lz"); -const u32 gMonBackPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/back.4bpp.lz"); -const u32 gMonBackPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/back.4bpp.lz"); -const u32 gMonBackPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/back.4bpp.lz"); -const u32 gMonBackPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/back.4bpp.lz"); -const u32 gMonBackPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/back.4bpp.lz"); -const u32 gMonBackPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/back.4bpp.lz"); -const u32 gMonBackPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/back.4bpp.lz"); -const u32 gMonBackPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/back.4bpp.lz"); -const u32 gMonBackPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/back.4bpp.lz"); -const u32 gMonBackPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/back.4bpp.lz"); -const u32 gMonBackPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/back.4bpp.lz"); -const u32 gMonBackPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/back.4bpp.lz"); -const u32 gMonBackPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/back.4bpp.lz"); -const u32 gMonBackPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/back.4bpp.lz"); -const u32 gMonBackPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/back.4bpp.lz"); -const u32 gMonBackPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/back.4bpp.lz"); -const u32 gMonBackPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/back.4bpp.lz"); -const u32 gMonBackPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/back.4bpp.lz"); -const u32 gMonBackPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/back.4bpp.lz"); -const u32 gMonBackPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/back.4bpp.lz"); -const u32 gMonBackPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/back.4bpp.lz"); -const u32 gMonBackPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/back.4bpp.lz"); -const u32 gMonBackPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/back.4bpp.lz"); -const u32 gMonBackPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/back.4bpp.lz"); -const u32 gMonBackPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/back.4bpp.lz"); -const u32 gMonBackPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/back.4bpp.lz"); -const u32 gMonBackPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/back.4bpp.lz"); +const u32 gMonBackPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/back.4bpp.lz"); +const u32 gMonBackPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/back.4bpp.lz"); +const u32 gMonBackPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/back.4bpp.lz"); +const u32 gMonBackPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/back.4bpp.lz"); +const u32 gMonBackPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/back.4bpp.lz"); +const u32 gMonBackPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/back.4bpp.lz"); +const u32 gMonBackPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/back.4bpp.lz"); +const u32 gMonBackPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/back.4bpp.lz"); +const u32 gMonBackPic_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/back.4bpp.lz"); +const u32 gMonBackPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/back.4bpp.lz"); +const u32 gMonBackPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/back.4bpp.lz"); +const u32 gMonBackPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/back.4bpp.lz"); +const u32 gMonBackPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/back.4bpp.lz"); +const u32 gMonBackPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/back.4bpp.lz"); +const u32 gMonBackPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/back.4bpp.lz"); +const u32 gMonBackPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/back.4bpp.lz"); +const u32 gMonBackPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/back.4bpp.lz"); +const u32 gMonBackPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/back.4bpp.lz"); +const u32 gMonBackPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/back.4bpp.lz"); +const u32 gMonBackPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/back.4bpp.lz"); +const u32 gMonBackPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/back.4bpp.lz"); +const u32 gMonBackPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/back.4bpp.lz"); +const u32 gMonBackPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/back.4bpp.lz"); +const u32 gMonBackPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/back.4bpp.lz"); +const u32 gMonBackPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/back.4bpp.lz"); +const u32 gMonBackPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/back.4bpp.lz"); +const u32 gMonBackPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/back.4bpp.lz"); +const u32 gMonBackPic_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/back.4bpp.lz"); +const u32 gMonBackPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/back.4bpp.lz"); +const u32 gMonBackPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/back.4bpp.lz"); +const u32 gMonBackPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/back.4bpp.lz"); +const u32 gMonBackPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/back.4bpp.lz"); +const u32 gMonBackPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/back.4bpp.lz"); +const u32 gMonBackPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/back.4bpp.lz"); +const u32 gMonBackPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/back.4bpp.lz"); +const u32 gMonBackPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/back.4bpp.lz"); +const u32 gMonBackPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/back.4bpp.lz"); +const u32 gMonBackPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/back.4bpp.lz"); +const u32 gMonBackPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/back.4bpp.lz"); +const u32 gMonBackPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/back.4bpp.lz"); +const u32 gMonBackPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/back.4bpp.lz"); +const u32 gMonBackPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/back.4bpp.lz"); +const u32 gMonBackPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/back.4bpp.lz"); +const u32 gMonBackPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/back.4bpp.lz"); +const u32 gMonBackPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/back.4bpp.lz"); +const u32 gMonBackPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/back.4bpp.lz"); +const u32 gMonBackPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/back.4bpp.lz"); +const u32 gMonBackPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/back.4bpp.lz"); +const u32 gMonBackPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/back.4bpp.lz"); +const u32 gMonBackPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/back.4bpp.lz"); +const u32 gMonBackPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/back.4bpp.lz"); +const u32 gMonBackPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/back.4bpp.lz"); +const u32 gMonBackPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/back.4bpp.lz"); +const u32 gMonBackPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/back.4bpp.lz"); +const u32 gMonBackPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/back.4bpp.lz"); +const u32 gMonBackPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/back.4bpp.lz"); +const u32 gMonBackPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/back.4bpp.lz"); +const u32 gMonBackPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/back.4bpp.lz"); +const u32 gMonBackPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/back.4bpp.lz"); +const u32 gMonBackPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/back.4bpp.lz"); +const u32 gMonBackPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/back.4bpp.lz"); const u32 gMonBackPic_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/back.4bpp.lz"); const u32 gMonBackPic_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/back.4bpp.lz"); const u32 gMonBackPic_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/back.4bpp.lz"); @@ -3208,74 +3208,74 @@ const u32 gMonPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/norma const u32 gMonPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/normal.gbapal.lz"); const u32 gMonPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/normal.gbapal.lz"); const u32 gMonPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/normal.gbapal.lz"); -const u32 gMonPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/normal.gbapal.lz"); -const u32 gMonPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/normal.gbapal.lz"); -const u32 gMonPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/normal.gbapal.lz"); -const u32 gMonPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/normal.gbapal.lz"); -const u32 gMonPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/normal.gbapal.lz"); -const u32 gMonPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/normal.gbapal.lz"); -const u32 gMonPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/normal.gbapal.lz"); -const u32 gMonPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/normal.gbapal.lz"); -const u32 gMonPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/normal.gbapal.lz"); -const u32 gMonPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/normal.gbapal.lz"); -const u32 gMonPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/normal.gbapal.lz"); -const u32 gMonPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/normal.gbapal.lz"); -const u32 gMonPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/normal.gbapal.lz"); -const u32 gMonPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/normal.gbapal.lz"); -const u32 gMonPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/normal.gbapal.lz"); -const u32 gMonPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/normal.gbapal.lz"); -const u32 gMonPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/normal.gbapal.lz"); -const u32 gMonPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/normal.gbapal.lz"); -const u32 gMonPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/normal.gbapal.lz"); -const u32 gMonPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/normal.gbapal.lz"); -const u32 gMonPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/normal.gbapal.lz"); -const u32 gMonPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/normal.gbapal.lz"); -const u32 gMonPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/normal.gbapal.lz"); -const u32 gMonPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/normal.gbapal.lz"); -const u32 gMonPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/normal.gbapal.lz"); -const u32 gMonPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/normal.gbapal.lz"); -const u32 gMonPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/normal.gbapal.lz"); -const u32 gMonPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/normal.gbapal.lz"); -const u32 gMonPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/normal.gbapal.lz"); -const u32 gMonPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/normal.gbapal.lz"); -const u32 gMonPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/normal.gbapal.lz"); -const u32 gMonPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/normal.gbapal.lz"); -const u32 gMonPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/normal.gbapal.lz"); -const u32 gMonPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/normal.gbapal.lz"); -const u32 gMonPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/normal.gbapal.lz"); -const u32 gMonPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/normal.gbapal.lz"); -const u32 gMonPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/normal.gbapal.lz"); -const u32 gMonPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/normal.gbapal.lz"); -const u32 gMonPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/normal.gbapal.lz"); -const u32 gMonPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/normal.gbapal.lz"); -const u32 gMonPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/normal.gbapal.lz"); -const u32 gMonPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/normal.gbapal.lz"); -const u32 gMonPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/normal.gbapal.lz"); -const u32 gMonPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/normal.gbapal.lz"); -const u32 gMonPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/normal.gbapal.lz"); -const u32 gMonPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/normal.gbapal.lz"); -const u32 gMonPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/normal.gbapal.lz"); -const u32 gMonPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/normal.gbapal.lz"); -const u32 gMonPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/normal.gbapal.lz"); -const u32 gMonPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/normal.gbapal.lz"); -const u32 gMonPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/normal.gbapal.lz"); -const u32 gMonPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/normal.gbapal.lz"); -const u32 gMonPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/normal.gbapal.lz"); -const u32 gMonPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/normal.gbapal.lz"); -const u32 gMonPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/normal.gbapal.lz"); -const u32 gMonPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/normal.gbapal.lz"); -const u32 gMonPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/normal.gbapal.lz"); -const u32 gMonPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/normal.gbapal.lz"); -const u32 gMonPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/normal.gbapal.lz"); -const u32 gMonPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/normal.gbapal.lz"); -const u32 gMonPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/normal.gbapal.lz"); -const u32 gMonPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/normal.gbapal.lz"); -const u32 gMonPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/normal.gbapal.lz"); -const u32 gMonPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/normal.gbapal.lz"); -const u32 gMonPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/normal.gbapal.lz"); -const u32 gMonPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/normal.gbapal.lz"); -const u32 gMonPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/normal.gbapal.lz"); -const u32 gMonPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/normal.gbapal.lz"); +const u32 gMonPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/normal.gbapal.lz"); +const u32 gMonPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/normal.gbapal.lz"); +const u32 gMonPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/normal.gbapal.lz"); +const u32 gMonPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/normal.gbapal.lz"); +const u32 gMonPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/normal.gbapal.lz"); +const u32 gMonPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/normal.gbapal.lz"); +const u32 gMonPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/normal.gbapal.lz"); +const u32 gMonPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/normal.gbapal.lz"); +const u32 gMonPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/normal.gbapal.lz"); +const u32 gMonPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/normal.gbapal.lz"); +const u32 gMonPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/normal.gbapal.lz"); +const u32 gMonPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/normal.gbapal.lz"); +const u32 gMonPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/normal.gbapal.lz"); +const u32 gMonPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/normal.gbapal.lz"); +const u32 gMonPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/normal.gbapal.lz"); +const u32 gMonPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/normal.gbapal.lz"); +const u32 gMonPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/normal.gbapal.lz"); +const u32 gMonPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/normal.gbapal.lz"); +const u32 gMonPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/normal.gbapal.lz"); +const u32 gMonPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/normal.gbapal.lz"); +const u32 gMonPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/normal.gbapal.lz"); +const u32 gMonPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/normal.gbapal.lz"); +const u32 gMonPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/normal.gbapal.lz"); +const u32 gMonPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/normal.gbapal.lz"); +const u32 gMonPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/normal.gbapal.lz"); +const u32 gMonPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/normal.gbapal.lz"); +const u32 gMonPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/normal.gbapal.lz"); +const u32 gMonPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/normal.gbapal.lz"); +const u32 gMonPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/normal.gbapal.lz"); +const u32 gMonPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/normal.gbapal.lz"); +const u32 gMonPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/normal.gbapal.lz"); +const u32 gMonPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/normal.gbapal.lz"); +const u32 gMonPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/normal.gbapal.lz"); +const u32 gMonPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/normal.gbapal.lz"); +const u32 gMonPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/normal.gbapal.lz"); +const u32 gMonPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/normal.gbapal.lz"); +const u32 gMonPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/normal.gbapal.lz"); +const u32 gMonPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/normal.gbapal.lz"); +const u32 gMonPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/normal.gbapal.lz"); +const u32 gMonPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/normal.gbapal.lz"); +const u32 gMonPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/normal.gbapal.lz"); +const u32 gMonPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/normal.gbapal.lz"); +const u32 gMonPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/normal.gbapal.lz"); +const u32 gMonPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/normal.gbapal.lz"); +const u32 gMonPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/normal.gbapal.lz"); +const u32 gMonPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/normal.gbapal.lz"); +const u32 gMonPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/normal.gbapal.lz"); +const u32 gMonPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/normal.gbapal.lz"); +const u32 gMonPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/normal.gbapal.lz"); +const u32 gMonPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/normal.gbapal.lz"); +const u32 gMonPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/normal.gbapal.lz"); +const u32 gMonPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/normal.gbapal.lz"); +const u32 gMonPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/normal.gbapal.lz"); +const u32 gMonPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/normal.gbapal.lz"); +const u32 gMonPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/normal.gbapal.lz"); +const u32 gMonPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/normal.gbapal.lz"); +const u32 gMonPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/normal.gbapal.lz"); +const u32 gMonPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/normal.gbapal.lz"); +const u32 gMonPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/normal.gbapal.lz"); +const u32 gMonPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/normal.gbapal.lz"); +const u32 gMonPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/normal.gbapal.lz"); const u32 gMonPalette_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/normal.gbapal.lz"); const u32 gMonPalette_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/normal.gbapal.lz"); const u32 gMonPalette_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/normal.gbapal.lz"); @@ -4379,74 +4379,74 @@ const u32 gMonShinyPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/ const u32 gMonShinyPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/shiny.gbapal.lz"); -const u32 gMonShinyPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/shiny.gbapal.lz"); -const u32 gMonShinyPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/shiny.gbapal.lz"); -const u32 gMonShinyPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/shiny.gbapal.lz"); -const u32 gMonShinyPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/shiny.gbapal.lz"); -const u32 gMonShinyPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/shiny.gbapal.lz"); -const u32 gMonShinyPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/shiny.gbapal.lz"); -const u32 gMonShinyPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/shiny.gbapal.lz"); -const u32 gMonShinyPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/shiny.gbapal.lz"); +const u32 gMonShinyPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/shiny.gbapal.lz"); const u32 gMonShinyPalette_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/shiny.gbapal.lz"); const u32 gMonShinyPalette_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/shiny.gbapal.lz"); const u32 gMonShinyPalette_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/shiny.gbapal.lz"); @@ -5540,74 +5540,74 @@ const u8 gMonIcon_Regidrago[] = INCBIN_U8("graphics/pokemon/regidrago/icon.4bpp" const u8 gMonIcon_Glastrier[] = INCBIN_U8("graphics/pokemon/glastrier/icon.4bpp"); const u8 gMonIcon_Spectrier[] = INCBIN_U8("graphics/pokemon/spectrier/icon.4bpp"); //const u8 gMonIcon_Calyrex[] = INCBIN_U8("graphics/pokemon/calyrex/icon.4bpp"); -const u8 gMonIcon_VenusaurMega[] = INCBIN_U8("graphics/pokemon/mega_venusaur/icon.4bpp"); -const u8 gMonIcon_CharizardMegaX[] = INCBIN_U8("graphics/pokemon/mega_charizard_x/icon.4bpp"); -const u8 gMonIcon_CharizardMegaY[] = INCBIN_U8("graphics/pokemon/mega_charizard_y/icon.4bpp"); -const u8 gMonIcon_BlastoiseMega[] = INCBIN_U8("graphics/pokemon/mega_blastoise/icon.4bpp"); -const u8 gMonIcon_BeedrillMega[] = INCBIN_U8("graphics/pokemon/mega_beedrill/icon.4bpp"); -const u8 gMonIcon_PidgeotMega[] = INCBIN_U8("graphics/pokemon/mega_pidgeot/icon.4bpp"); -const u8 gMonIcon_AlakazamMega[] = INCBIN_U8("graphics/pokemon/mega_alakazam/icon.4bpp"); -const u8 gMonIcon_SlowbroMega[] = INCBIN_U8("graphics/pokemon/mega_slowbro/icon.4bpp"); -const u8 gMonIcon_GengarMega[] = INCBIN_U8("graphics/pokemon/mega_gengar/icon.4bpp"); -const u8 gMonIcon_KangaskhanMega[] = INCBIN_U8("graphics/pokemon/mega_kangaskhan/icon.4bpp"); -const u8 gMonIcon_PinsirMega[] = INCBIN_U8("graphics/pokemon/mega_pinsir/icon.4bpp"); -const u8 gMonIcon_GyaradosMega[] = INCBIN_U8("graphics/pokemon/mega_gyarados/icon.4bpp"); -const u8 gMonIcon_AerodactylMega[] = INCBIN_U8("graphics/pokemon/mega_aerodactyl/icon.4bpp"); -const u8 gMonIcon_MewtwoMegaX[] = INCBIN_U8("graphics/pokemon/mega_mewtwo_x/icon.4bpp"); -const u8 gMonIcon_MewtwoMegaY[] = INCBIN_U8("graphics/pokemon/mega_mewtwo_y/icon.4bpp"); -const u8 gMonIcon_AmpharosMega[] = INCBIN_U8("graphics/pokemon/mega_ampharos/icon.4bpp"); -const u8 gMonIcon_SteelixMega[] = INCBIN_U8("graphics/pokemon/mega_steelix/icon.4bpp"); -const u8 gMonIcon_ScizorMega[] = INCBIN_U8("graphics/pokemon/mega_scizor/icon.4bpp"); -const u8 gMonIcon_HeracrossMega[] = INCBIN_U8("graphics/pokemon/mega_heracross/icon.4bpp"); -const u8 gMonIcon_HoundoomMega[] = INCBIN_U8("graphics/pokemon/mega_houndoom/icon.4bpp"); -const u8 gMonIcon_TyranitarMega[] = INCBIN_U8("graphics/pokemon/mega_tyranitar/icon.4bpp"); -const u8 gMonIcon_SceptileMega[] = INCBIN_U8("graphics/pokemon/mega_sceptile/icon.4bpp"); -const u8 gMonIcon_BlazikenMega[] = INCBIN_U8("graphics/pokemon/mega_blaziken/icon.4bpp"); -const u8 gMonIcon_SwampertMega[] = INCBIN_U8("graphics/pokemon/mega_swampert/icon.4bpp"); -const u8 gMonIcon_GardevoirMega[] = INCBIN_U8("graphics/pokemon/mega_gardevoir/icon.4bpp"); -const u8 gMonIcon_SableyeMega[] = INCBIN_U8("graphics/pokemon/mega_sableye/icon.4bpp"); -const u8 gMonIcon_MawileMega[] = INCBIN_U8("graphics/pokemon/mega_mawile/icon.4bpp"); -const u8 gMonIcon_AggronMega[] = INCBIN_U8("graphics/pokemon/mega_aggron/icon.4bpp"); -const u8 gMonIcon_MedichamMega[] = INCBIN_U8("graphics/pokemon/mega_medicham/icon.4bpp"); -const u8 gMonIcon_ManectricMega[] = INCBIN_U8("graphics/pokemon/mega_manectric/icon.4bpp"); -const u8 gMonIcon_SharpedoMega[] = INCBIN_U8("graphics/pokemon/mega_sharpedo/icon.4bpp"); -const u8 gMonIcon_CameruptMega[] = INCBIN_U8("graphics/pokemon/mega_camerupt/icon.4bpp"); -const u8 gMonIcon_AltariaMega[] = INCBIN_U8("graphics/pokemon/mega_altaria/icon.4bpp"); -const u8 gMonIcon_BanetteMega[] = INCBIN_U8("graphics/pokemon/mega_banette/icon.4bpp"); -const u8 gMonIcon_AbsolMega[] = INCBIN_U8("graphics/pokemon/mega_absol/icon.4bpp"); -const u8 gMonIcon_GlalieMega[] = INCBIN_U8("graphics/pokemon/mega_glalie/icon.4bpp"); -const u8 gMonIcon_SalamenceMega[] = INCBIN_U8("graphics/pokemon/mega_salamence/icon.4bpp"); -const u8 gMonIcon_MetagrossMega[] = INCBIN_U8("graphics/pokemon/mega_metagross/icon.4bpp"); -const u8 gMonIcon_LatiasMega[] = INCBIN_U8("graphics/pokemon/mega_latias/icon.4bpp"); -const u8 gMonIcon_LatiosMega[] = INCBIN_U8("graphics/pokemon/mega_latios/icon.4bpp"); -const u8 gMonIcon_LopunnyMega[] = INCBIN_U8("graphics/pokemon/mega_lopunny/icon.4bpp"); -const u8 gMonIcon_GarchompMega[] = INCBIN_U8("graphics/pokemon/mega_garchomp/icon.4bpp"); -const u8 gMonIcon_LucarioMega[] = INCBIN_U8("graphics/pokemon/mega_lucario/icon.4bpp"); -const u8 gMonIcon_AbomasnowMega[] = INCBIN_U8("graphics/pokemon/mega_abomasnow/icon.4bpp"); -const u8 gMonIcon_GalladeMega[] = INCBIN_U8("graphics/pokemon/mega_gallade/icon.4bpp"); -const u8 gMonIcon_AudinoMega[] = INCBIN_U8("graphics/pokemon/mega_audino/icon.4bpp"); -const u8 gMonIcon_DiancieMega[] = INCBIN_U8("graphics/pokemon/mega_diancie/icon.4bpp"); -const u8 gMonIcon_RayquazaMega[] = INCBIN_U8("graphics/pokemon/mega_rayquaza/icon.4bpp"); -const u8 gMonIcon_KyogrePrimal[] = INCBIN_U8("graphics/pokemon/primal_kyogre/icon.4bpp"); -const u8 gMonIcon_GroudonPrimal[] = INCBIN_U8("graphics/pokemon/primal_groudon/icon.4bpp"); -const u8 gMonIcon_RattataAlolan[] = INCBIN_U8("graphics/pokemon/alolan_rattata/icon.4bpp"); -const u8 gMonIcon_RaticateAlolan[] = INCBIN_U8("graphics/pokemon/alolan_raticate/icon.4bpp"); -const u8 gMonIcon_RaichuAlolan[] = INCBIN_U8("graphics/pokemon/alolan_raichu/icon.4bpp"); -const u8 gMonIcon_SandshrewAlolan[] = INCBIN_U8("graphics/pokemon/alolan_sandshrew/icon.4bpp"); -const u8 gMonIcon_SandslashAlolan[] = INCBIN_U8("graphics/pokemon/alolan_sandslash/icon.4bpp"); -const u8 gMonIcon_VulpixAlolan[] = INCBIN_U8("graphics/pokemon/alolan_vulpix/icon.4bpp"); -const u8 gMonIcon_NinetalesAlolan[] = INCBIN_U8("graphics/pokemon/alolan_ninetales/icon.4bpp"); -const u8 gMonIcon_DiglettAlolan[] = INCBIN_U8("graphics/pokemon/alolan_diglett/icon.4bpp"); -const u8 gMonIcon_DugtrioAlolan[] = INCBIN_U8("graphics/pokemon/alolan_dugtrio/icon.4bpp"); -const u8 gMonIcon_MeowthAlolan[] = INCBIN_U8("graphics/pokemon/alolan_meowth/icon.4bpp"); -const u8 gMonIcon_PersianAlolan[] = INCBIN_U8("graphics/pokemon/alolan_persian/icon.4bpp"); -const u8 gMonIcon_GeodudeAlolan[] = INCBIN_U8("graphics/pokemon/alolan_geodude/icon.4bpp"); -const u8 gMonIcon_GravelerAlolan[] = INCBIN_U8("graphics/pokemon/alolan_graveler/icon.4bpp"); -const u8 gMonIcon_GolemAlolan[] = INCBIN_U8("graphics/pokemon/alolan_golem/icon.4bpp"); -const u8 gMonIcon_GrimerAlolan[] = INCBIN_U8("graphics/pokemon/alolan_grimer/icon.4bpp"); -const u8 gMonIcon_MukAlolan[] = INCBIN_U8("graphics/pokemon/alolan_muk/icon.4bpp"); -const u8 gMonIcon_ExeggutorAlolan[] = INCBIN_U8("graphics/pokemon/alolan_exeggutor/icon.4bpp"); -const u8 gMonIcon_MarowakAlolan[] = INCBIN_U8("graphics/pokemon/alolan_marowak/icon.4bpp"); +const u8 gMonIcon_VenusaurMega[] = INCBIN_U8("graphics/pokemon/venusaur/mega/icon.4bpp"); +const u8 gMonIcon_CharizardMegaX[] = INCBIN_U8("graphics/pokemon/charizard/mega_x/icon.4bpp"); +const u8 gMonIcon_CharizardMegaY[] = INCBIN_U8("graphics/pokemon/charizard/mega_y/icon.4bpp"); +const u8 gMonIcon_BlastoiseMega[] = INCBIN_U8("graphics/pokemon/blastoise/mega/icon.4bpp"); +const u8 gMonIcon_BeedrillMega[] = INCBIN_U8("graphics/pokemon/beedrill/mega/icon.4bpp"); +const u8 gMonIcon_PidgeotMega[] = INCBIN_U8("graphics/pokemon/pidgeot/mega/icon.4bpp"); +const u8 gMonIcon_AlakazamMega[] = INCBIN_U8("graphics/pokemon/alakazam/mega/icon.4bpp"); +const u8 gMonIcon_SlowbroMega[] = INCBIN_U8("graphics/pokemon/slowbro/mega/icon.4bpp"); +const u8 gMonIcon_GengarMega[] = INCBIN_U8("graphics/pokemon/gengar/mega/icon.4bpp"); +const u8 gMonIcon_KangaskhanMega[] = INCBIN_U8("graphics/pokemon/kangaskhan/mega/icon.4bpp"); +const u8 gMonIcon_PinsirMega[] = INCBIN_U8("graphics/pokemon/pinsir/mega/icon.4bpp"); +const u8 gMonIcon_GyaradosMega[] = INCBIN_U8("graphics/pokemon/gyarados/mega/icon.4bpp"); +const u8 gMonIcon_AerodactylMega[] = INCBIN_U8("graphics/pokemon/aerodactyl/mega/icon.4bpp"); +const u8 gMonIcon_MewtwoMegaX[] = INCBIN_U8("graphics/pokemon/mewtwo/mega_x/icon.4bpp"); +const u8 gMonIcon_MewtwoMegaY[] = INCBIN_U8("graphics/pokemon/mewtwo/mega_y/icon.4bpp"); +const u8 gMonIcon_AmpharosMega[] = INCBIN_U8("graphics/pokemon/ampharos/mega/icon.4bpp"); +const u8 gMonIcon_SteelixMega[] = INCBIN_U8("graphics/pokemon/steelix/mega/icon.4bpp"); +const u8 gMonIcon_ScizorMega[] = INCBIN_U8("graphics/pokemon/scizor/mega/icon.4bpp"); +const u8 gMonIcon_HeracrossMega[] = INCBIN_U8("graphics/pokemon/heracross/mega/icon.4bpp"); +const u8 gMonIcon_HoundoomMega[] = INCBIN_U8("graphics/pokemon/houndoom/mega/icon.4bpp"); +const u8 gMonIcon_TyranitarMega[] = INCBIN_U8("graphics/pokemon/tyranitar/mega/icon.4bpp"); +const u8 gMonIcon_SceptileMega[] = INCBIN_U8("graphics/pokemon/sceptile/mega/icon.4bpp"); +const u8 gMonIcon_BlazikenMega[] = INCBIN_U8("graphics/pokemon/blaziken/mega/icon.4bpp"); +const u8 gMonIcon_SwampertMega[] = INCBIN_U8("graphics/pokemon/swampert/mega/icon.4bpp"); +const u8 gMonIcon_GardevoirMega[] = INCBIN_U8("graphics/pokemon/gardevoir/mega/icon.4bpp"); +const u8 gMonIcon_SableyeMega[] = INCBIN_U8("graphics/pokemon/sableye/mega/icon.4bpp"); +const u8 gMonIcon_MawileMega[] = INCBIN_U8("graphics/pokemon/mawile/mega/icon.4bpp"); +const u8 gMonIcon_AggronMega[] = INCBIN_U8("graphics/pokemon/aggron/mega/icon.4bpp"); +const u8 gMonIcon_MedichamMega[] = INCBIN_U8("graphics/pokemon/medicham/mega/icon.4bpp"); +const u8 gMonIcon_ManectricMega[] = INCBIN_U8("graphics/pokemon/manectric/mega/icon.4bpp"); +const u8 gMonIcon_SharpedoMega[] = INCBIN_U8("graphics/pokemon/sharpedo/mega/icon.4bpp"); +const u8 gMonIcon_CameruptMega[] = INCBIN_U8("graphics/pokemon/camerupt/mega/icon.4bpp"); +const u8 gMonIcon_AltariaMega[] = INCBIN_U8("graphics/pokemon/altaria/mega/icon.4bpp"); +const u8 gMonIcon_BanetteMega[] = INCBIN_U8("graphics/pokemon/banette/mega/icon.4bpp"); +const u8 gMonIcon_AbsolMega[] = INCBIN_U8("graphics/pokemon/absol/mega/icon.4bpp"); +const u8 gMonIcon_GlalieMega[] = INCBIN_U8("graphics/pokemon/glalie/mega/icon.4bpp"); +const u8 gMonIcon_SalamenceMega[] = INCBIN_U8("graphics/pokemon/salamence/mega/icon.4bpp"); +const u8 gMonIcon_MetagrossMega[] = INCBIN_U8("graphics/pokemon/metagross/mega/icon.4bpp"); +const u8 gMonIcon_LatiasMega[] = INCBIN_U8("graphics/pokemon/latias/mega/icon.4bpp"); +const u8 gMonIcon_LatiosMega[] = INCBIN_U8("graphics/pokemon/latios/mega/icon.4bpp"); +const u8 gMonIcon_LopunnyMega[] = INCBIN_U8("graphics/pokemon/lopunny/mega/icon.4bpp"); +const u8 gMonIcon_GarchompMega[] = INCBIN_U8("graphics/pokemon/garchomp/mega/icon.4bpp"); +const u8 gMonIcon_LucarioMega[] = INCBIN_U8("graphics/pokemon/lucario/mega/icon.4bpp"); +const u8 gMonIcon_AbomasnowMega[] = INCBIN_U8("graphics/pokemon/abomasnow/mega/icon.4bpp"); +const u8 gMonIcon_GalladeMega[] = INCBIN_U8("graphics/pokemon/gallade/mega/icon.4bpp"); +const u8 gMonIcon_AudinoMega[] = INCBIN_U8("graphics/pokemon/audino/mega/icon.4bpp"); +const u8 gMonIcon_DiancieMega[] = INCBIN_U8("graphics/pokemon/diancie/mega/icon.4bpp"); +const u8 gMonIcon_RayquazaMega[] = INCBIN_U8("graphics/pokemon/rayquaza/mega/icon.4bpp"); +const u8 gMonIcon_KyogrePrimal[] = INCBIN_U8("graphics/pokemon/kyogre/primal/icon.4bpp"); +const u8 gMonIcon_GroudonPrimal[] = INCBIN_U8("graphics/pokemon/groudon/primal/icon.4bpp"); +const u8 gMonIcon_RattataAlolan[] = INCBIN_U8("graphics/pokemon/rattata/alolan/icon.4bpp"); +const u8 gMonIcon_RaticateAlolan[] = INCBIN_U8("graphics/pokemon/raticate/alolan/icon.4bpp"); +const u8 gMonIcon_RaichuAlolan[] = INCBIN_U8("graphics/pokemon/raichu/alolan/icon.4bpp"); +const u8 gMonIcon_SandshrewAlolan[] = INCBIN_U8("graphics/pokemon/sandshrew/alolan/icon.4bpp"); +const u8 gMonIcon_SandslashAlolan[] = INCBIN_U8("graphics/pokemon/sandslash/alolan/icon.4bpp"); +const u8 gMonIcon_VulpixAlolan[] = INCBIN_U8("graphics/pokemon/vulpix/alolan/icon.4bpp"); +const u8 gMonIcon_NinetalesAlolan[] = INCBIN_U8("graphics/pokemon/ninetales/alolan/icon.4bpp"); +const u8 gMonIcon_DiglettAlolan[] = INCBIN_U8("graphics/pokemon/diglett/alolan/icon.4bpp"); +const u8 gMonIcon_DugtrioAlolan[] = INCBIN_U8("graphics/pokemon/dugtrio/alolan/icon.4bpp"); +const u8 gMonIcon_MeowthAlolan[] = INCBIN_U8("graphics/pokemon/meowth/alolan/icon.4bpp"); +const u8 gMonIcon_PersianAlolan[] = INCBIN_U8("graphics/pokemon/persian/alolan/icon.4bpp"); +const u8 gMonIcon_GeodudeAlolan[] = INCBIN_U8("graphics/pokemon/geodude/alolan/icon.4bpp"); +const u8 gMonIcon_GravelerAlolan[] = INCBIN_U8("graphics/pokemon/graveler/alolan/icon.4bpp"); +const u8 gMonIcon_GolemAlolan[] = INCBIN_U8("graphics/pokemon/golem/alolan/icon.4bpp"); +const u8 gMonIcon_GrimerAlolan[] = INCBIN_U8("graphics/pokemon/grimer/alolan/icon.4bpp"); +const u8 gMonIcon_MukAlolan[] = INCBIN_U8("graphics/pokemon/muk/alolan/icon.4bpp"); +const u8 gMonIcon_ExeggutorAlolan[] = INCBIN_U8("graphics/pokemon/exeggutor/alolan/icon.4bpp"); +const u8 gMonIcon_MarowakAlolan[] = INCBIN_U8("graphics/pokemon/marowak/alolan/icon.4bpp"); const u8 gMonIcon_MeowthGalarian[] = INCBIN_U8("graphics/pokemon/meowth/galarian/icon.4bpp"); const u8 gMonIcon_PonytaGalarian[] = INCBIN_U8("graphics/pokemon/ponyta/galarian/icon.4bpp"); const u8 gMonIcon_RapidashGalarian[] = INCBIN_U8("graphics/pokemon/rapidash/galarian/icon.4bpp"); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 0faebfe74b..b8c443584d 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2155,7 +2155,7 @@ const u8 gMonIconPaletteIndices[] = [SPECIES_URSHIFU] = 2, [SPECIES_ZARUDE] = 1, [SPECIES_REGIELEKI] = 0, - [SPECIES_REGIDRAGO] = 2, + [SPECIES_REGIDRAGO] = 0, [SPECIES_GLASTRIER] = 0, [SPECIES_SPECTRIER] = 0, [SPECIES_CALYREX] = 0, From 9a0a759b3ffd484fb6b8acc2ada4ae43674dcb41 Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Wed, 6 Jul 2022 22:34:01 -0400 Subject: [PATCH 18/51] Fixed multihit odds. --- src/battle_script_commands.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 15915c71a6..a6718babba 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10494,19 +10494,20 @@ static void Cmd_setmultihitcounter(void) } else if (B_MULTI_HIT_CHANCE >= GEN_5) { - // 2 and 3 hits: 33.3% - // 4 and 5 hits: 16.7% - gMultiHitCounter = Random() % 4; - if (gMultiHitCounter > 2) - { - gMultiHitCounter = (Random() % 3); - if (gMultiHitCounter < 2) - gMultiHitCounter = 2; - else - gMultiHitCounter = 3; - } + // Based on Gen 5's odds + // 35% for 2 hits + // 35% for 3 hits + // 15% for 4 hits + // 15% for 5 hits + gMultiHitCounter = Random() % 100; + if (gMultiHitCounter < 35) + gMultiHitCounter = 2; + else if (gMultiHitCounter < 35 + 35) + gMultiHitCounter = 3; + else if (gMultiHitCounter < 35 + 35 + 15) + gMultiHitCounter = 4; else - gMultiHitCounter += 3; + gMultiHitCounter = 5; } else { From a5e742afcd78d98cdc94f3d4526a993777314669 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Fri, 12 Aug 2022 12:00:05 -0700 Subject: [PATCH 19/51] implemented review changes --- src/pokemon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 854c4c2b29..ca519729d5 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4709,7 +4709,6 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, } // EXP candies store an index for this table in their holdEffectParam. -#define NUM_EXP_CANDY_SIZES 5 static const u32 sExpCandyExperienceTable[] = {100, 800, 3000, 10000, 30000}; // Returns TRUE if the item has no effect on the Pokémon, FALSE otherwise @@ -4885,15 +4884,15 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (param == 0xFF) // Rare Candy { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; - SetMonData(mon, MON_DATA_EXP, &dataUnsigned); - CalculateMonStats(mon); } - else if (param < NUM_EXP_CANDY_SIZES) // EXP Candies + else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies { dataUnsigned = sExpCandyExperienceTable[param] + GetMonData(mon, MON_DATA_EXP, NULL); if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; } + SetMonData(mon, MON_DATA_EXP, &dataUnsigned); + CalculateMonStats(mon); retVal = FALSE; } From 09fd393f97f4af4c00453aba39f6068fd5825918 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 23 Aug 2022 22:38:35 -0400 Subject: [PATCH 20/51] Replaced instances of power == 0 with IS_MOVE_STATUS + fixed Wonder Skin --- src/battle_ai_main.c | 2 +- src/battle_ai_switch_items.c | 7 +++---- src/battle_dome.c | 2 +- src/battle_gfx_sfx_util.c | 2 +- src/battle_script_commands.c | 16 ++++++++-------- src/battle_tv.c | 4 ++-- src/battle_util.c | 6 +++--- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 732dea7807..0d029e3971 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -245,7 +245,7 @@ static void SetBattlerAiData(u8 battlerId) AI_DATA->holdEffectParams[battlerId] = GetBattlerHoldEffectParam(battlerId); AI_DATA->predictedMoves[battlerId] = gLastMoves[battlerId]; AI_DATA->hpPercents[battlerId] = GetHealthPercentage(battlerId); - AI_DATA->moveLimitations[battlerId] = CheckMoveLimitations(battlerId, 0, 0xFF); + AI_DATA->moveLimitations[battlerId] = CheckMoveLimitations(battlerId, 0, MOVE_LIMITATIONS_ALL); } void GetAiLogicData(void) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 13cc828242..e29970cdf1 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -154,7 +154,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) return FALSE; if (gLastLandedMoves[gActiveBattler] == MOVE_UNAVAILABLE) return FALSE; - if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) + if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler])) return FALSE; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) @@ -245,8 +245,7 @@ static bool8 ShouldSwitchIfNaturalCure(void) BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } - else if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0 - && Random() & 1) + else if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler]) && Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); @@ -350,7 +349,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent) return FALSE; if (gLastHitBy[gActiveBattler] == 0xFF) return FALSE; - if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) + if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler])) return FALSE; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) diff --git a/src/battle_dome.c b/src/battle_dome.c index 8b3b29fc15..84b7652a54 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2747,7 +2747,7 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode) int i = 0; int typePower = TYPE_x1; - if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || gBattleMoves[move].power == 0) + if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || IS_MOVE_STATUS(move)) return 0; defType1 = gBaseStats[targetSpecies].type1; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 8cd23098f2..eeab8addac 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -282,7 +282,7 @@ static u8 GetBattlePalaceMoveGroup(u8 battlerId, u16 move) case MOVE_TARGET_RANDOM: case MOVE_TARGET_BOTH: case MOVE_TARGET_FOES_AND_ALLY: - if (gBattleMoves[move].power == 0) + if (IS_MOVE_STATUS(move)) return PALACE_MOVE_GROUP_SUPPORT; else return PALACE_MOVE_GROUP_ATTACK; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 420d5790ce..dc03f101c4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1345,7 +1345,7 @@ static bool32 TryAegiFormChange(void) default: return FALSE; case SPECIES_AEGISLASH: // Shield -> Blade - if (gBattleMoves[gCurrentMove].power == 0) + if (IS_MOVE_STATUS(gCurrentMove)) return FALSE; gBattleMons[gBattlerAttacker].species = SPECIES_AEGISLASH_BLADE; break; @@ -1687,7 +1687,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE)) moveAcc = 50; // Check Wonder Skin. - if (defAbility == ABILITY_WONDER_SKIN && gBattleMoves[move].power == 0) + if (defAbility == ABILITY_WONDER_SKIN && IS_MOVE_STATUS(move) && moveAcc > 50) moveAcc = 50; calc = gAccuracyStageRatios[buff].dividend * moveAcc; @@ -8395,7 +8395,7 @@ static void Cmd_various(void) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else if (gBattleMoves[gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; @@ -8493,7 +8493,7 @@ static void Cmd_various(void) case VARIOUS_TRY_ME_FIRST: if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else if (gBattleMoves[gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else { @@ -13451,11 +13451,11 @@ bool32 DoesSubstituteBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) bool32 DoesDisguiseBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) { - if (GetBattlerAbility(battlerDef) != ABILITY_DISGUISE - || gBattleMons[battlerDef].species != SPECIES_MIMIKYU + if (gBattleMons[battlerDef].species != SPECIES_MIMIKYU || gBattleMons[battlerDef].status2 & STATUS2_TRANSFORMED - || gBattleMoves[move].power == 0 - || gHitMarker & HITMARKER_IGNORE_DISGUISE) + || IS_MOVE_STATUS(move) + || gHitMarker & HITMARKER_IGNORE_DISGUISE + || GetBattlerAbility(battlerDef) != ABILITY_DISGUISE) return FALSE; else return TRUE; diff --git a/src/battle_tv.c b/src/battle_tv.c index b6647b1164..19d3eba8df 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -1435,7 +1435,7 @@ static void TrySetBattleSeminarShow(void) return; else if (gBattleTypeFlags & (BATTLE_TYPE_PALACE | BATTLE_TYPE_PIKE | BATTLE_TYPE_PYRAMID)) return; - else if (gBattleMoves[gBattleMons[gBattlerAttacker].moves[gMoveSelectionCursor[gBattlerAttacker]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerAttacker].moves[gMoveSelectionCursor[gBattlerAttacker]])) return; i = 0; @@ -1496,7 +1496,7 @@ static void TrySetBattleSeminarShow(void) static bool8 ShouldCalculateDamage(u16 moveId, s32 *dmg, u16 *powerOverride) { - if (gBattleMoves[moveId].power == 0) + if (IS_MOVE_STATUS(moveId)) { *dmg = 0; return FALSE; diff --git a/src/battle_util.c b/src/battle_util.c index fd9b699b8e..7f4274b206 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1764,7 +1764,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && gBattleMoves[move].power == 0) + if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1884,7 +1884,7 @@ u8 TrySetCantSelectMoveBattleScript(void) limitations++; } } - else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && gBattleMoves[move].power == 0 && move != MOVE_ME_FIRST) + else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && IS_MOVE_STATUS(move) && move != MOVE_ME_FIRST) { gCurrentMove = move; gLastUsedItem = gBattleMons[gActiveBattler].item; @@ -3545,7 +3545,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_TAUNTED: // taunt - if (gDisableStructs[gBattlerAttacker].tauntTimer && gBattleMoves[gCurrentMove].power == 0) + if (gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedTauntedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); From 56a2e91518ce4170722a4fe73131d4bb78dba6df Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 23 Aug 2022 22:40:04 -0400 Subject: [PATCH 21/51] Updated move limitations --- data/battle_scripts_1.s | 13 +++++++++++++ include/battle_scripts.h | 4 ++++ include/battle_util.h | 12 ++++++++++-- src/battle_util.c | 37 ++++++++++++++++++++----------------- 4 files changed, 47 insertions(+), 19 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5e6ab33921..08474a1e8a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7257,6 +7257,10 @@ BattleScript_SelectingNotAllowedStuffCheeks:: printselectionstring STRINGID_STUFFCHEEKSCANTSELECT endselectionscript +BattleScript_SelectingNotAllowedStuffCheeksInPalace:: + printstring STRINGID_STUFFCHEEKSCANTSELECT + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_SelectingNotAllowedBelch:: printselectionstring STRINGID_BELCHCANTSELECT endselectionscript @@ -9196,14 +9200,23 @@ BattleScript_ItemHealHP_Ret:: BattleScript_SelectingNotAllowedMoveChoiceItem:: printselectionstring STRINGID_ITEMALLOWSONLYYMOVE endselectionscript +BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: + printstring STRINGID_ITEMALLOWSONLYYMOVE + goto BattleScript_SelectingUnusableMoveInPalace BattleScript_SelectingNotAllowedMoveGorillaTactics:: printselectionstring STRINGID_ABILITYALLOWSONLYMOVE endselectionscript +BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: + printstring STRINGID_ABILITYALLOWSONLYMOVE + goto BattleScript_SelectingUnusableMoveInPalace BattleScript_SelectingNotAllowedMoveAssaultVest:: printselectionstring STRINGID_ASSAULTVESTDOESNTALLOW endselectionscript +BattleScript_SelectingNotAllowedMoveAssaultVestInPalace:: + printstring STRINGID_ASSAULTVESTDOESNTALLOW + goto BattleScript_SelectingUnusableMoveInPalace BattleScript_HangedOnMsg:: playanimation BS_TARGET, B_ANIM_HANGED_ON diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 09e11bd8c0..77d889cc3a 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -210,6 +210,7 @@ extern const u8 BattleScript_BerryPPHealEnd2[]; extern const u8 BattleScript_ItemHealHP_End2[]; extern const u8 BattleScript_ItemHealHP_Ret[]; extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItem[]; +extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItemInPalace[]; extern const u8 BattleScript_HangedOnMsg[]; extern const u8 BattleScript_BerryConfuseHealEnd2[]; extern const u8 BattleScript_BerryConfuseHealRet[]; @@ -275,6 +276,7 @@ extern const u8 BattleScript_SnowWarningActivates[]; extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; +extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVestInPalace[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravity[]; extern const u8 BattleScript_MoveUsedGravityPrevents[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravityInPalace[]; @@ -301,6 +303,7 @@ extern const u8 BattleScript_DazzlingProtected[]; extern const u8 BattleScript_MoveUsedPsychicTerrainPrevents[]; extern const u8 BattleScript_MoveUsedPowder[]; extern const u8 BattleScript_SelectingNotAllowedStuffCheeks[]; +extern const u8 BattleScript_SelectingNotAllowedStuffCheeksInPalace[]; extern const u8 BattleScript_SelectingNotAllowedBelch[]; extern const u8 BattleScript_SelectingNotAllowedBelchInPalace[]; extern const u8 BattleScript_PsychicSurgeActivates[]; @@ -405,6 +408,7 @@ extern const u8 BattleScript_BlockedByPrimalWeatherRet[]; extern const u8 BattleScript_PrimalReversion[]; extern const u8 BattleScript_HyperspaceFuryRemoveProtect[]; extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTactics[]; +extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace[]; extern const u8 BattleScript_WanderingSpiritActivates[]; extern const u8 BattleScript_MirrorArmorReflect[]; extern const u8 BattleScript_GooeyActivates[]; diff --git a/include/battle_util.h b/include/battle_util.h index d0edbc9d1b..0219a0e6ad 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -7,7 +7,15 @@ #define MOVE_LIMITATION_TORMENTED (1 << 3) #define MOVE_LIMITATION_TAUNT (1 << 4) #define MOVE_LIMITATION_IMPRISON (1 << 5) -#define MOVE_LIMITATIONS_ALL 0xFF +#define MOVE_LIMITATION_ENCORE (1 << 6) +#define MOVE_LIMITATION_CHOICE_ITEM (1 << 7) +#define MOVE_LIMITATION_ASSAULT_VEST (1 << 8) +#define MOVE_LIMITATION_GRAVITY (1 << 9) +#define MOVE_LIMITATION_HEAL_BLOCK (1 << 10) +#define MOVE_LIMITATION_BELCH (1 << 11) +#define MOVE_LIMITATION_THROAT_CHOP (1 << 12) +#define MOVE_LIMITATION_STUFF_CHEEKS (1 << 13) +#define MOVE_LIMITATIONS_ALL 0xFFFF #define ABILITYEFFECT_ON_SWITCHIN 0 #define ABILITYEFFECT_ENDTURN 1 @@ -89,7 +97,7 @@ void BattleScriptPush(const u8 *bsPtr); void BattleScriptPushCursor(void); void BattleScriptPop(void); u8 TrySetCantSelectMoveBattleScript(void); -u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check); +u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check); bool8 AreAllMovesUnusable(void); u8 GetImprisonedMovesCount(u8 battlerId, u16 move); u8 DoFieldEndTurnEffects(void); diff --git a/src/battle_util.c b/src/battle_util.c index 7f4274b206..22c319a46b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1859,7 +1859,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedBelchInPalace; + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedStuffCheeksInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1876,6 +1876,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveChoiceItemInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1890,6 +1891,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveAssaultVestInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1905,6 +1907,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1930,7 +1933,7 @@ u8 TrySetCantSelectMoveBattleScript(void) return limitations; } -u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) +u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check) { u8 holdEffect = GetBattlerHoldEffect(battlerId, TRUE); u16 *choicedMove = &gBattleStruct->choicedMove[battlerId]; @@ -1941,49 +1944,49 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) for (i = 0; i < MAX_MON_MOVES; i++) { // No move - if (gBattleMons[battlerId].moves[i] == MOVE_NONE && check & MOVE_LIMITATION_ZEROMOVE) + if (check & MOVE_LIMITATION_ZEROMOVE && gBattleMons[battlerId].moves[i] == MOVE_NONE) unusableMoves |= gBitTable[i]; // No PP - else if (gBattleMons[battlerId].pp[i] == 0 && check & MOVE_LIMITATION_PP) + else if (check & MOVE_LIMITATION_PP && gBattleMons[battlerId].pp[i] == 0) unusableMoves |= gBitTable[i]; // Disable - else if (gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove && check & MOVE_LIMITATION_DISABLED) + else if (check & MOVE_LIMITATION_DISABLED && gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove) unusableMoves |= gBitTable[i]; // Torment - else if (gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].status2 & STATUS2_TORMENT) + else if (check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && gBattleMons[battlerId].status2 & STATUS2_TORMENT) unusableMoves |= gBitTable[i]; // Taunt - else if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0) + else if (check & MOVE_LIMITATION_TAUNT && gDisableStructs[battlerId].tauntTimer && IS_MOVE_STATUS(gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Imprison - else if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON) + else if (check & MOVE_LIMITATION_IMPRISON && GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Encore - else if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_ENCORE && gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; // Choice Items - else if (HOLD_EFFECT_CHOICE(holdEffect) && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_CHOICE_ITEM && HOLD_EFFECT_CHOICE(holdEffect) && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; // Assault Vest - else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0 && gBattleMons[battlerId].moves[i] != MOVE_ME_FIRST) + else if (check & MOVE_LIMITATION_ASSAULT_VEST && holdEffect == HOLD_EFFECT_ASSAULT_VEST && IS_MOVE_STATUS(gBattleMons[battlerId].moves[i]) && gBattleMons[battlerId].moves[i] != MOVE_ME_FIRST) unusableMoves |= gBitTable[i]; // Gravity - else if (IsGravityPreventingMove(gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_GRAVITY && IsGravityPreventingMove(gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Heal Block - else if (IsHealBlockPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_HEAL_BLOCK && IsHealBlockPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Belch - else if (IsBelchPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_BELCH && IsBelchPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Throat Chop - else if (gDisableStructs[battlerId].throatChopTimer && gBattleMoves[gBattleMons[battlerId].moves[i]].flags & FLAG_SOUND) + else if (check & MOVE_LIMITATION_THROAT_CHOP && gDisableStructs[battlerId].throatChopTimer && gBattleMoves[gBattleMons[battlerId].moves[i]].flags & FLAG_SOUND) unusableMoves |= gBitTable[i]; // Stuff Cheeks - else if (gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES) + else if (check & MOVE_LIMITATION_STUFF_CHEEKS && gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES) unusableMoves |= gBitTable[i]; // Gorilla Tactics - else if (GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_CHOICE_ITEM && GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; } return unusableMoves; From eea718cfc6f75aebd1c5c04cdfd5e20aae4acd99 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 24 Aug 2022 00:30:49 -0400 Subject: [PATCH 22/51] Placeholder moves can't be used in battle. --- data/battle_scripts_1.s | 11 +++++++++++ include/battle_scripts.h | 2 ++ include/battle_util.h | 2 ++ include/pokemon_summary_screen.h | 1 + src/battle_ai_main.c | 2 ++ src/battle_util.c | 17 +++++++++++++++++ src/data/text/move_descriptions.h | 5 +++-- src/menu_specialized.c | 7 ++++++- src/pokemon_summary_screen.c | 11 +++++++++-- 9 files changed, 53 insertions(+), 5 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 08474a1e8a..d3ff57492e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9200,6 +9200,7 @@ BattleScript_ItemHealHP_Ret:: BattleScript_SelectingNotAllowedMoveChoiceItem:: printselectionstring STRINGID_ITEMALLOWSONLYYMOVE endselectionscript + BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: printstring STRINGID_ITEMALLOWSONLYYMOVE goto BattleScript_SelectingUnusableMoveInPalace @@ -9207,6 +9208,7 @@ BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: BattleScript_SelectingNotAllowedMoveGorillaTactics:: printselectionstring STRINGID_ABILITYALLOWSONLYMOVE endselectionscript + BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: printstring STRINGID_ABILITYALLOWSONLYMOVE goto BattleScript_SelectingUnusableMoveInPalace @@ -9214,10 +9216,19 @@ BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: BattleScript_SelectingNotAllowedMoveAssaultVest:: printselectionstring STRINGID_ASSAULTVESTDOESNTALLOW endselectionscript + BattleScript_SelectingNotAllowedMoveAssaultVestInPalace:: printstring STRINGID_ASSAULTVESTDOESNTALLOW goto BattleScript_SelectingUnusableMoveInPalace +BattleScript_SelectingNotAllowedPlaceholder:: + printselectionstring STRINGID_NOTDONEYET + endselectionscript + +BattleScript_SelectingNotAllowedPlaceholderInPalace:: + printstring STRINGID_NOTDONEYET + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_HangedOnMsg:: playanimation BS_TARGET, B_ANIM_HANGED_ON printstring STRINGID_PKMNHUNGONWITHX diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 77d889cc3a..19380932dd 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -277,6 +277,8 @@ extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVestInPalace[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholder[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholderInPalace[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravity[]; extern const u8 BattleScript_MoveUsedGravityPrevents[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravityInPalace[]; diff --git a/include/battle_util.h b/include/battle_util.h index 0219a0e6ad..d26aa24775 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -15,6 +15,8 @@ #define MOVE_LIMITATION_BELCH (1 << 11) #define MOVE_LIMITATION_THROAT_CHOP (1 << 12) #define MOVE_LIMITATION_STUFF_CHEEKS (1 << 13) + +#define MOVE_LIMITATION_PLACEHOLDER (1 << 15) #define MOVE_LIMITATIONS_ALL 0xFFFF #define ABILITYEFFECT_ON_SWITCHIN 0 diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 3996c8e15f..4e9e62284d 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -6,6 +6,7 @@ extern u8 gLastViewedMonIndex; extern const u8 *const gMoveDescriptionPointers[]; +extern const u8 gNotDoneYetDescription[]; extern const u8 *const gNatureNamePointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 0d029e3971..c253d37fb7 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -2512,6 +2512,8 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp <= gBattleMons[battlerAtk].maxHP / 3) score -= 10; break;*/ + case EFFECT_PLACEHOLDER: + return 0; // cannot even select } // move effect checks if (score < 0) diff --git a/src/battle_util.c b/src/battle_util.c index 22c319a46b..6f3c16514f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1930,6 +1930,20 @@ u8 TrySetCantSelectMoveBattleScript(void) } } + if (gBattleMoves[move].effect == EFFECT_PLACEHOLDER) + { + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholderInPalace; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; + } + else + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholder; + limitations++; + } + } + return limitations; } @@ -1949,6 +1963,9 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check) // No PP else if (check & MOVE_LIMITATION_PP && gBattleMons[battlerId].pp[i] == 0) unusableMoves |= gBitTable[i]; + // Placeholder + else if (check & MOVE_LIMITATION_PLACEHOLDER && gBattleMoves[gBattleMons[battlerId].moves[i]].effect == EFFECT_PLACEHOLDER) + unusableMoves |= gBitTable[i]; // Disable else if (check & MOVE_LIMITATION_DISABLED && gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove) unusableMoves |= gBitTable[i]; diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 5f6bcfb0e4..7d890b1d3d 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -2978,8 +2978,9 @@ static const u8 sEerieSpellDescription[] = _( "Attacks with psychic power.\n" "Foe's last move has 3 PP cut."); -static const u8 sNotDoneYetDescription[] = _( - "Not done yet."); +const u8 gNotDoneYetDescription[] = _( + "This move can't be used. Its\n" + "effect is in development."); // MOVE_NONE is ignored in this table. Make sure to always subtract 1 before getting the right pointer. const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 42c80b5ee3..0893fd3144 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -24,6 +24,7 @@ #include "trig.h" #include "window.h" #include "constants/songs.h" +#include "constants/battle_move_effects.h" #include "gba/io_reg.h" extern const struct CompressedSpriteSheet gMonFrontPicTable[]; @@ -807,7 +808,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) } AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL); - str = gMoveDescriptionPointers[chosenMove - 1]; + if (move->effect != EFFECT_PLACEHOLDER) + str = gMoveDescriptionPointers[chosenMove - 1]; + else + str = gNotDoneYetDescription; + AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2befc159f5..d47253b712 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -41,13 +41,14 @@ #include "text.h" #include "tv.h" #include "window.h" +#include "constants/battle_config.h" +#include "constants/battle_move_effects.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/party_menu.h" #include "constants/region_map_sections.h" #include "constants/rgb.h" #include "constants/songs.h" -#include "constants/battle_config.h" enum { PSS_PAGE_INFO, @@ -3730,15 +3731,21 @@ static void PrintContestMoveDescription(u8 moveSlot) static void PrintMoveDetails(u16 move) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, PSS_DATA_WINDOW_MOVE_DESCRIPTION); + u8 moveEffect; FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); if (move != MOVE_NONE) { if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES) { + moveEffect = gBattleMoves[move].effect; if (B_SHOW_SPLIT_ICON == TRUE) ShowSplitIcon(GetBattleMoveSplit(move)); PrintMovePowerAndAccuracy(move); - PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + + if (moveEffect != EFFECT_PLACEHOLDER) + PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + else + PrintTextOnWindow(windowId, gNotDoneYetDescription, 6, 1, 0, 0); } else { From 17b47de90da26d3636a0fcc406f82a8377ae6a2e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 24 Aug 2022 20:20:44 +0200 Subject: [PATCH 23/51] Ability pop-up displays properly long abilities --- src/battle_interface.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index a504cf1c0e..720bff809d 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2908,7 +2908,7 @@ static void TextIntoAbilityPopUp(void *dest, u8 *windowTileData, s32 arg2, bool3 #define MAX_CHARS_PRINTED 12 -static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTileData2, u32 x1, u32 x2, u32 y, u32 color1, u32 color2, u32 color3) +static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTileData2, u32 x1, u32 x2, u32 y, u32 color1, u32 color2, u32 color3, bool32 alignAbilityChars) { u32 windowId, i; u8 *windowTileData; @@ -2923,6 +2923,15 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi } text1[i] = EOS; + // Because there are two Windows, we need to align the strings, so that the first char in the second window starts right after the last char in the first window. + // Windows are 64 pixels in width. + if (alignAbilityChars && i == MAX_CHARS_PRINTED) + { + u32 width = GetStringWidth(FONT_SMALL, text1, 0); + while (x1 + width < 64) + x1++; + } + windowTileData = AddTextPrinterAndCreateWindowOnAbilityPopUp(text1, x1, y, color1, color2, color3, &windowId); TextIntoAbilityPopUp(spriteTileData1, windowTileData, 8, (y == 0)); RemoveWindow(windowId); @@ -2951,7 +2960,8 @@ static void ClearAbilityName(u8 spriteId1, u8 spriteId2) (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256, 6, 1, 4, - 7, 9, 1); + 7, 9, 1, + FALSE); } static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2) @@ -2988,7 +2998,8 @@ static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2) (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32), 7, 0, 0, - 2, 7, 1); + 2, 7, 1, + FALSE); } static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2) @@ -2996,9 +3007,10 @@ static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2) PrintOnAbilityPopUp(gAbilityNames[ability], (void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32) + 256, (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256, - 6, 1, + 6, 0, 4, - 7, 9, 1); + 7, 9, 1, + TRUE); } #define PIXEL_COORDS_TO_OFFSET(x, y)( \ @@ -3196,7 +3208,7 @@ void UpdateAbilityPopup(u8 battlerId) u8 spriteId1 = gBattleStruct->abilityPopUpSpriteIds[battlerId][0]; u8 spriteId2 = gBattleStruct->abilityPopUpSpriteIds[battlerId][1]; u16 ability = (gBattleScripting.abilityPopupOverwrite != 0) ? gBattleScripting.abilityPopupOverwrite : gBattleMons[battlerId].ability; - + ClearAbilityName(spriteId1, spriteId2); PrintAbilityOnAbilityPopUp(ability, spriteId1, spriteId2); RestoreOverwrittenPixels((void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32)); @@ -3382,7 +3394,7 @@ static void DestroyLastUsedBallGfx(struct Sprite *sprite) } static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_BALL_WIN_X_0) @@ -3399,7 +3411,7 @@ static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) } static void SpriteCB_LastUsedBall(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_USED_BALL_X_0) From 0bf2b264912322fd06fa19d0575ea5be46faf95c Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 24 Aug 2022 20:36:49 +0200 Subject: [PATCH 24/51] Get rid of garbage bytes in graphics.c --- src/graphics.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index 9e858deecb..7ccd0d5799 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2033,12 +2033,3 @@ const u16 gFrontierPassCancelButtonHighlighted_Tilemap[] = INCBIN_U16("graphics/ const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal"); const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz"); const u32 gBerryCrush_TextWindows_Tilemap[] = INCBIN_U32("graphics/berry_crush/text_windows.bin.lz"); - -// random garbage at the end. -static const u8 sEmpty3[0x54BAC] = {0}; -static const u8 sUnused1[] = {0x0D, 0x00, 0x58, 0x02}; -static const u8 sEmpty4[0x1145] = {0}; -static const u8 sUnused2[] = {0x02}; -static const u8 sEmpty5[0x3242] = {0}; -static const u8 sUnused3[] = {0x40}; -static const u8 sEmpty6[0x13] = {0}; From cc8dd92247284b452b404cc93399820aed566404 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 24 Aug 2022 20:48:47 +0200 Subject: [PATCH 25/51] ENDTURN_WISH resets gBattleStruct->turnSideTracker --- src/battle_util.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index fd9b699b8e..645d282bad 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -294,7 +294,7 @@ void HandleAction_UseMove(void) { gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; } - + // check z move used if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] != MOVE_NONE && !IS_MOVE_STATUS(gCurrentMove)) { @@ -395,7 +395,7 @@ void HandleAction_UseMove(void) u16 battlerAbility; gActiveBattler = gBattlerByTurnOrder[var]; battlerAbility = GetBattlerAbility(gActiveBattler); - + RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); if (battlerAbility == ABILITY_LIGHTNING_ROD) gSpecialStatuses[gActiveBattler].lightningRodRedirected = TRUE; @@ -909,7 +909,7 @@ void HandleAction_ActionFinished(void) gBattleCommunication[4] = 0; gBattleScripting.multihitMoveEffect = 0; gBattleResources->battleScriptsStack->size = 0; - + #if B_RECALC_TURN_AFTER_ACTIONS >= GEN_8 // i starts at `gCurrentTurnActionNumber` because we don't want to recalculate turn order for mon that have already // taken action. It's been previously increased, which we want in order to not recalculate the turn of the mon that just finished its action @@ -930,7 +930,7 @@ void HandleAction_ActionFinished(void) { if (GetWhoStrikesFirst(battler1, battler2, TRUE)) // If the actions chosen are switching, we recalc order but ignoring the moves SwapTurnOrder(i, j); - } + } } } #endif @@ -1463,20 +1463,20 @@ void CancelMultiTurnMoves(u8 battler) // Clear battler's semi-invulnerable bits if they are not held by Sky Drop. if (!(gStatuses3[battler] & STATUS3_SKY_DROPPED)) gStatuses3[battler] &= ~(STATUS3_SEMI_INVULNERABLE); - + // Check to see if this Pokemon was in the middle of using Sky Drop. If so, release the target. if (gBattleStruct->skyDropTargets[battler] != 0xFF && !(gStatuses3[battler] & STATUS3_SKY_DROPPED)) { // Get the target's battler id u8 otherSkyDropper = gBattleStruct->skyDropTargets[battler]; - + // Clears sky_dropped and on_air statuses gStatuses3[otherSkyDropper] &= ~(STATUS3_SKY_DROPPED | STATUS3_ON_AIR); - + // Makes both attacker and target's sprites visible gSprites[gBattlerSpriteIds[battler]].invisible = FALSE; gSprites[gBattlerSpriteIds[otherSkyDropper]].invisible = FALSE; - + // If target was sky dropped in the middle of Outrage/Thrash/Petal Dance, // confuse them upon release and display "confused by fatigue" message & animation. // Don't do this if this CancelMultiTurnMoves is caused by falling asleep via Yawn. @@ -2341,6 +2341,7 @@ u8 DoFieldEndTurnEffects(void) if (effect == 0) { gBattleStruct->turnCountersTracker++; + gBattleStruct->turnSideTracker = 0; } break; case ENDTURN_RAIN: @@ -3729,7 +3730,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->zmove.used[gBattlerAttacker] = TRUE; if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsPartnerMonFromSameTrainer(gBattlerAttacker)) gBattleStruct->zmove.used[BATTLE_PARTNER(gBattlerAttacker)] = TRUE; //if 1v1 double, set partner used flag as well - + gBattleScripting.battler = gBattlerAttacker; if (gBattleStruct->zmove.activeSplit == SPLIT_STATUS) { @@ -4961,7 +4962,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (effect == 1) // Drain Hp ability. { -#if B_HEAL_BLOCKING >= GEN_5 +#if B_HEAL_BLOCKING >= GEN_5 if (BATTLER_MAX_HP(battler) || gStatuses3[battler] & STATUS3_HEAL_BLOCK) #else if (BATTLER_MAX_HP(battler)) @@ -8048,7 +8049,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) u32 i; u16 basePower = gBattleMoves[move].power; u32 weight, hpFraction, speed; - + if (gBattleStruct->zmove.active) return gBattleMoves[gBattleStruct->zmove.baseMoves[battlerAtk]].zMovePower; @@ -9122,7 +9123,7 @@ static s32 DoMoveDamageCalc(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 isCrit, bool32 randomFactor, bool32 updateFlags, u16 typeEffectivenessModifier) { s32 dmg; - + // Don't calculate damage if the move has no effect on target. if (typeEffectivenessModifier == UQ_4_12(0)) return 0; @@ -9454,7 +9455,7 @@ bool32 CanMegaEvolve(u8 battlerId) // Cannot use z move and mega evolve on same turn if (gBattleStruct->zmove.toBeUsed[battlerId]) return FALSE; - + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && IsPartnerMonFromSameTrainer(battlerId) && (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)]))) @@ -10115,7 +10116,7 @@ void DoBurmyFormChange(u32 monId) currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL); - if ((GET_BASE_SPECIES_ID(currSpecies) == SPECIES_BURMY) + if ((GET_BASE_SPECIES_ID(currSpecies) == SPECIES_BURMY) && (gBattleStruct->appearedInBattle & gBitTable[monId]) // Burmy appeared in battle && GetMonData(&party[monId], MON_DATA_HP, NULL) != 0) // Burmy isn't fainted { From e3ab439ec0d50036a8001f4131a04a8b87bd0531 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 24 Aug 2022 21:56:24 +0200 Subject: [PATCH 26/51] Fix multi wild battles --- include/constants/battle.h | 2 +- src/battle_ai_main.c | 246 ++++++++++++++++++------------------- src/battle_main.c | 18 +-- 3 files changed, 133 insertions(+), 133 deletions(-) diff --git a/include/constants/battle.h b/include/constants/battle.h index 37b9a637a3..a4fdc4798f 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -81,7 +81,7 @@ #define WILD_DOUBLE_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER)))) #define BATTLE_TWO_VS_ONE_OPPONENT ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gTrainerBattleOpponent_B == 0xFFFF)) -#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER) +#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER | BATTLE_TYPE_INGAME_PARTNER) // Battle Outcome defines diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 732dea7807..b541b20a48 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -130,10 +130,10 @@ static u32 GetWildAiFlags(void) { u8 avgLevel = GetMonData(&gEnemyParty[0], MON_DATA_LEVEL); u32 flags; - + if (IsDoubleBattle()) avgLevel = (GetMonData(&gEnemyParty[0], MON_DATA_LEVEL) + GetMonData(&gEnemyParty[1], MON_DATA_LEVEL)) / 2; - + flags |= AI_FLAG_CHECK_BAD_MOVE; if (avgLevel >= 20) flags |= AI_FLAG_CHECK_VIABILITY; @@ -141,10 +141,10 @@ static u32 GetWildAiFlags(void) flags |= AI_FLAG_PREFER_STRONGEST_MOVE; if (avgLevel >= 80) flags |= AI_FLAG_HP_AWARE; - + if (B_VAR_WILD_AI_FLAGS != 0 && VarGet(B_VAR_WILD_AI_FLAGS) != 0) flags |= VarGet(B_VAR_WILD_AI_FLAGS); - + return flags; } @@ -166,7 +166,7 @@ void BattleAI_SetupFlags(void) AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags | gTrainers[gTrainerBattleOpponent_B].aiFlags; else AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags; - + // check smart wild AI if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER)) && IsWildMonSmart()) AI_THINKING_STRUCT->aiFlags |= GetWildAiFlags(); @@ -220,11 +220,11 @@ u8 BattleAI_ChooseMoveOrAction(void) ret = ChooseMoveOrAction_Singles(); else ret = ChooseMoveOrAction_Doubles(); - + // Clear protect structures, some flags may be set during AI calcs // e.g. pranksterElevated from GetMovePriority memset(&gProtectStructs, 0, MAX_BATTLERS_COUNT * sizeof(struct ProtectStruct)); - + gCurrentMove = savedCurrentMove; return ret; } @@ -253,13 +253,13 @@ void GetAiLogicData(void) u32 battlerAtk, battlerDef, i, move; u8 effectiveness; s32 dmg; - + memset(AI_DATA, 0, sizeof(struct AiLogicData)); - + if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER)) && !IsWildMonSmart()) return; - + // get/assume all battler data for (i = 0; i < gBattlersCount; i++) { @@ -267,7 +267,7 @@ void GetAiLogicData(void) SetBattlerAiData(i); } } - + // simulate AI damage for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++) { @@ -275,26 +275,26 @@ void GetAiLogicData(void) || !IsBattlerAIControlled(battlerAtk)) { continue; } - + for (battlerDef = 0; battlerDef < gBattlersCount; battlerDef++) { if (battlerAtk == battlerDef) continue; - + RecordKnownMove(battlerDef, gLastMoves[battlerDef]); for (i = 0; i < MAX_MON_MOVES; i++) { dmg = 0; effectiveness = AI_EFFECTIVENESS_x0; move = gBattleMons[battlerAtk].moves[i]; - + if (move != 0 && move != 0xFFFF //&& gBattleMoves[move].power != 0 /* we want to get effectiveness of status moves */ && !(AI_DATA->moveLimitations[battlerAtk] & gBitTable[i])) { dmg = AI_CalcDamage(move, battlerAtk, battlerDef, &effectiveness, TRUE); } - + AI_DATA->simulatedDmg[battlerAtk][battlerDef][i] = dmg; AI_DATA->effectiveness[battlerAtk][battlerDef][i] = effectiveness; } @@ -334,7 +334,7 @@ static u8 ChooseMoveOrAction_Singles(void) return AI_CHOICE_WATCH; gActiveBattler = sBattler_AI; - + // If can switch. if (CountUsablePartyMons(sBattler_AI) > 0 && !IsAbilityPreventingEscape(sBattler_AI) @@ -375,7 +375,7 @@ static u8 ChooseMoveOrAction_Singles(void) } } } - + numOfBestMoves = 1; currentMoveArray[0] = AI_THINKING_STRUCT->score[0]; consideredMoveArray[0] = 0; @@ -427,7 +427,7 @@ static u8 ChooseMoveOrAction_Doubles(void) BattleAI_SetupAIData(gBattleStruct->palaceFlags >> 4); else BattleAI_SetupAIData(0xF); - + gBattlerTarget = i; if ((i & BIT_SIDE) != (sBattler_AI & BIT_SIDE)) RecordLastUsedMoveByTarget(); @@ -467,7 +467,7 @@ static u8 ChooseMoveOrAction_Doubles(void) { if (!CanTargetBattler(sBattler_AI, i, gBattleMons[sBattler_AI].moves[j])) continue; - + if (mostViableMovesScores[0] == AI_THINKING_STRUCT->score[j]) { mostViableMovesScores[mostViableMovesNo] = AI_THINKING_STRUCT->score[j]; @@ -586,7 +586,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) bool32 isDoubleBattle = IsValidDoubleBattle(battlerAtk); u32 i; u16 predictedMove = AI_DATA->predictedMoves[battlerDef]; - + SetTypeBeforeUsingMove(move, battlerAtk); GET_MOVE_TYPE(move, moveType); @@ -594,7 +594,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) return score; GET_MOVE_TYPE(move, moveType); - + // check non-user target if (!(moveTarget & MOVE_TARGET_USER)) { @@ -604,7 +604,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_MINUS(20); } - + // check ground immunities if (moveType == TYPE_GROUND && !IsBattlerGrounded(battlerDef) @@ -616,11 +616,11 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_MINUS(20); } - + // check off screen if (IsSemiInvulnerable(battlerDef, move) && moveEffect != EFFECT_SEMI_INVULNERABLE && AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER) RETURN_SCORE_MINUS(20); // if target off screen and we go first, don't use move - + // check if negates type switch (effectiveness) { @@ -632,7 +632,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_MINUS(10); break; } - + // target ability checks if (!DoesBattlerIgnoreAbilityChecks(AI_DATA->abilities[battlerAtk], move)) { @@ -758,7 +758,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_MINUS(10); break; } // def ability checks - + // target partner ability checks & not attacking partner if (isDoubleBattle) { @@ -796,35 +796,35 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } // def partner ability checks } // ignore def ability check - + // gen7+ dark type mons immune to priority->elevated moves from prankster #if B_PRANKSTER_DARK_TYPES >= GEN_7 if (AI_DATA->abilities[battlerAtk] == ABILITY_PRANKSTER && IS_BATTLER_OF_TYPE(battlerDef, TYPE_DARK) && IS_MOVE_STATUS(move) && !(moveTarget & (MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER))) RETURN_SCORE_MINUS(10); #endif - + // terrain & effect checks if (AI_IsTerrainAffected(battlerDef, STATUS_FIELD_ELECTRIC_TERRAIN)) { if (moveEffect == EFFECT_SLEEP || moveEffect == EFFECT_YAWN) RETURN_SCORE_MINUS(20); } - + if (AI_IsTerrainAffected(battlerDef, STATUS_FIELD_MISTY_TERRAIN)) { if (IsNonVolatileStatusMoveEffect(moveEffect) || IsConfusionMoveEffect(moveEffect)) RETURN_SCORE_MINUS(20); } - + if (AI_IsTerrainAffected(battlerAtk, STATUS_FIELD_PSYCHIC_TERRAIN) && atkPriority > 0) { RETURN_SCORE_MINUS(20); } } // end check MOVE_TARGET_USER - + // the following checks apply to any target (including user) - + // throat chop check if (gDisableStructs[battlerAtk].throatChopTimer && TestMoveFlags(move, FLAG_SOUND)) return 0; // Can't even select move at all @@ -860,7 +860,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } } - + // check move effects switch (moveEffect) { @@ -874,7 +874,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_EXPLOSION: if (!(AI_THINKING_STRUCT->aiFlags & AI_FLAG_WILL_SUICIDE)) score -= 2; - + if (effectiveness == AI_EFFECTIVENESS_x0) { score -= 10; @@ -920,7 +920,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) score -= 10; break; - case EFFECT_SPECIAL_DEFENSE_UP: + case EFFECT_SPECIAL_DEFENSE_UP: case EFFECT_SPECIAL_DEFENSE_UP_2: if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF)) score -= 10; @@ -1230,7 +1230,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_LOW_KICK: // AI_CBM_HighRiskForDamage if (AI_DATA->abilities[battlerDef] == ABILITY_WONDER_GUARD && effectiveness < AI_EFFECTIVENESS_x2) - score -= 10; + score -= 10; break; case EFFECT_COUNTER: case EFFECT_MIRROR_COAT: @@ -1240,7 +1240,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || DoesSubstituteBlockMove(battlerAtk, BATTLE_PARTNER(battlerDef), predictedMove)) score -= 10; break; - + case EFFECT_ROAR: if (CountUsablePartyMons(battlerDef) == 0) score -= 10; @@ -1392,7 +1392,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SPIKES: if (gSideTimers[GetBattlerSide(battlerDef)].spikesAmount >= 3) score -= 10; - else if (PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) + else if (PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) && gSideTimers[GetBattlerSide(battlerDef)].spikesAmount == 2) score -= 10; // only one mon needs to set up the last layer of Spikes break; @@ -1570,7 +1570,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 10; break; } - + if (B_MENTAL_HERB >= GEN_5 && AI_DATA->holdEffects[battlerDef] == HOLD_EFFECT_MENTAL_HERB) score -= 6; break; @@ -1802,7 +1802,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp > (gBattleMons[battlerAtk].hp + gBattleMons[battlerDef].hp) / 2) score -= 10; break; - + case EFFECT_CONVERSION_2: //TODO break; @@ -1862,7 +1862,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // move check - + if (decreased) break; if (IsBattlerIncapacitated(battlerDef, AI_DATA->abilities[battlerDef])) @@ -1904,7 +1904,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) IncreaseAllyProtectionViability(&viability, 0xFF); }*/ } - break; + break; case EFFECT_MIRACLE_EYE: if (gStatuses3[battlerDef] & STATUS3_MIRACLE_EYED) score -= 10; @@ -1952,7 +1952,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || ((AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) && !IsTargetingPartner(battlerAtk, battlerDef))) // don't want to raise target stats unless its your partner score -= 10; break; - + case EFFECT_PSYCH_UP: // haze stats check { for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) @@ -2116,7 +2116,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) u32 atkNegativeStages = CountNegativeStatStages(battlerAtk); u32 defPositiveStages = CountPositiveStatStages(battlerDef); u32 defNegativeStages = CountNegativeStatStages(battlerDef); - + if (atkPositiveStages >= defPositiveStages && atkNegativeStages <= defNegativeStages) score -= 10; break; @@ -2513,21 +2513,21 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 10; break;*/ } // move effect checks - + if (score < 0) score = 0; - + return score; } static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) -{ +{ if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (gBattleMoves[move].power == 0) return score; // can't make anything faint with no power - + if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION) { // this move can faint the target @@ -2541,10 +2541,10 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // this move isn't expected to faint the target if (TestMoveFlags(move, FLAG_HIGH_CRIT)) score += 2; // crit makes it more likely to make them faint - + if (GetMoveDamageResult(move) == MOVE_POWER_OTHER) score--; - + switch (AI_DATA->effectiveness[battlerAtk][battlerDef][AI_THINKING_STRUCT->movesetIndex]) { case AI_EFFECTIVENESS_x8: @@ -2561,7 +2561,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + //AI_TryToFaint_CheckIfDanger if (!WillAIStrikeFirst() && CanTargetFaintAi(battlerDef, battlerAtk)) { // AI_TryToFaint_Danger @@ -2570,7 +2570,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else score++; } - + return score; } @@ -2626,8 +2626,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } // check partner move effect - - + + // consider our move effect relative to partner state switch (effect) { @@ -2648,8 +2648,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // our effect relative to partner - - + + // consider global move effects switch (effect) { @@ -2679,8 +2679,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // global move effect check - - + + // check specific target if (IsTargetingPartner(battlerAtk, battlerDef)) { @@ -2787,11 +2787,11 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_PLUS(1); } - break; + break; } } // ability checks } // move power check - + // attacker move effects specifically targeting partner if (!partnerProtecting) { @@ -2904,12 +2904,12 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } // attacker move effects } // check partner protecting - + score -= 30; // otherwise, don't target partner } else // checking opponent { - // these checks mostly handled in AI_CheckBadMove and AI_CheckViability + // these checks mostly handled in AI_CheckBadMove and AI_CheckViability switch (effect) { case EFFECT_SKILL_SWAP: @@ -2934,10 +2934,10 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 3; break; } - + // lightning rod, flash fire against enemy handled in AI_CheckBadMove } - + return score; } @@ -2974,11 +2974,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) u16 predictedMove = AI_DATA->predictedMoves[battlerDef]; bool32 isDoubleBattle = IsValidDoubleBattle(battlerAtk); u32 i; - + // Targeting partner, check benefits of doing that instead if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + // check always hits if (!IS_MOVE_STATUS(move) && gBattleMoves[move].accuracy == 0) { @@ -2987,11 +2987,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (AI_RandLessThan(100) && (gBattleMons[battlerDef].statStages[STAT_EVASION] >= 8 || gBattleMons[battlerAtk].statStages[STAT_ACC] <= 4)) score++; } - + // check high crit if (TestMoveFlags(move, FLAG_HIGH_CRIT) && effectiveness >= AI_EFFECTIVENESS_x2 && AI_RandLessThan(128)) score++; - + // check already dead if (!IsBattlerIncapacitated(battlerDef, AI_DATA->abilities[battlerDef]) && CanTargetFaintAi(battlerAtk, battlerDef) @@ -3002,7 +3002,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else score--; } - + // check damage if (gBattleMoves[move].power != 0 && GetMoveDamageResult(move) == MOVE_POWER_WEAK) score--; @@ -3010,11 +3010,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // check status move preference if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_PREFER_STATUS_MOVES && IS_MOVE_STATUS(move) && effectiveness != AI_EFFECTIVENESS_x0) score++; - + // check thawing moves if ((gBattleMons[battlerAtk].status1 & STATUS1_FREEZE) && TestMoveFlags(move, FLAG_THAW_USER)) score += (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) ? 20 : 10; - + // check burn if (gBattleMons[battlerAtk].status1 & STATUS1_BURN) { @@ -3033,7 +3033,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + // attacker ability checks switch (AI_DATA->abilities[battlerAtk]) { @@ -3049,8 +3049,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 8; // prioritize killing target for stat boost } break; - } // ability checks - + } // ability checks + // move effect checks switch (moveEffect) { @@ -3095,7 +3095,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + if (!AI_RandLessThan(100)) { score--; @@ -3141,7 +3141,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + if (!AI_RandLessThan(100)) { score--; @@ -3164,7 +3164,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 2; else if (AI_DATA->hpPercents[battlerAtk] <= 70) score -= 2; - else + else score++; break; case EFFECT_EVASION_UP: @@ -3294,7 +3294,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_ATTACK_SPATK_UP: // work up if (AI_DATA->hpPercents[battlerAtk] <= 40 || AI_DATA->abilities[battlerAtk] == ABILITY_CONTRARY) break; - + if (HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score); else if (HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) @@ -3350,7 +3350,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + if (ShouldRecover(battlerAtk, battlerDef, move, healPercent)) score += 2; } @@ -3578,7 +3578,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (newHp > healthBenchmark && ShouldAbsorb(battlerAtk, battlerDef, move, AI_DATA->simulatedDmg[battlerAtk][battlerDef][AI_THINKING_STRUCT->movesetIndex])) score += 2; } - break; + break; case EFFECT_SLEEP_TALK: case EFFECT_SNORE: if (!IsWakeupTurn(battlerAtk) && gBattleMons[battlerAtk].status1 & STATUS1_SLEEP) @@ -3613,13 +3613,13 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_THIEF: { bool32 canSteal = FALSE; - + #if defined B_TRAINERS_KNOCK_OFF_ITEMS && B_TRAINERS_KNOCK_OFF_ITEMS == TRUE canSteal = TRUE; #endif if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER || GetBattlerSide(battlerAtk) == B_SIDE_PLAYER) canSteal = TRUE; - + if (canSteal && AI_DATA->items[battlerAtk] == ITEM_NONE && AI_DATA->items[battlerDef] != ITEM_NONE && CanBattlerGetOrLoseItem(battlerDef, AI_DATA->items[battlerDef]) @@ -3763,8 +3763,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (AI_DATA->abilities[battlerDef] == ABILITY_MAGIC_BOUNCE || CountUsablePartyMons(battlerDef) == 0) break; if (gDisableStructs[battlerAtk].isFirstTurn) - score += 2; - //TODO - track entire opponent party data to determine hazard effectiveness + score += 2; + //TODO - track entire opponent party data to determine hazard effectiveness break; case EFFECT_FORESIGHT: if (AI_DATA->abilities[battlerAtk] == ABILITY_SCRAPPY) @@ -3793,7 +3793,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (HasMoveEffect(battlerDef, EFFECT_MORNING_SUN) || HasMoveEffect(battlerDef, EFFECT_SYNTHESIS) || HasMoveEffect(battlerDef, EFFECT_MOONLIGHT)) - score += 2; + score += 2; } break; case EFFECT_HAIL: @@ -3802,7 +3802,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if ((HasMoveEffect(battlerAtk, EFFECT_AURORA_VEIL) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_AURORA_VEIL)) && ShouldSetScreen(battlerAtk, battlerDef, EFFECT_AURORA_VEIL)) score += 3; - + score++; if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_ICY_ROCK) score++; @@ -3861,7 +3861,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SPECTRAL_THIEF: // Want to copy positive stat changes for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) - { + { if (gBattleMons[battlerDef].statStages[i] > gBattleMons[battlerAtk].statStages[i]) { switch (i) @@ -3920,7 +3920,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (HasMoveEffect(battlerAtk, EFFECT_SWALLOW) || HasMoveEffect(battlerAtk, EFFECT_SPIT_UP)) score += 2; - + IncreaseStatUpScore(battlerAtk, battlerDef, STAT_DEF, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score); break; @@ -3937,20 +3937,20 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || HasMoveEffect(battlerAtk, EFFECT_PSYCH_UP) || HasMoveEffect(battlerAtk, EFFECT_SPECTRAL_THIEF)) score++; - + if (AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) score += 2; - + IncreaseConfusionScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_FLATTER: if (HasMoveEffect(battlerAtk, EFFECT_PSYCH_UP) || HasMoveEffect(battlerAtk, EFFECT_SPECTRAL_THIEF)) score += 2; - + if (AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) score += 2; - + IncreaseConfusionScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_FURY_CUTTER: @@ -3991,7 +3991,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 3; break; } - + switch (move) { case MOVE_DEFOG: @@ -4007,7 +4007,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) && AI_WhoStrikesFirst(battlerAtk, BATTLE_PARTNER(battlerAtk), move) == AI_IS_SLOWER) // Partner going first break; // Don't use Defog if partner is going to set up hazards } - + // check defog lowering evasion if (ShouldLowerEvasion(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef])) { @@ -4179,10 +4179,10 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { u16 item = GetUsedHeldItem(battlerAtk); u16 toHeal = (ItemId_GetHoldEffectParam(item) == 10) ? 10 : gBattleMons[battlerAtk].maxHP / ItemId_GetHoldEffectParam(item); - + if (IsStatBoostingBerry(item) && AI_DATA->hpPercents[battlerAtk] > 60) score++; - else if (ShouldRestoreHpBerry(battlerAtk, item) && !CanAIFaintTarget(battlerAtk, battlerDef, 0) + else if (ShouldRestoreHpBerry(battlerAtk, item) && !CanAIFaintTarget(battlerAtk, battlerDef, 0) && ((GetWhoStrikesFirst(battlerAtk, battlerDef, TRUE) == 0 && CanTargetFaintAiWithMod(battlerDef, battlerAtk, 0, 0)) || !CanTargetFaintAiWithMod(battlerDef, battlerAtk, toHeal, 0))) score++; // Recycle healing berry if we can't otherwise faint the target and the target wont kill us after we activate the berry @@ -4229,7 +4229,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (AI_DATA->abilities[battlerDef] != AI_DATA->abilities[battlerAtk] && !(gStatuses3[battlerDef] & STATUS3_GASTRO_ACID)) score += 2; - } + } break; case EFFECT_IMPRISON: if (predictedMove != MOVE_NONE && HasMove(battlerAtk, predictedMove)) @@ -4300,7 +4300,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SHELL_SMASH: if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_RESTORE_STATS) score += 1; - + IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPEED, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPATK, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score); @@ -4407,7 +4407,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gStatuses3[battlerAtk] & STATUS3_YAWN && IsBattlerGrounded(battlerAtk)) score += 10; //fallthrough - case EFFECT_GRASSY_TERRAIN: + case EFFECT_GRASSY_TERRAIN: case EFFECT_PSYCHIC_TERRAIN: score += 2; if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_TERRAIN_EXTENDER) @@ -4680,7 +4680,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) //case EFFECT_SKY_DROP //break; } // move effect checks - + return score; } @@ -4690,15 +4690,15 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (IsTargetingPartner(battlerAtk, battlerDef) || gBattleResults.battleTurnCounter != 0) return score; - - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING + + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING && AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER && CanTargetFaintAi(battlerDef, battlerAtk) && GetMovePriority(battlerAtk, move) == 0) { RETURN_SCORE_MINUS(20); // No point in setting up if you will faint. Should just switch if possible.. } - + // check effects to prioritize first turn switch (gBattleMoves[move].effect) { @@ -4787,7 +4787,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + return score; } @@ -4796,10 +4796,10 @@ static s16 AI_Risky(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (TestMoveFlags(move, FLAG_HIGH_CRIT)) score += 2; - + switch (gBattleMoves[move].effect) { case EFFECT_SLEEP: @@ -4826,7 +4826,7 @@ static s16 AI_Risky(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + return score; } @@ -4835,10 +4835,10 @@ static s16 AI_PreferStrongestMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 sc { if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (GetMoveDamageResult(move) == MOVE_POWER_BEST) score += 2; - + return score; } @@ -4846,14 +4846,14 @@ static s16 AI_PreferStrongestMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 sc static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { u32 i; - + if (IsTargetingPartner(battlerAtk, battlerDef) || CountUsablePartyMons(battlerAtk) == 0 || GetMoveDamageResult(move) != MOVE_POWER_OTHER || !HasMoveEffect(battlerAtk, EFFECT_BATON_PASS) || IsBattlerTrapped(battlerAtk, TRUE)) return score; - + if (IsStatRaisingEffect(gBattleMoves[move].effect)) { if (gBattleResults.battleTurnCounter == 0) @@ -4861,9 +4861,9 @@ static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else if (AI_DATA->hpPercents[battlerAtk] < 60) score -= 10; else - score++; + score++; } - + // other specific checks switch (gBattleMoves[move].effect) { @@ -4889,12 +4889,12 @@ static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gStatuses3[battlerAtk] & (STATUS3_ROOTED | STATUS3_AQUA_RING)) score += 2; if (gStatuses3[battlerAtk] & STATUS3_LEECHSEED) - score -= 3; + score -= 3; break; default: break; } - + return score; } @@ -4914,11 +4914,11 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (gStatuses3[battlerDef] & STATUS3_HEAL_BLOCK) return 0; - + if (CanTargetFaintAi(FOE(battlerAtk), BATTLE_PARTNER(battlerAtk)) || (CanTargetFaintAi(BATTLE_PARTNER(FOE(battlerAtk)), BATTLE_PARTNER(battlerAtk)))) score--; - + if (AI_DATA->hpPercents[battlerDef] <= 50) score++; } @@ -4957,7 +4957,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // med hp if (IsStatRaisingEffect(effect) || IsStatLoweringEffect(effect)) score -= 2; - + switch (effect) { case EFFECT_EXPLOSION: @@ -4980,7 +4980,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // low hp if (IsStatRaisingEffect(effect) || IsStatLoweringEffect(effect)) score -= 2; - + // check other discouraged low hp effects switch (effect) { @@ -5013,7 +5013,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } } - + // consider target HP if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0)) { @@ -5085,7 +5085,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 2; // don't use status moves if target is at low health } } - + return score; } @@ -5104,7 +5104,7 @@ static s16 AI_Roaming(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (IsBattlerTrapped(battlerAtk, FALSE)) return score; - + AI_Flee(); return score; } diff --git a/src/battle_main.c b/src/battle_main.c index 5c03a18b46..25a0b06135 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2981,10 +2981,10 @@ static void BattleStartClearSetData(void) gBattleStruct->arenaLostOpponentMons = 0; gBattleStruct->mega.triggerSpriteId = 0xFF; - + gBattleStruct->stickyWebUser = 0xFF; gBattleStruct->appearedInBattle = 0; - + for (i = 0; i < PARTY_SIZE; i++) { gBattleStruct->usedHeldItems[i][0] = 0; @@ -3084,7 +3084,7 @@ void SwitchInClearSetData(void) gBattleStruct->lastTakenMoveFrom[gActiveBattler][3] = 0; gBattleStruct->lastMoveFailed &= ~(gBitTable[gActiveBattler]); gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]); - + if (gActiveBattler == gBattleStruct->stickyWebUser) gBattleStruct->stickyWebUser = 0xFF; // Switched into sticky web user slot so reset it @@ -3100,7 +3100,7 @@ void SwitchInClearSetData(void) gBattleResources->flags->flags[gActiveBattler] = 0; gCurrentMove = MOVE_NONE; gBattleStruct->arenaTurnCounter = 0xFF; - + // Reset damage to prevent things like red card activating if the switched-in mon is holding it gSpecialStatuses[gActiveBattler].physicalDmg = 0; gSpecialStatuses[gActiveBattler].specialDmg = 0; @@ -3184,7 +3184,7 @@ void FaintClearSetData(void) gBattleStruct->lastTakenMoveFrom[gActiveBattler][3] = 0; gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]); - + if (gActiveBattler == gBattleStruct->stickyWebUser) gBattleStruct->stickyWebUser = 0xFF; // User of sticky web fainted, so reset the stored battler ID @@ -3342,7 +3342,7 @@ static void DoBattleIntro(void) MarkBattlerForControllerExec(gActiveBattler); } } - else // wild mon 2 + else if (IsBattlerAlive(gActiveBattler)) // wild mon 2 if alive { BtlController_EmitLoadMonSprite(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); @@ -3696,7 +3696,7 @@ static void TryDoEventsBeforeFirstTurn(void) gMoveResultFlags = 0; gRandomTurnNumber = Random(); - + GetAiLogicData(); // get assumed abilities, hold effects, etc of all battlers if (gBattleTypeFlags & BATTLE_TYPE_ARENA) @@ -3904,7 +3904,7 @@ static void HandleTurnActionSelectionState(void) case STATE_TURN_START_RECORD: // Recorded battle related action on start of every turn. RecordedBattle_CopyBattlerMoves(); gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; - + // Do AI score computations here so we can use them in AI_TrySwitchOrUseItem if ((gBattleTypeFlags & BATTLE_TYPE_HAS_AI || IsWildMonSmart()) && IsBattlerAIControlled(gActiveBattler)) { gBattleStruct->aiMoveOrAction[gActiveBattler] = ComputeBattleAiScores(gActiveBattler); @@ -4564,7 +4564,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) // QUICK CLAW / CUSTAP - always first // LAGGING TAIL - always last // STALL - always last - + if (gProtectStructs[battler1].quickDraw && !gProtectStructs[battler2].quickDraw) strikesFirst = 0; else if (!gProtectStructs[battler1].quickDraw && gProtectStructs[battler2].quickDraw) From 940f9f17260c2c08f8e4808e663126f6bf5878f5 Mon Sep 17 00:00:00 2001 From: crater-git Date: Wed, 24 Aug 2022 16:10:32 -0400 Subject: [PATCH 27/51] Moved branch defs to config.h, now only for compat --- include/config.h | 10 ++++++++++ include/constants/battle_config.h | 2 -- include/constants/expansion_branches.h | 12 ------------ include/constants/item_config.h | 2 -- include/constants/pokemon_config.h | 2 -- include/global.h | 1 - 6 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 include/constants/expansion_branches.h diff --git a/include/config.h b/include/config.h index 5f2fa4d2cc..ab11a90adb 100644 --- a/include/config.h +++ b/include/config.h @@ -36,4 +36,14 @@ #endif #endif +// Compatibility definition for other projects to detect pokeemerald-expansion +#define RHH_EXPANSION + +// Legacy branch-based defines included for backwards compatibility +#ifdef RHH_EXPANSION + #define BATTLE_ENGINE + #define POKEMON_EXPANSION + #define ITEM_EXPANSION +#endif + #endif // GUARD_CONFIG_H diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 5e9984c550..fce87bd43d 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_BATTLE_CONFIG_H #define GUARD_CONSTANTS_BATTLE_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 diff --git a/include/constants/expansion_branches.h b/include/constants/expansion_branches.h deleted file mode 100644 index 48af6bf1b9..0000000000 --- a/include/constants/expansion_branches.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GUARD_CONSTANTS_EXPANSION_BRANCHES_H -#define GUARD_CONSTANTS_EXPANSION_BRANCHES_H - -// Branch defines: Used by other branches to detect each other. -// Each define must be here for each of RHH's branch you have pulled. -// e.g. If you have both the battle_engine and pokemon_expansion branch, -// then both BATTLE_ENGINE and POKEMON_EXPANSION must be defined here. -#define BATTLE_ENGINE -#define POKEMON_EXPANSION -#define ITEM_EXPANSION - -#endif diff --git a/include/constants/item_config.h b/include/constants/item_config.h index 01b5fa3587..70b4440c84 100644 --- a/include/constants/item_config.h +++ b/include/constants/item_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_ITEM_CONFIG_H #define GUARD_CONSTANTS_ITEM_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 077c02e332..6540b6508b 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_POKEMON_CONFIG_H #define GUARD_CONSTANTS_POKEMON_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 diff --git a/include/global.h b/include/global.h index 25b43db206..b27c1e91c0 100644 --- a/include/global.h +++ b/include/global.h @@ -15,7 +15,6 @@ #include "constants/pokemon.h" #include "constants/easy_chat.h" #include "constants/trainer_hill.h" -#include "constants/expansion_branches.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); From 7aa55f2753cca1971c789569a4a1fe883ffddfcf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 24 Aug 2022 23:00:21 +0200 Subject: [PATCH 28/51] better interface 1 player mon in double --- include/battle_interface.h | 1 + src/battle_anim_mons.c | 11 +++++----- src/battle_gfx_sfx_util.c | 7 ++++++- src/battle_interface.c | 43 ++++++++++++++++++++++---------------- src/party_menu.c | 2 +- 5 files changed, 39 insertions(+), 25 deletions(-) diff --git a/include/battle_interface.h b/include/battle_interface.h index 29cb45b0fe..90184d75a9 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -72,6 +72,7 @@ enum HEALTHBOX_SAFARI_BALLS_TEXT }; +u32 WhichBattleCoords(u32 battlerId); u8 GetMegaIndicatorSpriteId(u32 healthboxSpriteId); u8 CreateBattlerHealthboxSprites(u8 battler); u8 CreateSafariPlayerHealthboxSprites(void); diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 21a3ed9027..b0a073e465 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1,6 +1,7 @@ #include "global.h" #include "battle.h" #include "battle_anim.h" +#include "battle_interface.h" #include "bg.h" #include "contest.h" #include "data.h" @@ -134,10 +135,10 @@ u8 GetBattlerSpriteCoord(u8 battlerId, u8 coordType) { case BATTLER_COORD_X: case BATTLER_COORD_X_2: - retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].x; + retVal = sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].x; break; case BATTLER_COORD_Y: - retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y; + retVal = sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].y; break; case BATTLER_COORD_Y_PIC_OFFSET: case BATTLER_COORD_Y_PIC_OFFSET_DEFAULT: @@ -278,7 +279,7 @@ u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3) offset = GetBattlerYDelta(battlerId, species); offset -= GetBattlerElevation(battlerId, species); } - y = offset + sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y; + y = offset + sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].y; if (a3) { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) @@ -493,7 +494,7 @@ static void TranslateSpriteInWavePattern(struct Sprite *sprite) sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude); sprite->sCirclePosX += sprite->sCircleSpeedX; sprite->sCirclePosY += sprite->sCircleSpeedY; - + if (sprite->sCirclePosX >= 0x100) sprite->sCirclePosX -= 0x100; else if (sprite->sCirclePosX < 0) @@ -2445,7 +2446,7 @@ void AnimTask_AttackerPunchWithTrace(u8 taskId) dest = (task->tPaletteNum + 16) * 16; src = (gSprites[task->tBattlerSpriteId].oam.paletteNum + 0x10) * 0x10; - + // Set trace's priority based on battler's subpriority task->tPriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker); if (task->tPriority == 20 || task->tPriority == 40) diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 8cd23098f2..747d087374 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -715,7 +715,12 @@ bool8 BattleLoadAllHealthBoxesGfx(u8 state) else { if (state == 2) - LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]); + { + if (WhichBattleCoords(0)) + LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]); + else + LoadCompressedSpriteSheet(&sSpriteSheet_SinglesPlayerHealthbox); + } else if (state == 3) LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[1]); else if (state == 4) diff --git a/src/battle_interface.c b/src/battle_interface.c index a504cf1c0e..cf935fdc6a 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -764,6 +764,15 @@ static void InitLastUsedBallAssets(void) gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; } +// This function is here to cover a specific case - one player's mon in a 2 vs 1 double battle. In this scenario - display singles layout. +u32 WhichBattleCoords(u32 battlerId) // 0 - singles, 1 - doubles +{ + if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT && gPlayerPartyCount == 1) + return 0; + else + return IsDoubleBattle(); +} + u8 CreateBattlerHealthboxSprites(u8 battlerId) { s16 data6 = 0; @@ -771,7 +780,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) u8 healthbarSpriteId, megaIndicatorSpriteId; struct Sprite *healthBarSpritePtr; - if (!IsDoubleBattle()) + if (WhichBattleCoords(battlerId) == 0) // Singles { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { @@ -1035,7 +1044,7 @@ void GetBattlerHealthboxCoords(u8 battler, s16 *x, s16 *y) { *x = 0, *y = 0; - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battler)) { if (GetBattlerSide(battler) != B_SIDE_PLAYER) *x = 44, *y = 30; @@ -1102,7 +1111,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) if (GetBattlerSide(battler) == B_SIDE_PLAYER) { objVram = (void *)(OBJ_VRAM0); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battler)) objVram += spriteTileNum + 0x820; else objVram += spriteTileNum + 0x420; @@ -1118,12 +1127,13 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) { - u32 windowId, spriteTileNum; + u32 windowId, spriteTileNum, battler; u8 *windowTileData; u8 text[32]; void *objVram; - if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER && !IsDoubleBattle()) + battler = gSprites[healthboxSpriteId].hMain_Battler; + if (GetBattlerSide(battler) == B_SIDE_PLAYER && !WhichBattleCoords(battler)) { spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; if (maxOrCurrent != HP_CURRENT) // singles, max @@ -1152,10 +1162,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) } else { - u8 battler; - memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); - battler = gSprites[healthboxSpriteId].hMain_Battler; if (IsDoubleBattle() == TRUE) { UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, value, maxOrCurrent); @@ -1362,7 +1369,7 @@ void SwapHpBarsWithHpText(void) { if (gSprites[gHealthboxSpriteIds[i]].callback == SpriteCallbackDummy && GetBattlerSide(i) != B_SIDE_OPPONENT - && (IsDoubleBattle() || GetBattlerSide(i) != B_SIDE_PLAYER)) + && (WhichBattleCoords(i) || GetBattlerSide(i) != B_SIDE_PLAYER)) { bool8 noBars; @@ -1370,7 +1377,7 @@ void SwapHpBarsWithHpText(void) noBars = gBattleSpritesDataPtr->battlerData[i].hpNumbersNoBars; if (GetBattlerSide(i) == B_SIDE_PLAYER) { - if (!IsDoubleBattle()) + if (!WhichBattleCoords(i)) continue; if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) continue; @@ -1666,7 +1673,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, { isOpponent = TRUE; - if (!skipPlayer || !IsDoubleBattle()) + if (!skipPlayer || !WhichBattleCoords(battlerId)) bar_X = 104, bar_Y = 40; else bar_X = 104, bar_Y = 16; @@ -2152,7 +2159,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) { TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6); ptr = (void *)(OBJ_VRAM0); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(gSprites[healthboxSpriteId].data[6])) ptr += spriteTileNum + 0x800; else ptr += spriteTileNum + 0x400; @@ -2203,7 +2210,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { status = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_STATUS); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battlerId)) tileNumAdder = 0x1A; else tileNumAdder = 0x12; @@ -2259,7 +2266,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2); CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void *)(OBJ_PLTT + pltAdder * 2), 2); CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96); - if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT) + if (WhichBattleCoords(battlerId) == 1 || GetBattlerSide(battlerId) == B_SIDE_OPPONENT) { if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) { @@ -2382,7 +2389,7 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem SetBattleBarStruct(battlerId, healthboxSpriteId, maxHp, currHp, 0); MoveBattleBar(battlerId, healthboxSpriteId, HEALTH_BAR, 0); } - isDoubles = IsDoubleBattle(); + isDoubles = WhichBattleCoords(battlerId); if (!isDoubles && (elementId == HEALTHBOX_EXP_BAR || elementId == HEALTHBOX_ALL)) { u16 species; @@ -3196,7 +3203,7 @@ void UpdateAbilityPopup(u8 battlerId) u8 spriteId1 = gBattleStruct->abilityPopUpSpriteIds[battlerId][0]; u8 spriteId2 = gBattleStruct->abilityPopUpSpriteIds[battlerId][1]; u16 ability = (gBattleScripting.abilityPopupOverwrite != 0) ? gBattleScripting.abilityPopupOverwrite : gBattleMons[battlerId].ability; - + ClearAbilityName(spriteId1, spriteId2); PrintAbilityOnAbilityPopUp(ability, spriteId1, spriteId2); RestoreOverwrittenPixels((void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32)); @@ -3382,7 +3389,7 @@ static void DestroyLastUsedBallGfx(struct Sprite *sprite) } static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_BALL_WIN_X_0) @@ -3399,7 +3406,7 @@ static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) } static void SpriteCB_LastUsedBall(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_USED_BALL_X_0) diff --git a/src/party_menu.c b/src/party_menu.c index db20e0932c..b2e6ea68d2 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -6115,7 +6115,7 @@ void ChooseMonForWirelessMinigame(void) static u8 GetPartyLayoutFromBattleType(void) { - if (IsDoubleBattle() == FALSE) + if (!IsDoubleBattle() || gPlayerPartyCount == 1) // Draw the single layout in a double battle where the player has only one pokemon. return PARTY_LAYOUT_SINGLE; if (IsMultiBattle() == TRUE) return PARTY_LAYOUT_MULTI; From 6012731f274427e9f615dca0d738812d7b14cb56 Mon Sep 17 00:00:00 2001 From: crater-git Date: Wed, 24 Aug 2022 19:31:55 -0400 Subject: [PATCH 29/51] Removed redundant ifdef --- include/config.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/config.h b/include/config.h index ab11a90adb..3f67d043c7 100644 --- a/include/config.h +++ b/include/config.h @@ -40,10 +40,8 @@ #define RHH_EXPANSION // Legacy branch-based defines included for backwards compatibility -#ifdef RHH_EXPANSION - #define BATTLE_ENGINE - #define POKEMON_EXPANSION - #define ITEM_EXPANSION -#endif +#define BATTLE_ENGINE +#define POKEMON_EXPANSION +#define ITEM_EXPANSION #endif // GUARD_CONFIG_H From 7b7ba93d45e9f513e9715acb8828e40383cf8ada Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 24 Aug 2022 20:35:13 -0300 Subject: [PATCH 30/51] Fixed P_UPDATED_ABILITIES's comment --- include/constants/pokemon_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 077c02e332..9e177ef901 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -14,7 +14,7 @@ #define P_UPDATED_TYPES GEN_8 // Since Gen 6, several Pokémon were changed to be partially or fully Fairy type. #define P_UPDATED_STATS GEN_8 // Since Gen 6, Pokémon stats are updated with each passing generation. -#define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities. +#define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. #define P_LEGENDARY_PERFECT_IVS GEN_8 // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. From 5659f6178fa557f45d8d006f8ef566cc92a33364 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 25 Aug 2022 00:03:43 -0400 Subject: [PATCH 31/51] Optimized x adjustment --- src/battle_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index 720bff809d..e94e9c7d1a 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2928,8 +2928,8 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi if (alignAbilityChars && i == MAX_CHARS_PRINTED) { u32 width = GetStringWidth(FONT_SMALL, text1, 0); - while (x1 + width < 64) - x1++; + if (x1 + width < 64) + x1 += 64 - (x1 + width); } windowTileData = AddTextPrinterAndCreateWindowOnAbilityPopUp(text1, x1, y, color1, color2, color3, &windowId); From 045dbcf81eb325a8af516ac9b60ef966cdd5a4df Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 25 Aug 2022 00:48:35 -0400 Subject: [PATCH 32/51] Fixed creation trio orbs not boosting power for non-base forms. --- src/battle_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 645d282bad..73865bd793 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8477,15 +8477,15 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_LUSTROUS_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_PALKIA && (moveType == TYPE_WATER || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_PALKIA && (moveType == TYPE_WATER || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_ADAMANT_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_DIALGA && (moveType == TYPE_STEEL || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_DIALGA && (moveType == TYPE_STEEL || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_GRISEOUS_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_GIRATINA && (moveType == TYPE_GHOST || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_GIRATINA && (moveType == TYPE_GHOST || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_SOUL_DEW: From b2af7a1b4751f60676bd082b1f408c48457f754b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 25 Aug 2022 01:17:17 -0400 Subject: [PATCH 33/51] Fixed critical capture fields not using TRUE or FALSE --- src/battle_script_commands.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 420d5790ce..7af4fa9667 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13870,13 +13870,13 @@ static void Cmd_handleballthrow(void) u8 shakes; u8 maxShakes; - gBattleSpritesDataPtr->animationData->isCriticalCapture = 0; - gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = 0; + gBattleSpritesDataPtr->animationData->isCriticalCapture = FALSE; + gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = FALSE; if (CriticalCapture(odds)) { maxShakes = BALL_1_SHAKE; // critical capture doesn't guarantee capture - gBattleSpritesDataPtr->animationData->isCriticalCapture = 1; + gBattleSpritesDataPtr->animationData->isCriticalCapture = TRUE; } else { @@ -13900,7 +13900,7 @@ static void Cmd_handleballthrow(void) if (shakes == maxShakes) // mon caught, copy of the code above { if (IsCriticalCapture()) - gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = 1; + gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; UndoFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FALSE); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; From af137c9b9d1ed990b8d68a5a6bb41b6bbeb7cfca Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 25 Aug 2022 03:42:41 -0400 Subject: [PATCH 34/51] Multiple changes - Simplified LoadSpecialPokePic - Changed all checks flag checks to houldShowFemaleDifferences --- include/decompress.h | 5 ++- include/pokemon.h | 1 + include/pokemon_icon.h | 1 - src/battle_anim_mons.c | 6 ++-- src/battle_gfx_sfx_util.c | 10 +++--- src/contest.c | 2 +- src/contest_painting.c | 18 +++++----- src/contest_util.c | 11 +++---- src/decompress.c | 62 ++++++++--------------------------- src/egg_hatch.c | 2 +- src/menu_specialized.c | 2 +- src/pokeblock_feed.c | 2 +- src/pokemon.c | 13 +++++--- src/pokemon_debug.c | 15 +++++---- src/pokemon_icon.c | 60 ++++----------------------------- src/pokemon_jump.c | 9 +++-- src/pokemon_storage_system.c | 6 ++-- src/pokemon_summary_screen.c | 6 ++-- src/pokenav_conditions.c | 2 +- src/trade.c | 6 ++-- src/trainer_pokemon_sprites.c | 4 +-- 21 files changed, 81 insertions(+), 162 deletions(-) diff --git a/include/decompress.h b/include/decompress.h index bea2788abc..ef2ec43b0f 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -19,10 +19,9 @@ bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species); void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality); -void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); -void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale); +void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality); -void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); +void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic); u32 GetDecompressedDataSize(const u32 *ptr); diff --git a/include/pokemon.h b/include/pokemon.h index d7de38c61f..c05628a598 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -558,5 +558,6 @@ u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId); u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg); u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove); +bool32 ShouldShowFemaleDifferences(u16 species, u32 personality); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 952db1ed12..fba6a6740a 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,7 +21,6 @@ u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s1 void FreeMonIconPalette(u16 species); void FreeAndDestroyMonIconSprite(struct Sprite *sprite); u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality); -u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny); u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void SpriteCB_MonIcon(struct Sprite *sprite); diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 21a3ed9027..cef93bf965 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -2149,8 +2149,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 if (!isBackpic) { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); - LoadSpecialPokePic(&gMonFrontPicTable[species], - gMonSpritesGfxPtr->buffer, + LoadSpecialPokePic(gMonSpritesGfxPtr->buffer, species, personality, TRUE); @@ -2158,8 +2157,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 else { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); - LoadSpecialPokePic(&gMonBackPicTable[species], - gMonSpritesGfxPtr->buffer, + LoadSpecialPokePic(gMonSpritesGfxPtr->buffer, species, personality, FALSE); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 8cd23098f2..27d7c7e354 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -578,13 +578,13 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op position = GetBattlerPosition(battlerId); if (opponent) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[position], species, currentPersonality); } else { - HandleLoadSpecialPokePic(&gMonBackPicTable[species], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], species, currentPersonality); } @@ -860,7 +860,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = gContestResources->moveAnim->personality; otId = gContestResources->moveAnim->otId; - HandleLoadSpecialPokePic(&gMonBackPicTable[targetSpecies], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gContestResources->moveAnim->targetPersonality); @@ -879,7 +879,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); - HandleLoadSpecialPokePic(&gMonBackPicTable[targetSpecies], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gTransformedPersonalities[battlerAtk]); @@ -889,7 +889,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); - HandleLoadSpecialPokePic(&gMonFrontPicTable[targetSpecies], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gTransformedPersonalities[battlerAtk]); diff --git a/src/contest.c b/src/contest.c index 0c525ed3ab..0b5eda51b9 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3121,7 +3121,7 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind u8 spriteId; species = SanitizeSpecies(species); - HandleLoadSpecialPokePic(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20); SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_PLAYER_LEFT); diff --git a/src/contest_painting.c b/src/contest_painting.c index 48021e28cd..f891946d67 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -367,20 +367,18 @@ static void InitContestMonPixels(u16 species, bool8 backPic) LZDecompressVram(pal, gContestPaintingMonPalette); if (!backPic) { - HandleLoadSpecialPokePic( - &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], - species, - gContestPaintingWinner->personality); + HandleLoadSpecialPokePic(TRUE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + species, + gContestPaintingWinner->personality); _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } else { - HandleLoadSpecialPokePic( - &gMonBackPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], - species, - gContestPaintingWinner->personality); + HandleLoadSpecialPokePic(FALSE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], + species, + gContestPaintingWinner->personality); _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } } diff --git a/src/contest_util.c b/src/contest_util.c index 79bf09eb2e..dfd69a2857 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -892,11 +892,10 @@ static void Task_ShowWinnerMonBanner(u8 taskId) species = gContestMons[i].species; personality = gContestMons[i].personality; otId = gContestMons[i].otId; - HandleLoadSpecialPokePic( - &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], - species, - personality); + HandleLoadSpecialPokePic(TRUE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + species, + personality); pokePal = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); LoadCompressedSpritePalette(pokePal); @@ -2572,7 +2571,7 @@ void ShowContestEntryMonPic(void) taskId = CreateTask(Task_ShowContestEntryMonPic, 0x50); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = species; - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); LoadCompressedSpritePalette(palette); diff --git a/src/decompress.c b/src/decompress.c index 4f17edcf86..c94f748629 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -70,25 +70,18 @@ void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffe void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) DecompressPicFromTable(&gMonFrontPicTableFemale[species], buffer, species); else DecompressPicFromTable(&gMonFrontPicTable[species], buffer, species); } -void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality) +void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality) { - bool8 isFrontPic; - - if (src == &gMonFrontPicTable[species]) - isFrontPic = TRUE; // frontPic - else - isFrontPic = FALSE; // backPic - - LoadSpecialPokePic(src, dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } -void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic) +void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic) { if (species == SPECIES_UNOWN) { @@ -100,8 +93,13 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 LZ77UnCompWram(gMonFrontPicTable[id].data, dest); } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon - LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else + LZ77UnCompWram(gMonBackPicTable[0].data, dest); + } + else if (ShouldShowFemaleDifferences(species, personality)) { if (isFrontPic) LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); @@ -109,49 +107,15 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); } else - LZ77UnCompWram(src->data, dest); - - DrawSpindaSpots(species, personality, dest, isFrontPic); -} - -#if P_ENABLE_DEBUG == TRUE -static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) -{ - if (species == SPECIES_UNOWN) - { - u32 id = GetUnownSpeciesId(personality); - - if (!isFrontPic) - LZ77UnCompWram(gMonBackPicTable[id].data, dest); - else - LZ77UnCompWram(gMonFrontPicTable[id].data, dest); - } - else if (species > NUM_SPECIES) // is species unknown? draw the ? icon - LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) { if (isFrontPic) - LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + LZ77UnCompWram(gMonFrontPicTable[species].data, dest); else - LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + LZ77UnCompWram(gMonBackPicTable[species].data, dest); } - else - LZ77UnCompWram(src->data, dest); DrawSpindaSpots(species, personality, dest, isFrontPic); } -void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale) -{ - bool8 isFrontPic; - - if (src == &gMonFrontPicTable[species]) - isFrontPic = TRUE; // frontPic - else - isFrontPic = FALSE; // backPic - - LoadSpecialPokePicCustom(src, dest, species, personality, isFrontPic, isFemale); -} -#endif void Unused_LZDecompressWramIndirect(const void **src, void *dest) { diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e280ef315b..b7ae2e2ceb 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -444,7 +444,7 @@ static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16 *speciesL { u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[(useAlt * 2) + B_POSITION_OPPONENT_LEFT], species, pid); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 42c80b5ee3..7c856b5163 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -1075,7 +1075,7 @@ void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE); + LoadSpecialPokePic(tilesDst, species, personality, TRUE); LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst); } } diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 00597e8d38..46355e1464 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -727,7 +727,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon) // Load mon gfx species = GetMonData(mon, MON_DATA_SPECIES2); personality = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); sPokeblockFeed->loadGfxState++; break; case 1: diff --git a/src/pokemon.c b/src/pokemon.c index c781a80078..9ebab1a46e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -7520,14 +7520,14 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return gMonShinyPaletteTableFemale[species].data; else return gMonShinyPaletteTable[species].data; } else { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return gMonPaletteTableFemale[species].data; else return gMonPaletteTable[species].data; @@ -7549,14 +7549,14 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return &gMonShinyPaletteTableFemale[species]; else return &gMonShinyPaletteTable[species]; } else { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return &gMonPaletteTableFemale[species]; else return &gMonPaletteTable[species]; @@ -8359,3 +8359,8 @@ void TrySpecialOverworldEvo(void) sTriedEvolving = 0; SetMainCallback2(CB2_ReturnToField); } + +bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) +{ + return (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; +} diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index fa4460ed83..8775889fdf 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1107,6 +1107,9 @@ static void ResetPokemonDebugWindows(void) } } +#define MALE_PERSONALITY 0xFE +#define FEMALE_PERSONALITY 0X0 + void CB2_Debug_Pokemon(void) { u8 taskId; @@ -1180,7 +1183,7 @@ void CB2_Debug_Pokemon(void) palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); //Front - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); data->isShiny = FALSE; data->isFemale = FALSE; BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); @@ -1195,7 +1198,7 @@ void CB2_Debug_Pokemon(void) LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4); SetMultiuseSpriteTemplateToPokemon(species, 2); offset_y = gMonBackPicCoords[species].y_offset; @@ -1205,7 +1208,7 @@ void CB2_Debug_Pokemon(void) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows @@ -1692,7 +1695,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); //Front - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -1705,7 +1708,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 5); SetMultiuseSpriteTemplateToPokemon(species, 2); offset_y = gMonBackPicCoords[species].y_offset; @@ -1715,7 +1718,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 6a0c8385ac..51e1809aab 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -23,10 +23,6 @@ struct MonIconSpriteTemplate static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); static void FreeAndDestroyMonIconSprite_(struct Sprite *sprite); -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); -static const u8 *GetMonIconTilesCustom(u16 species, bool8 isFemale); -#endif const u8 *const gMonIconTable[] = { @@ -2596,7 +2592,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u if (species > NUM_SPECIES) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + else if (ShouldShowFemaleDifferences(species, personality)) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2606,32 +2602,6 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } -#if P_ENABLE_DEBUG == TRUE -u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) -{ - u8 spriteId; - struct MonIconSpriteTemplate iconTemplate = - { - .oam = &sMonIconOamData, - .image = GetMonIconPtrCustom(species, personality, isFemale), - .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; - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) - iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; - - spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); - - UpdateMonIconFrame(&gSprites[spriteId]); - - return spriteId; -} -#endif u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) { @@ -2704,13 +2674,6 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) -{ - return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); -} -#endif - void FreeAndDestroyMonIconSprite(struct Sprite *sprite) { FreeAndDestroyMonIconSprite_(sprite); @@ -2772,24 +2735,15 @@ void SpriteCB_MonIcon(struct Sprite *sprite) const u8 *GetMonIconTiles(u16 species, u32 personality) { - const u8 *iconSprite = gMonIconTable[species]; - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) - { + const u8 *iconSprite; + + if (ShouldShowFemaleDifferences(species, personality)) iconSprite = gMonIconTableFemale[species]; - } + else + iconSprite = gMonIconTable[species]; + return iconSprite; } -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconTilesCustom(u16 species, bool8 isFemale) -{ - const u8 *iconSprite = gMonIconTable[species]; - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) - { - iconSprite = gMonIconTableFemale[species]; - } - return iconSprite; -} -#endif void TryLoadAllMonIconPalettesAtOffset(u16 offset) { diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index e3ae6623c3..ccd3125e4c 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2905,11 +2905,10 @@ static void CreateJumpMonSprite(struct PokemonJumpGfx *jumpGfx, struct PokemonJu if (buffer && unusedBuffer) { - HandleLoadSpecialPokePic( - &gMonFrontPicTable[monInfo->species], - buffer, - monInfo->species, - monInfo->personality); + HandleLoadSpecialPokePic(TRUE, + buffer, + monInfo->species, + monInfo->personality); spriteSheet.data = buffer; spriteSheet.tag = multiplayerId; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 39b55463c5..7f515eba7a 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -3991,7 +3991,7 @@ static void LoadDisplayMonGfx(u16 species, u32 pid) if (species != SPECIES_NONE) { - LoadSpecialPokePic(&gMonFrontPicTable[species], sStorage->tileBuffer, species, pid, TRUE); + LoadSpecialPokePic(sStorage->tileBuffer, species, pid, TRUE); LZ77UnCompWram(sStorage->displayMonPalette, sStorage->displayMonPalBuffer); CpuCopy32(sStorage->tileBuffer, sStorage->displayMonTilePtr, MON_PIC_SIZE); LoadPalette(sStorage->displayMonPalBuffer, sStorage->displayMonPalOffset, 0x20); @@ -5109,7 +5109,7 @@ static u16 TryLoadMonIconTiles(u16 species, u32 personality) u16 i, offset; // Treat female mons as a seperate species as they may have a different icon than males - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) species |= 0x8000; // 1 << 15 // Search icon list for this species @@ -5176,7 +5176,7 @@ static struct Sprite *CreateMonIconSprite(u16 species, u32 personality, s16 x, s struct SpriteTemplate template = sSpriteTemplate_MonIcon; species = GetIconSpecies(species, personality); - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) { template.paletteTag = PALTAG_MON_ICON_0 + gMonIconPaletteIndicesFemale[species]; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2befc159f5..c124358ef5 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3980,7 +3980,7 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) case 0: if (gMain.inBattle) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], summary->species2, summary->pid); @@ -3989,14 +3989,14 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) { if (gMonSpritesGfxPtr != NULL) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], summary->species2, summary->pid); } else { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, MonSpritesGfxManager_GetSpritePtr(MON_SPR_GFX_MANAGER_A, B_POSITION_OPPONENT_LEFT), summary->species2, summary->pid); diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index e0645bac0b..0477ebbf52 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -534,7 +534,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], menu->monPicGfx[loadId], species, personality, TRUE); + LoadSpecialPokePic(menu->monPicGfx[loadId], species, personality, TRUE); LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), menu->monPal[loadId]); } diff --git a/src/trade.c b/src/trade.c index ad990e980b..abf35f26a4 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2734,7 +2734,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) species = GetMonData(mon, MON_DATA_SPECIES2); personality = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); sTradeData->monSpecies[whichParty] = species; @@ -3727,7 +3727,7 @@ static bool8 AnimateTradeSequenceCable(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); sTradeData->state++; } break; @@ -4224,7 +4224,7 @@ static bool8 AnimateTradeSequenceWireless(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 36cf70dcef..dcc6647182 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -59,11 +59,11 @@ static bool16 DecompressPic(u16 species, u32 personality, bool8 isFrontPic, u8 * { if (isFrontPic) { - LoadSpecialPokePic(&gMonFrontPicTable[species], dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } else { - LoadSpecialPokePic(&gMonBackPicTable[species], dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } } else From e792fae415303310a27f06797a5273463dc2589f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 09:37:42 -0300 Subject: [PATCH 35/51] Review corrections -Simplified the affection mechanics' battle scripts. -Corrected the value seting inside CalcCritChanceStage. -Simplified the checks inside Cmd_adjustdamage -Simplified the contents of GetLeadMonFriendshipScore now that a more general function to do the same thing was added. -Added constants for the values returned by GetMonFriendshipScore. --- data/battle_scripts_1.s | 52 ++++++++++++------------------------ include/constants/pokemon.h | 9 +++++++ src/battle_script_commands.c | 31 +++++++++++---------- src/battle_util.c | 21 ++++++++------- src/field_specials.c | 17 ++---------- 5 files changed, 54 insertions(+), 76 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 236e5d41dd..5cdb44597e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -421,47 +421,29 @@ BattleScript_AffectionBasedEndurance:: return BattleScript_AffectionBasedStatusHeal:: - jumpifstatus BS_ATTACKER, STATUS1_POISON, BattleScript_AffectionBasedStatusHeal_Poison - jumpifstatus BS_ATTACKER, STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatusHeal_Poison - jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatusHeal_Sleep - jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatusHeal_Paralysis - jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatusHeal_Burn - jumpifstatus BS_ATTACKER, STATUS1_FREEZE, BattleScript_AffectionBasedStatusHeal_Freeze + jumpifstatus BS_ATTACKER, STATUS1_POISON, BattleScript_AffectionBasedStatus_HealPoisonString + jumpifstatus BS_ATTACKER, STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString + jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatus_HealSleepString + jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatus_HealParalysisString + jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatus_HealBurnString + jumpifstatus BS_ATTACKER, STATUS1_FREEZE, BattleScript_AffectionBasedStatus_HealFreezeString end2 -BattleScript_AffectionBasedStatusHeal_Poison: +BattleScript_AffectionBasedStatus_HealPoisonString: printstring STRINGID_ATTACKEREXPELLEDTHEPOISON - waitmessage B_WAIT_TIME_LONG - clearstatus BS_ATTACKER - waitstate - updatestatusicon BS_ATTACKER - waitstate - end2 -BattleScript_AffectionBasedStatusHeal_Sleep: + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealSleepString: printstring STRINGID_ATTACKERSHOOKITSELFAWAKE - waitmessage B_WAIT_TIME_LONG - clearstatus BS_ATTACKER - waitstate - updatestatusicon BS_ATTACKER - waitstate - end2 -BattleScript_AffectionBasedStatusHeal_Paralysis: + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealParalysisString: printstring STRINGID_ATTACKERBROKETHROUGHPARALYSIS - waitmessage B_WAIT_TIME_LONG - clearstatus BS_ATTACKER - waitstate - updatestatusicon BS_ATTACKER - waitstate - end2 -BattleScript_AffectionBasedStatusHeal_Burn: + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealBurnString: printstring STRINGID_ATTACKERHEALEDITSBURN - waitmessage B_WAIT_TIME_LONG - clearstatus BS_ATTACKER - waitstate - updatestatusicon BS_ATTACKER - waitstate - end2 -BattleScript_AffectionBasedStatusHeal_Freeze: + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealFreezeString: printstring STRINGID_ATTACKERMELTEDTHEICE + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatusHeal_Continue: waitmessage B_WAIT_TIME_LONG clearstatus BS_ATTACKER waitstate diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 13db5644ef..dc8955656c 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -273,6 +273,15 @@ #define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7 #define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint +// Constants for GetLeadMonFriendshipScore +#define FRIENDSHIP_NONE 0 +#define FRIENDSHIP_GE_1 1 +#define FRIENDSHIP_GE_50 2 +#define FRIENDSHIP_GE_100 3 +#define FRIENDSHIP_GE_150 4 +#define FRIENDSHIP_GE_200 5 +#define FRIENDSHIP_MAX 6 + #define MAX_FRIENDSHIP 255 #define MAX_SHEEN 255 #define MAX_CONDITION 255 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5d3f8772ec..6182e09bab 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -59,6 +59,7 @@ #include "constants/songs.h" #include "constants/trainers.h" #include "battle_util.h" +#include "constants/pokemon.h" extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; @@ -1732,7 +1733,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u #if B_AFFECTION_MECHANICS == TRUE // With high affection/friendship there's a chance to evade a move by substracting 10% of its accuracy. // I can't find exact information about that chance, so I'm just gonna write it as a 20% chance for now. - if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= 4 && (Random() % 100) <= 20) + if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= FRIENDSHIP_GE_150 && (Random() % 100) <= 20) calc = (calc * 90) / 100; #endif @@ -1904,11 +1905,9 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi + 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk) #if B_AFFECTION_MECHANICS == TRUE - + (abilityAtk == ABILITY_SUPER_LUCK) - + 2 * (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= 5); - #else - + (abilityAtk == ABILITY_SUPER_LUCK); + + 2 * (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_GE_200) #endif + + (abilityAtk == ABILITY_SUPER_LUCK); if (critChance >= ARRAY_COUNT(sCriticalHitChance)) critChance = ARRAY_COUNT(sCriticalHitChance) - 1; @@ -1976,6 +1975,8 @@ static void Cmd_adjustdamage(void) { u8 holdEffect, param; u32 moveType; + u32 friendshipScore = GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]); + u32 rand = Random() % 100; GET_MOVE_TYPE(gCurrentMove, moveType); @@ -1991,7 +1992,7 @@ static void Cmd_adjustdamage(void) gPotentialItemEffectBattler = gBattlerTarget; - if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param) + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && rand < param) { RecordItemEffectBattle(gBattlerTarget, holdEffect); gSpecialStatuses[gBattlerTarget].focusBanded = TRUE; @@ -2009,12 +2010,12 @@ static void Cmd_adjustdamage(void) gSpecialStatuses[gBattlerTarget].focusSashed = TRUE; } #if B_AFFECTION_MECHANICS == TRUE - else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) >= 3) + else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && friendshipScore >= FRIENDSHIP_GE_100) { - if ((GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 6 && (Random() % 100) < 25) - || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 5 && (Random() % 100) < 20) - || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 4 && (Random() % 100) < 15) - || (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]) == 3 && (Random() % 100) < 10)) + if ((friendshipScore == FRIENDSHIP_MAX && rand < 25) + || (friendshipScore == FRIENDSHIP_GE_200 && rand < 20) + || (friendshipScore == FRIENDSHIP_GE_150 && rand < 15) + || (friendshipScore == FRIENDSHIP_GE_100 && rand < 10)) gSpecialStatuses[gBattlerTarget].affectionEndured = TRUE; } #endif @@ -2024,11 +2025,9 @@ static void Cmd_adjustdamage(void) && !gSpecialStatuses[gBattlerTarget].focusBanded && !gSpecialStatuses[gBattlerTarget].focusSashed #if B_AFFECTION_MECHANICS == TRUE - && !gSpecialStatuses[gBattlerTarget].sturdied - && !gSpecialStatuses[gBattlerTarget].affectionEndured) -#else - && !gSpecialStatuses[gBattlerTarget].sturdied) + && !gSpecialStatuses[gBattlerTarget].affectionEndured #endif + && !gSpecialStatuses[gBattlerTarget].sturdied) goto END; // Handle reducing the dmg to 1 hp. @@ -4063,7 +4062,7 @@ static void Cmd_getexp(void) } #endif #if B_AFFECTION_MECHANICS == TRUE - if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= 2) + if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= FRIENDSHIP_GE_50) gBattleMoveDamage = (gBattleMoveDamage * 120) / 100; #endif diff --git a/src/battle_util.c b/src/battle_util.c index 5a7f445ac2..b5d55df055 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -45,6 +45,7 @@ #include "constants/species.h" #include "constants/trainers.h" #include "constants/weather.h" +#include "constants/pokemon.h" extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; @@ -2084,22 +2085,22 @@ void TryToRevertMimicry(void) } } -u32 GetMonFriendshipScore(struct Pokemon *pokemon) // Based on GetLeadMonFriendshipScore +u32 GetMonFriendshipScore(struct Pokemon *pokemon) { - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == 255) - return 6; + if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) + return FRIENDSHIP_MAX; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) - return 5; + return FRIENDSHIP_GE_200; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) - return 4; + return FRIENDSHIP_GE_150; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) - return 3; + return FRIENDSHIP_GE_100; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) - return 2; + return FRIENDSHIP_GE_50; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) - return 1; + return FRIENDSHIP_GE_1; - return 0; + return FRIENDSHIP_NONE; } enum @@ -2585,7 +2586,7 @@ u8 DoFieldEndTurnEffects(void) for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) { if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER - && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= 4 + && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_GE_150 && (Random() % 100 < 20)) { gBattleCommunication[MULTISTRING_CHOOSER] = 1; diff --git a/src/field_specials.c b/src/field_specials.c index 4ed2a2e03d..9305083726 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -65,6 +65,7 @@ #include "constants/weather.h" #include "constants/metatile_labels.h" #include "palette.h" +#include "battle_util.h" EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE; EWRAM_DATA u8 gBikeCollisions = 0; @@ -939,21 +940,7 @@ u16 GetWeekCount(void) u8 GetLeadMonFriendshipScore(void) { - struct Pokemon *pokemon = &gPlayerParty[GetLeadMonIndex()]; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) - return 6; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) - return 5; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) - return 4; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) - return 3; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) - return 2; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) - return 1; - - return 0; + return GetMonFriendshipScore(&gPlayerParty[GetLeadMonIndex()]); } static void CB2_FieldShowRegionMap(void) From a0ec8a5a802ba7cfc9a3ea15ba55b78c7876616e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 25 Aug 2022 16:40:56 +0200 Subject: [PATCH 36/51] 4 digit hp in battle --- include/battle_interface.h | 5 +- src/battle_controller_player.c | 20 +-- src/battle_interface.c | 312 +++++++++++++++------------------ src/party_menu.c | 4 +- 4 files changed, 160 insertions(+), 181 deletions(-) diff --git a/include/battle_interface.h b/include/battle_interface.h index 29cb45b0fe..63b6386bea 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -6,7 +6,8 @@ enum { HP_CURRENT, - HP_MAX + HP_MAX, + HP_BOTH }; enum @@ -82,7 +83,7 @@ void DestoryHealthboxSprite(u8 healthboxSpriteId); void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly); void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHpBoxes); void InitBattlerHealthboxCoords(u8 battler); -void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent); +void UpdateHpTextInHealthbox(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp); void SwapHpBarsWithHpText(void); void ChangeMegaTriggerSprite(u8 spriteId, u8 animId); void CreateMegaTriggerSprite(u8 battlerId, u8 palId); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 8195414955..ea3bf2915b 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -248,7 +248,7 @@ static void HandleInputChooseAction(void) { PlaySE(SE_SELECT); TryHideLastUsedBall(); - + switch (gActionSelectionCursor[gActiveBattler]) { case 0: // Top left @@ -614,17 +614,17 @@ static void HandleInputChooseMove(void) { moveTarget = GetBattlerMoveTargetType(gActiveBattler, moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]); } - + if (gBattleStruct->zmove.viewing) { u16 chosenMove = moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]; - + QueueZMove(gActiveBattler, chosenMove); gBattleStruct->zmove.viewing = FALSE; if (gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].split != SPLIT_STATUS) moveTarget = MOVE_TARGET_SELECTED; //damaging z moves always have selected target } - + if (moveTarget & MOVE_TARGET_USER) gMultiUsePlayerCursor = gActiveBattler; else @@ -660,7 +660,7 @@ static void HandleInputChooseMove(void) u32 i = 0; for (i = 0; i < gBattlersCount; i++) TryShowAsTarget(i); - + canSelectTarget = 3; } else if (moveTarget & (MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)) @@ -673,7 +673,7 @@ static void HandleInputChooseMove(void) } } } - + switch (canSelectTarget) { case 0: @@ -1346,7 +1346,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -2858,7 +2858,7 @@ static void PlayerHandleChooseMove(void) else { struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]); - + InitMoveSelectionsVarsAndStrings(); gBattleStruct->mega.playerSelect = FALSE; if (!IsMegaTriggerSpriteActive()) @@ -2867,7 +2867,7 @@ static void PlayerHandleChooseMove(void) CreateMegaTriggerSprite(gActiveBattler, 0); if (!IsZMoveTriggerSpriteActive()) gBattleStruct->zmove.triggerSpriteId = 0xFF; - + GetUsableZMoves(gActiveBattler, moveInfo->moves); gBattleStruct->zmove.viable = IsZMoveUsable(gActiveBattler, gMoveSelectionCursor[gActiveBattler]); CreateZMoveTriggerSprite(gActiveBattler, gBattleStruct->zmove.viable); @@ -2952,7 +2952,7 @@ static void PlayerHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; diff --git a/src/battle_interface.c b/src/battle_interface.c index a504cf1c0e..83fb268de8 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -161,7 +161,7 @@ static const u8 *GetHealthboxElementGfxPtr(u8); static u8 *AddTextPrinterAndCreateWindowOnHealthbox(const u8 *, u32, u32, u32, u32 *); static void RemoveWindowOnHealthbox(u32 windowId); -static void UpdateHpTextInHealthboxInDoubles(u8, s16, u8); +static void UpdateHpTextInHealthboxInDoubles(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp); static void UpdateStatusIconInHealthbox(u8); static void TextIntoHealthboxObject(void *, u8 *, s32); @@ -1116,175 +1116,148 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) RemoveWindowOnHealthbox(windowId); } -void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) +static void PrintHpOnHealthbox(u32 spriteId, s16 currHp, s16 maxHp, u32 bgColor, u32 rightTile, u32 leftTile) { - u32 windowId, spriteTileNum; u8 *windowTileData; - u8 text[32]; - void *objVram; + u32 windowId, tilesCount, x, healthboxTileNum; + u8 text[28], *txtPtr; + void *objVram = (void *)(OBJ_VRAM0) + gSprites[spriteId].oam.tileNum * TILE_SIZE_4BPP; - if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER && !IsDoubleBattle()) - { - spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; - if (maxOrCurrent != HP_CURRENT) // singles, max - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 2, &windowId); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0xB40; - HpTextIntoHealthboxObject(objVram, windowTileData, 2); - RemoveWindowOnHealthbox(windowId); - } - else // singles, current - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - text[3] = CHAR_SLASH; - text[4] = EOS; - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 2, &windowId); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0x3E0; - HpTextIntoHealthboxObject(objVram, windowTileData, 1); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0xB00; - HpTextIntoHealthboxObject(objVram, windowTileData + 0x20, 2); - RemoveWindowOnHealthbox(windowId); - } - } + // To fit 4 digit HP values we need to modify a bit the way hp is printed on Healthbox. + // 6 chars can fit on the right healthbox, the rest goes to the left one + txtPtr = ConvertIntToDecimalStringN(text, currHp, STR_CONV_MODE_RIGHT_ALIGN, 4); + *txtPtr++ = CHAR_SLASH; + txtPtr = ConvertIntToDecimalStringN(txtPtr, maxHp, STR_CONV_MODE_LEFT_ALIGN, 4); + // Print last 6 chars on the right window + windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(txtPtr - 6, 0, 5, bgColor, &windowId); + HpTextIntoHealthboxObject(objVram + rightTile, windowTileData, 4); + RemoveWindowOnHealthbox(windowId); + // Print the rest of the chars on the left window + txtPtr[-6] = EOS; + // if max hp is 3 digits print on block closer to the right window, if 4 digits print further from the right window + if (maxHp >= 1000) + x = 9, tilesCount = 3; else + x = 6, tilesCount = 2, leftTile += 0x20; + windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, x, 5, bgColor, &windowId); + HpTextIntoHealthboxObject(objVram + leftTile, windowTileData, tilesCount); + RemoveWindowOnHealthbox(windowId); +} + +// Note: this is only possible to trigger via debug, it was an unused GF function. +static void UpdateOpponentHpTextDoubles(u32 healthboxSpriteId, u32 barSpriteId, s16 value, u8 maxOrCurrent) +{ + u8 text[32], *txtPtr; + u32 i, var; + u32 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + + if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible { - u8 battler; + memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight)); + if (maxOrCurrent == HP_CURRENT) + var = 0; + else + var = 4; - memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); - battler = gSprites[healthboxSpriteId].hMain_Battler; - if (IsDoubleBattle() == TRUE) - { - UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, value, maxOrCurrent); - } - else if (gBattleSpritesDataPtr->battlerData[battler].hpNumbersNoBars) // don't print text if only bars are visible - { - u32 var; - u8 i; + txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); + if (!maxOrCurrent) + StringCopy(txtPtr, gText_Slash); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER) + for (i = var; i < var + 3; i++) + { + if (i < 3) { - if (maxOrCurrent == HP_CURRENT) - var = 29; - else - var = 89; + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], + (void *)((OBJ_VRAM0) + 32 * (1 + gSprites[barSpriteId].oam.tileNum + i)), + 0x20); } else { - if (maxOrCurrent == HP_CURRENT) - var = 21; - else - var = 49; + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], + (void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[barSpriteId].oam.tileNum)), + 0x20); } + } - ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_LEADING_ZEROS, 3); - RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - - for (i = 0; i < 3; i++) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32], - (void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)), - 0x20); - } + if (maxOrCurrent == HP_CURRENT) + { + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224], + (void *)((OBJ_VRAM0) + ((gSprites[barSpriteId].oam.tileNum + 4) * TILE_SIZE_4BPP)), + 0x20); + CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[barSpriteId].oam.tileNum * TILE_SIZE_4BPP)), 0x20); } } } -static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) +// Same with this one. +static void UpdateOpponentHpTextSingles(u32 healthboxSpriteId, s16 value, u32 maxOrCurrent) { - u32 windowId, spriteTileNum; - u8 *windowTileData; u8 text[32]; - void *objVram; + u32 var, i; + u32 battler = gSprites[healthboxSpriteId].hMain_Battler; + + memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); + if (gBattleSpritesDataPtr->battlerData[battler].hpNumbersNoBars) // don't print text if only bars are visible + { + if (maxOrCurrent == HP_CURRENT) + var = 21; + else + var = 49; + + ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_LEADING_ZEROS, 3); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); + + for (i = 0; i < 3; i++) + { + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32], + (void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)), + 0x20); + } + } +} + +void UpdateHpTextInHealthbox(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp) +{ + if (IsDoubleBattle()) + { + UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, maxOrCurrent, currHp, maxHp); + } + else // Single Battle + { + if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER) // Player + { + PrintHpOnHealthbox(healthboxSpriteId, currHp, maxHp, 2, 0xB00, 0x3A0); + } + else // Opponent + { + UpdateOpponentHpTextSingles(healthboxSpriteId, currHp, HP_CURRENT); + UpdateOpponentHpTextSingles(healthboxSpriteId, maxHp, HP_MAX); + } + } +} + +static void UpdateHpTextInHealthboxInDoubles(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp) +{ + u32 barSpriteId = gSprites[healthboxSpriteId].data[5]; if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER) { if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible { - spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP; - objVram = (void *)(OBJ_VRAM0) + spriteTileNum; - - if (maxOrCurrent != HP_CURRENT) // doubles, max hp - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId); - HpTextIntoHealthboxObject((void *)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2); - RemoveWindowOnHealthbox(windowId); - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), + PrintHpOnHealthbox(barSpriteId, currHp, maxHp, 0, 0x80, 0x20); + // Clears the end of the healthbar gfx. + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), (void *)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x20); - } - else - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - text[3] = CHAR_SLASH; - text[4] = EOS; - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 0, &windowId); - FillHealthboxObject(objVram, 0, 3); // Erases HP bar leftover. - HpTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3); - RemoveWindowOnHealthbox(windowId); - } + // Erases HP bar leftover. + FillHealthboxObject((void *)(OBJ_VRAM0) + (gSprites[barSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0, 2); } } - else + else // Opponent { - u8 battlerId; - - memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight)); - battlerId = gSprites[healthboxSpriteId].hMain_Battler; - - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible - { - u8 var = 4; - u8 r7; - u8 *txtPtr; - u8 i; - - if (maxOrCurrent == HP_CURRENT) - var = 0; - - r7 = gSprites[healthboxSpriteId].data[5]; - txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - if (!maxOrCurrent) - StringCopy(txtPtr, gText_Slash); - RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - - for (i = var; i < var + 3; i++) - { - if (i < 3) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], - (void *)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)), - 0x20); - } - else - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], - (void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)), - 0x20); - } - } - - if (maxOrCurrent == HP_CURRENT) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224], - (void *)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)), - 0x20); - CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20); - } - else - { - if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side. - { - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), - (void *)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP), - 0x20); - } - } - } + UpdateOpponentHpTextDoubles(healthboxSpriteId, barSpriteId, maxHp, HP_MAX); + UpdateOpponentHpTextDoubles(healthboxSpriteId, barSpriteId, currHp, HP_CURRENT); } } @@ -1355,8 +1328,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) void SwapHpBarsWithHpText(void) { - s32 i; - u8 healthBarSpriteId; + u32 healthBarSpriteId, i; for (i = 0; i < gBattlersCount; i++) { @@ -1364,6 +1336,8 @@ void SwapHpBarsWithHpText(void) && GetBattlerSide(i) != B_SIDE_OPPONENT && (IsDoubleBattle() || GetBattlerSide(i) != B_SIDE_PLAYER)) { + s32 currHp = GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP); + s32 maxHp = GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP); bool8 noBars; gBattleSpritesDataPtr->battlerData[i].hpNumbersNoBars ^= 1; @@ -1380,8 +1354,7 @@ void SwapHpBarsWithHpText(void) healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId; CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX); + UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], HP_BOTH, currHp, maxHp); } else // text to bars { @@ -1404,8 +1377,7 @@ void SwapHpBarsWithHpText(void) healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId; CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 0x100); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gEnemyParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gEnemyParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX); + UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], HP_BOTH, currHp, maxHp); } } else // text to bars @@ -2361,28 +2333,31 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId) void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId) { - s32 maxHp, currHp; - u8 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + u32 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + s32 maxHp = GetMonData(mon, MON_DATA_MAX_HP); + s32 currHp = GetMonData(mon, MON_DATA_HP); - if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER) + if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { - u8 isDoubles; + u8 isDoubles = IsDoubleBattle(); if (elementId == HEALTHBOX_LEVEL || elementId == HEALTHBOX_ALL) UpdateLvlInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_LEVEL)); - if (elementId == HEALTHBOX_CURRENT_HP || elementId == HEALTHBOX_ALL) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_HP), HP_CURRENT); - if (elementId == HEALTHBOX_MAX_HP || elementId == HEALTHBOX_ALL) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_MAX_HP), HP_MAX); + + if (elementId == HEALTHBOX_ALL) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_BOTH, currHp, maxHp); + else if (elementId == HEALTHBOX_MAX_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_MAX, currHp, maxHp); + else if (elementId == HEALTHBOX_CURRENT_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_CURRENT, currHp, maxHp); + if (elementId == HEALTHBOX_HEALTH_BAR || elementId == HEALTHBOX_ALL) { LoadBattleBarGfx(0); - maxHp = GetMonData(mon, MON_DATA_MAX_HP); - currHp = GetMonData(mon, MON_DATA_HP); SetBattleBarStruct(battlerId, healthboxSpriteId, maxHp, currHp, 0); MoveBattleBar(battlerId, healthboxSpriteId, HEALTH_BAR, 0); } - isDoubles = IsDoubleBattle(); + if (!isDoubles && (elementId == HEALTHBOX_EXP_BAR || elementId == HEALTHBOX_ALL)) { u16 species; @@ -2413,15 +2388,18 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem { if (elementId == HEALTHBOX_LEVEL || elementId == HEALTHBOX_ALL) UpdateLvlInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_LEVEL)); - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars && (elementId == HEALTHBOX_CURRENT_HP || elementId == HEALTHBOX_ALL)) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_HP), HP_CURRENT); - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars && (elementId == HEALTHBOX_MAX_HP || elementId == HEALTHBOX_ALL)) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_MAX_HP), HP_MAX); + if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) + { + if (elementId == HEALTHBOX_ALL) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_BOTH, currHp, maxHp); + else if (elementId == HEALTHBOX_MAX_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_MAX, currHp, maxHp); + else if (elementId == HEALTHBOX_CURRENT_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_CURRENT, currHp, maxHp); + } if (elementId == HEALTHBOX_HEALTH_BAR || elementId == HEALTHBOX_ALL) { LoadBattleBarGfx(0); - maxHp = GetMonData(mon, MON_DATA_MAX_HP); - currHp = GetMonData(mon, MON_DATA_HP); SetBattleBarStruct(battlerId, healthboxSpriteId, maxHp, currHp, 0); MoveBattleBar(battlerId, healthboxSpriteId, HEALTH_BAR, 0); } @@ -3196,7 +3174,7 @@ void UpdateAbilityPopup(u8 battlerId) u8 spriteId1 = gBattleStruct->abilityPopUpSpriteIds[battlerId][0]; u8 spriteId2 = gBattleStruct->abilityPopUpSpriteIds[battlerId][1]; u16 ability = (gBattleScripting.abilityPopupOverwrite != 0) ? gBattleScripting.abilityPopupOverwrite : gBattleMons[battlerId].ability; - + ClearAbilityName(spriteId1, spriteId2); PrintAbilityOnAbilityPopUp(ability, spriteId1, spriteId2); RestoreOverwrittenPixels((void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32)); @@ -3382,7 +3360,7 @@ static void DestroyLastUsedBallGfx(struct Sprite *sprite) } static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_BALL_WIN_X_0) @@ -3399,7 +3377,7 @@ static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) } static void SpriteCB_LastUsedBall(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_USED_BALL_X_0) diff --git a/src/party_menu.c b/src/party_menu.c index db20e0932c..34a95d5e33 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2365,7 +2365,7 @@ static void DisplayPartyPokemonHPCheck(struct Pokemon *mon, struct PartyMenuBox static void DisplayPartyPokemonHP(u16 hp, struct PartyMenuBox *menuBox) { - u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, 3); + u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, 4); strOut[0] = CHAR_SLASH; strOut[1] = EOS; @@ -2386,7 +2386,7 @@ static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuB static void DisplayPartyPokemonMaxHP(u16 maxhp, struct PartyMenuBox *menuBox) { - ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, 4); StringCopy(gStringVar1, gText_Slash); StringAppend(gStringVar1, gStringVar2); DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); From 1fc63c34313a4d7ec4f44b57d928ffa95c5c10d6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 11:52:21 -0300 Subject: [PATCH 37/51] More review corrections --- data/battle_anim_scripts.s | 8 ++++---- include/constants/battle.h | 2 +- include/constants/battle_anim.h | 2 +- src/battle_util.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 572052f5d2..da1e45b232 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -868,7 +868,7 @@ gBattleAnims_General:: .4byte General_AquaRingHeal @ B_ANIM_AQUA_RING_HEAL .4byte General_BeakBlastSetUp @ B_ANIM_BEAK_BLAST_SETUP .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP - .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE + .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON .align 2 @@ -24885,12 +24885,12 @@ PrimalReversionParticles: delay 3 return -General_AffectionHangedOn:: @ Shameless copy of General_HangedOn - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 7, 0, 9, RGB_RED +General_AffectionHangedOn:: @ TODO: Make new animation, currenty a copy of General_HangedOn. + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_ATTACKER, 7, 0, 9, RGB_RED playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER createvisualtask AnimTask_SlideMonForFocusBand, 5, 30, 128, 0, 1, 2, 0, 1 waitforvisualfinish - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 4, 9, 0, RGB_RED + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_ATTACKER, 4, 9, 0, RGB_RED waitforvisualfinish delay 6 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 0, 0, 0, 15 diff --git a/include/constants/battle.h b/include/constants/battle.h index 7019befc32..048c98dfcb 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -259,8 +259,8 @@ #define MOVE_RESULT_FOE_ENDURED (1 << 6) #define MOVE_RESULT_FOE_HUNG_ON (1 << 7) #define MOVE_RESULT_STURDIED (1 << 8) -#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) #define MOVE_RESULT_FOE_ENDURED_AFFECTION (1 << 9) +#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) // Battle Weather flags #define B_WEATHER_RAIN_TEMPORARY (1 << 0) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 28bcb283d4..f6e1bed716 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -536,7 +536,7 @@ #define B_ANIM_BEAK_BLAST_SETUP 33 #define B_ANIM_SHELL_TRAP_SETUP 34 #define B_ANIM_ZMOVE_ACTIVATE 35 // Using Z Moves -#define B_ANIM_AFFECTION_HANGED_ON 36 +#define B_ANIM_AFFECTION_HANGED_ON 36 // TODO: Make new animation, currently a copy of B_ANIM_HANGED_ON. // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 diff --git a/src/battle_util.c b/src/battle_util.c index b5d55df055..e473b02f69 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2581,10 +2581,10 @@ u8 DoFieldEndTurnEffects(void) gSideTimers[B_SIDE_OPPONENT].retaliateTimer--; gBattleStruct->turnCountersTracker++; break; - #if B_AFFECTION_MECHANICS == TRUE case ENDTURN_STATUS_HEAL: for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) { + #if B_AFFECTION_MECHANICS == TRUE if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_GE_150 && (Random() % 100 < 20)) @@ -2593,10 +2593,10 @@ u8 DoFieldEndTurnEffects(void) BattleScriptExecute(BattleScript_AffectionBasedStatusHeal); break; } + #endif } gBattleStruct->turnCountersTracker++; break; - #endif case ENDTURN_FIELD_COUNT: effect++; break; From 63370b065d633cc2ca21293e9b31a4ec1fb1081b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 25 Aug 2022 17:31:14 +0200 Subject: [PATCH 38/51] Party menu supports 4digit hp --- src/party_menu.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index 34a95d5e33..ca770f93bd 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -270,7 +270,7 @@ static u8 CanMonLearnTMTutor(struct Pokemon *, u16, u8); static void DisplayPartyPokemonBarDetail(u8, const u8 *, u8, const u8 *); static void DisplayPartyPokemonLevel(u8, struct PartyMenuBox *); static void DisplayPartyPokemonGender(u8, u16, u8 *, struct PartyMenuBox *); -static void DisplayPartyPokemonHP(u16, struct PartyMenuBox *); +static void DisplayPartyPokemonHP(u16 hp, u16 maxHp, struct PartyMenuBox *menuBox); static void DisplayPartyPokemonMaxHP(u16, struct PartyMenuBox *); static void DisplayPartyPokemonHPBar(u16, u16, struct PartyMenuBox *); static void CreatePartyMonIconSpriteParameterized(u16, u32, struct PartyMenuBox *, u8); @@ -1032,7 +1032,7 @@ static void DisplayPartyPokemonDataForMultiBattle(u8 slot) DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); DisplayPartyPokemonGender(gMultiPartnerParty[actualSlot].gender, gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].nickname, menuBox); - DisplayPartyPokemonHP(gMultiPartnerParty[actualSlot].hp, menuBox); + DisplayPartyPokemonHP(gMultiPartnerParty[actualSlot].hp, gMultiPartnerParty[actualSlot].maxhp, menuBox); DisplayPartyPokemonMaxHP(gMultiPartnerParty[actualSlot].maxhp, menuBox); DisplayPartyPokemonHPBar(gMultiPartnerParty[actualSlot].hp, gMultiPartnerParty[actualSlot].maxhp, menuBox); } @@ -2359,18 +2359,31 @@ static void DisplayPartyPokemonHPCheck(struct Pokemon *mon, struct PartyMenuBox if (c != 0) menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[12] >> 3, (menuBox->infoRects->dimensions[13] >> 3) + 1, menuBox->infoRects->dimensions[14] >> 3, menuBox->infoRects->dimensions[15] >> 3, FALSE); if (c != 2) - DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), menuBox); + DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP), menuBox); } } -static void DisplayPartyPokemonHP(u16 hp, struct PartyMenuBox *menuBox) +static void DisplayParty4DigitsHP(struct PartyMenuBox *menuBox, const u8 *str, const u8 *origAlings, u32 toSub) { - u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, 4); + u8 newAligns[4]; + + memcpy(newAligns, origAlings, sizeof(newAligns)); + newAligns[0] -= toSub; // x, so that the hp fits + DisplayPartyPokemonBarDetail(menuBox->windowId, str, 0, newAligns); +} + +static void DisplayPartyPokemonHP(u16 hp, u16 maxhp, struct PartyMenuBox *menuBox) +{ + bool32 fourDigits = (maxhp >= 1000); + u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, fourDigits ? 4 : 3); strOut[0] = CHAR_SLASH; strOut[1] = EOS; - DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[12]); + if (fourDigits) + DisplayParty4DigitsHP(menuBox, gStringVar1, &menuBox->infoRects->dimensions[12], 10); + else + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[12]); } static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) @@ -2386,10 +2399,16 @@ static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuB static void DisplayPartyPokemonMaxHP(u16 maxhp, struct PartyMenuBox *menuBox) { - ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, 4); + bool32 fourDigits = (maxhp >= 1000); + + ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, fourDigits ? 4 : 3); StringCopy(gStringVar1, gText_Slash); StringAppend(gStringVar1, gStringVar2); - DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); + + if (fourDigits) + DisplayParty4DigitsHP(menuBox, gStringVar1, &menuBox->infoRects->dimensions[16], 5); + else + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); } static void DisplayPartyPokemonHPBarCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox) From 1b9c2816c28ca31e5e7e100500ea1360459b4465 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 25 Aug 2022 17:37:47 +0200 Subject: [PATCH 39/51] fix updatehptextinhealthbox arguments --- src/battle_controller_link_opponent.c | 2 +- src/battle_controller_link_partner.c | 2 +- src/battle_controller_opponent.c | 8 ++++---- src/battle_controller_player_partner.c | 4 ++-- src/battle_controller_recorded_opponent.c | 2 +- src/battle_controller_recorded_player.c | 4 ++-- src/battle_controller_wally.c | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 833925550a..26ee356c34 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -392,7 +392,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 6a0ecb2976..4afa2cb18e 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -278,7 +278,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index a503c1c7aa..760fbf3203 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -410,7 +410,7 @@ static void CompleteOnHealthbarDone(void) SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else OpponentBufferExecCompleted(); @@ -1588,9 +1588,9 @@ static void OpponentHandleChooseMove(void) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); - } + } if (ShouldUseZMove(gActiveBattler, gBattlerTarget, chosenMove)) - QueueZMove(gActiveBattler, chosenMove); + QueueZMove(gActiveBattler, chosenMove); if (CanMegaEvolve(gActiveBattler)) // If opponent can mega evolve, do it. BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (RET_MEGA_EVOLUTION) | (gBattlerTarget << 8)); else @@ -1617,7 +1617,7 @@ static void OpponentHandleChooseMove(void) do { target = GetBattlerAtPosition(Random() & 2); } while (!CanTargetBattler(gActiveBattler, target, move)); - + #if B_WILD_NATURAL_ENEMIES == TRUE // Don't bother to loop through table if the move can't attack ally if (!(gBattleMoves[move].target & MOVE_TARGET_BOTH)) diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index a868d09c03..f29bd1b871 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -292,7 +292,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1528,7 +1528,7 @@ static void PlayerPartnerHandleChooseMove(void) if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - + if (ShouldUseZMove(gActiveBattler, gBattlerTarget, moveInfo->moves[chosenMoveId])) QueueZMove(gActiveBattler, moveInfo->moves[chosenMoveId]); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 3f5e1cf7f9..14efa76c22 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -376,7 +376,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index b02f171f98..0d531db92c 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -351,7 +351,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1481,7 +1481,7 @@ static void RecordedPlayerHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 9728376df2..0b480a23ac 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -352,7 +352,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1277,7 +1277,7 @@ static void WallyHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; From 1bfff42ad2c0afa88f13694812747b92d156acfc Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 12:38:47 -0300 Subject: [PATCH 40/51] Fixed ENDTURN_STATUS_HEAL --- src/battle_util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index e473b02f69..eb93f45eec 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2131,9 +2131,7 @@ enum ENDTURN_ION_DELUGE, ENDTURN_FAIRY_LOCK, ENDTURN_RETALIATE, -#if B_AFFECTION_MECHANICS == TRUE ENDTURN_STATUS_HEAL, -#endif ENDTURN_FIELD_COUNT, }; From 5dd143f19d4da6d7de2f88bbdea2281e3b9d7f8a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 13:07:52 -0300 Subject: [PATCH 41/51] Applied Blackforest's changes to General_AffectionHangedOn --- data/battle_anim_scripts.s | 19 +++++++++++-------- include/constants/battle_anim.h | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index da1e45b232..a84796cc55 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24885,15 +24885,18 @@ PrimalReversionParticles: delay 3 return -General_AffectionHangedOn:: @ TODO: Make new animation, currenty a copy of General_HangedOn. - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_ATTACKER, 7, 0, 9, RGB_RED - playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_SlideMonForFocusBand, 5, 30, 128, 0, 1, 2, 0, 1 +General_AffectionHangedOn:: + loadspritegfx ANIM_TAG_RED_HEART + loopsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER, 12, 3 + createvisualtask AnimTask_SwayMon, 5, 0, 12, 4096, 4, ANIM_ATTACKER + delay 15 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -128, -22 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -384, -31 waitforvisualfinish - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_ATTACKER, 4, 9, 0, RGB_RED - waitforvisualfinish - delay 6 - createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 0, 0, 0, 15 end SnatchMoveTrySwapFromSubstitute: diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index f6e1bed716..28bcb283d4 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -536,7 +536,7 @@ #define B_ANIM_BEAK_BLAST_SETUP 33 #define B_ANIM_SHELL_TRAP_SETUP 34 #define B_ANIM_ZMOVE_ACTIVATE 35 // Using Z Moves -#define B_ANIM_AFFECTION_HANGED_ON 36 // TODO: Make new animation, currently a copy of B_ANIM_HANGED_ON. +#define B_ANIM_AFFECTION_HANGED_ON 36 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 From 75390519425008f54d48e1a7ab8ba948e42a3f46 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 13:28:13 -0300 Subject: [PATCH 42/51] Further tweaked the affection animation --- data/battle_anim_scripts.s | 28 ++++++++++++++++++++++++++++ src/battle_anim_new.c | 26 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index a84796cc55..b00cd0aaf3 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24890,6 +24890,13 @@ General_AffectionHangedOn:: loopsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER, 12, 3 createvisualtask AnimTask_SwayMon, 5, 0, 12, 4096, 4, ANIM_ATTACKER delay 15 + launchtask AnimTask_AffectionHangedOn 0x5 0x0 + jumpargeq 0x0, FRIENDSHIP_MAX, General_AffectionHangedOn_6Hearts + jumpargeq 0x0, FRIENDSHIP_GE_200, General_AffectionHangedOn_5Hearts + jumpargeq 0x0, FRIENDSHIP_GE_150, General_AffectionHangedOn_4Hearts + jumpargeq 0x0, FRIENDSHIP_GE_100, General_AffectionHangedOn_3Hearts + end +General_AffectionHangedOn_6Hearts: createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 @@ -24898,6 +24905,27 @@ General_AffectionHangedOn:: createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -384, -31 waitforvisualfinish end +General_AffectionHangedOn_5Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -128, -22 + waitforvisualfinish + end +General_AffectionHangedOn_4Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 + waitforvisualfinish + end +General_AffectionHangedOn_3Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 + waitforvisualfinish + end SnatchMoveTrySwapFromSubstitute: createvisualtask AnimTask_IsAttackerBehindSubstitute, 2 diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index 96faf23dd7..6079889d1b 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -18,6 +18,7 @@ #include "constants/moves.h" #include "constants/hold_effects.h" #include "constants/items.h" +#include "constants/pokemon.h" // function declarations static void SpriteCB_SpriteToCentreOfSide(struct Sprite* sprite); @@ -7895,3 +7896,28 @@ void AnimTask_TerrainPulse(u8 taskId) } DestroyAnimVisualTask(taskId); } + +void AnimTask_AffectionHangedOn(u8 taskId) +{ + int side = GetBattlerSide(gBattleAnimTarget); + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + switch (GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]])) + { + case FRIENDSHIP_MAX: + gBattleAnimArgs[0] = FRIENDSHIP_MAX; + break; + case FRIENDSHIP_GE_200: + gBattleAnimArgs[0] = FRIENDSHIP_GE_200; + break; + case FRIENDSHIP_GE_150: + gBattleAnimArgs[0] = FRIENDSHIP_GE_150; + break; + case FRIENDSHIP_GE_100: + gBattleAnimArgs[0] = FRIENDSHIP_GE_100; + break; + default: + break; + } + DestroyAnimVisualTask(taskId); +} From 2cf2c00b29dfe058a6c81eadab71d1788aa1c5a9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 17:10:11 -0300 Subject: [PATCH 43/51] Updated friendship labels --- data/battle_anim_scripts.s | 6 +++--- include/constants/pokemon.h | 14 +++++++------- src/battle_anim_new.c | 12 ++++++------ src/battle_script_commands.c | 14 +++++++------- src/battle_util.c | 12 ++++++------ 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index b00cd0aaf3..0649fe50b1 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24892,9 +24892,9 @@ General_AffectionHangedOn:: delay 15 launchtask AnimTask_AffectionHangedOn 0x5 0x0 jumpargeq 0x0, FRIENDSHIP_MAX, General_AffectionHangedOn_6Hearts - jumpargeq 0x0, FRIENDSHIP_GE_200, General_AffectionHangedOn_5Hearts - jumpargeq 0x0, FRIENDSHIP_GE_150, General_AffectionHangedOn_4Hearts - jumpargeq 0x0, FRIENDSHIP_GE_100, General_AffectionHangedOn_3Hearts + jumpargeq 0x0, FRIENDSHIP_200_TO_254, General_AffectionHangedOn_5Hearts + jumpargeq 0x0, FRIENDSHIP_150_TO_199, General_AffectionHangedOn_4Hearts + jumpargeq 0x0, FRIENDSHIP_100_TO_149, General_AffectionHangedOn_3Hearts end General_AffectionHangedOn_6Hearts: createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index dc8955656c..355b43b1a3 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -274,13 +274,13 @@ #define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint // Constants for GetLeadMonFriendshipScore -#define FRIENDSHIP_NONE 0 -#define FRIENDSHIP_GE_1 1 -#define FRIENDSHIP_GE_50 2 -#define FRIENDSHIP_GE_100 3 -#define FRIENDSHIP_GE_150 4 -#define FRIENDSHIP_GE_200 5 -#define FRIENDSHIP_MAX 6 +#define FRIENDSHIP_NONE 0 +#define FRIENDSHIP_1_TO_49 1 +#define FRIENDSHIP_50_TO_99 2 +#define FRIENDSHIP_100_TO_149 3 +#define FRIENDSHIP_150_TO_199 4 +#define FRIENDSHIP_200_TO_254 5 +#define FRIENDSHIP_MAX 6 #define MAX_FRIENDSHIP 255 #define MAX_SHEEN 255 diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index 6079889d1b..4e47def939 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -7907,14 +7907,14 @@ void AnimTask_AffectionHangedOn(u8 taskId) case FRIENDSHIP_MAX: gBattleAnimArgs[0] = FRIENDSHIP_MAX; break; - case FRIENDSHIP_GE_200: - gBattleAnimArgs[0] = FRIENDSHIP_GE_200; + case FRIENDSHIP_200_TO_254: + gBattleAnimArgs[0] = FRIENDSHIP_200_TO_254; break; - case FRIENDSHIP_GE_150: - gBattleAnimArgs[0] = FRIENDSHIP_GE_150; + case FRIENDSHIP_150_TO_199: + gBattleAnimArgs[0] = FRIENDSHIP_150_TO_199; break; - case FRIENDSHIP_GE_100: - gBattleAnimArgs[0] = FRIENDSHIP_GE_100; + case FRIENDSHIP_100_TO_149: + gBattleAnimArgs[0] = FRIENDSHIP_100_TO_149; break; default: break; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6182e09bab..47b0b2cab7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1733,7 +1733,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u #if B_AFFECTION_MECHANICS == TRUE // With high affection/friendship there's a chance to evade a move by substracting 10% of its accuracy. // I can't find exact information about that chance, so I'm just gonna write it as a 20% chance for now. - if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= FRIENDSHIP_GE_150 && (Random() % 100) <= 20) + if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= FRIENDSHIP_150_TO_199 && (Random() % 100) <= 20) calc = (calc * 90) / 100; #endif @@ -1905,7 +1905,7 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi + 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk) #if B_AFFECTION_MECHANICS == TRUE - + 2 * (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_GE_200) + + 2 * (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_200_TO_254) #endif + (abilityAtk == ABILITY_SUPER_LUCK); @@ -2010,12 +2010,12 @@ static void Cmd_adjustdamage(void) gSpecialStatuses[gBattlerTarget].focusSashed = TRUE; } #if B_AFFECTION_MECHANICS == TRUE - else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && friendshipScore >= FRIENDSHIP_GE_100) + else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && friendshipScore >= FRIENDSHIP_100_TO_149) { if ((friendshipScore == FRIENDSHIP_MAX && rand < 25) - || (friendshipScore == FRIENDSHIP_GE_200 && rand < 20) - || (friendshipScore == FRIENDSHIP_GE_150 && rand < 15) - || (friendshipScore == FRIENDSHIP_GE_100 && rand < 10)) + || (friendshipScore == FRIENDSHIP_200_TO_254 && rand < 20) + || (friendshipScore == FRIENDSHIP_150_TO_199 && rand < 15) + || (friendshipScore == FRIENDSHIP_100_TO_149 && rand < 10)) gSpecialStatuses[gBattlerTarget].affectionEndured = TRUE; } #endif @@ -4062,7 +4062,7 @@ static void Cmd_getexp(void) } #endif #if B_AFFECTION_MECHANICS == TRUE - if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= FRIENDSHIP_GE_50) + if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= FRIENDSHIP_50_TO_99) gBattleMoveDamage = (gBattleMoveDamage * 120) / 100; #endif diff --git a/src/battle_util.c b/src/battle_util.c index eb93f45eec..74893a7099 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2090,15 +2090,15 @@ u32 GetMonFriendshipScore(struct Pokemon *pokemon) if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) return FRIENDSHIP_MAX; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) - return FRIENDSHIP_GE_200; + return FRIENDSHIP_200_TO_254; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) - return FRIENDSHIP_GE_150; + return FRIENDSHIP_150_TO_199; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) - return FRIENDSHIP_GE_100; + return FRIENDSHIP_100_TO_149; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) - return FRIENDSHIP_GE_50; + return FRIENDSHIP_50_TO_99; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) - return FRIENDSHIP_GE_1; + return FRIENDSHIP_1_TO_49; return FRIENDSHIP_NONE; } @@ -2584,7 +2584,7 @@ u8 DoFieldEndTurnEffects(void) { #if B_AFFECTION_MECHANICS == TRUE if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER - && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_GE_150 + && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_150_TO_199 && (Random() % 100 < 20)) { gBattleCommunication[MULTISTRING_CHOOSER] = 1; From 8bd7103b9d7a39c04775d63c3cc1307ab4b2252f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 17:29:02 -0300 Subject: [PATCH 44/51] Even more review corrections --- data/battle_scripts_1.s | 4 +--- include/battle.h | 2 +- src/battle_anim_new.c | 18 +----------------- src/battle_util.c | 14 ++++++++------ 4 files changed, 11 insertions(+), 27 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5cdb44597e..4ba190c5c4 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -421,8 +421,7 @@ BattleScript_AffectionBasedEndurance:: return BattleScript_AffectionBasedStatusHeal:: - jumpifstatus BS_ATTACKER, STATUS1_POISON, BattleScript_AffectionBasedStatus_HealPoisonString - jumpifstatus BS_ATTACKER, STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString + jumpifstatus BS_ATTACKER, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatus_HealSleepString jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatus_HealParalysisString jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatus_HealBurnString @@ -442,7 +441,6 @@ BattleScript_AffectionBasedStatus_HealBurnString: goto BattleScript_AffectionBasedStatusHeal_Continue BattleScript_AffectionBasedStatus_HealFreezeString: printstring STRINGID_ATTACKERMELTEDTHEICE - goto BattleScript_AffectionBasedStatusHeal_Continue BattleScript_AffectionBasedStatusHeal_Continue: waitmessage B_WAIT_TIME_LONG clearstatus BS_ATTACKER diff --git a/include/battle.h b/include/battle.h index 7176b73780..ed77992ab5 100644 --- a/include/battle.h +++ b/include/battle.h @@ -178,13 +178,13 @@ struct SpecialStatus u8 dancerOriginalTarget:3; u8 announceNeutralizingGas:1; // See Cmd_switchineffects u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS + u8 affectionEndured:1; s32 dmg; s32 physicalDmg; s32 specialDmg; u8 physicalBattlerId; u8 specialBattlerId; u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self. - bool8 affectionEndured:1; }; struct SideTimer diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index 4e47def939..b6cc48b918 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -7902,22 +7902,6 @@ void AnimTask_AffectionHangedOn(u8 taskId) int side = GetBattlerSide(gBattleAnimTarget); struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - switch (GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]])) - { - case FRIENDSHIP_MAX: - gBattleAnimArgs[0] = FRIENDSHIP_MAX; - break; - case FRIENDSHIP_200_TO_254: - gBattleAnimArgs[0] = FRIENDSHIP_200_TO_254; - break; - case FRIENDSHIP_150_TO_199: - gBattleAnimArgs[0] = FRIENDSHIP_150_TO_199; - break; - case FRIENDSHIP_100_TO_149: - gBattleAnimArgs[0] = FRIENDSHIP_100_TO_149; - break; - default: - break; - } + gBattleAnimArgs[0] = GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]]); DestroyAnimVisualTask(taskId); } diff --git a/src/battle_util.c b/src/battle_util.c index 74893a7099..dbdecfb178 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2087,17 +2087,19 @@ void TryToRevertMimicry(void) u32 GetMonFriendshipScore(struct Pokemon *pokemon) { - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) + u32 friendshipScore = GetMonData(pokemon, MON_DATA_FRIENDSHIP); + + if (friendshipScore == MAX_FRIENDSHIP) return FRIENDSHIP_MAX; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) + if (friendshipScore >= 200) return FRIENDSHIP_200_TO_254; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) + if (friendshipScore >= 150) return FRIENDSHIP_150_TO_199; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) + if (friendshipScore >= 100) return FRIENDSHIP_100_TO_149; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) + if (friendshipScore >= 50) return FRIENDSHIP_50_TO_99; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) + if (friendshipScore >= 1) return FRIENDSHIP_1_TO_49; return FRIENDSHIP_NONE; From e204527f439824689bb873e2f451cf2321e5025f Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Thu, 25 Aug 2022 15:52:47 -0700 Subject: [PATCH 45/51] changed candy item parameters --- include/constants/items.h | 7 +++++++ src/data/items.h | 12 ++++++------ src/party_menu.c | 2 +- src/pokemon.c | 15 +++++++++++---- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/include/constants/items.h b/include/constants/items.h index 5413a7afef..b6dbc7329b 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -973,6 +973,13 @@ #define MACH_BIKE 0 #define ACRO_BIKE 1 +// Item parameters for EXP Candies +#define EXP_100 1 +#define EXP_800 2 +#define EXP_3000 3 +#define EXP_10000 4 +#define EXP_30000 5 + // Item type IDs (used to determine the exit callback) #define ITEM_USE_MAIL 0 #define ITEM_USE_PARTY_MENU 1 diff --git a/src/data/items.h b/src/data/items.h index 8d08f0fde8..f4be3c6dcb 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1359,7 +1359,7 @@ const struct Item gItems[] = .name = _("Rare Candy"), .itemId = ITEM_RARE_CANDY, .price = 10000, - .holdEffectParam = 0xFF, + .holdEffectParam = 0, .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1372,7 +1372,7 @@ const struct Item gItems[] = .name = _("Exp.Candy XS"), .itemId = ITEM_EXP_CANDY_XS, .price = 20, - .holdEffectParam = 0, + .holdEffectParam = EXP_100, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1385,7 +1385,7 @@ const struct Item gItems[] = .name = _("Exp.Candy S"), .itemId = ITEM_EXP_CANDY_S, .price = 240, - .holdEffectParam = 1, + .holdEffectParam = EXP_800, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1398,7 +1398,7 @@ const struct Item gItems[] = .name = _("Exp.Candy M"), .itemId = ITEM_EXP_CANDY_M, .price = 1000, - .holdEffectParam = 2, + .holdEffectParam = EXP_3000, .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1411,7 +1411,7 @@ const struct Item gItems[] = .name = _("Exp.Candy L"), .itemId = ITEM_EXP_CANDY_L, .price = 3000, - .holdEffectParam = 3, + .holdEffectParam = EXP_10000, .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, @@ -1424,7 +1424,7 @@ const struct Item gItems[] = .name = _("Exp.Candy XL"), .itemId = ITEM_EXP_CANDY_XL, .price = 10000, - .holdEffectParam = 4, + .holdEffectParam = EXP_30000, .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, diff --git a/src/party_menu.c b/src/party_menu.c index 07d4d9a155..abfcc05512 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5012,7 +5012,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) if (sFinalLevel > sInitialLevel) { PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); - ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar2, sFinalLevel, STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); DisplayPartyMenuMessage(gStringVar4, TRUE); ScheduleBgCopyTilemapToVram(2); diff --git a/src/pokemon.c b/src/pokemon.c index ca519729d5..956a870686 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4709,7 +4709,13 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, } // EXP candies store an index for this table in their holdEffectParam. -static const u32 sExpCandyExperienceTable[] = {100, 800, 3000, 10000, 30000}; +static const u32 sExpCandyExperienceTable[] = { + [EXP_100 - 1] = 100, + [EXP_800 - 1] = 800, + [EXP_3000 - 1] = 3000, + [EXP_10000 - 1] = 10000, + [EXP_30000 - 1] = 30000, +}; // Returns TRUE if the item has no effect on the Pokémon, FALSE otherwise bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) @@ -4881,15 +4887,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { u8 param = ItemId_GetHoldEffectParam(item); - if (param == 0xFF) // Rare Candy + if (param == 0) // Rare Candy { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; } else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies { + u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); dataUnsigned = sExpCandyExperienceTable[param] + GetMonData(mon, MON_DATA_EXP, NULL); - if (dataUnsigned > gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]) - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][MAX_LEVEL]; + if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]) + dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]; } SetMonData(mon, MON_DATA_EXP, &dataUnsigned); CalculateMonStats(mon); From 410045028ab765cf9006e3f3c75b2d5b15440f48 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 25 Aug 2022 20:01:14 -0300 Subject: [PATCH 46/51] Optimized General_AffectionHangedOn --- data/battle_anim_scripts.s | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 0649fe50b1..a7e3f34612 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24891,35 +24891,14 @@ General_AffectionHangedOn:: createvisualtask AnimTask_SwayMon, 5, 0, 12, 4096, 4, ANIM_ATTACKER delay 15 launchtask AnimTask_AffectionHangedOn 0x5 0x0 - jumpargeq 0x0, FRIENDSHIP_MAX, General_AffectionHangedOn_6Hearts - jumpargeq 0x0, FRIENDSHIP_200_TO_254, General_AffectionHangedOn_5Hearts - jumpargeq 0x0, FRIENDSHIP_150_TO_199, General_AffectionHangedOn_4Hearts jumpargeq 0x0, FRIENDSHIP_100_TO_149, General_AffectionHangedOn_3Hearts - end -General_AffectionHangedOn_6Hearts: - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -128, -22 + jumpargeq 0x0, FRIENDSHIP_150_TO_199, General_AffectionHangedOn_4Hearts + jumpargeq 0x0, FRIENDSHIP_200_TO_254, General_AffectionHangedOn_5Hearts createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -384, -31 - waitforvisualfinish - end General_AffectionHangedOn_5Hearts: - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -128, -22 - waitforvisualfinish - end General_AffectionHangedOn_4Hearts: - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 - createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 - waitforvisualfinish - end General_AffectionHangedOn_3Hearts: createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 From 4c999b40b1cf64da02ae2c1377243e3d28f07c33 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 25 Aug 2022 22:35:22 -0400 Subject: [PATCH 47/51] Enable BUGFIX by default --- include/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index 3f67d043c7..d4a71c0766 100644 --- a/include/config.h +++ b/include/config.h @@ -26,7 +26,7 @@ #endif // Uncomment to fix some identified minor bugs -//#define BUGFIX +#define BUGFIX // Various undefined behavior bugs may or may not prevent compilation with // newer compilers. So always fix them when using a modern compiler. From 6b414d9555d443e6de28805ab2d64bfb5f3c94ec Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 25 Aug 2022 22:40:19 -0400 Subject: [PATCH 48/51] Apply suggestions from code review Co-authored-by: LOuroboros --- include/constants/items.h | 6 +++--- src/data/items.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/constants/items.h b/include/constants/items.h index b6dbc7329b..1448bf5914 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -974,9 +974,9 @@ #define ACRO_BIKE 1 // Item parameters for EXP Candies -#define EXP_100 1 -#define EXP_800 2 -#define EXP_3000 3 +#define EXP_100 1 +#define EXP_800 2 +#define EXP_3000 3 #define EXP_10000 4 #define EXP_30000 5 diff --git a/src/data/items.h b/src/data/items.h index f4be3c6dcb..ccd6aaee28 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1359,7 +1359,6 @@ const struct Item gItems[] = .name = _("Rare Candy"), .itemId = ITEM_RARE_CANDY, .price = 10000, - .holdEffectParam = 0, .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, From 57d583b783a2e8cc77ccc927b2a39f43060613dd Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 25 Aug 2022 22:49:23 -0400 Subject: [PATCH 49/51] Fixed call to sExpCandyExperienceTable --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 956a870686..35522c9ab1 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4894,7 +4894,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - dataUnsigned = sExpCandyExperienceTable[param] + GetMonData(mon, MON_DATA_EXP, NULL); + dataUnsigned = sExpCandyExperienceTable[param - 1] + GetMonData(mon, MON_DATA_EXP, NULL); if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]) dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]; } From 77e2a2da3215d3651a398f79cef0ad658b52255e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 25 Aug 2022 23:19:46 -0400 Subject: [PATCH 50/51] Fixed Net Ball Gen 7+ multiplier --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5ef95d1ac5..cdf0e30ea7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13675,7 +13675,7 @@ static void Cmd_handleballthrow(void) case ITEM_NET_BALL: if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_WATER) || IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_BUG)) #if B_NET_BALL_MODIFIER >= GEN_7 - ballMultiplier = 50; + ballMultiplier = 35; #else ballMultiplier = 30; #endif From bd81841c303598d1f4507a04a122a31c28259ada Mon Sep 17 00:00:00 2001 From: SomeLoserThatCantPickOriginalUsernames Date: Fri, 26 Aug 2022 17:47:45 -0700 Subject: [PATCH 51/51] Fix Escape Rope Message when on gen 8 mechanics --- src/item_use.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/item_use.c b/src/item_use.c index 7cc4bb32d3..16ff1b85c9 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -922,6 +922,9 @@ static void ItemUseOnFieldCB_EscapeRope(u8 taskId) Overworld_ResetStateAfterDigEscRope(); #if I_KEY_ESCAPE_ROPE < GEN_8 RemoveUsedItem(); + #else + CopyItemName(gSpecialVar_ItemId, gStringVar2); + StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2); #endif gTasks[taskId].data[0] = 0; DisplayItemMessageOnField(taskId, gStringVar4, Task_UseDigEscapeRopeOnField);