From 620e69945d1dea0f5429e7fd1e3330704711a10b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 20 Oct 2022 13:14:32 -0300 Subject: [PATCH 001/229] Form change for starting and ending battles. Adjusted PP for Iron Head/Behemoth moves --- include/battle_util.h | 1 + include/pokemon.h | 2 +- src/battle_main.c | 20 +---- src/battle_script_commands.c | 4 +- src/battle_util.c | 20 +++-- src/data/pokemon/form_change_table_pointers.h | 33 ++++++++ src/data/pokemon/form_change_tables.h | 75 +++++++++++++++++++ src/pokemon.c | 35 ++++----- 8 files changed, 146 insertions(+), 44 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index a456cc1e63..59ddad9406 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -150,6 +150,7 @@ u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 bool32 CanMegaEvolve(u8 battlerId); void UndoMegaEvolution(u32 monId); void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut); +void BattleFormChange(u32 monId, u32 side, u16 method); bool32 DoBattlersShareType(u32 battler1, u32 battler2); bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId); struct Pokemon *GetIllusionMonPtr(u32 battlerId); diff --git a/include/pokemon.h b/include/pokemon.h index c4015d5621..fa5bfc663e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -564,7 +564,7 @@ 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); -void TryToSetBattleFormChangeMoves(struct Pokemon *mon); +void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method); u32 GetMonFriendshipScore(struct Pokemon *pokemon); #endif // GUARD_POKEMON_H diff --git a/src/battle_main.c b/src/battle_main.c index 5b6e724c90..9d75e901c0 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -602,21 +602,9 @@ static void CB2_InitBattleInternal(void) for (i = 0; i < PARTY_SIZE; i++) { // Player's side - targetSpecies = GetFormChangeTargetSpecies(&gPlayerParty[i], FORM_BATTLE_BEGIN, 0); - if (targetSpecies != SPECIES_NONE) - { - SetMonData(&gPlayerParty[i], MON_DATA_SPECIES, &targetSpecies); - CalculateMonStats(&gPlayerParty[i]); - TryToSetBattleFormChangeMoves(&gPlayerParty[i]); - } + BattleFormChange(i, B_SIDE_PLAYER, FORM_BATTLE_BEGIN); // Opponent's side - targetSpecies = GetFormChangeTargetSpecies(&gEnemyParty[i], FORM_BATTLE_BEGIN, 0); - if (targetSpecies != SPECIES_NONE) - { - SetMonData(&gEnemyParty[i], MON_DATA_SPECIES, &targetSpecies); - CalculateMonStats(&gEnemyParty[i]); - TryToSetBattleFormChangeMoves(&gEnemyParty[i]); - } + BattleFormChange(i, B_SIDE_OPPONENT, FORM_BATTLE_BEGIN); } gBattleCommunication[MULTIUSE_STATE] = 0; @@ -3264,7 +3252,7 @@ void FaintClearSetData(void) UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); gBattleStruct->overwrittenAbilities[gActiveBattler] = ABILITY_NONE; - + // If the fainted mon was involved in a Sky Drop if (gBattleStruct->skyDropTargets[gActiveBattler] != 0xFF) { @@ -5219,7 +5207,7 @@ static void HandleEndTurn_FinishBattle(void) for (i = 0; i < PARTY_SIZE; i++) { UndoMegaEvolution(i); - UndoFormChange(i, B_SIDE_PLAYER, FALSE); + BattleFormChange(i, B_SIDE_PLAYER, FORM_BATTLE_END); DoBurmyFormChange(i); } #if B_RECALCULATE_STATS >= GEN_5 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index eaa7bbde1a..bfc9bfc42f 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14109,7 +14109,7 @@ static void Cmd_handleballthrow(void) { BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); - UndoFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FALSE); + BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -14163,7 +14163,7 @@ static void Cmd_handleballthrow(void) if (IsCriticalCapture()) gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - UndoFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FALSE); + BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); diff --git a/src/battle_util.c b/src/battle_util.c index 9dbdb1abfc..92f79cd8d1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9726,15 +9726,19 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut) break; } } - if (!isSwitchingOut) +} + +void BattleFormChange(u32 monId, u32 side, u16 method) +{ + u32 targetSpecies; + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); + if (targetSpecies != SPECIES_NONE) { - targetSpecies = GetFormChangeTargetSpecies(&party[monId], FORM_BATTLE_END, 0); - if (targetSpecies != SPECIES_NONE) - { - SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); - CalculateMonStats(&party[monId]); - TryToSetBattleFormChangeMoves(&party[monId]); - } + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); + CalculateMonStats(&party[monId]); } } diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 90be7112b6..63971f1325 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -25,6 +25,10 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, #endif #if P_GEN_5_POKEMON == TRUE + [SPECIES_DARMANITAN] = sDarmanitanFormChangeTable, + [SPECIES_DARMANITAN_ZEN_MODE] = sDarmanitanFormChangeTable, + [SPECIES_DARMANITAN_GALARIAN] = sDarmanitanGalarianFormChangeTable, + [SPECIES_DARMANITAN_ZEN_MODE_GALARIAN] = sDarmanitanGalarianFormChangeTable, [SPECIES_TORNADUS] = sTornadusFormChangeTable, [SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable, [SPECIES_THUNDURUS] = sThundurusFormChangeTable, @@ -33,6 +37,8 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable, [SPECIES_KELDEO] = sKeldeoFormChangeTable, [SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable, + [SPECIES_MELOETTA] = sMeloettaFormChangeTable, + [SPECIES_MELOETTA_PIROUETTE] = sMeloettaFormChangeTable, [SPECIES_GENESECT] = sGenesectFormChangeTable, [SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable, [SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable, @@ -40,6 +46,10 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_GENESECT_CHILL_DRIVE] = sGenesectFormChangeTable, #endif #if P_GEN_6_POKEMON == TRUE + [SPECIES_GRENINJA_BATTLE_BOND] = sGreninjaBattleBondFormChangeTable, + [SPECIES_GRENINJA_ASH] = sGreninjaBattleBondFormChangeTable, + [SPECIES_AEGISLASH] = sAegislashFormChangeTable, + [SPECIES_AEGISLASH_BLADE] = sAegislashFormChangeTable, [SPECIES_XERNEAS] = sXerneasFormChangeTable, [SPECIES_XERNEAS_ACTIVE] = sXerneasFormChangeTable, [SPECIES_HOOPA] = sHoopaFormChangeTable, @@ -50,6 +60,8 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ORICORIO_POM_POM] = sOricorioFormChangeTable, [SPECIES_ORICORIO_PAU] = sOricorioFormChangeTable, [SPECIES_ORICORIO_SENSU] = sOricorioFormChangeTable, + [SPECIES_WISHIWASHI] = sWishiwashiFormChangeTable, + [SPECIES_WISHIWASHI_SCHOOL] = sWishiwashiFormChangeTable, [SPECIES_SILVALLY] = sSilvallyFormChangeTable, [SPECIES_SILVALLY_BUG] = sSilvallyFormChangeTable, [SPECIES_SILVALLY_DARK] = sSilvallyFormChangeTable, @@ -68,8 +80,29 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_SILVALLY_ROCK] = sSilvallyFormChangeTable, [SPECIES_SILVALLY_STEEL] = sSilvallyFormChangeTable, [SPECIES_SILVALLY_WATER] = sSilvallyFormChangeTable, + [SPECIES_MIMIKYU] = sMimikyuFormChangeTable, + [SPECIES_MIMIKYU_BUSTED] = sMimikyuFormChangeTable, + [SPECIES_MINIOR] = sMiniorRedFormChangeTable, + [SPECIES_MINIOR_CORE_RED] = sMiniorRedFormChangeTable, + [SPECIES_MINIOR_METEOR_BLUE] = sMiniorBlueFormChangeTable, + [SPECIES_MINIOR_CORE_BLUE] = sMiniorBlueFormChangeTable, + [SPECIES_MINIOR_METEOR_GREEN] = sMiniorGreenFormChangeTable, + [SPECIES_MINIOR_CORE_GREEN] = sMiniorGreenFormChangeTable, + [SPECIES_MINIOR_METEOR_INDIGO] = sMiniorIndigoFormChangeTable, + [SPECIES_MINIOR_CORE_INDIGO] = sMiniorIndigoFormChangeTable, + [SPECIES_MINIOR_METEOR_ORANGE] = sMiniorOrangeFormChangeTable, + [SPECIES_MINIOR_CORE_ORANGE] = sMiniorOrangeFormChangeTable, + [SPECIES_MINIOR_METEOR_VIOLET] = sMiniorVioletFormChangeTable, + [SPECIES_MINIOR_CORE_VIOLET] = sMiniorVioletFormChangeTable, + [SPECIES_MINIOR_METEOR_YELLOW] = sMiniorYellowFormChangeTable, + [SPECIES_MINIOR_CORE_YELLOW] = sMiniorYellowFormChangeTable, #endif #if P_GEN_8_POKEMON == TRUE + [SPECIES_CRAMORANT] = sCramorantFormChangeTable, + [SPECIES_CRAMORANT_GULPING] = sCramorantFormChangeTable, + [SPECIES_CRAMORANT_GORGING] = sCramorantFormChangeTable, + [SPECIES_MORPEKO] = sMorpekoFormChangeTable, + [SPECIES_MORPEKO_HANGRY] = sMorpekoFormChangeTable, [SPECIES_ZACIAN] = sZacianFormChangeTable, [SPECIES_ZACIAN_CROWNED_SWORD] = sZacianFormChangeTable, [SPECIES_ZAMAZENTA] = sZamazentaFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 94da0add36..551b7484d9 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -97,6 +97,22 @@ static const struct FormChange sArceusFormChangeTable[] = { #endif #if P_GEN_5_POKEMON == TRUE + +static const struct FormChange sDarmanitanFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_DARMANITAN}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMeloettaFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MELOETTA}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sTornadusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, @@ -132,6 +148,16 @@ static const struct FormChange sGenesectFormChangeTable[] = { #endif #if P_GEN_6_POKEMON == TRUE +static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAegislashFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_AEGISLASH}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sXerneasFormChangeTable[] = { {FORM_BATTLE_BEGIN, SPECIES_XERNEAS_ACTIVE}, {FORM_BATTLE_END, SPECIES_XERNEAS, }, @@ -153,6 +179,10 @@ static const struct FormChange sOricorioFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_ORICORIO_SENSU, ITEM_PURPLE_NECTAR}, {FORM_CHANGE_END}, }; +static const struct FormChange sWishiwashiFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_WISHIWASHI}, + {FORM_CHANGE_END}, +}; static const struct FormChange sSilvallyFormChangeTable[] = { {FORM_ITEM_HOLD, SPECIES_SILVALLY, ITEM_NONE, ABILITY_RKS_SYSTEM}, @@ -175,9 +205,54 @@ static const struct FormChange sSilvallyFormChangeTable[] = { {FORM_ITEM_HOLD, SPECIES_SILVALLY_FAIRY, ITEM_FAIRY_MEMORY, ABILITY_RKS_SYSTEM}, {FORM_CHANGE_END}, }; + +static const struct FormChange sMimikyuFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MIMIKYU}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMiniorRedFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorBlueFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorGreenFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorIndigoFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorOrangeFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorVioletFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_END}, +}; +static const struct FormChange sMiniorYellowFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_END}, +}; + #endif #if P_GEN_8_POKEMON == TRUE +static const struct FormChange sCramorantFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_CRAMORANT}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMorpekoFormChangeTable[] = { + {FORM_BATTLE_END, SPECIES_MORPEKO}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sZacianFormChangeTable[] = { {FORM_BATTLE_BEGIN, SPECIES_ZACIAN_CROWNED_SWORD, ITEM_RUSTED_SWORD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BLADE}, {FORM_BATTLE_END, SPECIES_ZACIAN, ITEM_RUSTED_SWORD, MOVE_BEHEMOTH_BLADE, MOVE_IRON_HEAD}, diff --git a/src/pokemon.c b/src/pokemon.c index 98ac992560..1a748fb24a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4096,6 +4096,17 @@ void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot) SetMonData(mon, MON_DATA_PP1 + slot, &gBattleMoves[move].pp); } +static void SetMonMoveSlot_KeepPP(struct Pokemon *mon, u16 move, u8 slot) +{ + u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); + u8 currPP = GetMonData(mon, MON_DATA_PP1 + slot, NULL); + u8 newPP = CalculatePPWithBonus(move, ppBonuses, slot); + u8 finalPP = min(currPP, newPP); + + SetMonData(mon, MON_DATA_MOVE1 + slot, &move); + SetMonData(mon, MON_DATA_PP1 + slot, &finalPP); +} + void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot) { mon->moves[slot] = move; @@ -8474,20 +8485,21 @@ bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } -void TryToSetBattleFormChangeMoves(struct Pokemon *mon) +void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) { int i, j; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); const struct FormChange *formChanges = gFormChangeTablePointers[species]; - u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - if (formChanges == NULL) + if (formChanges == NULL || (method != FORM_BATTLE_BEGIN && method != FORM_BATTLE_END)) return; for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) { - if ((formChanges[i].method == FORM_BATTLE_BEGIN || formChanges[i].method == FORM_BATTLE_END) - && formChanges[i].param2 && formChanges[i].param3 && formChanges[i].targetSpecies == species) + if (formChanges[i].method == method + && formChanges[i].param2 + && formChanges[i].param3 + && formChanges[i].targetSpecies != species) { u16 originalMove = formChanges[i].param2; u16 newMove = formChanges[i].param3; @@ -8495,20 +8507,9 @@ void TryToSetBattleFormChangeMoves(struct Pokemon *mon) for (j = 0; j < MAX_MON_MOVES; j++) { u16 currMove = GetMonData(mon, MON_DATA_MOVE1 + j, NULL); - u8 totalPp = gBattleMoves[currMove].pp; // Get current move's max PP - u8 currPp = GetMonData(mon, MON_DATA_PP1 + j, NULL); // Get current move's remaining PP - u8 diffPp = totalPp - currPp; // Current move's PP difference - u8 finalPp = gBattleMoves[newMove].pp - diffPp; // Apply the PP difference to the new move - if (currMove == originalMove) - { - if (finalPp > gBattleMoves[newMove].pp) - finalPp = 0; - SetMonMoveSlot(mon, newMove, j); - SetMonData(mon, MON_DATA_PP1 + j, &finalPp); - } + SetMonMoveSlot_KeepPP(mon, newMove, j); } - SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); break; } } From ff494edb85ce17bec2b1ecb2163305b195678566 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 20 Oct 2022 16:57:34 -0300 Subject: [PATCH 002/229] Refactored ItemUseOutOfBattle_FormChange to not use secondaryId --- src/data/items.h | 27 ++++++++------------------- src/party_menu.c | 2 +- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index b0b53c31f5..78d2e72aba 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -3193,7 +3193,6 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse, - .secondaryId = FORM_ITEM_USE, .flingPower = 10, }, @@ -3207,7 +3206,6 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse, - .secondaryId = FORM_ITEM_USE, .flingPower = 10, }, @@ -3221,7 +3219,6 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse, - .secondaryId = FORM_ITEM_USE, .flingPower = 10, }, @@ -3235,7 +3232,6 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse, - .secondaryId = FORM_ITEM_USE, .flingPower = 10, }, @@ -9071,7 +9067,6 @@ const struct Item gItems[] = .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, }, [ITEM_REVEAL_GLASS] = @@ -9083,7 +9078,6 @@ const struct Item gItems[] = .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, }, [ITEM_DNA_SPLICERS] = @@ -9093,9 +9087,8 @@ const struct Item gItems[] = .price = 0, .description = sDNASplicersDesc, .pocket = POCKET_KEY_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion }, [ITEM_ZYGARDE_CUBE] = @@ -9119,7 +9112,6 @@ const struct Item gItems[] = .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, }, [ITEM_N_SOLARIZER] = @@ -9129,9 +9121,8 @@ const struct Item gItems[] = .price = 0, .description = sNSolarizerDesc, .pocket = POCKET_KEY_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion }, [ITEM_N_LUNARIZER] = @@ -9141,9 +9132,8 @@ const struct Item gItems[] = .price = 0, .description = sNLunarizerDesc, .pocket = POCKET_KEY_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion }, [ITEM_REINS_OF_UNITY] = @@ -9153,9 +9143,8 @@ const struct Item gItems[] = .price = 0, .description = sReinsOfUnityDesc, .pocket = POCKET_KEY_ITEMS, - .type = ITEM_USE_PARTY_MENU, - .fieldUseFunc = ItemUseOutOfBattle_FormChange, - .secondaryId = FORM_ITEM_USE, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion }, // Battle Mechanic Key Items diff --git a/src/party_menu.c b/src/party_menu.c index eaeadabab0..3c8b163c54 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5591,7 +5591,7 @@ static void Task_TryItemUseFormChange(u8 taskId) bool32 TryItemUseFormChange(u8 taskId, TaskFunc task) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - u16 targetSpecies = GetFormChangeTargetSpecies(mon, ItemId_GetSecondaryId(gSpecialVar_ItemId), gSpecialVar_ItemId); + u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_USE, gSpecialVar_ItemId); if (targetSpecies != SPECIES_NONE) { From b74f0777daf19a01fa4892000bab55a6f6285403 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 20 Oct 2022 17:22:58 -0300 Subject: [PATCH 003/229] Renamed form change constants --- include/constants/pokemon.h | 14 +- src/battle_main.c | 6 +- src/battle_script_commands.c | 4 +- src/data/pokemon/form_change_tables.h | 216 +++++++++++++------------- src/daycare.c | 2 +- src/party_menu.c | 4 +- src/pokemon.c | 12 +- src/pokemon_storage_system.c | 2 +- src/script_pokemon_util.c | 2 +- 9 files changed, 131 insertions(+), 131 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 5167f5f55f..cacbdc55c0 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -317,13 +317,13 @@ #define EVO_MODE_OVERWORLD_SPECIAL 5 // Form change types -#define FORM_CHANGE_END 0 -#define FORM_ITEM_HOLD 1 -#define FORM_ITEM_USE 2 -#define FORM_MOVE 3 -#define FORM_WITHDRAW 4 -#define FORM_BATTLE_BEGIN 5 -#define FORM_BATTLE_END 6 +#define FORM_CHANGE_END 0 +#define FORM_CHANGE_ITEM_HOLD 1 +#define FORM_CHANGE_ITEM_USE 2 +#define FORM_CHANGE_MOVE 3 +#define FORM_CHANGE_WITHDRAW 4 +#define FORM_CHANGE_BATTLE_BEGIN 5 +#define FORM_CHANGE_BATTLE_END 6 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 diff --git a/src/battle_main.c b/src/battle_main.c index 9d75e901c0..8a3cbcfcdb 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -602,9 +602,9 @@ static void CB2_InitBattleInternal(void) for (i = 0; i < PARTY_SIZE; i++) { // Player's side - BattleFormChange(i, B_SIDE_PLAYER, FORM_BATTLE_BEGIN); + BattleFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_BEGIN); // Opponent's side - BattleFormChange(i, B_SIDE_OPPONENT, FORM_BATTLE_BEGIN); + BattleFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BATTLE_BEGIN); } gBattleCommunication[MULTIUSE_STATE] = 0; @@ -5207,7 +5207,7 @@ static void HandleEndTurn_FinishBattle(void) for (i = 0; i < PARTY_SIZE; i++) { UndoMegaEvolution(i); - BattleFormChange(i, B_SIDE_PLAYER, FORM_BATTLE_END); + BattleFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); DoBurmyFormChange(i); } #if B_RECALCULATE_STATS >= GEN_5 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index bfc9bfc42f..060a9e7170 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14109,7 +14109,7 @@ static void Cmd_handleballthrow(void) { BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); - BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_BATTLE_END), + BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -14163,7 +14163,7 @@ static void Cmd_handleballthrow(void) if (IsCriticalCapture()) gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_BATTLE_END), + BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 551b7484d9..1f2e926bb3 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,97 +1,97 @@ /* -FORM_ITEM_HOLD: +FORM_CHANGE_ITEM_HOLD: Form change activates when the specified item is given to or taken from the selected Pokémon. Alternatively, form change activates when the specified item is is given to or taken from the selected Pokémon that has a particular ability. param1 = item to hold param2 = ability to check for, optional -FORM_ITEM_USE: +FORM_CHANGE_ITEM_USE: Form change activates when the item is used on the selected Pokémon. param1 = item to use param2 = DAY if form change activates in the daytime, optional NIGHT if form change activates at nighttime, optional -FORM_MOVE: +FORM_CHANGE_MOVE: Form change activates when the Pokémon learns or forgets the move. param1 = move to check for param2 = WHEN_LEARNED if form change activates when move is forgotten WHEN_FORGOTTEN if form change activates when move is learned -FORM_WITHDRAW: +FORM_CHANGE_WITHDRAW: Form change activates when the Pokémon is withdrawn from the PC or Daycare. no parameters -FORM_BATTLE_BEGIN: +FORM_CHANGE_BATTLE_BEGIN: Form change activates when the Pokémon is sent out at the beginning of a battle param1 = item to hold, optional param2 = a move that will be replaced, optional param3 = a new move to replace it with, optional -FORM_BATTLE_END: +FORM_CHANGE_BATTLE_END: Form change activates at the end of a battle param1 = item to hold, optional param2 = a move that will be replaced, optional param3 = a new move to replace it with, optional */ -// FORM_MOVE param2 Arguments +// FORM_CHANGE_MOVE param2 Arguments #define WHEN_LEARNED 0 #define WHEN_FORGOTTEN 1 -// FORM_ITEM_USE param2 Arguments +// FORM_CHANGE_ITEM_USE param2 Arguments #define DAY 1 #define NIGHT 2 #if P_GEN_4_POKEMON == TRUE static const struct FormChange sGiratinaFormChangeTable[] = { - {FORM_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, - {FORM_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, {FORM_CHANGE_END}, }; static const struct FormChange sShayminFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY}, - // {FORM_WITHDRAW, SPECIES_SHAYMIN}, + {FORM_CHANGE_ITEM_USE, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY}, + // {FORM_CHANGE_WITHDRAW, SPECIES_SHAYMIN}, {FORM_CHANGE_END}, }; static const struct FormChange sArceusFormChangeTable[] = { - {FORM_ITEM_HOLD, SPECIES_ARCEUS, ITEM_NONE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FIGHTING, ITEM_FIST_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FIGHTING, ITEM_FIGHTINIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FLYING, ITEM_SKY_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FLYING, ITEM_FLYINIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_POISON, ITEM_TOXIC_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_POISON, ITEM_POISONIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ROCK, ITEM_STONE_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ROCK, ITEM_ROCKIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GROUND, ITEM_EARTH_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GROUND, ITEM_GROUNDIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_BUG, ITEM_INSECT_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_BUG, ITEM_BUGINIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GHOST, ITEM_SPOOKY_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GHOST, ITEM_GHOSTIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_STEEL, ITEM_IRON_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_STEEL, ITEM_STEELIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FIRE, ITEM_FLAME_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FIRE, ITEM_FIRIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_WATER, ITEM_SPLASH_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_WATER, ITEM_WATERIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GRASS, ITEM_MEADOW_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_GRASS, ITEM_GRASSIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ELECTRIC, ITEM_ZAP_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ELECTRIC, ITEM_ELECTRIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_PSYCHIC, ITEM_MIND_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_PSYCHIC, ITEM_PSYCHIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ICE, ITEM_ICICLE_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_ICE, ITEM_ICIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_DRAGON, ITEM_DRACO_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_DRAGON, ITEM_DRAGONIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_DARK, ITEM_DREAD_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_DARK, ITEM_DARKINIUM_Z, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_PIXIE_PLATE, ABILITY_MULTITYPE}, - {FORM_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_FAIRIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS, ITEM_NONE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FIGHTING, ITEM_FIST_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FIGHTING, ITEM_FIGHTINIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FLYING, ITEM_SKY_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FLYING, ITEM_FLYINIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_POISON, ITEM_TOXIC_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_POISON, ITEM_POISONIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ROCK, ITEM_STONE_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ROCK, ITEM_ROCKIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GROUND, ITEM_EARTH_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GROUND, ITEM_GROUNDIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_BUG, ITEM_INSECT_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_BUG, ITEM_BUGINIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GHOST, ITEM_SPOOKY_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GHOST, ITEM_GHOSTIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_STEEL, ITEM_IRON_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_STEEL, ITEM_STEELIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FIRE, ITEM_FLAME_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FIRE, ITEM_FIRIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_WATER, ITEM_SPLASH_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_WATER, ITEM_WATERIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GRASS, ITEM_MEADOW_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_GRASS, ITEM_GRASSIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ELECTRIC, ITEM_ZAP_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ELECTRIC, ITEM_ELECTRIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_PSYCHIC, ITEM_MIND_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_PSYCHIC, ITEM_PSYCHIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ICE, ITEM_ICICLE_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_ICE, ITEM_ICIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_DRAGON, ITEM_DRACO_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_DRAGON, ITEM_DRAGONIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_DARK, ITEM_DREAD_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_DARK, ITEM_DARKINIUM_Z, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_PIXIE_PLATE, ABILITY_MULTITYPE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_FAIRIUM_Z, ABILITY_MULTITYPE}, {FORM_CHANGE_END}, }; #endif @@ -99,144 +99,144 @@ static const struct FormChange sArceusFormChangeTable[] = { #if P_GEN_5_POKEMON == TRUE static const struct FormChange sDarmanitanFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, {FORM_CHANGE_END}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_END}, }; static const struct FormChange sMeloettaFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MELOETTA}, + {FORM_CHANGE_BATTLE_END, SPECIES_MELOETTA}, {FORM_CHANGE_END}, }; static const struct FormChange sTornadusFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sThundurusFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sLandorusFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sKeldeoFormChangeTable[] = { - // {FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, - // {FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, + // {FORM_CHANGE_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, + // {FORM_CHANGE_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, {FORM_CHANGE_END}, }; static const struct FormChange sGenesectFormChangeTable[] = { - {FORM_ITEM_HOLD, SPECIES_GENESECT, ITEM_NONE}, - {FORM_ITEM_HOLD, SPECIES_GENESECT_DOUSE_DRIVE, ITEM_DOUSE_DRIVE}, - {FORM_ITEM_HOLD, SPECIES_GENESECT_SHOCK_DRIVE, ITEM_SHOCK_DRIVE}, - {FORM_ITEM_HOLD, SPECIES_GENESECT_BURN_DRIVE, ITEM_BURN_DRIVE}, - {FORM_ITEM_HOLD, SPECIES_GENESECT_CHILL_DRIVE, ITEM_CHILL_DRIVE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT, ITEM_NONE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_DOUSE_DRIVE, ITEM_DOUSE_DRIVE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_SHOCK_DRIVE, ITEM_SHOCK_DRIVE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_BURN_DRIVE, ITEM_BURN_DRIVE}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_CHILL_DRIVE, ITEM_CHILL_DRIVE}, {FORM_CHANGE_END}, }; #endif #if P_GEN_6_POKEMON == TRUE static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, {FORM_CHANGE_END}, }; static const struct FormChange sAegislashFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_AEGISLASH}, + {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, {FORM_CHANGE_END}, }; static const struct FormChange sXerneasFormChangeTable[] = { - {FORM_BATTLE_BEGIN, SPECIES_XERNEAS_ACTIVE}, - {FORM_BATTLE_END, SPECIES_XERNEAS, }, + {FORM_CHANGE_BATTLE_BEGIN, SPECIES_XERNEAS_ACTIVE}, + {FORM_CHANGE_BATTLE_END, SPECIES_XERNEAS, }, {FORM_CHANGE_END}, }; static const struct FormChange sHoopaFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, - // {FORM_WITHDRAW, SPECIES_HOOPA}, + {FORM_CHANGE_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, + // {FORM_CHANGE_WITHDRAW, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; #endif #if P_GEN_7_POKEMON == TRUE static const struct FormChange sOricorioFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_ORICORIO, ITEM_RED_NECTAR}, - {FORM_ITEM_USE, SPECIES_ORICORIO_POM_POM, ITEM_YELLOW_NECTAR}, - {FORM_ITEM_USE, SPECIES_ORICORIO_PAU, ITEM_PINK_NECTAR}, - {FORM_ITEM_USE, SPECIES_ORICORIO_SENSU, ITEM_PURPLE_NECTAR}, + {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO, ITEM_RED_NECTAR}, + {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_POM_POM, ITEM_YELLOW_NECTAR}, + {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_PAU, ITEM_PINK_NECTAR}, + {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_SENSU, ITEM_PURPLE_NECTAR}, {FORM_CHANGE_END}, }; static const struct FormChange sWishiwashiFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, {FORM_CHANGE_END}, }; static const struct FormChange sSilvallyFormChangeTable[] = { - {FORM_ITEM_HOLD, SPECIES_SILVALLY, ITEM_NONE, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_FIGHTING, ITEM_FIGHTING_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_FLYING, ITEM_FLYING_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_POISON, ITEM_POISON_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_GROUND, ITEM_GROUND_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_ROCK, ITEM_ROCK_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_BUG, ITEM_BUG_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_GHOST, ITEM_GHOST_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_STEEL, ITEM_STEEL_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_FIRE, ITEM_FIRE_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_WATER, ITEM_WATER_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_GRASS, ITEM_GRASS_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_ELECTRIC, ITEM_ELECTRIC_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_PSYCHIC, ITEM_PSYCHIC_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_ICE, ITEM_ICE_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_DRAGON, ITEM_DRAGON_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_DARK, ITEM_DARK_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_ITEM_HOLD, SPECIES_SILVALLY_FAIRY, ITEM_FAIRY_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY, ITEM_NONE, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_FIGHTING, ITEM_FIGHTING_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_FLYING, ITEM_FLYING_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_POISON, ITEM_POISON_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_GROUND, ITEM_GROUND_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_ROCK, ITEM_ROCK_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_BUG, ITEM_BUG_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_GHOST, ITEM_GHOST_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_STEEL, ITEM_STEEL_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_FIRE, ITEM_FIRE_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_WATER, ITEM_WATER_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_GRASS, ITEM_GRASS_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_ELECTRIC, ITEM_ELECTRIC_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_PSYCHIC, ITEM_PSYCHIC_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_ICE, ITEM_ICE_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_DRAGON, ITEM_DRAGON_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_DARK, ITEM_DARK_MEMORY, ABILITY_RKS_SYSTEM}, + {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_FAIRY, ITEM_FAIRY_MEMORY, ABILITY_RKS_SYSTEM}, {FORM_CHANGE_END}, }; static const struct FormChange sMimikyuFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MIMIKYU}, + {FORM_CHANGE_BATTLE_END, SPECIES_MIMIKYU}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorRedFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_END}, }; @@ -244,30 +244,30 @@ static const struct FormChange sMiniorYellowFormChangeTable[] = { #if P_GEN_8_POKEMON == TRUE static const struct FormChange sCramorantFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, {FORM_CHANGE_END}, }; static const struct FormChange sMorpekoFormChangeTable[] = { - {FORM_BATTLE_END, SPECIES_MORPEKO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, {FORM_CHANGE_END}, }; static const struct FormChange sZacianFormChangeTable[] = { - {FORM_BATTLE_BEGIN, SPECIES_ZACIAN_CROWNED_SWORD, ITEM_RUSTED_SWORD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BLADE}, - {FORM_BATTLE_END, SPECIES_ZACIAN, ITEM_RUSTED_SWORD, MOVE_BEHEMOTH_BLADE, MOVE_IRON_HEAD}, + {FORM_CHANGE_BATTLE_BEGIN, SPECIES_ZACIAN_CROWNED_SWORD, ITEM_RUSTED_SWORD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BLADE}, + {FORM_CHANGE_BATTLE_END, SPECIES_ZACIAN, ITEM_RUSTED_SWORD, MOVE_BEHEMOTH_BLADE, MOVE_IRON_HEAD}, {FORM_CHANGE_END}, }; static const struct FormChange sZamazentaFormChangeTable[] = { - {FORM_BATTLE_BEGIN, SPECIES_ZAMAZENTA_CROWNED_SHIELD, ITEM_RUSTED_SHIELD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BASH}, - {FORM_BATTLE_END, SPECIES_ZAMAZENTA, ITEM_RUSTED_SHIELD, MOVE_BEHEMOTH_BASH, MOVE_IRON_HEAD}, + {FORM_CHANGE_BATTLE_BEGIN, SPECIES_ZAMAZENTA_CROWNED_SHIELD, ITEM_RUSTED_SHIELD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BASH}, + {FORM_CHANGE_BATTLE_END, SPECIES_ZAMAZENTA, ITEM_RUSTED_SHIELD, MOVE_BEHEMOTH_BASH, MOVE_IRON_HEAD}, {FORM_CHANGE_END}, }; static const struct FormChange sEnamorusFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_ENAMORUS, ITEM_REVEAL_GLASS}, - {FORM_ITEM_USE, SPECIES_ENAMORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_ENAMORUS, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_ITEM_USE, SPECIES_ENAMORUS_THERIAN, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; #endif diff --git a/src/daycare.c b/src/daycare.c index 18bc45eb01..fc44e200e6 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -255,7 +255,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon) species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES); BoxMonToMon(&daycareMon->mon, &pokemon); - newSpecies = GetFormChangeTargetSpecies(&pokemon, FORM_WITHDRAW, 0); + newSpecies = GetFormChangeTargetSpecies(&pokemon, FORM_CHANGE_WITHDRAW, 0); if (newSpecies != SPECIES_NONE) { SetMonData(&pokemon, MON_DATA_SPECIES, &newSpecies); CalculateMonStats(&pokemon); diff --git a/src/party_menu.c b/src/party_menu.c index 3c8b163c54..1071825a6b 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5591,7 +5591,7 @@ static void Task_TryItemUseFormChange(u8 taskId) bool32 TryItemUseFormChange(u8 taskId, TaskFunc task) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_USE, gSpecialVar_ItemId); + u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_CHANGE_ITEM_USE, gSpecialVar_ItemId); if (targetSpecies != SPECIES_NONE) { @@ -5626,7 +5626,7 @@ void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task) } void TryItemHoldFormChange(struct Pokemon *mon) { - u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD, 0); + u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_CHANGE_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { PlayCry_NormalNoDucking(targetSpecies, 0, CRY_VOLUME_RS, CRY_VOLUME_RS); diff --git a/src/pokemon.c b/src/pokemon.c index 1a748fb24a..b60e5a30ee 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8363,12 +8363,12 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 { switch (method) { - case FORM_ITEM_HOLD: + case FORM_CHANGE_ITEM_HOLD: if ((heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) && (ability == formChanges[i].param2 || formChanges[i].param2 == ABILITY_NONE)) targetSpecies = formChanges[i].targetSpecies; break; - case FORM_ITEM_USE: + case FORM_CHANGE_ITEM_USE: if (arg == formChanges[i].param1) { switch (formChanges[i].param2) @@ -8389,12 +8389,12 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 } } break; - case FORM_MOVE: + case FORM_CHANGE_MOVE: if (BoxMonKnowsMove(boxMon, formChanges[i].param1) != formChanges[i].param2) targetSpecies = formChanges[i].targetSpecies; break; - case FORM_BATTLE_BEGIN: - case FORM_BATTLE_END: + case FORM_CHANGE_BATTLE_BEGIN: + case FORM_CHANGE_BATTLE_END: if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; } @@ -8491,7 +8491,7 @@ void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); const struct FormChange *formChanges = gFormChangeTablePointers[species]; - if (formChanges == NULL || (method != FORM_BATTLE_BEGIN && method != FORM_BATTLE_END)) + if (formChanges == NULL || (method != FORM_CHANGE_BATTLE_BEGIN && method != FORM_CHANGE_BATTLE_END)) return; for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 3f58daa861..4cce36a932 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6900,7 +6900,7 @@ static void ReshowDisplayMon(void) void SetMonFormPSS(struct BoxPokemon *boxMon) { - u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); + u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_CHANGE_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { SetBoxMonData(boxMon, MON_DATA_SPECIES, &targetSpecies); diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index e33c8ffcad..d95079b4d0 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -72,7 +72,7 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem); // In case a mon with a form changing item is given. Eg: SPECIES_ARCEUS with ITEM_SPLASH_PLATE will transform into SPECIES_ARCEUS_WATER upon gifted. - targetSpecies = GetFormChangeTargetSpecies(&mon, FORM_ITEM_HOLD, 0); + targetSpecies = GetFormChangeTargetSpecies(&mon, FORM_CHANGE_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { SetMonData(&mon, MON_DATA_SPECIES, &targetSpecies); From d8cc7f7abe5e151ca0473585ec68e632e5979693 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 20 Oct 2022 17:56:56 -0300 Subject: [PATCH 004/229] Form change when switching out --- include/constants/pokemon.h | 3 +- src/battle_util.c | 2 +- src/data/pokemon/form_change_tables.h | 43 +++++++++++++++++++-------- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index cacbdc55c0..01bc755cdd 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -323,7 +323,8 @@ #define FORM_CHANGE_MOVE 3 #define FORM_CHANGE_WITHDRAW 4 #define FORM_CHANGE_BATTLE_BEGIN 5 -#define FORM_CHANGE_BATTLE_END 6 +#define FORM_CHANGE_BATTLE_SWITCH 6 +#define FORM_CHANGE_BATTLE_END 7 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 diff --git a/src/battle_util.c b/src/battle_util.c index 92f79cd8d1..003b8b272e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -518,7 +518,7 @@ void HandleAction_Switch(void) if (gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; - UndoFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), TRUE); + BattleFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), FORM_CHANGE_BATTLE_SWITCH); } void HandleAction_UseItem(void) diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 1f2e926bb3..e043fa4621 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -22,6 +22,10 @@ FORM_CHANGE_WITHDRAW: Form change activates when the Pokémon is withdrawn from the PC or Daycare. no parameters +FORM_CHANGE_SWITCH: + Form change activates when the Pokémon is switched out in battle. + no parameters + FORM_CHANGE_BATTLE_BEGIN: Form change activates when the Pokémon is sent out at the beginning of a battle param1 = item to hold, optional @@ -99,12 +103,14 @@ static const struct FormChange sArceusFormChangeTable[] = { #if P_GEN_5_POKEMON == TRUE static const struct FormChange sDarmanitanFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, {FORM_CHANGE_END}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_END}, }; @@ -154,7 +160,8 @@ static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { }; static const struct FormChange sAegislashFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH}, + {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, {FORM_CHANGE_END}, }; @@ -180,7 +187,8 @@ static const struct FormChange sOricorioFormChangeTable[] = { {FORM_CHANGE_END}, }; static const struct FormChange sWishiwashiFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, {FORM_CHANGE_END}, }; @@ -212,31 +220,38 @@ static const struct FormChange sMimikyuFormChangeTable[] = { }; static const struct FormChange sMiniorRedFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_END}, }; @@ -244,12 +259,14 @@ static const struct FormChange sMiniorYellowFormChangeTable[] = { #if P_GEN_8_POKEMON == TRUE static const struct FormChange sCramorantFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, {FORM_CHANGE_END}, }; static const struct FormChange sMorpekoFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, {FORM_CHANGE_END}, }; From 861590f747b7f43022f257980c7abb0f29953cf9 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 20 Oct 2022 18:53:12 -0300 Subject: [PATCH 005/229] Form change when fainting. Goodbye UndoFormChange! --- include/battle_util.h | 1 - include/constants/pokemon.h | 3 ++- src/battle_main.c | 2 +- src/battle_util.c | 38 --------------------------- src/data/pokemon/form_change_tables.h | 22 +++++++++++++--- 5 files changed, 22 insertions(+), 44 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index 59ddad9406..fb5090f348 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -149,7 +149,6 @@ u16 GetPrimalReversionSpecies(u16 preEvoSpecies, u16 heldItemId); u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4); bool32 CanMegaEvolve(u8 battlerId); void UndoMegaEvolution(u32 monId); -void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut); void BattleFormChange(u32 monId, u32 side, u16 method); bool32 DoBattlersShareType(u32 battler1, u32 battler2); bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId); diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 01bc755cdd..bb77398dd5 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -324,7 +324,8 @@ #define FORM_CHANGE_WITHDRAW 4 #define FORM_CHANGE_BATTLE_BEGIN 5 #define FORM_CHANGE_BATTLE_SWITCH 6 -#define FORM_CHANGE_BATTLE_END 7 +#define FORM_CHANGE_BATTLE_FAINT 7 +#define FORM_CHANGE_BATTLE_END 8 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 diff --git a/src/battle_main.c b/src/battle_main.c index 8a3cbcfcdb..71d263860e 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3247,7 +3247,7 @@ void FaintClearSetData(void) gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY; Ai_UpdateFaintData(gActiveBattler); - UndoFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FALSE); + BattleFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_BATTLE_FAINT); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); diff --git a/src/battle_util.c b/src/battle_util.c index 003b8b272e..f39d2a03e5 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9690,44 +9690,6 @@ void UndoMegaEvolution(u32 monId) } } -void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut) -{ - u32 i, currSpecies, targetSpecies; - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - static const u16 species[][3] = - { - // Changed Form ID Default Form ID Should change on switch - {SPECIES_MIMIKYU_BUSTED, SPECIES_MIMIKYU, FALSE}, - {SPECIES_GRENINJA_ASH, SPECIES_GRENINJA_BATTLE_BOND, FALSE}, - {SPECIES_MELOETTA_PIROUETTE, SPECIES_MELOETTA, FALSE}, - {SPECIES_AEGISLASH_BLADE, SPECIES_AEGISLASH, TRUE}, - {SPECIES_DARMANITAN_ZEN_MODE, SPECIES_DARMANITAN, TRUE}, - {SPECIES_MINIOR, SPECIES_MINIOR_CORE_RED, TRUE}, - {SPECIES_MINIOR_METEOR_BLUE, SPECIES_MINIOR_CORE_BLUE, TRUE}, - {SPECIES_MINIOR_METEOR_GREEN, SPECIES_MINIOR_CORE_GREEN, TRUE}, - {SPECIES_MINIOR_METEOR_INDIGO, SPECIES_MINIOR_CORE_INDIGO, TRUE}, - {SPECIES_MINIOR_METEOR_ORANGE, SPECIES_MINIOR_CORE_ORANGE, TRUE}, - {SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET, TRUE}, - {SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW, TRUE}, - {SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI, TRUE}, - {SPECIES_CRAMORANT_GORGING, SPECIES_CRAMORANT, TRUE}, - {SPECIES_CRAMORANT_GULPING, SPECIES_CRAMORANT, TRUE}, - {SPECIES_MORPEKO_HANGRY, SPECIES_MORPEKO, TRUE}, - {SPECIES_DARMANITAN_ZEN_MODE_GALARIAN, SPECIES_DARMANITAN_GALARIAN, TRUE}, - }; - - currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL); - for (i = 0; i < ARRAY_COUNT(species); i++) - { - if (currSpecies == species[i][0] && (!isSwitchingOut || species[i][2] == TRUE)) - { - SetMonData(&party[monId], MON_DATA_SPECIES, &species[i][1]); - CalculateMonStats(&party[monId]); - break; - } - } -} - void BattleFormChange(u32 monId, u32 side, u16 method) { u32 targetSpecies; diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index e043fa4621..0586c8ac88 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -104,18 +104,21 @@ static const struct FormChange sArceusFormChangeTable[] = { static const struct FormChange sDarmanitanFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_DARMANITAN}, {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, {FORM_CHANGE_END}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_END}, }; static const struct FormChange sMeloettaFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MELOETTA}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MELOETTA}, + {FORM_CHANGE_BATTLE_END, SPECIES_MELOETTA}, {FORM_CHANGE_END}, }; @@ -155,12 +158,14 @@ static const struct FormChange sGenesectFormChangeTable[] = { #if P_GEN_6_POKEMON == TRUE static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, {FORM_CHANGE_END}, }; static const struct FormChange sAegislashFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_AEGISLASH}, {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, {FORM_CHANGE_END}, }; @@ -188,6 +193,7 @@ static const struct FormChange sOricorioFormChangeTable[] = { }; static const struct FormChange sWishiwashiFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_WISHIWASHI}, {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, {FORM_CHANGE_END}, }; @@ -215,42 +221,50 @@ static const struct FormChange sSilvallyFormChangeTable[] = { }; static const struct FormChange sMimikyuFormChangeTable[] = { - {FORM_CHANGE_BATTLE_END, SPECIES_MIMIKYU}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MIMIKYU}, + {FORM_CHANGE_BATTLE_END, SPECIES_MIMIKYU}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorRedFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_END}, }; @@ -260,12 +274,14 @@ static const struct FormChange sMiniorYellowFormChangeTable[] = { #if P_GEN_8_POKEMON == TRUE static const struct FormChange sCramorantFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_CRAMORANT}, {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, {FORM_CHANGE_END}, }; static const struct FormChange sMorpekoFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, + {FORM_CHANGE_BATTLE_FAINT, SPECIES_MORPEKO}, {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, {FORM_CHANGE_END}, }; From 0a79390ec00e982240edb8513b59b440e7218a45 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 21 Oct 2022 02:08:37 -0300 Subject: [PATCH 006/229] Primal Reversion in Form Change tables --- include/battle.h | 3 - include/battle_util.h | 6 +- include/constants/pokemon.h | 37 ++++++------ include/pokemon.h | 2 + src/battle_interface.c | 16 +++--- src/battle_main.c | 31 +++++----- src/battle_script_commands.c | 43 ++------------ src/battle_util.c | 56 +++++++++++++------ src/data/pokemon/base_stats.h | 4 +- src/data/pokemon/evolution.h | 2 - src/data/pokemon/form_change_table_pointers.h | 4 ++ src/data/pokemon/form_change_tables.h | 14 ++++- src/pokemon.c | 27 ++++++++- 13 files changed, 136 insertions(+), 109 deletions(-) diff --git a/include/battle.h b/include/battle.h index b328b46bb2..ff5d698abf 100644 --- a/include/battle.h +++ b/include/battle.h @@ -472,9 +472,6 @@ struct MegaEvolutionData bool8 alreadyEvolved[4]; // Array id is used for mon position. u16 evolvedSpecies[MAX_BATTLERS_COUNT]; u16 playerEvolvedSpecies; - u8 primalRevertedPartyIds[2]; // As flags using gBitTable; - u16 primalRevertedSpecies[MAX_BATTLERS_COUNT]; - u16 playerPrimalRevertedSpecies; u8 battlerId; bool8 playerSelect; u8 triggerSpriteId; diff --git a/include/battle_util.h b/include/battle_util.h index fb5090f348..5a09909509 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -145,11 +145,12 @@ u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilit u16 GetTypeModifier(u8 atkType, u8 defType); s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId); u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId); -u16 GetPrimalReversionSpecies(u16 preEvoSpecies, u16 heldItemId); +u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId); u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4); bool32 CanMegaEvolve(u8 battlerId); void UndoMegaEvolution(u32 monId); -void BattleFormChange(u32 monId, u32 side, u16 method); +bool32 IsBattlerPrimalReverted(u8 battlerId); +void TryBattleFormChange(u8 battlerId, u16 method); bool32 DoBattlersShareType(u32 battler1, u32 battler2); bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId); struct Pokemon *GetIllusionMonPtr(u32 battlerId); @@ -186,6 +187,7 @@ void TryToRevertMimicry(void); void RestoreBattlerOriginalTypes(u8 battlerId); u32 GetBattlerMoveTargetType(u8 battlerId, u16 move); bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move); +void RecalcBattlerStats(u32 battler, struct Pokemon *mon); // Ability checks bool32 IsRolePlayBannedAbilityAtk(u16 ability); bool32 IsRolePlayBannedAbility(u16 ability); diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index bb77398dd5..7dc250834e 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -266,7 +266,6 @@ // Evolution types #define EVO_MEGA_EVOLUTION 0xffff // Not an actual evolution, used to temporarily mega evolve in battle. #define EVO_MOVE_MEGA_EVOLUTION 0xfffe // Mega Evolution that checks for a move instead of held item. -#define EVO_PRIMAL_REVERSION 0xfffd // Not an actual evolution, used to undergo primal reversion in battle. #define EVO_FRIENDSHIP 1 // Pokémon levels up with friendship ≥ 220 #define EVO_FRIENDSHIP_DAY 2 // Pokémon levels up during the day with friendship ≥ 220 #define EVO_FRIENDSHIP_NIGHT 3 // Pokémon levels up at night with friendship ≥ 220 @@ -317,15 +316,16 @@ #define EVO_MODE_OVERWORLD_SPECIAL 5 // Form change types -#define FORM_CHANGE_END 0 -#define FORM_CHANGE_ITEM_HOLD 1 -#define FORM_CHANGE_ITEM_USE 2 -#define FORM_CHANGE_MOVE 3 -#define FORM_CHANGE_WITHDRAW 4 -#define FORM_CHANGE_BATTLE_BEGIN 5 -#define FORM_CHANGE_BATTLE_SWITCH 6 -#define FORM_CHANGE_BATTLE_FAINT 7 -#define FORM_CHANGE_BATTLE_END 8 +#define FORM_CHANGE_END 0 // Form table terminator +#define FORM_CHANGE_ITEM_HOLD 1 +#define FORM_CHANGE_ITEM_USE 2 +#define FORM_CHANGE_MOVE 3 // Todo +#define FORM_CHANGE_WITHDRAW 4 // +#define FORM_CHANGE_BATTLE_BEGIN 5 +#define FORM_CHANGE_BATTLE_END 6 +#define FORM_CHANGE_BATTLE_SWITCH 7 +#define FORM_CHANGE_BATTLE_FAINT 8 +#define FORM_CHANGE_PRIMAL_REVERSION 9 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 @@ -345,14 +345,15 @@ #define SPECIES_FLAG_LEGENDARY (1 << 0) #define SPECIES_FLAG_MYTHICAL (1 << 1) #define SPECIES_FLAG_MEGA_EVOLUTION (1 << 2) -#define SPECIES_FLAG_ULTRA_BEAST (1 << 3) -#define SPECIES_FLAG_ALOLAN_FORM (1 << 4) -#define SPECIES_FLAG_GALARIAN_FORM (1 << 5) -#define SPECIES_FLAG_HISUIAN_FORM (1 << 6) -#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 7) -#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 8) -#define SPECIES_FLAG_SHINY_LOCKED (1 << 9) -#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 10) +#define SPECIES_FLAG_PRIMAL_REVERSION (1 << 3) +#define SPECIES_FLAG_ULTRA_BEAST (1 << 4) +#define SPECIES_FLAG_ALOLAN_FORM (1 << 5) +#define SPECIES_FLAG_GALARIAN_FORM (1 << 6) +#define SPECIES_FLAG_HISUIAN_FORM (1 << 7) +#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 8) +#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 9) +#define SPECIES_FLAG_SHINY_LOCKED (1 << 10) +#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 11) #define LEGENDARY_PERFECT_IV_COUNT 3 diff --git a/include/pokemon.h b/include/pokemon.h index fa5bfc663e..134991b953 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -409,6 +409,7 @@ extern const u16 gUnionRoomFacilityClasses[]; extern const struct SpriteTemplate gBattlerSpriteTemplates[]; extern const s8 gNatureStatTable[][5]; extern const u16 *const gFormSpeciesIdTables[NUM_SPECIES]; +extern const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES]; extern const u32 sExpCandyExperienceTable[]; void ZeroBoxMonData(struct BoxPokemon *boxMon); @@ -564,6 +565,7 @@ 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); +void TryFormChange(u32 monId, u32 side, u16 method); void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method); u32 GetMonFriendshipScore(struct Pokemon *pokemon); diff --git a/src/battle_interface.c b/src/battle_interface.c index 3039c65b67..ed756592f8 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -871,8 +871,8 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) healthBarSpritePtr->invisible = TRUE; // Create mega indicator sprite if is a mega evolved or a primal reverted mon. - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]] - || gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + || IsBattlerPrimalReverted(battlerId)) { megaIndicatorSpriteId = CreateMegaIndicatorSprite(battlerId, 0); gSprites[megaIndicatorSpriteId].invisible = TRUE; @@ -979,8 +979,8 @@ void SetHealthboxSpriteVisible(u8 healthboxSpriteId) gSprites[healthboxSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].hMain_HealthBarSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = FALSE; - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]] - || gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + || IsBattlerPrimalReverted(battlerId)) { u8 spriteId = GetMegaIndicatorSpriteId(healthboxSpriteId); if (spriteId != 0xFF) @@ -1104,8 +1104,8 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) u8 battler = gSprites[healthboxSpriteId].hMain_Battler; // Don't print Lv char if mon is mega evolved or primal reverted. - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battler)] & gBitTable[gBattlerPartyIndexes[battler]] - || gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battler)] & gBitTable[gBattlerPartyIndexes[battler]]) + if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battler)] & gBitTable[gBattlerPartyIndexes[battler]]) + || IsBattlerPrimalReverted(battler)) { objVram = ConvertIntToDecimalStringN(text, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); xPos = 5 * (3 - (objVram - (text + 2))) - 1; @@ -1561,7 +1561,7 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) LoadSpritePalette(&sSpritePalette_MegaIndicator); LoadSpriteSheet(&sSpriteSheet_MegaIndicator); } - else if (gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + else if (IsBattlerPrimalReverted(battlerId)) { if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) { @@ -1590,7 +1590,7 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) { spriteId = CreateSpriteAtEnd(&sSpriteTemplate_MegaIndicator, x, y, 0); } - else if (gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + else if (IsBattlerPrimalReverted(battlerId)) { if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) spriteId = CreateSpriteAtEnd(&sSpriteTemplate_OmegaIndicator, x, y, 0); diff --git a/src/battle_main.c b/src/battle_main.c index 71d263860e..f58c0d43bb 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -602,9 +602,9 @@ static void CB2_InitBattleInternal(void) for (i = 0; i < PARTY_SIZE; i++) { // Player's side - BattleFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_BEGIN); + TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_BEGIN); // Opponent's side - BattleFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BATTLE_BEGIN); + TryFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BATTLE_BEGIN); } gBattleCommunication[MULTIUSE_STATE] = 0; @@ -3247,7 +3247,7 @@ void FaintClearSetData(void) gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY; Ai_UpdateFaintData(gActiveBattler); - BattleFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_BATTLE_FAINT); + TryFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_BATTLE_FAINT); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); @@ -3682,18 +3682,12 @@ static void TryDoEventsBeforeFirstTurn(void) // Primal Reversion for (i = 0; i < gBattlersCount; i++) { - if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB) + if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB + && GetPrimalReversionSpecies(gBattleMons[i].species, gBattleMons[i].item) != SPECIES_NONE) { - for (j = 0; j < EVOS_PER_MON; j++) - { - if (gEvolutionTable[gBattleMons[i].species][j].targetSpecies != SPECIES_NONE - && gEvolutionTable[gBattleMons[i].species][j].method == EVO_PRIMAL_REVERSION) - { - gBattlerAttacker = i; - BattleScriptExecute(BattleScript_PrimalReversion); - return; - } - } + gBattlerAttacker = i; + BattleScriptExecute(BattleScript_PrimalReversion); + return; } } @@ -5207,7 +5201,7 @@ static void HandleEndTurn_FinishBattle(void) for (i = 0; i < PARTY_SIZE; i++) { UndoMegaEvolution(i); - BattleFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); + TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); DoBurmyFormChange(i); } #if B_RECALCULATE_STATS >= GEN_5 @@ -5221,6 +5215,13 @@ static void HandleEndTurn_FinishBattle(void) } } #endif + // Clear battle mon species to avoid a bug on the next battle that causes + // healthboxes loading incorrectly due to it trying to create a Mega Indicator + // if the previous battler would've had. + for (i = 0; i < MAX_BATTLERS_COUNT; i++) + { + gBattleMons[i].species = SPECIES_NONE; + } gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions; gCB2_AfterEvolution = BattleMainCB2; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 060a9e7170..51d3cfbe16 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7914,22 +7914,6 @@ u32 IsAbilityStatusProtected(u32 battler) || IsShieldsDownProtected(battler); } -static void RecalcBattlerStats(u32 battler, struct Pokemon *mon) -{ - CalculateMonStats(mon); - gBattleMons[battler].level = GetMonData(mon, MON_DATA_LEVEL); - gBattleMons[battler].hp = GetMonData(mon, MON_DATA_HP); - gBattleMons[battler].maxHP = GetMonData(mon, MON_DATA_MAX_HP); - gBattleMons[battler].attack = GetMonData(mon, MON_DATA_ATK); - gBattleMons[battler].defense = GetMonData(mon, MON_DATA_DEF); - gBattleMons[battler].speed = GetMonData(mon, MON_DATA_SPEED); - gBattleMons[battler].spAttack = GetMonData(mon, MON_DATA_SPATK); - gBattleMons[battler].spDefense = GetMonData(mon, MON_DATA_SPDEF); - gBattleMons[battler].ability = GetMonAbility(mon); - gBattleMons[battler].type1 = gBaseStats[gBattleMons[battler].species].type1; - gBattleMons[battler].type2 = gBaseStats[gBattleMons[battler].species].type2; -} - static u32 GetHighestStatId(u32 battlerId) { u32 i, highestId = STAT_ATK, highestStat = gBattleMons[battlerId].attack; @@ -8870,17 +8854,7 @@ static void Cmd_various(void) // Change species. if (gBattlescriptCurrInstr[3] == 0) { - u16 primalSpecies; - gBattleStruct->mega.primalRevertedSpecies[gActiveBattler] = gBattleMons[gActiveBattler].species; - if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT - || (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) - { - gBattleStruct->mega.playerPrimalRevertedSpecies = gBattleStruct->mega.primalRevertedSpecies[gActiveBattler]; - } - // Checks Primal Reversion - primalSpecies = GetPrimalReversionSpecies(gBattleStruct->mega.primalRevertedSpecies[gActiveBattler], gBattleMons[gActiveBattler].item); - - gBattleMons[gActiveBattler].species = primalSpecies; + gBattleMons[gActiveBattler].species = GetPrimalReversionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item); PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]], sizeof(gBattleMons[gActiveBattler].species), &gBattleMons[gActiveBattler].species); @@ -8890,7 +8864,6 @@ static void Cmd_various(void) else if (gBattlescriptCurrInstr[3] == 1) { RecalcBattlerStats(gActiveBattler, mon); - gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(gActiveBattler)] |= gBitTable[gBattlerPartyIndexes[gActiveBattler]]; } // Update healthbox and elevation. else @@ -9606,15 +9579,7 @@ static void Cmd_various(void) return; case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL: { - bool8 canDoPrimalReversion = FALSE; - - for (i = 0; i < EVOS_PER_MON; i++) - { - if (gEvolutionTable[gBattleMons[gActiveBattler].species][i].method == EVO_PRIMAL_REVERSION - && gEvolutionTable[gBattleMons[gActiveBattler].species][i].param == gBattleMons[gActiveBattler].item) - canDoPrimalReversion = TRUE; - } - if (!canDoPrimalReversion) + if (GetPrimalReversionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item) == SPECIES_NONE) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; @@ -14109,7 +14074,7 @@ static void Cmd_handleballthrow(void) { BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); - BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), + TryFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -14163,7 +14128,7 @@ static void Cmd_handleballthrow(void) if (IsCriticalCapture()) gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - BattleFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), + TryFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); diff --git a/src/battle_util.c b/src/battle_util.c index f39d2a03e5..729728ec0e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -518,7 +518,7 @@ void HandleAction_Switch(void) if (gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; - BattleFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), FORM_CHANGE_BATTLE_SWITCH); + TryFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), FORM_CHANGE_BATTLE_SWITCH); } void HandleAction_UseItem(void) @@ -8955,8 +8955,7 @@ static bool32 CanEvolve(u32 species) { if (gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION - && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION - && gEvolutionTable[species][i].method != EVO_PRIMAL_REVERSION) + && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION) return TRUE; } return FALSE; @@ -9565,15 +9564,20 @@ u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId) return SPECIES_NONE; } -u16 GetPrimalReversionSpecies(u16 preEvoSpecies, u16 heldItemId) +u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId) { u32 i; + const struct FormChange *formChanges = gFormChangeTablePointers[preSpecies]; - for (i = 0; i < EVOS_PER_MON; i++) + if (formChanges != NULL) { - if (gEvolutionTable[preEvoSpecies][i].method == EVO_PRIMAL_REVERSION - && gEvolutionTable[preEvoSpecies][i].param == heldItemId) - return gEvolutionTable[preEvoSpecies][i].targetSpecies; + for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + { + if (formChanges[i].method == FORM_CHANGE_PRIMAL_REVERSION + && formChanges[i].param1 == heldItemId + && formChanges[i].targetSpecies != preSpecies) + return formChanges[i].targetSpecies; + } } return SPECIES_NONE; } @@ -9675,12 +9679,6 @@ void UndoMegaEvolution(u32 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleStruct->mega.playerEvolvedSpecies); CalculateMonStats(&gPlayerParty[monId]); } - else if (gBattleStruct->mega.primalRevertedPartyIds[B_SIDE_PLAYER] & gBitTable[monId]) - { - gBattleStruct->mega.primalRevertedPartyIds[B_SIDE_PLAYER] &= ~(gBitTable[monId]); - SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &baseSpecies); - CalculateMonStats(&gPlayerParty[monId]); - } // While not exactly a mega evolution, Zygarde follows the same rules. else if (GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL) == SPECIES_ZYGARDE_COMPLETE) { @@ -9690,17 +9688,23 @@ void UndoMegaEvolution(u32 monId) } } -void BattleFormChange(u32 monId, u32 side, u16 method) +bool32 IsBattlerPrimalReverted(u8 battlerId) { - u32 targetSpecies; + return (gBaseStats[gBattleMons[battlerId].species].flags & SPECIES_FLAG_PRIMAL_REVERSION); +} + +void TryBattleFormChange(u8 battlerId, u16 method) +{ + u16 targetSpecies; + u8 monId = gBattlerPartyIndexes[battlerId]; + u8 side = GET_BATTLER_SIDE(battlerId); struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); if (targetSpecies != SPECIES_NONE) { - TryToSetBattleFormChangeMoves(&party[monId], method); SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); - CalculateMonStats(&party[monId]); + RecalcBattlerStats(battlerId, &party[monId]); } } @@ -10362,3 +10366,19 @@ bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move) return FALSE; // Pokémon affected by Heal Block cannot target allies with Pollen Puff return TRUE; } + +void RecalcBattlerStats(u32 battler, struct Pokemon *mon) +{ + CalculateMonStats(mon); + gBattleMons[battler].level = GetMonData(mon, MON_DATA_LEVEL); + gBattleMons[battler].hp = GetMonData(mon, MON_DATA_HP); + gBattleMons[battler].maxHP = GetMonData(mon, MON_DATA_MAX_HP); + gBattleMons[battler].attack = GetMonData(mon, MON_DATA_ATK); + gBattleMons[battler].defense = GetMonData(mon, MON_DATA_DEF); + gBattleMons[battler].speed = GetMonData(mon, MON_DATA_SPEED); + gBattleMons[battler].spAttack = GetMonData(mon, MON_DATA_SPATK); + gBattleMons[battler].spDefense = GetMonData(mon, MON_DATA_SPDEF); + gBattleMons[battler].ability = GetMonAbility(mon); + gBattleMons[battler].type1 = gBaseStats[gBattleMons[battler].species].type1; + gBattleMons[battler].type2 = gBaseStats[gBattleMons[battler].species].type2; +} diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h index a161fbf908..a13ea59391 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/base_stats.h @@ -24117,7 +24117,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRIMORDIAL_SEA, ABILITY_PRIMORDIAL_SEA}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_LEGENDARY, + .flags = SPECIES_FLAG_LEGENDARY | SPECIES_FLAG_PRIMAL_REVERSION, }, [SPECIES_GROUDON_PRIMAL] = @@ -24142,7 +24142,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_DESOLATE_LAND, ABILITY_DESOLATE_LAND}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_LEGENDARY, + .flags = SPECIES_FLAG_LEGENDARY | SPECIES_FLAG_PRIMAL_REVERSION, }, [SPECIES_RATTATA_ALOLAN] = diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 4f09867a6c..0aaf8f90c7 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -293,8 +293,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_METAGROSS] = {{EVO_MEGA_EVOLUTION, ITEM_METAGROSSITE, SPECIES_METAGROSS_MEGA}}, [SPECIES_LATIAS] = {{EVO_MEGA_EVOLUTION, ITEM_LATIASITE, SPECIES_LATIAS_MEGA}}, [SPECIES_LATIOS] = {{EVO_MEGA_EVOLUTION, ITEM_LATIOSITE, SPECIES_LATIOS_MEGA}}, - [SPECIES_KYOGRE] = {{EVO_PRIMAL_REVERSION, ITEM_BLUE_ORB, SPECIES_KYOGRE_PRIMAL}}, - [SPECIES_GROUDON] = {{EVO_PRIMAL_REVERSION, ITEM_RED_ORB, SPECIES_GROUDON_PRIMAL}}, [SPECIES_RAYQUAZA] = {{EVO_MOVE_MEGA_EVOLUTION, MOVE_DRAGON_ASCENT, SPECIES_RAYQUAZA_MEGA}}, #if P_GEN_4_POKEMON == TRUE diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 63971f1325..a0cc805e9a 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -1,5 +1,9 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = { + [SPECIES_KYOGRE] = sKyogreFormChangeTable, + [SPECIES_KYOGRE_PRIMAL] = sKyogreFormChangeTable, + [SPECIES_GROUDON] = sGroudonFormChangeTable, + [SPECIES_GROUDON_PRIMAL] = sGroudonFormChangeTable, #if P_GEN_4_POKEMON == TRUE [SPECIES_GIRATINA] = sGiratinaFormChangeTable, [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 0586c8ac88..7342256ecd 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -47,6 +47,18 @@ FORM_CHANGE_BATTLE_END: #define DAY 1 #define NIGHT 2 +static const struct FormChange sKyogreFormChangeTable[] = { + {FORM_CHANGE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, + {FORM_CHANGE_BATTLE_END, SPECIES_KYOGRE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGroudonFormChangeTable[] = { + {FORM_CHANGE_PRIMAL_REVERSION, SPECIES_GROUDON_PRIMAL, ITEM_RED_ORB}, + {FORM_CHANGE_BATTLE_END, SPECIES_GROUDON}, + {FORM_CHANGE_END}, +}; + #if P_GEN_4_POKEMON == TRUE static const struct FormChange sGiratinaFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, @@ -178,7 +190,7 @@ static const struct FormChange sXerneasFormChangeTable[] = { static const struct FormChange sHoopaFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, - // {FORM_CHANGE_WITHDRAW, SPECIES_HOOPA}, + {FORM_CHANGE_WITHDRAW, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; #endif diff --git a/src/pokemon.c b/src/pokemon.c index b60e5a30ee..ced0f67b9d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8397,6 +8397,16 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 case FORM_CHANGE_BATTLE_END: if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; + break; + case FORM_CHANGE_PRIMAL_REVERSION: + if (arg == formChanges[i].param1) + targetSpecies = formChanges[i].targetSpecies; + break; + case FORM_CHANGE_WITHDRAW: + case FORM_CHANGE_BATTLE_SWITCH: + case FORM_CHANGE_BATTLE_FAINT: + targetSpecies = formChanges[i].targetSpecies; + break; } } } @@ -8485,13 +8495,28 @@ bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } +void TryFormChange(u32 monId, u32 side, u16 method) +{ + u32 targetSpecies; + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); + if (targetSpecies != SPECIES_NONE) + { + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); + CalculateMonStats(&party[monId]); + } +} + void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) { int i, j; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); const struct FormChange *formChanges = gFormChangeTablePointers[species]; - if (formChanges == NULL || (method != FORM_CHANGE_BATTLE_BEGIN && method != FORM_CHANGE_BATTLE_END)) + if (formChanges == NULL + || (method != FORM_CHANGE_BATTLE_BEGIN && method != FORM_CHANGE_BATTLE_END)) return; for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) From a57f6d184b9c0aa9f6d3af6a81aead19ea9e3552 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 12:24:04 -0300 Subject: [PATCH 007/229] Fainting by poison in the overworld reverts forms --- include/constants/pokemon.h | 10 ++++----- src/battle_main.c | 2 +- src/data/pokemon/form_change_tables.h | 32 +++++++++++++-------------- src/field_poison.c | 3 +++ src/pokemon.c | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 7dc250834e..06e4be4f34 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -320,11 +320,11 @@ #define FORM_CHANGE_ITEM_HOLD 1 #define FORM_CHANGE_ITEM_USE 2 #define FORM_CHANGE_MOVE 3 // Todo -#define FORM_CHANGE_WITHDRAW 4 // -#define FORM_CHANGE_BATTLE_BEGIN 5 -#define FORM_CHANGE_BATTLE_END 6 -#define FORM_CHANGE_BATTLE_SWITCH 7 -#define FORM_CHANGE_BATTLE_FAINT 8 +#define FORM_CHANGE_WITHDRAW 4 // Daycare done, Todo PC +#define FORM_CHANGE_FAINT 5 +#define FORM_CHANGE_BATTLE_BEGIN 6 +#define FORM_CHANGE_BATTLE_END 7 +#define FORM_CHANGE_BATTLE_SWITCH 8 #define FORM_CHANGE_PRIMAL_REVERSION 9 #define MON_PIC_WIDTH 64 diff --git a/src/battle_main.c b/src/battle_main.c index f58c0d43bb..9d08a4e8c0 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3247,7 +3247,7 @@ void FaintClearSetData(void) gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY; Ai_UpdateFaintData(gActiveBattler); - TryFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_BATTLE_FAINT); + TryFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_FAINT); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 7342256ecd..b936808b6a 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -116,20 +116,20 @@ static const struct FormChange sArceusFormChangeTable[] = { static const struct FormChange sDarmanitanFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_DARMANITAN}, + {FORM_CHANGE_FAINT, SPECIES_DARMANITAN}, {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, {FORM_CHANGE_END}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN_GALARIAN}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_FAINT, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_END}, }; static const struct FormChange sMeloettaFormChangeTable[] = { - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MELOETTA}, + {FORM_CHANGE_FAINT, SPECIES_MELOETTA}, {FORM_CHANGE_BATTLE_END, SPECIES_MELOETTA}, {FORM_CHANGE_END}, }; @@ -170,14 +170,14 @@ static const struct FormChange sGenesectFormChangeTable[] = { #if P_GEN_6_POKEMON == TRUE static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { - {FORM_CHANGE_BATTLE_FAINT, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_FAINT, SPECIES_GRENINJA_BATTLE_BOND}, {FORM_CHANGE_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, {FORM_CHANGE_END}, }; static const struct FormChange sAegislashFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_AEGISLASH}, + {FORM_CHANGE_FAINT, SPECIES_AEGISLASH}, {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, {FORM_CHANGE_END}, }; @@ -205,7 +205,7 @@ static const struct FormChange sOricorioFormChangeTable[] = { }; static const struct FormChange sWishiwashiFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_WISHIWASHI}, + {FORM_CHANGE_FAINT, SPECIES_WISHIWASHI}, {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, {FORM_CHANGE_END}, }; @@ -233,50 +233,50 @@ static const struct FormChange sSilvallyFormChangeTable[] = { }; static const struct FormChange sMimikyuFormChangeTable[] = { - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MIMIKYU}, + {FORM_CHANGE_FAINT, SPECIES_MIMIKYU}, {FORM_CHANGE_BATTLE_END, SPECIES_MIMIKYU}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorRedFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_END}, }; @@ -286,14 +286,14 @@ static const struct FormChange sMiniorYellowFormChangeTable[] = { #if P_GEN_8_POKEMON == TRUE static const struct FormChange sCramorantFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_CRAMORANT}, + {FORM_CHANGE_FAINT, SPECIES_CRAMORANT}, {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, {FORM_CHANGE_END}, }; static const struct FormChange sMorpekoFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, - {FORM_CHANGE_BATTLE_FAINT, SPECIES_MORPEKO}, + {FORM_CHANGE_FAINT, SPECIES_MORPEKO}, {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, {FORM_CHANGE_END}, }; diff --git a/src/field_poison.c b/src/field_poison.c index fcb47acdb8..68a345919b 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -128,7 +128,10 @@ s32 DoPoisonFieldEffect(void) // Apply poison damage hp = GetMonData(pokemon, MON_DATA_HP); if (hp == 0 || --hp == 0) + { + TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_FAINT); numFainted++; + } SetMonData(pokemon, MON_DATA_HP, &hp); numPoisoned++; diff --git a/src/pokemon.c b/src/pokemon.c index ced0f67b9d..c296e14136 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8404,7 +8404,7 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 break; case FORM_CHANGE_WITHDRAW: case FORM_CHANGE_BATTLE_SWITCH: - case FORM_CHANGE_BATTLE_FAINT: + case FORM_CHANGE_FAINT: targetSpecies = formChanges[i].targetSpecies; break; } From f5b900e2ef23713aa83096eb843c8fe33785e9b4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 15:02:22 -0300 Subject: [PATCH 008/229] Defaults Primal Reversion indicator to Alpha when item not Red Orb. --- src/battle_interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index ed756592f8..48882bb266 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1563,12 +1563,12 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) + if (gBattleMons[battlerId].item == ITEM_RED_ORB) { LoadSpritePalette(&sSpritePalette_OmegaIndicator); LoadSpriteSheet(&sSpriteSheet_OmegaIndicator); } - else if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_KYOGRE) + else // ITEM_BLUE_ORB { LoadSpritePalette(&sSpritePalette_AlphaIndicator); LoadSpriteSheet(&sSpriteSheet_AlphaIndicator); @@ -1592,9 +1592,9 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) + if (gBattleMons[battlerId].item == ITEM_RED_ORB) spriteId = CreateSpriteAtEnd(&sSpriteTemplate_OmegaIndicator, x, y, 0); - else if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_KYOGRE) + else // ITEM_BLUE_ORB spriteId = CreateSpriteAtEnd(&sSpriteTemplate_AlphaIndicator, x, y, 0); } From fa8b1b9c053fb5360ff0ba2c702acdaad4acc066 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 15:02:45 -0300 Subject: [PATCH 009/229] Updated descriptions of form change constants --- src/data/pokemon/form_change_tables.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index b936808b6a..1f0dc85da1 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -20,11 +20,11 @@ FORM_CHANGE_MOVE: FORM_CHANGE_WITHDRAW: Form change activates when the Pokémon is withdrawn from the PC or Daycare. - no parameters + No parameters. -FORM_CHANGE_SWITCH: - Form change activates when the Pokémon is switched out in battle. - no parameters +FORM_CHANGE_FAINT: + Form change activates when the Pokémon faints, either in battle or in the overworld by poison. + No parameters. FORM_CHANGE_BATTLE_BEGIN: Form change activates when the Pokémon is sent out at the beginning of a battle @@ -37,6 +37,15 @@ FORM_CHANGE_BATTLE_END: param1 = item to hold, optional param2 = a move that will be replaced, optional param3 = a new move to replace it with, optional + +FORM_CHANGE_BATTLE_SWITCH: + Form change activates when the Pokémon is switched out in battle. + No parameters. + +FORM_CHANGE_PRIMAL_REVERSION: + Form change activates when entering battle with the specified item. If the item is a Red Orb, + it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to Alpha. + param1 = item to hold, required. */ // FORM_CHANGE_MOVE param2 Arguments From 797c5514d3a39332f8df1eaba967dc7959bc2eb6 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 18:37:23 -0300 Subject: [PATCH 010/229] Mega Evolution in form change tables --- include/battle.h | 3 - include/battle_util.h | 1 + include/constants/pokemon.h | 6 +- src/battle_interface.c | 13 +- src/battle_script_commands.c | 14 +- src/battle_util.c | 47 +-- src/data/pokemon/evolution.h | 49 --- src/data/pokemon/form_change_table_pointers.h | 94 +++++ src/data/pokemon/form_change_tables.h | 323 ++++++++++++++++++ 9 files changed, 453 insertions(+), 97 deletions(-) diff --git a/include/battle.h b/include/battle.h index ff5d698abf..0ff70ee707 100644 --- a/include/battle.h +++ b/include/battle.h @@ -468,10 +468,7 @@ struct LinkBattlerHeader struct MegaEvolutionData { u8 toEvolve; // As flags using gBitTable. - u8 evolvedPartyIds[2]; // As flags using gBitTable; bool8 alreadyEvolved[4]; // Array id is used for mon position. - u16 evolvedSpecies[MAX_BATTLERS_COUNT]; - u16 playerEvolvedSpecies; u8 battlerId; bool8 playerSelect; u8 triggerSpriteId; diff --git a/include/battle_util.h b/include/battle_util.h index 5a09909509..e1b890ebfe 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -149,6 +149,7 @@ u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId); u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4); bool32 CanMegaEvolve(u8 battlerId); void UndoMegaEvolution(u32 monId); +bool32 IsBattlerMegaEvolved(u8 battlerId); bool32 IsBattlerPrimalReverted(u8 battlerId); void TryBattleFormChange(u8 battlerId, u16 method); bool32 DoBattlersShareType(u32 battler1, u32 battler2); diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 06e4be4f34..f31fa8d6cc 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -264,8 +264,6 @@ #define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80 // Evolution types -#define EVO_MEGA_EVOLUTION 0xffff // Not an actual evolution, used to temporarily mega evolve in battle. -#define EVO_MOVE_MEGA_EVOLUTION 0xfffe // Mega Evolution that checks for a move instead of held item. #define EVO_FRIENDSHIP 1 // Pokémon levels up with friendship ≥ 220 #define EVO_FRIENDSHIP_DAY 2 // Pokémon levels up during the day with friendship ≥ 220 #define EVO_FRIENDSHIP_NIGHT 3 // Pokémon levels up at night with friendship ≥ 220 @@ -325,7 +323,9 @@ #define FORM_CHANGE_BATTLE_BEGIN 6 #define FORM_CHANGE_BATTLE_END 7 #define FORM_CHANGE_BATTLE_SWITCH 8 -#define FORM_CHANGE_PRIMAL_REVERSION 9 +#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 9 +#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 10 +#define FORM_CHANGE_PRIMAL_REVERSION 11 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 diff --git a/src/battle_interface.c b/src/battle_interface.c index 48882bb266..c3d97f1379 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -871,8 +871,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) healthBarSpritePtr->invisible = TRUE; // Create mega indicator sprite if is a mega evolved or a primal reverted mon. - if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - || IsBattlerPrimalReverted(battlerId)) + if (IsBattlerMegaEvolved(battlerId) || IsBattlerPrimalReverted(battlerId)) { megaIndicatorSpriteId = CreateMegaIndicatorSprite(battlerId, 0); gSprites[megaIndicatorSpriteId].invisible = TRUE; @@ -979,8 +978,7 @@ void SetHealthboxSpriteVisible(u8 healthboxSpriteId) gSprites[healthboxSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].hMain_HealthBarSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = FALSE; - if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - || IsBattlerPrimalReverted(battlerId)) + if (IsBattlerMegaEvolved(battlerId) || IsBattlerPrimalReverted(battlerId)) { u8 spriteId = GetMegaIndicatorSpriteId(healthboxSpriteId); if (spriteId != 0xFF) @@ -1104,8 +1102,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) u8 battler = gSprites[healthboxSpriteId].hMain_Battler; // Don't print Lv char if mon is mega evolved or primal reverted. - if ((gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battler)] & gBitTable[gBattlerPartyIndexes[battler]]) - || IsBattlerPrimalReverted(battler)) + if (IsBattlerMegaEvolved(battler) || IsBattlerPrimalReverted(battler)) { objVram = ConvertIntToDecimalStringN(text, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); xPos = 5 * (3 - (objVram - (text + 2))) - 1; @@ -1556,7 +1553,7 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) u32 spriteId, position; s16 x, y; - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + if (IsBattlerMegaEvolved(battlerId)) { LoadSpritePalette(&sSpritePalette_MegaIndicator); LoadSpriteSheet(&sSpriteSheet_MegaIndicator); @@ -1586,7 +1583,7 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) else if (gBattleMons[battlerId].level < 10) x += 5; - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) + if (IsBattlerMegaEvolved(battlerId)) { spriteId = CreateSpriteAtEnd(&sSpriteTemplate_MegaIndicator, x, y, 0); } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 51d3cfbe16..6cc2bc323a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8807,20 +8807,11 @@ static void Cmd_various(void) // Change species. if (gBattlescriptCurrInstr[3] == 0) { - u16 megaSpecies; - gBattleStruct->mega.evolvedSpecies[gActiveBattler] = gBattleMons[gActiveBattler].species; - if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT - || (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) - { - gBattleStruct->mega.playerEvolvedSpecies = gBattleStruct->mega.evolvedSpecies[gActiveBattler]; - } //Checks regular Mega Evolution - megaSpecies = GetMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[gActiveBattler], gBattleMons[gActiveBattler].item); + u16 megaSpecies = GetMegaEvolutionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item); //Checks Wish Mega Evolution if (megaSpecies == SPECIES_NONE) - { - megaSpecies = GetWishMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[gActiveBattler], gBattleMons[gActiveBattler].moves[0], gBattleMons[gActiveBattler].moves[1], gBattleMons[gActiveBattler].moves[2], gBattleMons[gActiveBattler].moves[3]); - } + megaSpecies = GetWishMegaEvolutionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].moves[0], gBattleMons[gActiveBattler].moves[1], gBattleMons[gActiveBattler].moves[2], gBattleMons[gActiveBattler].moves[3]); gBattleMons[gActiveBattler].species = megaSpecies; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); @@ -8833,7 +8824,6 @@ static void Cmd_various(void) { RecalcBattlerStats(gActiveBattler, mon); gBattleStruct->mega.alreadyEvolved[GetBattlerPosition(gActiveBattler)] = TRUE; - gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(gActiveBattler)] |= gBitTable[gBattlerPartyIndexes[gActiveBattler]]; } // Update healthbox and elevation. else diff --git a/src/battle_util.c b/src/battle_util.c index 729728ec0e..d4efdb8988 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8953,9 +8953,7 @@ static bool32 CanEvolve(u32 species) for (i = 0; i < EVOS_PER_MON; i++) { - if (gEvolutionTable[species][i].method - && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION - && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION) + if (gEvolutionTable[species][i].method) return TRUE; } return FALSE; @@ -9554,12 +9552,17 @@ bool32 IsPartnerMonFromSameTrainer(u8 battlerId) u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId) { u32 i; + const struct FormChange *formChanges = gFormChangeTablePointers[preEvoSpecies]; - for (i = 0; i < EVOS_PER_MON; i++) + if (formChanges != NULL) { - if (gEvolutionTable[preEvoSpecies][i].method == EVO_MEGA_EVOLUTION - && gEvolutionTable[preEvoSpecies][i].param == heldItemId) - return gEvolutionTable[preEvoSpecies][i].targetSpecies; + for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + { + if ((formChanges[i].method == FORM_CHANGE_MEGA_EVOLUTION_ITEM + && formChanges[i].param1 == heldItemId) + && formChanges[i].targetSpecies != preEvoSpecies) + return formChanges[i].targetSpecies; + } } return SPECIES_NONE; } @@ -9584,15 +9587,18 @@ u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId) u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4) { - u32 i, par; + u32 i, param; + const struct FormChange *formChanges = gFormChangeTablePointers[preEvoSpecies]; - for (i = 0; i < EVOS_PER_MON; i++) + if (formChanges != NULL) { - if (gEvolutionTable[preEvoSpecies][i].method == EVO_MOVE_MEGA_EVOLUTION) + for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) { - par = gEvolutionTable[preEvoSpecies][i].param; - if (par == moveId1 || par == moveId2 || par == moveId3 || par == moveId4) - return gEvolutionTable[preEvoSpecies][i].targetSpecies; + param = formChanges[i].param1; + if ((formChanges[i].method == FORM_CHANGE_MEGA_EVOLUTION_MOVE + && (param == moveId1 || param == moveId2 || param == moveId3 || param == moveId4)) + && formChanges[i].targetSpecies != preEvoSpecies) + return formChanges[i].targetSpecies; } } return SPECIES_NONE; @@ -9671,16 +9677,8 @@ bool32 CanMegaEvolve(u8 battlerId) void UndoMegaEvolution(u32 monId) { - u16 baseSpecies = GET_BASE_SPECIES_ID(GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES)); - - if (gBattleStruct->mega.evolvedPartyIds[B_SIDE_PLAYER] & gBitTable[monId]) - { - gBattleStruct->mega.evolvedPartyIds[B_SIDE_PLAYER] &= ~(gBitTable[monId]); - SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleStruct->mega.playerEvolvedSpecies); - CalculateMonStats(&gPlayerParty[monId]); - } // While not exactly a mega evolution, Zygarde follows the same rules. - else if (GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL) == SPECIES_ZYGARDE_COMPLETE) + if (GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL) == SPECIES_ZYGARDE_COMPLETE) { SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]); gBattleStruct->changedSpecies[monId] = 0; @@ -9688,6 +9686,11 @@ void UndoMegaEvolution(u32 monId) } } +bool32 IsBattlerMegaEvolved(u8 battlerId) +{ + return (gBaseStats[gBattleMons[battlerId].species].flags & SPECIES_FLAG_MEGA_EVOLUTION); +} + bool32 IsBattlerPrimalReverted(u8 battlerId) { return (gBaseStats[gBattleMons[battlerId].species].flags & SPECIES_FLAG_PRIMAL_REVERSION); diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 0aaf8f90c7..20279043fe 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -2,22 +2,16 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = { [SPECIES_BULBASAUR] = {{EVO_LEVEL, 16, SPECIES_IVYSAUR}}, [SPECIES_IVYSAUR] = {{EVO_LEVEL, 32, SPECIES_VENUSAUR}}, - [SPECIES_VENUSAUR] = {{EVO_MEGA_EVOLUTION, ITEM_VENUSAURITE, SPECIES_VENUSAUR_MEGA}}, [SPECIES_CHARMANDER] = {{EVO_LEVEL, 16, SPECIES_CHARMELEON}}, [SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}}, - [SPECIES_CHARIZARD] = {{EVO_MEGA_EVOLUTION, ITEM_CHARIZARDITE_X, SPECIES_CHARIZARD_MEGA_X}, - {EVO_MEGA_EVOLUTION, ITEM_CHARIZARDITE_Y, SPECIES_CHARIZARD_MEGA_Y}}, [SPECIES_SQUIRTLE] = {{EVO_LEVEL, 16, SPECIES_WARTORTLE}}, [SPECIES_WARTORTLE] = {{EVO_LEVEL, 36, SPECIES_BLASTOISE}}, - [SPECIES_BLASTOISE] = {{EVO_MEGA_EVOLUTION, ITEM_BLASTOISINITE, SPECIES_BLASTOISE_MEGA}}, [SPECIES_CATERPIE] = {{EVO_LEVEL, 7, SPECIES_METAPOD}}, [SPECIES_METAPOD] = {{EVO_LEVEL, 10, SPECIES_BUTTERFREE}}, [SPECIES_WEEDLE] = {{EVO_LEVEL, 7, SPECIES_KAKUNA}}, [SPECIES_KAKUNA] = {{EVO_LEVEL, 10, SPECIES_BEEDRILL}}, - [SPECIES_BEEDRILL] = {{EVO_MEGA_EVOLUTION, ITEM_BEEDRILLITE, SPECIES_BEEDRILL_MEGA}}, [SPECIES_PIDGEY] = {{EVO_LEVEL, 18, SPECIES_PIDGEOTTO}}, [SPECIES_PIDGEOTTO] = {{EVO_LEVEL, 36, SPECIES_PIDGEOT}}, - [SPECIES_PIDGEOT] = {{EVO_MEGA_EVOLUTION, ITEM_PIDGEOTITE, SPECIES_PIDGEOT_MEGA}}, [SPECIES_RATTATA] = {{EVO_LEVEL, 20, SPECIES_RATICATE}}, [SPECIES_SPEAROW] = {{EVO_LEVEL, 20, SPECIES_FEAROW}}, [SPECIES_EKANS] = {{EVO_LEVEL, 22, SPECIES_ARBOK}}, @@ -48,7 +42,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_POLITOED}}, [SPECIES_ABRA] = {{EVO_LEVEL, 16, SPECIES_KADABRA}}, [SPECIES_KADABRA] = {{EVO_TRADE, 0, SPECIES_ALAKAZAM}}, - [SPECIES_ALAKAZAM] = {{EVO_MEGA_EVOLUTION, ITEM_ALAKAZITE, SPECIES_ALAKAZAM_MEGA}}, [SPECIES_MACHOP] = {{EVO_LEVEL, 28, SPECIES_MACHOKE}}, [SPECIES_MACHOKE] = {{EVO_TRADE, 0, SPECIES_MACHAMP}}, [SPECIES_BELLSPROUT] = {{EVO_LEVEL, 21, SPECIES_WEEPINBELL}}, @@ -59,7 +52,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PONYTA] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH}}, [SPECIES_SLOWPOKE] = {{EVO_LEVEL, 37, SPECIES_SLOWBRO}, {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_SLOWKING}}, - [SPECIES_SLOWBRO] = {{EVO_MEGA_EVOLUTION, ITEM_SLOWBRONITE, SPECIES_SLOWBRO_MEGA}}, [SPECIES_MAGNEMITE] = {{EVO_LEVEL, 30, SPECIES_MAGNETON}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_MAGNETON] = {{EVO_MAPSEC, MAPSEC_NEW_MAUVILLE, SPECIES_MAGNEZONE}, @@ -71,7 +63,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_SHELLDER] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_CLOYSTER}}, [SPECIES_GASTLY] = {{EVO_LEVEL, 25, SPECIES_HAUNTER}}, [SPECIES_HAUNTER] = {{EVO_TRADE, 0, SPECIES_GENGAR}}, - [SPECIES_GENGAR] = {{EVO_MEGA_EVOLUTION, ITEM_GENGARITE, SPECIES_GENGAR_MEGA}}, [SPECIES_ONIX] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_STEELIX}}, [SPECIES_DROWZEE] = {{EVO_LEVEL, 26, SPECIES_HYPNO}}, [SPECIES_KRABBY] = {{EVO_LEVEL, 28, SPECIES_KINGLER}}, @@ -92,7 +83,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #if P_GEN_4_POKEMON == TRUE [SPECIES_TANGELA] = {{EVO_MOVE, MOVE_ANCIENT_POWER, SPECIES_TANGROWTH}}, #endif - [SPECIES_KANGASKHAN] = {{EVO_MEGA_EVOLUTION, ITEM_KANGASKHANITE, SPECIES_KANGASKHAN_MEGA}}, [SPECIES_HORSEA] = {{EVO_LEVEL, 32, SPECIES_SEADRA}}, [SPECIES_SEADRA] = {{EVO_TRADE_ITEM, ITEM_DRAGON_SCALE, SPECIES_KINGDRA}}, [SPECIES_GOLDEEN] = {{EVO_LEVEL, 33, SPECIES_SEAKING}}, @@ -102,9 +92,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_ELECTABUZZ] = {{EVO_TRADE_ITEM, ITEM_ELECTIRIZER, SPECIES_ELECTIVIRE}}, [SPECIES_MAGMAR] = {{EVO_TRADE_ITEM, ITEM_MAGMARIZER, SPECIES_MAGMORTAR}}, #endif - [SPECIES_PINSIR] = {{EVO_MEGA_EVOLUTION, ITEM_PINSIRITE, SPECIES_PINSIR_MEGA}}, [SPECIES_MAGIKARP] = {{EVO_LEVEL, 20, SPECIES_GYARADOS}}, - [SPECIES_GYARADOS] = {{EVO_MEGA_EVOLUTION, ITEM_GYARADOSITE, SPECIES_GYARADOS_MEGA}}, [SPECIES_EEVEE] = {{EVO_ITEM, ITEM_THUNDER_STONE, SPECIES_JOLTEON}, {EVO_ITEM, ITEM_WATER_STONE, SPECIES_VAPOREON}, {EVO_ITEM, ITEM_FIRE_STONE, SPECIES_FLAREON}, @@ -123,11 +111,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2}}, [SPECIES_OMANYTE] = {{EVO_LEVEL, 40, SPECIES_OMASTAR}}, [SPECIES_KABUTO] = {{EVO_LEVEL, 40, SPECIES_KABUTOPS}}, - [SPECIES_AERODACTYL] = {{EVO_MEGA_EVOLUTION, ITEM_AERODACTYLITE, SPECIES_AERODACTYL_MEGA}}, [SPECIES_DRATINI] = {{EVO_LEVEL, 30, SPECIES_DRAGONAIR}}, [SPECIES_DRAGONAIR] = {{EVO_LEVEL, 55, SPECIES_DRAGONITE}}, - [SPECIES_MEWTWO] = {{EVO_MEGA_EVOLUTION, ITEM_MEWTWONITE_X, SPECIES_MEWTWO_MEGA_X}, - {EVO_MEGA_EVOLUTION, ITEM_MEWTWONITE_Y, SPECIES_MEWTWO_MEGA_Y}}, [SPECIES_CHIKORITA] = {{EVO_LEVEL, 16, SPECIES_BAYLEEF}}, [SPECIES_BAYLEEF] = {{EVO_LEVEL, 32, SPECIES_MEGANIUM}}, [SPECIES_CYNDAQUIL] = {{EVO_LEVEL, 14, SPECIES_QUILAVA}}, @@ -149,7 +134,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_NATU] = {{EVO_LEVEL, 25, SPECIES_XATU}}, [SPECIES_MAREEP] = {{EVO_LEVEL, 15, SPECIES_FLAAFFY}}, [SPECIES_FLAAFFY] = {{EVO_LEVEL, 30, SPECIES_AMPHAROS}}, - [SPECIES_AMPHAROS] = {{EVO_MEGA_EVOLUTION, ITEM_AMPHAROSITE, SPECIES_AMPHAROS_MEGA}}, [SPECIES_MARILL] = {{EVO_LEVEL, 18, SPECIES_AZUMARILL}}, [SPECIES_HOPPIP] = {{EVO_LEVEL, 18, SPECIES_SKIPLOOM}}, [SPECIES_SKIPLOOM] = {{EVO_LEVEL, 27, SPECIES_JUMPLUFF}}, @@ -167,10 +151,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #if P_GEN_4_POKEMON == TRUE [SPECIES_GLIGAR] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_FANG, SPECIES_GLISCOR}}, #endif - [SPECIES_STEELIX] = {{EVO_MEGA_EVOLUTION, ITEM_STEELIXITE, SPECIES_STEELIX_MEGA}}, [SPECIES_SNUBBULL] = {{EVO_LEVEL, 23, SPECIES_GRANBULL}}, - [SPECIES_SCIZOR] = {{EVO_MEGA_EVOLUTION, ITEM_SCIZORITE, SPECIES_SCIZOR_MEGA}}, - [SPECIES_HERACROSS] = {{EVO_MEGA_EVOLUTION, ITEM_HERACRONITE, SPECIES_HERACROSS_MEGA}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_SNEASEL] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_CLAW, SPECIES_WEAVILE}}, #endif @@ -182,7 +163,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #endif [SPECIES_REMORAID] = {{EVO_LEVEL, 25, SPECIES_OCTILLERY}}, [SPECIES_HOUNDOUR] = {{EVO_LEVEL, 24, SPECIES_HOUNDOOM}}, - [SPECIES_HOUNDOOM] = {{EVO_MEGA_EVOLUTION, ITEM_HOUNDOOMINITE, SPECIES_HOUNDOOM_MEGA}}, [SPECIES_PHANPY] = {{EVO_LEVEL, 25, SPECIES_DONPHAN}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_PORYGON2] = {{EVO_TRADE_ITEM, ITEM_DUBIOUS_DISC, SPECIES_PORYGON_Z}}, @@ -195,16 +175,12 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_MAGBY] = {{EVO_LEVEL, 30, SPECIES_MAGMAR}}, [SPECIES_LARVITAR] = {{EVO_LEVEL, 30, SPECIES_PUPITAR}}, [SPECIES_PUPITAR] = {{EVO_LEVEL, 55, SPECIES_TYRANITAR}}, - [SPECIES_TYRANITAR] = {{EVO_MEGA_EVOLUTION, ITEM_TYRANITARITE, SPECIES_TYRANITAR_MEGA}}, [SPECIES_TREECKO] = {{EVO_LEVEL, 16, SPECIES_GROVYLE}}, [SPECIES_GROVYLE] = {{EVO_LEVEL, 36, SPECIES_SCEPTILE}}, - [SPECIES_SCEPTILE] = {{EVO_MEGA_EVOLUTION, ITEM_SCEPTILITE, SPECIES_SCEPTILE_MEGA}}, [SPECIES_TORCHIC] = {{EVO_LEVEL, 16, SPECIES_COMBUSKEN}}, [SPECIES_COMBUSKEN] = {{EVO_LEVEL, 36, SPECIES_BLAZIKEN}}, - [SPECIES_BLAZIKEN] = {{EVO_MEGA_EVOLUTION, ITEM_BLAZIKENITE, SPECIES_BLAZIKEN_MEGA}}, [SPECIES_MUDKIP] = {{EVO_LEVEL, 16, SPECIES_MARSHTOMP}}, [SPECIES_MARSHTOMP] = {{EVO_LEVEL, 36, SPECIES_SWAMPERT}}, - [SPECIES_SWAMPERT] = {{EVO_MEGA_EVOLUTION, ITEM_SWAMPERTITE, SPECIES_SWAMPERT_MEGA}}, [SPECIES_POOCHYENA] = {{EVO_LEVEL, 18, SPECIES_MIGHTYENA}}, [SPECIES_ZIGZAGOON] = {{EVO_LEVEL, 20, SPECIES_LINOONE}}, [SPECIES_WURMPLE] = {{EVO_LEVEL_SILCOON, 7, SPECIES_SILCOON}, @@ -227,20 +203,16 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #if P_GEN_4_POKEMON == TRUE [SPECIES_NOSEPASS] = {{EVO_MAPSEC, MAPSEC_NEW_MAUVILLE, SPECIES_PROBOPASS}}, #endif - [SPECIES_SABLEYE] = {{EVO_MEGA_EVOLUTION, ITEM_SABLENITE, SPECIES_SABLEYE_MEGA}}, [SPECIES_BARBOACH] = {{EVO_LEVEL, 30, SPECIES_WHISCASH}}, [SPECIES_CORPHISH] = {{EVO_LEVEL, 30, SPECIES_CRAWDAUNT}}, [SPECIES_FEEBAS] = {{EVO_BEAUTY, 170, SPECIES_MILOTIC}, {EVO_TRADE_ITEM, ITEM_PRISM_SCALE, SPECIES_MILOTIC}}, [SPECIES_CARVANHA] = {{EVO_LEVEL, 30, SPECIES_SHARPEDO}}, - [SPECIES_SHARPEDO] = {{EVO_MEGA_EVOLUTION, ITEM_SHARPEDONITE, SPECIES_SHARPEDO_MEGA}}, [SPECIES_TRAPINCH] = {{EVO_LEVEL, 35, SPECIES_VIBRAVA}}, [SPECIES_VIBRAVA] = {{EVO_LEVEL, 45, SPECIES_FLYGON}}, [SPECIES_MAKUHITA] = {{EVO_LEVEL, 24, SPECIES_HARIYAMA}}, [SPECIES_ELECTRIKE] = {{EVO_LEVEL, 26, SPECIES_MANECTRIC}}, - [SPECIES_MANECTRIC] = {{EVO_MEGA_EVOLUTION, ITEM_MANECTITE, SPECIES_MANECTRIC_MEGA}}, [SPECIES_NUMEL] = {{EVO_LEVEL, 33, SPECIES_CAMERUPT}}, - [SPECIES_CAMERUPT] = {{EVO_MEGA_EVOLUTION, ITEM_CAMERUPTITE, SPECIES_CAMERUPT_MEGA}}, [SPECIES_SPHEAL] = {{EVO_LEVEL, 32, SPECIES_SEALEO}}, [SPECIES_SEALEO] = {{EVO_LEVEL, 44, SPECIES_WALREIN}}, [SPECIES_CACNEA] = {{EVO_LEVEL, 32, SPECIES_CACTURNE}}, @@ -249,14 +221,10 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_ITEM_FEMALE, ITEM_DAWN_STONE, SPECIES_FROSLASS} #endif }, - [SPECIES_GLALIE] = {{EVO_MEGA_EVOLUTION, ITEM_GLALITITE, SPECIES_GLALIE_MEGA}}, [SPECIES_AZURILL] = {{EVO_FRIENDSHIP, 0, SPECIES_MARILL}}, [SPECIES_SPOINK] = {{EVO_LEVEL, 32, SPECIES_GRUMPIG}}, - [SPECIES_MAWILE] = {{EVO_MEGA_EVOLUTION, ITEM_MAWILITE, SPECIES_MAWILE_MEGA}}, [SPECIES_MEDITITE] = {{EVO_LEVEL, 37, SPECIES_MEDICHAM}}, - [SPECIES_MEDICHAM] = {{EVO_MEGA_EVOLUTION, ITEM_MEDICHAMITE, SPECIES_MEDICHAM_MEGA}}, [SPECIES_SWABLU] = {{EVO_LEVEL, 35, SPECIES_ALTARIA}}, - [SPECIES_ALTARIA] = {{EVO_MEGA_EVOLUTION, ITEM_ALTARIANITE, SPECIES_ALTARIA_MEGA}}, [SPECIES_WYNAUT] = {{EVO_LEVEL, 15, SPECIES_WOBBUFFET}}, [SPECIES_DUSKULL] = {{EVO_LEVEL, 37, SPECIES_DUSCLOPS}}, #if P_GEN_4_POKEMON == TRUE @@ -270,12 +238,9 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_LOUDRED] = {{EVO_LEVEL, 40, SPECIES_EXPLOUD}}, [SPECIES_CLAMPERL] = {{EVO_TRADE_ITEM, ITEM_DEEP_SEA_TOOTH, SPECIES_HUNTAIL}, {EVO_TRADE_ITEM, ITEM_DEEP_SEA_SCALE, SPECIES_GOREBYSS}}, - [SPECIES_ABSOL] = {{EVO_MEGA_EVOLUTION, ITEM_ABSOLITE, SPECIES_ABSOL_MEGA}}, [SPECIES_SHUPPET] = {{EVO_LEVEL, 37, SPECIES_BANETTE}}, - [SPECIES_BANETTE] = {{EVO_MEGA_EVOLUTION, ITEM_BANETTITE, SPECIES_BANETTE_MEGA}}, [SPECIES_ARON] = {{EVO_LEVEL, 32, SPECIES_LAIRON}}, [SPECIES_LAIRON] = {{EVO_LEVEL, 42, SPECIES_AGGRON}}, - [SPECIES_AGGRON] = {{EVO_MEGA_EVOLUTION, ITEM_AGGRONITE, SPECIES_AGGRON_MEGA}}, [SPECIES_LILEEP] = {{EVO_LEVEL, 40, SPECIES_CRADILY}}, [SPECIES_ANORITH] = {{EVO_LEVEL, 40, SPECIES_ARMALDO}}, [SPECIES_RALTS] = {{EVO_LEVEL, 20, SPECIES_KIRLIA}}, @@ -284,17 +249,10 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_ITEM_MALE, ITEM_DAWN_STONE, SPECIES_GALLADE} #endif }, - [SPECIES_GARDEVOIR] = {{EVO_MEGA_EVOLUTION, ITEM_GARDEVOIRITE, SPECIES_GARDEVOIR_MEGA}}, [SPECIES_BAGON] = {{EVO_LEVEL, 30, SPECIES_SHELGON}}, [SPECIES_SHELGON] = {{EVO_LEVEL, 50, SPECIES_SALAMENCE}}, - [SPECIES_SALAMENCE] = {{EVO_MEGA_EVOLUTION, ITEM_SALAMENCITE, SPECIES_SALAMENCE_MEGA}}, [SPECIES_BELDUM] = {{EVO_LEVEL, 20, SPECIES_METANG}}, [SPECIES_METANG] = {{EVO_LEVEL, 45, SPECIES_METAGROSS}}, - [SPECIES_METAGROSS] = {{EVO_MEGA_EVOLUTION, ITEM_METAGROSSITE, SPECIES_METAGROSS_MEGA}}, - [SPECIES_LATIAS] = {{EVO_MEGA_EVOLUTION, ITEM_LATIASITE, SPECIES_LATIAS_MEGA}}, - [SPECIES_LATIOS] = {{EVO_MEGA_EVOLUTION, ITEM_LATIOSITE, SPECIES_LATIOS_MEGA}}, - [SPECIES_RAYQUAZA] = {{EVO_MOVE_MEGA_EVOLUTION, MOVE_DRAGON_ASCENT, SPECIES_RAYQUAZA_MEGA}}, - #if P_GEN_4_POKEMON == TRUE // Gens 4-7 [SPECIES_TURTWIG] = {{EVO_LEVEL, 18, SPECIES_GROTLE}}, @@ -320,7 +278,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_SHELLOS] = {{EVO_LEVEL, 30, SPECIES_GASTRODON}}, [SPECIES_DRIFLOON] = {{EVO_LEVEL, 28, SPECIES_DRIFBLIM}}, [SPECIES_BUNEARY] = {{EVO_FRIENDSHIP, 0, SPECIES_LOPUNNY}}, - [SPECIES_LOPUNNY] = {{EVO_MEGA_EVOLUTION, ITEM_LOPUNNITE, SPECIES_LOPUNNY_MEGA}}, [SPECIES_GLAMEOW] = {{EVO_LEVEL, 38, SPECIES_PURUGLY}}, [SPECIES_CHINGLING] = {{EVO_FRIENDSHIP_NIGHT, 0, SPECIES_CHIMECHO}}, [SPECIES_STUNKY] = {{EVO_LEVEL, 34, SPECIES_SKUNTANK}}, @@ -330,18 +287,14 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_HAPPINY] = {{EVO_ITEM_HOLD_DAY, ITEM_OVAL_STONE, SPECIES_CHANSEY}}, [SPECIES_GIBLE] = {{EVO_LEVEL, 24, SPECIES_GABITE}}, [SPECIES_GABITE] = {{EVO_LEVEL, 48, SPECIES_GARCHOMP}}, - [SPECIES_GARCHOMP] = {{EVO_MEGA_EVOLUTION, ITEM_GARCHOMPITE, SPECIES_GARCHOMP_MEGA}}, [SPECIES_MUNCHLAX] = {{EVO_FRIENDSHIP, 0, SPECIES_SNORLAX}}, [SPECIES_RIOLU] = {{EVO_FRIENDSHIP_DAY, 0, SPECIES_LUCARIO}}, - [SPECIES_LUCARIO] = {{EVO_MEGA_EVOLUTION, ITEM_LUCARIONITE, SPECIES_LUCARIO_MEGA}}, [SPECIES_HIPPOPOTAS] = {{EVO_LEVEL, 34, SPECIES_HIPPOWDON}}, [SPECIES_SKORUPI] = {{EVO_LEVEL, 40, SPECIES_DRAPION}}, [SPECIES_CROAGUNK] = {{EVO_LEVEL, 37, SPECIES_TOXICROAK}}, [SPECIES_FINNEON] = {{EVO_LEVEL, 31, SPECIES_LUMINEON}}, [SPECIES_MANTYKE] = {{EVO_SPECIFIC_MON_IN_PARTY, SPECIES_REMORAID, SPECIES_MANTINE}}, [SPECIES_SNOVER] = {{EVO_LEVEL, 40, SPECIES_ABOMASNOW}}, - [SPECIES_ABOMASNOW] = {{EVO_MEGA_EVOLUTION, ITEM_ABOMASITE, SPECIES_ABOMASNOW_MEGA}}, - [SPECIES_GALLADE] = {{EVO_MEGA_EVOLUTION, ITEM_GALLADITE, SPECIES_GALLADE_MEGA}}, #endif #if P_GEN_5_POKEMON == TRUE [SPECIES_SNIVY] = {{EVO_LEVEL, 17, SPECIES_SERVINE}}, @@ -365,7 +318,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_BOLDORE] = {{EVO_TRADE, 0, SPECIES_GIGALITH}}, [SPECIES_WOOBAT] = {{EVO_FRIENDSHIP, 0, SPECIES_SWOOBAT}}, [SPECIES_DRILBUR] = {{EVO_LEVEL, 31, SPECIES_EXCADRILL}}, - [SPECIES_AUDINO] = {{EVO_MEGA_EVOLUTION, ITEM_AUDINITE, SPECIES_AUDINO_MEGA}}, [SPECIES_TIMBURR] = {{EVO_LEVEL, 25, SPECIES_GURDURR}}, [SPECIES_GURDURR] = {{EVO_TRADE, 0, SPECIES_CONKELDURR}}, [SPECIES_TYMPOLE] = {{EVO_LEVEL, 25, SPECIES_PALPITOAD}}, @@ -456,7 +408,6 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PUMPKABOO] = {{EVO_TRADE, 0, SPECIES_GOURGEIST}}, [SPECIES_BERGMITE] = {{EVO_LEVEL, 37, SPECIES_AVALUGG}}, [SPECIES_NOIBAT] = {{EVO_LEVEL, 48, SPECIES_NOIVERN}}, - [SPECIES_DIANCIE] = {{EVO_MEGA_EVOLUTION, ITEM_DIANCITE, SPECIES_DIANCIE_MEGA}}, #endif #if P_GEN_7_POKEMON == TRUE [SPECIES_ROWLET] = {{EVO_LEVEL, 17, SPECIES_DARTRIX}}, diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index a0cc805e9a..d69ced5bf2 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -1,10 +1,100 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = { + [SPECIES_VENUSAUR] = sVenusaurFormChangeTable, + [SPECIES_VENUSAUR_MEGA] = sVenusaurFormChangeTable, + [SPECIES_CHARIZARD] = sCharizardFormChangeTable, + [SPECIES_CHARIZARD_MEGA_X] = sCharizardFormChangeTable, + [SPECIES_CHARIZARD_MEGA_Y] = sCharizardFormChangeTable, + [SPECIES_BLASTOISE] = sBlastoiseFormChangeTable, + [SPECIES_BLASTOISE_MEGA] = sBlastoiseFormChangeTable, + [SPECIES_BEEDRILL] = sBeedrillFormChangeTable, + [SPECIES_BEEDRILL_MEGA] = sBeedrillFormChangeTable, + [SPECIES_PIDGEOT] = sPidgeotFormChangeTable, + [SPECIES_PIDGEOT_MEGA] = sPidgeotFormChangeTable, + [SPECIES_ALAKAZAM] = sAlakazamFormChangeTable, + [SPECIES_ALAKAZAM_MEGA] = sAlakazamFormChangeTable, + [SPECIES_SLOWBRO] = sSlowbroFormChangeTable, + [SPECIES_SLOWBRO_MEGA] = sSlowbroFormChangeTable, + [SPECIES_GENGAR] = sGengarFormChangeTable, + [SPECIES_GENGAR_MEGA] = sGengarFormChangeTable, + [SPECIES_KANGASKHAN] = sKangaskhanFormChangeTable, + [SPECIES_KANGASKHAN_MEGA] = sKangaskhanFormChangeTable, + [SPECIES_PINSIR] = sPinsirFormChangeTable, + [SPECIES_PINSIR_MEGA] = sPinsirFormChangeTable, + [SPECIES_GYARADOS] = sGyaradosFormChangeTable, + [SPECIES_GYARADOS_MEGA] = sGyaradosFormChangeTable, + [SPECIES_AERODACTYL] = sAerodactylFormChangeTable, + [SPECIES_AERODACTYL_MEGA] = sAerodactylFormChangeTable, + [SPECIES_MEWTWO] = sMewtwoFormChangeTable, + [SPECIES_MEWTWO_MEGA_X] = sMewtwoFormChangeTable, + [SPECIES_MEWTWO_MEGA_Y] = sMewtwoFormChangeTable, + [SPECIES_AMPHAROS] = sAmpharosFormChangeTable, + [SPECIES_AMPHAROS_MEGA] = sAmpharosFormChangeTable, + [SPECIES_STEELIX] = sSteelixFormChangeTable, + [SPECIES_STEELIX_MEGA] = sSteelixFormChangeTable, + [SPECIES_SCIZOR] = sScizorFormChangeTable, + [SPECIES_SCIZOR_MEGA] = sScizorFormChangeTable, + [SPECIES_HERACROSS] = sHeracrossFormChangeTable, + [SPECIES_HERACROSS_MEGA] = sHeracrossFormChangeTable, + [SPECIES_HOUNDOOM] = sHoundoomFormChangeTable, + [SPECIES_HOUNDOOM_MEGA] = sHoundoomFormChangeTable, + [SPECIES_TYRANITAR] = sTyranitarFormChangeTable, + [SPECIES_TYRANITAR_MEGA] = sTyranitarFormChangeTable, + [SPECIES_SCEPTILE] = sSceptileFormChangeTable, + [SPECIES_SCEPTILE_MEGA] = sSceptileFormChangeTable, + [SPECIES_BLAZIKEN] = sBlazikenFormChangeTable, + [SPECIES_BLAZIKEN_MEGA] = sBlazikenFormChangeTable, + [SPECIES_SWAMPERT] = sSwampertFormChangeTable, + [SPECIES_SWAMPERT_MEGA] = sSwampertFormChangeTable, + [SPECIES_SABLEYE] = sSableyeFormChangeTable, + [SPECIES_SABLEYE_MEGA] = sSableyeFormChangeTable, + [SPECIES_SHARPEDO] = sSharpedoFormChangeTable, + [SPECIES_SHARPEDO_MEGA] = sSharpedoFormChangeTable, + [SPECIES_MANECTRIC] = sManectricFormChangeTable, + [SPECIES_MANECTRIC_MEGA] = sManectricFormChangeTable, + [SPECIES_CAMERUPT] = sCameruptFormChangeTable, + [SPECIES_CAMERUPT_MEGA] = sCameruptFormChangeTable, + [SPECIES_GLALIE] = sGlalieFormChangeTable, + [SPECIES_GLALIE_MEGA] = sGlalieFormChangeTable, + [SPECIES_MAWILE] = sMawileFormChangeTable, + [SPECIES_MAWILE_MEGA] = sMawileFormChangeTable, + [SPECIES_MEDICHAM] = sMedichamFormChangeTable, + [SPECIES_MEDICHAM_MEGA] = sMedichamFormChangeTable, + [SPECIES_ALTARIA] = sAltariaFormChangeTable, + [SPECIES_ALTARIA_MEGA] = sAltariaFormChangeTable, + [SPECIES_ABSOL] = sAbsolFormChangeTable, + [SPECIES_ABSOL_MEGA] = sAbsolFormChangeTable, + [SPECIES_BANETTE] = sBanetteFormChangeTable, + [SPECIES_BANETTE_MEGA] = sBanetteFormChangeTable, + [SPECIES_AGGRON] = sAggronFormChangeTable, + [SPECIES_AGGRON_MEGA] = sAggronFormChangeTable, + [SPECIES_GARDEVOIR] = sGardevoirFormChangeTable, + [SPECIES_GARDEVOIR_MEGA] = sGardevoirFormChangeTable, + [SPECIES_SALAMENCE] = sSalamenceFormChangeTable, + [SPECIES_SALAMENCE_MEGA] = sSalamenceFormChangeTable, + [SPECIES_METAGROSS] = sMetagrossFormChangeTable, + [SPECIES_METAGROSS_MEGA] = sMetagrossFormChangeTable, + [SPECIES_LATIAS] = sLatiasFormChangeTable, + [SPECIES_LATIAS_MEGA] = sLatiasFormChangeTable, + [SPECIES_LATIOS] = sLatiosFormChangeTable, + [SPECIES_LATIOS_MEGA] = sLatiosFormChangeTable, [SPECIES_KYOGRE] = sKyogreFormChangeTable, [SPECIES_KYOGRE_PRIMAL] = sKyogreFormChangeTable, [SPECIES_GROUDON] = sGroudonFormChangeTable, [SPECIES_GROUDON_PRIMAL] = sGroudonFormChangeTable, + [SPECIES_RAYQUAZA] = sRayquazaFormChangeTable, + [SPECIES_RAYQUAZA_MEGA] = sRayquazaFormChangeTable, #if P_GEN_4_POKEMON == TRUE + [SPECIES_LOPUNNY] = sLopunnyFormChangeTable, + [SPECIES_LOPUNNY_MEGA] = sLopunnyFormChangeTable, + [SPECIES_GARCHOMP] = sGarchompFormChangeTable, + [SPECIES_GARCHOMP_MEGA] = sGarchompFormChangeTable, + [SPECIES_LUCARIO] = sLucarioFormChangeTable, + [SPECIES_LUCARIO_MEGA] = sLucarioFormChangeTable, + [SPECIES_ABOMASNOW] = sAbomasnowFormChangeTable, + [SPECIES_ABOMASNOW_MEGA] = sAbomasnowFormChangeTable, + [SPECIES_GALLADE] = sGalladeFormChangeTable, + [SPECIES_GALLADE_MEGA] = sGalladeFormChangeTable, [SPECIES_GIRATINA] = sGiratinaFormChangeTable, [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, [SPECIES_SHAYMIN] = sShayminFormChangeTable, @@ -29,6 +119,8 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, #endif #if P_GEN_5_POKEMON == TRUE + [SPECIES_AUDINO] = sAudinoFormChangeTable, + [SPECIES_AUDINO_MEGA] = sAudinoFormChangeTable, [SPECIES_DARMANITAN] = sDarmanitanFormChangeTable, [SPECIES_DARMANITAN_ZEN_MODE] = sDarmanitanFormChangeTable, [SPECIES_DARMANITAN_GALARIAN] = sDarmanitanGalarianFormChangeTable, @@ -56,6 +148,8 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_AEGISLASH_BLADE] = sAegislashFormChangeTable, [SPECIES_XERNEAS] = sXerneasFormChangeTable, [SPECIES_XERNEAS_ACTIVE] = sXerneasFormChangeTable, + [SPECIES_DIANCIE] = sDiancieFormChangeTable, + [SPECIES_DIANCIE_MEGA] = sDiancieFormChangeTable, [SPECIES_HOOPA] = sHoopaFormChangeTable, [SPECIES_HOOPA_UNBOUND] = sHoopaFormChangeTable, #endif diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 1f0dc85da1..9c0b2d8666 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -56,6 +56,274 @@ FORM_CHANGE_PRIMAL_REVERSION: #define DAY 1 #define NIGHT 2 +static const struct FormChange sVenusaurFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, + {FORM_CHANGE_FAINT, SPECIES_VENUSAUR}, + {FORM_CHANGE_BATTLE_END, SPECIES_VENUSAUR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sCharizardFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_X, ITEM_CHARIZARDITE_X}, + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_Y, ITEM_CHARIZARDITE_Y}, + {FORM_CHANGE_FAINT, SPECIES_CHARIZARD}, + {FORM_CHANGE_BATTLE_END, SPECIES_CHARIZARD}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sBlastoiseFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BLASTOISE_MEGA, ITEM_BLASTOISINITE}, + {FORM_CHANGE_FAINT, SPECIES_BLASTOISE}, + {FORM_CHANGE_BATTLE_END, SPECIES_BLASTOISE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sBeedrillFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BEEDRILL_MEGA, ITEM_BEEDRILLITE}, + {FORM_CHANGE_FAINT, SPECIES_BEEDRILL}, + {FORM_CHANGE_BATTLE_END, SPECIES_BEEDRILL}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sPidgeotFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_PIDGEOT_MEGA, ITEM_PIDGEOTITE}, + {FORM_CHANGE_FAINT, SPECIES_PIDGEOT}, + {FORM_CHANGE_BATTLE_END, SPECIES_PIDGEOT}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAlakazamFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ALAKAZAM_MEGA, ITEM_ALAKAZITE}, + {FORM_CHANGE_FAINT, SPECIES_ALAKAZAM}, + {FORM_CHANGE_BATTLE_END, SPECIES_ALAKAZAM}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSlowbroFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SLOWBRO_MEGA, ITEM_SLOWBRONITE}, + {FORM_CHANGE_FAINT, SPECIES_SLOWBRO}, + {FORM_CHANGE_BATTLE_END, SPECIES_SLOWBRO}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGengarFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GENGAR_MEGA, ITEM_GENGARITE}, + {FORM_CHANGE_FAINT, SPECIES_GENGAR}, + {FORM_CHANGE_BATTLE_END, SPECIES_GENGAR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sKangaskhanFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_KANGASKHAN_MEGA, ITEM_KANGASKHANITE}, + {FORM_CHANGE_FAINT, SPECIES_KANGASKHAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_KANGASKHAN}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sPinsirFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_PINSIR_MEGA, ITEM_PINSIRITE}, + {FORM_CHANGE_FAINT, SPECIES_PINSIR}, + {FORM_CHANGE_BATTLE_END, SPECIES_PINSIR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGyaradosFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GYARADOS_MEGA, ITEM_GYARADOSITE}, + {FORM_CHANGE_FAINT, SPECIES_GYARADOS}, + {FORM_CHANGE_BATTLE_END, SPECIES_GYARADOS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAerodactylFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AERODACTYL_MEGA, ITEM_AERODACTYLITE}, + {FORM_CHANGE_FAINT, SPECIES_AERODACTYL}, + {FORM_CHANGE_BATTLE_END, SPECIES_AERODACTYL}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMewtwoFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_X, ITEM_MEWTWONITE_X}, + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_Y, ITEM_MEWTWONITE_Y}, + {FORM_CHANGE_FAINT, SPECIES_MEWTWO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MEWTWO}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAmpharosFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AMPHAROS_MEGA, ITEM_AMPHAROSITE}, + {FORM_CHANGE_FAINT, SPECIES_AMPHAROS}, + {FORM_CHANGE_BATTLE_END, SPECIES_AMPHAROS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSteelixFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_STEELIX_MEGA, ITEM_STEELIXITE}, + {FORM_CHANGE_FAINT, SPECIES_STEELIX}, + {FORM_CHANGE_BATTLE_END, SPECIES_STEELIX}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sScizorFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SCIZOR_MEGA, ITEM_SCIZORITE}, + {FORM_CHANGE_FAINT, SPECIES_SCIZOR}, + {FORM_CHANGE_BATTLE_END, SPECIES_SCIZOR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sHeracrossFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_HERACROSS_MEGA, ITEM_HERACRONITE}, + {FORM_CHANGE_FAINT, SPECIES_HERACROSS}, + {FORM_CHANGE_BATTLE_END, SPECIES_HERACROSS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sHoundoomFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_HOUNDOOM_MEGA, ITEM_HOUNDOOMINITE}, + {FORM_CHANGE_FAINT, SPECIES_HOUNDOOM}, + {FORM_CHANGE_BATTLE_END, SPECIES_HOUNDOOM}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sTyranitarFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_TYRANITAR_MEGA, ITEM_TYRANITARITE}, + {FORM_CHANGE_FAINT, SPECIES_TYRANITAR}, + {FORM_CHANGE_BATTLE_END, SPECIES_TYRANITAR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSceptileFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SCEPTILE_MEGA, ITEM_SCEPTILITE}, + {FORM_CHANGE_FAINT, SPECIES_SCEPTILE}, + {FORM_CHANGE_BATTLE_END, SPECIES_SCEPTILE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sBlazikenFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BLAZIKEN_MEGA, ITEM_BLAZIKENITE}, + {FORM_CHANGE_FAINT, SPECIES_BLAZIKEN}, + {FORM_CHANGE_BATTLE_END, SPECIES_BLAZIKEN}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSwampertFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SWAMPERT_MEGA, ITEM_SWAMPERTITE}, + {FORM_CHANGE_FAINT, SPECIES_SWAMPERT}, + {FORM_CHANGE_BATTLE_END, SPECIES_SWAMPERT}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSableyeFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SABLEYE_MEGA, ITEM_SABLENITE}, + {FORM_CHANGE_FAINT, SPECIES_SABLEYE}, + {FORM_CHANGE_BATTLE_END, SPECIES_SABLEYE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSharpedoFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SHARPEDO_MEGA, ITEM_SHARPEDONITE}, + {FORM_CHANGE_FAINT, SPECIES_SHARPEDO}, + {FORM_CHANGE_BATTLE_END, SPECIES_SHARPEDO}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sManectricFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MANECTRIC_MEGA, ITEM_MANECTITE}, + {FORM_CHANGE_FAINT, SPECIES_MANECTRIC}, + {FORM_CHANGE_BATTLE_END, SPECIES_MANECTRIC}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sCameruptFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CAMERUPT_MEGA, ITEM_CAMERUPTITE}, + {FORM_CHANGE_FAINT, SPECIES_CAMERUPT}, + {FORM_CHANGE_BATTLE_END, SPECIES_CAMERUPT}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGlalieFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GLALIE_MEGA, ITEM_GLALITITE}, + {FORM_CHANGE_FAINT, SPECIES_GLALIE}, + {FORM_CHANGE_BATTLE_END, SPECIES_GLALIE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMawileFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MAWILE_MEGA, ITEM_MAWILITE}, + {FORM_CHANGE_FAINT, SPECIES_MAWILE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MAWILE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMedichamFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEDICHAM_MEGA, ITEM_MEDICHAMITE}, + {FORM_CHANGE_FAINT, SPECIES_MEDICHAM}, + {FORM_CHANGE_BATTLE_END, SPECIES_MEDICHAM}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAltariaFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ALTARIA_MEGA, ITEM_ALTARIANITE}, + {FORM_CHANGE_FAINT, SPECIES_ALTARIA}, + {FORM_CHANGE_BATTLE_END, SPECIES_ALTARIA}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAbsolFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ABSOL_MEGA, ITEM_ABSOLITE}, + {FORM_CHANGE_FAINT, SPECIES_ABSOL}, + {FORM_CHANGE_BATTLE_END, SPECIES_ABSOL}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sBanetteFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, + {FORM_CHANGE_FAINT, SPECIES_BANETTE}, + {FORM_CHANGE_BATTLE_END, SPECIES_BANETTE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAggronFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AGGRON_MEGA, ITEM_AGGRONITE}, + {FORM_CHANGE_FAINT, SPECIES_AGGRON}, + {FORM_CHANGE_BATTLE_END, SPECIES_AGGRON}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGardevoirFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GARDEVOIR_MEGA, ITEM_GARDEVOIRITE}, + {FORM_CHANGE_FAINT, SPECIES_GARDEVOIR}, + {FORM_CHANGE_BATTLE_END, SPECIES_GARDEVOIR}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sSalamenceFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SALAMENCE_MEGA, ITEM_SALAMENCITE}, + {FORM_CHANGE_FAINT, SPECIES_SALAMENCE}, + {FORM_CHANGE_BATTLE_END, SPECIES_SALAMENCE}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sMetagrossFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_METAGROSS_MEGA, ITEM_METAGROSSITE}, + {FORM_CHANGE_FAINT, SPECIES_METAGROSS}, + {FORM_CHANGE_BATTLE_END, SPECIES_METAGROSS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sLatiasFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LATIAS_MEGA, ITEM_LATIASITE}, + {FORM_CHANGE_FAINT, SPECIES_LATIAS}, + {FORM_CHANGE_BATTLE_END, SPECIES_LATIAS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sLatiosFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LATIOS_MEGA, ITEM_LATIOSITE}, + {FORM_CHANGE_FAINT, SPECIES_LATIOS}, + {FORM_CHANGE_BATTLE_END, SPECIES_LATIOS}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sKyogreFormChangeTable[] = { {FORM_CHANGE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, {FORM_CHANGE_BATTLE_END, SPECIES_KYOGRE}, @@ -68,7 +336,49 @@ static const struct FormChange sGroudonFormChangeTable[] = { {FORM_CHANGE_END}, }; +static const struct FormChange sRayquazaFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, + {FORM_CHANGE_FAINT, SPECIES_RAYQUAZA}, + {FORM_CHANGE_BATTLE_END, SPECIES_RAYQUAZA}, + {FORM_CHANGE_END}, +}; + #if P_GEN_4_POKEMON == TRUE +static const struct FormChange sLopunnyFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, + {FORM_CHANGE_FAINT, SPECIES_LOPUNNY}, + {FORM_CHANGE_BATTLE_END, SPECIES_LOPUNNY}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGarchompFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GARCHOMP_MEGA, ITEM_GARCHOMPITE}, + {FORM_CHANGE_FAINT, SPECIES_GARCHOMP}, + {FORM_CHANGE_BATTLE_END, SPECIES_GARCHOMP}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sLucarioFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LUCARIO_MEGA, ITEM_LUCARIONITE}, + {FORM_CHANGE_FAINT, SPECIES_LUCARIO}, + {FORM_CHANGE_BATTLE_END, SPECIES_LUCARIO}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sAbomasnowFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ABOMASNOW_MEGA, ITEM_ABOMASITE}, + {FORM_CHANGE_FAINT, SPECIES_ABOMASNOW}, + {FORM_CHANGE_BATTLE_END, SPECIES_ABOMASNOW}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sGalladeFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GALLADE_MEGA, ITEM_GALLADITE}, + {FORM_CHANGE_FAINT, SPECIES_GALLADE}, + {FORM_CHANGE_BATTLE_END, SPECIES_GALLADE}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sGiratinaFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, @@ -122,6 +432,12 @@ static const struct FormChange sArceusFormChangeTable[] = { #endif #if P_GEN_5_POKEMON == TRUE +static const struct FormChange sAudinoFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AUDINO_MEGA, ITEM_AUDINITE}, + {FORM_CHANGE_FAINT, SPECIES_AUDINO}, + {FORM_CHANGE_BATTLE_END, SPECIES_AUDINO}, + {FORM_CHANGE_END}, +}; static const struct FormChange sDarmanitanFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN}, @@ -197,6 +513,13 @@ static const struct FormChange sXerneasFormChangeTable[] = { {FORM_CHANGE_END}, }; +static const struct FormChange sDiancieFormChangeTable[] = { + {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, + {FORM_CHANGE_FAINT, SPECIES_DIANCIE}, + {FORM_CHANGE_BATTLE_END, SPECIES_DIANCIE}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sHoopaFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, {FORM_CHANGE_WITHDRAW, SPECIES_HOOPA}, From 15c12af2cf9d51731e8ca9b9cce3f2d3adf7e97f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 23:50:26 -0300 Subject: [PATCH 011/229] Using TryBattleFormChange in place of certain TryFormChange --- include/battle_util.h | 2 ++ include/pokemon.h | 2 +- src/battle_main.c | 2 +- src/battle_script_commands.c | 14 +++----------- src/battle_util.c | 25 +++++++++++++++++-------- src/pokemon.c | 4 +++- 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index e1b890ebfe..120c0b7e91 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -188,6 +188,8 @@ void TryToRevertMimicry(void); void RestoreBattlerOriginalTypes(u8 battlerId); u32 GetBattlerMoveTargetType(u8 battlerId, u16 move); bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move); +void CopyMonLevelAndBaseStatsToBattleMon(u32 battler, struct Pokemon *mon); +void CopyMonAbilityAndTypesToBattleMon(u32 battler, struct Pokemon *mon); void RecalcBattlerStats(u32 battler, struct Pokemon *mon); // Ability checks bool32 IsRolePlayBannedAbilityAtk(u16 ability); diff --git a/include/pokemon.h b/include/pokemon.h index 134991b953..10b132f48a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -565,7 +565,7 @@ 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); -void TryFormChange(u32 monId, u32 side, u16 method); +bool32 TryFormChange(u32 monId, u32 side, u16 method); void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method); u32 GetMonFriendshipScore(struct Pokemon *pokemon); diff --git a/src/battle_main.c b/src/battle_main.c index 9d08a4e8c0..6afae7d9c3 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3247,7 +3247,7 @@ void FaintClearSetData(void) gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY; Ai_UpdateFaintData(gActiveBattler); - TryFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FORM_CHANGE_FAINT); + TryBattleFormChange(gActiveBattler, FORM_CHANGE_FAINT); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6cc2bc323a..d2de985a75 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4213,15 +4213,7 @@ static void Cmd_getexp(void) if (battlerId != 0xFF) { - gBattleMons[battlerId].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL); - gBattleMons[battlerId].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP); - gBattleMons[battlerId].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_MAX_HP); - gBattleMons[battlerId].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_ATK); - gBattleMons[battlerId].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_DEF); - gBattleMons[battlerId].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED); - gBattleMons[battlerId].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPATK); - gBattleMons[battlerId].spDefense = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPDEF); - + CopyMonLevelAndBaseStatsToBattleMon(battlerId, &gPlayerParty[gBattleStruct->expGetterMonId]); if (gStatuses3[battlerId] & STATUS3_POWER_TRICK) SWAP(gBattleMons[battlerId].attack, gBattleMons[battlerId].defense, temp); } @@ -14064,7 +14056,7 @@ static void Cmd_handleballthrow(void) { BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); - TryFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), + TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_END); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -14118,7 +14110,7 @@ static void Cmd_handleballthrow(void) if (IsCriticalCapture()) gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - TryFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FORM_CHANGE_BATTLE_END), + TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_END); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); diff --git a/src/battle_util.c b/src/battle_util.c index d4efdb8988..7709fa59ec 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -518,7 +518,7 @@ void HandleAction_Switch(void) if (gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; - TryFormChange(gBattlerPartyIndexes[gBattlerAttacker], GetBattlerSide(gBattlerAttacker), FORM_CHANGE_BATTLE_SWITCH); + TryBattleFormChange(gBattlerAttacker, FORM_CHANGE_BATTLE_SWITCH); } void HandleAction_UseItem(void) @@ -9698,16 +9698,14 @@ bool32 IsBattlerPrimalReverted(u8 battlerId) void TryBattleFormChange(u8 battlerId, u16 method) { - u16 targetSpecies; u8 monId = gBattlerPartyIndexes[battlerId]; u8 side = GET_BATTLER_SIDE(battlerId); struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); - if (targetSpecies != SPECIES_NONE) + if (TryFormChange(monId, side, method)) { - SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); - RecalcBattlerStats(battlerId, &party[monId]); + CopyMonLevelAndBaseStatsToBattleMon(battlerId, &party[monId]); + CopyMonAbilityAndTypesToBattleMon(battlerId, &party[monId]); } } @@ -10370,9 +10368,8 @@ bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move) return TRUE; } -void RecalcBattlerStats(u32 battler, struct Pokemon *mon) +void CopyMonLevelAndBaseStatsToBattleMon(u32 battler, struct Pokemon *mon) { - CalculateMonStats(mon); gBattleMons[battler].level = GetMonData(mon, MON_DATA_LEVEL); gBattleMons[battler].hp = GetMonData(mon, MON_DATA_HP); gBattleMons[battler].maxHP = GetMonData(mon, MON_DATA_MAX_HP); @@ -10381,7 +10378,19 @@ void RecalcBattlerStats(u32 battler, struct Pokemon *mon) gBattleMons[battler].speed = GetMonData(mon, MON_DATA_SPEED); gBattleMons[battler].spAttack = GetMonData(mon, MON_DATA_SPATK); gBattleMons[battler].spDefense = GetMonData(mon, MON_DATA_SPDEF); +} + +void CopyMonAbilityAndTypesToBattleMon(u32 battler, struct Pokemon *mon) +{ gBattleMons[battler].ability = GetMonAbility(mon); gBattleMons[battler].type1 = gBaseStats[gBattleMons[battler].species].type1; gBattleMons[battler].type2 = gBaseStats[gBattleMons[battler].species].type2; + gBattleMons[battler].type3 = TYPE_MYSTERY; +} + +void RecalcBattlerStats(u32 battler, struct Pokemon *mon) +{ + CalculateMonStats(mon); + CopyMonLevelAndBaseStatsToBattleMon(battler, mon); + CopyMonAbilityAndTypesToBattleMon(battler, mon); } diff --git a/src/pokemon.c b/src/pokemon.c index c296e14136..d4f14b5b9b 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8495,7 +8495,7 @@ bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } -void TryFormChange(u32 monId, u32 side, u16 method) +bool32 TryFormChange(u32 monId, u32 side, u16 method) { u32 targetSpecies; struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; @@ -8506,7 +8506,9 @@ void TryFormChange(u32 monId, u32 side, u16 method) TryToSetBattleFormChangeMoves(&party[monId], method); SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); CalculateMonStats(&party[monId]); + return TRUE; } + return FALSE; } void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) From 8b0a8484247f09a809fc97c0b966b1b154880a62 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 1 Nov 2022 23:53:04 -0300 Subject: [PATCH 012/229] Zen Mode triggers at the beginning of a battle --- src/battle_util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 7709fa59ec..544eef1fd2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4735,6 +4735,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_SCHOOLING: if (gBattleMons[battler].level < 20) break; + // Fallthrough + case ABILITY_ZEN_MODE: case ABILITY_SHIELDS_DOWN: if (ShouldChangeFormHpBased(battler)) { @@ -4954,6 +4956,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_SCHOOLING: if (gBattleMons[battler].level < 20) break; + // Fallthrough case ABILITY_ZEN_MODE: case ABILITY_SHIELDS_DOWN: if ((effect = ShouldChangeFormHpBased(battler))) From 271bff5675f69781dcae95c3696347806df9e746 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 2 Nov 2022 10:06:02 -0300 Subject: [PATCH 013/229] Gen 5+ stat recalculate in the same party loop at the end of battle that changes forms. --- src/battle_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 6afae7d9c3..df8e245510 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5203,18 +5203,15 @@ static void HandleEndTurn_FinishBattle(void) UndoMegaEvolution(i); TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); DoBurmyFormChange(i); - } - #if B_RECALCULATE_STATS >= GEN_5 - // Recalculate the stats of every party member before the end - for (i = 0; i < PARTY_SIZE; i++) - { + #if B_RECALCULATE_STATS >= GEN_5 + // Recalculate the stats of every party member before the end if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) { CalculateMonStats(&gPlayerParty[i]); } + #endif } - #endif // Clear battle mon species to avoid a bug on the next battle that causes // healthboxes loading incorrectly due to it trying to create a Mega Indicator // if the previous battler would've had. From 42f8e8c11461cc09830c143c14f953e42d23b79e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 5 Nov 2022 20:00:12 -0300 Subject: [PATCH 014/229] Multiple refactors - Added a general GetBattleFormChangeTargetSpecies instead of getting specific ones for Mega Evolution and Primal Reversion. - Added FORM_CHANGE_BATTLE_HP_PERCENT, to replace ShouldChangeFormHpBased. - Cleaned ifdefs for hold effects. - Finally removed UndoMegaEvolution. - FORM_CHANGE_FAINT and FORM_CHANGE_BATTLE_END restore to the first form before a battle form change if species isn't specified. - When changing from a form with more HP to one with less, now current HP is kept to fix Zygarde edge case. (Will likely need to be reworked for Dynamax, as it behaves differently) - Uses DoesSpeciesUseHoldItemToChangeForm in CanBattlerGetOrLoseItem. --- include/battle_util.h | 8 +- include/constants/pokemon.h | 11 +- include/pokemon.h | 3 +- src/battle_ai_main.c | 4 - src/battle_main.c | 15 +- src/battle_script_commands.c | 8 +- src/battle_util.c | 258 +++++++++--------- src/data/pokemon/form_change_table_pointers.h | 3 + src/data/pokemon/form_change_tables.h | 120 +++++--- src/daycare.c | 3 +- src/pokemon.c | 47 +++- 11 files changed, 272 insertions(+), 208 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index 120c0b7e91..4f263e8da9 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -144,14 +144,12 @@ u16 CalcTypeEffectivenessMultiplier(u16 move, u8 moveType, u8 battlerAtk, u8 bat u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef); u16 GetTypeModifier(u8 atkType, u8 defType); s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId); -u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId); -u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId); -u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4); +bool32 DoesSpeciesUseHoldItemToChangeForm(u16 species, u16 heldItemId); bool32 CanMegaEvolve(u8 battlerId); -void UndoMegaEvolution(u32 monId); bool32 IsBattlerMegaEvolved(u8 battlerId); bool32 IsBattlerPrimalReverted(u8 battlerId); -void TryBattleFormChange(u8 battlerId, u16 method); +u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method); +bool32 TryBattleFormChange(u8 battlerId, u16 method); bool32 DoBattlersShareType(u32 battler1, u32 battler2); bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId); struct Pokemon *GetIllusionMonPtr(u32 battlerId); diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index f31fa8d6cc..31b7e72fbe 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -323,9 +323,14 @@ #define FORM_CHANGE_BATTLE_BEGIN 6 #define FORM_CHANGE_BATTLE_END 7 #define FORM_CHANGE_BATTLE_SWITCH 8 -#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 9 -#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 10 -#define FORM_CHANGE_PRIMAL_REVERSION 11 +#define FORM_CHANGE_BATTLE_HP_PERCENT 9 +#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10 +#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11 +#define FORM_CHANGE_PRIMAL_REVERSION 12 + +// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments +#define HP_HIGHER_THAN 1 +#define HP_LOWER_EQ_THAN 2 #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 diff --git a/include/pokemon.h b/include/pokemon.h index 10b132f48a..f7f5ea6deb 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -562,7 +562,8 @@ u8 *MonSpritesGfxManager_GetSpritePtr(u8 managerId, u8 spriteNum); u16 GetFormSpeciesId(u16 speciesId, u8 formId); u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId); u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); -u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg); +u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 arg); +bool32 DoesSpeciesHaveFormChangeMethod(u16 species, u16 method); u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove); bool32 ShouldShowFemaleDifferences(u16 species, u32 personality); bool32 TryFormChange(u32 monId, u32 side, u16 method); diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index b1154e7934..0998d0a485 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -3043,12 +3043,8 @@ static bool32 IsPinchBerryItemEffect(u16 holdEffect) case HOLD_EFFECT_SP_DEFENSE_UP: case HOLD_EFFECT_CRITICAL_UP: case HOLD_EFFECT_RANDOM_STAT_UP: - #ifdef HOLD_EFFECT_CUSTAP_BERRY case HOLD_EFFECT_CUSTAP_BERRY: - #endif - #ifdef HOLD_EFFECT_MICLE_BERRY case HOLD_EFFECT_MICLE_BERRY: - #endif return TRUE; } diff --git a/src/battle_main.c b/src/battle_main.c index df8e245510..907fb1aa40 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3248,8 +3248,6 @@ void FaintClearSetData(void) Ai_UpdateFaintData(gActiveBattler); TryBattleFormChange(gActiveBattler, FORM_CHANGE_FAINT); - if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) - UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]); gBattleStruct->overwrittenAbilities[gActiveBattler] = ABILITY_NONE; @@ -3683,7 +3681,7 @@ static void TryDoEventsBeforeFirstTurn(void) for (i = 0; i < gBattlersCount; i++) { if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB - && GetPrimalReversionSpecies(gBattleMons[i].species, gBattleMons[i].item) != SPECIES_NONE) + && GetBattleFormChangeTargetSpecies(i, FORM_CHANGE_PRIMAL_REVERSION) != SPECIES_NONE) { gBattlerAttacker = i; BattleScriptExecute(BattleScript_PrimalReversion); @@ -5200,16 +5198,15 @@ static void HandleEndTurn_FinishBattle(void) #endif for (i = 0; i < PARTY_SIZE; i++) { - UndoMegaEvolution(i); - TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); + bool32 changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); DoBurmyFormChange(i); + // Clear original species field + gBattleStruct->changedSpecies[i] = SPECIES_NONE; + #if B_RECALCULATE_STATS >= GEN_5 // Recalculate the stats of every party member before the end - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) - { + if (!changedForm) CalculateMonStats(&gPlayerParty[i]); - } #endif } // Clear battle mon species to avoid a bug on the next battle that causes diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d2de985a75..5ea145c057 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8800,10 +8800,10 @@ static void Cmd_various(void) if (gBattlescriptCurrInstr[3] == 0) { //Checks regular Mega Evolution - u16 megaSpecies = GetMegaEvolutionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item); + u16 megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_MEGA_EVOLUTION_ITEM); //Checks Wish Mega Evolution if (megaSpecies == SPECIES_NONE) - megaSpecies = GetWishMegaEvolutionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].moves[0], gBattleMons[gActiveBattler].moves[1], gBattleMons[gActiveBattler].moves[2], gBattleMons[gActiveBattler].moves[3]); + megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_MEGA_EVOLUTION_MOVE); gBattleMons[gActiveBattler].species = megaSpecies; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); @@ -8836,7 +8836,7 @@ static void Cmd_various(void) // Change species. if (gBattlescriptCurrInstr[3] == 0) { - gBattleMons[gActiveBattler].species = GetPrimalReversionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item); + gBattleMons[gActiveBattler].species = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_PRIMAL_REVERSION); PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]], sizeof(gBattleMons[gActiveBattler].species), &gBattleMons[gActiveBattler].species); @@ -9561,7 +9561,7 @@ static void Cmd_various(void) return; case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL: { - if (GetPrimalReversionSpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].item) == SPECIES_NONE) + if (GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_PRIMAL_REVERSION) == SPECIES_NONE) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; diff --git a/src/battle_util.c b/src/battle_util.c index 544eef1fd2..27b8cf945e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4170,51 +4170,6 @@ static bool32 TryChangeBattleTerrain(u32 battler, u32 statusFlag, u8 *timer) return FALSE; } -static bool32 ShouldChangeFormHpBased(u32 battler) -{ - // Ability, form >, form <=, hp divided - static const u16 forms[][4] = - { - {ABILITY_ZEN_MODE, SPECIES_DARMANITAN, SPECIES_DARMANITAN_ZEN_MODE, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR, SPECIES_MINIOR_CORE_RED, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_BLUE, SPECIES_MINIOR_CORE_BLUE, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_GREEN, SPECIES_MINIOR_CORE_GREEN, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_INDIGO, SPECIES_MINIOR_CORE_INDIGO, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_ORANGE, SPECIES_MINIOR_CORE_ORANGE, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET, 2}, - {ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW, 2}, - {ABILITY_SCHOOLING, SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI, 4}, - {ABILITY_GULP_MISSILE, SPECIES_CRAMORANT, SPECIES_CRAMORANT_GORGING, 2}, - {ABILITY_GULP_MISSILE, SPECIES_CRAMORANT, SPECIES_CRAMORANT_GULPING, 1}, - {ABILITY_ZEN_MODE, SPECIES_DARMANITAN_GALARIAN, SPECIES_DARMANITAN_ZEN_MODE_GALARIAN, 2}, - }; - u32 i; - u16 battlerAbility = GetBattlerAbility(battler); - - if (gBattleMons[battler].status2 & STATUS2_TRANSFORMED) - return FALSE; - - for (i = 0; i < ARRAY_COUNT(forms); i++) - { - if (battlerAbility == forms[i][0]) - { - if (gBattleMons[battler].species == forms[i][2] - && gBattleMons[battler].hp > gBattleMons[battler].maxHP / forms[i][3]) - { - gBattleMons[battler].species = forms[i][1]; - return TRUE; - } - if (gBattleMons[battler].species == forms[i][1] - && gBattleMons[battler].hp <= gBattleMons[battler].maxHP / forms[i][3]) - { - gBattleMons[battler].species = forms[i][2]; - return TRUE; - } - } - } - return FALSE; -} - static u8 ForewarnChooseMove(u32 battler) { struct Forewarn { @@ -4738,7 +4693,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move // Fallthrough case ABILITY_ZEN_MODE: case ABILITY_SHIELDS_DOWN: - if (ShouldChangeFormHpBased(battler)) + if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_HP_PERCENT)) { BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3); effect++; @@ -4959,15 +4914,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move // Fallthrough case ABILITY_ZEN_MODE: case ABILITY_SHIELDS_DOWN: - if ((effect = ShouldChangeFormHpBased(battler))) - BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3); - break; case ABILITY_POWER_CONSTRUCT: - if ((gBattleMons[battler].species == SPECIES_ZYGARDE || gBattleMons[battler].species == SPECIES_ZYGARDE_10) - && gBattleMons[battler].hp <= gBattleMons[battler].maxHP / 2) + if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_HP_PERCENT)) { - gBattleStruct->changedSpecies[gBattlerPartyIndexes[battler]] = gBattleMons[battler].species; - gBattleMons[battler].species = SPECIES_ZYGARDE_COMPLETE; BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3); effect++; } @@ -5614,7 +5563,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move { if (gBattleMons[gBattlerTarget].species == SPECIES_CRAMORANT_GORGING) { - gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerTarget]] = gBattleMons[gBattlerTarget].species; gBattleMons[gBattlerTarget].species = SPECIES_CRAMORANT; if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) { @@ -5628,7 +5576,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } else if (gBattleMons[gBattlerTarget].species == SPECIES_CRAMORANT_GULPING) { - gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerTarget]] = gBattleMons[gBattlerTarget].species; gBattleMons[gBattlerTarget].species = SPECIES_CRAMORANT; if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) { @@ -5681,7 +5628,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move break; case ABILITY_GULP_MISSILE: if (((gCurrentMove == MOVE_SURF && TARGET_TURN_DAMAGED) || gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER) - && (effect = ShouldChangeFormHpBased(gBattlerAttacker))) + && TryBattleFormChange(gBattlerAttacker, FORM_CHANGE_BATTLE_HP_PERCENT)) { BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_AttackerFormChange; @@ -9552,59 +9499,27 @@ bool32 IsPartnerMonFromSameTrainer(u8 battlerId) return TRUE; } -u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId) +bool32 DoesSpeciesUseHoldItemToChangeForm(u16 species, u16 heldItemId) { u32 i; - const struct FormChange *formChanges = gFormChangeTablePointers[preEvoSpecies]; + const struct FormChange *formChanges = gFormChangeTablePointers[species]; if (formChanges != NULL) { for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) { - if ((formChanges[i].method == FORM_CHANGE_MEGA_EVOLUTION_ITEM - && formChanges[i].param1 == heldItemId) - && formChanges[i].targetSpecies != preEvoSpecies) - return formChanges[i].targetSpecies; + switch (formChanges[i].method) + { + case FORM_CHANGE_MEGA_EVOLUTION_ITEM: + case FORM_CHANGE_PRIMAL_REVERSION: + case FORM_CHANGE_ITEM_HOLD: + if (formChanges[i].param1 == heldItemId) + return TRUE; + break; + } } } - return SPECIES_NONE; -} - -u16 GetPrimalReversionSpecies(u16 preSpecies, u16 heldItemId) -{ - u32 i; - const struct FormChange *formChanges = gFormChangeTablePointers[preSpecies]; - - if (formChanges != NULL) - { - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) - { - if (formChanges[i].method == FORM_CHANGE_PRIMAL_REVERSION - && formChanges[i].param1 == heldItemId - && formChanges[i].targetSpecies != preSpecies) - return formChanges[i].targetSpecies; - } - } - return SPECIES_NONE; -} - -u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4) -{ - u32 i, param; - const struct FormChange *formChanges = gFormChangeTablePointers[preEvoSpecies]; - - if (formChanges != NULL) - { - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) - { - param = formChanges[i].param1; - if ((formChanges[i].method == FORM_CHANGE_MEGA_EVOLUTION_MOVE - && (param == moveId1 || param == moveId2 || param == moveId3 || param == moveId4)) - && formChanges[i].targetSpecies != preEvoSpecies) - return formChanges[i].targetSpecies; - } - } - return SPECIES_NONE; + return FALSE; } bool32 CanMegaEvolve(u8 battlerId) @@ -9647,7 +9562,7 @@ bool32 CanMegaEvolve(u8 battlerId) itemId = GetMonData(mon, MON_DATA_HELD_ITEM); // Check if there is an entry in the evolution table for regular Mega Evolution. - if (GetMegaEvolutionSpecies(species, itemId) != SPECIES_NONE) + if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_MEGA_EVOLUTION_ITEM) != SPECIES_NONE) { #if B_ENABLE_DEBUG == TRUE if (B_ENABLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId]) @@ -9668,7 +9583,7 @@ bool32 CanMegaEvolve(u8 battlerId) } // Check if there is an entry in the evolution table for Wish Mega Evolution. - if (GetWishMegaEvolutionSpecies(species, GetMonData(mon, MON_DATA_MOVE1), GetMonData(mon, MON_DATA_MOVE2), GetMonData(mon, MON_DATA_MOVE3), GetMonData(mon, MON_DATA_MOVE4))) + if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_MEGA_EVOLUTION_MOVE) != SPECIES_NONE) { gBattleStruct->mega.isWishMegaEvo = TRUE; return TRUE; @@ -9678,17 +9593,6 @@ bool32 CanMegaEvolve(u8 battlerId) return FALSE; } -void UndoMegaEvolution(u32 monId) -{ - // While not exactly a mega evolution, Zygarde follows the same rules. - if (GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL) == SPECIES_ZYGARDE_COMPLETE) - { - SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]); - gBattleStruct->changedSpecies[monId] = 0; - CalculateMonStats(&gPlayerParty[monId]); - } -} - bool32 IsBattlerMegaEvolved(u8 battlerId) { return (gBaseStats[gBattleMons[battlerId].species].flags & SPECIES_FLAG_MEGA_EVOLUTION); @@ -9699,17 +9603,121 @@ bool32 IsBattlerPrimalReverted(u8 battlerId) return (gBaseStats[gBattleMons[battlerId].species].flags & SPECIES_FLAG_PRIMAL_REVERSION); } -void TryBattleFormChange(u8 battlerId, u16 method) +// Returns SPECIES_NONE if no form change is possible +u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) +{ + u32 i, j; + u16 targetSpecies = SPECIES_NONE; + u16 species = gBattleMons[battlerId].species; + const struct FormChange *formChanges = gFormChangeTablePointers[species]; + u16 heldItem; + u32 ability; + + if (formChanges != NULL) + { + heldItem = gBattleMons[battlerId].item; + ability = GetBattlerAbility(battlerId); + + for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + { + if (method == formChanges[i].method && species != formChanges[i].targetSpecies) + { + switch (method) + { + case FORM_CHANGE_MEGA_EVOLUTION_ITEM: + case FORM_CHANGE_PRIMAL_REVERSION: + if (heldItem == formChanges[i].param1) + targetSpecies = formChanges[i].targetSpecies; + break; + case FORM_CHANGE_MEGA_EVOLUTION_MOVE: + if (gBattleMons[battlerId].moves[0] == formChanges[i].param1 + || gBattleMons[battlerId].moves[1] == formChanges[i].param1 + || gBattleMons[battlerId].moves[2] == formChanges[i].param1 + || gBattleMons[battlerId].moves[3] == formChanges[i].param1) + targetSpecies = formChanges[i].targetSpecies; + break; + case FORM_CHANGE_BATTLE_SWITCH: + targetSpecies = formChanges[i].targetSpecies; + break; + case FORM_CHANGE_BATTLE_HP_PERCENT: + { + if (formChanges[i].param1 == GetBattlerAbility(battlerId)) + { + // We multiply by 100 to make sure that integer division doesn't mess with the health check. + u32 hpCheck = gBattleMons[battlerId].hp * 100 * 100 / gBattleMons[battlerId].maxHP; + switch(formChanges[i].param2) + { + case HP_HIGHER_THAN: + if (hpCheck > formChanges[i].param3 * 100) + targetSpecies = formChanges[i].targetSpecies; + break; + case HP_LOWER_EQ_THAN: + if (hpCheck <= formChanges[i].param3 * 100) + targetSpecies = formChanges[i].targetSpecies; + break; + } + } + break; + } + } + } + } + } + + return targetSpecies; +} + +bool32 TryBattleFormChange(u8 battlerId, u16 method) { u8 monId = gBattlerPartyIndexes[battlerId]; u8 side = GET_BATTLER_SIDE(battlerId); struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + u16 targetSpecies; - if (TryFormChange(monId, side, method)) + // Can't change form if transformed. + if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + return FALSE; + + if (!DoesSpeciesHaveFormChangeMethod(gBattleMons[battlerId].species, method)) + return FALSE; + + targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method); + if (targetSpecies != SPECIES_NONE) { - CopyMonLevelAndBaseStatsToBattleMon(battlerId, &party[monId]); - CopyMonAbilityAndTypesToBattleMon(battlerId, &party[monId]); + // Saves the original species on the first form change. + if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE) + gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species; + + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); + gBattleMons[battlerId].species = targetSpecies; + RecalcBattlerStats(battlerId, &party[monId]); + return TRUE; } + + targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); + if (targetSpecies != SPECIES_NONE) + { + // Saves the original species on the first form change. + if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE) + gBattleStruct->changedSpecies[monId] = targetSpecies; + + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); + gBattleMons[battlerId].species = targetSpecies; + RecalcBattlerStats(battlerId, &party[monId]); + return TRUE; + } + else if ((method == FORM_CHANGE_BATTLE_END || method == FORM_CHANGE_FAINT) + && gBattleStruct->changedSpecies[monId] != SPECIES_NONE) + { + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]); + RecalcBattlerStats(battlerId, &party[monId]); + return TRUE; + } + + return FALSE; } bool32 DoBattlersShareType(u32 battler1, u32 battler2) @@ -9740,24 +9748,10 @@ bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId) // Mail can be stolen now if (itemId == ITEM_ENIGMA_BERRY_E_READER) return FALSE; - // Primal Reversion inducing items cannot be lost if pokemon's base species can undergo primal reversion with it. - else if (holdEffect == HOLD_EFFECT_PRIMAL_ORB && (GetPrimalReversionSpecies(GET_BASE_SPECIES_ID(species), itemId) != SPECIES_NONE)) + else if (DoesSpeciesUseHoldItemToChangeForm(species, itemId)) return FALSE; - // Mega stone cannot be lost if pokemon's base species can mega evolve with it. - else if (holdEffect == HOLD_EFFECT_MEGA_STONE && (GetMegaEvolutionSpecies(GET_BASE_SPECIES_ID(species), itemId) != SPECIES_NONE)) - return FALSE; - else if (GET_BASE_SPECIES_ID(species) == SPECIES_GIRATINA && itemId == ITEM_GRISEOUS_ORB) - return FALSE; - else if (GET_BASE_SPECIES_ID(species) == SPECIES_GENESECT && holdEffect == HOLD_EFFECT_DRIVE) - return FALSE; - else if (GET_BASE_SPECIES_ID(species) == SPECIES_SILVALLY && holdEffect == HOLD_EFFECT_MEMORY) - return FALSE; - else if (GET_BASE_SPECIES_ID(species) == SPECIES_ARCEUS && holdEffect == HOLD_EFFECT_PLATE) - return FALSE; -#ifdef HOLD_EFFECT_Z_CRYSTAL else if (holdEffect == HOLD_EFFECT_Z_CRYSTAL) return FALSE; -#endif else return TRUE; } diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index d69ced5bf2..06d5825a2d 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -148,6 +148,9 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_AEGISLASH_BLADE] = sAegislashFormChangeTable, [SPECIES_XERNEAS] = sXerneasFormChangeTable, [SPECIES_XERNEAS_ACTIVE] = sXerneasFormChangeTable, + [SPECIES_ZYGARDE_10_POWER_CONSTRUCT] = sZygardePowerConstructFormChangeTable, + [SPECIES_ZYGARDE_50_POWER_CONSTRUCT] = sZygardePowerConstructFormChangeTable, + [SPECIES_ZYGARDE_COMPLETE] = sZygardePowerConstructFormChangeTable, [SPECIES_DIANCIE] = sDiancieFormChangeTable, [SPECIES_DIANCIE_MEGA] = sDiancieFormChangeTable, [SPECIES_HOOPA] = sHoopaFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 9c0b2d8666..1df1d7581d 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -24,6 +24,8 @@ FORM_CHANGE_WITHDRAW: FORM_CHANGE_FAINT: Form change activates when the Pokémon faints, either in battle or in the overworld by poison. + If species is not specified and it's on the player's side, it will try to use the value + saved in gBattleStruct->changedSpecies from a previous form change. No parameters. FORM_CHANGE_BATTLE_BEGIN: @@ -33,7 +35,8 @@ FORM_CHANGE_BATTLE_BEGIN: param3 = a new move to replace it with, optional FORM_CHANGE_BATTLE_END: - Form change activates at the end of a battle + Form change activates at the end of a battle. If species is not specified and it's on the player's side, + it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change. param1 = item to hold, optional param2 = a move that will be replaced, optional param3 = a new move to replace it with, optional @@ -42,10 +45,27 @@ FORM_CHANGE_BATTLE_SWITCH: Form change activates when the Pokémon is switched out in battle. No parameters. +FORM_CHANGE_BATTLE_HP_PERCENT: + Form change activates when the Pokémon's HP % passes a certain threshold. + param1 = Ability to check. + param2 = HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold. + HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold. + param3 = HP percentage threshold. + +FORM_CHANGE_MEGA_EVOLUTION_ITEM: + Form change activates when the mon has the defined item. If it's on the player's side, it also requires + ITEM_MEGA_RING in the user's bag and for the player to choose to enable it. + param1 = item to hold. + +FORM_CHANGE_MEGA_EVOLUTION_MOVE: + Form change activates when the mon has the defined move. If it's on the player's side, it also requires + ITEM_MEGA_RING in the user's bag and for the player to choose to enable it. + param1 = move to have. + FORM_CHANGE_PRIMAL_REVERSION: - Form change activates when entering battle with the specified item. If the item is a Red Orb, + Form change activates automatically when entering battle with the specified item. If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to Alpha. - param1 = item to hold, required. + param1 = item to hold. */ // FORM_CHANGE_MOVE param2 Arguments @@ -440,16 +460,18 @@ static const struct FormChange sAudinoFormChangeTable[] = { }; static const struct FormChange sDarmanitanFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN}, - {FORM_CHANGE_FAINT, SPECIES_DARMANITAN}, - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN, ABILITY_ZEN_MODE, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_ZEN_MODE, ABILITY_ZEN_MODE, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_FAINT, SPECIES_DARMANITAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, {FORM_CHANGE_END}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_DARMANITAN_GALARIAN}, - {FORM_CHANGE_FAINT, SPECIES_DARMANITAN_GALARIAN}, - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_GALARIAN, ABILITY_ZEN_MODE, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_ZEN_MODE_GALARIAN, ABILITY_ZEN_MODE, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_FAINT, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, {FORM_CHANGE_END}, }; @@ -513,6 +535,13 @@ static const struct FormChange sXerneasFormChangeTable[] = { {FORM_CHANGE_END}, }; +static const struct FormChange sZygardePowerConstructFormChangeTable[] = { + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_ZYGARDE_COMPLETE, ABILITY_POWER_CONSTRUCT, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_FAINT}, + {FORM_CHANGE_BATTLE_END}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sDiancieFormChangeTable[] = { {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, {FORM_CHANGE_FAINT, SPECIES_DIANCIE}, @@ -536,9 +565,11 @@ static const struct FormChange sOricorioFormChangeTable[] = { {FORM_CHANGE_END}, }; static const struct FormChange sWishiwashiFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, - {FORM_CHANGE_FAINT, SPECIES_WISHIWASHI}, - {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_WISHIWASHI_SCHOOL, ABILITY_SCHOOLING, HP_HIGHER_THAN, 25}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_WISHIWASHI, ABILITY_SCHOOLING, HP_LOWER_EQ_THAN, 25}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, + {FORM_CHANGE_FAINT, SPECIES_WISHIWASHI}, + {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, {FORM_CHANGE_END}, }; @@ -571,55 +602,70 @@ static const struct FormChange sMimikyuFormChangeTable[] = { }; static const struct FormChange sMiniorRedFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_RED}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_RED, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_BLUE}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_BLUE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_BLUE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_GREEN}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_GREEN, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_GREEN, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_INDIGO, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_INDIGO, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_ORANGE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_ORANGE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_VIOLET, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_VIOLET, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_END}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, - {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_YELLOW, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_YELLOW, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_END}, }; - #endif #if P_GEN_8_POKEMON == TRUE static const struct FormChange sCramorantFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, - {FORM_CHANGE_FAINT, SPECIES_CRAMORANT}, - {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_CRAMORANT_GULPING, ABILITY_GULP_MISSILE, HP_HIGHER_THAN, 50}, + {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_CRAMORANT_GORGING, ABILITY_GULP_MISSILE, HP_LOWER_EQ_THAN, 50}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, + {FORM_CHANGE_FAINT, SPECIES_CRAMORANT}, + {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, {FORM_CHANGE_END}, }; diff --git a/src/daycare.c b/src/daycare.c index fc44e200e6..82280077bd 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -256,7 +256,8 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon) BoxMonToMon(&daycareMon->mon, &pokemon); newSpecies = GetFormChangeTargetSpecies(&pokemon, FORM_CHANGE_WITHDRAW, 0); - if (newSpecies != SPECIES_NONE) { + if (newSpecies != SPECIES_NONE) + { SetMonData(&pokemon, MON_DATA_SPECIES, &newSpecies); CalculateMonStats(&pokemon); species = newSpecies; diff --git a/src/pokemon.c b/src/pokemon.c index d4f14b5b9b..0fc69a35f2 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3999,13 +3999,14 @@ void CalculateMonStats(struct Pokemon *mon) { if (currentHP == 0 && oldMaxHP == 0) currentHP = newMaxHP; - else if (currentHP != 0) { - // BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. - currentHP += newMaxHP - oldMaxHP; - #ifdef BUGFIX + else if (currentHP != 0) + { + if (newMaxHP > oldMaxHP) + currentHP += newMaxHP - oldMaxHP; if (currentHP <= 0) currentHP = 1; - #endif + if (currentHP > newMaxHP) + currentHP = newMaxHP; } else return; @@ -8397,13 +8398,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 case FORM_CHANGE_BATTLE_END: if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; - break; - case FORM_CHANGE_PRIMAL_REVERSION: - if (arg == formChanges[i].param1) - targetSpecies = formChanges[i].targetSpecies; - break; + break; case FORM_CHANGE_WITHDRAW: - case FORM_CHANGE_BATTLE_SWITCH: case FORM_CHANGE_FAINT: targetSpecies = formChanges[i].targetSpecies; break; @@ -8415,6 +8411,23 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 return targetSpecies; } +bool32 DoesSpeciesHaveFormChangeMethod(u16 species, u16 method) +{ + u32 i, j; + const struct FormChange *formChanges = gFormChangeTablePointers[species]; + + if (formChanges != NULL) + { + for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + { + if (method == formChanges[i].method && species != formChanges[i].targetSpecies) + return TRUE; + } + } + + return FALSE; +} + u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); @@ -8495,12 +8508,21 @@ bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } +// Returns species that it transformed into. If it didn't, returns SPECIES_NONE. bool32 TryFormChange(u32 monId, u32 side, u16 method) { - u32 targetSpecies; struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + u16 targetSpecies; + + if (GetMonData(&party[monId], MON_DATA_SPECIES2, 0) == SPECIES_NONE + || GetMonData(&party[monId], MON_DATA_SPECIES2, 0) == SPECIES_EGG) + return FALSE; targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); + + if (targetSpecies == SPECIES_NONE) + targetSpecies = gBattleStruct->changedSpecies[monId]; + if (targetSpecies != SPECIES_NONE) { TryToSetBattleFormChangeMoves(&party[monId], method); @@ -8508,6 +8530,7 @@ bool32 TryFormChange(u32 monId, u32 side, u16 method) CalculateMonStats(&party[monId]); return TRUE; } + return FALSE; } From 8f289714b2037c2d01bc7d6826aa6e527b630632 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 5 Nov 2022 20:57:55 -0300 Subject: [PATCH 015/229] Moved form change defines and descriptions to their own header --- include/battle.h | 1 + include/constants/form_change_types.h | 81 +++++++++++++++++++++++++++ include/constants/pokemon.h | 19 ------- src/data/pokemon/form_change_tables.h | 78 -------------------------- src/daycare.c | 1 + src/field_poison.c | 1 + src/party_menu.c | 1 + src/pokemon.c | 1 + src/pokemon_storage_system.c | 1 + 9 files changed, 87 insertions(+), 97 deletions(-) create mode 100644 include/constants/form_change_types.h diff --git a/include/battle.h b/include/battle.h index 544514f137..e0baf88955 100644 --- a/include/battle.h +++ b/include/battle.h @@ -3,6 +3,7 @@ // should they be included here or included individually by every file? #include "constants/battle.h" +#include "constants/form_change_types.h" #include "battle_main.h" #include "battle_message.h" #include "battle_util.h" diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h new file mode 100644 index 0000000000..1eb2af30a9 --- /dev/null +++ b/include/constants/form_change_types.h @@ -0,0 +1,81 @@ + +// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments +#define HP_HIGHER_THAN 1 +#define HP_LOWER_EQ_THAN 2 +// FORM_CHANGE_MOVE param2 Arguments +#define WHEN_LEARNED 0 +#define WHEN_FORGOTTEN 1 +// FORM_CHANGE_ITEM_USE param2 Arguments +#define DAY 1 +#define NIGHT 2 + +#define FORM_CHANGE_END 0 // Form table terminator + +// Form change that activates when the specified item is given to or taken from the selected Pokémon. +// param1: item to hold. +// param2: ability to check for, optional. +#define FORM_CHANGE_ITEM_HOLD 1 + +// Form change that activates when the item is used on the selected Pokémon. +// param1: item to use +// param2: time of day to check, optional. +// - DAY if Form change that activates in the daytime. +// - NIGHT if Form change that activates at nighttime. +#define FORM_CHANGE_ITEM_USE 2 + +// TODO: Form change that activates when the Pokémon learns or forgets the move. +// param1: move to check for +// param2: +// - WHEN_LEARNED if Form change that activates when move is forgotten +// - WHEN_FORGOTTEN if Form change that activates when move is learned +#define FORM_CHANGE_MOVE 3 + +// Form change that activates when the Pokémon is withdrawn from the PC or Daycare. +// Daycare withdraw done, PC withdraw TODO. +// - No parameters. +#define FORM_CHANGE_WITHDRAW 4 + +// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison. +// If species is not specified and it's on the player's side, it will try to use the value +// saved in gBattleStruct->changedSpecies from a previous form change. +// - No parameters. +#define FORM_CHANGE_FAINT 5 + +// Form change that activates when the Pokémon is sent out at the beginning of a battle +// param1: item to hold, optional +// param2: a move that will be replaced, optional +// param3: a new move to replace it with, optional +#define FORM_CHANGE_BATTLE_BEGIN 6 + +// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change. +// param1: item to hold, optional +// param2: a move that will be replaced, optional +// param3: a new move to replace it with, optional +#define FORM_CHANGE_BATTLE_END 7 + +// Form change that activates when the Pokémon is switched out in battle. +// - No parameters. +#define FORM_CHANGE_BATTLE_SWITCH 8 + +// Form change that activates when the Pokémon's HP % passes a certain threshold. +// param1: Ability to check. +// param2: HP comparer +// - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold. +// - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold. +// param3: HP percentage threshold. +#define FORM_CHANGE_BATTLE_HP_PERCENT 9 + +// Form change that activates when the mon has the defined item. +// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. +// param1: item to hold. +#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10 + +// Form change that activates when the mon has the defined move. +// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. +// param1: move to have. +#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11 + +// Form change that activates automatically when entering battle with the specified item. +// If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol. +// param1: item to hold. +#define FORM_CHANGE_PRIMAL_REVERSION 12 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 088015d066..7ba16fc57e 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -313,25 +313,6 @@ #define EVO_MODE_BATTLE_SPECIAL 4 #define EVO_MODE_OVERWORLD_SPECIAL 5 -// Form change types -#define FORM_CHANGE_END 0 // Form table terminator -#define FORM_CHANGE_ITEM_HOLD 1 -#define FORM_CHANGE_ITEM_USE 2 -#define FORM_CHANGE_MOVE 3 // Todo -#define FORM_CHANGE_WITHDRAW 4 // Daycare done, Todo PC -#define FORM_CHANGE_FAINT 5 -#define FORM_CHANGE_BATTLE_BEGIN 6 -#define FORM_CHANGE_BATTLE_END 7 -#define FORM_CHANGE_BATTLE_SWITCH 8 -#define FORM_CHANGE_BATTLE_HP_PERCENT 9 -#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10 -#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11 -#define FORM_CHANGE_PRIMAL_REVERSION 12 - -// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments -#define HP_HIGHER_THAN 1 -#define HP_LOWER_EQ_THAN 2 - #define MON_PIC_WIDTH 64 #define MON_PIC_HEIGHT 64 #define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 1df1d7581d..4bb0c5780d 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,81 +1,3 @@ -/* -FORM_CHANGE_ITEM_HOLD: - Form change activates when the specified item is given to or taken from the selected Pokémon. - Alternatively, form change activates when the specified item is is given to or taken from - the selected Pokémon that has a particular ability. - param1 = item to hold - param2 = ability to check for, optional - -FORM_CHANGE_ITEM_USE: - Form change activates when the item is used on the selected Pokémon. - param1 = item to use - param2 = DAY if form change activates in the daytime, optional - NIGHT if form change activates at nighttime, optional - -FORM_CHANGE_MOVE: - Form change activates when the Pokémon learns or forgets the move. - param1 = move to check for - param2 = WHEN_LEARNED if form change activates when move is forgotten - WHEN_FORGOTTEN if form change activates when move is learned - -FORM_CHANGE_WITHDRAW: - Form change activates when the Pokémon is withdrawn from the PC or Daycare. - No parameters. - -FORM_CHANGE_FAINT: - Form change activates when the Pokémon faints, either in battle or in the overworld by poison. - If species is not specified and it's on the player's side, it will try to use the value - saved in gBattleStruct->changedSpecies from a previous form change. - No parameters. - -FORM_CHANGE_BATTLE_BEGIN: - Form change activates when the Pokémon is sent out at the beginning of a battle - param1 = item to hold, optional - param2 = a move that will be replaced, optional - param3 = a new move to replace it with, optional - -FORM_CHANGE_BATTLE_END: - Form change activates at the end of a battle. If species is not specified and it's on the player's side, - it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change. - param1 = item to hold, optional - param2 = a move that will be replaced, optional - param3 = a new move to replace it with, optional - -FORM_CHANGE_BATTLE_SWITCH: - Form change activates when the Pokémon is switched out in battle. - No parameters. - -FORM_CHANGE_BATTLE_HP_PERCENT: - Form change activates when the Pokémon's HP % passes a certain threshold. - param1 = Ability to check. - param2 = HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold. - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold. - param3 = HP percentage threshold. - -FORM_CHANGE_MEGA_EVOLUTION_ITEM: - Form change activates when the mon has the defined item. If it's on the player's side, it also requires - ITEM_MEGA_RING in the user's bag and for the player to choose to enable it. - param1 = item to hold. - -FORM_CHANGE_MEGA_EVOLUTION_MOVE: - Form change activates when the mon has the defined move. If it's on the player's side, it also requires - ITEM_MEGA_RING in the user's bag and for the player to choose to enable it. - param1 = move to have. - -FORM_CHANGE_PRIMAL_REVERSION: - Form change activates automatically when entering battle with the specified item. If the item is a Red Orb, - it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to Alpha. - param1 = item to hold. -*/ - -// FORM_CHANGE_MOVE param2 Arguments -#define WHEN_LEARNED 0 -#define WHEN_FORGOTTEN 1 - -// FORM_CHANGE_ITEM_USE param2 Arguments -#define DAY 1 -#define NIGHT 2 - static const struct FormChange sVenusaurFormChangeTable[] = { {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, {FORM_CHANGE_FAINT, SPECIES_VENUSAUR}, diff --git a/src/daycare.c b/src/daycare.c index 82280077bd..f0eae449ec 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -20,6 +20,7 @@ #include "list_menu.h" #include "overworld.h" #include "item.h" +#include "constants/form_change_types.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/region_map_sections.h" diff --git a/src/field_poison.c b/src/field_poison.c index 68a345919b..d1bd381cdb 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -15,6 +15,7 @@ #include "task.h" #include "trainer_hill.h" #include "constants/field_poison.h" +#include "constants/form_change_types.h" #include "constants/party_menu.h" static bool32 IsMonValidSpecies(struct Pokemon *pokemon) diff --git a/src/party_menu.c b/src/party_menu.c index da87352b5a..a3b65fe365 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -66,6 +66,7 @@ #include "constants/battle.h" #include "constants/battle_frontier.h" #include "constants/field_effects.h" +#include "constants/form_change_types.h" #include "constants/item_effects.h" #include "constants/items.h" #include "constants/moves.h" diff --git a/src/pokemon.c b/src/pokemon.c index b5d9633765..9c13bd17e7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -43,6 +43,7 @@ #include "constants/battle_frontier.h" #include "constants/battle_move_effects.h" #include "constants/battle_script_commands.h" +#include "constants/form_change_types.h" #include "constants/hold_effects.h" #include "constants/item_effects.h" #include "constants/items.h" diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 3ede591e8a..e1a38569b3 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -36,6 +36,7 @@ #include "trig.h" #include "walda_phrase.h" #include "window.h" +#include "constants/form_change_types.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/rgb.h" From 99536089cf7a051f4b86606075cbfad4c4e848bd Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 5 Nov 2022 22:02:25 -0300 Subject: [PATCH 016/229] Renamed form change defines to be consistant with which function calls which --- include/constants/form_change_types.h | 26 +- src/battle_main.c | 8 +- src/battle_script_commands.c | 12 +- src/battle_util.c | 20 +- src/data/pokemon/form_change_tables.h | 490 +++++++++++++------------- src/pokemon.c | 12 +- 6 files changed, 284 insertions(+), 284 deletions(-) diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index 1eb2af30a9..c6d4c6eae2 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -9,53 +9,53 @@ #define DAY 1 #define NIGHT 2 -#define FORM_CHANGE_END 0 // Form table terminator +#define FORM_CHANGE_TERMINATOR 0 // Form change that activates when the specified item is given to or taken from the selected Pokémon. // param1: item to hold. // param2: ability to check for, optional. -#define FORM_CHANGE_ITEM_HOLD 1 +#define FORM_CHANGE_ITEM_HOLD 1 // Form change that activates when the item is used on the selected Pokémon. // param1: item to use // param2: time of day to check, optional. // - DAY if Form change that activates in the daytime. // - NIGHT if Form change that activates at nighttime. -#define FORM_CHANGE_ITEM_USE 2 +#define FORM_CHANGE_ITEM_USE 2 // TODO: Form change that activates when the Pokémon learns or forgets the move. // param1: move to check for // param2: // - WHEN_LEARNED if Form change that activates when move is forgotten // - WHEN_FORGOTTEN if Form change that activates when move is learned -#define FORM_CHANGE_MOVE 3 +#define FORM_CHANGE_MOVE 3 // Form change that activates when the Pokémon is withdrawn from the PC or Daycare. // Daycare withdraw done, PC withdraw TODO. // - No parameters. -#define FORM_CHANGE_WITHDRAW 4 +#define FORM_CHANGE_WITHDRAW 4 // Form change that activates when the Pokémon faints, either in battle or in the overworld by poison. // If species is not specified and it's on the player's side, it will try to use the value // saved in gBattleStruct->changedSpecies from a previous form change. // - No parameters. -#define FORM_CHANGE_FAINT 5 +#define FORM_CHANGE_FAINT 5 // Form change that activates when the Pokémon is sent out at the beginning of a battle // param1: item to hold, optional // param2: a move that will be replaced, optional // param3: a new move to replace it with, optional -#define FORM_CHANGE_BATTLE_BEGIN 6 +#define FORM_CHANGE_BEGIN_BATTLE 6 // Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change. // param1: item to hold, optional // param2: a move that will be replaced, optional // param3: a new move to replace it with, optional -#define FORM_CHANGE_BATTLE_END 7 +#define FORM_CHANGE_END_BATTLE 7 // Form change that activates when the Pokémon is switched out in battle. // - No parameters. -#define FORM_CHANGE_BATTLE_SWITCH 8 +#define FORM_CHANGE_BATTLE_SWITCH 8 // Form change that activates when the Pokémon's HP % passes a certain threshold. // param1: Ability to check. @@ -63,19 +63,19 @@ // - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold. // - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold. // param3: HP percentage threshold. -#define FORM_CHANGE_BATTLE_HP_PERCENT 9 +#define FORM_CHANGE_BATTLE_HP_PERCENT 9 // Form change that activates when the mon has the defined item. // If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. // param1: item to hold. -#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10 +#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM 10 // Form change that activates when the mon has the defined move. // If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. // param1: move to have. -#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11 +#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE 11 // Form change that activates automatically when entering battle with the specified item. // If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol. // param1: item to hold. -#define FORM_CHANGE_PRIMAL_REVERSION 12 +#define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 12 diff --git a/src/battle_main.c b/src/battle_main.c index 5138a6e028..f396b9b0a6 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -602,9 +602,9 @@ static void CB2_InitBattleInternal(void) for (i = 0; i < PARTY_SIZE; i++) { // Player's side - TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_BEGIN); + TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BEGIN_BATTLE); // Opponent's side - TryFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BATTLE_BEGIN); + TryFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BEGIN_BATTLE); } gBattleCommunication[MULTIUSE_STATE] = 0; @@ -3682,7 +3682,7 @@ static void TryDoEventsBeforeFirstTurn(void) for (i = 0; i < gBattlersCount; i++) { if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB - && GetBattleFormChangeTargetSpecies(i, FORM_CHANGE_PRIMAL_REVERSION) != SPECIES_NONE) + && GetBattleFormChangeTargetSpecies(i, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE) { gBattlerAttacker = i; BattleScriptExecute(BattleScript_PrimalReversion); @@ -5202,7 +5202,7 @@ static void HandleEndTurn_FinishBattle(void) #endif for (i = 0; i < PARTY_SIZE; i++) { - bool32 changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END); + bool32 changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_END_BATTLE); DoBurmyFormChange(i); // Clear original species field gBattleStruct->changedSpecies[i] = SPECIES_NONE; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e60f5a49e2..73604ce124 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8965,10 +8965,10 @@ static void Cmd_various(void) if (gBattlescriptCurrInstr[3] == 0) { //Checks regular Mega Evolution - u16 megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_MEGA_EVOLUTION_ITEM); + u16 megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM); //Checks Wish Mega Evolution if (megaSpecies == SPECIES_NONE) - megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_MEGA_EVOLUTION_MOVE); + megaSpecies = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE); gBattleMons[gActiveBattler].species = megaSpecies; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); @@ -9001,7 +9001,7 @@ static void Cmd_various(void) // Change species. if (gBattlescriptCurrInstr[3] == 0) { - gBattleMons[gActiveBattler].species = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_PRIMAL_REVERSION); + gBattleMons[gActiveBattler].species = GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_BATTLE_PRIMAL_REVERSION); PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]], sizeof(gBattleMons[gActiveBattler].species), &gBattleMons[gActiveBattler].species); @@ -9720,7 +9720,7 @@ static void Cmd_various(void) return; case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL: { - if (GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_PRIMAL_REVERSION) == SPECIES_NONE) + if (GetBattleFormChangeTargetSpecies(gActiveBattler, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) == SPECIES_NONE) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; @@ -14241,7 +14241,7 @@ static void Cmd_handleballthrow(void) { BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); - TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_END); + TryBattleFormChange(gBattlerTarget, FORM_CHANGE_END_BATTLE); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -14295,7 +14295,7 @@ static void Cmd_handleballthrow(void) if (IsCriticalCapture()) gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_END); + TryBattleFormChange(gBattlerTarget, FORM_CHANGE_END_BATTLE); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); diff --git a/src/battle_util.c b/src/battle_util.c index 634e30338e..eaf3f72e07 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9654,12 +9654,12 @@ bool32 DoesSpeciesUseHoldItemToChangeForm(u16 species, u16 heldItemId) if (formChanges != NULL) { - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + for (i = 0; formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) { switch (formChanges[i].method) { - case FORM_CHANGE_MEGA_EVOLUTION_ITEM: - case FORM_CHANGE_PRIMAL_REVERSION: + case FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM: + case FORM_CHANGE_BATTLE_PRIMAL_REVERSION: case FORM_CHANGE_ITEM_HOLD: if (formChanges[i].param1 == heldItemId) return TRUE; @@ -9710,7 +9710,7 @@ bool32 CanMegaEvolve(u8 battlerId) itemId = GetMonData(mon, MON_DATA_HELD_ITEM); // Check if there is an entry in the evolution table for regular Mega Evolution. - if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_MEGA_EVOLUTION_ITEM) != SPECIES_NONE) + if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM) != SPECIES_NONE) { #if B_ENABLE_DEBUG == TRUE if (B_ENABLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId]) @@ -9731,7 +9731,7 @@ bool32 CanMegaEvolve(u8 battlerId) } // Check if there is an entry in the evolution table for Wish Mega Evolution. - if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_MEGA_EVOLUTION_MOVE) != SPECIES_NONE) + if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE) != SPECIES_NONE) { gBattleStruct->mega.isWishMegaEvo = TRUE; return TRUE; @@ -9766,18 +9766,18 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) heldItem = gBattleMons[battlerId].item; ability = GetBattlerAbility(battlerId); - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + for (i = 0; formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) { if (method == formChanges[i].method && species != formChanges[i].targetSpecies) { switch (method) { - case FORM_CHANGE_MEGA_EVOLUTION_ITEM: - case FORM_CHANGE_PRIMAL_REVERSION: + case FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM: + case FORM_CHANGE_BATTLE_PRIMAL_REVERSION: if (heldItem == formChanges[i].param1) targetSpecies = formChanges[i].targetSpecies; break; - case FORM_CHANGE_MEGA_EVOLUTION_MOVE: + case FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE: if (gBattleMons[battlerId].moves[0] == formChanges[i].param1 || gBattleMons[battlerId].moves[1] == formChanges[i].param1 || gBattleMons[battlerId].moves[2] == formChanges[i].param1 @@ -9856,7 +9856,7 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) RecalcBattlerStats(battlerId, &party[monId]); return TRUE; } - else if ((method == FORM_CHANGE_BATTLE_END || method == FORM_CHANGE_FAINT) + else if ((method == FORM_CHANGE_END_BATTLE || method == FORM_CHANGE_FAINT) && gBattleStruct->changedSpecies[monId] != SPECIES_NONE) { TryToSetBattleFormChangeMoves(&party[monId], method); diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 4bb0c5780d..6f963b599f 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,336 +1,336 @@ static const struct FormChange sVenusaurFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, - {FORM_CHANGE_FAINT, SPECIES_VENUSAUR}, - {FORM_CHANGE_BATTLE_END, SPECIES_VENUSAUR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, + {FORM_CHANGE_FAINT, SPECIES_VENUSAUR}, + {FORM_CHANGE_END_BATTLE, SPECIES_VENUSAUR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sCharizardFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_X, ITEM_CHARIZARDITE_X}, - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_Y, ITEM_CHARIZARDITE_Y}, - {FORM_CHANGE_FAINT, SPECIES_CHARIZARD}, - {FORM_CHANGE_BATTLE_END, SPECIES_CHARIZARD}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_X, ITEM_CHARIZARDITE_X}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_Y, ITEM_CHARIZARDITE_Y}, + {FORM_CHANGE_FAINT, SPECIES_CHARIZARD}, + {FORM_CHANGE_END_BATTLE, SPECIES_CHARIZARD}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBlastoiseFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BLASTOISE_MEGA, ITEM_BLASTOISINITE}, - {FORM_CHANGE_FAINT, SPECIES_BLASTOISE}, - {FORM_CHANGE_BATTLE_END, SPECIES_BLASTOISE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLASTOISE_MEGA, ITEM_BLASTOISINITE}, + {FORM_CHANGE_FAINT, SPECIES_BLASTOISE}, + {FORM_CHANGE_END_BATTLE, SPECIES_BLASTOISE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBeedrillFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BEEDRILL_MEGA, ITEM_BEEDRILLITE}, - {FORM_CHANGE_FAINT, SPECIES_BEEDRILL}, - {FORM_CHANGE_BATTLE_END, SPECIES_BEEDRILL}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BEEDRILL_MEGA, ITEM_BEEDRILLITE}, + {FORM_CHANGE_FAINT, SPECIES_BEEDRILL}, + {FORM_CHANGE_END_BATTLE, SPECIES_BEEDRILL}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sPidgeotFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_PIDGEOT_MEGA, ITEM_PIDGEOTITE}, - {FORM_CHANGE_FAINT, SPECIES_PIDGEOT}, - {FORM_CHANGE_BATTLE_END, SPECIES_PIDGEOT}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PIDGEOT_MEGA, ITEM_PIDGEOTITE}, + {FORM_CHANGE_FAINT, SPECIES_PIDGEOT}, + {FORM_CHANGE_END_BATTLE, SPECIES_PIDGEOT}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAlakazamFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ALAKAZAM_MEGA, ITEM_ALAKAZITE}, - {FORM_CHANGE_FAINT, SPECIES_ALAKAZAM}, - {FORM_CHANGE_BATTLE_END, SPECIES_ALAKAZAM}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALAKAZAM_MEGA, ITEM_ALAKAZITE}, + {FORM_CHANGE_FAINT, SPECIES_ALAKAZAM}, + {FORM_CHANGE_END_BATTLE, SPECIES_ALAKAZAM}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSlowbroFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SLOWBRO_MEGA, ITEM_SLOWBRONITE}, - {FORM_CHANGE_FAINT, SPECIES_SLOWBRO}, - {FORM_CHANGE_BATTLE_END, SPECIES_SLOWBRO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SLOWBRO_MEGA, ITEM_SLOWBRONITE}, + {FORM_CHANGE_FAINT, SPECIES_SLOWBRO}, + {FORM_CHANGE_END_BATTLE, SPECIES_SLOWBRO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGengarFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GENGAR_MEGA, ITEM_GENGARITE}, - {FORM_CHANGE_FAINT, SPECIES_GENGAR}, - {FORM_CHANGE_BATTLE_END, SPECIES_GENGAR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GENGAR_MEGA, ITEM_GENGARITE}, + {FORM_CHANGE_FAINT, SPECIES_GENGAR}, + {FORM_CHANGE_END_BATTLE, SPECIES_GENGAR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sKangaskhanFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_KANGASKHAN_MEGA, ITEM_KANGASKHANITE}, - {FORM_CHANGE_FAINT, SPECIES_KANGASKHAN}, - {FORM_CHANGE_BATTLE_END, SPECIES_KANGASKHAN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_KANGASKHAN_MEGA, ITEM_KANGASKHANITE}, + {FORM_CHANGE_FAINT, SPECIES_KANGASKHAN}, + {FORM_CHANGE_END_BATTLE, SPECIES_KANGASKHAN}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sPinsirFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_PINSIR_MEGA, ITEM_PINSIRITE}, - {FORM_CHANGE_FAINT, SPECIES_PINSIR}, - {FORM_CHANGE_BATTLE_END, SPECIES_PINSIR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PINSIR_MEGA, ITEM_PINSIRITE}, + {FORM_CHANGE_FAINT, SPECIES_PINSIR}, + {FORM_CHANGE_END_BATTLE, SPECIES_PINSIR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGyaradosFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GYARADOS_MEGA, ITEM_GYARADOSITE}, - {FORM_CHANGE_FAINT, SPECIES_GYARADOS}, - {FORM_CHANGE_BATTLE_END, SPECIES_GYARADOS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GYARADOS_MEGA, ITEM_GYARADOSITE}, + {FORM_CHANGE_FAINT, SPECIES_GYARADOS}, + {FORM_CHANGE_END_BATTLE, SPECIES_GYARADOS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAerodactylFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AERODACTYL_MEGA, ITEM_AERODACTYLITE}, - {FORM_CHANGE_FAINT, SPECIES_AERODACTYL}, - {FORM_CHANGE_BATTLE_END, SPECIES_AERODACTYL}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AERODACTYL_MEGA, ITEM_AERODACTYLITE}, + {FORM_CHANGE_FAINT, SPECIES_AERODACTYL}, + {FORM_CHANGE_END_BATTLE, SPECIES_AERODACTYL}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMewtwoFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_X, ITEM_MEWTWONITE_X}, - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_Y, ITEM_MEWTWONITE_Y}, - {FORM_CHANGE_FAINT, SPECIES_MEWTWO}, - {FORM_CHANGE_BATTLE_END, SPECIES_MEWTWO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_X, ITEM_MEWTWONITE_X}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_Y, ITEM_MEWTWONITE_Y}, + {FORM_CHANGE_FAINT, SPECIES_MEWTWO}, + {FORM_CHANGE_END_BATTLE, SPECIES_MEWTWO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAmpharosFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AMPHAROS_MEGA, ITEM_AMPHAROSITE}, - {FORM_CHANGE_FAINT, SPECIES_AMPHAROS}, - {FORM_CHANGE_BATTLE_END, SPECIES_AMPHAROS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AMPHAROS_MEGA, ITEM_AMPHAROSITE}, + {FORM_CHANGE_FAINT, SPECIES_AMPHAROS}, + {FORM_CHANGE_END_BATTLE, SPECIES_AMPHAROS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSteelixFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_STEELIX_MEGA, ITEM_STEELIXITE}, - {FORM_CHANGE_FAINT, SPECIES_STEELIX}, - {FORM_CHANGE_BATTLE_END, SPECIES_STEELIX}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_STEELIX_MEGA, ITEM_STEELIXITE}, + {FORM_CHANGE_FAINT, SPECIES_STEELIX}, + {FORM_CHANGE_END_BATTLE, SPECIES_STEELIX}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sScizorFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SCIZOR_MEGA, ITEM_SCIZORITE}, - {FORM_CHANGE_FAINT, SPECIES_SCIZOR}, - {FORM_CHANGE_BATTLE_END, SPECIES_SCIZOR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCIZOR_MEGA, ITEM_SCIZORITE}, + {FORM_CHANGE_FAINT, SPECIES_SCIZOR}, + {FORM_CHANGE_END_BATTLE, SPECIES_SCIZOR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sHeracrossFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_HERACROSS_MEGA, ITEM_HERACRONITE}, - {FORM_CHANGE_FAINT, SPECIES_HERACROSS}, - {FORM_CHANGE_BATTLE_END, SPECIES_HERACROSS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HERACROSS_MEGA, ITEM_HERACRONITE}, + {FORM_CHANGE_FAINT, SPECIES_HERACROSS}, + {FORM_CHANGE_END_BATTLE, SPECIES_HERACROSS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sHoundoomFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_HOUNDOOM_MEGA, ITEM_HOUNDOOMINITE}, - {FORM_CHANGE_FAINT, SPECIES_HOUNDOOM}, - {FORM_CHANGE_BATTLE_END, SPECIES_HOUNDOOM}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HOUNDOOM_MEGA, ITEM_HOUNDOOMINITE}, + {FORM_CHANGE_FAINT, SPECIES_HOUNDOOM}, + {FORM_CHANGE_END_BATTLE, SPECIES_HOUNDOOM}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sTyranitarFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_TYRANITAR_MEGA, ITEM_TYRANITARITE}, - {FORM_CHANGE_FAINT, SPECIES_TYRANITAR}, - {FORM_CHANGE_BATTLE_END, SPECIES_TYRANITAR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_TYRANITAR_MEGA, ITEM_TYRANITARITE}, + {FORM_CHANGE_FAINT, SPECIES_TYRANITAR}, + {FORM_CHANGE_END_BATTLE, SPECIES_TYRANITAR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSceptileFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SCEPTILE_MEGA, ITEM_SCEPTILITE}, - {FORM_CHANGE_FAINT, SPECIES_SCEPTILE}, - {FORM_CHANGE_BATTLE_END, SPECIES_SCEPTILE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCEPTILE_MEGA, ITEM_SCEPTILITE}, + {FORM_CHANGE_FAINT, SPECIES_SCEPTILE}, + {FORM_CHANGE_END_BATTLE, SPECIES_SCEPTILE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBlazikenFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BLAZIKEN_MEGA, ITEM_BLAZIKENITE}, - {FORM_CHANGE_FAINT, SPECIES_BLAZIKEN}, - {FORM_CHANGE_BATTLE_END, SPECIES_BLAZIKEN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLAZIKEN_MEGA, ITEM_BLAZIKENITE}, + {FORM_CHANGE_FAINT, SPECIES_BLAZIKEN}, + {FORM_CHANGE_END_BATTLE, SPECIES_BLAZIKEN}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSwampertFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SWAMPERT_MEGA, ITEM_SWAMPERTITE}, - {FORM_CHANGE_FAINT, SPECIES_SWAMPERT}, - {FORM_CHANGE_BATTLE_END, SPECIES_SWAMPERT}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SWAMPERT_MEGA, ITEM_SWAMPERTITE}, + {FORM_CHANGE_FAINT, SPECIES_SWAMPERT}, + {FORM_CHANGE_END_BATTLE, SPECIES_SWAMPERT}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSableyeFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SABLEYE_MEGA, ITEM_SABLENITE}, - {FORM_CHANGE_FAINT, SPECIES_SABLEYE}, - {FORM_CHANGE_BATTLE_END, SPECIES_SABLEYE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SABLEYE_MEGA, ITEM_SABLENITE}, + {FORM_CHANGE_FAINT, SPECIES_SABLEYE}, + {FORM_CHANGE_END_BATTLE, SPECIES_SABLEYE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSharpedoFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SHARPEDO_MEGA, ITEM_SHARPEDONITE}, - {FORM_CHANGE_FAINT, SPECIES_SHARPEDO}, - {FORM_CHANGE_BATTLE_END, SPECIES_SHARPEDO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SHARPEDO_MEGA, ITEM_SHARPEDONITE}, + {FORM_CHANGE_FAINT, SPECIES_SHARPEDO}, + {FORM_CHANGE_END_BATTLE, SPECIES_SHARPEDO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sManectricFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MANECTRIC_MEGA, ITEM_MANECTITE}, - {FORM_CHANGE_FAINT, SPECIES_MANECTRIC}, - {FORM_CHANGE_BATTLE_END, SPECIES_MANECTRIC}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MANECTRIC_MEGA, ITEM_MANECTITE}, + {FORM_CHANGE_FAINT, SPECIES_MANECTRIC}, + {FORM_CHANGE_END_BATTLE, SPECIES_MANECTRIC}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sCameruptFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_CAMERUPT_MEGA, ITEM_CAMERUPTITE}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CAMERUPT_MEGA, ITEM_CAMERUPTITE}, {FORM_CHANGE_FAINT, SPECIES_CAMERUPT}, - {FORM_CHANGE_BATTLE_END, SPECIES_CAMERUPT}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_CAMERUPT}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGlalieFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GLALIE_MEGA, ITEM_GLALITITE}, - {FORM_CHANGE_FAINT, SPECIES_GLALIE}, - {FORM_CHANGE_BATTLE_END, SPECIES_GLALIE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GLALIE_MEGA, ITEM_GLALITITE}, + {FORM_CHANGE_FAINT, SPECIES_GLALIE}, + {FORM_CHANGE_END_BATTLE, SPECIES_GLALIE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMawileFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MAWILE_MEGA, ITEM_MAWILITE}, - {FORM_CHANGE_FAINT, SPECIES_MAWILE}, - {FORM_CHANGE_BATTLE_END, SPECIES_MAWILE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MAWILE_MEGA, ITEM_MAWILITE}, + {FORM_CHANGE_FAINT, SPECIES_MAWILE}, + {FORM_CHANGE_END_BATTLE, SPECIES_MAWILE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMedichamFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_MEDICHAM_MEGA, ITEM_MEDICHAMITE}, - {FORM_CHANGE_FAINT, SPECIES_MEDICHAM}, - {FORM_CHANGE_BATTLE_END, SPECIES_MEDICHAM}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEDICHAM_MEGA, ITEM_MEDICHAMITE}, + {FORM_CHANGE_FAINT, SPECIES_MEDICHAM}, + {FORM_CHANGE_END_BATTLE, SPECIES_MEDICHAM}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAltariaFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ALTARIA_MEGA, ITEM_ALTARIANITE}, - {FORM_CHANGE_FAINT, SPECIES_ALTARIA}, - {FORM_CHANGE_BATTLE_END, SPECIES_ALTARIA}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALTARIA_MEGA, ITEM_ALTARIANITE}, + {FORM_CHANGE_FAINT, SPECIES_ALTARIA}, + {FORM_CHANGE_END_BATTLE, SPECIES_ALTARIA}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAbsolFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ABSOL_MEGA, ITEM_ABSOLITE}, - {FORM_CHANGE_FAINT, SPECIES_ABSOL}, - {FORM_CHANGE_BATTLE_END, SPECIES_ABSOL}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABSOL_MEGA, ITEM_ABSOLITE}, + {FORM_CHANGE_FAINT, SPECIES_ABSOL}, + {FORM_CHANGE_END_BATTLE, SPECIES_ABSOL}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBanetteFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, - {FORM_CHANGE_FAINT, SPECIES_BANETTE}, - {FORM_CHANGE_BATTLE_END, SPECIES_BANETTE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, + {FORM_CHANGE_FAINT, SPECIES_BANETTE}, + {FORM_CHANGE_END_BATTLE, SPECIES_BANETTE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAggronFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AGGRON_MEGA, ITEM_AGGRONITE}, - {FORM_CHANGE_FAINT, SPECIES_AGGRON}, - {FORM_CHANGE_BATTLE_END, SPECIES_AGGRON}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AGGRON_MEGA, ITEM_AGGRONITE}, + {FORM_CHANGE_FAINT, SPECIES_AGGRON}, + {FORM_CHANGE_END_BATTLE, SPECIES_AGGRON}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGardevoirFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GARDEVOIR_MEGA, ITEM_GARDEVOIRITE}, - {FORM_CHANGE_FAINT, SPECIES_GARDEVOIR}, - {FORM_CHANGE_BATTLE_END, SPECIES_GARDEVOIR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARDEVOIR_MEGA, ITEM_GARDEVOIRITE}, + {FORM_CHANGE_FAINT, SPECIES_GARDEVOIR}, + {FORM_CHANGE_END_BATTLE, SPECIES_GARDEVOIR}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSalamenceFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_SALAMENCE_MEGA, ITEM_SALAMENCITE}, - {FORM_CHANGE_FAINT, SPECIES_SALAMENCE}, - {FORM_CHANGE_BATTLE_END, SPECIES_SALAMENCE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SALAMENCE_MEGA, ITEM_SALAMENCITE}, + {FORM_CHANGE_FAINT, SPECIES_SALAMENCE}, + {FORM_CHANGE_END_BATTLE, SPECIES_SALAMENCE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMetagrossFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_METAGROSS_MEGA, ITEM_METAGROSSITE}, - {FORM_CHANGE_FAINT, SPECIES_METAGROSS}, - {FORM_CHANGE_BATTLE_END, SPECIES_METAGROSS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_METAGROSS_MEGA, ITEM_METAGROSSITE}, + {FORM_CHANGE_FAINT, SPECIES_METAGROSS}, + {FORM_CHANGE_END_BATTLE, SPECIES_METAGROSS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLatiasFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LATIAS_MEGA, ITEM_LATIASITE}, - {FORM_CHANGE_FAINT, SPECIES_LATIAS}, - {FORM_CHANGE_BATTLE_END, SPECIES_LATIAS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIAS_MEGA, ITEM_LATIASITE}, + {FORM_CHANGE_FAINT, SPECIES_LATIAS}, + {FORM_CHANGE_END_BATTLE, SPECIES_LATIAS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLatiosFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LATIOS_MEGA, ITEM_LATIOSITE}, - {FORM_CHANGE_FAINT, SPECIES_LATIOS}, - {FORM_CHANGE_BATTLE_END, SPECIES_LATIOS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIOS_MEGA, ITEM_LATIOSITE}, + {FORM_CHANGE_FAINT, SPECIES_LATIOS}, + {FORM_CHANGE_END_BATTLE, SPECIES_LATIOS}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sKyogreFormChangeTable[] = { - {FORM_CHANGE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, - {FORM_CHANGE_BATTLE_END, SPECIES_KYOGRE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, + {FORM_CHANGE_END_BATTLE, SPECIES_KYOGRE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGroudonFormChangeTable[] = { - {FORM_CHANGE_PRIMAL_REVERSION, SPECIES_GROUDON_PRIMAL, ITEM_RED_ORB}, - {FORM_CHANGE_BATTLE_END, SPECIES_GROUDON}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_GROUDON_PRIMAL, ITEM_RED_ORB}, + {FORM_CHANGE_END_BATTLE, SPECIES_GROUDON}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sRayquazaFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, {FORM_CHANGE_FAINT, SPECIES_RAYQUAZA}, - {FORM_CHANGE_BATTLE_END, SPECIES_RAYQUAZA}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_RAYQUAZA}, + {FORM_CHANGE_TERMINATOR}, }; #if P_GEN_4_POKEMON == TRUE static const struct FormChange sLopunnyFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, - {FORM_CHANGE_FAINT, SPECIES_LOPUNNY}, - {FORM_CHANGE_BATTLE_END, SPECIES_LOPUNNY}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, + {FORM_CHANGE_FAINT, SPECIES_LOPUNNY}, + {FORM_CHANGE_END_BATTLE, SPECIES_LOPUNNY}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGarchompFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GARCHOMP_MEGA, ITEM_GARCHOMPITE}, - {FORM_CHANGE_FAINT, SPECIES_GARCHOMP}, - {FORM_CHANGE_BATTLE_END, SPECIES_GARCHOMP}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARCHOMP_MEGA, ITEM_GARCHOMPITE}, + {FORM_CHANGE_FAINT, SPECIES_GARCHOMP}, + {FORM_CHANGE_END_BATTLE, SPECIES_GARCHOMP}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLucarioFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_LUCARIO_MEGA, ITEM_LUCARIONITE}, - {FORM_CHANGE_FAINT, SPECIES_LUCARIO}, - {FORM_CHANGE_BATTLE_END, SPECIES_LUCARIO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LUCARIO_MEGA, ITEM_LUCARIONITE}, + {FORM_CHANGE_FAINT, SPECIES_LUCARIO}, + {FORM_CHANGE_END_BATTLE, SPECIES_LUCARIO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAbomasnowFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_ABOMASNOW_MEGA, ITEM_ABOMASITE}, - {FORM_CHANGE_FAINT, SPECIES_ABOMASNOW}, - {FORM_CHANGE_BATTLE_END, SPECIES_ABOMASNOW}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABOMASNOW_MEGA, ITEM_ABOMASITE}, + {FORM_CHANGE_FAINT, SPECIES_ABOMASNOW}, + {FORM_CHANGE_END_BATTLE, SPECIES_ABOMASNOW}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGalladeFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_GALLADE_MEGA, ITEM_GALLADITE}, - {FORM_CHANGE_FAINT, SPECIES_GALLADE}, - {FORM_CHANGE_BATTLE_END, SPECIES_GALLADE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GALLADE_MEGA, ITEM_GALLADITE}, + {FORM_CHANGE_FAINT, SPECIES_GALLADE}, + {FORM_CHANGE_END_BATTLE, SPECIES_GALLADE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGiratinaFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sShayminFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY}, // {FORM_CHANGE_WITHDRAW, SPECIES_SHAYMIN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sArceusFormChangeTable[] = { @@ -369,62 +369,62 @@ static const struct FormChange sArceusFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_DARK, ITEM_DARKINIUM_Z, ABILITY_MULTITYPE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_PIXIE_PLATE, ABILITY_MULTITYPE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_ARCEUS_FAIRY, ITEM_FAIRIUM_Z, ABILITY_MULTITYPE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; #endif #if P_GEN_5_POKEMON == TRUE static const struct FormChange sAudinoFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_AUDINO_MEGA, ITEM_AUDINITE}, - {FORM_CHANGE_FAINT, SPECIES_AUDINO}, - {FORM_CHANGE_BATTLE_END, SPECIES_AUDINO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AUDINO_MEGA, ITEM_AUDINITE}, + {FORM_CHANGE_FAINT, SPECIES_AUDINO}, + {FORM_CHANGE_END_BATTLE, SPECIES_AUDINO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sDarmanitanFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN, ABILITY_ZEN_MODE, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_ZEN_MODE, ABILITY_ZEN_MODE, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_FAINT, SPECIES_DARMANITAN}, - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_DARMANITAN}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sDarmanitanGalarianFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_GALARIAN, ABILITY_ZEN_MODE, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_DARMANITAN_ZEN_MODE_GALARIAN, ABILITY_ZEN_MODE, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_FAINT, SPECIES_DARMANITAN_GALARIAN}, - {FORM_CHANGE_BATTLE_END, SPECIES_DARMANITAN_GALARIAN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_DARMANITAN_GALARIAN}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMeloettaFormChangeTable[] = { {FORM_CHANGE_FAINT, SPECIES_MELOETTA}, - {FORM_CHANGE_BATTLE_END, SPECIES_MELOETTA}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MELOETTA}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sTornadusFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, {FORM_CHANGE_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sThundurusFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, {FORM_CHANGE_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLandorusFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, {FORM_CHANGE_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sKeldeoFormChangeTable[] = { // {FORM_CHANGE_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, // {FORM_CHANGE_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGenesectFormChangeTable[] = { @@ -433,48 +433,48 @@ static const struct FormChange sGenesectFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_SHOCK_DRIVE, ITEM_SHOCK_DRIVE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_BURN_DRIVE, ITEM_BURN_DRIVE}, {FORM_CHANGE_ITEM_HOLD, SPECIES_GENESECT_CHILL_DRIVE, ITEM_CHILL_DRIVE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; #endif #if P_GEN_6_POKEMON == TRUE static const struct FormChange sGreninjaBattleBondFormChangeTable[] = { {FORM_CHANGE_FAINT, SPECIES_GRENINJA_BATTLE_BOND}, - {FORM_CHANGE_BATTLE_END, SPECIES_GRENINJA_BATTLE_BOND}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_GRENINJA_BATTLE_BOND}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAegislashFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH}, {FORM_CHANGE_FAINT, SPECIES_AEGISLASH}, - {FORM_CHANGE_BATTLE_END, SPECIES_AEGISLASH}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_AEGISLASH}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sXerneasFormChangeTable[] = { - {FORM_CHANGE_BATTLE_BEGIN, SPECIES_XERNEAS_ACTIVE}, - {FORM_CHANGE_BATTLE_END, SPECIES_XERNEAS, }, - {FORM_CHANGE_END}, + {FORM_CHANGE_BEGIN_BATTLE, SPECIES_XERNEAS_ACTIVE}, + {FORM_CHANGE_END_BATTLE, SPECIES_XERNEAS, }, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sZygardePowerConstructFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_ZYGARDE_COMPLETE, ABILITY_POWER_CONSTRUCT, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_FAINT}, - {FORM_CHANGE_BATTLE_END}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sDiancieFormChangeTable[] = { - {FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, - {FORM_CHANGE_FAINT, SPECIES_DIANCIE}, - {FORM_CHANGE_BATTLE_END, SPECIES_DIANCIE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, + {FORM_CHANGE_FAINT, SPECIES_DIANCIE}, + {FORM_CHANGE_END_BATTLE, SPECIES_DIANCIE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sHoopaFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, {FORM_CHANGE_WITHDRAW, SPECIES_HOOPA}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; #endif @@ -484,15 +484,15 @@ static const struct FormChange sOricorioFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_POM_POM, ITEM_YELLOW_NECTAR}, {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_PAU, ITEM_PINK_NECTAR}, {FORM_CHANGE_ITEM_USE, SPECIES_ORICORIO_SENSU, ITEM_PURPLE_NECTAR}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sWishiwashiFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_WISHIWASHI_SCHOOL, ABILITY_SCHOOLING, HP_HIGHER_THAN, 25}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_WISHIWASHI, ABILITY_SCHOOLING, HP_LOWER_EQ_THAN, 25}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_WISHIWASHI}, {FORM_CHANGE_FAINT, SPECIES_WISHIWASHI}, - {FORM_CHANGE_BATTLE_END, SPECIES_WISHIWASHI}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_WISHIWASHI}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSilvallyFormChangeTable[] = { @@ -514,13 +514,13 @@ static const struct FormChange sSilvallyFormChangeTable[] = { {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_DRAGON, ITEM_DRAGON_MEMORY, ABILITY_RKS_SYSTEM}, {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_DARK, ITEM_DARK_MEMORY, ABILITY_RKS_SYSTEM}, {FORM_CHANGE_ITEM_HOLD, SPECIES_SILVALLY_FAIRY, ITEM_FAIRY_MEMORY, ABILITY_RKS_SYSTEM}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMimikyuFormChangeTable[] = { {FORM_CHANGE_FAINT, SPECIES_MIMIKYU}, - {FORM_CHANGE_BATTLE_END, SPECIES_MIMIKYU}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MIMIKYU}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorRedFormChangeTable[] = { @@ -528,56 +528,56 @@ static const struct FormChange sMiniorRedFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_RED, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_RED}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_RED}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_RED}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_RED}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorBlueFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_BLUE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_BLUE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_BLUE}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_BLUE}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_BLUE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_BLUE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorGreenFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_GREEN, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_GREEN, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_GREEN}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_GREEN}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_GREEN}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_GREEN}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorIndigoFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_INDIGO, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_INDIGO, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_INDIGO}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_INDIGO}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_INDIGO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_INDIGO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorOrangeFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_ORANGE, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_ORANGE, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_ORANGE}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_ORANGE}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_ORANGE}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_ORANGE}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorVioletFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_VIOLET, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_VIOLET, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_VIOLET}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_VIOLET}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_VIOLET}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_VIOLET}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMiniorYellowFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_METEOR_YELLOW, ABILITY_SHIELDS_DOWN, HP_HIGHER_THAN, 50}, {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_MINIOR_CORE_YELLOW, ABILITY_SHIELDS_DOWN, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MINIOR_CORE_YELLOW}, {FORM_CHANGE_FAINT, SPECIES_MINIOR_CORE_YELLOW}, - {FORM_CHANGE_BATTLE_END, SPECIES_MINIOR_CORE_YELLOW}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MINIOR_CORE_YELLOW}, + {FORM_CHANGE_TERMINATOR}, }; #endif @@ -587,33 +587,33 @@ static const struct FormChange sCramorantFormChangeTable[] = { {FORM_CHANGE_BATTLE_HP_PERCENT, SPECIES_CRAMORANT_GORGING, ABILITY_GULP_MISSILE, HP_LOWER_EQ_THAN, 50}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CRAMORANT}, {FORM_CHANGE_FAINT, SPECIES_CRAMORANT}, - {FORM_CHANGE_BATTLE_END, SPECIES_CRAMORANT}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_CRAMORANT}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMorpekoFormChangeTable[] = { {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, {FORM_CHANGE_FAINT, SPECIES_MORPEKO}, - {FORM_CHANGE_BATTLE_END, SPECIES_MORPEKO}, - {FORM_CHANGE_END}, + {FORM_CHANGE_END_BATTLE, SPECIES_MORPEKO}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sZacianFormChangeTable[] = { - {FORM_CHANGE_BATTLE_BEGIN, SPECIES_ZACIAN_CROWNED_SWORD, ITEM_RUSTED_SWORD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BLADE}, - {FORM_CHANGE_BATTLE_END, SPECIES_ZACIAN, ITEM_RUSTED_SWORD, MOVE_BEHEMOTH_BLADE, MOVE_IRON_HEAD}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BEGIN_BATTLE, SPECIES_ZACIAN_CROWNED_SWORD, ITEM_RUSTED_SWORD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BLADE}, + {FORM_CHANGE_END_BATTLE, SPECIES_ZACIAN, ITEM_RUSTED_SWORD, MOVE_BEHEMOTH_BLADE, MOVE_IRON_HEAD}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sZamazentaFormChangeTable[] = { - {FORM_CHANGE_BATTLE_BEGIN, SPECIES_ZAMAZENTA_CROWNED_SHIELD, ITEM_RUSTED_SHIELD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BASH}, - {FORM_CHANGE_BATTLE_END, SPECIES_ZAMAZENTA, ITEM_RUSTED_SHIELD, MOVE_BEHEMOTH_BASH, MOVE_IRON_HEAD}, - {FORM_CHANGE_END}, + {FORM_CHANGE_BEGIN_BATTLE, SPECIES_ZAMAZENTA_CROWNED_SHIELD, ITEM_RUSTED_SHIELD, MOVE_IRON_HEAD, MOVE_BEHEMOTH_BASH}, + {FORM_CHANGE_END_BATTLE, SPECIES_ZAMAZENTA, ITEM_RUSTED_SHIELD, MOVE_BEHEMOTH_BASH, MOVE_IRON_HEAD}, + {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sEnamorusFormChangeTable[] = { {FORM_CHANGE_ITEM_USE, SPECIES_ENAMORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_ITEM_USE, SPECIES_ENAMORUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, + {FORM_CHANGE_TERMINATOR}, }; #endif diff --git a/src/pokemon.c b/src/pokemon.c index 9c13bd17e7..1b41d666dc 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8498,7 +8498,7 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 heldItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM, NULL); ability = GetAbilityBySpecies(species, GetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, NULL)); - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + for (i = 0; formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) { if (method == formChanges[i].method && species != formChanges[i].targetSpecies) { @@ -8534,8 +8534,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 if (BoxMonKnowsMove(boxMon, formChanges[i].param1) != formChanges[i].param2) targetSpecies = formChanges[i].targetSpecies; break; - case FORM_CHANGE_BATTLE_BEGIN: - case FORM_CHANGE_BATTLE_END: + case FORM_CHANGE_BEGIN_BATTLE: + case FORM_CHANGE_END_BATTLE: if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; break; @@ -8558,7 +8558,7 @@ bool32 DoesSpeciesHaveFormChangeMethod(u16 species, u16 method) if (formChanges != NULL) { - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + for (i = 0; formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) { if (method == formChanges[i].method && species != formChanges[i].targetSpecies) return TRUE; @@ -8681,10 +8681,10 @@ void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) const struct FormChange *formChanges = gFormChangeTablePointers[species]; if (formChanges == NULL - || (method != FORM_CHANGE_BATTLE_BEGIN && method != FORM_CHANGE_BATTLE_END)) + || (method != FORM_CHANGE_BEGIN_BATTLE && method != FORM_CHANGE_END_BATTLE)) return; - for (i = 0; formChanges[i].method != FORM_CHANGE_END; i++) + for (i = 0; formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) { if (formChanges[i].method == method && formChanges[i].param2 From 57bdb683ece950a473b30230ccd9d4cafc86fed5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 5 Nov 2022 23:27:40 -0300 Subject: [PATCH 017/229] DoBurmyFormChange handled by FORM_CHANGE_END_BATTLE_TERRAIN --- include/battle_util.h | 1 - include/constants/form_change_types.h | 14 ++++--- src/battle_main.c | 13 ++++-- src/battle_util.c | 40 ------------------- src/data/pokemon/form_change_table_pointers.h | 3 ++ src/data/pokemon/form_change_tables.h | 18 +++++++-- src/pokemon.c | 6 ++- 7 files changed, 42 insertions(+), 53 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index 18b31957bb..ae5263b7fe 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -177,7 +177,6 @@ void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast); bool32 CompareStat(u8 battlerId, u8 statId, u8 cmpTo, u8 cmpKind); bool32 TryRoomService(u8 battlerId); void BufferStatChange(u8 battlerId, u8 statId, u8 stringId); -void DoBurmyFormChange(u32 monId); bool32 BlocksPrankster(u16 move, u8 battlerPrankster, u8 battlerDef, bool32 checkTarget); u16 GetUsedHeldItem(u8 battler); bool32 IsBattlerWeatherAffected(u8 battlerId, u32 weatherFlags); diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index c6d4c6eae2..8701a9497c 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -53,9 +53,13 @@ // param3: a new move to replace it with, optional #define FORM_CHANGE_END_BATTLE 7 +// Form change that activates at the end of a battle based on the terrain if it participated in the battle and hasn't fainted. Takes priority over FORM_CHANGE_END_BATTLE. +// param1: battle terrain to check. +#define FORM_CHANGE_END_BATTLE_TERRAIN 8 + // Form change that activates when the Pokémon is switched out in battle. // - No parameters. -#define FORM_CHANGE_BATTLE_SWITCH 8 +#define FORM_CHANGE_BATTLE_SWITCH 9 // Form change that activates when the Pokémon's HP % passes a certain threshold. // param1: Ability to check. @@ -63,19 +67,19 @@ // - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold. // - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold. // param3: HP percentage threshold. -#define FORM_CHANGE_BATTLE_HP_PERCENT 9 +#define FORM_CHANGE_BATTLE_HP_PERCENT 10 // Form change that activates when the mon has the defined item. // If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. // param1: item to hold. -#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM 10 +#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM 11 // Form change that activates when the mon has the defined move. // If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move. // param1: move to have. -#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE 11 +#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE 12 // Form change that activates automatically when entering battle with the specified item. // If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol. // param1: item to hold. -#define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 12 +#define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13 diff --git a/src/battle_main.c b/src/battle_main.c index f396b9b0a6..1aefd71b0f 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5202,8 +5202,15 @@ static void HandleEndTurn_FinishBattle(void) #endif for (i = 0; i < PARTY_SIZE; i++) { - bool32 changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_END_BATTLE); - DoBurmyFormChange(i); + bool32 changedForm = FALSE; + + // Appeared in battle and didn't faint + if ((gBattleStruct->appearedInBattle & gBitTable[i]) && GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0) + changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_END_BATTLE_TERRAIN); + + if (!changedForm) + changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_END_BATTLE); + // Clear original species field gBattleStruct->changedSpecies[i] = SPECIES_NONE; @@ -5215,7 +5222,7 @@ static void HandleEndTurn_FinishBattle(void) } // Clear battle mon species to avoid a bug on the next battle that causes // healthboxes loading incorrectly due to it trying to create a Mega Indicator - // if the previous battler would've had. + // if the previous battler would've had it. for (i = 0; i < MAX_BATTLERS_COUNT; i++) { gBattleMons[i].species = SPECIES_NONE; diff --git a/src/battle_util.c b/src/battle_util.c index eaf3f72e07..52a3202007 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10414,46 +10414,6 @@ bool32 TryRoomService(u8 battlerId) } } -void DoBurmyFormChange(u32 monId) -{ - u16 newSpecies, currSpecies; - struct Pokemon *party = gPlayerParty; - - currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL); - - 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 - { - switch (gBattleTerrain) - { - case BATTLE_TERRAIN_GRASS: - case BATTLE_TERRAIN_LONG_GRASS: - case BATTLE_TERRAIN_POND: - case BATTLE_TERRAIN_MOUNTAIN: - case BATTLE_TERRAIN_PLAIN: - newSpecies = SPECIES_BURMY; - break; - case BATTLE_TERRAIN_CAVE: - case BATTLE_TERRAIN_SAND: - newSpecies = SPECIES_BURMY_SANDY_CLOAK; - break; - case BATTLE_TERRAIN_BUILDING: - newSpecies = SPECIES_BURMY_TRASH_CLOAK; - break; - default: // Don't change form if last battle was water-related - newSpecies = SPECIES_NONE; - break; - } - - if (newSpecies != SPECIES_NONE) - { - SetMonData(&party[monId], MON_DATA_SPECIES, &newSpecies); - CalculateMonStats(&party[monId]); - } - } -} - bool32 BlocksPrankster(u16 move, u8 battlerPrankster, u8 battlerDef, bool32 checkTarget) { #if B_PRANKSTER_DARK_TYPES >= GEN_7 diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 06d5825a2d..65e71b2cf9 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -85,6 +85,9 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_RAYQUAZA] = sRayquazaFormChangeTable, [SPECIES_RAYQUAZA_MEGA] = sRayquazaFormChangeTable, #if P_GEN_4_POKEMON == TRUE + [SPECIES_BURMY] = sBurmyFormChangeTable, + [SPECIES_BURMY_SANDY_CLOAK] = sBurmyFormChangeTable, + [SPECIES_BURMY_TRASH_CLOAK] = sBurmyFormChangeTable, [SPECIES_LOPUNNY] = sLopunnyFormChangeTable, [SPECIES_LOPUNNY_MEGA] = sLopunnyFormChangeTable, [SPECIES_GARCHOMP] = sGarchompFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 6f963b599f..7b8c4a6ce7 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -279,13 +279,25 @@ static const struct FormChange sGroudonFormChangeTable[] = { }; static const struct FormChange sRayquazaFormChangeTable[] = { - {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, - {FORM_CHANGE_FAINT, SPECIES_RAYQUAZA}, - {FORM_CHANGE_END_BATTLE, SPECIES_RAYQUAZA}, + {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, + {FORM_CHANGE_FAINT, SPECIES_RAYQUAZA}, + {FORM_CHANGE_END_BATTLE, SPECIES_RAYQUAZA}, {FORM_CHANGE_TERMINATOR}, }; #if P_GEN_4_POKEMON == TRUE +static const struct FormChange sBurmyFormChangeTable[] = { + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY, BATTLE_TERRAIN_GRASS}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY, BATTLE_TERRAIN_LONG_GRASS}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY, BATTLE_TERRAIN_POND}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY, BATTLE_TERRAIN_MOUNTAIN}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY, BATTLE_TERRAIN_PLAIN}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_SANDY_CLOAK, BATTLE_TERRAIN_CAVE}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_SANDY_CLOAK, BATTLE_TERRAIN_SAND}, + {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_TRASH_CLOAK, BATTLE_TERRAIN_BUILDING}, + {FORM_CHANGE_TERMINATOR}, +}; + static const struct FormChange sLopunnyFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, {FORM_CHANGE_FAINT, SPECIES_LOPUNNY}, diff --git a/src/pokemon.c b/src/pokemon.c index 1b41d666dc..dc87126b94 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8538,7 +8538,11 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 case FORM_CHANGE_END_BATTLE: if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; - break; + break; + case FORM_CHANGE_END_BATTLE_TERRAIN: + if (gBattleTerrain == formChanges[i].param1) + targetSpecies = formChanges[i].targetSpecies; + break; case FORM_CHANGE_WITHDRAW: case FORM_CHANGE_FAINT: targetSpecies = formChanges[i].targetSpecies; From 0eccbdf980e09c4de4a11f63ea1cad2db7d9d9f7 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 6 Nov 2022 00:36:25 -0300 Subject: [PATCH 018/229] Primal Reversion at the beginning of a battle now happens in the switchin ability loop, making it happen by speed order. --- src/battle_main.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 1aefd71b0f..6abc19083b 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3678,18 +3678,6 @@ static void TryDoEventsBeforeFirstTurn(void) } memset(gTotemBoosts, 0, sizeof(gTotemBoosts)); // erase all totem boosts just to be safe - // Primal Reversion - for (i = 0; i < gBattlersCount; i++) - { - if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB - && GetBattleFormChangeTargetSpecies(i, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE) - { - gBattlerAttacker = i; - BattleScriptExecute(BattleScript_PrimalReversion); - return; - } - } - // Check neutralizing gas if (AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, 0, 0, 0, 0) != 0) return; @@ -3698,6 +3686,14 @@ static void TryDoEventsBeforeFirstTurn(void) while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount) { gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->switchInAbilitiesCounter++]; + + // Primal Reversion + if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_PRIMAL_ORB + && GetBattleFormChangeTargetSpecies(gBattlerAttacker, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE) + { + BattleScriptExecute(BattleScript_PrimalReversion); + return; + } if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0) return; } From 62912f8caf852eb453fe07a1fb504123d1a50e2e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 6 Nov 2022 16:01:07 -0300 Subject: [PATCH 019/229] Battle indicator now depends on species instead of held item - This is to avoid a situation where a user would plop a Primal Groudon and its indicator would become Alpha if it doesn't have a Red Orb. --- include/constants/form_change_types.h | 1 + src/battle_interface.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index 8701a9497c..b9d6c89424 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -81,5 +81,6 @@ // Form change that activates automatically when entering battle with the specified item. // If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol. +// The battle indicator icon is based on the species, with Primal Groudon's as Omega and otherwise being Alpha. // param1: item to hold. #define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13 diff --git a/src/battle_interface.c b/src/battle_interface.c index c3d97f1379..f7882c15bb 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1560,12 +1560,12 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (gBattleMons[battlerId].item == ITEM_RED_ORB) + if (gBattleMons[battlerId].species == SPECIES_GROUDON_PRIMAL) { LoadSpritePalette(&sSpritePalette_OmegaIndicator); LoadSpriteSheet(&sSpriteSheet_OmegaIndicator); } - else // ITEM_BLUE_ORB + else // SPECIES_KYOGRE_PRIMAL { LoadSpritePalette(&sSpritePalette_AlphaIndicator); LoadSpriteSheet(&sSpriteSheet_AlphaIndicator); @@ -1589,9 +1589,9 @@ u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) } else if (IsBattlerPrimalReverted(battlerId)) { - if (gBattleMons[battlerId].item == ITEM_RED_ORB) + if (gBattleMons[battlerId].species == SPECIES_GROUDON_PRIMAL) spriteId = CreateSpriteAtEnd(&sSpriteTemplate_OmegaIndicator, x, y, 0); - else // ITEM_BLUE_ORB + else // SPECIES_KYOGRE_PRIMAL spriteId = CreateSpriteAtEnd(&sSpriteTemplate_AlphaIndicator, x, y, 0); } From 2ef2134be1a04e79bc09dfb35dd0ceda59ff4f2b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 6 Nov 2022 17:12:34 -0300 Subject: [PATCH 020/229] Moved Hunger Switch to form change table. --- data/battle_scripts_1.s | 1 + include/constants/form_change_types.h | 4 ++++ src/battle_ai_main.c | 4 ---- src/battle_util.c | 19 ++++++------------- src/data/pokemon/form_change_tables.h | 8 +++++--- 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 472b1c9d1d..34a1bead89 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7525,6 +7525,7 @@ BattleScript_AttackerFormChangeEnd3:: BattleScript_AttackerFormChangeEnd3NoPopup:: call BattleScript_AttackerFormChangeNoPopup + end3 BattleScript_AttackerFormChangeMoveEffect:: waitmessage 1 diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index b9d6c89424..f6a858f976 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -84,3 +84,7 @@ // The battle indicator icon is based on the species, with Primal Groudon's as Omega and otherwise being Alpha. // param1: item to hold. #define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13 + +// Form change that activates automatically when the turn ends. +// param1: ability to check. +#define FORM_CHANGE_BATTLE_TURN_END 14 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 70818a29c3..25e06806bb 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -3817,7 +3817,6 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) ProtectChecks(battlerAtk, battlerDef, move, predictedMove, &score); break; case MOVE_KINGS_SHIELD: - #if (defined SPECIES_AEGISLASH && defined SPECIES_AEGISLASH_BLADE) if (AI_DATA->abilities[battlerAtk] == ABILITY_STANCE_CHANGE //Special logic for Aegislash && gBattleMons[battlerAtk].species == SPECIES_AEGISLASH_BLADE && !IsBattlerIncapacitated(battlerDef, AI_DATA->abilities[battlerDef])) @@ -3825,7 +3824,6 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 3; break; } - #endif //fallthrough default: // protect ProtectChecks(battlerAtk, battlerDef, move, predictedMove, &score); @@ -4484,7 +4482,6 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 3; break; case EFFECT_RELIC_SONG: - #if (defined SPECIES_MELOETTA && defined SPECIES_MELOETTA_PIROUETTE) if (!(gBattleMons[battlerAtk].status2 & STATUS2_TRANSFORMED)) // Don't try to change form if it's transformed. { if (gBattleMons[battlerAtk].species == SPECIES_MELOETTA && gBattleMons[battlerDef].defense < gBattleMons[battlerDef].spDefense) @@ -4492,7 +4489,6 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else if (gBattleMons[battlerAtk].species == SPECIES_MELOETTA_PIROUETTE && gBattleMons[battlerDef].spDefense < gBattleMons[battlerDef].defense) score += 3; // Change to Aria if can do more damage } - #endif break; case EFFECT_ELECTRIC_TERRAIN: case EFFECT_MISTY_TERRAIN: diff --git a/src/battle_util.c b/src/battle_util.c index 52a3202007..5629acc95b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5019,18 +5019,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_HUNGER_SWITCH: - if (!(gBattleMons[battler].status2 & STATUS2_TRANSFORMED)) + if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_TURN_END)) { - if (gBattleMons[battler].species == SPECIES_MORPEKO) - { - gBattleMons[battler].species = SPECIES_MORPEKO_HANGRY; - BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); - } - else if (gBattleMons[battler].species == SPECIES_MORPEKO_HANGRY) - { - gBattleMons[battler].species = SPECIES_MORPEKO; - BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); - } + BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); effect++; } break; @@ -9788,7 +9779,6 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) targetSpecies = formChanges[i].targetSpecies; break; case FORM_CHANGE_BATTLE_HP_PERCENT: - { if (formChanges[i].param1 == GetBattlerAbility(battlerId)) { // We multiply by 100 to make sure that integer division doesn't mess with the health check. @@ -9806,7 +9796,10 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) } } break; - } + case FORM_CHANGE_BATTLE_TURN_END: + if (formChanges[i].param1 == GetBattlerAbility(battlerId)) + targetSpecies = formChanges[i].targetSpecies; + break; } } } diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 7b8c4a6ce7..9f01f83203 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -604,9 +604,11 @@ static const struct FormChange sCramorantFormChangeTable[] = { }; static const struct FormChange sMorpekoFormChangeTable[] = { - {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, - {FORM_CHANGE_FAINT, SPECIES_MORPEKO}, - {FORM_CHANGE_END_BATTLE, SPECIES_MORPEKO}, + {FORM_CHANGE_BATTLE_TURN_END, SPECIES_MORPEKO_HANGRY, ABILITY_HUNGER_SWITCH}, + {FORM_CHANGE_BATTLE_TURN_END, SPECIES_MORPEKO , ABILITY_HUNGER_SWITCH}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_MORPEKO}, + {FORM_CHANGE_FAINT, SPECIES_MORPEKO}, + {FORM_CHANGE_END_BATTLE, SPECIES_MORPEKO}, {FORM_CHANGE_TERMINATOR}, }; From 34ba9b4e0d4f710f4f0961a7b73902266c06f38a Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 28 Nov 2022 14:36:19 -0500 Subject: [PATCH 021/229] convert a few various to callnatives --- asm/macros/battle_script.inc | 50 ++++++------ include/constants/battle_script_commands.h | 5 -- src/battle_script_commands.c | 95 ++++++++++++++-------- src/battle_z_move.c | 4 +- 4 files changed, 88 insertions(+), 66 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 27c5a86c41..0fa2212292 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1310,6 +1310,33 @@ callnative BS_CalcMetalBurstDmg .4byte \ptr .endm + + .macro setzeffect + callnative BS_SetZEffect + .endm + + @ Used by effects that may proc Symbiosis but do not call removeitem. + .macro trysymbiosis + callnative BS_TrySymbiosis + .endm + + @ returns TRUE or FALSE to gBattleCommunication[0] + .macro canteleport battler:req + callnative BS_CanTeleport + .byte \battler + .endm + + @ returns B_SIDE_x to gBattleCommunication[0] + .macro getbattlerside battler:req + callnative BS_GetBattlerSide + .byte \battler + .endm + + .macro checkparentalbondcounter counter:req, ptr:req + callnative BS_CheckParentalBondCounter + .byte \counter + .4byte \ptr + .endm @ various command changed to more readable macros .macro cancelmultiturnmoves battler:req @@ -1791,10 +1818,6 @@ various \battler, VARIOUS_TRY_ACTIVATE_GRIM_NEIGH .endm - .macro setzeffect - various BS_ATTACKER, VARIOUS_SET_Z_EFFECT - .endm - .macro consumeberry battler:req, frombattler:req various \battler, VARIOUS_CONSUME_BERRY .byte \frombattler @@ -1986,20 +2009,6 @@ various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES .endm - .macro canteleport battler:req - various \battler, VARIOUS_CAN_TELEPORT - .endm - - .macro getbattlerside battler:req - various \battler, VARIOUS_GET_BATTLER_SIDE - .endm - - .macro checkparentalbondcounter counter:req, ptr:req - various BS_ATTACKER, VARIOUS_CHECK_PARENTAL_BOND_COUNTER - .byte \counter - .4byte \ptr - .endm - @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 @@ -2152,8 +2161,3 @@ .macro skydropyawn various 0, VARIOUS_SKY_DROP_YAWN .endm - - @ Used by effects that may proc Symbiosis but do not call removeitem. - .macro trysymbiosis - various BS_ATTACKER, VARIOUS_TRY_SYMBIOSIS - .endm diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 06a09fc179..e8f25f77f3 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -241,11 +241,6 @@ #define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 150 #define VARIOUS_SET_BEAK_BLAST 151 #define VARIOUS_SWAP_SIDE_STATUSES 152 -#define VARIOUS_SET_Z_EFFECT 153 -#define VARIOUS_TRY_SYMBIOSIS 154 -#define VARIOUS_CAN_TELEPORT 155 -#define VARIOUS_GET_BATTLER_SIDE 156 -#define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b7551ab9ee..770a5444a3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -9434,9 +9434,6 @@ static void Cmd_various(void) gBattlescriptCurrInstr += 7; // exit if loop failed (failsafe) } return; - case VARIOUS_SET_Z_EFFECT: - SetZEffect(); //handles battle script jumping internally - return; case VARIOUS_MOVEEND_ITEM_EFFECTS: if (ItemBattleEffects(ITEMEFFECT_NORMAL, gActiveBattler, FALSE)) return; @@ -10035,39 +10032,6 @@ static void Cmd_various(void) case VARIOUS_SWAP_SIDE_STATUSES: CourtChangeSwapSideStatuses(); break; - case VARIOUS_TRY_SYMBIOSIS: //called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem. - if (SYMBIOSIS_CHECK(gActiveBattler, BATTLE_PARTNER(gActiveBattler))) - { - BestowItem(BATTLE_PARTNER(gActiveBattler), gActiveBattler); - gLastUsedAbility = gBattleMons[BATTLE_PARTNER(gActiveBattler)].ability; - gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(gActiveBattler); - gBattlerAttacker = gActiveBattler; - BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_SymbiosisActivates; - return; - } - break; - case VARIOUS_CAN_TELEPORT: - gBattleCommunication[0] = CanTeleport(gActiveBattler); - break; - case VARIOUS_GET_BATTLER_SIDE: - if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) - gBattleCommunication[0] = B_SIDE_PLAYER; - else - gBattleCommunication[0] = B_SIDE_OPPONENT; - break; - case VARIOUS_CHECK_PARENTAL_BOND_COUNTER: - { - // Some effects should only happen on the first or second strike of Parental Bond, - // so a way to check this in battle scripts is useful - u8 counter = T1_READ_8(gBattlescriptCurrInstr + 3); - if (gSpecialStatuses[gBattlerAttacker].parentalBondState == counter && gBattleMons[gBattlerTarget].hp != 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); - else - gBattlescriptCurrInstr += 8; - return; - } - break; } // End of switch (gBattlescriptCurrInstr[2]) gBattlescriptCurrInstr += 3; @@ -14861,3 +14825,62 @@ static bool8 IsFinalStrikeEffect(u16 move) } return FALSE; } + +// 10 bytes long (callnative(5) + counter(1) + ptr(4)) +void BS_CheckParentalBondCounter(void) +{ + // Some effects should only happen on the first or second strike of Parental Bond, + // so a way to check this in battle scripts is useful + u8 counter = T1_READ_8(gBattlescriptCurrInstr + 5); + if (gSpecialStatuses[gBattlerAttacker].parentalBondState == counter && gBattleMons[gBattlerTarget].hp != 0) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 6); + else + gBattlescriptCurrInstr += 10; +} + +// 6 bytes long (callnative(5) + battler(1)) +void BS_GetBattlerSide(void) +{ + u8 battler = gBattlescriptCurrInstr[5]; + if (GetBattlerSide(battler) == B_SIDE_PLAYER) + gBattleCommunication[0] = B_SIDE_PLAYER; + else + gBattleCommunication[0] = B_SIDE_OPPONENT; + + gBattlescriptCurrInstr += 6; +} + +// 6 bytes long (callnative(5) + battler(1)) +void BS_CanTeleport(void) +{ + u8 battler = gBattlescriptCurrInstr[5]; + gBattleCommunication[0] = CanTeleport(battler); + gBattlescriptCurrInstr += 6; +} + +// 5 bytes long +void BS_TrySymbiosis(void) +{ + //called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem. + gActiveBattler = gBattlerAttacker; + if (SYMBIOSIS_CHECK(gBattlerAttacker, BATTLE_PARTNER(gActiveBattler))) + { + BestowItem(BATTLE_PARTNER(gActiveBattler), gActiveBattler); + gLastUsedAbility = gBattleMons[BATTLE_PARTNER(gActiveBattler)].ability; + gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(gActiveBattler); + gBattlerAttacker = gActiveBattler; + BattleScriptPushCursor(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = BattleScript_SymbiosisActivates; + } + else + { + gBattlescriptCurrInstr += 5; + } +} + +void BS_SetZEffect(void) +{ + SetZEffect(); // Handles battle script jumping internally +} + + diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 2eccd82f52..e27304853c 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -593,7 +593,7 @@ const u8 *GetZMoveName(u16 move) return gZMoveNames[0]; // Failsafe } -#define Z_EFFECT_BS_LENGTH 3 +#define Z_EFFECT_BS_LENGTH 5 // This function kinda cheats by setting a return battle script to after the setzeffect various command // and then jumping to a z effect script void SetZEffect(void) @@ -684,7 +684,7 @@ void SetZEffect(void) gBattlescriptCurrInstr = BattleScript_StatUpZMove; break; default: - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr += Z_EFFECT_BS_LENGTH; break; } From cd7abea6fe50f9e75a4712ee5061b378707b4834 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 28 Nov 2022 14:47:56 -0500 Subject: [PATCH 022/229] fix BS_TrySymbiosis --- src/battle_script_commands.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 770a5444a3..55487eab76 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14869,13 +14869,12 @@ void BS_TrySymbiosis(void) gLastUsedAbility = gBattleMons[BATTLE_PARTNER(gActiveBattler)].ability; gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(gActiveBattler); gBattlerAttacker = gActiveBattler; - BattleScriptPushCursor(gBattlescriptCurrInstr + 5); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SymbiosisActivates; + return; } - else - { - gBattlescriptCurrInstr += 5; - } + + gBattlescriptCurrInstr += 5; } void BS_SetZEffect(void) From 4b799f2571bc6ba49c190e1bf908566d99992d95 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 28 Nov 2022 15:10:42 -0500 Subject: [PATCH 023/229] optimize BS_GetBattlerSide --- src/battle_script_commands.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 55487eab76..7ad6567373 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14841,12 +14841,7 @@ void BS_CheckParentalBondCounter(void) // 6 bytes long (callnative(5) + battler(1)) void BS_GetBattlerSide(void) { - u8 battler = gBattlescriptCurrInstr[5]; - if (GetBattlerSide(battler) == B_SIDE_PLAYER) - gBattleCommunication[0] = B_SIDE_PLAYER; - else - gBattleCommunication[0] = B_SIDE_OPPONENT; - + gBattleCommunication[0] = GetBattlerSide(gBattlescriptCurrInstr[5]); gBattlescriptCurrInstr += 6; } From 034ba7d5d2a345c27de32019b869319a9dbed94a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 26 Dec 2022 08:59:37 -0300 Subject: [PATCH 024/229] Fixed usage of gBattleStruct->changedSpecies so its only used by player's party --- src/battle_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index b3b16f255c..6a31bc9e2b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9796,8 +9796,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method); if (targetSpecies != SPECIES_NONE) { - // Saves the original species on the first form change. - if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE) + // Saves the original species on the first form change for the player. + if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE) gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species; TryToSetBattleFormChangeMoves(&party[monId], method); @@ -9810,8 +9810,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); if (targetSpecies != SPECIES_NONE) { - // Saves the original species on the first form change. - if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE) + // Saves the original species on the first form change for the player. + if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE) gBattleStruct->changedSpecies[monId] = targetSpecies; TryToSetBattleFormChangeMoves(&party[monId], method); From b5b7631be75619384f889147b964f08b694c5238 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 26 Dec 2022 09:14:28 -0300 Subject: [PATCH 025/229] Added guards to form_change_types.h --- include/constants/form_change_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index f6a858f976..4e60904aa6 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -1,3 +1,5 @@ +#ifndef GUARD_CONSTANTS_FORM_CHANGE_TYPES_H +#define GUARD_CONSTANTS_FORM_CHANGE_TYPES_H // FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments #define HP_HIGHER_THAN 1 @@ -88,3 +90,5 @@ // Form change that activates automatically when the turn ends. // param1: ability to check. #define FORM_CHANGE_BATTLE_TURN_END 14 + +#endif // GUARD_CONSTANTS_FORM_CHANGE_TYPES_H From c895b488fa153b9402a54dd4818a0b1feff9dcb0 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 8 Feb 2023 00:46:10 -0300 Subject: [PATCH 026/229] Test auto close issues --- .github/workflows/manual.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000000..0d724c4a44 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,16 @@ +name: Close issues related to a merged pull request based on master branch. + +on: + pull_request: + types: [closed] + branches: + - upcoming + +jobs: + closeIssueOnPrMergeTrigger: + + runs-on: ubuntu-latest + + steps: + - name: Closes issues related to a merged pull request. + uses: ldez/gha-mjolnir@v1.0.3 From 6e134bb7dc0b5650946318a28cbe72a2e5743e24 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 17 Feb 2023 12:52:43 -0300 Subject: [PATCH 027/229] Removed pointless IsBattlerHpLow function --- src/battle_message.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 2b8005f64b..9c8a1b7020 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3899,14 +3899,6 @@ static u32 GetEnemyMonCount(bool32 onlyAlive) return count; } -static bool32 IsBattlerHpLow(u32 battler) -{ - if ((gBattleMons[battler].hp * 100) / gBattleMons[battler].maxHP < 25) - return TRUE; - else - return FALSE; -} - bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) { s32 i; @@ -3931,7 +3923,7 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL && GetEnemyMonCount(TRUE) == 1 - && IsBattlerHpLow(battlerId) + && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE; From 3a91a5c930d8c06de95882b5ca0ce90d017cbbc9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 17 Feb 2023 12:53:24 -0300 Subject: [PATCH 028/229] =?UTF-8?q?Added=20new=20trainer=20slide-in=20msg?= =?UTF-8?q?=20conditions=20Now=20they=20can=20say=20something:=20-When=20t?= =?UTF-8?q?heir=20last=20Pok=C3=A9mon's=20HP=20is=20between=2025%=20and=20?= =?UTF-8?q?50%.=20-When=20a=20critical=20hit=20is=20dealt=20to=20their=20f?= =?UTF-8?q?irst=20Pok=C3=A9mon=20for=20the=20first=20time.=20-When=20a=20s?= =?UTF-8?q?uper=20effective=20hit=20is=20dealt=20to=20their=20first=20Pok?= =?UTF-8?q?=C3=A9mon=20for=20the=20first=20time.=20-When=20a=20STAB=20move?= =?UTF-8?q?=20is=20used=20against=20(but=20doesn't=20faint)=20the=20oppone?= =?UTF-8?q?nt's=20Pok=C3=A9mon.=20-When=20the=20Player's=20Pok=C3=A9mon's?= =?UTF-8?q?=20move=20doesn't=20affect=20the=20opponent's=20Pok=C3=A9mon.?= =?UTF-8?q?=20-When=20they're=20about=20to=20trigger=20a=20Mega=20Evolutio?= =?UTF-8?q?n.=20-When=20they're=20about=20to=20trigger=20a=20Z-Move.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Misc. changes: -Split GetEnemyMonCount for readability's sake. -Optimized the size allocated to trainerSlideLowHpMsgDone. --- asm/macros/battle_script.inc | 8 + data/battle_scripts_1.s | 8 + include/battle.h | 9 +- include/battle_message.h | 7 + include/constants/battle_script_commands.h | 338 +++++++++++---------- src/battle_main.c | 10 + src/battle_message.c | 109 ++++++- src/battle_script_commands.c | 35 +++ src/battle_util.c | 10 + 9 files changed, 356 insertions(+), 178 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 4f11fc78b8..e24e20e6e9 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -2049,6 +2049,14 @@ .4byte \jumpInstr .endm + .macro trytrainerslidezmovemsg battler:req + various \battler, VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE + .endm + + .macro trytrainerslidemegaevolutionmsg battler:req + various \battler, VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION + .endm + @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ae92aba7cf..c6c9626384 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7763,6 +7763,8 @@ BattleScript_FocusPunchSetUp:: end2 BattleScript_MegaEvolution:: + printstring STRINGID_EMPTYSTRING3 + trytrainerslidemegaevolutionmsg BS_ATTACKER printstring STRINGID_MEGAEVOREACTING waitmessage B_WAIT_TIME_LONG setbyte gIsCriticalHit, 0 @@ -7777,6 +7779,8 @@ BattleScript_MegaEvolution:: end2 BattleScript_WishMegaEvolution:: + printstring STRINGID_EMPTYSTRING3 + trytrainerslidemegaevolutionmsg BS_ATTACKER printstring STRINGID_FERVENTWISHREACHED waitmessage B_WAIT_TIME_LONG setbyte gIsCriticalHit, 0 @@ -9989,6 +9993,8 @@ BattleScript_JabocaRowapBerryActivate_Dmg: @ z moves / effects BattleScript_ZMoveActivateDamaging:: + printstring STRINGID_EMPTYSTRING3 + trytrainerslidezmovemsg BS_ATTACKER printstring STRINGID_ZPOWERSURROUNDS playanimation BS_ATTACKER, B_ANIM_ZMOVE_ACTIVATE, NULL printstring STRINGID_ZMOVEUNLEASHED @@ -9996,6 +10002,8 @@ BattleScript_ZMoveActivateDamaging:: return BattleScript_ZMoveActivateStatus:: + printstring STRINGID_EMPTYSTRING3 + trytrainerslidezmovemsg BS_ATTACKER savetarget printstring STRINGID_ZPOWERSURROUNDS playanimation BS_ATTACKER, B_ANIM_ZMOVE_ACTIVATE, NULL diff --git a/include/battle.h b/include/battle.h index 8be922384f..f4b10c813c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -620,7 +620,7 @@ struct BattleStruct struct MegaEvolutionData mega; struct ZMoveData zmove; const u8 *trainerSlideMsg; - bool8 trainerSlideLowHpMsgDone; + bool8 trainerSlideLowHpMsgDone:1; u8 introState; u8 ateBerry[2]; // array id determined by side, each party pokemon as bit u8 stolenStats[NUM_BATTLE_STATS]; // hp byte is used for which stats to raise, other inform about by how many stages @@ -655,6 +655,13 @@ struct BattleStruct u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) bool8 allowedToChangeFormInWeather[PARTY_SIZE][2]; // For each party member and side, used by Ice Face. u8 battleBondTransformed[NUM_BATTLE_SIDES]; // Bitfield for each party. + bool8 trainerSlideHalfHpMsgDone:1; + u8 trainerSlideFirstCriticalHitMsgState:2; + u8 trainerSlideFirstSuperEffectiveHitMsgState:2; + u8 trainerSlideFirstSTABMoveMsgState:2; + u8 trainerSlidePlayerMonUnaffectedMsgState:2; + bool8 trainerSlideMegaEvolutionMsgDone:1; + bool8 trainerSlideZMoveMsgDone:1; }; #define F_DYNAMIC_TYPE_1 (1 << 6) diff --git a/include/battle_message.h b/include/battle_message.h index 9f6905abd3..57c6c21c24 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -229,6 +229,13 @@ enum TRAINER_SLIDE_LAST_SWITCHIN, TRAINER_SLIDE_LAST_LOW_HP, TRAINER_SLIDE_FIRST_DOWN, + TRAINER_SLIDE_LAST_HALF_HP, + TRAINER_SLIDE_FIRST_CRITICAL_HIT, + TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT, + TRAINER_SLIDE_FIRST_STAB_MOVE, + TRAINER_SLIDE_PLAYER_MON_UNAFFECTED, + TRAINER_SLIDE_MEGA_EVOLUTION, + TRAINER_SLIDE_Z_MOVE, }; void BufferStringBattle(u16 stringID); diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 68e927d75f..f55628315c 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -89,174 +89,176 @@ #define CMP_NO_COMMON_BITS 5 // Cmd_various -#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 -#define VARIOUS_SET_MAGIC_COAT_TARGET 1 -#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2 -#define VARIOUS_GET_MOVE_TARGET 3 -#define VARIOUS_GET_BATTLER_FAINTED 4 -#define VARIOUS_RESET_SWITCH_IN_ABILITY_BITS 5 -#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 -#define VARIOUS_RESET_PLAYER_FAINTED 7 -#define VARIOUS_PALACE_FLAVOR_TEXT 8 -#define VARIOUS_ARENA_JUDGMENT_WINDOW 9 -#define VARIOUS_ARENA_OPPONENT_MON_LOST 10 -#define VARIOUS_ARENA_PLAYER_MON_LOST 11 -#define VARIOUS_ARENA_BOTH_MONS_LOST 12 -#define VARIOUS_EMIT_YESNOBOX 13 -#define VARIOUS_DRAW_ARENA_REF_TEXT_BOX 14 -#define VARIOUS_ERASE_ARENA_REF_TEXT_BOX 15 -#define VARIOUS_ARENA_JUDGMENT_STRING 16 -#define VARIOUS_ARENA_WAIT_STRING 17 -#define VARIOUS_WAIT_CRY 18 -#define VARIOUS_RETURN_OPPONENT_MON1 19 -#define VARIOUS_RETURN_OPPONENT_MON2 20 -#define VARIOUS_VOLUME_DOWN 21 -#define VARIOUS_VOLUME_UP 22 -#define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 23 -#define VARIOUS_PALACE_TRY_ESCAPE_STATUS 24 -#define VARIOUS_SET_TELEPORT_OUTCOME 25 -#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 -#define VARIOUS_STAT_TEXT_BUFFER 27 -#define VARIOUS_SWITCHIN_ABILITIES 28 -#define VARIOUS_SAVE_TARGET 29 -#define VARIOUS_RESTORE_TARGET 30 -#define VARIOUS_INSTANT_HP_DROP 31 -#define VARIOUS_CLEAR_STATUS 32 -#define VARIOUS_RESTORE_PP 33 -#define VARIOUS_TRY_ACTIVATE_MOXIE 34 -#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 35 -#define VARIOUS_PLAY_MOVE_ANIMATION 36 -#define VARIOUS_SET_LUCKY_CHANT 37 -#define VARIOUS_SUCKER_PUNCH_CHECK 38 -#define VARIOUS_SET_SIMPLE_BEAM 39 -#define VARIOUS_TRY_ENTRAINMENT 40 -#define VARIOUS_SET_LAST_USED_ABILITY 41 -#define VARIOUS_TRY_HEAL_PULSE 42 -#define VARIOUS_TRY_QUASH 43 -#define VARIOUS_INVERT_STAT_STAGES 44 -#define VARIOUS_SET_TERRAIN 45 -#define VARIOUS_TRY_ME_FIRST 46 -#define VARIOUS_JUMP_IF_BATTLE_END 47 -#define VARIOUS_TRY_ELECTRIFY 48 -#define VARIOUS_TRY_REFLECT_TYPE 49 -#define VARIOUS_TRY_SOAK 50 -#define VARIOUS_HANDLE_MEGA_EVO 51 -#define VARIOUS_TRY_LAST_RESORT 52 -#define VARIOUS_ARGUMENT_STATUS_EFFECT 53 -#define VARIOUS_TRY_HIT_SWITCH_TARGET 54 -#define VARIOUS_TRY_AUTOTOMIZE 55 -#define VARIOUS_TRY_COPYCAT 56 -#define VARIOUS_ABILITY_POPUP 57 -#define VARIOUS_DEFOG 58 -#define VARIOUS_JUMP_IF_TARGET_ALLY 59 -#define VARIOUS_TRY_SYNCHRONOISE 60 -#define VARIOUS_PSYCHO_SHIFT 61 -#define VARIOUS_CURE_STATUS 62 -#define VARIOUS_POWER_TRICK 63 -#define VARIOUS_AFTER_YOU 64 -#define VARIOUS_BESTOW 65 -#define VARIOUS_ARGUMENT_TO_MOVE_EFFECT 66 -#define VARIOUS_JUMP_IF_NOT_GROUNDED 67 -#define VARIOUS_HANDLE_TRAINER_SLIDE_MSG 68 -#define VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF 69 -#define VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON 70 -#define VARIOUS_SET_AURORA_VEIL 71 -#define VARIOUS_TRY_THIRD_TYPE 72 -#define VARIOUS_ACUPRESSURE 73 -#define VARIOUS_SET_POWDER 74 -#define VARIOUS_SPECTRAL_THIEF 75 -#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 76 -#define VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS 77 -#define VARIOUS_JUMP_IF_ROAR_FAILS 78 -#define VARIOUS_TRY_INSTRUCT 79 -#define VARIOUS_JUMP_IF_NOT_BERRY 80 -#define VARIOUS_TRACE_ABILITY 81 -#define VARIOUS_UPDATE_NICK 82 -#define VARIOUS_TRY_ILLUSION_OFF 83 -#define VARIOUS_SET_SPRITEIGNORE0HP 84 -#define VARIOUS_HANDLE_FORM_CHANGE 85 -#define VARIOUS_GET_STAT_VALUE 86 -#define VARIOUS_JUMP_IF_FULL_HP 87 -#define VARIOUS_LOSE_TYPE 88 -#define VARIOUS_TRY_ACTIVATE_SOULHEART 89 -#define VARIOUS_TRY_ACTIVATE_RECEIVER 90 -#define VARIOUS_TRY_ACTIVATE_BEAST_BOOST 91 -#define VARIOUS_TRY_FRISK 92 -#define VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED 93 -#define VARIOUS_TRY_FAIRY_LOCK 94 -#define VARIOUS_JUMP_IF_NO_ALLY 95 -#define VARIOUS_POISON_TYPE_IMMUNITY 96 -#define VARIOUS_JUMP_IF_NO_HOLD_EFFECT 97 -#define VARIOUS_INFATUATE_WITH_BATTLER 98 -#define VARIOUS_SET_LAST_USED_ITEM 99 -#define VARIOUS_PARALYZE_TYPE_IMMUNITY 100 -#define VARIOUS_JUMP_IF_ABSENT 101 -#define VARIOUS_DESTROY_ABILITY_POPUP 102 -#define VARIOUS_TOTEM_BOOST 103 -#define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 104 -#define VARIOUS_MOVEEND_ITEM_EFFECTS 105 -#define VARIOUS_TERRAIN_SEED 106 -#define VARIOUS_MAKE_INVISIBLE 107 -#define VARIOUS_ROOM_SERVICE 108 -#define VARIOUS_JUMP_IF_TERRAIN_AFFECTED 109 -#define VARIOUS_EERIE_SPELL_PP_REDUCE 110 -#define VARIOUS_JUMP_IF_TEAM_HEALTHY 111 -#define VARIOUS_TRY_HEAL_QUARTER_HP 112 -#define VARIOUS_REMOVE_TERRAIN 113 -#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 114 -#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 115 -#define VARIOUS_GET_ROTOTILLER_TARGETS 116 -#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117 -#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 118 -#define VARIOUS_CONSUME_BERRY 119 -#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 120 -#define VARIOUS_HANDLE_PRIMAL_REVERSION 121 -#define VARIOUS_APPLY_PLASMA_FISTS 122 -#define VARIOUS_JUMP_IF_SPECIES 123 -#define VARIOUS_UPDATE_ABILITY_POPUP 124 -#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 125 -#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 126 -#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 127 -#define VARIOUS_PHOTON_GEYSER_CHECK 128 -#define VARIOUS_SHELL_SIDE_ARM_CHECK 129 -#define VARIOUS_TRY_NO_RETREAT 130 -#define VARIOUS_TRY_TAR_SHOT 131 -#define VARIOUS_CAN_TAR_SHOT_WORK 132 -#define VARIOUS_CHECK_POLTERGEIST 133 -#define VARIOUS_SET_OCTOLOCK 134 -#define VARIOUS_CUT_1_3_HP_RAISE_STATS 135 -#define VARIOUS_TRY_END_NEUTRALIZING_GAS 136 -#define VARIOUS_JUMP_IF_UNDER_200 137 -#define VARIOUS_SET_SKY_DROP 138 -#define VARIOUS_CLEAR_SKY_DROP 139 -#define VARIOUS_SKY_DROP_YAWN 140 -#define VARIOUS_JUMP_IF_CANT_FLING 141 -#define VARIOUS_JUMP_IF_HOLD_EFFECT 142 -#define VARIOUS_CURE_CERTAIN_STATUSES 143 -#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 144 -#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 145 -#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 146 -#define VARIOUS_SAVE_BATTLER_ITEM 147 -#define VARIOUS_RESTORE_BATTLER_ITEM 148 -#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 149 -#define VARIOUS_SET_BEAK_BLAST 150 -#define VARIOUS_SWAP_SIDE_STATUSES 151 -#define VARIOUS_SET_Z_EFFECT 152 -#define VARIOUS_TRY_SYMBIOSIS 153 -#define VARIOUS_CAN_TELEPORT 154 -#define VARIOUS_GET_BATTLER_SIDE 155 -#define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 156 -#define VARIOUS_SWAP_STATS 157 -#define VARIOUS_JUMP_IF_ROD 158 -#define VARIOUS_JUMP_IF_ABSORB 159 -#define VARIOUS_JUMP_IF_MOTOR 160 -#define VARIOUS_TEATIME_INVUL 161 -#define VARIOUS_TEATIME_TARGETS 162 -#define VARIOUS_TRY_WIND_RIDER_POWER 163 -#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164 -#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165 -#define VARIOUS_JUMP_IF_NO_VALID_TARGETS 166 -#define VARIOUS_JUMP_IF_EMERGENCY_EXITED 167 +#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 +#define VARIOUS_SET_MAGIC_COAT_TARGET 1 +#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2 +#define VARIOUS_GET_MOVE_TARGET 3 +#define VARIOUS_GET_BATTLER_FAINTED 4 +#define VARIOUS_RESET_SWITCH_IN_ABILITY_BITS 5 +#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 +#define VARIOUS_RESET_PLAYER_FAINTED 7 +#define VARIOUS_PALACE_FLAVOR_TEXT 8 +#define VARIOUS_ARENA_JUDGMENT_WINDOW 9 +#define VARIOUS_ARENA_OPPONENT_MON_LOST 10 +#define VARIOUS_ARENA_PLAYER_MON_LOST 11 +#define VARIOUS_ARENA_BOTH_MONS_LOST 12 +#define VARIOUS_EMIT_YESNOBOX 13 +#define VARIOUS_DRAW_ARENA_REF_TEXT_BOX 14 +#define VARIOUS_ERASE_ARENA_REF_TEXT_BOX 15 +#define VARIOUS_ARENA_JUDGMENT_STRING 16 +#define VARIOUS_ARENA_WAIT_STRING 17 +#define VARIOUS_WAIT_CRY 18 +#define VARIOUS_RETURN_OPPONENT_MON1 19 +#define VARIOUS_RETURN_OPPONENT_MON2 20 +#define VARIOUS_VOLUME_DOWN 21 +#define VARIOUS_VOLUME_UP 22 +#define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 23 +#define VARIOUS_PALACE_TRY_ESCAPE_STATUS 24 +#define VARIOUS_SET_TELEPORT_OUTCOME 25 +#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 +#define VARIOUS_STAT_TEXT_BUFFER 27 +#define VARIOUS_SWITCHIN_ABILITIES 28 +#define VARIOUS_SAVE_TARGET 29 +#define VARIOUS_RESTORE_TARGET 30 +#define VARIOUS_INSTANT_HP_DROP 31 +#define VARIOUS_CLEAR_STATUS 32 +#define VARIOUS_RESTORE_PP 33 +#define VARIOUS_TRY_ACTIVATE_MOXIE 34 +#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 35 +#define VARIOUS_PLAY_MOVE_ANIMATION 36 +#define VARIOUS_SET_LUCKY_CHANT 37 +#define VARIOUS_SUCKER_PUNCH_CHECK 38 +#define VARIOUS_SET_SIMPLE_BEAM 39 +#define VARIOUS_TRY_ENTRAINMENT 40 +#define VARIOUS_SET_LAST_USED_ABILITY 41 +#define VARIOUS_TRY_HEAL_PULSE 42 +#define VARIOUS_TRY_QUASH 43 +#define VARIOUS_INVERT_STAT_STAGES 44 +#define VARIOUS_SET_TERRAIN 45 +#define VARIOUS_TRY_ME_FIRST 46 +#define VARIOUS_JUMP_IF_BATTLE_END 47 +#define VARIOUS_TRY_ELECTRIFY 48 +#define VARIOUS_TRY_REFLECT_TYPE 49 +#define VARIOUS_TRY_SOAK 50 +#define VARIOUS_HANDLE_MEGA_EVO 51 +#define VARIOUS_TRY_LAST_RESORT 52 +#define VARIOUS_ARGUMENT_STATUS_EFFECT 53 +#define VARIOUS_TRY_HIT_SWITCH_TARGET 54 +#define VARIOUS_TRY_AUTOTOMIZE 55 +#define VARIOUS_TRY_COPYCAT 56 +#define VARIOUS_ABILITY_POPUP 57 +#define VARIOUS_DEFOG 58 +#define VARIOUS_JUMP_IF_TARGET_ALLY 59 +#define VARIOUS_TRY_SYNCHRONOISE 60 +#define VARIOUS_PSYCHO_SHIFT 61 +#define VARIOUS_CURE_STATUS 62 +#define VARIOUS_POWER_TRICK 63 +#define VARIOUS_AFTER_YOU 64 +#define VARIOUS_BESTOW 65 +#define VARIOUS_ARGUMENT_TO_MOVE_EFFECT 66 +#define VARIOUS_JUMP_IF_NOT_GROUNDED 67 +#define VARIOUS_HANDLE_TRAINER_SLIDE_MSG 68 +#define VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF 69 +#define VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON 70 +#define VARIOUS_SET_AURORA_VEIL 71 +#define VARIOUS_TRY_THIRD_TYPE 72 +#define VARIOUS_ACUPRESSURE 73 +#define VARIOUS_SET_POWDER 74 +#define VARIOUS_SPECTRAL_THIEF 75 +#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 76 +#define VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS 77 +#define VARIOUS_JUMP_IF_ROAR_FAILS 78 +#define VARIOUS_TRY_INSTRUCT 79 +#define VARIOUS_JUMP_IF_NOT_BERRY 80 +#define VARIOUS_TRACE_ABILITY 81 +#define VARIOUS_UPDATE_NICK 82 +#define VARIOUS_TRY_ILLUSION_OFF 83 +#define VARIOUS_SET_SPRITEIGNORE0HP 84 +#define VARIOUS_HANDLE_FORM_CHANGE 85 +#define VARIOUS_GET_STAT_VALUE 86 +#define VARIOUS_JUMP_IF_FULL_HP 87 +#define VARIOUS_LOSE_TYPE 88 +#define VARIOUS_TRY_ACTIVATE_SOULHEART 89 +#define VARIOUS_TRY_ACTIVATE_RECEIVER 90 +#define VARIOUS_TRY_ACTIVATE_BEAST_BOOST 91 +#define VARIOUS_TRY_FRISK 92 +#define VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED 93 +#define VARIOUS_TRY_FAIRY_LOCK 94 +#define VARIOUS_JUMP_IF_NO_ALLY 95 +#define VARIOUS_POISON_TYPE_IMMUNITY 96 +#define VARIOUS_JUMP_IF_NO_HOLD_EFFECT 97 +#define VARIOUS_INFATUATE_WITH_BATTLER 98 +#define VARIOUS_SET_LAST_USED_ITEM 99 +#define VARIOUS_PARALYZE_TYPE_IMMUNITY 100 +#define VARIOUS_JUMP_IF_ABSENT 101 +#define VARIOUS_DESTROY_ABILITY_POPUP 102 +#define VARIOUS_TOTEM_BOOST 103 +#define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 104 +#define VARIOUS_MOVEEND_ITEM_EFFECTS 105 +#define VARIOUS_TERRAIN_SEED 106 +#define VARIOUS_MAKE_INVISIBLE 107 +#define VARIOUS_ROOM_SERVICE 108 +#define VARIOUS_JUMP_IF_TERRAIN_AFFECTED 109 +#define VARIOUS_EERIE_SPELL_PP_REDUCE 110 +#define VARIOUS_JUMP_IF_TEAM_HEALTHY 111 +#define VARIOUS_TRY_HEAL_QUARTER_HP 112 +#define VARIOUS_REMOVE_TERRAIN 113 +#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 114 +#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 115 +#define VARIOUS_GET_ROTOTILLER_TARGETS 116 +#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117 +#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 118 +#define VARIOUS_CONSUME_BERRY 119 +#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 120 +#define VARIOUS_HANDLE_PRIMAL_REVERSION 121 +#define VARIOUS_APPLY_PLASMA_FISTS 122 +#define VARIOUS_JUMP_IF_SPECIES 123 +#define VARIOUS_UPDATE_ABILITY_POPUP 124 +#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 125 +#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 126 +#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 127 +#define VARIOUS_PHOTON_GEYSER_CHECK 128 +#define VARIOUS_SHELL_SIDE_ARM_CHECK 129 +#define VARIOUS_TRY_NO_RETREAT 130 +#define VARIOUS_TRY_TAR_SHOT 131 +#define VARIOUS_CAN_TAR_SHOT_WORK 132 +#define VARIOUS_CHECK_POLTERGEIST 133 +#define VARIOUS_SET_OCTOLOCK 134 +#define VARIOUS_CUT_1_3_HP_RAISE_STATS 135 +#define VARIOUS_TRY_END_NEUTRALIZING_GAS 136 +#define VARIOUS_JUMP_IF_UNDER_200 137 +#define VARIOUS_SET_SKY_DROP 138 +#define VARIOUS_CLEAR_SKY_DROP 139 +#define VARIOUS_SKY_DROP_YAWN 140 +#define VARIOUS_JUMP_IF_CANT_FLING 141 +#define VARIOUS_JUMP_IF_HOLD_EFFECT 142 +#define VARIOUS_CURE_CERTAIN_STATUSES 143 +#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 144 +#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 145 +#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 146 +#define VARIOUS_SAVE_BATTLER_ITEM 147 +#define VARIOUS_RESTORE_BATTLER_ITEM 148 +#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 149 +#define VARIOUS_SET_BEAK_BLAST 150 +#define VARIOUS_SWAP_SIDE_STATUSES 151 +#define VARIOUS_SET_Z_EFFECT 152 +#define VARIOUS_TRY_SYMBIOSIS 153 +#define VARIOUS_CAN_TELEPORT 154 +#define VARIOUS_GET_BATTLER_SIDE 155 +#define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 156 +#define VARIOUS_SWAP_STATS 157 +#define VARIOUS_JUMP_IF_ROD 158 +#define VARIOUS_JUMP_IF_ABSORB 159 +#define VARIOUS_JUMP_IF_MOTOR 160 +#define VARIOUS_TEATIME_INVUL 161 +#define VARIOUS_TEATIME_TARGETS 162 +#define VARIOUS_TRY_WIND_RIDER_POWER 163 +#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164 +#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165 +#define VARIOUS_JUMP_IF_NO_VALID_TARGETS 166 +#define VARIOUS_JUMP_IF_EMERGENCY_EXITED 167 +#define VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE 168 +#define VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION 169 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/src/battle_main.c b/src/battle_main.c index b23d8af553..5ec0937f09 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3868,6 +3868,16 @@ void BattleTurnPassed(void) BattleScriptExecute(BattleScript_ArenaTurnBeginning); else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_LAST_LOW_HP)) BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_LAST_HALF_HP)) + BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_FIRST_CRITICAL_HIT)) + BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT)) + BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_FIRST_STAB_MOVE)) + BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_PLAYER_MON_UNAFFECTED)) + BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); } u8 IsRunningFromBattleImpossible(void) diff --git a/src/battle_message.c b/src/battle_message.c index 9c8a1b7020..6a301d9ee7 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3868,6 +3868,13 @@ struct TrainerSlide const u8 *msgLastSwitchIn; const u8 *msgLastLowHp; const u8 *msgFirstDown; + const u8 *msgLastHalfHp; + const u8 *msgFirstCriticalHit; + const u8 *msgFirstSuperEffectiveHit; + const u8 *msgFirstSTABMove; + const u8 *msgPlayerMonUnaffected; + const u8 *msgMegaEvolution; + const u8 *msgZMove; }; static const struct TrainerSlide sTrainerSlides[] = @@ -3879,20 +3886,39 @@ static const struct TrainerSlide sTrainerSlides[] = .msgLastSwitchIn = sText_AarghAlmostHadIt, .msgLastLowHp = sText_BoxIsFull, .msgFirstDown = sText_123Poof, + .msgLastHalfHp = sText_ShootSoClose, + .msgFirstCriticalHit = sText_CriticalHit, + .msgFirstSuperEffectiveHit = sText_SuperEffective, + .msgFirstSTABMove = sText_ABoosted, + .msgPlayerMonUnaffected = sText_ButNoEffect, + .msgMegaEvolution = sText_PowderExplodes, + .msgZMove = sText_Electromagnetism, }, */ }; -static u32 GetEnemyMonCount(bool32 onlyAlive) +static u32 GetAliveEnemyMonCount(void) { u32 i, count = 0; for (i = 0; i < PARTY_SIZE; i++) { u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL); - if (species != SPECIES_NONE - && species != SPECIES_EGG - && (!onlyAlive || GetMonData(&gEnemyParty[i], MON_DATA_HP, NULL))) + if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gEnemyParty[i], MON_DATA_HP, NULL)) + count++; + } + + return count; +} + +static u32 GetTotalEnemyMonCount(void) +{ + u32 i, count = 0; + + for (i = 0; i < PARTY_SIZE; i++) + { + u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL); + if (species != SPECIES_NONE && species != SPECIES_EGG) count++; } @@ -3914,7 +3940,7 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) switch (which) { case TRAINER_SLIDE_LAST_SWITCHIN: - if (sTrainerSlides[i].msgLastSwitchIn != NULL && GetEnemyMonCount(TRUE) == 1) + if (sTrainerSlides[i].msgLastSwitchIn != NULL && GetAliveEnemyMonCount() == 1) { gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastSwitchIn; return TRUE; @@ -3922,9 +3948,9 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) break; case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL - && GetEnemyMonCount(TRUE) == 1 - && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) - && !gBattleStruct->trainerSlideLowHpMsgDone) + && GetAliveEnemyMonCount() == 1 + && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) + && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE; gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastLowHp; @@ -3932,12 +3958,77 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) } break; case TRAINER_SLIDE_FIRST_DOWN: - if (sTrainerSlides[i].msgFirstDown != NULL && GetEnemyMonCount(TRUE) == GetEnemyMonCount(FALSE) - 1) + if (sTrainerSlides[i].msgFirstDown != NULL && GetAliveEnemyMonCount() == GetTotalEnemyMonCount() - 1) { gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstDown; return TRUE; } break; + case TRAINER_SLIDE_LAST_HALF_HP: + if (sTrainerSlides[i].msgLastHalfHp != NULL + && GetAliveEnemyMonCount() == 1 + && (gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 2) && gBattleMons[battlerId].hp > (gBattleMons[battlerId].maxHP / 4)) + && !gBattleStruct->trainerSlideHalfHpMsgDone) + { + gBattleStruct->trainerSlideHalfHpMsgDone = TRUE; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastHalfHp; + return TRUE; + } + break; + case TRAINER_SLIDE_FIRST_CRITICAL_HIT: + if (sTrainerSlides[i].msgFirstCriticalHit != NULL && gBattleStruct->trainerSlideFirstCriticalHitMsgState == 1) + { + gBattleStruct->trainerSlideFirstCriticalHitMsgState = 2; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstCriticalHit; + return TRUE; + } + break; + case TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT: + if (sTrainerSlides[i].msgFirstSuperEffectiveHit != NULL + && gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState == 1 + && gBattleMons[battlerId].hp) + { + gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState = 2; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstSuperEffectiveHit; + return TRUE; + } + break; + case TRAINER_SLIDE_FIRST_STAB_MOVE: + if (sTrainerSlides[i].msgFirstSTABMove != NULL + && gBattleStruct->trainerSlideFirstSTABMoveMsgState == 1 + && GetAliveEnemyMonCount() == GetTotalEnemyMonCount()) + { + gBattleStruct->trainerSlideFirstSTABMoveMsgState = 2; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstSTABMove; + return TRUE; + } + break; + case TRAINER_SLIDE_PLAYER_MON_UNAFFECTED: + if (sTrainerSlides[i].msgPlayerMonUnaffected != NULL + && gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState == 1 + && GetAliveEnemyMonCount() == GetTotalEnemyMonCount()) + { + gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState = 2; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgPlayerMonUnaffected; + return TRUE; + } + break; + case TRAINER_SLIDE_MEGA_EVOLUTION: + if (sTrainerSlides[i].msgMegaEvolution != NULL && !gBattleStruct->trainerSlideMegaEvolutionMsgDone) + { + gBattleStruct->trainerSlideMegaEvolutionMsgDone = TRUE; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgMegaEvolution; + return TRUE; + } + break; + case TRAINER_SLIDE_Z_MOVE: + if (sTrainerSlides[i].msgZMove != NULL && !gBattleStruct->trainerSlideZMoveMsgDone) + { + gBattleStruct->trainerSlideZMoveMsgDone = TRUE; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgZMove; + return TRUE; + } + break; } break; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 87feb56271..683a979bdd 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2540,6 +2540,11 @@ static void Cmd_critmessage(void) if (gIsCriticalHit == TRUE && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) { PrepareStringBattle(STRINGID_CRITICALHIT, gBattlerAttacker); + + // Signal for the trainer slide-in system. + if (GetBattlerSide(gBattlerTarget) != B_SIDE_PLAYER && gBattleStruct->trainerSlideFirstCriticalHitMsgState != 2) + gBattleStruct->trainerSlideFirstCriticalHitMsgState = 1; + gBattleCommunication[MSG_DISPLAY] = 1; } gBattlescriptCurrInstr = cmd->nextInstr; @@ -2619,7 +2624,13 @@ static void Cmd_resultmessage(void) { case MOVE_RESULT_SUPER_EFFECTIVE: if (!gMultiHitCounter) // Don't print effectiveness on each hit in a multi hit attack + { + // Signal for the trainer slide-in system. + if (GetBattlerSide(gBattlerTarget) != B_SIDE_PLAYER && gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState != 2) + gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState = 1; + stringId = STRINGID_SUPEREFFECTIVE; + } break; case MOVE_RESULT_NOT_VERY_EFFECTIVE: if (!gMultiHitCounter) @@ -11040,6 +11051,30 @@ static void Cmd_various(void) gBattlescriptCurrInstr = cmd->nextInstr; return; } + case VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE: + { + VARIOUS_ARGS(); + if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_Z_MOVE)) + { + gBattleScripting.battler = gActiveBattler; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + return; + } + break; + } + case VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION: + { + VARIOUS_ARGS(); + if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_MEGA_EVOLUTION)) + { + gBattleScripting.battler = gActiveBattler; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + return; + } + break; + } } // End of switch (cmd->id) gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index 46f8d3a3d3..18ac8fa543 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1607,6 +1607,12 @@ void PrepareStringBattle(u16 stringId, u8 battler) } #endif + // Signal for the trainer slide-in system. + if ((stringId == STRINGID_ITDOESNTAFFECT || stringId == STRINGID_PKMNWASNTAFFECTED || stringId == STRINGID_PKMNUNAFFECTED) + && GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT + && gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState != 2) + gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState = 1; + gActiveBattler = battler; BtlController_EmitPrintString(BUFFER_A, stringId); MarkBattlerForControllerExec(gActiveBattler); @@ -9884,6 +9890,10 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat } } + // Signal for the trainer slide-in system. + if (GetBattlerSide(battlerDef) != B_SIDE_PLAYER && modifier && gBattleStruct->trainerSlideFirstSTABMoveMsgState != 2) + gBattleStruct->trainerSlideFirstSTABMoveMsgState = 1; + return modifier; } From cc0ef282ac071e09bd3a120d22352c561f0cc4b9 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 26 Feb 2023 19:47:44 +0100 Subject: [PATCH 029/229] fix createspriteontargets on electricy anim --- data/battle_anim_scripts.s | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 71bd93d70a..5d8f61d027 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24206,21 +24206,21 @@ WaterBubblesEffectLong: ElectricityEffect: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET ElectricityEffectNoSound: - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 5, 0, 5, 0, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 5, 0, 5, 0, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, -5, 10, 5, 1, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -5, 10, 5, 1, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 15, 20, 5, 2, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 15, 20, 5, 2, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, -15, -10, 5, 0, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -15, -10, 5, 0, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 25, 0, 5, 1, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 25, 0, 5, 1, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, -8, 8, 5, 2, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -8, 8, 5, 2, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 2, -8, 5, 0, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 2, -8, 5, 0, ANIM_TARGET delay 2 - createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, -20, 15, 5, 1, ANIM_TARGET + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -20, 15, 5, 1, ANIM_TARGET return ElectricityEffect_OnTargets: From 8a036e6007cdc8152a89b3ef211cb51fb759091e Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 27 Feb 2023 07:45:01 -0300 Subject: [PATCH 030/229] Made this build again --- src/battle_main.c | 10 +++++----- src/battle_message.c | 2 +- src/battle_script_commands.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 0f841a89be..d144590d59 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3868,15 +3868,15 @@ void BattleTurnPassed(void) BattleScriptExecute(BattleScript_ArenaTurnBeginning); else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_LOW_HP))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); - else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_HALF_HP)) + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_HALF_HP))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); - else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_CRITICAL_HIT)) + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_CRITICAL_HIT))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); - else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT)) + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); - else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_STAB_MOVE)) + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_STAB_MOVE))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); - else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_PLAYER_MON_UNAFFECTED)) + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_PLAYER_MON_UNAFFECTED))) BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); } diff --git a/src/battle_message.c b/src/battle_message.c index a9536d5a13..f321da46c0 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3964,7 +3964,7 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL && GetEnemyMonCount(firstId, lastId, TRUE) == 1 - && IsBattlerHpLow(battlerId) + && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e50aed2429..21e1d4d9c5 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -11170,11 +11170,11 @@ static void Cmd_various(void) case VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE: { VARIOUS_ARGS(); - if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_Z_MOVE)) + if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_Z_MOVE))) { gBattleScripting.battler = gActiveBattler; BattleScriptPush(cmd->nextInstr); - gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet); return; } break; @@ -11182,11 +11182,11 @@ static void Cmd_various(void) case VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION: { VARIOUS_ARGS(); - if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_MEGA_EVOLUTION)) + if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_MEGA_EVOLUTION))) { gBattleScripting.battler = gActiveBattler; BattleScriptPush(cmd->nextInstr); - gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet); return; } break; From ff15856820bd30e9820e8fb5a46b093e39f47a0d Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 2 Mar 2023 06:14:42 -0300 Subject: [PATCH 031/229] Added yet another trainer slide condition Now a trainer NPC can also say something before the first turn of a battle starts for good. --- include/battle.h | 1 + include/battle_message.h | 1 + src/battle_main.c | 3 +++ src/battle_message.c | 10 ++++++++++ 4 files changed, 15 insertions(+) diff --git a/include/battle.h b/include/battle.h index 3c2b6ed197..f3b788037e 100644 --- a/include/battle.h +++ b/include/battle.h @@ -669,6 +669,7 @@ struct BattleStruct u8 trainerSlidePlayerMonUnaffectedMsgState:2; bool8 trainerSlideMegaEvolutionMsgDone:1; bool8 trainerSlideZMoveMsgDone:1; + bool8 trainerSlideBeforeFirstTurnMsgDone:1; }; #define F_DYNAMIC_TYPE_1 (1 << 6) diff --git a/include/battle_message.h b/include/battle_message.h index de60d6d026..93bb63022b 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -236,6 +236,7 @@ enum TRAINER_SLIDE_PLAYER_MON_UNAFFECTED, TRAINER_SLIDE_MEGA_EVOLUTION, TRAINER_SLIDE_Z_MOVE, + TRAINER_SLIDE_BEFORE_FIRST_TURN, }; void BufferStringBattle(u16 stringID); diff --git a/src/battle_main.c b/src/battle_main.c index d144590d59..a93bef7ac6 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3776,6 +3776,9 @@ static void TryDoEventsBeforeFirstTurn(void) StopCryAndClearCrySongs(); BattleScriptExecute(BattleScript_ArenaTurnBeginning); } + + if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_BEFORE_FIRST_TURN))) + BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); } static void HandleEndTurn_ContinueBattle(void) diff --git a/src/battle_message.c b/src/battle_message.c index f321da46c0..ed430e9f8c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3881,6 +3881,7 @@ struct TrainerSlide const u8 *msgPlayerMonUnaffected; const u8 *msgMegaEvolution; const u8 *msgZMove; + const u8 *msgBeforeFirstTurn; }; static const struct TrainerSlide sTrainerSlides[] = @@ -3899,6 +3900,7 @@ static const struct TrainerSlide sTrainerSlides[] = .msgPlayerMonUnaffected = sText_ButNoEffect, .msgMegaEvolution = sText_PowderExplodes, .msgZMove = sText_Electromagnetism, + .msgBeforeFirstTurn = sText_GravityIntensified, }, */ }; @@ -4044,6 +4046,14 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) return TRUE; } break; + case TRAINER_SLIDE_BEFORE_FIRST_TURN: + if (sTrainerSlides[i].msgBeforeFirstTurn != NULL && !gBattleStruct->trainerSlideBeforeFirstTurnMsgDone) + { + gBattleStruct->trainerSlideBeforeFirstTurnMsgDone = TRUE; + gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgBeforeFirstTurn; + return TRUE; + } + break; } break; } From 46bdd21e7a9c96f4dbad84f775daef920a4d58ca Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 7 Mar 2023 11:39:47 -0300 Subject: [PATCH 032/229] Cleaned up stray comment --- src/battle_script_commands.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e8b23d43f9..360cef1252 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8670,7 +8670,6 @@ static bool32 CourtChangeSwapSideStatuses(void) SWAP(sideTimerPlayer->stickyWebBattlerSide, sideTimerOpp->stickyWebBattlerSide, temp); } -//cmd->case_, gActiveBattler, TRUE static void HandleScriptMegaPrimal(u32 caseId, u32 battlerId, bool32 isMega) { struct Pokemon *mon = GetBattlerPartyData(battlerId); From f6089a00578ca9e5779f30b4b64f94349f9234e3 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 7 Mar 2023 22:34:57 +0100 Subject: [PATCH 033/229] Mega Evolution after switching and based on speed --- data/battle_scripts_1.s | 8 +-- data/scripts/debug.inc | 1 + include/battle.h | 3 +- include/battle_util.h | 1 - src/battle_main.c | 143 +++++++++++++++++++++---------------- src/battle_util.c | 5 +- src/data/trainer_parties.h | 16 ++--- test/mega_evolution.c | 38 ++++++++++ 8 files changed, 138 insertions(+), 77 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 8b93edb78a..ef4a739a54 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -561,7 +561,7 @@ BattleScript_ShellTrapSetUp:: playanimation BS_ATTACKER, B_ANIM_SHELL_TRAP_SETUP, NULL printstring STRINGID_PREPARESHELLTRAP waitmessage B_WAIT_TIME_LONG - end2 + end3 BattleScript_EffectShellTrap:: attackcanceler @@ -635,7 +635,7 @@ BattleScript_BeakBlastSetUp:: playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL printstring STRINGID_HEATUPBEAK waitmessage B_WAIT_TIME_LONG - end2 + end3 BattleScript_BeakBlastBurn:: setbyte cMULTISTRING_CHOOSER, 0 @@ -7825,7 +7825,7 @@ BattleScript_FocusPunchSetUp:: playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP printstring STRINGID_PKMNTIGHTENINGFOCUS waitmessage B_WAIT_TIME_LONG - end2 + end3 BattleScript_MegaEvolution:: printstring STRINGID_MEGAEVOREACTING @@ -7840,7 +7840,7 @@ BattleScript_MegaEvolutionAfeterString: printstring STRINGID_MEGAEVOEVOLVED waitmessage B_WAIT_TIME_LONG switchinabilities BS_ATTACKER - end2 + end3 BattleScript_WishMegaEvolution:: printstring STRINGID_FERVENTWISHREACHED diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 191fe69327..a6f68b1f70 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -55,6 +55,7 @@ Debug_FlagsNotSetMessage_Text: .string "'include/constants/overworld{UNDERSCORE}config.h'!$" Debug_Script_1:: + multi_fixed_2_vs_2 TRAINER_ROXANNE_2, Debug_FlagsNotSetMessage_Text, TRAINER_ROXANNE_3, Debug_FlagsNotSetMessage_Text, TRAINER_ROXANNE_4, 0 end Debug_Script_2:: diff --git a/include/battle.h b/include/battle.h index 83b552e7e1..1ff9ed8cef 100644 --- a/include/battle.h +++ b/include/battle.h @@ -535,7 +535,7 @@ struct BattleStruct u8 dynamicMoveType; u8 wrappedBy[MAX_BATTLERS_COUNT]; u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves. - u8 focusPunchBattlerId; + u8 focusPunchBattlers; // as bits u8 battlerPreventingSwitchout; u8 moneyMultiplier:6; u8 moneyMultiplierItem:1; @@ -656,6 +656,7 @@ struct BattleStruct u8 attackerBeforeBounce:2; u8 beatUpSlot:3; bool8 hitSwitchTargetFailed:1; + bool8 effectsBeforeUsingMoveDone:1; // Mega Evo and Focus Punch/Shell Trap effects. u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit. u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) bool8 allowedToChangeFormInWeather[PARTY_SIZE][2]; // For each party member and side, used by Ice Face. diff --git a/include/battle_util.h b/include/battle_util.h index 0661081e43..327ca35ac2 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -195,7 +195,6 @@ bool32 IsHealBlockPreventingMove(u32 battler, u32 move); bool32 HasEnoughHpToEatBerry(u32 battlerId, u32 hpFraction, u32 itemId); bool32 IsPartnerMonFromSameTrainer(u8 battlerId); u8 GetSplitBasedOnStats(u8 battlerId); -void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast); bool32 TestSheerForceFlag(u8 battler, u16 move); void TryRestoreStolenItems(void); bool32 CanStealItem(u8 battlerStealing, u8 battlerItem, u16 item); diff --git a/src/battle_main.c b/src/battle_main.c index 9ea3b66446..4a9910e70e 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4773,9 +4773,6 @@ static void SetActionsAndBattlersTurnOrder(void) turnOrderId++; } } - gBattleMainFunc = CheckMegaEvolutionBeforeTurn; - gBattleStruct->mega.battlerId = 0; - return; } else { @@ -4821,8 +4818,8 @@ static void SetActionsAndBattlersTurnOrder(void) } } } - gBattleMainFunc = CheckMegaEvolutionBeforeTurn; - gBattleStruct->mega.battlerId = 0; + gBattleMainFunc = CheckQuickClaw_CustapBerryActivation; + gBattleStruct->quickClawBattlerId = 0; } static void TurnValuesCleanUp(bool8 var0) @@ -4871,48 +4868,96 @@ void SpecialStatusesClear(void) memset(&gSpecialStatuses, 0, sizeof(gSpecialStatuses)); } -static void CheckMegaEvolutionBeforeTurn(void) +static void PopulateArrayWithBattlers(u8 *battlers) { - if (!(gHitMarker & HITMARKER_RUN)) - { - while (gBattleStruct->mega.battlerId < gBattlersCount) - { - gActiveBattler = gBattlerAttacker = gBattleStruct->mega.battlerId; - gBattleStruct->mega.battlerId++; - if (gBattleStruct->mega.toEvolve & gBitTable[gActiveBattler] - && !(gProtectStructs[gActiveBattler].noValidMoves)) - { - struct Pokemon *mon = GetBattlerPartyData(gActiveBattler); + u32 i; + for (i = 0; i < gBattlersCount; i++) + battlers[i] = i; +} +static bool32 TryDoMegaEvosBeforeMoves(void) +{ + if (!(gHitMarker & HITMARKER_RUN) && gBattleStruct->mega.toEvolve) + { + u32 i; + struct Pokemon *mon; + u8 megaOrder[MAX_BATTLERS_COUNT]; + + PopulateArrayWithBattlers(megaOrder); + SortBattlersBySpeed(megaOrder, FALSE); + for (i = 0; i < gBattlersCount; i++) + { + if (gBattleStruct->mega.toEvolve & gBitTable[megaOrder[i]] + && !(gProtectStructs[megaOrder[i]].noValidMoves)) + { + gActiveBattler = gBattlerAttacker = megaOrder[i]; gBattleStruct->mega.toEvolve &= ~(gBitTable[gActiveBattler]); gLastUsedItem = gBattleMons[gActiveBattler].item; + mon = GetBattlerPartyData(gActiveBattler); if (GetWishMegaEvolutionSpecies(GetMonData(mon, MON_DATA_SPECIES), GetMonData(mon, MON_DATA_MOVE1), GetMonData(mon, MON_DATA_MOVE2), GetMonData(mon, MON_DATA_MOVE3), GetMonData(mon, MON_DATA_MOVE4))) BattleScriptExecute(BattleScript_WishMegaEvolution); else BattleScriptExecute(BattleScript_MegaEvolution); - return; + return TRUE; } } } - #if B_MEGA_EVO_TURN_ORDER <= GEN_6 - gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; - gBattleStruct->focusPunchBattlerId = 0; - #else - gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved + #if B_MEGA_EVO_TURN_ORDER >= GEN_7 + TryChangeTurnOrder(); // This will just do nothing if no mon has mega evolved. #endif + return FALSE; +} + +static bool32 TryDoMoveEffectsBeforeMoves(void) +{ + if (!(gHitMarker & HITMARKER_RUN)) + { + u32 i; + struct Pokemon *mon; + u8 battlers[MAX_BATTLERS_COUNT]; + + PopulateArrayWithBattlers(battlers); + SortBattlersBySpeed(battlers, FALSE); + for (i = 0; i < gBattlersCount; i++) + { + if (!(gBattleStruct->focusPunchBattlers & gBitTable[battlers[i]]) + && !(gBattleMons[battlers[i]].status1 & STATUS1_SLEEP) + && !(gDisableStructs[battlers[i]].truantCounter) + && !(gProtectStructs[battlers[i]].noValidMoves)) + { + gBattleStruct->focusPunchBattlers |= gBitTable[battlers[i]]; + gActiveBattler = gBattlerAttacker = battlers[i]; + switch (gChosenMoveByBattler[gActiveBattler]) + { + case MOVE_FOCUS_PUNCH: + BattleScriptExecute(BattleScript_FocusPunchSetUp); + return TRUE; + case MOVE_BEAK_BLAST: + BattleScriptExecute(BattleScript_BeakBlastSetUp); + return TRUE; + case MOVE_SHELL_TRAP: + BattleScriptExecute(BattleScript_ShellTrapSetUp); + return TRUE; + } + } + } + } + + return FALSE; } // In gen7, priority and speed are recalculated during the turn in which a pokemon mega evolves static void TryChangeTurnOrder(void) { - s32 i, j; + u32 i, j; for (i = 0; i < gBattlersCount - 1; i++) { for (j = i + 1; j < gBattlersCount; j++) { - u8 battler1 = gBattlerByTurnOrder[i]; - u8 battler2 = gBattlerByTurnOrder[j]; + u32 battler1 = gBattlerByTurnOrder[i]; + u32 battler2 = gBattlerByTurnOrder[j]; + if (gActionsByTurnOrder[i] == B_ACTION_USE_MOVE && gActionsByTurnOrder[j] == B_ACTION_USE_MOVE) { @@ -4921,42 +4966,6 @@ static void TryChangeTurnOrder(void) } } } - gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; - gBattleStruct->focusPunchBattlerId = 0; -} - -static void CheckChosenMoveForEffectsBeforeTurnStarts(void) -{ - u32 i; - - if (!(gHitMarker & HITMARKER_RUN)) - { - while (gBattleStruct->focusPunchBattlerId < gBattlersCount) - { - gActiveBattler = gBattlerAttacker = gBattleStruct->focusPunchBattlerId; - gBattleStruct->focusPunchBattlerId++; - if (!(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) - && !(gDisableStructs[gBattlerAttacker].truantCounter) - && !(gProtectStructs[gActiveBattler].noValidMoves)) - { - switch (gChosenMoveByBattler[gActiveBattler]) - { - case MOVE_FOCUS_PUNCH: - BattleScriptExecute(BattleScript_FocusPunchSetUp); - return; - case MOVE_BEAK_BLAST: - BattleScriptExecute(BattleScript_BeakBlastSetUp); - return; - case MOVE_SHELL_TRAP: - BattleScriptExecute(BattleScript_ShellTrapSetUp); - return; - } - } - } - } - - gBattleMainFunc = CheckQuickClaw_CustapBerryActivation; - gBattleStruct->quickClawBattlerId = 0; } static void CheckQuickClaw_CustapBerryActivation(void) @@ -5011,6 +5020,8 @@ static void CheckQuickClaw_CustapBerryActivation(void) gCurrentTurnActionNumber = 0; gCurrentActionFuncId = gActionsByTurnOrder[0]; gBattleStruct->dynamicMoveType = 0; + gBattleStruct->effectsBeforeUsingMoveDone = FALSE; + gBattleStruct->focusPunchBattlers = 0; for (i = 0; i < MAX_BATTLERS_COUNT; i++) { gBattleStruct->ateBoost[i] = FALSE; @@ -5029,6 +5040,16 @@ static void RunTurnActionsFunctions(void) if (gBattleOutcome != 0) gCurrentActionFuncId = B_ACTION_FINISHED; + // Mega Evolve / Focus Punch-like moves after switching, items, running, but before using a move. + if (gCurrentActionFuncId == B_ACTION_USE_MOVE && !gBattleStruct->effectsBeforeUsingMoveDone) + { + if (TryDoMegaEvosBeforeMoves()) + return; + else if (TryDoMoveEffectsBeforeMoves()) + return; + gBattleStruct->effectsBeforeUsingMoveDone = TRUE; + } + *(&gBattleStruct->savedTurnActionNumber) = gCurrentTurnActionNumber; sTurnActionsFuncsTable[gCurrentActionFuncId](); diff --git a/src/battle_util.c b/src/battle_util.c index 9520e761f7..e709733251 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1674,7 +1674,8 @@ void BattleScriptPushCursor(void) void BattleScriptPop(void) { - gBattlescriptCurrInstr = gBattleResources->battleScriptsStack->ptr[--gBattleResources->battleScriptsStack->size]; + if (gBattleResources->battleScriptsStack->size != 0) + gBattlescriptCurrInstr = gBattleResources->battleScriptsStack->ptr[--gBattleResources->battleScriptsStack->size]; } static bool32 IsGravityPreventingMove(u32 move) @@ -10567,7 +10568,7 @@ bool32 IsEntrainmentTargetOrSimpleBeamBannedAbility(u16 ability) void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast) { int i, j, currSpeed, currBattler; - u16 speeds[4] = {0}; + u16 speeds[MAX_BATTLERS_COUNT] = {0}; for (i = 0; i < gBattlersCount; i++) speeds[i] = GetBattlerTotalSpeedStat(battlers[i]); diff --git a/src/data/trainer_parties.h b/src/data/trainer_parties.h index 1759120b7f..b4f6175799 100644 --- a/src/data/trainer_parties.h +++ b/src/data/trainer_parties.h @@ -10301,9 +10301,9 @@ static const struct TrainerMonNoItemDefaultMoves sParty_MayRustboroTorchic[] = { static const struct TrainerMonItemCustomMoves sParty_Roxanne2[] = { { .iv = 255, - .lvl = 32, - .species = SPECIES_GOLEM, - .heldItem = ITEM_NONE, + .lvl = 5, + .species = SPECIES_AMPHAROS, + .heldItem = ITEM_AMPHAROSITE, .moves = {MOVE_PROTECT, MOVE_ROLLOUT, MOVE_MAGNITUDE, MOVE_EXPLOSION} }, { @@ -10333,8 +10333,8 @@ static const struct TrainerMonItemCustomMoves sParty_Roxanne3[] = { { .iv = 255, .lvl = 37, - .species = SPECIES_OMANYTE, - .heldItem = ITEM_NONE, + .species = SPECIES_MANECTRIC, + .heldItem = ITEM_MANECTITE, .moves = {MOVE_PROTECT, MOVE_ICE_BEAM, MOVE_ROCK_SLIDE, MOVE_SURF} }, { @@ -10370,9 +10370,9 @@ static const struct TrainerMonItemCustomMoves sParty_Roxanne3[] = { static const struct TrainerMonItemCustomMoves sParty_Roxanne4[] = { { .iv = 255, - .lvl = 42, - .species = SPECIES_OMASTAR, - .heldItem = ITEM_NONE, + .lvl = 100, + .species = SPECIES_GARDEVOIR, + .heldItem = ITEM_GARDEVOIRITE, .moves = {MOVE_PROTECT, MOVE_ICE_BEAM, MOVE_ROCK_SLIDE, MOVE_SURF} }, { diff --git a/test/mega_evolution.c b/test/mega_evolution.c index 13e9cd5b22..49861daaa8 100644 --- a/test/mega_evolution.c +++ b/test/mega_evolution.c @@ -17,6 +17,44 @@ SINGLE_BATTLE_TEST("Venusaur can Mega Evolve holding Venusaurite") } } +DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - opponent faster") +{ + GIVEN { + PLAYER(SPECIES_VENUSAUR) { Item(ITEM_VENUSAURITE); Speed(1); } + PLAYER(SPECIES_WOBBUFFET) { Speed(3);} + OPPONENT(SPECIES_GARDEVOIR) { Item(ITEM_GARDEVOIRITE); Speed(3);} + OPPONENT(SPECIES_WOBBUFFET) { Speed(4);} + } WHEN { + TURN { MOVE(opponentLeft, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, megaEvolve: TRUE); } + } SCENE { + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); + MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); + MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerLeft); + MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!"); + } +} + +DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - player faster") +{ + GIVEN { + PLAYER(SPECIES_VENUSAUR) { Item(ITEM_VENUSAURITE); Speed(5); } + PLAYER(SPECIES_WOBBUFFET) { Speed(3);} + OPPONENT(SPECIES_GARDEVOIR) { Item(ITEM_GARDEVOIRITE); Speed(2);} + OPPONENT(SPECIES_WOBBUFFET) { Speed(4);} + } WHEN { + TURN { MOVE(opponentLeft, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, megaEvolve: TRUE); } + } SCENE { + MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerLeft); + MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!"); + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); + MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); + } +} + SINGLE_BATTLE_TEST("Rayquaza can Mega Evolve knowing Dragon Ascent") { GIVEN { From 51c8edd8255532727a57022ebc98a570815ed5fb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 8 Mar 2023 13:22:53 +0100 Subject: [PATCH 034/229] Add tests for Mega Evo, Focus Punch, Beak Blast --- src/battle_message.c | 6 +- src/battle_script_commands.c | 3 + src/data/trainer_parties.h | 22 +++---- test/mega_evolution.c | 49 ++++++++++++++ test/move_effect_beak_blast.c | 113 +++++++++++++++++++++++++++++++++ test/move_effect_focus_punch.c | 76 ++++++++++++++++++++++ 6 files changed, 257 insertions(+), 12 deletions(-) create mode 100644 test/move_effect_beak_blast.c create mode 100644 test/move_effect_focus_punch.c diff --git a/src/battle_message.c b/src/battle_message.c index cf57247bf8..705fdc3264 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3027,7 +3027,11 @@ static const u8 *BattleStringGetPlayerName(u8 *text, u8 battlerId) toCpy = gSaveBlock2Ptr->playerName; break; case B_POSITION_PLAYER_RIGHT: - if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_MULTI)) + if ((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER))) + { + toCpy = gLinkPlayers[0].name; + } + else if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_MULTI)) { toCpy = gLinkPlayers[2].name; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 126ca06fd1..caad6393c3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5464,6 +5464,9 @@ static void Cmd_moveend(void) { gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; gBattleMons[gBattlerAttacker].status1 = STATUS1_BURN; + gActiveBattler = gBattlerAttacker; + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); + MarkBattlerForControllerExec(gActiveBattler); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BeakBlastBurn; effect = 1; diff --git a/src/data/trainer_parties.h b/src/data/trainer_parties.h index b4f6175799..76c3b6ca43 100644 --- a/src/data/trainer_parties.h +++ b/src/data/trainer_parties.h @@ -10301,31 +10301,31 @@ static const struct TrainerMonNoItemDefaultMoves sParty_MayRustboroTorchic[] = { static const struct TrainerMonItemCustomMoves sParty_Roxanne2[] = { { .iv = 255, - .lvl = 5, - .species = SPECIES_AMPHAROS, - .heldItem = ITEM_AMPHAROSITE, - .moves = {MOVE_PROTECT, MOVE_ROLLOUT, MOVE_MAGNITUDE, MOVE_EXPLOSION} + .lvl = 100, + .species = SPECIES_BEEDRILL, + .heldItem = 0, + .moves = {MOVE_FLING} }, { .iv = 255, - .lvl = 35, + .lvl = 100, .species = SPECIES_KABUTO, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_SWORDS_DANCE, MOVE_ICE_BEAM, MOVE_SURF, MOVE_ROCK_SLIDE} }, { .iv = 255, - .lvl = 35, - .species = SPECIES_ONIX, + .lvl = 100, + .species = SPECIES_THUNDURUS, .heldItem = ITEM_NONE, - .moves = {MOVE_IRON_TAIL, MOVE_EXPLOSION, MOVE_ROAR, MOVE_ROCK_SLIDE} + .moves = {MOVE_THUNDER, MOVE_EXPLOSION, MOVE_ROAR, MOVE_ROCK_SLIDE} }, { .iv = 255, - .lvl = 37, - .species = SPECIES_NOSEPASS, + .lvl = 99, + .species = SPECIES_SABLEYE, .heldItem = ITEM_SITRUS_BERRY, - .moves = {MOVE_DOUBLE_TEAM, MOVE_EXPLOSION, MOVE_PROTECT, MOVE_ROCK_SLIDE} + .moves = {MOVE_DOUBLE_TEAM, MOVE_EXPLOSION, MOVE_DARK_PULSE, MOVE_IRON_HEAD} } }; diff --git a/test/mega_evolution.c b/test/mega_evolution.c index 49861daaa8..8d6af1d21d 100644 --- a/test/mega_evolution.c +++ b/test/mega_evolution.c @@ -104,3 +104,52 @@ SINGLE_BATTLE_TEST("Abilities replaced by Mega Evolution do not affect turn orde ASSUME(player->speed == 45); } } + +DOUBLE_BATTLE_TEST("Mega Evolution happens after switching, but before Focus Punch-like Moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_FOCUS_PUNCH].effect == EFFECT_FOCUS_PUNCH); + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_VENUSAUR) { Item(ITEM_VENUSAURITE);} + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { SWITCH(opponentRight, 2); MOVE(playerRight, MOVE_FOCUS_PUNCH, megaEvolve: TRUE, target:opponentLeft); MOVE(playerLeft, MOVE_FOCUS_PUNCH, target:opponentLeft); } + TURN {}; + } SCENE { + MESSAGE("2 withdrew Wobbuffet!"); + MESSAGE("2 sent out Wobbuffet!"); + + MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerRight); + MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!"); + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerRight); + MESSAGE("Venusaur is tightening its focus!"); + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerLeft); + MESSAGE("Wobbuffet is tightening its focus!"); + } +} + +SINGLE_BATTLE_TEST("Regular Mega Evolution and Fervent Wish Mega Evolution can happen on the same turn") +{ + GIVEN { + PLAYER(SPECIES_RAYQUAZA) { Moves(MOVE_DRAGON_ASCENT, MOVE_CELEBRATE); Speed(3);} + OPPONENT(SPECIES_GARDEVOIR) { Item(ITEM_GARDEVOIRITE); Speed(2);} + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(opponent, MOVE_CELEBRATE, megaEvolve: TRUE); } + } SCENE { + MESSAGE("1's fervent wish has reached Rayquaza!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, player); + MESSAGE("Rayquaza has Mega Evolved into Mega Rayquaza!"); + + MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); + MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); + } THEN { + EXPECT_EQ(player->species, SPECIES_RAYQUAZA_MEGA); + EXPECT_EQ(opponent->species, SPECIES_GARDEVOIR_MEGA); + } +} diff --git a/test/move_effect_beak_blast.c b/test/move_effect_beak_blast.c new file mode 100644 index 0000000000..448eb6973f --- /dev/null +++ b/test/move_effect_beak_blast.c @@ -0,0 +1,113 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_BEAK_BLAST].effect == EFFECT_BEAK_BLAST); +} + +DOUBLE_BATTLE_TEST("Beak Blast's charging message is shown before other moves are used") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_BEAK_BLAST].priority < 0); + PLAYER(SPECIES_WYNAUT) {Speed(10); } + PLAYER(SPECIES_WOBBUFFET) {Speed(5); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(3); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_BEAK_BLAST, target:opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_BEAK_BLAST_SETUP, playerLeft); + MESSAGE("Wynaut started heating up its beak!"); + + MESSAGE("Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight); + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentRight); + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft); + + MESSAGE("Wynaut used Beak Blast!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_BEAK_BLAST, playerLeft); + HP_BAR(opponentLeft); + } +} + +DOUBLE_BATTLE_TEST("Beak Blast burns all who make contact with the pokemon") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_BEAK_BLAST].priority < 0); + ASSUME(gBattleMoves[MOVE_TACKLE].flags & FLAG_MAKES_CONTACT); + PLAYER(SPECIES_WYNAUT) {Speed(10); } + PLAYER(SPECIES_WOBBUFFET) {Speed(5); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft); MOVE(opponentRight, MOVE_TACKLE, target:playerLeft); MOVE(playerLeft, MOVE_BEAK_BLAST, target:opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_BEAK_BLAST_SETUP, playerLeft); + MESSAGE("Wynaut started heating up its beak!"); + + MESSAGE("Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight); + + MESSAGE("Foe Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + HP_BAR(playerLeft); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponentLeft); + MESSAGE("Foe Wobbuffet was burned!"); + STATUS_ICON(opponentLeft, burn: TRUE); + + MESSAGE("Foe Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentRight); + HP_BAR(playerLeft); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponentRight); + MESSAGE("Foe Wobbuffet was burned!"); + STATUS_ICON(opponentRight, burn: TRUE); + + MESSAGE("Wynaut used Beak Blast!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_BEAK_BLAST, playerLeft); + HP_BAR(opponentLeft); + } +} + +SINGLE_BATTLE_TEST("Beak Blast burns only when contact moves are used") +{ + u32 move; + bool32 burn; + PARAMETRIZE { move = MOVE_TACKLE; burn = TRUE; } + PARAMETRIZE { move = MOVE_WATER_GUN; burn = FALSE; } + PARAMETRIZE { move = MOVE_LEER; burn = FALSE; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].flags & FLAG_MAKES_CONTACT); + ASSUME(!(gBattleMoves[MOVE_WATER_GUN].flags & FLAG_MAKES_CONTACT)); + ASSUME(!(gBattleMoves[MOVE_LEER].flags & FLAG_MAKES_CONTACT)); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BEAK_BLAST); MOVE(opponent, move); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_BEAK_BLAST_SETUP, player); + MESSAGE("Wobbuffet started heating up its beak!"); + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + + if (burn) { + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponent); + MESSAGE("Foe Wobbuffet was burned!"); + STATUS_ICON(opponent, burn: TRUE); + } + else { + NONE_OF { + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponent); + MESSAGE("Foe Wobbuffet was burned!"); + STATUS_ICON(opponent, burn: TRUE); + } + } + + MESSAGE("Wobbuffet used Beak Blast!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_BEAK_BLAST, player); + HP_BAR(opponent); + } +} diff --git a/test/move_effect_focus_punch.c b/test/move_effect_focus_punch.c new file mode 100644 index 0000000000..62c5003001 --- /dev/null +++ b/test/move_effect_focus_punch.c @@ -0,0 +1,76 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_FOCUS_PUNCH].effect == EFFECT_FOCUS_PUNCH); +} + +SINGLE_BATTLE_TEST("Focus Punch activates only if not damaged") +{ + u32 move; + bool32 activate; + PARAMETRIZE { move = MOVE_TACKLE; activate = FALSE; } + PARAMETRIZE { move = MOVE_WATER_GUN; activate = FALSE; } + PARAMETRIZE { move = MOVE_LEER; activate = TRUE; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_FOCUS_PUNCH); MOVE(opponent, move); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, player); + MESSAGE("Wobbuffet is tightening its focus!"); + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + + if (activate) { + MESSAGE("Wobbuffet used Focus Punch!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FOCUS_PUNCH, player); + HP_BAR(opponent); + } else { + MESSAGE("Wobbuffet lost its focus and couldn't move!"); + NONE_OF { + MESSAGE("Wobbuffet used Focus Punch!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FOCUS_PUNCH, player); + HP_BAR(opponent); + } + } + } +} + +DOUBLE_BATTLE_TEST("Focus Punch activation is based on Speed") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(2) ;} + PLAYER(SPECIES_WYNAUT) {Speed(3) ;} + OPPONENT(SPECIES_WOBBUFFET) {Speed(1) ;} + OPPONENT(SPECIES_WYNAUT) {Speed(5) ;} + } WHEN { + TURN { MOVE(opponentRight, MOVE_FOCUS_PUNCH, target:playerLeft); MOVE(playerRight, MOVE_FOCUS_PUNCH, target:opponentLeft); MOVE(playerLeft, MOVE_FOCUS_PUNCH, target:opponentLeft); MOVE(opponentLeft, MOVE_FOCUS_PUNCH, target:playerLeft); } + } + SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, opponentRight); + MESSAGE("Foe Wynaut is tightening its focus!"); + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerRight); + MESSAGE("Wynaut is tightening its focus!"); + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerLeft); + MESSAGE("Wobbuffet is tightening its focus!"); + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, opponentLeft); + MESSAGE("Foe Wobbuffet is tightening its focus!"); + + MESSAGE("Foe Wynaut used Focus Punch!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FOCUS_PUNCH, opponentRight); + HP_BAR(playerLeft); + + MESSAGE("Wynaut used Focus Punch!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FOCUS_PUNCH, playerRight); + HP_BAR(opponentLeft); + + MESSAGE("Wobbuffet lost its focus and couldn't move!"); + MESSAGE("Foe Wobbuffet lost its focus and couldn't move!"); + } +} From bf4735e87c613599b299986fc8e64b120e35a111 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 8 Mar 2023 13:41:08 +0100 Subject: [PATCH 035/229] remove test changes --- data/scripts/debug.inc | 1 - src/data/trainer_parties.h | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index a6f68b1f70..191fe69327 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -55,7 +55,6 @@ Debug_FlagsNotSetMessage_Text: .string "'include/constants/overworld{UNDERSCORE}config.h'!$" Debug_Script_1:: - multi_fixed_2_vs_2 TRAINER_ROXANNE_2, Debug_FlagsNotSetMessage_Text, TRAINER_ROXANNE_3, Debug_FlagsNotSetMessage_Text, TRAINER_ROXANNE_4, 0 end Debug_Script_2:: diff --git a/src/data/trainer_parties.h b/src/data/trainer_parties.h index 76c3b6ca43..1759120b7f 100644 --- a/src/data/trainer_parties.h +++ b/src/data/trainer_parties.h @@ -10301,31 +10301,31 @@ static const struct TrainerMonNoItemDefaultMoves sParty_MayRustboroTorchic[] = { static const struct TrainerMonItemCustomMoves sParty_Roxanne2[] = { { .iv = 255, - .lvl = 100, - .species = SPECIES_BEEDRILL, - .heldItem = 0, - .moves = {MOVE_FLING} + .lvl = 32, + .species = SPECIES_GOLEM, + .heldItem = ITEM_NONE, + .moves = {MOVE_PROTECT, MOVE_ROLLOUT, MOVE_MAGNITUDE, MOVE_EXPLOSION} }, { .iv = 255, - .lvl = 100, + .lvl = 35, .species = SPECIES_KABUTO, .heldItem = ITEM_SITRUS_BERRY, .moves = {MOVE_SWORDS_DANCE, MOVE_ICE_BEAM, MOVE_SURF, MOVE_ROCK_SLIDE} }, { .iv = 255, - .lvl = 100, - .species = SPECIES_THUNDURUS, + .lvl = 35, + .species = SPECIES_ONIX, .heldItem = ITEM_NONE, - .moves = {MOVE_THUNDER, MOVE_EXPLOSION, MOVE_ROAR, MOVE_ROCK_SLIDE} + .moves = {MOVE_IRON_TAIL, MOVE_EXPLOSION, MOVE_ROAR, MOVE_ROCK_SLIDE} }, { .iv = 255, - .lvl = 99, - .species = SPECIES_SABLEYE, + .lvl = 37, + .species = SPECIES_NOSEPASS, .heldItem = ITEM_SITRUS_BERRY, - .moves = {MOVE_DOUBLE_TEAM, MOVE_EXPLOSION, MOVE_DARK_PULSE, MOVE_IRON_HEAD} + .moves = {MOVE_DOUBLE_TEAM, MOVE_EXPLOSION, MOVE_PROTECT, MOVE_ROCK_SLIDE} } }; @@ -10333,8 +10333,8 @@ static const struct TrainerMonItemCustomMoves sParty_Roxanne3[] = { { .iv = 255, .lvl = 37, - .species = SPECIES_MANECTRIC, - .heldItem = ITEM_MANECTITE, + .species = SPECIES_OMANYTE, + .heldItem = ITEM_NONE, .moves = {MOVE_PROTECT, MOVE_ICE_BEAM, MOVE_ROCK_SLIDE, MOVE_SURF} }, { @@ -10370,9 +10370,9 @@ static const struct TrainerMonItemCustomMoves sParty_Roxanne3[] = { static const struct TrainerMonItemCustomMoves sParty_Roxanne4[] = { { .iv = 255, - .lvl = 100, - .species = SPECIES_GARDEVOIR, - .heldItem = ITEM_GARDEVOIRITE, + .lvl = 42, + .species = SPECIES_OMASTAR, + .heldItem = ITEM_NONE, .moves = {MOVE_PROTECT, MOVE_ICE_BEAM, MOVE_ROCK_SLIDE, MOVE_SURF} }, { From 7ce68994ec3f05c305f1800c490b429b3923d4f4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 12 Mar 2023 02:32:09 -0300 Subject: [PATCH 036/229] Made Mega Evolution properly use TryBattleFormChange --- data/battle_scripts_1.s | 3 +- src/battle_script_commands.c | 20 ++---- src/battle_util.c | 63 +++++++++++------- src/data/pokemon/form_change_tables.h | 94 --------------------------- src/pokemon.c | 1 - 5 files changed, 45 insertions(+), 136 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 8bba932865..e8b45cc3d3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7833,10 +7833,9 @@ BattleScript_MegaEvolutionAfeterString: waitmessage B_WAIT_TIME_LONG setbyte gIsCriticalHit, 0 handlemegaevo BS_ATTACKER, 0 - handlemegaevo BS_ATTACKER, 1 playanimation BS_ATTACKER, B_ANIM_MEGA_EVOLUTION waitanimation - handlemegaevo BS_ATTACKER, 2 + handlemegaevo BS_ATTACKER, 1 printstring STRINGID_MEGAEVOEVOLVED waitmessage B_WAIT_TIME_LONG switchinabilities BS_ATTACKER diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 360cef1252..4867722574 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8679,37 +8679,27 @@ static void HandleScriptMegaPrimal(u32 caseId, u32 battlerId, bool32 isMega) // Change species. if (caseId == 0) { - u16 newSpecies; if (isMega) { - //Checks regular Mega Evolution - newSpecies = GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM); - //Checks Wish Mega Evolution - if (newSpecies == SPECIES_NONE) - newSpecies = GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE); + if (!TryBattleFormChange(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM)) + TryBattleFormChange(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE); } else - newSpecies = GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_PRIMAL_REVERSION); + TryBattleFormChange(battlerId, FORM_CHANGE_BATTLE_PRIMAL_REVERSION); - gBattleMons[battlerId].species = newSpecies; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[battlerId].species); BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[battlerId]], sizeof(gBattleMons[battlerId].species), &gBattleMons[battlerId].species); MarkBattlerForControllerExec(battlerId); } - // Change stats. - else if (caseId == 1) - { - RecalcBattlerStats(battlerId, mon); - if (isMega) - gBattleStruct->mega.alreadyEvolved[position] = TRUE; - } // Update healthbox and elevation and play cry. else { UpdateHealthboxAttribute(gHealthboxSpriteIds[battlerId], mon, HEALTHBOX_ALL); if (side == B_SIDE_OPPONENT) SetBattlerShadowSpriteCallback(battlerId, gBattleMons[battlerId].species); + if (isMega) + gBattleStruct->mega.alreadyEvolved[position] = TRUE; } } diff --git a/src/battle_util.c b/src/battle_util.c index 9a8954fd5f..aba70e377f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10071,11 +10071,17 @@ bool32 CanMegaEvolve(u8 battlerId) bool32 IsBattlerMegaEvolved(u8 battlerId) { + // While Transform does copy stats and visuals, it shouldn't be counted as true Mega Evolution. + if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + return FALSE; return (gSpeciesInfo[gBattleMons[battlerId].species].flags & SPECIES_FLAG_MEGA_EVOLUTION); } bool32 IsBattlerPrimalReverted(u8 battlerId) { + // While Transform does copy stats and visuals, it shouldn't be counted as true Primal Revesion. + if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + return FALSE; return (gSpeciesInfo[gBattleMons[battlerId].species].flags & SPECIES_FLAG_PRIMAL_REVERSION); } @@ -10145,6 +10151,18 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) return targetSpecies; } +bool32 CanBattlerFormChange(u8 battlerId, u16 method) +{ + // Can't change form if transformed. + if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + return FALSE; + // Mega Evolved Pokémon should always revert to normal upon fainting or ending the battle. + if (IsBattlerMegaEvolved(battlerId) + && (method == FORM_CHANGE_FAINT || method == FORM_CHANGE_END_BATTLE)) + return TRUE; + return DoesSpeciesHaveFormChangeMethod(gBattleMons[battlerId].species, method); +} + bool32 TryBattleFormChange(u8 battlerId, u16 method) { u8 monId = gBattlerPartyIndexes[battlerId]; @@ -10152,14 +10170,12 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; u16 targetSpecies; - // Can't change form if transformed. - if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) - return FALSE; - - if (!DoesSpeciesHaveFormChangeMethod(gBattleMons[battlerId].species, method)) + if (!CanBattlerFormChange(battlerId, method)) return FALSE; targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method); + if (targetSpecies == SPECIES_NONE) + targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); if (targetSpecies != SPECIES_NONE) { // Saves the original species on the first form change for the player. @@ -10172,27 +10188,26 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) RecalcBattlerStats(battlerId, &party[monId]); return TRUE; } - - targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); - if (targetSpecies != SPECIES_NONE) + else if (gBattleStruct->changedSpecies[monId] != SPECIES_NONE) { - // Saves the original species on the first form change for the player. - if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE) - gBattleStruct->changedSpecies[monId] = targetSpecies; + bool8 restoreSpecies = FALSE; - TryToSetBattleFormChangeMoves(&party[monId], method); - SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies); - gBattleMons[battlerId].species = targetSpecies; - RecalcBattlerStats(battlerId, &party[monId]); - return TRUE; - } - else if ((method == FORM_CHANGE_END_BATTLE || method == FORM_CHANGE_FAINT) - && gBattleStruct->changedSpecies[monId] != SPECIES_NONE) - { - TryToSetBattleFormChangeMoves(&party[monId], method); - SetMonData(&party[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]); - RecalcBattlerStats(battlerId, &party[monId]); - return TRUE; + // Mega Evolved Pokémon should always revert to normal upon fainting or ending the battle, so no need to add it to the form change tables. + if (IsBattlerMegaEvolved(battlerId) && (method == FORM_CHANGE_FAINT || method == FORM_CHANGE_END_BATTLE)) + restoreSpecies = TRUE; + + // Unlike Megas, Primal Reversion isn't canceled on fainting. + else if (IsBattlerPrimalReverted(battlerId) && (method == FORM_CHANGE_END_BATTLE)) + restoreSpecies = TRUE; + + if (restoreSpecies) + { + // Reverts the original species + TryToSetBattleFormChangeMoves(&party[monId], method); + SetMonData(&party[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]); + RecalcBattlerStats(battlerId, &party[monId]); + return TRUE; + } } return FALSE; diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 5050b488b7..9787d2a9bf 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,287 +1,207 @@ static const struct FormChange sVenusaurFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE}, - {FORM_CHANGE_FAINT, SPECIES_VENUSAUR}, - {FORM_CHANGE_END_BATTLE, SPECIES_VENUSAUR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sCharizardFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_X, ITEM_CHARIZARDITE_X}, {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CHARIZARD_MEGA_Y, ITEM_CHARIZARDITE_Y}, - {FORM_CHANGE_FAINT, SPECIES_CHARIZARD}, - {FORM_CHANGE_END_BATTLE, SPECIES_CHARIZARD}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBlastoiseFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLASTOISE_MEGA, ITEM_BLASTOISINITE}, - {FORM_CHANGE_FAINT, SPECIES_BLASTOISE}, - {FORM_CHANGE_END_BATTLE, SPECIES_BLASTOISE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBeedrillFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BEEDRILL_MEGA, ITEM_BEEDRILLITE}, - {FORM_CHANGE_FAINT, SPECIES_BEEDRILL}, - {FORM_CHANGE_END_BATTLE, SPECIES_BEEDRILL}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sPidgeotFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PIDGEOT_MEGA, ITEM_PIDGEOTITE}, - {FORM_CHANGE_FAINT, SPECIES_PIDGEOT}, - {FORM_CHANGE_END_BATTLE, SPECIES_PIDGEOT}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAlakazamFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALAKAZAM_MEGA, ITEM_ALAKAZITE}, - {FORM_CHANGE_FAINT, SPECIES_ALAKAZAM}, - {FORM_CHANGE_END_BATTLE, SPECIES_ALAKAZAM}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSlowbroFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SLOWBRO_MEGA, ITEM_SLOWBRONITE}, - {FORM_CHANGE_FAINT, SPECIES_SLOWBRO}, - {FORM_CHANGE_END_BATTLE, SPECIES_SLOWBRO}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGengarFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GENGAR_MEGA, ITEM_GENGARITE}, - {FORM_CHANGE_FAINT, SPECIES_GENGAR}, - {FORM_CHANGE_END_BATTLE, SPECIES_GENGAR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sKangaskhanFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_KANGASKHAN_MEGA, ITEM_KANGASKHANITE}, - {FORM_CHANGE_FAINT, SPECIES_KANGASKHAN}, - {FORM_CHANGE_END_BATTLE, SPECIES_KANGASKHAN}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sPinsirFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_PINSIR_MEGA, ITEM_PINSIRITE}, - {FORM_CHANGE_FAINT, SPECIES_PINSIR}, - {FORM_CHANGE_END_BATTLE, SPECIES_PINSIR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGyaradosFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GYARADOS_MEGA, ITEM_GYARADOSITE}, - {FORM_CHANGE_FAINT, SPECIES_GYARADOS}, - {FORM_CHANGE_END_BATTLE, SPECIES_GYARADOS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAerodactylFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AERODACTYL_MEGA, ITEM_AERODACTYLITE}, - {FORM_CHANGE_FAINT, SPECIES_AERODACTYL}, - {FORM_CHANGE_END_BATTLE, SPECIES_AERODACTYL}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMewtwoFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_X, ITEM_MEWTWONITE_X}, {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEWTWO_MEGA_Y, ITEM_MEWTWONITE_Y}, - {FORM_CHANGE_FAINT, SPECIES_MEWTWO}, - {FORM_CHANGE_END_BATTLE, SPECIES_MEWTWO}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAmpharosFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AMPHAROS_MEGA, ITEM_AMPHAROSITE}, - {FORM_CHANGE_FAINT, SPECIES_AMPHAROS}, - {FORM_CHANGE_END_BATTLE, SPECIES_AMPHAROS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSteelixFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_STEELIX_MEGA, ITEM_STEELIXITE}, - {FORM_CHANGE_FAINT, SPECIES_STEELIX}, - {FORM_CHANGE_END_BATTLE, SPECIES_STEELIX}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sScizorFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCIZOR_MEGA, ITEM_SCIZORITE}, - {FORM_CHANGE_FAINT, SPECIES_SCIZOR}, - {FORM_CHANGE_END_BATTLE, SPECIES_SCIZOR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sHeracrossFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HERACROSS_MEGA, ITEM_HERACRONITE}, - {FORM_CHANGE_FAINT, SPECIES_HERACROSS}, - {FORM_CHANGE_END_BATTLE, SPECIES_HERACROSS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sHoundoomFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_HOUNDOOM_MEGA, ITEM_HOUNDOOMINITE}, - {FORM_CHANGE_FAINT, SPECIES_HOUNDOOM}, - {FORM_CHANGE_END_BATTLE, SPECIES_HOUNDOOM}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sTyranitarFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_TYRANITAR_MEGA, ITEM_TYRANITARITE}, - {FORM_CHANGE_FAINT, SPECIES_TYRANITAR}, - {FORM_CHANGE_END_BATTLE, SPECIES_TYRANITAR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSceptileFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SCEPTILE_MEGA, ITEM_SCEPTILITE}, - {FORM_CHANGE_FAINT, SPECIES_SCEPTILE}, - {FORM_CHANGE_END_BATTLE, SPECIES_SCEPTILE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBlazikenFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BLAZIKEN_MEGA, ITEM_BLAZIKENITE}, - {FORM_CHANGE_FAINT, SPECIES_BLAZIKEN}, - {FORM_CHANGE_END_BATTLE, SPECIES_BLAZIKEN}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSwampertFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SWAMPERT_MEGA, ITEM_SWAMPERTITE}, - {FORM_CHANGE_FAINT, SPECIES_SWAMPERT}, - {FORM_CHANGE_END_BATTLE, SPECIES_SWAMPERT}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSableyeFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SABLEYE_MEGA, ITEM_SABLENITE}, - {FORM_CHANGE_FAINT, SPECIES_SABLEYE}, - {FORM_CHANGE_END_BATTLE, SPECIES_SABLEYE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSharpedoFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SHARPEDO_MEGA, ITEM_SHARPEDONITE}, - {FORM_CHANGE_FAINT, SPECIES_SHARPEDO}, - {FORM_CHANGE_END_BATTLE, SPECIES_SHARPEDO}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sManectricFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MANECTRIC_MEGA, ITEM_MANECTITE}, - {FORM_CHANGE_FAINT, SPECIES_MANECTRIC}, - {FORM_CHANGE_END_BATTLE, SPECIES_MANECTRIC}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sCameruptFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_CAMERUPT_MEGA, ITEM_CAMERUPTITE}, - {FORM_CHANGE_FAINT, SPECIES_CAMERUPT}, - {FORM_CHANGE_END_BATTLE, SPECIES_CAMERUPT}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGlalieFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GLALIE_MEGA, ITEM_GLALITITE}, - {FORM_CHANGE_FAINT, SPECIES_GLALIE}, - {FORM_CHANGE_END_BATTLE, SPECIES_GLALIE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMawileFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MAWILE_MEGA, ITEM_MAWILITE}, - {FORM_CHANGE_FAINT, SPECIES_MAWILE}, - {FORM_CHANGE_END_BATTLE, SPECIES_MAWILE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMedichamFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_MEDICHAM_MEGA, ITEM_MEDICHAMITE}, - {FORM_CHANGE_FAINT, SPECIES_MEDICHAM}, - {FORM_CHANGE_END_BATTLE, SPECIES_MEDICHAM}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAltariaFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ALTARIA_MEGA, ITEM_ALTARIANITE}, - {FORM_CHANGE_FAINT, SPECIES_ALTARIA}, - {FORM_CHANGE_END_BATTLE, SPECIES_ALTARIA}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAbsolFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABSOL_MEGA, ITEM_ABSOLITE}, - {FORM_CHANGE_FAINT, SPECIES_ABSOL}, - {FORM_CHANGE_END_BATTLE, SPECIES_ABSOL}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sBanetteFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, - {FORM_CHANGE_FAINT, SPECIES_BANETTE}, - {FORM_CHANGE_END_BATTLE, SPECIES_BANETTE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAggronFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AGGRON_MEGA, ITEM_AGGRONITE}, - {FORM_CHANGE_FAINT, SPECIES_AGGRON}, - {FORM_CHANGE_END_BATTLE, SPECIES_AGGRON}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGardevoirFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARDEVOIR_MEGA, ITEM_GARDEVOIRITE}, - {FORM_CHANGE_FAINT, SPECIES_GARDEVOIR}, - {FORM_CHANGE_END_BATTLE, SPECIES_GARDEVOIR}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sSalamenceFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_SALAMENCE_MEGA, ITEM_SALAMENCITE}, - {FORM_CHANGE_FAINT, SPECIES_SALAMENCE}, - {FORM_CHANGE_END_BATTLE, SPECIES_SALAMENCE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sMetagrossFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_METAGROSS_MEGA, ITEM_METAGROSSITE}, - {FORM_CHANGE_FAINT, SPECIES_METAGROSS}, - {FORM_CHANGE_END_BATTLE, SPECIES_METAGROSS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLatiasFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIAS_MEGA, ITEM_LATIASITE}, - {FORM_CHANGE_FAINT, SPECIES_LATIAS}, - {FORM_CHANGE_END_BATTLE, SPECIES_LATIAS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLatiosFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LATIOS_MEGA, ITEM_LATIOSITE}, - {FORM_CHANGE_FAINT, SPECIES_LATIOS}, - {FORM_CHANGE_END_BATTLE, SPECIES_LATIOS}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sKyogreFormChangeTable[] = { {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_KYOGRE_PRIMAL, ITEM_BLUE_ORB}, - {FORM_CHANGE_END_BATTLE, SPECIES_KYOGRE}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGroudonFormChangeTable[] = { {FORM_CHANGE_BATTLE_PRIMAL_REVERSION, SPECIES_GROUDON_PRIMAL, ITEM_RED_ORB}, - {FORM_CHANGE_END_BATTLE, SPECIES_GROUDON}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sRayquazaFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE, SPECIES_RAYQUAZA_MEGA, MOVE_DRAGON_ASCENT}, - {FORM_CHANGE_FAINT, SPECIES_RAYQUAZA}, - {FORM_CHANGE_END_BATTLE, SPECIES_RAYQUAZA}, {FORM_CHANGE_TERMINATOR}, }; @@ -300,36 +220,26 @@ static const struct FormChange sBurmyFormChangeTable[] = { static const struct FormChange sLopunnyFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, - {FORM_CHANGE_FAINT, SPECIES_LOPUNNY}, - {FORM_CHANGE_END_BATTLE, SPECIES_LOPUNNY}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGarchompFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GARCHOMP_MEGA, ITEM_GARCHOMPITE}, - {FORM_CHANGE_FAINT, SPECIES_GARCHOMP}, - {FORM_CHANGE_END_BATTLE, SPECIES_GARCHOMP}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sLucarioFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LUCARIO_MEGA, ITEM_LUCARIONITE}, - {FORM_CHANGE_FAINT, SPECIES_LUCARIO}, - {FORM_CHANGE_END_BATTLE, SPECIES_LUCARIO}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sAbomasnowFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_ABOMASNOW_MEGA, ITEM_ABOMASITE}, - {FORM_CHANGE_FAINT, SPECIES_ABOMASNOW}, - {FORM_CHANGE_END_BATTLE, SPECIES_ABOMASNOW}, {FORM_CHANGE_TERMINATOR}, }; static const struct FormChange sGalladeFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_GALLADE_MEGA, ITEM_GALLADITE}, - {FORM_CHANGE_FAINT, SPECIES_GALLADE}, - {FORM_CHANGE_END_BATTLE, SPECIES_GALLADE}, {FORM_CHANGE_TERMINATOR}, }; @@ -388,8 +298,6 @@ static const struct FormChange sArceusFormChangeTable[] = { #if P_GEN_5_POKEMON == TRUE static const struct FormChange sAudinoFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_AUDINO_MEGA, ITEM_AUDINITE}, - {FORM_CHANGE_FAINT, SPECIES_AUDINO}, - {FORM_CHANGE_END_BATTLE, SPECIES_AUDINO}, {FORM_CHANGE_TERMINATOR}, }; @@ -478,8 +386,6 @@ static const struct FormChange sZygardePowerConstructFormChangeTable[] = { static const struct FormChange sDiancieFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_DIANCIE_MEGA, ITEM_DIANCITE}, - {FORM_CHANGE_FAINT, SPECIES_DIANCIE}, - {FORM_CHANGE_END_BATTLE, SPECIES_DIANCIE}, {FORM_CHANGE_TERMINATOR}, }; diff --git a/src/pokemon.c b/src/pokemon.c index f01e72dcdb..e11014120a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8659,7 +8659,6 @@ bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } -// Returns species that it transformed into. If it didn't, returns SPECIES_NONE. bool32 TryFormChange(u32 monId, u32 side, u16 method) { struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; From c46e70ca8215831038c8312baf7caf3a29f323dd Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 12 Mar 2023 02:38:27 -0300 Subject: [PATCH 037/229] Forgot about Primal Reversion --- src/battle_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index aba70e377f..f4aa344b5d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10157,8 +10157,9 @@ bool32 CanBattlerFormChange(u8 battlerId, u16 method) if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) return FALSE; // Mega Evolved Pokémon should always revert to normal upon fainting or ending the battle. - if (IsBattlerMegaEvolved(battlerId) - && (method == FORM_CHANGE_FAINT || method == FORM_CHANGE_END_BATTLE)) + if (IsBattlerMegaEvolved(battlerId) && (method == FORM_CHANGE_FAINT || method == FORM_CHANGE_END_BATTLE)) + return TRUE; + else if (IsBattlerPrimalReverted(battlerId) && (method == FORM_CHANGE_END_BATTLE)) return TRUE; return DoesSpeciesHaveFormChangeMethod(gBattleMons[battlerId].species, method); } From a101476d5187243b1d9c7a22d44d9fc60bbd7481 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 12 Mar 2023 17:01:53 -0300 Subject: [PATCH 038/229] Hunger Switch test --- test/ability_hunger_switch.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/ability_hunger_switch.c diff --git a/test/ability_hunger_switch.c b/test/ability_hunger_switch.c new file mode 100644 index 0000000000..8ae3139299 --- /dev/null +++ b/test/ability_hunger_switch.c @@ -0,0 +1,25 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Hunger Switch switches Morpeko's forms at the end of the turn") +{ + u16 species; + PARAMETRIZE { species = SPECIES_MORPEKO; } + PARAMETRIZE { species = SPECIES_MORPEKO_HANGRY; } + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(species) { Moves(MOVE_CELEBRATE); Speed(2); }; + OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_CELEBRATE); Speed(1); }; + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Morpeko used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } THEN { + if (species == SPECIES_MORPEKO) + EXPECT_EQ(player->species, SPECIES_MORPEKO_HANGRY); + else + EXPECT_EQ(player->species, SPECIES_MORPEKO); + } +} From 0dfb60f2e462f2980cab20697a46db8fa3102c47 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 14 Mar 2023 11:07:26 -0300 Subject: [PATCH 039/229] Removed uneeded parameters --- test/ability_hunger_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ability_hunger_switch.c b/test/ability_hunger_switch.c index 8ae3139299..9250ae85a5 100644 --- a/test/ability_hunger_switch.c +++ b/test/ability_hunger_switch.c @@ -8,8 +8,8 @@ SINGLE_BATTLE_TEST("Hunger Switch switches Morpeko's forms at the end of the tur PARAMETRIZE { species = SPECIES_MORPEKO_HANGRY; } GIVEN { ASSUME(P_GEN_8_POKEMON == TRUE); - PLAYER(species) { Moves(MOVE_CELEBRATE); Speed(2); }; - OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_CELEBRATE); Speed(1); }; + PLAYER(species) { Speed(2); }; + OPPONENT(SPECIES_WOBBUFFET) { Speed(1); }; } WHEN { TURN { MOVE(player, MOVE_CELEBRATE); } } SCENE { From bef5d98b88cef4138fe83adad0b572f0893f6661 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 18 Mar 2023 09:47:54 -0300 Subject: [PATCH 040/229] =?UTF-8?q?Fixed=20Pok=C3=A9mon=20fainting=20in=20?= =?UTF-8?q?the=20Overworld=20that=20don't=20have=20that=20specific=20form?= =?UTF-8?q?=20change=20entry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index e11014120a..62e1891ab6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8670,7 +8670,7 @@ bool32 TryFormChange(u32 monId, u32 side, u16 method) targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0); - if (targetSpecies == SPECIES_NONE) + if (targetSpecies == SPECIES_NONE && gBattleStruct != NULL) targetSpecies = gBattleStruct->changedSpecies[monId]; if (targetSpecies != SPECIES_NONE) From 74ec59cace57d0036512688aaf39bac2647fc8a4 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 21 Mar 2023 18:11:49 -0400 Subject: [PATCH 041/229] add sAnimHideHpBoxes to fix healthbox reappearing from e.g. B_ANIM_SWITCH_OUT_OPPONENT_MON --- src/battle_anim.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/battle_anim.c b/src/battle_anim.c index fd81152e1c..de9a97ce28 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -119,6 +119,7 @@ EWRAM_DATA u8 gBattleAnimAttacker = 0; EWRAM_DATA u8 gBattleAnimTarget = 0; EWRAM_DATA u16 gAnimBattlerSpecies[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA u8 gAnimCustomPanning = 0; +EWRAM_DATA static bool8 sAnimHideHpBoxes = FALSE; #include "data/battle_anim.h" @@ -232,7 +233,6 @@ void LaunchBattleAnimation(u32 animType, u32 animId) { s32 i; const u8 *const *animsTable; - bool32 hideHpBoxes; if (gTestRunnerEnabled) { @@ -261,7 +261,7 @@ void LaunchBattleAnimation(u32 animType, u32 animId) break; } - hideHpBoxes = !(animType == ANIM_TYPE_MOVE && animId == MOVE_TRANSFORM); + sAnimHideHpBoxes = !(animType == ANIM_TYPE_MOVE && animId == MOVE_TRANSFORM); if (animType != ANIM_TYPE_MOVE) { switch (animId) @@ -276,10 +276,10 @@ void LaunchBattleAnimation(u32 animType, u32 animId) case B_ANIM_MEGA_EVOLUTION: case B_ANIM_PRIMAL_REVERSION: case B_ANIM_GULP_MISSILE: - hideHpBoxes = TRUE; + sAnimHideHpBoxes = TRUE; break; default: - hideHpBoxes = FALSE; + sAnimHideHpBoxes = FALSE; break; } } @@ -287,7 +287,7 @@ void LaunchBattleAnimation(u32 animType, u32 animId) if (!IsContest()) { InitPrioritiesForVisibleBattlers(); - UpdateOamPriorityInAllHealthboxes(0, hideHpBoxes); + UpdateOamPriorityInAllHealthboxes(0, sAnimHideHpBoxes); for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (GetBattlerSide(i) != B_SIDE_PLAYER) @@ -762,7 +762,8 @@ static void Cmd_end(void) if (!IsContest()) { InitPrioritiesForVisibleBattlers(); - UpdateOamPriorityInAllHealthboxes(1, TRUE); + UpdateOamPriorityInAllHealthboxes(1, sAnimHideHpBoxes); + sAnimHideHpBoxes = FALSE; } gAnimScriptActive = FALSE; } From 168ed1cc55468863107edda6af375284a7cd133a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 22 Mar 2023 07:33:13 -0300 Subject: [PATCH 042/229] Xerneas/Zacian/Zamazenta form change tests --- test/form_change.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 test/form_change.c diff --git a/test/form_change.c b/test/form_change.c new file mode 100644 index 0000000000..8d761bb12d --- /dev/null +++ b/test/form_change.c @@ -0,0 +1,81 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Xerneas changes into Active Form upon battle start") +{ + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_XERNEAS); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } THEN { + EXPECT_EQ(player->species, SPECIES_XERNEAS_ACTIVE); + } +} + +SINGLE_BATTLE_TEST("Zacian changes into its Crowned Form when holding the Rusted Sword upon battle start") +{ + u16 item; + PARAMETRIZE { item = ITEM_NONE; } + PARAMETRIZE { item = ITEM_RUSTED_SWORD; } + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(SPECIES_ZACIAN) { Item(item); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } THEN { + if (item == ITEM_NONE) + EXPECT_EQ(player->species, SPECIES_ZACIAN); + else + EXPECT_EQ(player->species, SPECIES_ZACIAN_CROWNED_SWORD); + } +} + +SINGLE_BATTLE_TEST("Zacian's Iron Head becomes Behemoth Blade upon form change") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(SPECIES_ZACIAN) { Item(ITEM_RUSTED_SWORD); Moves(MOVE_IRON_HEAD, MOVE_CELEBRATE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } THEN { + ASSUME(player->species == SPECIES_ZACIAN_CROWNED_SWORD); // Assumes form change worked. + EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BLADE); + } +} + +SINGLE_BATTLE_TEST("Zamazenta changes into its Crowned Form when holding the Rusted Shield upon battle start") +{ + u16 item; + PARAMETRIZE { item = ITEM_NONE; } + PARAMETRIZE { item = ITEM_RUSTED_SHIELD; } + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(SPECIES_ZAMAZENTA) { Item(item); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } THEN { + if (item == ITEM_NONE) + EXPECT_EQ(player->species, SPECIES_ZAMAZENTA); + else + EXPECT_EQ(player->species, SPECIES_ZAMAZENTA_CROWNED_SHIELD); + } +} + +SINGLE_BATTLE_TEST("Zamazenta's Iron Head becomes Behemoth Bash upon form change") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(SPECIES_ZAMAZENTA) { Item(ITEM_RUSTED_SHIELD); Moves(MOVE_IRON_HEAD, MOVE_CELEBRATE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } THEN { + ASSUME(player->species == SPECIES_ZAMAZENTA_CROWNED_SHIELD); // Assumes form change worked. + EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH); + } +} From 52011804b96fb57f12f2871721ead16dc5ff8baa Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 24 Mar 2023 09:36:33 -0300 Subject: [PATCH 043/229] Level command now also sets experience to avoid losing level upon form changes --- test/test_runner_battle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index ec7ba275c2..524525c132 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -933,9 +933,11 @@ void Ability_(u32 sourceLine, u32 ability) void Level_(u32 sourceLine, u32 level) { // TODO: Preserve any explicitly-set stats. + u32 species = GetMonData(DATA.currentMon, MON_DATA_SPECIES); INVALID_IF(!DATA.currentMon, "Level outside of PLAYER/OPPONENT"); INVALID_IF(level == 0 || level > MAX_LEVEL, "Illegal level: %d", level); SetMonData(DATA.currentMon, MON_DATA_LEVEL, &level); + SetMonData(DATA.currentMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]); } void MaxHP_(u32 sourceLine, u32 maxHP) From 498f4a2c972941bd271e3487007eb6a919e15584 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 24 Mar 2023 10:04:38 -0300 Subject: [PATCH 044/229] Schooling and Zen Mode tests --- test/ability_schooling.c | 111 ++++++++++++++++++++++++++++++++++++++ test/ability_zen_mode.c | 93 ++++++++++++++++++++++++++++++++ test/test_runner_battle.c | 1 + 3 files changed, 205 insertions(+) create mode 100644 test/ability_schooling.c create mode 100644 test/ability_zen_mode.c diff --git a/test/ability_schooling.c b/test/ability_schooling.c new file mode 100644 index 0000000000..03a5303f0a --- /dev/null +++ b/test/ability_schooling.c @@ -0,0 +1,111 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Schooling switches Level 20+ Wishiwashi's form when HP is 25-percent or less at the end of the turn") +{ + u16 level; + PARAMETRIZE { level = 19; } + PARAMETRIZE { level = 20; } + + GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); + ASSUME(gSpeciesInfo[SPECIES_WISHIWASHI].baseHP == gSpeciesInfo[SPECIES_WISHIWASHI_SCHOOL].baseHP); + PLAYER(SPECIES_WISHIWASHI) + { + Level(level); + HP(GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / 2); + Ability(ABILITY_SCHOOLING); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_SUPER_FANG); } + } SCENE { + if (level >= 20) + { + ABILITY_POPUP(player, ABILITY_SCHOOLING); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } + MESSAGE("Wishiwashi used Celebrate!"); + MESSAGE("Foe Wobbuffet used Super Fang!"); + HP_BAR(player); + if (level >= 20) + { + ABILITY_POPUP(player, ABILITY_SCHOOLING); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } + } THEN { + EXPECT_EQ(player->species, SPECIES_WISHIWASHI); + } +} + +SINGLE_BATTLE_TEST("Schooling switches Level 20+ Wishiwashi's form when HP is over 25-percent before the first turn") +{ + u16 level; + bool32 overQuarterHP; + PARAMETRIZE { level = 19; overQuarterHP = FALSE; } + PARAMETRIZE { level = 20; overQuarterHP = FALSE; } + PARAMETRIZE { level = 19; overQuarterHP = TRUE; } + PARAMETRIZE { level = 20; overQuarterHP = TRUE; } + + GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); + ASSUME(gSpeciesInfo[SPECIES_WISHIWASHI].baseHP == gSpeciesInfo[SPECIES_WISHIWASHI_SCHOOL].baseHP); + PLAYER(SPECIES_WISHIWASHI) + { + Level(level); + HP(GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / (overQuarterHP ? 2 : 4)); + Ability(ABILITY_SCHOOLING); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + if (level >= 20 && overQuarterHP) + { + ABILITY_POPUP(player, ABILITY_SCHOOLING); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } + MESSAGE("Wishiwashi used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + } THEN { + if (level >= 20 && overQuarterHP) + EXPECT_EQ(player->species, SPECIES_WISHIWASHI_SCHOOL); + else + EXPECT_EQ(player->species, SPECIES_WISHIWASHI); + } +} + +SINGLE_BATTLE_TEST("Schooling switches Level 20+ Wishiwashi's form when HP is healed above 25-percent") +{ + u16 level; + PARAMETRIZE { level = 19; } + PARAMETRIZE { level = 20; } + + GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); + ASSUME(gSpeciesInfo[SPECIES_WISHIWASHI].baseHP == gSpeciesInfo[SPECIES_WISHIWASHI_SCHOOL].baseHP); + PLAYER(SPECIES_WISHIWASHI) + { + Level(level); + HP(GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / 4); + Ability(ABILITY_SCHOOLING); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_HEAL_PULSE); } + } SCENE { + MESSAGE("Wishiwashi used Celebrate!"); + MESSAGE("Foe Wobbuffet used Heal Pulse!"); + HP_BAR(player); + if (level >= 20) + { + ABILITY_POPUP(player, ABILITY_SCHOOLING); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } + } THEN { + if (level >= 20) + EXPECT_EQ(player->species, SPECIES_WISHIWASHI_SCHOOL); + else + EXPECT_EQ(player->species, SPECIES_WISHIWASHI); + } +} diff --git a/test/ability_zen_mode.c b/test/ability_zen_mode.c new file mode 100644 index 0000000000..acf0ba291d --- /dev/null +++ b/test/ability_zen_mode.c @@ -0,0 +1,93 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is half or less at the end of the turn") +{ + u16 standardSpecies, zenSpecies; + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE; } + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN_GALARIAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE_GALARIAN; } + + GIVEN { + ASSUME(P_GEN_5_POKEMON == TRUE); + ASSUME(gSpeciesInfo[standardSpecies].baseHP == 105); + ASSUME(gSpeciesInfo[zenSpecies].baseHP == 105); + PLAYER(standardSpecies) + { + Ability(ABILITY_ZEN_MODE); + HP((GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / 2) + 1); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Darmanitan used Celebrate!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + HP_BAR(player); + ABILITY_POPUP(player, ABILITY_ZEN_MODE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } THEN { + ASSUME(player->hp <= player->maxHP / 2); + EXPECT_EQ(player->species, zenSpecies); + } +} + +SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is half or less before the first turn") +{ + u16 standardSpecies, zenSpecies; + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE; } + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN_GALARIAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE_GALARIAN; } + + GIVEN { + ASSUME(P_GEN_5_POKEMON == TRUE); + ASSUME(gSpeciesInfo[standardSpecies].baseHP == 105); + ASSUME(gSpeciesInfo[zenSpecies].baseHP == 105); + PLAYER(standardSpecies) + { + Ability(ABILITY_ZEN_MODE); + HP(GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / 2); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_ZEN_MODE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Darmanitan used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + } THEN { + EXPECT_LE(player->hp, player->maxHP / 2); + EXPECT_EQ(player->species, zenSpecies); + } +} + +SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is healed above half") +{ + u16 standardSpecies, zenSpecies; + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE; } + PARAMETRIZE { standardSpecies = SPECIES_DARMANITAN_GALARIAN; zenSpecies = SPECIES_DARMANITAN_ZEN_MODE_GALARIAN; } + + GIVEN { + ASSUME(P_GEN_5_POKEMON == TRUE); + ASSUME(gSpeciesInfo[standardSpecies].baseHP == 105); + ASSUME(gSpeciesInfo[zenSpecies].baseHP == 105); + PLAYER(standardSpecies) + { + Ability(ABILITY_ZEN_MODE); + HP(GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP) / 2); + }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_HEAL_PULSE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_ZEN_MODE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Darmanitan used Celebrate!"); + MESSAGE("Foe Wobbuffet used Heal Pulse!"); + HP_BAR(player); + ABILITY_POPUP(player, ABILITY_ZEN_MODE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } THEN { + EXPECT_GT(player->hp, player->maxHP / 2); + EXPECT_EQ(player->species, standardSpecies); + } +} diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 524525c132..e96a6ea7b3 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -938,6 +938,7 @@ void Level_(u32 sourceLine, u32 level) INVALID_IF(level == 0 || level > MAX_LEVEL, "Illegal level: %d", level); SetMonData(DATA.currentMon, MON_DATA_LEVEL, &level); SetMonData(DATA.currentMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]); + CalculateMonStats(DATA.currentMon); } void MaxHP_(u32 sourceLine, u32 maxHP) From fad11981a58ad3a5d2299533da0c29ec38a461e9 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 24 Mar 2023 11:03:34 -0300 Subject: [PATCH 045/229] Tests for form change on switch out and fainting --- test/ability_zen_mode.c | 10 +++++----- test/form_change.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/test/ability_zen_mode.c b/test/ability_zen_mode.c index acf0ba291d..f18f6d6595 100644 --- a/test/ability_zen_mode.c +++ b/test/ability_zen_mode.c @@ -20,11 +20,11 @@ SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is half or less } WHEN { TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_TACKLE); } } SCENE { - MESSAGE("Darmanitan used Celebrate!"); - MESSAGE("Foe Wobbuffet used Tackle!"); - HP_BAR(player); - ABILITY_POPUP(player, ABILITY_ZEN_MODE); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Darmanitan used Celebrate!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + HP_BAR(player); + ABILITY_POPUP(player, ABILITY_ZEN_MODE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); } THEN { ASSUME(player->hp <= player->maxHP / 2); EXPECT_EQ(player->species, zenSpecies); diff --git a/test/form_change.c b/test/form_change.c index 8d761bb12d..74ba2b75f7 100644 --- a/test/form_change.c +++ b/test/form_change.c @@ -79,3 +79,41 @@ SINGLE_BATTLE_TEST("Zamazenta's Iron Head becomes Behemoth Bash upon form change EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH); } } + +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon switching out") +{ + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_AEGISLASH); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); } + TURN { SWITCH(player, 1); } + TURN { SWITCH(player, 0); } + } SCENE { + ABILITY_POPUP(player, ABILITY_STANCE_CHANGE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Aegislash used Tackle!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + } THEN { + EXPECT_EQ(player->species, SPECIES_AEGISLASH); + } +} + +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting") +{ + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_AEGISLASH) { HP(1); }; + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_GUST); SEND_OUT(player, 1);} + } SCENE { + MESSAGE("Foe Wobbuffet used Gust!"); + MESSAGE("Aegislash fainted!"); + } THEN { + EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH); + } +} From 2017bee3f8efc1c0d37175cf913bf8a593519b97 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 27 Mar 2023 11:35:23 -0700 Subject: [PATCH 046/229] fixed Castform + Cherrim --- data/battle_scripts_1.s | 60 ++++++------------- include/battle_scripts.h | 3 - include/config/battle.h | 1 + include/constants/battle.h | 1 + include/constants/battle_script_commands.h | 7 +-- include/constants/form_change_types.h | 6 +- src/battle_script_commands.c | 36 +++-------- src/battle_util.c | 26 ++++++-- src/data/pokemon/form_change_table_pointers.h | 4 ++ src/data/pokemon/form_change_tables.h | 22 +++++++ 10 files changed, 82 insertions(+), 84 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index b8740cb6b4..e07ecdb728 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -5156,7 +5156,7 @@ BattleScript_MoveWeatherChange:: waitanimation printfromtable gMoveWeatherChangeStringIds waitmessage B_WAIT_TIME_LONG - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities goto BattleScript_MoveEnd BattleScript_EffectSunnyDay:: @@ -6860,7 +6860,7 @@ BattleScript_OverworldWeatherStarts:: printfromtable gWeatherStartsStringIds waitmessage B_WAIT_TIME_LONG playanimation_var BS_ATTACKER, sB_ANIM_ARG1 - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_OverworldTerrain:: @@ -8413,7 +8413,7 @@ BattleScript_DrizzleActivates:: printstring STRINGID_PKMNMADEITRAIN waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_AbilityRaisesDefenderStat:: @@ -8575,7 +8575,7 @@ BattleScript_SandstreamActivates:: printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_SandSpitActivates:: @@ -8584,7 +8584,7 @@ BattleScript_SandSpitActivates:: printstring STRINGID_ASANDSTORMKICKEDUP waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities return BattleScript_ShedSkinActivates:: @@ -8594,37 +8594,15 @@ BattleScript_ShedSkinActivates:: updatestatusicon BS_ATTACKER end3 -BattleScript_WeatherFormChanges:: - setbyte sBATTLER, 0 -BattleScript_WeatherFormChangesLoop:: - tryweatherformdatachange - activateweatherchangeabilities BS_SCRIPTING - addbyte sBATTLER, 1 - jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop - return - -BattleScript_WeatherFormChange:: - call BattleScript_DoWeatherFormChange - end3 - -BattleScript_DoWeatherFormChange:: - copybyte gBattlerAbility, sBATTLER -.if B_WEATHER_FORMS >= GEN_5 - jumpifspecies BS_SCRIPTING, SPECIES_CASTFORM, BattleScript_DoWeatherFormChange_ForecastCheck -BattleScript_DoWeatherFormChange_FlowerGiftCheck: - jumpifability BS_SCRIPTING, ABILITY_FLOWER_GIFT, BattleScript_DoWeatherFormChange_PopUp - goto BattleScript_DoWeatherFormChange_AfterPopUp -.endif -BattleScript_DoWeatherFormChange_ForecastCheck: - jumpifability BS_SCRIPTING, ABILITY_FORECAST, BattleScript_DoWeatherFormChange_PopUp - goto BattleScript_DoWeatherFormChange_AfterPopUp -BattleScript_DoWeatherFormChange_PopUp: - call BattleScript_AbilityPopUp -BattleScript_DoWeatherFormChange_AfterPopUp: - doweatherformchangeanimation - waitstate - printstring STRINGID_PKMNTRANSFORMED - waitmessage B_WAIT_TIME_LONG +BattleScript_ActivateWeatherAbilities: + copybyte sBATTLER, gBattlerAttacker + setbyte gBattlerAttacker, 0 +BattleScript_ActivateWeatherAbilities_Loop: + activateweatherchangeabilities BS_ATTACKER +BattleScript_ActivateWeatherAbilities_Increment: + addbyte gBattlerAttacker, 1 + jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop + copybyte gBattlerAttacker, sBATTLER return BattleScript_TryAdrenalineOrb: @@ -8719,7 +8697,7 @@ BattleScript_DroughtActivates:: printstring STRINGID_PKMNSXINTENSIFIEDSUN waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandActivates:: @@ -8728,7 +8706,7 @@ BattleScript_DesolateLandActivates:: printstring STRINGID_EXTREMELYHARSHSUNLIGHT waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandEvaporatesWaterTypeMoves:: @@ -8748,7 +8726,7 @@ BattleScript_PrimordialSeaActivates:: printstring STRINGID_HEAVYRAIN waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves:: @@ -8825,7 +8803,7 @@ BattleScript_SnowWarningActivates:: printstring STRINGID_SNOWWARNINGHAIL waitstate playanimation BS_BATTLER_0, B_ANIM_HAIL_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_TerrainSeedLoop: @@ -10002,7 +9980,7 @@ BattleScript_AnnounceAirLockCloudNine:: call BattleScript_AbilityPopUp printstring STRINGID_AIRLOCKACTIVATES waitmessage B_WAIT_TIME_LONG - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_QuickClawActivation:: diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c78fcafe48..b6a2844885 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -149,9 +149,6 @@ extern const u8 BattleScript_TraceActivatesEnd3[]; extern const u8 BattleScript_RainDishActivates[]; extern const u8 BattleScript_SandstreamActivates[]; extern const u8 BattleScript_ShedSkinActivates[]; -extern const u8 BattleScript_WeatherFormChanges[]; -extern const u8 BattleScript_WeatherFormChangesLoop[]; -extern const u8 BattleScript_WeatherFormChange[]; extern const u8 BattleScript_IntimidateActivates[]; extern const u8 BattleScript_DroughtActivates[]; extern const u8 BattleScript_TookAttack[]; diff --git a/include/config/battle.h b/include/config/battle.h index 4a3d6382fb..173f57ac3d 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -99,6 +99,7 @@ // Additionally, in gen8+ the Healing Wish's effect will be stored until the user switches into a statused or hurt mon. #define B_DEFOG_CLEARS_TERRAIN GEN_LATEST // In Gen8+, Defog also clears active Terrain. #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp.Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. +#define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. diff --git a/include/constants/battle.h b/include/constants/battle.h index 61c3776c6c..5d5dca20a2 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -269,6 +269,7 @@ #define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) // Battle Weather flags +#define B_WEATHER_NONE 0 #define B_WEATHER_RAIN_TEMPORARY (1 << 0) #define B_WEATHER_RAIN_DOWNPOUR (1 << 1) // unused #define B_WEATHER_RAIN_PERMANENT (1 << 2) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 26064bcfb1..b8a6890988 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -332,10 +332,9 @@ #define MOVEEND_PICKPOCKET 30 #define MOVEEND_DANCER 31 #define MOVEEND_EMERGENCY_EXIT 32 -#define MOVEEND_WEATHER_FORM 33 -#define MOVEEND_SYMBIOSIS 34 -#define MOVEEND_CLEAR_BITS 35 -#define MOVEEND_COUNT 36 +#define MOVEEND_SYMBIOSIS 33 +#define MOVEEND_CLEAR_BITS 34 +#define MOVEEND_COUNT 35 // switch cases #define B_SWITCH_NORMAL 0 diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index 4e60904aa6..651bcf7888 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -87,8 +87,12 @@ // param1: item to hold. #define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13 +// Form change that activates when a specific weather is set during battle. +// param1: weather to check +#define FORM_CHANGE_BATTLE_WEATHER 14 + // Form change that activates automatically when the turn ends. // param1: ability to check. -#define FORM_CHANGE_BATTLE_TURN_END 14 +#define FORM_CHANGE_BATTLE_TURN_END 15 #endif // GUARD_CONSTANTS_FORM_CHANGE_TYPES_H diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 51d71e3474..c1df49b4a8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6216,28 +6216,6 @@ static void Cmd_moveend(void) } gBattleScripting.moveendState++; break; - case MOVEEND_WEATHER_FORM: - for (i = 0; i < MAX_BATTLERS_COUNT; i++) - { - switch (gBattleMons[i].species) - { - case SPECIES_CASTFORM: - case SPECIES_CASTFORM_RAINY: - case SPECIES_CASTFORM_SNOWY: - case SPECIES_CASTFORM_SUNNY: - case SPECIES_CHERRIM: - case SPECIES_CHERRIM_SUNSHINE: - effect = TryWeatherFormChange(i); - if (effect) - { - BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - gBattleScripting.battler = i; - gBattleStruct->formToChangeInto = effect - 1; - } - } - } - gBattleScripting.moveendState++; - break; case MOVEEND_SYMBIOSIS: for (i = 0; i < gBattlersCount; i++) { @@ -15080,13 +15058,13 @@ static void Cmd_tryweatherformdatachange(void) u8 form; - gBattlescriptCurrInstr = cmd->nextInstr; - form = TryWeatherFormChange(gBattleScripting.battler); - if (form) - { - BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - *(&gBattleStruct->formToChangeInto) = form - 1; - } + // gBattlescriptCurrInstr = cmd->nextInstr; + // form = TryWeatherFormChange(gBattleScripting.battler); + // if (form) + // { + // BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); + // *(&gBattleStruct->formToChangeInto) = form - 1; + // } } // Water and Mud Sport diff --git a/src/battle_util.c b/src/battle_util.c index c6a59acf5b..3f85d298a0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2564,7 +2564,15 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_WEATHER_FORM: - AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, 0, 0, 0, 0); + for (i = 0; i < gBattlersCount; ++i) + { + // This breaks Eiscue right now, because Eiscue doesn't use FORM_CHANGE_BATTLE_WEATHER. + if(TryBattleFormChange(i, FORM_CHANGE_BATTLE_WEATHER)) + { + BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); + effect++; + } + } gBattleStruct->turnCountersTracker++; break; case ENDTURN_STATUS_HEAL: @@ -6155,11 +6163,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move #else TRY_WEATHER_FORM: #endif - effect = TryWeatherFormChange(battler); - if (effect != 0) + if (IsBattlerWeatherAffected(battler, gBattleWeather) + && TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER)) { - BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - *(&gBattleStruct->formToChangeInto) = effect - 1; + BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); + effect++; } break; case ABILITY_ICE_FACE: @@ -10153,6 +10161,11 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) } } break; + case FORM_CHANGE_BATTLE_WEATHER: + if (gBattleWeather & formChanges[i].param1 + || (gBattleWeather == B_WEATHER_NONE && formChanges[i].param1 == B_WEATHER_NONE)) + targetSpecies = formChanges[i].targetSpecies; + break; case FORM_CHANGE_BATTLE_TURN_END: if (formChanges[i].param1 == GetBattlerAbility(battlerId)) targetSpecies = formChanges[i].targetSpecies; @@ -10168,7 +10181,8 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) bool32 CanBattlerFormChange(u8 battlerId, u16 method) { // Can't change form if transformed. - if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + if (gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED + && B_TRANSFORM_FORM_CHANGES >= GEN_5) return FALSE; // Mega Evolved Pokémon should always revert to normal upon fainting or ending the battle. if (IsBattlerMegaEvolved(battlerId) && (method == FORM_CHANGE_FAINT || method == FORM_CHANGE_END_BATTLE)) diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 83f68d70c0..daeaa9cbbe 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -64,6 +64,10 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ALTARIA_MEGA] = sAltariaFormChangeTable, [SPECIES_ABSOL] = sAbsolFormChangeTable, [SPECIES_ABSOL_MEGA] = sAbsolFormChangeTable, + [SPECIES_CASTFORM] = sCastformFormChangeTable, + [SPECIES_CASTFORM_SUNNY] = sCastformFormChangeTable, + [SPECIES_CASTFORM_RAINY] = sCastformFormChangeTable, + [SPECIES_CASTFORM_SNOWY] = sCastformFormChangeTable, [SPECIES_BANETTE] = sBanetteFormChangeTable, [SPECIES_BANETTE_MEGA] = sBanetteFormChangeTable, [SPECIES_AGGRON] = sAggronFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index afe54f6322..c4ade7b9a8 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -155,6 +155,18 @@ static const struct FormChange sAbsolFormChangeTable[] = { {FORM_CHANGE_TERMINATOR}, }; +static const struct FormChange sCastformFormChangeTable[] = { + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, ~(B_WEATHER_SUN | B_WEATHER_RAIN | B_WEATHER_HAIL)}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, B_WEATHER_NONE}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CASTFORM}, + {FORM_CHANGE_FAINT, SPECIES_CASTFORM}, + {FORM_CHANGE_END_BATTLE, SPECIES_CASTFORM}, + {FORM_CHANGE_TERMINATOR}, +}; + static const struct FormChange sBanetteFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_BANETTE_MEGA, ITEM_BANETTITE}, {FORM_CHANGE_TERMINATOR}, @@ -218,6 +230,16 @@ static const struct FormChange sBurmyFormChangeTable[] = { {FORM_CHANGE_TERMINATOR}, }; +static const struct FormChange sCherrimFormChangeTable[] = { + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE}, + {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CHERRIM}, + {FORM_CHANGE_FAINT, SPECIES_CHERRIM}, + {FORM_CHANGE_END_BATTLE, SPECIES_CHERRIM}, + {FORM_CHANGE_TERMINATOR}, +}; + static const struct FormChange sLopunnyFormChangeTable[] = { {FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM, SPECIES_LOPUNNY_MEGA, ITEM_LOPUNNITE}, {FORM_CHANGE_TERMINATOR}, From b856cb3e624652e5fb4b75d598359c84cd3f5764 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Mon, 27 Mar 2023 12:05:06 -0700 Subject: [PATCH 047/229] fixed Eiscue + multiple weather form changes at once (probably) --- src/battle_util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 3f85d298a0..9e85f3ce39 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2566,14 +2566,14 @@ u8 DoFieldEndTurnEffects(void) case ENDTURN_WEATHER_FORM: for (i = 0; i < gBattlersCount; ++i) { - // This breaks Eiscue right now, because Eiscue doesn't use FORM_CHANGE_BATTLE_WEATHER. - if(TryBattleFormChange(i, FORM_CHANGE_BATTLE_WEATHER)) + if (AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, i, 0, 0, 0)) { - BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); effect++; + break; } } - gBattleStruct->turnCountersTracker++; + if (effect == 0) + gBattleStruct->turnCountersTracker++; break; case ENDTURN_STATUS_HEAL: for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) @@ -6163,7 +6163,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move #else TRY_WEATHER_FORM: #endif - if (IsBattlerWeatherAffected(battler, gBattleWeather) + if ((IsBattlerWeatherAffected(battler, gBattleWeather) || gBattleWeather == B_WEATHER_NONE) && TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER)) { BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); From bdb5cfe8b21a00f1be459e1c537282022be3c3e8 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 27 Mar 2023 16:47:15 -0300 Subject: [PATCH 048/229] Version 1.4.2 (#2847) Co-authored-by: DizzyEggg Co-authored-by: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> Fix wrong Contrary message when affected by Intimidate (#2723) Fixes certain moves preventing Z status moves. (#2791) Fixes the check for speed on electrify (#2819) Fixed score for Work up and Growth (#2813) Fixed Wring Out's power (#2824) Fixes #2823 --- data/battle_scripts_1.s | 47 ++++++------- data/scripts/debug.inc | 2 +- src/battle_ai_main.c | 11 ++-- src/battle_ai_util.c | 7 +- src/battle_bg.c | 2 +- src/battle_util.c | 44 +++++++------ src/data/battle_moves.h | 4 +- test/ability_contrary.c | 143 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 207 insertions(+), 53 deletions(-) create mode 100644 test/ability_contrary.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ae92aba7cf..50a32158b8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -484,15 +484,13 @@ BattleScript_Teatimevul: moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimesorb: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimerod: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 1, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer @@ -504,8 +502,7 @@ BattleScript_Teatimerod: moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimemotor: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO setstatchanger STAT_SPEED, 1, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer @@ -3374,8 +3371,7 @@ BattleScript_EffectAbsorb:: setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB goto BattleScript_AbsorbUpdateHp BattleScript_AbsorbLiquidOoze:: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget manipulatedamage DMG_CHANGE_SIGN setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE BattleScript_AbsorbUpdateHp:: @@ -5479,9 +5475,8 @@ BattleScript_NotAffected:: goto BattleScript_MoveEnd BattleScript_NotAffectedAbilityPopUp:: - copybyte gBattlerAbility, gBattlerTarget pause B_WAIT_TIME_SHORT - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE resultmessage waitmessage B_WAIT_TIME_LONG @@ -5970,8 +5965,7 @@ BattleScript_EffectSkillSwap: attackanimation waitanimation .if B_ABILITY_POP_UP == TRUE - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget pause 20 copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp @@ -7726,9 +7720,8 @@ BattleScript_EnduredMsg:: return BattleScript_SturdiedMsg:: - copybyte gBattlerAbility, gBattlerTarget pause B_WAIT_TIME_SHORTEST - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_ENDUREDSTURDY waitmessage B_WAIT_TIME_LONG return @@ -7869,8 +7862,7 @@ BattleScript_CudChewActivates:: BattleScript_TargetFormChange:: pause 5 - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_EMPTYSTRING3 waitmessage 1 handleformchange BS_TARGET, 0 @@ -7882,8 +7874,7 @@ BattleScript_TargetFormChange:: BattleScript_TargetFormChangeWithString:: pause 5 - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_EMPTYSTRING3 waitmessage 1 handleformchange BS_TARGET, 0 @@ -8346,6 +8337,8 @@ BattleScript_AbilityRaisesDefenderStat:: waitmessage B_WAIT_TIME_LONG return +BattleScript_AbilityPopUpTarget: + copybyte gBattlerAbility, gBattlerTarget BattleScript_AbilityPopUp: .if B_ABILITY_POP_UP == TRUE showabilitypopup BS_ABILITY_BATTLER @@ -8586,8 +8579,10 @@ BattleScript_IntimidateEffect: copybyte sBATTLER, gBattlerAttacker statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateLoopIncrement setgraphicalstatchangevalues + jumpifability BS_TARGET, ABILITY_CONTRARY, BattleScript_IntimidateContrary playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNCUTSATTACKWITH +BattleScript_IntimidateEffect_WaitString: waitmessage B_WAIT_TIME_LONG copybyte sBATTLER, gBattlerTarget call BattleScript_TryAdrenalineOrb @@ -8599,6 +8594,16 @@ BattleScript_IntimidateEnd: pause B_WAIT_TIME_MED end3 +BattleScript_IntimidateContrary: + call BattleScript_AbilityPopUpTarget + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_IntimidateContrary_WontIncrease + playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + printfromtable gStatUpStringIds + goto BattleScript_IntimidateEffect_WaitString +BattleScript_IntimidateContrary_WontIncrease: + printstring STRINGID_TARGETSTATWONTGOHIGHER + goto BattleScript_IntimidateEffect_WaitString + BattleScript_IntimidatePrevented: call BattleScript_AbilityPopUp pause B_WAIT_TIME_LONG @@ -8612,8 +8617,7 @@ BattleScript_IntimidatePrevented_Item: BattleScript_IntimidateInReverse: copybyte sBATTLER, gBattlerTarget - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget pause B_WAIT_TIME_SHORT modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_IntimidateLoopIncrement, ANIM_ON call BattleScript_TryAdrenalineOrb @@ -8856,8 +8860,7 @@ BattleScript_SturdyPreventsOHKO:: BattleScript_DampStopsExplosion:: pause B_WAIT_TIME_SHORT - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_PKMNPREVENTSUSAGE pause B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 9463164ac2..164dc42e84 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -52,7 +52,7 @@ Debug_FlagsNotSetMessage:: Debug_FlagsNotSetMessage_Text: .string "Feature unavailable!\n" .string "Please define a usable flag in:\l" - .string "'include/constants/overworld{UNDERSCORE}config.h'!$" + .string "'include/config/overworld.h'!$" Debug_Script_1:: end diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index a626ef49a1..2646d669d5 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1117,10 +1117,9 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_GROWTH: case EFFECT_ATTACK_SPATK_UP: // work up - if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) + if ((!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) && !BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK)) + || (!HasDamagingMove(battlerAtk))) score -= 10; - else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) - score -= 8; break; case EFFECT_ROTOTILLER: if (isDoubleBattle) @@ -2447,7 +2446,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; case EFFECT_ELECTRIFY: - if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER + if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER //|| GetMoveTypeSpecial(battlerDef, predictedMove) == TYPE_ELECTRIC // Move will already be electric type || PartnerMoveIsSameAsAttacker(BATTLE_PARTNER(battlerAtk), battlerDef, move, AI_DATA->partnerMove)) score -= 10; @@ -2632,7 +2631,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION) { // this move can faint the target - if (!WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0) + if (WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0) score += 4; // we go first or we're using priority move else score += 2; @@ -4641,7 +4640,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; // Give target more weaknesses break; case EFFECT_ELECTRIFY: - if (predictedMove != MOVE_NONE && gBattleMoves[predictedMove].type == TYPE_NORMAL + if (predictedMove != MOVE_NONE && (AI_DATA->abilities[battlerAtk] == ABILITY_VOLT_ABSORB || AI_DATA->abilities[battlerAtk] == ABILITY_MOTOR_DRIVE || AI_DATA->abilities[battlerAtk] == ABILITY_LIGHTNING_ROD)) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 531a4aa6b7..22e88aac4c 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -744,6 +744,10 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, SetBattlerData(battlerDef); gBattleStruct->dynamicMoveType = 0; + + if (move == MOVE_NATURE_POWER) + move = GetNaturePowerMove(); + SetTypeBeforeUsingMove(move, battlerAtk); GET_MOVE_TYPE(move, moveType); @@ -802,6 +806,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, } else { + effectivenessMultiplier = CalcTypeEffectivenessMultiplier(move, moveType, battlerAtk, battlerDef, FALSE); dmg = 0; } @@ -1166,7 +1171,7 @@ s32 AI_GetAbility(u32 battlerId) // We've had ability overwritten by e.g. Worry Seed. It is not part of AI_PARTY in case of switching if (gBattleStruct->overwrittenAbilities[battlerId]) return gBattleStruct->overwrittenAbilities[battlerId]; - + // The AI knows its own ability. if (IsBattlerAIControlled(battlerId)) return knownAbility; diff --git a/src/battle_bg.c b/src/battle_bg.c index e56884b55d..0ed1eec2e7 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -185,7 +185,7 @@ static const struct WindowTemplate sStandardBattleWindowTemplates[] = .bg = 0, .tilemapLeft = 2, .tilemapTop = 55, - .width = 12, //for z move names + .width = 16, //for z move names .height = 2, .paletteNum = 5, .baseBlock = 0x0300, diff --git a/src/battle_util.c b/src/battle_util.c index 25ba83093c..3c4201f467 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1742,7 +1742,7 @@ u8 TrySetCantSelectMoveBattleScript(void) u32 holdEffect = GetBattlerHoldEffect(gActiveBattler, TRUE); u16 *choicedMove = &gBattleStruct->choicedMove[gActiveBattler]; - if (gDisableStructs[gActiveBattler].disabledMove == move && move != MOVE_NONE) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].disabledMove == move && move != MOVE_NONE) { gBattleScripting.battler = gActiveBattler; gCurrentMove = move; @@ -1758,7 +1758,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (move == gLastMoves[gActiveBattler] && move != MOVE_STRUGGLE && (gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && move == gLastMoves[gActiveBattler] && move != MOVE_STRUGGLE && (gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)) { CancelMultiTurnMoves(gActiveBattler); if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1773,7 +1773,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1788,7 +1788,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1803,7 +1803,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && GetImprisonedMovesCount(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1818,7 +1818,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsGravityPreventingMove(move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsGravityPreventingMove(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1833,7 +1833,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsHealBlockPreventingMove(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsHealBlockPreventingMove(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1848,7 +1848,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsBelchPreventingMove(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsBelchPreventingMove(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -3534,7 +3534,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_DISABLED: // disabled move - if (gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE) { gProtectStructs[gBattlerAttacker].usedDisabledMove = TRUE; gBattleScripting.battler = gBattlerAttacker; @@ -3546,7 +3546,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_HEAL_BLOCKED: - if (gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedHealBlockedMove = TRUE; gBattleScripting.battler = gBattlerAttacker; @@ -3570,7 +3570,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_TAUNTED: // taunt - if (gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedTauntedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3581,7 +3581,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_IMPRISONED: // imprisoned - if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedImprisonedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3745,7 +3745,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_THROAT_CHOP: - if (gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND) { gProtectStructs[gBattlerAttacker].usedThroatChopPreventedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -9837,7 +9837,17 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat && gBattleMons[battlerDef].type3 != gBattleMons[battlerDef].type1) MulByTypeEffectiveness(&modifier, move, moveType, battlerDef, gBattleMons[battlerDef].type3, battlerAtk, recordAbilities); - if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)) + if (gBattleMoves[move].split == SPLIT_STATUS && move != MOVE_THUNDER_WAVE) + { + modifier = UQ_4_12(1.0); + #if B_GLARE_GHOST <= GEN_3 + if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST)) + { + modifier = UQ_4_12(0.0); + } + #endif + } + else if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)) { modifier = UQ_4_12(0.0); if (recordAbilities && defAbility == ABILITY_LEVITATE) @@ -9855,12 +9865,6 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat modifier = UQ_4_12(0.0); } #endif -#if B_GLARE_GHOST >= GEN_4 - else if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST)) - { - modifier = UQ_4_12(1.0); - } -#endif // Thousand Arrows ignores type modifiers for flying mons if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index bf54142764..9fdf268d6f 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -4847,7 +4847,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_NATURE_POWER] = { .effect = EFFECT_NATURE_POWER, - .power = 0, + .power = 1, .type = TYPE_NORMAL, .accuracy = 0, .pp = 20, @@ -6843,7 +6843,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_WRING_OUT] = { .effect = EFFECT_WRING_OUT, - .power = 0, + .power = 1, .type = TYPE_NORMAL, .accuracy = 100, .pp = 5, diff --git a/test/ability_contrary.c b/test/ability_contrary.c new file mode 100644 index 0000000000..7fd902280b --- /dev/null +++ b/test/ability_contrary.c @@ -0,0 +1,143 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); +} + +SINGLE_BATTLE_TEST("Contrary raises Attack when Intimidated", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + PLAYER(SPECIES_MIGHTYENA) { Ability(ABILITY_INTIMIDATE); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_INTIMIDATE); + if (ability == ABILITY_CONTRARY) { + ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's attack rose!"); + } + HP_BAR(player, captureDamage: &results[i].damage); + } + FINALLY { + EXPECT_MUL_EQ(results[1].damage, Q_4_12(2.125), results[0].damage); + } +} + +SINGLE_BATTLE_TEST("Contrary raises stats after using a move which would normally lower them: Overheat", s16 damageBefore, s16 damageAfter) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_OVERHEAT].effect == EFFECT_OVERHEAT); + ASSUME(gBattleMoves[MOVE_OVERHEAT].split == SPLIT_SPECIAL); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_SPINDA) { Ability(ability); } + } WHEN { + TURN { MOVE(opponent, MOVE_OVERHEAT); } + TURN { MOVE(opponent, MOVE_OVERHEAT); } + } SCENE { + MESSAGE("Foe Spinda used Overheat!"); + HP_BAR(player, captureDamage: &results[i].damageBefore); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's sp. attack sharply rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's sp. attack harshly fell!"); + } + + // MESSAGE("Foe Spinda used Overheat!"); + HP_BAR(player, captureDamage: &results[i].damageAfter); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's sp. attack sharply rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's sp. attack harshly fell!"); + } + } + FINALLY { + EXPECT_MUL_EQ(results[0].damageBefore, Q_4_12(2.0), results[0].damageAfter); + EXPECT_MUL_EQ(results[1].damageBefore, Q_4_12(0.5), results[1].damageAfter); + } +} + +SINGLE_BATTLE_TEST("Contrary lowers a stat after using a move which would normally raise it: Swords Dance", s16 damageBefore, s16 damageAfter) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SWORDS_DANCE].effect == EFFECT_ATTACK_UP_2); + PLAYER(SPECIES_WOBBUFFET) {Defense(102); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); Attack(100); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + TURN { MOVE(opponent, MOVE_SWORDS_DANCE); } + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damageBefore); + + //MESSAGE("Foe Spinda used Swords Dance!"); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's attack harshly fell!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's attack sharply rose!"); + } + + // MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damageAfter); + } + FINALLY { + EXPECT_MUL_EQ(results[0].damageBefore, Q_4_12(0.5), results[0].damageAfter); + EXPECT_MUL_EQ(results[1].damageBefore, Q_4_12(2.0), results[1].damageAfter); + } +} + +SINGLE_BATTLE_TEST("Contrary raises a stat after using a move which would normally lower it: Growl", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); Speed(2); } + } WHEN { + TURN { MOVE(player, MOVE_GROWL); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Wobbuffet used Growl!"); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's attack rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's attack fell!"); + } + + MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damage); + } + FINALLY { + EXPECT_MUL_EQ(results[1].damage, Q_4_12(2.125), results[0].damage); + } +} From afc4b4cdee2d5596a6262084bd795281f887d7b9 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 28 Mar 2023 15:07:37 -0400 Subject: [PATCH 049/229] add mirror herb --- data/battle_scripts_1.s | 29 ++++++++++++++++++++++----- include/battle.h | 1 + include/battle_scripts.h | 2 ++ include/constants/battle_string_ids.h | 3 ++- src/battle_message.c | 2 ++ src/battle_script_commands.c | 14 +++++++++++++ src/battle_util.c | 26 ++++++++++++++++++++++++ 7 files changed, 71 insertions(+), 6 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 200a044610..c8bd537358 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9980,23 +9980,42 @@ BattleScript_PrintPlayerForfeitedLinkBattle:: end2 BattleScript_TotemFlaredToLife:: - playanimation BS_ATTACKER, B_ANIM_TOTEM_FLARE + playanimation BS_ATTACKER, B_ANIM_TOTEM_FLARE, NULL printstring STRINGID_AURAFLAREDTOLIFE waitmessage B_WAIT_TIME_LONG - goto BattleScript_ApplyTotemVarBoost + call BattleScript_ApplyTotemVarBoost + end2 + +@ remove the mirror herb, do totem loop +BattleScript_MirrorHerbCopyStatChangeEnd2:: + call BattleScript_MirrorHerbCopyStatChange + end2 + +BattleScript_MirrorHerbCopyStatChange:: + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + printstring STRINGID_MIRRORHERBCOPIED + waitmessage B_WAIT_TIME_LONG + removeitem BS_SCRIPTING + call BattleScript_TotemVar_Ret + copybyte gBattlerAttacker, sSAVED_BATTLER @ restore the original attacker just to be safe + return BattleScript_TotemVar:: + call BattleScript_TotemVar_Ret + end2 + +BattleScript_TotemVar_Ret:: gettotemboost BattleScript_ApplyTotemVarBoost BattleScript_TotemVarEnd: - end2 + return BattleScript_ApplyTotemVarBoost: statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TotemVarEnd setgraphicalstatchangevalues playanimation BS_SCRIPTING, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 -BattleScript_TotemVarPrintStatMsg: printfromtable gStatUpStringIds waitmessage B_WAIT_TIME_LONG - goto BattleScript_TotemVar @loop until stats bitfield is empty + goto BattleScript_TotemVar_Ret @loop until stats bitfield is empty + BattleScript_AnnounceAirLockCloudNine:: call BattleScript_AbilityPopUp diff --git a/include/battle.h b/include/battle.h index 491273b80b..f1818d583c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -145,6 +145,7 @@ struct ProtectStruct u16 quash:1; u16 shellTrap:1; u16 silkTrapped:1; + u16 eatMirrorHerb:1; u32 physicalDmg; u32 specialDmg; u8 physicalBattlerId; diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c78fcafe48..248f281196 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -1,6 +1,8 @@ #ifndef GUARD_BATTLE_SCRIPTS_H #define GUARD_BATTLE_SCRIPTS_H +extern const u8 BattleScript_MirrorHerbCopyStatChange[]; +extern const u8 BattleScript_MirrorHerbCopyStatChangeEnd2[]; extern const u8 BattleScript_NotAffected[]; extern const u8 BattleScript_HitFromCritCalc[]; extern const u8 BattleScript_MoveEnd[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index b941763340..4051a3a6d1 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -647,8 +647,9 @@ #define STRINGID_STEALTHROCKDISAPPEAREDFROMTEAM 645 #define STRINGID_COULDNTFULLYPROTECT 646 #define STRINGID_STOCKPILEDEFFECTWOREOFF 647 +#define STRINGID_MIRRORHERBCOPIED 648 -#define BATTLESTRINGS_COUNT 648 +#define BATTLESTRINGS_COUNT 649 // 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 2ecfac0c7d..9ab40cd4e9 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -782,9 +782,11 @@ static const u8 sText_PrepareShellTrap[] = _("{B_ATK_NAME_WITH_PREFIX} set a she static const u8 sText_ShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell trap didn't work!"); static const u8 sText_CouldntFullyProtect[] = _("{B_DEF_NAME_WITH_PREFIX} couldn't fully protect\nitself and got hurt!"); static const u8 sText_StockpiledEffectWoreOff[] = _("{B_ATK_NAME_WITH_PREFIX}'s stockpiled\neffect wore off!"); +static const u8 sText_MirrorHerbCopied[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s used its {B_LAST_ITEM}\nto mirror its opponent's stat changes!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_MIRRORHERBCOPIED - BATTLESTRINGS_TABLE_START] = sText_MirrorHerbCopied, [STRINGID_STOCKPILEDEFFECTWOREOFF - BATTLESTRINGS_TABLE_START] = sText_StockpiledEffectWoreOff, [STRINGID_COULDNTFULLYPROTECT - BATTLESTRINGS_TABLE_START] = sText_CouldntFullyProtect, [STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN - BATTLESTRINGS_TABLE_START] = sText_AttackerGainedStrengthFromTheFallen, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 28bf60c39b..72a332af98 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12080,6 +12080,20 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr { gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); gProtectStructs[gActiveBattler].statRaised = TRUE; + + // check mirror herb + for (index = 0; index < gBattlersCount; index++) + { + if (GetBattlerSide(index) == GetBattlerSide(gActiveBattler)) + continue; // Only triggers on opposing side + if (GetBattlerHoldEffect(index, TRUE) == HOLD_EFFECT_MIRROR_HERB + && gBattleMons[index].statStages[statId] < MAX_STAT_STAGE) + { + gProtectStructs[index].eatMirrorHerb = 1; + gTotemBoosts[index].stats |= (1 << (statId - 1)); // -1 to start at atk + gTotemBoosts[index].statChanges[statId - 1] = statValue; + } + } } } diff --git a/src/battle_util.c b/src/battle_util.c index dea28b5d83..e92ccfdbdc 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6877,6 +6877,26 @@ static bool32 GetMentalHerbEffect(u8 battlerId) return ret; } +static u8 TryConsumeMirrorHerb(u8 battlerId, bool32 execute) +{ + u8 effect = 0; + + if (gProtectStructs[battlerId].eatMirrorHerb) { + gLastUsedItem = gBattleMons[battlerId].item; + gBattleScripting.savedBattler = gBattlerAttacker; + gBattleScripting.battler = gBattlerAttacker = battlerId; + gProtectStructs[battlerId].eatMirrorHerb = 0; + if (execute) { + BattleScriptExecute(BattleScript_MirrorHerbCopyStatChangeEnd2); + } else { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_MirrorHerbCopyStatChange; + } + effect = ITEM_STATS_CHANGE; + } + return effect; +} + static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) { u8 effect = 0; @@ -7058,6 +7078,9 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) effect = ITEM_EFFECT_OTHER; } break; + case HOLD_EFFECT_MIRROR_HERB: + effect = TryConsumeMirrorHerb(battlerId, FALSE); + break; } return effect; @@ -7580,6 +7603,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (!moveTurn) effect = TrySetMicleBerry(battlerId, gLastUsedItem, TRUE); break; + case HOLD_EFFECT_MIRROR_HERB: + effect = TryConsumeMirrorHerb(battlerId, TRUE); + break; } if (effect != 0) From f8bbcdfe73bafea1fa8db869e4fcdfe4c492c948 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 28 Mar 2023 15:12:54 -0400 Subject: [PATCH 050/229] minor fix to mirror herb message --- src/battle_message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_message.c b/src/battle_message.c index 9ab40cd4e9..140b8b3c47 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -782,7 +782,7 @@ static const u8 sText_PrepareShellTrap[] = _("{B_ATK_NAME_WITH_PREFIX} set a she static const u8 sText_ShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell trap didn't work!"); static const u8 sText_CouldntFullyProtect[] = _("{B_DEF_NAME_WITH_PREFIX} couldn't fully protect\nitself and got hurt!"); static const u8 sText_StockpiledEffectWoreOff[] = _("{B_ATK_NAME_WITH_PREFIX}'s stockpiled\neffect wore off!"); -static const u8 sText_MirrorHerbCopied[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s used its {B_LAST_ITEM}\nto mirror its opponent's stat changes!"); +static const u8 sText_MirrorHerbCopied[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} used its {B_LAST_ITEM}\nto mirror its opponent's stat changes!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { From 686d42709a6281c5baed0e5a6d8aad34b6b642a5 Mon Sep 17 00:00:00 2001 From: PSF Date: Tue, 28 Mar 2023 15:50:58 -0700 Subject: [PATCH 051/229] Added documentation on resetting battle flags and vars Added Overworld_ResetBattleFlagsAndVars to Overworld_ResetStateAfterWhiteOut --- include/config/battle.h | 2 ++ src/overworld.c | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index 4a3d6382fb..c6bca6de89 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -143,6 +143,7 @@ // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. // Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. +// Once these features are turned on within the game, they will remain on until they are explcitily turned off or until the player whites out. This can be turned off by disabling Overworld_ResetBattleFlagsAndVars. #define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water. #define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles. #define B_SMART_WILD_AI_FLAG 0 // If not 0, you can set this flag in a script to enable smart wild pokemon @@ -152,6 +153,7 @@ // Var Settings // To use the following features in scripting, replace the 0s with the var ID you're assigning it to. // Eg: Replace with VAR_UNUSED_0x40F7 so you can use VAR_TERRAIN for that feature. +// Once these features are turned on within the game, they will remain on until they are explcitily turned off or until the player whites out. This can be turned off by disabling Overworld_ResetBattleFlagsAndVars. #define VAR_TERRAIN 0 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active #define B_VAR_WILD_AI_FLAGS 0 // If not 0, you can use this var to add to default wild AI flags. NOT usable with flags above (1 << 15) diff --git a/src/overworld.c b/src/overworld.c index 6b63a60d5b..9fabe3ed90 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -401,6 +401,23 @@ void Overworld_ResetStateAfterDigEscRope(void) FlagClear(FLAG_SYS_USE_FLASH); } +void Overworld_ResetBattleFlagsAndVars(void) +{ +#if VAR_TERRAIN != 0 + VarSet(VAR_TERRAIN, 0); +#endif + +#if B_VAR_WILD_AI_FLAGS != 0 + VarSet(B_VAR_WILD_AI_FLAGS,0); +#endif + + FlagClear(B_FLAG_INVERSE_BATTLE); + FlagClear(B_FLAG_FORCE_DOUBLE_WILD); + FlagClear(B_SMART_WILD_AI_FLAG); + FlagClear(B_FLAG_NO_BAG_USE); + FlagClear(B_FLAG_NO_CATCHING); +} + static void Overworld_ResetStateAfterWhiteOut(void) { ResetInitialPlayerAvatarState(); @@ -409,9 +426,7 @@ static void Overworld_ResetStateAfterWhiteOut(void) FlagClear(FLAG_SYS_SAFARI_MODE); FlagClear(FLAG_SYS_USE_STRENGTH); FlagClear(FLAG_SYS_USE_FLASH); -#if VAR_TERRAIN != 0 - VarSet(VAR_TERRAIN, 0); -#endif + Overworld_ResetBattleFlagsAndVars(); // If you were defeated by Kyogre/Groudon and the step counter has // maxed out, end the abnormal weather. if (VarGet(VAR_SHOULD_END_ABNORMAL_WEATHER) == 1) From 24df9823e8f1c20e723b2b9b8b2ab01ee84db379 Mon Sep 17 00:00:00 2001 From: PSF Date: Thu, 30 Mar 2023 06:35:38 -0700 Subject: [PATCH 052/229] In response to PR discussion, added new preproc config for developers to toggle Overworld_ResetBattleFlagsAndVars --- include/config/battle.h | 5 +++-- src/overworld.c | 18 +++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index c6bca6de89..77e0e0f4d9 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -143,7 +143,6 @@ // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. // Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. -// Once these features are turned on within the game, they will remain on until they are explcitily turned off or until the player whites out. This can be turned off by disabling Overworld_ResetBattleFlagsAndVars. #define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water. #define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles. #define B_SMART_WILD_AI_FLAG 0 // If not 0, you can set this flag in a script to enable smart wild pokemon @@ -153,10 +152,12 @@ // Var Settings // To use the following features in scripting, replace the 0s with the var ID you're assigning it to. // Eg: Replace with VAR_UNUSED_0x40F7 so you can use VAR_TERRAIN for that feature. -// Once these features are turned on within the game, they will remain on until they are explcitily turned off or until the player whites out. This can be turned off by disabling Overworld_ResetBattleFlagsAndVars. #define VAR_TERRAIN 0 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active #define B_VAR_WILD_AI_FLAGS 0 // If not 0, you can use this var to add to default wild AI flags. NOT usable with flags above (1 << 15) +//Flag and Var settings +#define B_RESET_FLAGS_VARS_AFTER_WHITEOUT TRUE // If set to TRUE, Flag and Var settings (B_FLAG_INVERSE_BATTLE,B_FLAG_FORCE_DOUBLE_WILD,B_SMART_WILD_AI_FLAG,B_FLAG_NO_BAG_USE,B_FLAG_NO_CATCHING,B_VAR_WILD_AI_FLAGS, and VAR_TERRAIN) will be reset when the player whites out. + // Terrain settings #define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades. #define B_THUNDERSTORM_TERRAIN TRUE // If TRUE, overworld Thunderstorm generates Rain and Electric Terrain as in Gen 8. diff --git a/src/overworld.c b/src/overworld.c index 9fabe3ed90..3af1cfd6d8 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -401,15 +401,16 @@ void Overworld_ResetStateAfterDigEscRope(void) FlagClear(FLAG_SYS_USE_FLASH); } -void Overworld_ResetBattleFlagsAndVars(void) +#if B_RESET_FLAGS_VARS_AFTER_WHITEOUT == TRUE + void Overworld_ResetBattleFlagsAndVars(void) { -#if VAR_TERRAIN != 0 - VarSet(VAR_TERRAIN, 0); -#endif + #if VAR_TERRAIN != 0 + VarSet(VAR_TERRAIN, 0); + #endif -#if B_VAR_WILD_AI_FLAGS != 0 - VarSet(B_VAR_WILD_AI_FLAGS,0); -#endif + #if B_VAR_WILD_AI_FLAGS != 0 + VarSet(B_VAR_WILD_AI_FLAGS,0); + #endif FlagClear(B_FLAG_INVERSE_BATTLE); FlagClear(B_FLAG_FORCE_DOUBLE_WILD); @@ -417,6 +418,7 @@ void Overworld_ResetBattleFlagsAndVars(void) FlagClear(B_FLAG_NO_BAG_USE); FlagClear(B_FLAG_NO_CATCHING); } +#endif static void Overworld_ResetStateAfterWhiteOut(void) { @@ -426,7 +428,9 @@ static void Overworld_ResetStateAfterWhiteOut(void) FlagClear(FLAG_SYS_SAFARI_MODE); FlagClear(FLAG_SYS_USE_STRENGTH); FlagClear(FLAG_SYS_USE_FLASH); +#if B_RESET_FLAGS_VARS_AFTER_WHITEOUT == TRUE Overworld_ResetBattleFlagsAndVars(); +#endif // If you were defeated by Kyogre/Groudon and the step counter has // maxed out, end the abnormal weather. if (VarGet(VAR_SHOULD_END_ABNORMAL_WEATHER) == 1) From 59dfc7c3ad513ee2bc05b43e80eedf7dfccb43ee Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Fri, 7 Apr 2023 06:07:12 -0700 Subject: [PATCH 053/229] Update include/config/battle.h Took suggestions from https://github.com/rh-hideout/pokeemerald-expansion/pull/2875#discussion_r1160574308 Co-authored-by: LOuroboros --- include/config/battle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index 77e0e0f4d9..790ad78cca 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -155,8 +155,8 @@ #define VAR_TERRAIN 0 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active #define B_VAR_WILD_AI_FLAGS 0 // If not 0, you can use this var to add to default wild AI flags. NOT usable with flags above (1 << 15) -//Flag and Var settings -#define B_RESET_FLAGS_VARS_AFTER_WHITEOUT TRUE // If set to TRUE, Flag and Var settings (B_FLAG_INVERSE_BATTLE,B_FLAG_FORCE_DOUBLE_WILD,B_SMART_WILD_AI_FLAG,B_FLAG_NO_BAG_USE,B_FLAG_NO_CATCHING,B_VAR_WILD_AI_FLAGS, and VAR_TERRAIN) will be reset when the player whites out. +// Flag and Var settings +#define B_RESET_FLAGS_VARS_AFTER_WHITEOUT TRUE // If TRUE, Overworld_ResetBattleFlagsAndVars will reset battle-related Flags and Vars when the player whites out. // Terrain settings #define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades. From dacd0785db12a41df50a0b12989d58c54ae41f3b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 14 Apr 2023 15:17:19 -0400 Subject: [PATCH 054/229] Fixed Mega Evolution script name --- data/battle_scripts_1.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ebb23d2014..30a80bf193 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7872,7 +7872,7 @@ BattleScript_FocusPunchSetUp:: BattleScript_MegaEvolution:: printstring STRINGID_MEGAEVOREACTING -BattleScript_MegaEvolutionAfeterString: +BattleScript_MegaEvolutionAfterString: waitmessage B_WAIT_TIME_LONG setbyte gIsCriticalHit, 0 handlemegaevo BS_ATTACKER, 0 @@ -7886,7 +7886,7 @@ BattleScript_MegaEvolutionAfeterString: BattleScript_WishMegaEvolution:: printstring STRINGID_FERVENTWISHREACHED - goto BattleScript_MegaEvolutionAfeterString + goto BattleScript_MegaEvolutionAfterString BattleScript_PrimalReversion:: printstring STRINGID_EMPTYSTRING3 From 82dc1e3e93810f74f7abd377f76c2f4ceab70976 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sat, 15 Apr 2023 09:27:28 -0700 Subject: [PATCH 055/229] fixed dupe strings in battle item use --- data/battle_scripts_2.s | 12 ++++++------ src/item_use.c | 5 +++-- src/party_menu.c | 8 +------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index dee482d1d3..71d88ae84b 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -49,14 +49,13 @@ BattleScript_UseItemMessage: BattleScript_ItemRestoreHP:: call BattleScript_UseItemMessage itemrestorehp - printstring STRINGID_ITEMRESTOREDSPECIESHEALTH - waitmessage B_WAIT_TIME_LONG jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_ItemRestoreHP_SendOutRevivedBattler bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - updatestatusicon BS_ATTACKER + printstring STRINGID_ITEMRESTOREDSPECIESHEALTH + waitmessage B_WAIT_TIME_LONG end BattleScript_ItemRestoreHP_SendOutRevivedBattler: @@ -68,22 +67,22 @@ BattleScript_ItemRestoreHP_SendOutRevivedBattler: BattleScript_ItemCureStatus:: call BattleScript_UseItemMessage itemcurestatus + updatestatusicon BS_ATTACKER printstring STRINGID_ITEMCUREDSPECIESSTATUS waitmessage B_WAIT_TIME_LONG - updatestatusicon BS_ATTACKER end BattleScript_ItemHealAndCureStatus:: call BattleScript_UseItemMessage itemrestorehp curestatus BS_ATTACKER - printstring STRINGID_ITEMRESTOREDSPECIESHEALTH - waitmessage B_WAIT_TIME_LONG bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER updatestatusicon BS_ATTACKER + printstring STRINGID_ITEMRESTOREDSPECIESHEALTH + waitmessage B_WAIT_TIME_LONG end BattleScript_ItemIncreaseStat:: @@ -256,3 +255,4 @@ BattleScript_TrainerBSlideMsgRet:: BattleScript_TrainerBSlideMsgEnd2:: call BattleScript_TrainerBSlideMsgRet end2 + end2 diff --git a/src/item_use.c b/src/item_use.c index 8bcadfb2eb..26b48ac80b 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -1229,10 +1229,11 @@ void ItemUseInBattle_BagMenu(u8 taskId) { PlaySE(SE_SELECT); RemoveUsedItem(); + ScheduleBgCopyTilemapToVram(2); if (!InBattlePyramid()) - DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, Task_FadeAndCloseBagMenu); + gTasks[taskId].func = Task_FadeAndCloseBagMenu; else - DisplayItemMessageInBattlePyramid(taskId, gStringVar4, CloseBattlePyramidBag); + gTasks[taskId].func = CloseBattlePyramidBag; } } diff --git a/src/party_menu.c b/src/party_menu.c index dd46b10634..95d64e5463 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4470,11 +4470,8 @@ void ItemUseCB_BattleScript(u8 taskId, TaskFunc task) gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId); gPartyMenuUseExitCallback = TRUE; PlaySE(SE_SELECT); - CopyItemName(gSpecialVar_ItemId, gStringVar2); - StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2); - DisplayPartyMenuMessage(gStringVar4, TRUE); - ScheduleBgCopyTilemapToVram(2); RemoveBagItem(gSpecialVar_ItemId, 1); + ScheduleBgCopyTilemapToVram(2); gTasks[taskId].func = task; } } @@ -4943,9 +4940,6 @@ static void TryUseItemOnMove(u8 taskId) gChosenMovePos = ptr->data1; gPartyMenuUseExitCallback = TRUE; RemoveBagItem(gSpecialVar_ItemId, 1); - CopyItemName(gSpecialVar_ItemId, gStringVar2); - StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2); - DisplayPartyMenuMessage(gStringVar4, TRUE); ScheduleBgCopyTilemapToVram(2); gTasks[taskId].func = Task_ClosePartyMenuAfterText; } From aefe5825964e5cd4d10dae3bad63a4bf5a33b4b2 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Sat, 15 Apr 2023 00:52:14 +0100 Subject: [PATCH 056/229] GetSideParty/GetBattlerParty Inline GetBattlerPartyData into its callers because its name is confusing and we couldn't think of a better one. This seems to fix a bug in one place where GetBattlerPartyData was being used as if it had GetBattlerParty semantics. --- include/battle.h | 11 ++++++++ include/battle_util.h | 1 - src/battle_ai_util.c | 2 +- src/battle_anim_new.c | 3 -- src/battle_main.c | 7 +++-- src/battle_script_commands.c | 53 +++++++++------------------------- src/battle_util.c | 55 ++++++++---------------------------- 7 files changed, 42 insertions(+), 90 deletions(-) diff --git a/include/battle.h b/include/battle.h index 46975bec3c..afa02a8f21 100644 --- a/include/battle.h +++ b/include/battle.h @@ -719,6 +719,17 @@ struct BattleStruct #define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + ((stage) << 3) + (goesDown << 7)) #define SET_STATCHANGER2(dst, statId, stage, goesDown)(dst = (statId) + ((stage) << 3) + (goesDown << 7)) +static inline struct Pokemon *GetSideParty(u32 side) +{ + return side == B_SIDE_PLAYER ? gPlayerParty : gEnemyParty; +} + +static inline struct Pokemon *GetBattlerParty(u32 battlerId) +{ + extern u8 GetBattlerSide(u8 battler); + return GetSideParty(GetBattlerSide(battlerId)); +} + // NOTE: The members of this struct have hard-coded offsets // in include/constants/battle_script_commands.h struct BattleScripting diff --git a/include/battle_util.h b/include/battle_util.h index 0661081e43..3086394877 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -188,7 +188,6 @@ bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId); bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId); u8 GetBattleMoveSplit(u32 moveId); bool32 TestMoveFlags(u16 move, u32 flag); -struct Pokemon *GetBattlerPartyData(u8 battlerId); bool32 CanFling(u8 battlerId); bool32 IsTelekinesisBannedSpecies(u16 species); bool32 IsHealBlockPreventingMove(u32 battler, u32 move); diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 05e7aec58f..1128f385bb 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -3420,7 +3420,7 @@ bool32 IsPartyFullyHealedExceptBattler(u8 battlerId) bool32 PartyHasMoveSplit(u8 battlerId, u8 split) { u8 firstId, lastId; - struct Pokemon* party = GetBattlerPartyData(battlerId); + struct Pokemon *party = GetBattlerParty(battlerId); u32 i, j; for (i = 0; i < PARTY_SIZE; i++) diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index b3502fcb9e..715e5b3e26 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -7897,9 +7897,6 @@ void AnimTask_TerrainPulse(u8 taskId) void AnimTask_AffectionHangedOn(u8 taskId) { - int side = GetBattlerSide(gBattleAnimTarget); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - gBattleAnimArgs[0] = GetBattlerFriendshipScore(gBattleAnimTarget); DestroyAnimVisualTask(taskId); } diff --git a/src/battle_main.c b/src/battle_main.c index a5a9b5bbf6..0babba241a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3799,7 +3799,9 @@ static void TryDoEventsBeforeFirstTurn(void) { for (i = 0; i < gBattlersCount; i++) { - if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE || GetMonData(GetBattlerPartyData(i), MON_DATA_IS_EGG)) + struct Pokemon *party = GetBattlerParty(i); + struct Pokemon *mon = &party[gBattlerPartyIndexes[i]]; + if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE || GetMonData(mon, MON_DATA_IS_EGG)) gAbsentBattlerFlags |= gBitTable[i]; } } @@ -5033,7 +5035,8 @@ static void CheckMegaEvolutionBeforeTurn(void) if (gBattleStruct->mega.toEvolve & gBitTable[gActiveBattler] && !(gProtectStructs[gActiveBattler].noValidMoves)) { - struct Pokemon *mon = GetBattlerPartyData(gActiveBattler); + struct Pokemon *party = GetBattlerParty(gActiveBattler); + struct Pokemon *mon = &party[gBattlerPartyIndexes[gActiveBattler]]; gBattleStruct->mega.toEvolve &= ~(gBitTable[gActiveBattler]); gLastUsedItem = gBattleMons[gActiveBattler].item; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d313697b0a..2a7e2916d7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6468,10 +6468,7 @@ bool32 CanBattlerSwitch(u32 battlerId) } else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { - if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT) - party = gEnemyParty; - else - party = gPlayerParty; + party = GetBattlerParty(battlerId); lastMonId = 0; if (battlerId & 2) @@ -6512,10 +6509,7 @@ bool32 CanBattlerSwitch(u32 battlerId) } else { - if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT) - party = gEnemyParty; - else - party = gPlayerParty; + party = GetBattlerParty(battlerId); lastMonId = 0; if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(battlerId)) == TRUE) @@ -7669,10 +7663,7 @@ static void Cmd_drawpartystatussummary(void) gActiveBattler = GetBattlerForBattleScript(cmd->battler); - if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + party = GetBattlerParty(gActiveBattler); for (i = 0; i < PARTY_SIZE; i++) { @@ -8746,7 +8737,8 @@ static bool32 CourtChangeSwapSideStatuses(void) static void HandleScriptMegaPrimal(u32 caseId, u32 battlerId, bool32 isMega) { - struct Pokemon *mon = GetBattlerPartyData(battlerId); + struct Pokemon *party = GetBattlerParty(battlerId); + struct Pokemon *mon = &party[gBattlerPartyIndexes[battlerId]]; u32 position = GetBattlerPosition(battlerId); u32 side = GET_BATTLER_SIDE(battlerId); @@ -8814,8 +8806,7 @@ static void HandleScriptMegaPrimal(u32 caseId, u32 battlerId, bool32 isMega) static bool32 CanTeleport(u8 battlerId) { - u8 side = GetBattlerSide(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(battlerId); u32 species, count, i; for (i = 0; i < PARTY_SIZE; i++) @@ -11242,7 +11233,7 @@ static void Cmd_various(void) // Battler selected! Revive and go to next instruction. if (gSelectedMonPartyId != PARTY_SIZE) { - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetSideParty(side); u16 hp = GetMonData(&party[gSelectedMonPartyId], MON_DATA_MAX_HP) / 2; BtlController_EmitSetMonData(BUFFER_A, REQUEST_HP_BATTLE, gBitTable[gSelectedMonPartyId], sizeof(hp), &hp); @@ -12326,10 +12317,7 @@ static void Cmd_forcerandomswitch(void) || redCardForcedSwitch ) { - if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + party = GetBattlerParty(gBattlerTarget); if (BATTLE_TWO_VS_ONE_OPPONENT && GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT) { @@ -13528,16 +13516,11 @@ static void Cmd_healpartystatus(void) if (gCurrentMove == MOVE_HEAL_BELL) { - struct Pokemon *party; + struct Pokemon *party = GetBattlerParty(gBattlerAttacker); s32 i; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_BELL; - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; - if (GetBattlerAbility(gBattlerAttacker) != ABILITY_SOUNDPROOF) { gBattleMons[gBattlerAttacker].status1 = 0; @@ -14165,12 +14148,7 @@ static void Cmd_trydobeatup(void) gBattleStruct->beatUpSlot++; gBattlescriptCurrInstr = cmd->nextInstr; #else - struct Pokemon *party; - - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + struct Pokemon *party = GetBattlerParty(gBattlerAttacker); if (gBattleMons[gBattlerTarget].hp == 0) { @@ -14864,10 +14842,7 @@ static void Cmd_assistattackselect(void) if (validMoves != NULL) { - if (GET_BATTLER_SIDE(gBattlerAttacker) != B_SIDE_PLAYER) - party = gEnemyParty; - else - party = gPlayerParty; + party = GetBattlerParty(gBattlerAttacker); for (monId = 0; monId < PARTY_SIZE; monId++) { @@ -16396,7 +16371,7 @@ u8 GetFirstFaintedPartyIndex(u8 battlerId) u32 i; u32 start = 0; u32 end = PARTY_SIZE; - struct Pokemon *party = (GetBattlerSide(battlerId) == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(battlerId); // Check whether partner is separate trainer. if ((GetBattlerSide(battlerId) == B_SIDE_PLAYER && gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) @@ -16435,7 +16410,7 @@ void BS_ItemRestoreHP(void) { u32 battlerId = MAX_BATTLERS_COUNT; u32 healParam = GetItemEffect(gLastUsedItem)[6]; u32 side = GetBattlerSide(gBattlerAttacker); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetSideParty(side); u16 hp = GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_HP); u16 maxHP = GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_MAX_HP); gBattleCommunication[MULTIUSE_STATE] = 0; @@ -16493,7 +16468,7 @@ void BS_ItemRestoreHP(void) { void BS_ItemCureStatus(void) { NATIVE_ARGS(); - struct Pokemon *party = (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(gBattlerAttacker); // Heal Status1 conditions. HealStatusConditions(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], gBattleStruct->itemPartyIndex[gBattlerAttacker], GetItemStatus1Mask(gLastUsedItem), gBattlerAttacker); diff --git a/src/battle_util.c b/src/battle_util.c index ac274bf0f8..0a4fd61a17 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -225,14 +225,9 @@ static const u16 sEntrainmentTargetSimpleBeamBannedAbilities[] = static u8 CalcBeatUpPower(void) { - struct Pokemon *party; u8 basePower; u16 species; - - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + struct Pokemon *party = GetBattlerParty(gBattlerAttacker); // Party slot is incremented by the battle script for Beat Up after this damage calculation species = GetMonData(&party[gBattleStruct->beatUpSlot], MON_DATA_SPECIES); @@ -1988,7 +1983,7 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move) u32 GetBattlerFriendshipScore(u8 battlerId) { u8 side = GetBattlerSide(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetSideParty(side); u16 species = GetMonData(&party[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); if (side != B_SIDE_PLAYER) @@ -3747,14 +3742,9 @@ u8 AtkCanceller_UnableToUseMove(void) #if B_BEAT_UP >= GEN_5 else if (gBattleMoves[gCurrentMove].effect == EFFECT_BEAT_UP) { - struct Pokemon* party; + struct Pokemon* party = GetBattlerParty(gBattlerAttacker); int i; - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; - for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) @@ -3851,10 +3841,7 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) } else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { - if (GetBattlerSide(battler) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + party = GetBattlerParty(battler); playerId = ((battler & BIT_FLANK) / 2); for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) @@ -3888,12 +3875,7 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) else { flankId = GetBattlerMultiplayerId(battler); - - if (GetBattlerSide(battler) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; - + party = GetBattlerParty(battler); playerId = GetLinkTrainerFlankId(flankId); } @@ -4062,7 +4044,7 @@ static void ShouldChangeFormInWeather(u8 battler) { int i; int side = GetBattlerSide(battler); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetSideParty(side); for (i = 0; i < PARTY_SIZE; i++) { @@ -4253,8 +4235,7 @@ bool8 ChangeTypeBasedOnTerrain(u8 battlerId) static u16 GetSupremeOverlordModifier(u8 battlerId) { u32 i; - u8 side = GetBattlerSide(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(battlerId); u16 modifier = UQ_4_12(1.0); bool8 appliedFirstBoost = FALSE; @@ -7253,11 +7234,11 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_RESTORE_PP: if (!moveTurn) { - struct Pokemon *mon; + struct Pokemon *party = GetBattlerParty(battlerId); + struct Pokemon *mon = &party[gBattlerPartyIndexes[battlerId]]; u8 ppBonuses; u16 move; - mon = GetBattlerPartyData(battlerId); for (i = 0; i < MAX_MON_MOVES; i++) { move = GetMonData(mon, MON_DATA_MOVE1 + i); @@ -10112,7 +10093,7 @@ void UndoMegaEvolution(u32 monId) void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut) { u32 i, currSpecies, targetSpecies; - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetSideParty(side); static const u16 species[][3] = { // Changed Form ID Default Form ID Should change on switch @@ -10247,10 +10228,7 @@ bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId) if (GetMonAbility(mon) != ABILITY_ILLUSION) return FALSE; - if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) - party = gPlayerParty; - else - party = gEnemyParty; + party = GetBattlerParty(battlerId); if (IsBattlerAlive(BATTLE_PARTNER(battlerId))) partnerMon = &party[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]]; @@ -10375,17 +10353,6 @@ bool32 TestMoveFlags(u16 move, u32 flag) return FALSE; } -struct Pokemon *GetBattlerPartyData(u8 battlerId) -{ - struct Pokemon *mon; - if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) - mon = &gPlayerParty[gBattlerPartyIndexes[battlerId]]; - else - mon = &gEnemyParty[gBattlerPartyIndexes[battlerId]]; - - return mon; -} - static u8 GetFlingPowerFromItemId(u16 itemId) { if (itemId >= ITEM_TM01 && itemId <= ITEM_HM08) From d3a090020bb062d88c0c162bc62292e4debfcd95 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Sat, 15 Apr 2023 15:30:07 -0700 Subject: [PATCH 057/229] added code review --- data/battle_scripts_2.s | 1 - src/battle_message.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index 71d88ae84b..9ffad7d843 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -255,4 +255,3 @@ BattleScript_TrainerBSlideMsgRet:: BattleScript_TrainerBSlideMsgEnd2:: call BattleScript_TrainerBSlideMsgRet end2 - end2 diff --git a/src/battle_message.c b/src/battle_message.c index 7d10b19f11..640e7900da 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -465,7 +465,7 @@ const u8 *const gPokeblockWasTooXStringTable[FLAVOR_COUNT] = [FLAVOR_SOUR] = sText_PokeblockWasTooSour }; -static const u8 sText_PlayerUsedItem[] = _("{B_PLAYER_NAME} used\n{B_LAST_ITEM}!"); +static const u8 sText_PlayerUsedItem[] = _("You used\n{B_LAST_ITEM}!"); static const u8 sText_WallyUsedItem[] = _("WALLY used\n{B_LAST_ITEM}!"); static const u8 sText_Trainer1UsedItem[] = _("{B_ATK_TRAINER_CLASS} {B_ATK_TRAINER_NAME}\nused {B_LAST_ITEM}!"); static const u8 sText_TrainerBlockedBall[] = _("The TRAINER blocked the BALL!"); @@ -783,9 +783,9 @@ static const u8 sText_ShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell static const u8 sText_CouldntFullyProtect[] = _("{B_DEF_NAME_WITH_PREFIX} couldn't fully protect\nitself and got hurt!"); static const u8 sText_StockpiledEffectWoreOff[] = _("{B_ATK_NAME_WITH_PREFIX}'s stockpiled\neffect wore off!"); static const u8 sText_PkmnRevivedReadyToFight[] = _("{B_BUFF1} was revived and\nis ready to fight again!"); -static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_LAST_ITEM} restored\n{B_BUFF1}'s health!"); -static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_LAST_ITEM} cured\n{B_BUFF1}'s status!"); -static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_LAST_ITEM} restored\n{B_BUFF1}'s PP!"); +static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_BUFF1} had its\nHP restored!"); +static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_BUFF1} had\nits status healed!"); +static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_BUFF1} had its\nPP restored!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { From 9d93af2261101aee307ca6cc82c4c04dec36ab74 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Tue, 18 Apr 2023 16:28:02 -0400 Subject: [PATCH 058/229] Fixed Budew evolution method (#2928) --- src/data/pokemon/evolution.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 6ec3c0a14c..f222148178 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -316,7 +316,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_KRICKETOT] = {{EVO_LEVEL, 10, SPECIES_KRICKETUNE}}, [SPECIES_SHINX] = {{EVO_LEVEL, 15, SPECIES_LUXIO}}, [SPECIES_LUXIO] = {{EVO_LEVEL, 30, SPECIES_LUXRAY}}, - [SPECIES_BUDEW] = {{EVO_FRIENDSHIP, 0, SPECIES_ROSELIA}}, + [SPECIES_BUDEW] = {{EVO_FRIENDSHIP_DAY, 0, SPECIES_ROSELIA}}, [SPECIES_CRANIDOS] = {{EVO_LEVEL, 30, SPECIES_RAMPARDOS}}, [SPECIES_SHIELDON] = {{EVO_LEVEL, 30, SPECIES_BASTIODON}}, [SPECIES_BURMY] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM}, From 76d0d8a94eeab0aa2e0943ab5581c31cb893462a Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 18 Apr 2023 23:02:51 +0200 Subject: [PATCH 059/229] Fix battle message strings for stats (#2927) * Fix battle message strings for stats --- include/config/battle.h | 4 ++-- src/battle_message.c | 12 ++++++------ src/pokemon.c | 4 ++-- test/ability_contrary.c | 18 +++++++++--------- test/ability_download.c | 12 ++++++------ test/ability_intimidate.c | 2 +- test/ability_magic_bounce.c | 6 +++--- test/ability_oblivious.c | 2 +- test/ability_speed_boost.c | 2 +- test/ability_volt_absorb.c | 2 +- test/item_effect_increase_stat.c | 2 +- test/move.c | 4 ++-- test/move_effect_attack_down.c | 2 +- test/move_effect_attack_up.c | 2 +- test/move_effect_attack_up_user_ally.c | 6 +++--- test/move_effect_defense_down.c | 2 +- test/move_effect_defense_up.c | 2 +- test/move_effect_defog.c | 4 ++-- test/move_effect_special_attack_down.c | 2 +- test/move_effect_special_attack_up_3.c | 2 +- test/move_effect_stockpile.c | 20 ++++++++++---------- test/status1.c | 4 ++-- test/terrain_electric.c | 2 +- test/terrain_grassy.c | 2 +- test/terrain_misty.c | 2 +- test/terrain_psychic.c | 2 +- 26 files changed, 62 insertions(+), 62 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index 24f4ad4f15..ad31621623 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -98,7 +98,7 @@ #define B_HEALING_WISH_SWITCH GEN_LATEST // In Gen5+, the mon receiving Healing Wish is sent out at the end of the turn. // Additionally, in gen8+ the Healing Wish's effect will be stored until the user switches into a statused or hurt mon. #define B_DEFOG_CLEARS_TERRAIN GEN_LATEST // In Gen8+, Defog also clears active Terrain. -#define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp.Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. +#define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. @@ -183,7 +183,7 @@ // Other settings #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. -#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. +#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. #define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // 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_LATEST // 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) diff --git a/src/battle_message.c b/src/battle_message.c index 7d10b19f11..7df30cb296 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -435,11 +435,11 @@ static const u8 sText_ExclamationMark3[] = _("!"); static const u8 sText_ExclamationMark4[] = _("!"); static const u8 sText_ExclamationMark5[] = _("!"); static const u8 sText_HP[] = _("HP"); -static const u8 sText_Attack[] = _("attack"); -static const u8 sText_Defense[] = _("defense"); -static const u8 sText_Speed[] = _("speed"); -static const u8 sText_SpAttack[] = _("sp. attack"); -static const u8 sText_SpDefense[] = _("sp. defense"); +static const u8 sText_Attack[] = _("Attack"); +static const u8 sText_Defense[] = _("Defense"); +static const u8 sText_Speed[] = _("Speed"); +static const u8 sText_SpAttack[] = _("Sp. Atk"); +static const u8 sText_SpDefense[] = _("Sp. Def"); static const u8 sText_Accuracy[] = _("accuracy"); static const u8 sText_Evasiveness[] = _("evasiveness"); @@ -555,7 +555,7 @@ static const u8 sText_VanishedInstantly[] =_("{B_ATK_NAME_WITH_PREFIX} vanished\ static const u8 sText_ProtectedTeam[] =_("{B_CURRENT_MOVE} protected\n{B_ATK_TEAM2} team!"); static const u8 sText_SharedItsGuard[] =_("{B_ATK_NAME_WITH_PREFIX} shared its\nguard with the target!"); static const u8 sText_SharedItsPower[] =_("{B_ATK_NAME_WITH_PREFIX} shared its\npower with the target!"); -static const u8 sText_SwapsDefAndSpDefOfAllPkmn[] =_("It created a bizarre area in which the\nDefense and Sp.Def stats are swapped!"); +static const u8 sText_SwapsDefAndSpDefOfAllPkmn[] =_("It created a bizarre area in which the\nDefense and Sp. Def stats are swapped!"); static const u8 sText_BecameNimble[] =_("{B_ATK_NAME_WITH_PREFIX} became nimble!"); static const u8 sText_HurledIntoTheAir[] =_("{B_DEF_NAME_WITH_PREFIX} was hurled\ninto the air!"); static const u8 sText_HeldItemsLoseEffects[] =_("It created a bizarre area in which\nPokémon's held items lose their effects!"); diff --git a/src/pokemon.c b/src/pokemon.c index d985ef95d3..46eca90b29 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1919,7 +1919,7 @@ const struct SpindaSpot gSpindaSpotGraphics[] = #include "data/pokemon/item_effects.h" const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = -{ // Attack Defense Speed Sp.Atk Sp.Def +{ // Attack Defense Speed Sp.Atk Sp. Def [NATURE_HARDY] = { 0, 0, 0, 0, 0 }, [NATURE_LONELY] = { +1, -1, 0, 0, 0 }, [NATURE_BRAVE] = { +1, 0, -1, 0, 0 }, @@ -6626,7 +6626,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s RtcCalcLocalTime(); if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param == evolutionItem) targetSpecies = gEvolutionTable[species][i].targetSpecies; - break; + break; } } break; diff --git a/test/ability_contrary.c b/test/ability_contrary.c index 7fd902280b..33cfa7ce87 100644 --- a/test/ability_contrary.c +++ b/test/ability_contrary.c @@ -21,7 +21,7 @@ SINGLE_BATTLE_TEST("Contrary raises Attack when Intimidated", s16 damage) if (ability == ABILITY_CONTRARY) { ABILITY_POPUP(opponent, ABILITY_CONTRARY); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's attack rose!"); + MESSAGE("Foe Spinda's Attack rose!"); } HP_BAR(player, captureDamage: &results[i].damage); } @@ -49,11 +49,11 @@ SINGLE_BATTLE_TEST("Contrary raises stats after using a move which would normall if (ability == ABILITY_CONTRARY) { // ABILITY_POPUP(opponent, ABILITY_CONTRARY); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's sp. attack sharply rose!"); + MESSAGE("Foe Spinda's Sp. Atk sharply rose!"); } else { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's sp. attack harshly fell!"); + MESSAGE("Foe Spinda's Sp. Atk harshly fell!"); } // MESSAGE("Foe Spinda used Overheat!"); @@ -61,11 +61,11 @@ SINGLE_BATTLE_TEST("Contrary raises stats after using a move which would normall if (ability == ABILITY_CONTRARY) { // ABILITY_POPUP(opponent, ABILITY_CONTRARY); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's sp. attack sharply rose!"); + MESSAGE("Foe Spinda's Sp. Atk sharply rose!"); } else { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's sp. attack harshly fell!"); + MESSAGE("Foe Spinda's Sp. Atk harshly fell!"); } } FINALLY { @@ -95,11 +95,11 @@ SINGLE_BATTLE_TEST("Contrary lowers a stat after using a move which would normal if (ability == ABILITY_CONTRARY) { // ABILITY_POPUP(opponent, ABILITY_CONTRARY); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's attack harshly fell!"); + MESSAGE("Foe Spinda's Attack harshly fell!"); } else { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's attack sharply rose!"); + MESSAGE("Foe Spinda's Attack sharply rose!"); } // MESSAGE("Foe Spinda used Tackle!"); @@ -127,11 +127,11 @@ SINGLE_BATTLE_TEST("Contrary raises a stat after using a move which would normal if (ability == ABILITY_CONTRARY) { // ABILITY_POPUP(opponent, ABILITY_CONTRARY); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's attack rose!"); + MESSAGE("Foe Spinda's Attack rose!"); } else { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Spinda's attack fell!"); + MESSAGE("Foe Spinda's Attack fell!"); } MESSAGE("Foe Spinda used Tackle!"); diff --git a/test/ability_download.c b/test/ability_download.c index 132c0eb5ba..d83d90196e 100644 --- a/test/ability_download.c +++ b/test/ability_download.c @@ -7,7 +7,7 @@ ASSUMPTIONS ASSUME(gBattleMoves[MOVE_TRI_ATTACK].split == SPLIT_SPECIAL); } -SINGLE_BATTLE_TEST("Download raises Attack if player has lower Def than Sp.Def", s16 damage) +SINGLE_BATTLE_TEST("Download raises Attack if player has lower Def than Sp. Def", s16 damage) { u32 ability; PARAMETRIZE { ability = ABILITY_TRACE; } @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Download raises Attack if player has lower Def than Sp.Def", { ABILITY_POPUP(opponent, ABILITY_DOWNLOAD); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Porygon's Download raised its attack!"); + MESSAGE("Foe Porygon's Download raised its Attack!"); } HP_BAR(player, captureDamage: &results[i].damage); } FINALLY { @@ -30,7 +30,7 @@ SINGLE_BATTLE_TEST("Download raises Attack if player has lower Def than Sp.Def", } } -SINGLE_BATTLE_TEST("Download raises Sp.Attack if enemy has lower Sp.Def than Def", s16 damage) +SINGLE_BATTLE_TEST("Download raises Sp.Attack if enemy has lower Sp. Def than Def", s16 damage) { u32 ability; PARAMETRIZE { ability = ABILITY_TRACE; } @@ -45,7 +45,7 @@ SINGLE_BATTLE_TEST("Download raises Sp.Attack if enemy has lower Sp.Def than Def { ABILITY_POPUP(player, ABILITY_DOWNLOAD); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Porygon's Download raised its sp. attack!"); + MESSAGE("Porygon's Download raised its Sp. Atk!"); } HP_BAR(opponent, captureDamage: &results[i].damage); } FINALLY { @@ -79,10 +79,10 @@ SINGLE_BATTLE_TEST("Download doesn't activate if target hasn't been sent out yet { ABILITY_POPUP(player, ABILITY_DOWNLOAD); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Porygon's Download raised its attack!"); + MESSAGE("Porygon's Download raised its Attack!"); ABILITY_POPUP(opponent, ABILITY_DOWNLOAD); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Porygon2's Download raised its sp. attack!"); + MESSAGE("Foe Porygon2's Download raised its Sp. Atk!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damagePhysical); diff --git a/test/ability_intimidate.c b/test/ability_intimidate.c index a891f9af87..40804cbb19 100644 --- a/test/ability_intimidate.c +++ b/test/ability_intimidate.c @@ -104,7 +104,7 @@ SINGLE_BATTLE_TEST("Intimidate and Eject Button force the opponent to Attack") OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; OPPONENT(SPECIES_HITMONTOP) { Moves(MOVE_TACKLE); }; } WHEN { - TURN { + TURN { MOVE(player, MOVE_QUICK_ATTACK); MOVE(opponent, MOVE_TACKLE); SEND_OUT(opponent, 1); diff --git a/test/ability_magic_bounce.c b/test/ability_magic_bounce.c index d52b93c4a5..848f632ab5 100644 --- a/test/ability_magic_bounce.c +++ b/test/ability_magic_bounce.c @@ -74,11 +74,11 @@ DOUBLE_BATTLE_TEST("Magic Bounce bounces back moves hitting both foes at two foe MESSAGE("Abra's Leer was bounced back by Foe Espeon's Magic Bounce!"); ANIMATION(ANIM_TYPE_MOVE, MOVE_LEER, opponentLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Abra's defense fell!"); + MESSAGE("Abra's Defense fell!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight); - MESSAGE("Kadabra's defense fell!"); + MESSAGE("Kadabra's Defense fell!"); // Also check if second original target gets hit by Leer as this was once bugged ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight); - MESSAGE("Foe Wynaut's defense fell!"); + MESSAGE("Foe Wynaut's Defense fell!"); } } diff --git a/test/ability_oblivious.c b/test/ability_oblivious.c index 0708845ed1..efe2901eca 100644 --- a/test/ability_oblivious.c +++ b/test/ability_oblivious.c @@ -63,6 +63,6 @@ SINGLE_BATTLE_TEST("Oblivious prevents Intimidate") ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); ABILITY_POPUP(player, ABILITY_OBLIVIOUS); NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } - MESSAGE("Slowpoke's attack was not lowered!"); + MESSAGE("Slowpoke's Attack was not lowered!"); } } diff --git a/test/ability_speed_boost.c b/test/ability_speed_boost.c index b3e128931a..39219a5cc7 100644 --- a/test/ability_speed_boost.c +++ b/test/ability_speed_boost.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Speed Boost gradually boosts speed") +SINGLE_BATTLE_TEST("Speed Boost gradually boosts Speed") { GIVEN { PLAYER(SPECIES_TORCHIC) { Ability(ABILITY_SPEED_BOOST); Speed(99); }; diff --git a/test/ability_volt_absorb.c b/test/ability_volt_absorb.c index bef35e2b4b..18902eaa20 100644 --- a/test/ability_volt_absorb.c +++ b/test/ability_volt_absorb.c @@ -102,7 +102,7 @@ SINGLE_BATTLE_TEST("Volt Absorb prevents Cell Battery from activating") NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Cell Battery, the attack of Jolteon rose!"); + MESSAGE("Using Cell Battery, the Attack of Jolteon rose!"); } } diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index 70c89bdd4e..b459e3ac88 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("X-Attack sharply raises battler's attack stat", s16 damage) +SINGLE_BATTLE_TEST("X-Attack sharply raises battler's Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } diff --git a/test/move.c b/test/move.c index 9ad336330f..9e23c2bd00 100644 --- a/test/move.c +++ b/test/move.c @@ -54,7 +54,7 @@ SINGLE_BATTLE_TEST("Turn order is determined by priority") } } -SINGLE_BATTLE_TEST("Turn order is determined by speed if priority ties") +SINGLE_BATTLE_TEST("Turn order is determined by Speed if priority ties") { GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(2); } @@ -67,7 +67,7 @@ SINGLE_BATTLE_TEST("Turn order is determined by speed if priority ties") } } -SINGLE_BATTLE_TEST("Turn order is determined randomly if priority and speed tie") +SINGLE_BATTLE_TEST("Turn order is determined randomly if priority and Speed tie") { KNOWN_FAILING; // The algorithm is significantly biased. PASSES_RANDOMLY(1, 2); diff --git a/test/move_effect_attack_down.c b/test/move_effect_attack_down.c index 6333bbea1f..0df14f701a 100644 --- a/test/move_effect_attack_down.c +++ b/test/move_effect_attack_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Growl lowers Attack", s16 damage) if (lowerAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_GROWL, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's attack fell!"); + MESSAGE("Foe Wobbuffet's Attack fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_attack_up.c b/test/move_effect_attack_up.c index 7b57fa0d26..4978d03f96 100644 --- a/test/move_effect_attack_up.c +++ b/test/move_effect_attack_up.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Meditate raises Attack", s16 damage) if (raiseAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_MEDITATE, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's attack rose!"); + MESSAGE("Wobbuffet's Attack rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_attack_up_user_ally.c b/test/move_effect_attack_up_user_ally.c index e98df30d8e..e920752dec 100644 --- a/test/move_effect_attack_up_user_ally.c +++ b/test/move_effect_attack_up_user_ally.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Howl raises user's Attack", s16 damage) if (raiseAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's attack rose!"); + MESSAGE("Wobbuffet's Attack rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damage); @@ -50,9 +50,9 @@ DOUBLE_BATTLE_TEST("Howl raises user's and partner's Attack", s16 damageLeft, s1 if (raiseAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, playerLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Wobbuffet's attack rose!"); + MESSAGE("Wobbuffet's Attack rose!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight); - MESSAGE("Wynaut's attack rose!"); + MESSAGE("Wynaut's Attack rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft); HP_BAR(opponentLeft, captureDamage: &results[i].damageLeft); diff --git a/test/move_effect_defense_down.c b/test/move_effect_defense_down.c index 6e5a45e848..9ecd1c25f2 100644 --- a/test/move_effect_defense_down.c +++ b/test/move_effect_defense_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Tail Whip lowers Defense", s16 damage) if (lowerDefense) { ANIMATION(ANIM_TYPE_MOVE, MOVE_TAIL_WHIP, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's defense fell!"); + MESSAGE("Foe Wobbuffet's Defense fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_defense_up.c b/test/move_effect_defense_up.c index 8db9a7f7e4..492ce7bc93 100644 --- a/test/move_effect_defense_up.c +++ b/test/move_effect_defense_up.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Harden raises Defense", s16 damage) if (raiseDefense) { ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's defense rose!"); + MESSAGE("Wobbuffet's Defense rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_defog.c b/test/move_effect_defog.c index e9e55d57fe..751ddf60f6 100644 --- a/test/move_effect_defog.c +++ b/test/move_effect_defog.c @@ -165,7 +165,7 @@ DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Stealth Rock and S MESSAGE("Pointed stones dug into Wobbuffet!"); MESSAGE("Wobbuffet was caught in a Sticky Web!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Wobbuffet's speed fell!"); + MESSAGE("Wobbuffet's Speed fell!"); } else { NONE_OF { @@ -173,7 +173,7 @@ DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Stealth Rock and S MESSAGE("Pointed stones dug into Wobbuffet!"); MESSAGE("Wobbuffet was caught in a Sticky Web!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Wobbuffet's speed fell!"); + MESSAGE("Wobbuffet's Speed fell!"); } } } diff --git a/test/move_effect_special_attack_down.c b/test/move_effect_special_attack_down.c index a20b8558e7..0511692d46 100644 --- a/test/move_effect_special_attack_down.c +++ b/test/move_effect_special_attack_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Confide lowers Special Attack", s16 damage) if (lowerSpecialAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_CONFIDE, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's sp. attack fell!"); + MESSAGE("Foe Wobbuffet's Sp. Atk fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_special_attack_up_3.c b/test/move_effect_special_attack_up_3.c index f7e7e11d14..ad53bedb9e 100644 --- a/test/move_effect_special_attack_up_3.c +++ b/test/move_effect_special_attack_up_3.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Tail Glow drastically raises Special Attack", s16 damage) if (raiseSpecialAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_TAIL_GLOW, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's sp. attack drastically rose!"); + MESSAGE("Wobbuffet's Sp. Atk drastically rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_stockpile.c b/test/move_effect_stockpile.c index 0530355efb..bd0d3a113d 100644 --- a/test/move_effect_stockpile.c +++ b/test/move_effect_stockpile.c @@ -142,7 +142,7 @@ SINGLE_BATTLE_TEST("Swallow heals HP depending on Stockpile's count", s16 hpHeal } } -SINGLE_BATTLE_TEST("Stockpile temporarily raises Def and Sp.Def", s16 dmgPyhsical, s16 dmgSpecial) +SINGLE_BATTLE_TEST("Stockpile temporarily raises Def and Sp. Def", s16 dmgPyhsical, s16 dmgSpecial) { u16 move; PARAMETRIZE {move = MOVE_STOCKPILE;} @@ -161,8 +161,8 @@ SINGLE_BATTLE_TEST("Stockpile temporarily raises Def and Sp.Def", s16 dmgPyhsica if (move == MOVE_STOCKPILE) { MESSAGE("Wobbuffet stockpiled 1!"); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's defense rose!"); - MESSAGE("Wobbuffet's sp. defense rose!"); + MESSAGE("Wobbuffet's Defense rose!"); + MESSAGE("Wobbuffet's Sp. Def rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); @@ -176,7 +176,7 @@ SINGLE_BATTLE_TEST("Stockpile temporarily raises Def and Sp.Def", s16 dmgPyhsica } } -DOUBLE_BATTLE_TEST("Stockpile's Def and Sp.Def boost is lost after using Spit Up or Swallow", s16 dmgPyhsicalBefore, s16 dmgPhysicalAfter, s16 dmgSpecialBefore, s16 dmgSpecialAfter) +DOUBLE_BATTLE_TEST("Stockpile's Def and Sp. Def boost is lost after using Spit Up or Swallow", s16 dmgPyhsicalBefore, s16 dmgPhysicalAfter, s16 dmgSpecialBefore, s16 dmgSpecialAfter) { u8 count; u16 move; @@ -217,24 +217,24 @@ DOUBLE_BATTLE_TEST("Stockpile's Def and Sp.Def boost is lost after using Spit Up ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); if (count == 1) { - MESSAGE("Wobbuffet's defense fell!"); + MESSAGE("Wobbuffet's Defense fell!"); } else if (count == 2) { - MESSAGE("Wobbuffet's defense harshly fell!"); + MESSAGE("Wobbuffet's Defense harshly fell!"); } else { - MESSAGE("Wobbuffet's defense severely fell!"); + MESSAGE("Wobbuffet's Defense severely fell!"); } ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); if (count == 1) { - MESSAGE("Wobbuffet's sp. defense fell!"); + MESSAGE("Wobbuffet's Sp. Def fell!"); } else if (count == 2) { - MESSAGE("Wobbuffet's sp. defense harshly fell!"); + MESSAGE("Wobbuffet's Sp. Def harshly fell!"); } else { - MESSAGE("Wobbuffet's sp. defense severely fell!"); + MESSAGE("Wobbuffet's Sp. Def severely fell!"); } MESSAGE("Wobbuffet's stockpiled effect wore off!"); diff --git a/test/status1.c b/test/status1.c index f4d3c7d944..c244b9a604 100644 --- a/test/status1.c +++ b/test/status1.c @@ -53,7 +53,7 @@ SINGLE_BATTLE_TEST("Burn deals 1/16th damage per turn") } } -SINGLE_BATTLE_TEST("Burn reduces attack by 50%", s16 damage) +SINGLE_BATTLE_TEST("Burn reduces Attack by 50%", s16 damage) { bool32 burned; PARAMETRIZE { burned = FALSE; } @@ -113,7 +113,7 @@ SINGLE_BATTLE_TEST("Freeze is thawed by user's Flame Wheel") } } -SINGLE_BATTLE_TEST("Paralysis reduces speed by 50%") +SINGLE_BATTLE_TEST("Paralysis reduces Speed by 50%") { u16 playerSpeed; bool32 playerFirst; diff --git a/test/terrain_electric.c b/test/terrain_electric.c index b5608e661b..bb397fdf9b 100644 --- a/test/terrain_electric.c +++ b/test/terrain_electric.c @@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Electric Terrain activates Electric Seed and Mimicry") TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); } } SCENE { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Electric Seed, the defense of Wobbuffet rose!"); + MESSAGE("Using Electric Seed, the Defense of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Electr!"); } FINALLY { diff --git a/test/terrain_grassy.c b/test/terrain_grassy.c index cf83048750..ae6e6d9e92 100644 --- a/test/terrain_grassy.c +++ b/test/terrain_grassy.c @@ -27,7 +27,7 @@ SINGLE_BATTLE_TEST("Grassy Terrain activates Grassy Seed and Mimicry") TURN { MOVE(player, MOVE_GRASSY_TERRAIN); } } SCENE { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Grassy Seed, the defense of Wobbuffet rose!"); + MESSAGE("Using Grassy Seed, the Defense of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Grass!"); } FINALLY { diff --git a/test/terrain_misty.c b/test/terrain_misty.c index dda5253f23..668b036992 100644 --- a/test/terrain_misty.c +++ b/test/terrain_misty.c @@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Misty Terrain activates Misty Seed and Mimicry") TURN { MOVE(player, MOVE_MISTY_TERRAIN); } } SCENE { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Misty Seed, the sp. defense of Wobbuffet rose!"); + MESSAGE("Using Misty Seed, the Sp. Def of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Fairy!"); } FINALLY { diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c index eb5103f314..2cddef070f 100644 --- a/test/terrain_psychic.c +++ b/test/terrain_psychic.c @@ -30,7 +30,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain activates Psychic Seed and Mimicry") TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } } SCENE { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Psychic Seed, the sp. defense of Wobbuffet rose!"); + MESSAGE("Using Psychic Seed, the Sp. Def of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Psychc!"); } FINALLY { From e6505bda4bc9ebb23573ac9703ab09261742c110 Mon Sep 17 00:00:00 2001 From: Jaizu Date: Wed, 19 Apr 2023 01:49:42 +0200 Subject: [PATCH 060/229] Fix some sprites (#2926) * Fix hisuian typlosion * Fix mega metagross backsprite * Fix shiny Reuniclus * Fix Duosion mouth * Fix front mega metagross * Fix front Yanmega * Fix Electivire front sprite * Fix shiny duskull * Fix Hariyama sprite * Fix Shiny masquerain --- graphics/pokemon/duosion/anim_front.png | Bin 802 -> 738 bytes graphics/pokemon/duosion/normal.pal | 2 +- graphics/pokemon/duskull/anim_front.png | Bin 725 -> 737 bytes graphics/pokemon/duskull/back.png | Bin 562 -> 524 bytes graphics/pokemon/duskull/shiny.pal | 2 +- graphics/pokemon/electivire/anim_front.png | Bin 1898 -> 1908 bytes graphics/pokemon/electivire/normal.pal | 2 +- graphics/pokemon/hariyama/anim_front.png | Bin 1405 -> 1405 bytes graphics/pokemon/hariyama/normal.pal | 2 +- graphics/pokemon/masquerain/anim_front.png | Bin 1282 -> 1284 bytes graphics/pokemon/masquerain/normal.pal | 2 +- graphics/pokemon/metagross/mega/back.png | Bin 966 -> 897 bytes graphics/pokemon/metagross/mega/front.png | Bin 1366 -> 1311 bytes graphics/pokemon/reuniclus/anim_front.png | Bin 1176 -> 1210 bytes .../pokemon/typhlosion/hisuian/normal.pal | 2 +- graphics/pokemon/typhlosion/hisuian/pal.pal | 19 ------------------ graphics/pokemon/yanmega/anim_front.png | Bin 1210 -> 1103 bytes 17 files changed, 6 insertions(+), 25 deletions(-) delete mode 100755 graphics/pokemon/typhlosion/hisuian/pal.pal diff --git a/graphics/pokemon/duosion/anim_front.png b/graphics/pokemon/duosion/anim_front.png index e8c48d6c05fa3b8fd5dfcce88789aae67968b2a4..c265b42524e803d4fe8096c459643f42f4aa2114 100644 GIT binary patch delta 692 zcmV;l0!#g(2I2*f7#0Wv0001tU!Pb20004VQb$4nuFf3kks&63us}d?I5>dVpa1{> z00000005ZOL^l8c0$@o*K~!jg?U>n;gCGz^MUc)U|Np;3vtvMSH6>(N}lIW#2*oX0XzYYALMtTLfjM5 z^7##ndHxF~L_mlZz@b6HC|?L5z>;;D9^i&x;sA*BVc#F|5b_Mjjo|ZsyJ7gT)a!@> zIL|{Mq84yT$N=l+&jgzRRssmS5Y`|9tPG(2yg%W}HlGN8IKUBXT74S|ydes~?L%GY zJ(&SyHStjt<5m9Vo0J|VoVNbQDSrP=ECfsXGdYyZaq&Fe|=e;6>*e}VreeQ)g__kW-7*uO;o z`}U9P|H%GP{U6&uX73mF4+1XiA2E(g`$x3#(*99@z}Wr)cfPiNtbcG}{|MmH{=xpi z*#5!(!AbvNd++PN;GQ-e{U?dO1Nsk6;jI54V5tB20Q&l0^&g-abo3v!*Q(Rd>i>>) zFoyb{+6Qn;G_GTAAE5n*t*if%{zE{V)Lqnn_?`#60pIg@05~IN`VR#$-GA6t|6$dC as$Vt}u^^N#nQ>$Q0000I!7zqRe0000=*q&4Ew`VenmEfg*hAf@C4+b2!Zrt=G2Vb^Z_ zbeY+On1dO*=%mO~SeEDW%$@I|zRz zzy(N@DrF#rK&iami9H6Om4FOa5UW~CQ&Jv4W1a_|;MaE;V$0+=@a6Oy;#eDkDdEHE zgcE3G2xg%^c8FD>lqD7=aF1w>9RjN5N)XTuz=11~0z}Gmz}N{uQyuQWyaxiEPQG2$ z*kcBm5p;EXQ%!}PB;a_yDBW3LHiUlxN_9I|1T;K=tH2o$$ORy%)Diz((ScwAc*gng zywn^(%Y;DJCK~R65)hSr(__Bn0D5Jjy6>AYzu3tw{@B;A!vO47`O90b8y?6%%5cU@*3TN=>OyP4%C16XBqoon>`+k28xOQ>c zw&IR`W;0+a%}2CEmaYTXW*{>01~EjKIT>Goh%A$nk9fp?8ynC2w3heq1>LR?o~VjL zebQd>-F3_@5v!QJ9&A{3Uoj9V`G>j`dt}C7&{fF;B>zE@(`C&9)*eK<6_(*n>;Z6F z<)b|a;;+0IIJ8HnQ;-y0(aL}J;73B@UT}(KZ`#C)d%>1)C+fcw?7?UsME}tDD!Bto z&5DZG{37}X8lmWq=PK`c6JvnxcD@#R0A@oFkSE9U8v(f>?&u3HiU3LdpOv~QoPia0 z*QzFlp#DbF;=vxU>OZju)(_5sm%sL4$S*3)?E%+fvm9?za9)v)^yuidBg!J*W$df&|y91_xGwhXJ4S#`*_CW+jB24)X mBa!XhOvqbpsd7#0Wv0001tU!Pb20004VQb$4nuFf3kks&{SUr9tkRA_Ds;JOjc^&*QW(J8^^0`mcY?J#&{SrAxD{bs=h3#MB^h;q;D z%YBR%EGFQSUe40Nf(tC>3W0!CWb8!`Uyd^V;0l4_x}N>lH^NV_Y#~!JqIdl6Xj3xI z{^#clsRt#vU0(qZytDuTBnQ$%CItEI-68_b0r0K*2;fM6;Og>PSXP~)E|fOWgNv$O zZ5iS$7JSer15JQ%lvf=?Tt68=#N79v^~FKn8wif7a?!7TDF8r|eZ5N3y#RbXPHp=a z2~Zchb2x1v^azv9MOgX-(4Ry$8$jCm;{+S}P)4CayMDJ($jLOv6QgtWg0XjD8o(O@ zf}1XV?4whEI%?FYQKSC78u`J<58CpB!?UtIKhP%;XGC*;kX}^Vd#p7-*dAp0MR&>% zYF|lEWqy%K8>jpL)%PlN*!%Y+9rJ_D$1S0dE1=8|_MNyPNRP5?23+%px(BU9DDwlj zd=?GU*Z^gIfUtk&ai)*@GCzpl>x~x9`GNgTQTnuaKjjAvw=#_4k{<*M@d01Il|+>7@w^#@&k%`TMO^<1EYbzKR>WB zZt??TCV7(|SfAi;^8@>T$&nuvgpnVN8fB|ru;LwU7|-Y200000NkvXXu0mjflw~=5 delta 653 zcmV;80&@M~1=R(R7zqRe0000c#H5ELlz0jGlyxHHMv zJ-KG#*3bh&UDkp=KmjUc5C^vYf?=qMTMPL^+PorpO!n?f%i`@(O@I{PwmY1ey(76Z znT++1N?Z>2r*~%vZq5NdFV09ri@P(3uVOaXj}tL8#}slQ#Ft`8?7~+Wb$dpaKyC( zkcPb22_F%^8U?L)W)R}>RHFM@x3IS+#6A%-53%0pCqQe0dw4QF(wHg$i0iF>B7#;ysXPZ%_wJ;v0!exOc)PcNM)3lZ z_&e4u8Ua(@2vitv8(6(rRF@IMad_?kB@`L+ZX@|e=!$#!WB0fUxgZ3-^$ULteLaW+ z&pQ%oBV2_66LLBU3OFA_-Lb~{KWoen1Nk9xTQZm*qC^@*Fh4}(%dEIielUFj#e063 z_kU8A%*~EVyZlh~mu|ci_UD|s{4ghyp3Tbry;GMTtc_C&T&4!#@`LUBr=8L7+2)5v z=7O8V09<~kM9Pjz8^Gm<29c0004VQb$4nuFf3kkv=bf_;^?V000000H#zU zHUIztib+I4R9J=Wmd&<aiz#R_^$u9N)MelJ7@K%4k)!zV5S=d{LW+gW=S+C<} zCKJMyg2ma$OHByzns)qzxH(CEE6r`r@qv+4SFtyI-h@vOJoPgY@ z27oyL_$1Qwv4;r(<4hTVnFTZra1Rp#ng-?;=rBfq#tKP6pE|&40Qlv2mI^+>x*iNd zt1tD~0yppuz`tL;2U#C`&^81cfNE?Q<;j8y=p*nN(63>C?m?RaY&+=Rd|ObXWM;4s ztPNEI2KyP$X;uh`p`>`6zA)-w_xA>82U~{oJD^Ky^*l^Rfa+h~@z(fRX|`Tm4NXjW!R+VL2s$ zamJ5nkOmtv03k^$7Q{G;7PPBc(90WICTROfCJax<1^DW#;|HNU7!Dx>jer0E002ov JPDHLkV1hoL$4CGG delta 505 zcmV7$yV*00013M{Ml?0004VQb$4nuFf3k00004XF*Lt006O%3;baP zkuEQPXjo7H000000H#D0gFjQK~zY`<&;5c z!!Qs(GeYB9KL{Ta9c*GqEl2Tdj=e@&D+Lq~fow zRrQ{&?{~V{X6mYjgI;Hd4uFVx0MR2_+l&c+l12tlWMXVy05IdQBoF{-ss#(J=i^jJ zLFi1Jo*+Q4ZN|gb;V=`Yg3!c#T45LcDksX-KGi4UT2-0}n9J=IXm!a1jQbw>ACLjf z2w2s?8~{#Vx7QsS30%eiufyA`hXNG9sLR$IoxA#qI}gBB3UtQNx_fNchPz3JlZ$JA z=u!f$SpYgi{tv33<2Lv}Ro#ZaAJ4k)QUEc=Md0YtG0=5t<(GM4>+YHH|9N_Jaia zV?(zOcNp*P{fP6M780_6Zm#UPJvx?w3v37{28#t_p`Y%v1F={IQ>Pi4^r v3%i^2uv7D968z0nOd@`o+@t&NR#E%{b%xFx8N_#800000NkvXXu0mjfv=ZOe diff --git a/graphics/pokemon/duskull/shiny.pal b/graphics/pokemon/duskull/shiny.pal index 2c59d3ae14..16dc97f5a8 100644 --- a/graphics/pokemon/duskull/shiny.pal +++ b/graphics/pokemon/duskull/shiny.pal @@ -14,6 +14,6 @@ JASC-PAL 248 232 176 248 120 88 152 40 72 -104 88 80 +248 120 88 0 0 0 0 0 0 diff --git a/graphics/pokemon/electivire/anim_front.png b/graphics/pokemon/electivire/anim_front.png index a5f05a7e8b9552604a2c1903e92628e449dac87e..9aae7e5b5c7ef8497b1c49c6a0b2321a0309b3ed 100644 GIT binary patch delta 1865 zcmV-P2e$a?4)hL?7#0Wv0001tU!Pb20004VQb$4nuFf3kks&O9SV%xyfXKkib1MiZ0Vb9a92S?A72r==_qiPS91 z-y5&jzcQ!S`}1Rj$y&s(&-i9iRBLWX_7sxoqtf9GhJ^F@yUOX8fwJaBM`CFRk6 zpm6X&5nvf)P9>4SV>uvP10*#Qd-o#daNLymhK+KtX0GPa2^Is6&Z^bwu>_KED(D@LAdiaQakYCJyD}Ua`gAV{y*B8d%;0Voc zB@ohk3LxeNz_K<7RDdwpw;1XwvP`pwnUYrei7Nmy&Y~_Uob!m1u{mAT6_2?Tm{Z1H zrW|b7zuShN5WXEqPzYVrXk$$-hz7|w@{A*=s1V<6{jU16b-9p|ZiQP{fTHFCU^6ud zlR5x51S5BU>q{t@S*G(Kupah^Z>HO7A;LoG63E;((F-- z6d;+;bvpH~_GlrJexlR&;tEG`AP}&3**v*VjxWuC2J&7ksdfjeDE!KX(3LpG5lUVxdw?N|Rs{ExI@C!0=_pJ9YSraz z$MW>5X#haj0jfFY2EdAO0l-K-F-toDVt``M-ej1SuI=^EB_LRJ(*XM}@AEF~msW~^ zP&2gU>GR+gW3f-^7xv9a1J?swaqdR4Q&?Sp;IXtmQ%H7rYfV2PYnq(TrOgrdlP2`VeuhkTP+QCG=Kv6eDLm6wq9Dvabm3Gk$y%%_Ya2o@A zSk&~T4375w&0_`-{DxKd{ozqJkY|G3-Lhu(-V!SNwciNu*~)(R(W}!5KwBBJdpmnL zBS*(C9k`;f7S{PK#`a&MApT446#TvNM*)gnnyqKNc+D3WY0~xE{~-uC_E1}5??)%g z7qzt?~PGetBAi8qHX;-&PBs@7(a+?sp~} z;675U;ncX|-dE~vSJyA&$@0$5C3-$To zEid|&mXA_t5Gax#>|_B*%SQs8D#tC2LM2{fLl7@;7{Ol#w?LA)gL}F@aRI^scpp|p zytfZsTS3*Xmh~nd9Q6x-ol;`sc2Q=jRn>gZFN`X|0ceOvg#Fc70n&b~^`nYB2!LWt z+p`^^mk-RGT_rMmg#M}n(>SSokPV>IAGD&8Z9}=ZwX)U~MSu^x{vZI757<$Lk_%Vn z=H9=W4_)g`dhQ6VneM5OnDnT(`T=EAaLH@?3E)XTfb*WS7K+(_e{0<72flr|k)YH1 zGyTBDSTx2|?65Zy2Y}uCW!DdanwWy1|0Q7RF}^+6pXGzaMMov#3POFnoZ1h*ln<7l zDG2?EnF5%Ca1C&+9vFOIwyxH&uuoI`NkO<%4;-L+I0d*<51ikvgm9-G=y;M4Zq)-r zc#;rq)B|_nK|;7FQ4jq4X9?j_J#ZiXmk^A^L_+unt&nm=yg7=+00000NkvXXu0mjf D)t`z) delta 1855 zcmV-F2f+CB4(bk&7zqRe0000wHcbNQTpjV>kT)}uR@!x(G?`|lnUCJQdGlu8cM17V?d^Ym z8UNt3w{Gcut?ASret8@4-X})&WWqc0*ZZ~uy!(Y!1L~p2W>rVelZM|1WkRcd{Zlqn zfX|N9fYk*~_)*XEJkoo5QdV=z5v`i4$IG72SeW#Ruxx)?10*i}gAo!(DL*2uIm{Z^ z^4SC!VB4#mV5K;8u)Nu)1Z@YRSN0D#YjZ9q>f1ps`G z9!$Qv52MP2auS?`3ZOUf9@xGQ7hj^0;cA(B5<6BT!zbFo&@sj%1a!GhJOd*H9Gn~5XeV$=Dw^0;yHEh&m?Luz5-WdzVus_f%vH2t zRDdlF09eA&S=1M~x0Rp^qy~Z-&? zCoK>n_f`Qq8Hx<{SAZk3nWwxtK{CZh3J~M20CKl%13CxhNMHhKDh|p}FNZAvcd&?K z4B<4-F)Zp_kS@SW#}0pGQe|YL>B8wePE^(zn}8#Ra&Qzd+!#+;jB}JwCjBKAC+Av zi1u;or5`2ny=(H%t^ecoH`gyVb7p1k-sLwJmv;a}du9Gi?*a%l=v~AAQ~NIxWKBJE znvftX^`P2oZBc)sp#)i}2c<7o0);4@;GZZ}K}3Q4wk=SIs=zIQ^7LfZ5-6muz)3_r zp+691`(!0hNFy}dUqwM&lC6Rn^~4=u`SkSkgfZ`BM%&%Z)0mx}o}!6EX0&H+0Nt)C zcae3}LxYa7T8<v+YpU=QRl9?Y?j7lc9s=uqGq@1q0o@ZAS^mGHtcXzR|w z7zATBu@{TU-q#P%A6^8R*}4MWuorBhG|<-{-X9Ao=5o3^tz>*CD!Eu9z^5{xc&oOq zF?|uvb9aA{Uqh{v7D4BV&=>stC$R13Hxp25YK{P#HivKglAn*cO^ffJUy2EWLzIOF zMX+)K??nuaX`(0)v78(V9W!t0k)C6b0Dfk=yI5429lB$oF9PyLwTvAsl>8jUg@^jW z3;^fH@k7g4C_sBDB!~5o(z8c&douE*{5TAFR%L(IuFKC6&`gVGO2J4+>G|}@ToSt| zq0Yh3Fd6pgKvX5%)t!BgDeg-^yHa&fNCUbff@$qDD;TgRzcLxj-MRQq2#isH*3o0j z+5xJaEthlY=B`CFHMo$bIA+hd>+($7Hz{0=mqu$`h*78nhM_T-6bnA t=&OrYdlz>A`~A!Js9*`yOD7=$#Al5CekuM{*gq32ICFXAkhN zd0J`i4UM1m&vm_j4lsG`B)~I7clQ*aCeCmH#{mDD0QAHg=TZV4VFK`?j|m_i0k+Z1 zgh#3bY$-uo#*n~Z7ClwmP5^ZZqYD zmS&+@r67@i>K6gLaT@{`Y<`Ht{?Y`lidAbRNU@rOHazTL-Wd?aCIpApX3&BD;dgNF z&-?TFyx-fN5qao*0OG-WECAp`@dns{=OGYK)(Xm!>k3!{-fspN1mFy)z{qnHvqw03 ziTQnF!rO!lB7hJ)AIzD_eSD2k3Nf}l?}mo~$TK~ER)?Dz5%O00{V3a7%|Qqnd6Hky zD|JM8$bTGGO9J*T0)d%6RMB%B6QE+ypPP!5)gdG^KpwsOA}`fBuS8BI>t$xH5kem6 z2;ej%d)O7?gaBm&KGH~1P7!fZ%yb6CrOQh$4eI6dDml}?>ZQYkaP_}?gE%EdVouWqY%UmKt$Xk5aM(xpCWDo{-yZq zef(V){=00vnci~^Fs+lh=;9{;WAK`bpVY}<`~o}!OokagNKrnZeg-h|F^OXj-|BmS z=;cfN7%-``;ZIocO||oD4l=XYVFHN7`|1CGw(i|mey!-!CvfLI2LL7*(*xWEfXCW5 zw}6rL)OW7QFf{~TLNo6Ql|B-ddbLy~Yyhf%uolnOe6AadWA|M34_0ORTt^t!pc;V& zw2o&s3mTBDFOC7xJl6ni|Fd<*i&Ue?_QiQjsT$yXl?3n zRs91~oA*!w92!?KsDu82vD$j`?-S!H2m^Khz$oi&Q>|wwFMp#q{ey*@BiVT4`N`e& z54gGFig#X)^@IL_h0o1F|3EcZF2tyR z@Kuca2j3Bf{evq?c@h4ge;{I?T=tj!gGbv!__BZS7_<;{|KL*oRSThMAb5YF2T>Sp z1EKT}E~KKGCw|aBI8P$_!`L}=zsJ6KMvy;!njWp7q3jH00000NkvXXu0mjf(Gf^w delta 1231 zcmV;=1Tg!A3W5rd7zqRe0000 zzl-BW6vri82wdH2*XeIg-X@LMNn)0`i89t7V4qZ^+>?ea7fe<-=kB;5(q3_ha}fvu zbJdY8Lbz)Z6~^5BQF(7>^xL+I%!0vws zdTR6mCg}le!e%F%7%>(e1<`AgD_LveE!asHzC#d_6j4*;9_{Pw4x4*{l} z5CUoH9s+EFzy%9yz^Vr5{eKqm+cbUA1uRqu&|O;DU73J$uLkHQ ztgL8exD5d~Qvg2zY||e(lRfy61XO<$s{(kNmOv2sRhI=YOiKWsm5(WYb!7zw47U>S z0|YLx2_6Ru*tn_z4J>e8jL$d^@w>HBzz-NtL(V)2_?*q+7_+UiOaNfrN`M0(kJ>0= z%yD39$v)c)7}R~NDn!gXLtrpxvm1|)$sbv^+2qEV&x165$$7**wI}NMFm`_%3P6V3 zbS}ACjNj;~(D9r+nLs?-h(B$Qsd&WvpqMMA)U^~~6UXsY0>&1#(_>5#$i!cSFgY0( z=uH%BncE2DSHxj4Lnvy#v+J)Mhmj9RTtfPog>mzRTT{k7`XKTF2_iOw=>^T#X$`f% zSxiN4&|pq{?v1I@1b%baV+wyIU{f|32c#ai;DxiGe*!&V-gDS@J)W#ZVhjYtKNq6= z9$Sfkl^9cj@w^j2+CP{~YCG&~UXv#v&b5EArMAOI*ic?d3;*CS2c;B=$s`-b*tL`7VE4e%2A0V8F zU2=EKKWKv?c1QdJDy3RG=^xsvZD@M{24O1w!|&iQIuLk_e4_k;^bZ|(0BvBM=cRvW zyA-LFU>%P82bBL!!#^|$IPTdiD*Z!Y51MVPvNxr?qdhxVPFh8lwZ|*%fko+oc~rn@ t>85>vL9hGl!QlF60|n9ZAMF2c{S9y!fv3C#-A@1j002ovPDHLkV1gfqJcs}Q diff --git a/graphics/pokemon/masquerain/normal.pal b/graphics/pokemon/masquerain/normal.pal index bd8d9c4c7c..3d0291badc 100644 --- a/graphics/pokemon/masquerain/normal.pal +++ b/graphics/pokemon/masquerain/normal.pal @@ -14,6 +14,6 @@ JASC-PAL 136 32 72 136 160 200 192 200 224 -16 16 16 224 104 40 248 144 96 +16 16 16 diff --git a/graphics/pokemon/metagross/mega/back.png b/graphics/pokemon/metagross/mega/back.png index 00bfdd18181e129eb963e142b922ecec66bcb9bb..86c2b6e145655c2717d7ad305e9625253be03337 100644 GIT binary patch delta 828 zcmV-C1H=5r2Z0BW7#0Wv0001;w}I>c0004VQb$4nuFf3kkv=|u0{=-wK~z|U?U&tB z>o5$2W2siAA-wRjMqU?}-kYyH?^S^n0~Rg?i_n5==kEmxY

siT0sTOUYnhTZ)g zuFrD^YhSJr0zB&Q{pOK*2q+pqMDS@BtpvjJ1>X_L!O%$s?F%o&_qcV>G?2V0Fx>Dx zFB1#{;)_$@x(mskDh9*@b6DV8UM4StH#2U5Z+JH_@sWdn?gD%}MWh2H=kTGR0@u7I zY6%=Rya%fQU-4+RLGZ|a5xC^XLelfejbLE56pzP7_@G!uK&?q_GTCWDUI@gB2^*wL` z$`dEt2>ok+33dAtKBp~qPUA*o+V|tryPa1@1?q*@*hEq;B>Jcd`~HdRqAC#QabdW9 z%L~nWa-Rx{e}0h7obbs2c;Lz>&elGf%TNHm>lW<7sRH5$9-g(zcgLZ{h-On9_>P44 zs(=&7_?b?eZ}PUCsi=>tE-{g@9RT_z%Pc@D6Dfq;8=5QPuEnhC`N*3NT;-t;JYDfQtc( z=`V*ZkLpo!6VGd00SRML_t(Y$K8}qYZE~j#y2T=^58UdOM-{E zA@yo@m<{$U^qej;hn(CF`+_~0SQz>-ltS5~gyb-vp$GA*egeOY&pQ(<*|eU;Hzb5S zzkUBbGfDp4=m_!tFLGBLH_hU4r2F!^;aEI>s$acvZXr0HJ)jd^ojJ!v5TEw-6Tg_x~z2-4?2k>5LZM4>8y*JZax7;0n zLHQK`3&7B+*Hh>XeH?C5@Lxqby?V2Pg@C+6D^Uv z)`U+>N>AHHjJZOM7osFpW-UD#$r>}70O&%Uw-V4>=;#1zj6mMf{f5Gfm>>XhH^Bkh zL%OU@%uw2k-2_h<(5Ao+Ljq}AEe=?J*OlH@utmOGp#y){p?l&IBrjSC1kE==M+M$< z*4{z79gd8c}Cw{Z-fX@dBs#IL(w=Y5ed2+dbiS>@) z0d(rIE=5n?1^xTj_z2*rQ6?untXoqhFE=u0{i`zbRRBhkE{5ExUJ+HeQ=3vu?!JH3 z`Z6{#qI`HDah@bvg{|wl^ktSY5NmX^Veiy?Au(!o%ID_P8)ZlLK$6JlH7r90*gEiJ z>oLsnv5Af^Cj!8Xfi-L$tf`8BKpeCa_88qBz}C{>TLAzyBm)Y~v7e}6Q$DfAN|BEE zi8v_Nu4sZKQpL}ev-w)j4r59_n<>`VPb-Bcs&MZH-1ID5^O^y%psEpc1Yp8|@GBvd z7W_}6altw_FzRMO?8y-W%BNLIy%`Rf)#m^{3hLjwG{yf)1U}QT3;qF6D2GXZ0l+QN z%ESsYg^Fh%$QEI?Jn0KTFqr_z(Bq8WHMfgOMBqF*7V$a&2o-uIGTas-O}D^*5J~b2 XR@sk%RP-X-00000NkvXXu0mjfiYlXX diff --git a/graphics/pokemon/metagross/mega/front.png b/graphics/pokemon/metagross/mega/front.png index 6ed2cfbebc30f33e2e42d8de98a8817ab2324de0..1ebb0470aad180f323818652db2c8c4356ba1cb2 100644 GIT binary patch delta 1245 zcmV<31S0#^3ZDv)7#0Wv0001;w}I>c0004VQb$4nuFf3kkv=|u1f5AlK~z|UomY#N zqdE*DHc2S7JOBT;SCSo|vxV8Y+0*S5kRm^0rm2`s)8tl)xlg}eHqV4seK-3(1%Pue zrP@+J(cFG`zLesAmTGhFgj!kfZ9g!S@_0b$x*iCN612e2>4?$@#I5Ue3Li0ljbPpcc6C)Vxh$Z#~ z0X^t%cr!^rPHO))vfGHK1SDMq(m+54SO<9GQPPr-0-7k3AQ=ED5r;t#0o?H}37!Iu z0@eL+q>2K6abPl=1=@GK7+9C>4L{jnU@|axc`qqkRxIr#X~9tXVk6vBUf$ti zFkA*lU1QaTjZO@OuC`Hk;HLBaSa=i!JDiJFk|P-8=u_b`q2-5!`-TYn+73LE@|ioO zUgptTy~iDr+qQv)+wK#YcQZg#_F1K^u5qafzv-P43z^vT)m8n~wm5eiAVDBiS!kkr!UC zS4$rT{OKfsaAo@~-k78ycu7Lr@eI5&Pm`D47I@<#LMrIOm}Dq=v}F7E)AO& z_6LD~5pQ?a4}wZt|A-+72t+K<#(Mt;2_$g)vO(bfWg@WoL580Qpi~mRJP7O$$k>FT z0FwY1uE8!JvkQ25f&1GR@p0mGGF%ckoo>oRKJLQ;<_<&9Ab|{*_%*6AD$f0IVN?$} zt>a9%!dIm!N=U`>WFD9)h|$=XfQkRhk5M0gsy|wa{gFCwAFeBn_O@xn!%J^NgzmCy zj6U8hl2;AJGLO?dIk}xDp}^8@aW;~`?YXy~!6uO`l58mZ5so9RxDIC7DTomiMQ8DY z3~H%Xvn$qdVy?)J65GrC?3hnE#Wh&kz)wo2?7n$~SHRc3Ar#01P!&7JfYL00000NkvXX Hu0mjfgeXUa delta 1300 zcmV+v1?&2s3f2mc7$yV*00013M{Ml?0004VQb$4nuFf3k00004XF*Lt006O%3;baP zkuE-e010qNS#tmY4#NNd4#NS*Z>VGd00gf|L_t(Y$90u4Z`(!`$Im3t*_4<_$s`_S zTCLN@y#o)1!Pt zJM`YU0lOE^hmRL^;(h(jZE4*S4GHT}el zX`zyBiNS2-bn`1`u>t07o+!BmSb9Erl;h{|ArYR|T1cs6`UzlK4`z8DMc*8fkRlL& zegazNOB^9^9z~-)AYqCXN(0nI?EJQah){EFfYWS281+zKDMby~oIN_-B?7qC{V19u z(2wT+csx#c29yvk6`LZEr~v{aUoOag=S5g7moW&yA_NbU!7d3iIMV$K$9WLrO}5X9 zVyr+x+Ow0rI7H4)l2q?Id43raPhS>)#qwGJ3!n#am?#9S43zf1&ZEc+wxS+Z?q>Z@{9$fC$(QdRVLK~baOXHhSG^T(?-~4RuINmM7etUuOG_veAoc& z>sEEc8Ko$3>-%YfrZhQ!!uM`_EW^YM!V~Iqr;S4B?@$5`4CV-3=Q6_#IGsRymN%Mm z%4yHe5*UwTH1+pGZB|r}g4qwm9ZhMEnuBM!HJ13u?dlmWISw0xxuebD?XzMz9s@q} z^sMD)NeaORxa+`I1zr|40HxHM2^=$CTiCt3y))EQ0yhF~0%xLs+WJ4?fkpVklGECYC;Cg|6R|icXOSpFP z=pmT5mPm(s4vkl1t0mQZ_A-yA_3hehI1ieWZearY@@ljJh>cn9%^BC7N$Y$RsLc{X z*B&+jHapKpltOdGZ0G2_yt?q=vlsSOj{c|x>dUWuB+v&wA>@BlE<$)GQ2?$P#e^fphs( z>$1QGpX%p-4MJ810ny765jD0Y;PG$<+;1#IBLRkR4!m`UUavoYh(GE#rRNkmM-_Xv zF-dwFa+0M=N#GLXcv1fp{M%7x2bFAz9>foj{*EdOjsw z�j#+!)A@7W6Y}tOcrA7tbCdSK(9DPb2O7mf%NdWxyZh-co!7zvGTO?)Vk)sr!bD z=iokn@bXD|z(+X`f6SofyJHcD{D0TwmUrPx1gm@BUdO*ZEA0(QUMnj1?rwJ2{}-RT zzMi=e?fCx_3F+wGQ`f$C7+Uwf+V`Q?1?;%@G$vpw&A4;#7w}sBgL^+tcDnd*?%s!A zm(Jb$_{&-);M~2B5cJLWKOk`Yse2z{5Q4scdmkn^ckh=J9Nqf`g1&nnCOCKR;{<2! zeRv(QFtqM{kU*`v8P~?We~U*XjbKv{9fP=gue@)6J5?9S1Viku_JF!~wvbT#?>Pn9 zfJ3$G3`J9j#l2@ANpvX`KhHDhkY>Gfb?+2|F}RNX2m{%q0$(=II)`#4VRi4hXwxZw zO374)NY2Cg6D_P@Ml3^`g4V;N*ms+vm4 zFq(GJbMHErM1-0hPw-RUy&E;v<8eB}zX_uz8ayrUxZ^*FzbM@@PabE3pO_JEN->{UI$d3wwWN2YnmJ<@DA1Rsr}OYcdDSn{XBVV%NjqVVx=A zBYnBZ0XYER@};LvSe^uh4|jKb9|#;Syjv9_NDgeWO^;M0#|5yUz$KC0^*FZKCLLUC z?$3QCW-9|+1E3DQU9aDpx2`#{4SReF#o{^#W*R`q>EhwfdlFaXj05I>|KxuQEKLvv zK*$5{Vzc>MT|H>Ddbe?ydOoD`jZ=xjE;d}R#C8_8Fx{*>u-mEs5=pLwUZd*_Z; z!JLcqQ zw$Q`LXn8tiJY>#+Az4o(G97=*rSuNGm!(G}aFCOM=iB#P13W@CEL2{&K?8ush-a~c ze`@GV3rufhG8+3w05nFrlJf-B&=?_iarr};&^cejLG6%A z%QHl&99=i}6x9#;05}rg8hasrL40QY)n4sOn%CH|J8K>5$kObP>K>ZtlJ#qilkd+Of^RMh{7hpm75Hv@a>-w0IHzZux6f8$A^R!a460@|7azfk|0^16MEr|fh} z8tSi2RduU?c@)gQ^`PzPc&0pmpXd{wcyDCS7neB5F(!>YAFc|r+u+eW&DCEI0_o!? zVJS~so$2hmk3D#aa`m6$gD2nRVYQQ2juyXW8GA;SNsOAD58;0*98Uuub7|K}9# z(`6Js_ttkyGfyh&a5H@y_5Ue0>I;c~`;fgy`McUEwn@p%H_Uu??bd96a8W3BRsAtg zVqPp}cCr13u)9E6TuibXZoaws2CY@qpAqIo(}QmD_rN@@s6S|Jn^f1Ur=)fF$l9y@ a5B4vEDudj3#^-_n0000c>cDC*N5CWoahT(}n62_P>_2c*zg7o7T2+IE} zf~Z%-M}R!K`IMjl7IzbjuAV&*Y==6JSO7|Jjq671+5K$crD0!StyCjk2k>#_oTs?hgS0z2}5QoY1_ zYa0mGfTdx7aY52X+VcjudMKl}q`-iYs=%9I^l>Dd1q3gAo{d>&iEi`D^{L$El-ja z`_CN+`mGa6Qz}13R_(u21jPk_4Wcx{{Du90XRR*K86kbioQL;U_Fu>6Zca6ebsqlO z{wpDBH|;_``tZ*FGa~np4~VV1M$f=+>^~D^x8$mw^wQzFvj6J-o$8N$Y;$bRUD$s% z^|ZJ16pnptv+wO)*?+aZ6D5?jd%~_gcV++A_5q^J8DF%q<(c|y|F!#}?Sr*_YizA* zi>-hc`>&k?E`(UujZo<;<_5yv{_DYnyY9i-L$3DW*G5mV|7!lzv6m)@dSCNwEb8X} zx-VJ?*`xC5+GpN#Yw=I@eBAsJp9Fzzs~>w002ovPDHLk FV1gu;{`vp_ delta 1143 zcmV--1c>|32)YT77zqRe0000yDJS*qr3ALvX)l%6p}dF*x?(TWV34sRBe{yfq$0i-Q!k%Jws0D$snL%2L|9Rtwfs%SjKZ`|gDitw1&OXONf zl2$me@jhV0X5#;#b}(s4z$>t0hf?A9wDynO$@}R5Z}@b z{)_4^|M(CpO%`lpjC((lTjT<$HjjVfyfWJo5X~cqO%A-*?Cmb(F>wKSJjWQ;Pvk%x z9FZg4^!lCydE={v7)mkqBc1i5?lp{S?eqsLxh=Rq=>Ji7jzzJgJZ;^fr~R`TvbXJVgEmpRE|KWe-Y5&js zckH8IT$%=Qk6!elhG^?d4P2e3*4S=P$e(r4R&?2;^x}~vMnL6JFx=ij1v_$S#UzVB z`9c1}!8cbn${l+|bt(eT3-)yL(Sw5JDnO(Fxmbh^BDGVLP4dhn)*?VVb`(V&wQNYT zX`5tmpE8ke5AB~j#X|f;8Zdti>A-R^-Qn9aiEev~0F~}qZX?c#ZkhIC2TwQFWcQfo zv_*!*OV7ZgeSX!}Eze3nPScoPkx0Fq2IL7Kx9l@j@VMhzYquqtdSR3rVO;ldqrI;% z&l7#4cpbnWV9jTYEd$o>V|)|xaLEdMh_C(doIP(t?TZm5jI6K?uM>YhP^Zw|<>$=}tx`d@4BHStUj zgf*uJ%kIwvR%d!3E_td4OKPeI*}&p^ep;966Fm^e)!t8IJzyfD+QZI74tv1E=bIG1r3o(#P=Loawo>~fWa@J|nsIXkG7=788R;JB4rmLH9R Date: Wed, 19 Apr 2023 01:52:20 +0200 Subject: [PATCH 061/229] Reusable TMs (#2903) * Reusable TMs * Forgot about Gen9 making TMs expendable again * Change importance check based on Alex's suggestion * Prevent items with importance from being bought more than once * Change importance check to ghoul's suggestion * Update include/config/item.h Co-authored-by: Eduardo Quezada D'Ottone --------- Co-authored-by: Eduardo Quezada D'Ottone --- include/config/item.h | 3 ++ include/strings.h | 2 + src/data/items.h | 100 ++++++++++++++++++++++++++++++++++++++++++ src/party_menu.c | 2 +- src/shop.c | 22 ++++++++-- src/strings.c | 2 + 6 files changed, 126 insertions(+), 5 deletions(-) diff --git a/include/config/item.h b/include/config/item.h index 031af37241..f707b7a540 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -9,6 +9,9 @@ #define I_SITRUS_BERRY_HEAL GEN_LATEST // In Gen4+, Sitrus Berry was changed from healing 30 HP to healing 25% of Max HP. #define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8, the Vitamins no longer have a cap of 100 EV per stat. +// TM config +#define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1. + // Repel/Lure config // These two settings are both independent and complementary. #define VAR_LAST_REPEL_LURE_USED 0 // If this var has been assigned, last Repel/Lure used will be saved and the player will get prompted with the vanilla repel YES/NO option, unless I_REPEL_LURE_MENU is set to TRUE. diff --git a/include/strings.h b/include/strings.h index 959bb8c22d..f17d509e85 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1025,6 +1025,8 @@ extern const u8 gText_ThrowInPremierBall[]; extern const u8 gText_ShopBuy[]; extern const u8 gText_ShopSell[]; extern const u8 gText_ShopQuit[]; +extern const u8 gText_SoldOut[]; +extern const u8 gText_SoldOut2[]; extern const u8 gText_OhABite[]; extern const u8 gText_PokemonOnHook[]; diff --git a/src/data/items.h b/src/data/items.h index fc99e10373..84436be55b 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -7728,6 +7728,7 @@ const struct Item gItems[] = .itemId = ITEM_TM01_FOCUS_PUNCH, .price = 3000, .description = sTM01Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7739,6 +7740,7 @@ const struct Item gItems[] = .itemId = ITEM_TM02_DRAGON_CLAW, .price = 3000, .description = sTM02Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7750,6 +7752,7 @@ const struct Item gItems[] = .itemId = ITEM_TM03_WATER_PULSE, .price = 3000, .description = sTM03Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7761,6 +7764,7 @@ const struct Item gItems[] = .itemId = ITEM_TM04_CALM_MIND, .price = 3000, .description = sTM04Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7772,6 +7776,7 @@ const struct Item gItems[] = .itemId = ITEM_TM05_ROAR, .price = 1000, .description = sTM05Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7783,6 +7788,7 @@ const struct Item gItems[] = .itemId = ITEM_TM06_TOXIC, .price = 3000, .description = sTM06Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7794,6 +7800,7 @@ const struct Item gItems[] = .itemId = ITEM_TM07_HAIL, .price = 3000, .description = sTM07Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7805,6 +7812,7 @@ const struct Item gItems[] = .itemId = ITEM_TM08_BULK_UP, .price = 3000, .description = sTM08Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7816,6 +7824,7 @@ const struct Item gItems[] = .itemId = ITEM_TM09_BULLET_SEED, .price = 3000, .description = sTM09Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7827,6 +7836,7 @@ const struct Item gItems[] = .itemId = ITEM_TM10_HIDDEN_POWER, .price = 3000, .description = sTM10Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7838,6 +7848,7 @@ const struct Item gItems[] = .itemId = ITEM_TM11_SUNNY_DAY, .price = 2000, .description = sTM11Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7849,6 +7860,7 @@ const struct Item gItems[] = .itemId = ITEM_TM12_TAUNT, .price = 3000, .description = sTM12Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7860,6 +7872,7 @@ const struct Item gItems[] = .itemId = ITEM_TM13_ICE_BEAM, .price = 3000, .description = sTM13Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7871,6 +7884,7 @@ const struct Item gItems[] = .itemId = ITEM_TM14_BLIZZARD, .price = 5500, .description = sTM14Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7882,6 +7896,7 @@ const struct Item gItems[] = .itemId = ITEM_TM15_HYPER_BEAM, .price = 7500, .description = sTM15Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7893,6 +7908,7 @@ const struct Item gItems[] = .itemId = ITEM_TM16_LIGHT_SCREEN, .price = 3000, .description = sTM16Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7904,6 +7920,7 @@ const struct Item gItems[] = .itemId = ITEM_TM17_PROTECT, .price = 3000, .description = sTM17Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7915,6 +7932,7 @@ const struct Item gItems[] = .itemId = ITEM_TM18_RAIN_DANCE, .price = 2000, .description = sTM18Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7926,6 +7944,7 @@ const struct Item gItems[] = .itemId = ITEM_TM19_GIGA_DRAIN, .price = 3000, .description = sTM19Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7937,6 +7956,7 @@ const struct Item gItems[] = .itemId = ITEM_TM20_SAFEGUARD, .price = 3000, .description = sTM20Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7948,6 +7968,7 @@ const struct Item gItems[] = .itemId = ITEM_TM21_FRUSTRATION, .price = 1000, .description = sTM21Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7959,6 +7980,7 @@ const struct Item gItems[] = .itemId = ITEM_TM22_SOLAR_BEAM, .price = 3000, .description = sTM22Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7970,6 +7992,7 @@ const struct Item gItems[] = .itemId = ITEM_TM23_IRON_TAIL, .price = 3000, .description = sTM23Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7981,6 +8004,7 @@ const struct Item gItems[] = .itemId = ITEM_TM24_THUNDERBOLT, .price = 3000, .description = sTM24Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7992,6 +8016,7 @@ const struct Item gItems[] = .itemId = ITEM_TM25_THUNDER, .price = 5500, .description = sTM25Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8003,6 +8028,7 @@ const struct Item gItems[] = .itemId = ITEM_TM26_EARTHQUAKE, .price = 3000, .description = sTM26Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8014,6 +8040,7 @@ const struct Item gItems[] = .itemId = ITEM_TM27_RETURN, .price = 1000, .description = sTM27Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8025,6 +8052,7 @@ const struct Item gItems[] = .itemId = ITEM_TM28_DIG, .price = 2000, .description = sTM28Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8036,6 +8064,7 @@ const struct Item gItems[] = .itemId = ITEM_TM29_PSYCHIC, .price = 2000, .description = sTM29Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8047,6 +8076,7 @@ const struct Item gItems[] = .itemId = ITEM_TM30_SHADOW_BALL, .price = 3000, .description = sTM30Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8058,6 +8088,7 @@ const struct Item gItems[] = .itemId = ITEM_TM31_BRICK_BREAK, .price = 3000, .description = sTM31Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8069,6 +8100,7 @@ const struct Item gItems[] = .itemId = ITEM_TM32_DOUBLE_TEAM, .price = 2000, .description = sTM32Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8080,6 +8112,7 @@ const struct Item gItems[] = .itemId = ITEM_TM33_REFLECT, .price = 3000, .description = sTM33Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8091,6 +8124,7 @@ const struct Item gItems[] = .itemId = ITEM_TM34_SHOCK_WAVE, .price = 3000, .description = sTM34Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8102,6 +8136,7 @@ const struct Item gItems[] = .itemId = ITEM_TM35_FLAMETHROWER, .price = 3000, .description = sTM35Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8113,6 +8148,7 @@ const struct Item gItems[] = .itemId = ITEM_TM36_SLUDGE_BOMB, .price = 1000, .description = sTM36Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8124,6 +8160,7 @@ const struct Item gItems[] = .itemId = ITEM_TM37_SANDSTORM, .price = 2000, .description = sTM37Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8135,6 +8172,7 @@ const struct Item gItems[] = .itemId = ITEM_TM38_FIRE_BLAST, .price = 5500, .description = sTM38Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8146,6 +8184,7 @@ const struct Item gItems[] = .itemId = ITEM_TM39_ROCK_TOMB, .price = 3000, .description = sTM39Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8157,6 +8196,7 @@ const struct Item gItems[] = .itemId = ITEM_TM40_AERIAL_ACE, .price = 3000, .description = sTM40Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8168,6 +8208,7 @@ const struct Item gItems[] = .itemId = ITEM_TM41_TORMENT, .price = 3000, .description = sTM41Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8179,6 +8220,7 @@ const struct Item gItems[] = .itemId = ITEM_TM42_FACADE, .price = 3000, .description = sTM42Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8190,6 +8232,7 @@ const struct Item gItems[] = .itemId = ITEM_TM43_SECRET_POWER, .price = 3000, .description = sTM43Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8201,6 +8244,7 @@ const struct Item gItems[] = .itemId = ITEM_TM44_REST, .price = 3000, .description = sTM44Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8212,6 +8256,7 @@ const struct Item gItems[] = .itemId = ITEM_TM45_ATTRACT, .price = 3000, .description = sTM45Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8223,6 +8268,7 @@ const struct Item gItems[] = .itemId = ITEM_TM46_THIEF, .price = 3000, .description = sTM46Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8234,6 +8280,7 @@ const struct Item gItems[] = .itemId = ITEM_TM47_STEEL_WING, .price = 3000, .description = sTM47Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8245,6 +8292,7 @@ const struct Item gItems[] = .itemId = ITEM_TM48_SKILL_SWAP, .price = 3000, .description = sTM48Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8256,6 +8304,7 @@ const struct Item gItems[] = .itemId = ITEM_TM49_SNATCH, .price = 3000, .description = sTM49Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8267,6 +8316,7 @@ const struct Item gItems[] = .itemId = ITEM_TM50_OVERHEAT, .price = 3000, .description = sTM50Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8278,6 +8328,7 @@ const struct Item gItems[] = .itemId = ITEM_TM51, .price = 3000, .description = sTM51Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8289,6 +8340,7 @@ const struct Item gItems[] = .itemId = ITEM_TM52, .price = 3000, .description = sTM52Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8300,6 +8352,7 @@ const struct Item gItems[] = .itemId = ITEM_TM53, .price = 3000, .description = sTM53Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8311,6 +8364,7 @@ const struct Item gItems[] = .itemId = ITEM_TM54, .price = 3000, .description = sTM54Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8322,6 +8376,7 @@ const struct Item gItems[] = .itemId = ITEM_TM55, .price = 3000, .description = sTM55Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8333,6 +8388,7 @@ const struct Item gItems[] = .itemId = ITEM_TM56, .price = 3000, .description = sTM56Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8344,6 +8400,7 @@ const struct Item gItems[] = .itemId = ITEM_TM57, .price = 3000, .description = sTM57Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8355,6 +8412,7 @@ const struct Item gItems[] = .itemId = ITEM_TM58, .price = 3000, .description = sTM58Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8366,6 +8424,7 @@ const struct Item gItems[] = .itemId = ITEM_TM59, .price = 3000, .description = sTM59Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8377,6 +8436,7 @@ const struct Item gItems[] = .itemId = ITEM_TM60, .price = 3000, .description = sTM60Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8388,6 +8448,7 @@ const struct Item gItems[] = .itemId = ITEM_TM61, .price = 3000, .description = sTM61Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8399,6 +8460,7 @@ const struct Item gItems[] = .itemId = ITEM_TM62, .price = 3000, .description = sTM62Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8410,6 +8472,7 @@ const struct Item gItems[] = .itemId = ITEM_TM63, .price = 3000, .description = sTM63Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8421,6 +8484,7 @@ const struct Item gItems[] = .itemId = ITEM_TM64, .price = 3000, .description = sTM64Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8432,6 +8496,7 @@ const struct Item gItems[] = .itemId = ITEM_TM65, .price = 3000, .description = sTM65Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8443,6 +8508,7 @@ const struct Item gItems[] = .itemId = ITEM_TM66, .price = 3000, .description = sTM66Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8454,6 +8520,7 @@ const struct Item gItems[] = .itemId = ITEM_TM67, .price = 3000, .description = sTM67Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8465,6 +8532,7 @@ const struct Item gItems[] = .itemId = ITEM_TM68, .price = 3000, .description = sTM68Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8476,6 +8544,7 @@ const struct Item gItems[] = .itemId = ITEM_TM69, .price = 3000, .description = sTM69Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8487,6 +8556,7 @@ const struct Item gItems[] = .itemId = ITEM_TM70, .price = 3000, .description = sTM70Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8498,6 +8568,7 @@ const struct Item gItems[] = .itemId = ITEM_TM71, .price = 3000, .description = sTM71Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8509,6 +8580,7 @@ const struct Item gItems[] = .itemId = ITEM_TM72, .price = 3000, .description = sTM72Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8520,6 +8592,7 @@ const struct Item gItems[] = .itemId = ITEM_TM73, .price = 3000, .description = sTM73Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8531,6 +8604,7 @@ const struct Item gItems[] = .itemId = ITEM_TM74, .price = 3000, .description = sTM74Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8542,6 +8616,7 @@ const struct Item gItems[] = .itemId = ITEM_TM75, .price = 3000, .description = sTM75Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8553,6 +8628,7 @@ const struct Item gItems[] = .itemId = ITEM_TM76, .price = 3000, .description = sTM76Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8564,6 +8640,7 @@ const struct Item gItems[] = .itemId = ITEM_TM77, .price = 3000, .description = sTM77Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8575,6 +8652,7 @@ const struct Item gItems[] = .itemId = ITEM_TM78, .price = 3000, .description = sTM78Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8586,6 +8664,7 @@ const struct Item gItems[] = .itemId = ITEM_TM79, .price = 3000, .description = sTM79Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8597,6 +8676,7 @@ const struct Item gItems[] = .itemId = ITEM_TM80, .price = 3000, .description = sTM80Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8608,6 +8688,7 @@ const struct Item gItems[] = .itemId = ITEM_TM81, .price = 3000, .description = sTM81Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8619,6 +8700,7 @@ const struct Item gItems[] = .itemId = ITEM_TM82, .price = 3000, .description = sTM82Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8630,6 +8712,7 @@ const struct Item gItems[] = .itemId = ITEM_TM83, .price = 3000, .description = sTM83Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8641,6 +8724,7 @@ const struct Item gItems[] = .itemId = ITEM_TM84, .price = 3000, .description = sTM84Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8652,6 +8736,7 @@ const struct Item gItems[] = .itemId = ITEM_TM85, .price = 3000, .description = sTM85Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8663,6 +8748,7 @@ const struct Item gItems[] = .itemId = ITEM_TM86, .price = 3000, .description = sTM86Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8674,6 +8760,7 @@ const struct Item gItems[] = .itemId = ITEM_TM87, .price = 3000, .description = sTM87Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8685,6 +8772,7 @@ const struct Item gItems[] = .itemId = ITEM_TM88, .price = 3000, .description = sTM88Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8696,6 +8784,7 @@ const struct Item gItems[] = .itemId = ITEM_TM89, .price = 3000, .description = sTM89Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8707,6 +8796,7 @@ const struct Item gItems[] = .itemId = ITEM_TM90, .price = 3000, .description = sTM90Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8718,6 +8808,7 @@ const struct Item gItems[] = .itemId = ITEM_TM91, .price = 3000, .description = sTM91Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8729,6 +8820,7 @@ const struct Item gItems[] = .itemId = ITEM_TM92, .price = 3000, .description = sTM92Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8740,6 +8832,7 @@ const struct Item gItems[] = .itemId = ITEM_TM93, .price = 3000, .description = sTM93Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8751,6 +8844,7 @@ const struct Item gItems[] = .itemId = ITEM_TM94, .price = 3000, .description = sTM94Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8762,6 +8856,7 @@ const struct Item gItems[] = .itemId = ITEM_TM95, .price = 3000, .description = sTM95Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8773,6 +8868,7 @@ const struct Item gItems[] = .itemId = ITEM_TM96, .price = 3000, .description = sTM96Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8784,6 +8880,7 @@ const struct Item gItems[] = .itemId = ITEM_TM97, .price = 3000, .description = sTM97Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8795,6 +8892,7 @@ const struct Item gItems[] = .itemId = ITEM_TM98, .price = 3000, .description = sTM98Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8806,6 +8904,7 @@ const struct Item gItems[] = .itemId = ITEM_TM99, .price = 3000, .description = sTM99Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8817,6 +8916,7 @@ const struct Item gItems[] = .itemId = ITEM_TM100, .price = 3000, .description = sTM100Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, diff --git a/src/party_menu.c b/src/party_menu.c index a7ab305450..3cc3efdcdd 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5090,7 +5090,7 @@ static void Task_LearnedMove(u8 taskId) if (move[1] == 0) { AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM); - if (item < ITEM_HM01_CUT) + if (!ItemId_GetImportance(item)) RemoveBagItem(item, 1); } GetMonNickname(mon, gStringVar1); diff --git a/src/shop.c b/src/shop.c index 8fea1e1178..6f4e093562 100644 --- a/src/shop.c +++ b/src/shop.c @@ -639,7 +639,10 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) 5); } - StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); + if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) + StringCopy(gStringVar4, gText_SoldOut2); + else + StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 120); AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[COLORID_ITEM_LIST], TEXT_SKIP_DRAW, gStringVar4); } @@ -989,7 +992,9 @@ static void Task_BuyMenu(u8 taskId) else sShopData->totalCost = gDecorations[itemId].price; - if (!IsEnoughMoney(&gSaveBlock1Ptr->money, sShopData->totalCost)) + if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) + BuyMenuDisplayMessage(taskId, gText_SoldOut, BuyMenuReturnToItemList); + else if (!IsEnoughMoney(&gSaveBlock1Ptr->money, sShopData->totalCost)) { BuyMenuDisplayMessage(taskId, gText_YouDontHaveMoney, BuyMenuReturnToItemList); } @@ -998,7 +1003,15 @@ static void Task_BuyMenu(u8 taskId) if (sMartInfo.martType == MART_TYPE_NORMAL) { CopyItemName(itemId, gStringVar1); - if (ItemId_GetPocket(itemId) == POCKET_TM_HM) + if (ItemId_GetImportance(itemId)) + { + ConvertIntToDecimalStringN(gStringVar2, sShopData->totalCost, STR_CONV_MODE_LEFT_ALIGN, 6); + StringExpandPlaceholders(gStringVar4, gText_YouWantedVar1ThatllBeVar2); + tItemCount = 1; + sShopData->totalCost = (ItemId_GetPrice(tItemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT)) * tItemCount; + BuyMenuDisplayMessage(taskId, gStringVar4, BuyMenuConfirmPurchase); + } + else if (ItemId_GetPocket(itemId) == POCKET_TM_HM) { StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(itemId)]); BuyMenuDisplayMessage(taskId, gText_Var1CertainlyHowMany2, Task_BuyHowManyDialogueInit); @@ -1103,8 +1116,8 @@ static void BuyMenuTryMakePurchase(u8 taskId) { if (AddBagItem(tItemId, tItemCount) == TRUE) { - BuyMenuDisplayMessage(taskId, gText_HereYouGoThankYou, BuyMenuSubtractMoney); RecordItemPurchase(taskId); + BuyMenuDisplayMessage(taskId, gText_HereYouGoThankYou, BuyMenuSubtractMoney); } else { @@ -1170,6 +1183,7 @@ static void BuyMenuReturnToItemList(u8 taskId) s16 *data = gTasks[taskId].data; ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + RedrawListMenu(tListTaskId); BuyMenuPrintCursor(tListTaskId, COLORID_ITEM_LIST); PutWindowTilemap(WIN_ITEM_LIST); PutWindowTilemap(WIN_ITEM_DESCRIPTION); diff --git a/src/strings.c b/src/strings.c index 847b2849a6..dd632a32bd 100644 --- a/src/strings.c +++ b/src/strings.c @@ -341,6 +341,8 @@ const u8 gText_Var1DisdainfullyAteVar2[] = _("{STR_VAR_1} disdainfully ate the\n const u8 gText_ShopBuy[] = _("BUY"); const u8 gText_ShopSell[] = _("SELL"); const u8 gText_ShopQuit[] = _("QUIT"); +const u8 gText_SoldOut[] = _("I'm sorry, but that item is sold out.\p"); +const u8 gText_SoldOut2[] = _("SOLD OUT"); const u8 gText_InBagVar1[] = _("IN BAG: {STR_VAR_1}"); const u8 gText_QuitShopping[] = _("Quit shopping."); const u8 gText_Var1CertainlyHowMany[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?"); From 52ce39924051c3a94f96eabb4ac9fb5b7edebf81 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Wed, 19 Apr 2023 17:01:00 +0200 Subject: [PATCH 062/229] Fix TM reusability shortcomings (#2930) --- include/strings.h | 2 +- src/shop.c | 4 ++-- src/strings.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/strings.h b/include/strings.h index f17d509e85..72109ed945 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1025,8 +1025,8 @@ extern const u8 gText_ThrowInPremierBall[]; extern const u8 gText_ShopBuy[]; extern const u8 gText_ShopSell[]; extern const u8 gText_ShopQuit[]; +extern const u8 gText_ThatItemIsSoldOut[]; extern const u8 gText_SoldOut[]; -extern const u8 gText_SoldOut2[]; extern const u8 gText_OhABite[]; extern const u8 gText_PokemonOnHook[]; diff --git a/src/shop.c b/src/shop.c index 6f4e093562..b4978f063e 100644 --- a/src/shop.c +++ b/src/shop.c @@ -640,7 +640,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) } if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) - StringCopy(gStringVar4, gText_SoldOut2); + StringCopy(gStringVar4, gText_SoldOut); else StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 120); @@ -993,7 +993,7 @@ static void Task_BuyMenu(u8 taskId) sShopData->totalCost = gDecorations[itemId].price; if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) - BuyMenuDisplayMessage(taskId, gText_SoldOut, BuyMenuReturnToItemList); + BuyMenuDisplayMessage(taskId, gText_ThatItemIsSoldOut, BuyMenuReturnToItemList); else if (!IsEnoughMoney(&gSaveBlock1Ptr->money, sShopData->totalCost)) { BuyMenuDisplayMessage(taskId, gText_YouDontHaveMoney, BuyMenuReturnToItemList); diff --git a/src/strings.c b/src/strings.c index dd632a32bd..75ff2ef994 100644 --- a/src/strings.c +++ b/src/strings.c @@ -341,8 +341,8 @@ const u8 gText_Var1DisdainfullyAteVar2[] = _("{STR_VAR_1} disdainfully ate the\n const u8 gText_ShopBuy[] = _("BUY"); const u8 gText_ShopSell[] = _("SELL"); const u8 gText_ShopQuit[] = _("QUIT"); -const u8 gText_SoldOut[] = _("I'm sorry, but that item is sold out.\p"); -const u8 gText_SoldOut2[] = _("SOLD OUT"); +const u8 gText_ThatItemIsSoldOut[] = _("I'm sorry, but that item is sold out.{PAUSE_UNTIL_PRESS}"); +const u8 gText_SoldOut[] = _("SOLD OUT"); const u8 gText_InBagVar1[] = _("IN BAG: {STR_VAR_1}"); const u8 gText_QuitShopping[] = _("Quit shopping."); const u8 gText_Var1CertainlyHowMany[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?"); From d3fed5639b4b56836221ccf6232387e2d63a3eed Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:54:57 -0700 Subject: [PATCH 063/229] Added config to enable NEW_ROCKS_PARTICLE (#2929) Co-authored-by: LOuroboros --- include/config/battle.h | 1 + src/data/battle_anim.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index ad31621623..3e9ec9b9a5 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -195,6 +195,7 @@ #define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. #define B_NEW_LEECH_SEED_PARTICLE FALSE // If set to TRUE, it updates Leech Seed's animation particle. #define B_NEW_HORN_ATTACK_PARTICLE FALSE // If set to TRUE, it updates Horn Attack's horn particle. +#define B_NEW_ROCKS_PARTICLE TRUE // If set to TRUE, it updates rock particles. #define B_NEW_LEAF_PARTICLE FALSE // If set to TRUE, it updates leaf particle. #define B_NEW_EMBER_PARTICLES FALSE // If set to TRUE, it updates Ember's fire particle. #define B_NEW_MEAN_LOOK_PARTICLE FALSE // If set to TRUE, it updates Mean Look's eye particle. diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h index b1f158310a..46293e3a0a 100644 --- a/src/data/battle_anim.h +++ b/src/data/battle_anim.h @@ -1079,7 +1079,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE +#if B_NEW_ROCKS_PARTICLE == TRUE {gBattleAnimSpriteGfx_NewRocks, 0x0C00, ANIM_TAG_ROCKS}, #else {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, @@ -1529,7 +1529,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE +#if B_NEW_ROCKS_PARTICLE == TRUE {gBattleAnimSpritePal_NewRocks, ANIM_TAG_ROCKS}, #else {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, From 216b7a4dfd4521104ca4f1a2a07bf58fd56539a7 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Thu, 20 Apr 2023 09:44:18 +0200 Subject: [PATCH 064/229] fix dire hit and paralyze heal --- src/item.c | 2 ++ src/item_use.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/item.c b/src/item.c index da57c40766..b2b19480a3 100644 --- a/src/item.c +++ b/src/item.c @@ -973,6 +973,8 @@ u32 GetItemStatus1Mask(u16 itemId) const u8 *effect = GetItemEffect(itemId); switch (effect[3]) { + case ITEM3_PARALYSIS: + return STATUS1_PARALYSIS; case ITEM3_FREEZE: return STATUS1_FREEZE; case ITEM3_BURN: diff --git a/src/item_use.c b/src/item_use.c index 8bcadfb2eb..3a838288b1 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -1154,7 +1154,7 @@ static bool32 CannotUseBagBattleItem(u16 itemId) } // Dire Hit if (battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY - && !(gBattleMons[gBattlerInMenuId].status2 & STATUS2_FOCUS_ENERGY)) + && (gBattleMons[gBattlerInMenuId].status2 & STATUS2_FOCUS_ENERGY)) { cannotUse++; } From 3aec63b8cfb23b0983b92ba03e89c31db84b20a1 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 20 Apr 2023 15:08:42 +0200 Subject: [PATCH 065/229] new define to restore items after battle --- include/battle.h | 4 ++-- include/battle_util.h | 2 +- include/config/battle.h | 1 + src/battle_main.c | 6 +++--- src/battle_script_commands.c | 14 +++++++------- src/battle_util.c | 18 ++++++++++-------- 6 files changed, 24 insertions(+), 21 deletions(-) diff --git a/include/battle.h b/include/battle.h index 46975bec3c..f86a5c975c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -517,7 +517,7 @@ struct ZMoveData u8 splits[MAX_BATTLERS_COUNT]; }; -struct StolenItem +struct LostItem { u16 originalItem:15; u16 stolen:1; @@ -640,7 +640,7 @@ struct BattleStruct u16 moveEffect2; // For Knock Off u16 changedSpecies[PARTY_SIZE]; // For Zygarde or future forms when multiple mons can change into the same pokemon. u8 quickClawBattlerId; - struct StolenItem itemStolen[PARTY_SIZE]; // Player's team that had items stolen (two bytes per party member) + struct LostItem itemLost[PARTY_SIZE]; // Player's team that had items consumed or stolen (two bytes per party member) u8 blunderPolicy:1; // should blunder policy activate u8 swapDamageCategory:1; // Photon Geyser, Shell Side Arm, Light That Burns the Sky u8 forcedSwitch:4; // For each battler diff --git a/include/battle_util.h b/include/battle_util.h index 0661081e43..b83209a697 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -197,7 +197,7 @@ bool32 IsPartnerMonFromSameTrainer(u8 battlerId); u8 GetSplitBasedOnStats(u8 battlerId); void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast); bool32 TestSheerForceFlag(u8 battler, u16 move); -void TryRestoreStolenItems(void); +void TryRestoreHeldItems(void); bool32 CanStealItem(u8 battlerStealing, u8 battlerItem, u16 item); void TrySaveExchangedItem(u8 battlerId, u16 stolenItem); bool32 IsPartnerMonFromSameTrainer(u8 battlerId); diff --git a/include/config/battle.h b/include/config/battle.h index 3e9ec9b9a5..4bead3ae83 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -126,6 +126,7 @@ #define B_X_ITEMS_BUFF GEN_LATEST // In Gen7+, the X Items raise a stat by 2 stages instead of 1. #define B_MENTAL_HERB GEN_LATEST // In Gen5+, the Mental Herb cures Taunt, Encore, Torment, Heal Block, and Disable in addition to Infatuation from before. #define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items. +#define B_RESTORE_HELD_BATTLE_ITEMS TRUE // In Gen9 all non berry items are restored after battle. #define B_SOUL_DEW_BOOST GEN_LATEST // In Gens3-6, Soul Dew boosts Lati@s' Sp. Atk and Sp. Def. In Gen7+ it boosts the power of their Psychic and Dragon type moves instead. #define B_NET_BALL_MODIFIER GEN_LATEST // In Gen7+, Net Ball's catch multiplier is x5 instead of x3. #define B_DIVE_BALL_MODIFIER GEN_LATEST // In Gen4+, Dive Ball's effectiveness increases by when Surfing or Fishing. diff --git a/src/battle_main.c b/src/battle_main.c index a5a9b5bbf6..01d79db3eb 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3189,7 +3189,7 @@ static void BattleStartClearSetData(void) { gBattleStruct->usedHeldItems[i][B_SIDE_PLAYER] = 0; gBattleStruct->usedHeldItems[i][B_SIDE_OPPONENT] = 0; - gBattleStruct->itemStolen[i].originalItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + gBattleStruct->itemLost[i].originalItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); gPartyCriticalHits[i] = 0; gBattleStruct->allowedToChangeFormInWeather[i][B_SIDE_PLAYER] = FALSE; gBattleStruct->allowedToChangeFormInWeather[i][B_SIDE_OPPONENT] = FALSE; @@ -5387,9 +5387,9 @@ static void HandleEndTurn_FinishBattle(void) TestRunner_Battle_AfterLastTurn(); BeginFastPaletteFade(3); FadeOutMapMusic(5); - #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE + #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE || B_RESTORE_HELD_BATTLE_ITEMS == TRUE if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) - TryRestoreStolenItems(); + TryRestoreHeldItems(); #endif for (i = 0; i < PARTY_SIZE; i++) { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4e1494ce38..228cbb8120 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7892,7 +7892,7 @@ static void BestowItem(u32 battlerAtk, u32 battlerDef) // Called by Cmd_removeitem. itemId represents the item that was removed, not being given. static bool32 TrySymbiosis(u32 battler, u32 itemId) { - if (!gBattleStruct->itemStolen[gBattlerPartyIndexes[battler]].stolen + if (!gBattleStruct->itemLost[gBattlerPartyIndexes[battler]].stolen && gBattleStruct->changedItems[battler] == ITEM_NONE && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_BUTTON && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_PACK @@ -11264,7 +11264,7 @@ static void Cmd_various(void) // Open party menu, wait to go to next instruction. else - { + { BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CHOOSE_FAINTED_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gBattlerAttacker]); MarkBattlerForControllerExec(gBattlerAttacker); } @@ -16469,7 +16469,7 @@ void BS_ItemRestoreHP(void) { } if (hp + healAmount > maxHP) healAmount = maxHP - hp; - + // Heal is applied as move damage if battler is active. if (battlerId != MAX_BATTLERS_COUNT && hp != 0) { @@ -16494,10 +16494,10 @@ void BS_ItemRestoreHP(void) { void BS_ItemCureStatus(void) { NATIVE_ARGS(); struct Pokemon *party = (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - + // Heal Status1 conditions. HealStatusConditions(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], gBattleStruct->itemPartyIndex[gBattlerAttacker], GetItemStatus1Mask(gLastUsedItem), gBattlerAttacker); - + // Heal Status2 conditions if battler is active. if (gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[gBattlerAttacker]) { @@ -16506,10 +16506,10 @@ void BS_ItemCureStatus(void) { else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)]) { - gBattleMons[gBattlerAttacker].status2 &= ~GetItemStatus2Mask(gLastUsedItem); + gBattleMons[gBattlerAttacker].status2 &= ~GetItemStatus2Mask(gLastUsedItem); gBattlerTarget = BATTLE_PARTNER(gBattlerAttacker); } - + if (GetItemStatus1Mask(gLastUsedItem) & STATUS1_SLEEP) gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; diff --git a/src/battle_util.c b/src/battle_util.c index ac274bf0f8..e057b78dc3 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10536,18 +10536,20 @@ void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast) } } -void TryRestoreStolenItems(void) +void TryRestoreHeldItems(void) { u32 i; - u16 stolenItem = ITEM_NONE; + u16 lostItem = ITEM_NONE; for (i = 0; i < PARTY_SIZE; i++) { - if (gBattleStruct->itemStolen[i].stolen) + #if B_RESTORE_HELD_BATTLE_ITEMS == FALSE + if (gBattleStruct->itemLost[i].stolen) + #endif { - stolenItem = gBattleStruct->itemStolen[i].originalItem; - if (stolenItem != ITEM_NONE && ItemId_GetPocket(stolenItem) != POCKET_BERRIES) - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &stolenItem); // Restore stolen non-berry items + lostItem = gBattleStruct->itemLost[i].originalItem; + if (lostItem != ITEM_NONE && ItemId_GetPocket(lostItem) != POCKET_BERRIES) + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &lostItem); // Restore stolen non-berry items } } } @@ -10601,8 +10603,8 @@ void TrySaveExchangedItem(u8 battlerId, u16 stolenItem) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && GetBattlerSide(battlerId) == B_SIDE_PLAYER - && stolenItem == gBattleStruct->itemStolen[gBattlerPartyIndexes[battlerId]].originalItem) - gBattleStruct->itemStolen[gBattlerPartyIndexes[battlerId]].stolen = TRUE; + && stolenItem == gBattleStruct->itemLost[gBattlerPartyIndexes[battlerId]].originalItem) + gBattleStruct->itemLost[gBattlerPartyIndexes[battlerId]].stolen = TRUE; #endif } From 6c7f5881e453631a1f336618b7e0120c33b7f140 Mon Sep 17 00:00:00 2001 From: citrusbolt <32605812+citrusbolt@users.noreply.github.com> Date: Thu, 20 Apr 2023 08:05:32 -0600 Subject: [PATCH 066/229] Add two EV-related configs (#2825) --- include/config/item.h | 13 +++++++------ include/config/pokemon.h | 1 + include/constants/pokemon.h | 4 ++++ src/pokemon.c | 12 ++++++++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/include/config/item.h b/include/config/item.h index f707b7a540..09008d0f24 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -2,12 +2,13 @@ #define GUARD_CONFIG_ITEM_H // Item config -#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects. -#define I_KEY_FOSSILS GEN_LATEST // In Gen4+, all Gen 3 fossils became regular items. -#define I_KEY_ESCAPE_ROPE GEN_LATEST // In Gen8, Escape Rope became a Key Item. Keep in mind, this will make it free to buy in marts. -#define I_HEALTH_RECOVERY GEN_LATEST // In Gen7+, certain healing items recover a different amount of HP than they used to. -#define I_SITRUS_BERRY_HEAL GEN_LATEST // In Gen4+, Sitrus Berry was changed from healing 30 HP to healing 25% of Max HP. -#define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8, the Vitamins no longer have a cap of 100 EV per stat. +#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects. +#define I_KEY_FOSSILS GEN_LATEST // In Gen4+, all Gen 3 fossils became regular items. +#define I_KEY_ESCAPE_ROPE GEN_LATEST // In Gen8, Escape Rope became a Key Item. Keep in mind, this will make it free to buy in marts. +#define I_HEALTH_RECOVERY GEN_LATEST // In Gen7+, certain healing items recover a different amount of HP than they used to. +#define I_SITRUS_BERRY_HEAL GEN_LATEST // In Gen4+, Sitrus Berry was changed from healing 30 HP to healing 25% of Max HP. +#define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8+, the Vitamins no longer have a cap of 100 EV per stat. +#define I_BERRY_EV_JUMP GEN_LATEST // In Gen4 only, EV-lowering Berries lower a stat's EV to 100 if it is above 100. // TM config #define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1. diff --git a/include/config/pokemon.h b/include/config/pokemon.h index ce5faf2a6e..1cde573c96 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -21,6 +21,7 @@ // Other settings #define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. +#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255. // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index cf6cc8751b..ddf879854e 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -201,7 +201,11 @@ #define MAX_PER_STAT_IVS 31 #define MAX_IV_MASK 31 #define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) +#if P_EV_CAP >= GEN_6 +#define MAX_PER_STAT_EVS 252 +#else #define MAX_PER_STAT_EVS 255 +#endif #define MAX_TOTAL_EVS 510 #if I_VITAMIN_EV_CAP >= GEN_8 #define EV_ITEM_RAISE_LIMIT MAX_PER_STAT_EVS diff --git a/src/pokemon.c b/src/pokemon.c index 46eca90b29..e82cb98c30 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5854,7 +5854,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (itemEffect[10] & ITEM10_IS_VITAMIN) evCap = EV_ITEM_RAISE_LIMIT; else - evCap = 252; + evCap = MAX_PER_STAT_EVS; if (dataSigned >= evCap) break; @@ -5880,6 +5880,10 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } dataSigned += evChange; + #if I_EV_LOWERING_BERRY_JUMP == GEN_4 + if (dataSigned > 100) + dataSigned = 100; + #endif if (dataSigned < 0) dataSigned = 0; } @@ -6030,7 +6034,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (itemEffect[10] & ITEM10_IS_VITAMIN) evCap = EV_ITEM_RAISE_LIMIT; else - evCap = 252; + evCap = MAX_PER_STAT_EVS; if (dataSigned >= evCap) break; @@ -6056,6 +6060,10 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } dataSigned += evChange; + #if I_BERRY_EV_JUMP == GEN_4 + if (dataSigned > 100) + dataSigned = 100; + #endif if (dataSigned < 0) dataSigned = 0; } From ae80d545c5b4f2f86baf702d4527d88c11b935b0 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 20 Apr 2023 16:12:11 +0200 Subject: [PATCH 067/229] Support for multi battles where Trainer has only one mon (#2670) --- src/battle_controller_opponent.c | 12 +++++++----- src/battle_interface.c | 5 +++++ src/battle_main.c | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index cb0499ac8f..4eda81b094 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -228,9 +228,11 @@ static void Intro_DelayAndEnd(void) } } -static bool32 TwoIntroMons(u32 battlerId) // Double battle with both player pokemon active. +static bool32 TwoIntroMons(u32 battlerId) // Double battle with both opponent pokemon active. { - return (IsDoubleBattle() && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]])); + return (IsDoubleBattle() + && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[battlerId]]) + && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]])); } static void Intro_WaitForShinyAnimAndHealthbox(void) @@ -1969,7 +1971,7 @@ static void SpriteCB_FreeOpponentSprite(struct Sprite *sprite) static void Task_StartSendOutAnim(u8 taskId) { - u8 savedActiveBank = gActiveBattler; + u8 savedActiveBattler = gActiveBattler; gActiveBattler = gTasks[taskId].data[0]; if ((!TwoIntroMons(gActiveBattler) || (gBattleTypeFlags & BATTLE_TYPE_MULTI)) && !BATTLE_TWO_VS_ONE_OPPONENT) @@ -1977,7 +1979,7 @@ static void Task_StartSendOutAnim(u8 taskId) gBattleResources->bufferA[gActiveBattler][1] = gBattlerPartyIndexes[gActiveBattler]; StartSendOutAnim(gActiveBattler, FALSE); } - else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)) + else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) || (BATTLE_TWO_VS_ONE_OPPONENT && !TwoIntroMons(gActiveBattler))) { gBattleResources->bufferA[gActiveBattler][1] = gBattlerPartyIndexes[gActiveBattler]; StartSendOutAnim(gActiveBattler, FALSE); @@ -1992,7 +1994,7 @@ static void Task_StartSendOutAnim(u8 taskId) gActiveBattler ^= BIT_FLANK; } gBattlerControllerFuncs[gActiveBattler] = Intro_TryShinyAnimShowHealthbox; - gActiveBattler = savedActiveBank; + gActiveBattler = savedActiveBattler; DestroyTask(taskId); } diff --git a/src/battle_interface.c b/src/battle_interface.c index 7f7e1d20f0..bbe61a3727 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -690,12 +690,17 @@ static void InitLastUsedBallAssets(void) } // 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. +// The same goes for a 2 vs 1 where opponent has only one pokemon. u32 WhichBattleCoords(u32 battlerId) // 0 - singles, 1 - doubles { if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT && gPlayerPartyCount == 1 && !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) return 0; + else if (GetBattlerPosition(battlerId) == B_POSITION_OPPONENT_LEFT + && gEnemyPartyCount == 1 + && !(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)) + return 0; else return IsDoubleBattle(); } diff --git a/src/battle_main.c b/src/battle_main.c index a5a9b5bbf6..2eecda65b2 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -594,6 +594,7 @@ static void CB2_InitBattleInternal(void) if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && !BATTLE_TWO_VS_ONE_OPPONENT) CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE); SetWildMonHeldItem(); + CalculateEnemyPartyCount(); } gMain.inBattle = TRUE; From 76f02774ea645eb285731b49f9c829bc17341b8b Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 20 Apr 2023 20:35:22 +0100 Subject: [PATCH 068/229] Detect memory leaks in tests Can use KNOWN_LEAKING; to specify that a test is known to leak memory. The location information is available in regular game builds. Thus it is available for use in debugging leaks in-game too. In the future we should consider replacing it with NULL if NDEBUG is defined. This is not currently possible because the tests do not force NDEBUG to be undefined. --- gflib/malloc.c | 69 +++++++++++++++++++-------------------- gflib/malloc.h | 41 +++++++++++++++++++++-- include/gba/defines.h | 3 ++ include/global.h | 3 ++ test/test.h | 5 +++ test/test_battle.h | 1 + test/test_runner.c | 26 +++++++++++++++ test/test_runner_battle.c | 10 ++++++ 8 files changed, 120 insertions(+), 38 deletions(-) diff --git a/gflib/malloc.c b/gflib/malloc.c index d0b9497635..dcfac6ee81 100644 --- a/gflib/malloc.c +++ b/gflib/malloc.c @@ -1,37 +1,18 @@ #include "global.h" +#include "malloc.h" static void *sHeapStart; static u32 sHeapSize; -#define MALLOC_SYSTEM_ID 0xA3A3 - -struct MemBlock { - // Whether this block is currently allocated. - bool16 flag; - - // Magic number used for error checking. Should equal MALLOC_SYSTEM_ID. - u16 magic; - - // Size of the block (not including this header struct). - u32 size; - - // Previous block pointer. Equals sHeapStart if this is the first block. - struct MemBlock *prev; - - // Next block pointer. Equals sHeapStart if this is the last block. - struct MemBlock *next; - - // Data in the memory block. (Arrays of length 0 are a GNU extension.) - u8 data[0]; -}; - void PutMemBlockHeader(void *block, struct MemBlock *prev, struct MemBlock *next, u32 size) { struct MemBlock *header = (struct MemBlock *)block; - header->flag = FALSE; + header->allocated = FALSE; + header->locationHi = 0; header->magic = MALLOC_SYSTEM_ID; header->size = size; + header->locationLo = 0; header->prev = prev; header->next = next; } @@ -41,7 +22,7 @@ void PutFirstMemBlockHeader(void *block, u32 size) PutMemBlockHeader(block, (struct MemBlock *)block, (struct MemBlock *)block, size - sizeof(struct MemBlock)); } -void *AllocInternal(void *heapStart, u32 size) +void *AllocInternal(void *heapStart, u32 size, const char *location) { struct MemBlock *pos = (struct MemBlock *)heapStart; struct MemBlock *head = pos; @@ -55,14 +36,14 @@ void *AllocInternal(void *heapStart, u32 size) for (;;) { // Loop through the blocks looking for unused block that's big enough. - if (!pos->flag) { + if (!pos->allocated) { foundBlockSize = pos->size; if (foundBlockSize >= size) { if (foundBlockSize - size < 2 * sizeof(struct MemBlock)) { // The block isn't much bigger than the requested size, // so just use it. - pos->flag = TRUE; + pos->allocated = TRUE; } else { // The block is significantly bigger than the requested // size, so split the rest into a separate block. @@ -71,7 +52,7 @@ void *AllocInternal(void *heapStart, u32 size) splitBlock = (struct MemBlock *)(pos->data + size); - pos->flag = TRUE; + pos->allocated = TRUE; pos->size = size; PutMemBlockHeader(splitBlock, pos, pos->next, foundBlockSize); @@ -82,6 +63,9 @@ void *AllocInternal(void *heapStart, u32 size) splitBlock->next->prev = splitBlock; } + pos->locationHi = ((uintptr_t)location) >> 14; + pos->locationLo = (uintptr_t)location; + return pos->data; } } @@ -98,12 +82,12 @@ void FreeInternal(void *heapStart, void *pointer) if (pointer) { struct MemBlock *head = (struct MemBlock *)heapStart; struct MemBlock *block = (struct MemBlock *)((u8 *)pointer - sizeof(struct MemBlock)); - block->flag = FALSE; + block->allocated = FALSE; // If the freed block isn't the last one, merge with the next block // if it's not in use. if (block->next != head) { - if (!block->next->flag) { + if (!block->next->allocated) { block->size += sizeof(struct MemBlock) + block->next->size; block->next->magic = 0; block->next = block->next->next; @@ -115,7 +99,7 @@ void FreeInternal(void *heapStart, void *pointer) // If the freed block isn't the first one, merge with the previous block // if it's not in use. if (block != head) { - if (!block->prev->flag) { + if (!block->prev->allocated) { block->prev->next = block->next; if (block->next != head) @@ -128,9 +112,9 @@ void FreeInternal(void *heapStart, void *pointer) } } -void *AllocZeroedInternal(void *heapStart, u32 size) +void *AllocZeroedInternal(void *heapStart, u32 size, const char *location) { - void *mem = AllocInternal(heapStart, size); + void *mem = AllocInternal(heapStart, size, location); if (mem != NULL) { if (size & 3) @@ -175,14 +159,14 @@ void InitHeap(void *heapStart, u32 heapSize) PutFirstMemBlockHeader(heapStart, heapSize); } -void *Alloc(u32 size) +void *Alloc_(u32 size, const char *location) { - return AllocInternal(sHeapStart, size); + return AllocInternal(sHeapStart, size, location); } -void *AllocZeroed(u32 size) +void *AllocZeroed_(u32 size, const char *location) { - return AllocZeroedInternal(sHeapStart, size); + return AllocZeroedInternal(sHeapStart, size, location); } void Free(void *pointer) @@ -207,3 +191,16 @@ bool32 CheckHeap() return TRUE; } + +const struct MemBlock *HeapHead(void) +{ + return (const struct MemBlock *)sHeapStart; +} + +const char *MemBlockLocation(const struct MemBlock *block) +{ + if (!block->allocated) + return NULL; + + return (const char *)(ROM_START | (block->locationHi << 14) | block->locationLo); +} diff --git a/gflib/malloc.h b/gflib/malloc.h index 851db83a62..f484b15806 100644 --- a/gflib/malloc.h +++ b/gflib/malloc.h @@ -11,11 +11,48 @@ #define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr) +#define MALLOC_SYSTEM_ID 0xA3A3 + +struct MemBlock +{ + // Whether this block is currently allocated. + u16 allocated:1; + + u16 unused_00:4; + + // High 11 bits of location pointer. + u16 locationHi:11; + + // Magic number used for error checking. Should equal MALLOC_SYSTEM_ID. + u16 magic; + + // Size of the block (not including this header struct). + u32 size:18; + + // Low 14 bits of location pointer. + u32 locationLo:14; + + // Previous block pointer. Equals sHeapStart if this is the first block. + struct MemBlock *prev; + + // Next block pointer. Equals sHeapStart if this is the last block. + struct MemBlock *next; + + // Data in the memory block. (Arrays of length 0 are a GNU extension.) + u8 data[0]; +}; + extern u8 gHeap[]; -void *Alloc(u32 size); -void *AllocZeroed(u32 size); +#define Alloc(size) Alloc_(size, __FILE__ ":" STR(__LINE__)) +#define AllocZeroed(size) AllocZeroed_(size, __FILE__ ":" STR(__LINE__)) + +void *Alloc_(u32 size, const char *location); +void *AllocZeroed_(u32 size, const char *location); void Free(void *pointer); void InitHeap(void *pointer, u32 size); +const struct MemBlock *HeapHead(void); +const char *MemBlockLocation(const struct MemBlock *block); + #endif // GUARD_ALLOC_H diff --git a/include/gba/defines.h b/include/gba/defines.h index 82caf56e68..9959a17ef8 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -22,6 +22,9 @@ #define INTR_CHECK (*(u16 *)0x3007FF8) #define INTR_VECTOR (*(void **)0x3007FFC) +#define ROM_START 0x8000000 +#define ROM_END 0xA000000 + #define EWRAM_START 0x02000000 #define EWRAM_END (EWRAM_START + 0x40000) #define IWRAM_START 0x03000000 diff --git a/include/global.h b/include/global.h index c20f2ed427..eca45bdb63 100644 --- a/include/global.h +++ b/include/global.h @@ -147,6 +147,9 @@ #define CAT(a, b) CAT_(a, b) #define CAT_(a, b) a ## b +#define STR(a) STR_(a) +#define STR_(a) #a + // Converts a string to a compound literal, essentially making it a pointer to const u8 #define COMPOUND_STRING(str) (const u8[]) _(str) diff --git a/test/test.h b/test/test.h index dfa1f12b11..bf3e0b0041 100644 --- a/test/test.h +++ b/test/test.h @@ -46,6 +46,7 @@ struct TestRunnerState u8 result; u8 expectedResult; + bool8 expectLeaks:1; u32 timeoutSeconds; }; @@ -69,6 +70,7 @@ extern struct TestRunnerState gTestRunnerState; void CB2_TestRunner(void); void Test_ExpectedResult(enum TestResult); +void Test_ExpectLeaks(bool32); void Test_ExitWithResult(enum TestResult, const char *fmt, ...); s32 MgbaPrintf_(const char *fmt, ...); @@ -160,6 +162,9 @@ s32 MgbaPrintf_(const char *fmt, ...); #define KNOWN_FAILING \ Test_ExpectedResult(TEST_RESULT_FAIL) +#define KNOWN_LEAKING \ + Test_ExpectLeaks(TRUE) + #define PARAMETRIZE if (gFunctionTestRunnerState->parameters++ == gFunctionTestRunnerState->runParameter) #define TO_DO \ diff --git a/test/test_battle.h b/test/test_battle.h index 967bb661dd..3597e9d167 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -615,6 +615,7 @@ struct BattleTestRunnerState bool8 runThen:1; bool8 runFinally:1; bool8 runningFinally:1; + bool8 tearDownBattle:1; struct BattleTestData data; u8 *results; u8 checkProgressParameter; diff --git a/test/test_runner.c b/test/test_runner.c index ef9f2da738..64cb20e269 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -111,6 +111,7 @@ void CB2_TestRunner(void) gTestRunnerState.state = STATE_REPORT_RESULT; gTestRunnerState.result = TEST_RESULT_PASS; gTestRunnerState.expectedResult = TEST_RESULT_PASS; + gTestRunnerState.expectLeaks = FALSE; if (gTestRunnerHeadless) gTestRunnerState.timeoutSeconds = TIMEOUT_SECONDS; else @@ -141,6 +142,26 @@ void CB2_TestRunner(void) if (gTestRunnerState.test->runner->tearDown) gTestRunnerState.test->runner->tearDown(gTestRunnerState.test->data); + if (!gTestRunnerState.expectLeaks) + { + const struct MemBlock *head = HeapHead(); + const struct MemBlock *block = head; + do + { + if (block->allocated) + { + const char *location = MemBlockLocation(block); + if (location) + MgbaPrintf_("%s: %d bytes not freed", location, block->size); + else + MgbaPrintf_(": %d bytes not freed", block->size); + gTestRunnerState.result = TEST_RESULT_FAIL; + } + block = block->next; + } + while (block != head); + } + if (gTestRunnerState.test->runner == &gAssumptionsRunner) { if (gTestRunnerState.result != TEST_RESULT_PASS) @@ -238,6 +259,11 @@ void Test_ExpectedResult(enum TestResult result) gTestRunnerState.expectedResult = result; } +void Test_ExpectLeaks(bool32 expectLeaks) +{ + gTestRunnerState.expectLeaks = expectLeaks; +} + static void FunctionTest_SetUp(void *data) { (void)data; diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 365120f137..8654f78cd0 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -893,6 +893,15 @@ static void BattleTest_TearDown(void *data) { if (STATE) { + // Free resources that aren't cleaned up when the battle was + // aborted unexpectedly. + if (STATE->tearDownBattle) + { + FreeMonSpritesGfx(); + FreeBattleSpritesData(); + FreeBattleResources(); + FreeAllWindowBuffers(); + } FREE_AND_SET_NULL(STATE->results); FREE_AND_SET_NULL(STATE); } @@ -923,6 +932,7 @@ static bool32 BattleTest_HandleExitWithResult(void *data, enum TestResult result } else { + STATE->tearDownBattle = TRUE; return FALSE; } } From c81a985b5b76779c9419289dddb57ef047bfae70 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 20 Apr 2023 21:45:16 +0100 Subject: [PATCH 069/229] Fix USE_ITEM explicit targets --- include/recorded_battle.h | 1 + src/battle_controller_recorded_opponent.c | 1 + src/battle_controller_recorded_player.c | 1 + test/test_runner_battle.c | 8 +++++--- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/recorded_battle.h b/include/recorded_battle.h index d04e89c362..ea66096d7f 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -45,6 +45,7 @@ enum RECORDED_PARTY_INDEX, RECORDED_BATTLE_PALACE_ACTION, RECORDED_ITEM_ID, + RECORDED_ITEM_TARGET, }; extern u32 gRecordedBattleRngSeed; diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index e7fc6fd84a..bb41b42d65 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1441,6 +1441,7 @@ static void RecordedOpponentHandleChooseItem(void) u8 byte1 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; + gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 87f5758399..efbd60f18b 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1465,6 +1465,7 @@ static void RecordedPlayerHandleChooseItem(void) u8 byte1 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; + gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedPlayerBufferExecCompleted(); } diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 365120f137..2a44cc018b 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1540,9 +1540,11 @@ void UseItem(u32 sourceLine, struct BattlePokemon *battler, struct ItemContext c PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, (ctx.itemId >> 8) & 0xFF); PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, ctx.itemId & 0xFF); if (ctx.explicitPartyIndex) - gBattleStruct->itemPartyIndex[battlerId] = ctx.partyIndex; - if (ctx.explicitMove) - gBattleStruct->itemPartyIndex[battlerId] = i; + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, ctx.partyIndex); + else if (ctx.explicitMove) + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, i); + else + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, 0); DATA.actionBattlers |= 1 << battlerId; } From e1e8277fbaa9897c981e7619473df49c6cbe04a2 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 00:29:58 +0200 Subject: [PATCH 070/229] batch 1 --- test/item_effect_cure_status.c | 101 +++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 test/item_effect_cure_status.c diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c new file mode 100644 index 0000000000..db8e56a45d --- /dev/null +++ b/test/item_effect_cure_status.c @@ -0,0 +1,101 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Paralyze Heal heals a Pokemon from being paralyzed") +{ + GIVEN { + ASSUME(gItems[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_PARALYZE_HEAL, partyIndex: 0); } + } SCENE { + MESSAGE("Paralyze Heal cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being poisoned") +{ + GIVEN { + ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PSN_ANY); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } + } SCENE { + MESSAGE("Antidote cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Awakening heals a Pokemon from being asleep") +{ + GIVEN { + ASSUME(gItems[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_AWAKENING, partyIndex: 0); } + } SCENE { + MESSAGE("Awakening cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Burn Heal heals a Pokemon from being burned") +{ + GIVEN { + ASSUME(gItems[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_BURN_HEAL, partyIndex: 0); } + } SCENE { + MESSAGE("Burn Heal cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Ice Heal heals a Pokemon from being paralyzed") +{ + GIVEN { + ASSUME(gItems[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); } + } SCENE { + MESSAGE("Ice Heal cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } + } SCENE { + MESSAGE("Full Heal cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from being confused") +{ + GIVEN { + ASSUME(gItems[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GENGAR); + } WHEN { + TURN { MOVE(opponent, MOVE_CONFUSE_RAY); } + TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } + } SCENE { + MESSAGE("Full Heal cured Wobbuffet's status!"); + } +} From 94cb569c4790b0b4fe5a0bd6d814e15cfeb75312 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Fri, 21 Apr 2023 10:25:58 +0200 Subject: [PATCH 071/229] local specialties tests --- test/item_effect_cure_status.c | 222 ++++++++++++++++++++++++++++++++- 1 file changed, 217 insertions(+), 5 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index db8e56a45d..9a850a1311 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -18,7 +18,20 @@ SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PSN_ANY); } + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } + } SCENE { + MESSAGE("Antidote cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being badly poisoned") +{ + GIVEN { + ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } @@ -86,16 +99,215 @@ SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from being confused") +SINGLE_BATTLE_TEST("Pewter Crunchies heals a Pokemon from any primary status") { + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } GIVEN { - ASSUME(gItems[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); + ASSUME(gItems[ITEM_PEWTER_CRUNCHIES].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_PEWTER_CRUNCHIES, partyIndex: 0); } + } SCENE { + MESSAGE("PewtrCrnches cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Lava Cookies heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_LAVA_COOKIE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_LAVA_COOKIE, partyIndex: 0); } + } SCENE { + MESSAGE("Lava Cookie cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Rage Candy Bar heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_RAGE_CANDY_BAR].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_RAGE_CANDY_BAR, partyIndex: 0); } + } SCENE { + MESSAGE("RageCandyBar cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Old Gateu heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_OLD_GATEAU].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_OLD_GATEAU, partyIndex: 0); } + } SCENE { + MESSAGE("Old Gateau cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Casteliacone heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_CASTELIACONE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_CASTELIACONE, partyIndex: 0); } + } SCENE { + MESSAGE("Casteliacone cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Lumiose Galette heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_LUMIOSE_GALETTE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_LUMIOSE_GALETTE, partyIndex: 0); } + } SCENE { + MESSAGE("LumioseGlete cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Shalour Sable heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_SHALOUR_SABLE].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_SHALOUR_SABLE, partyIndex: 0); } + } SCENE { + MESSAGE("ShalourSable cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Big Malasada heals a Pokemon from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_BIG_MALASADA].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_BIG_MALASADA, partyIndex: 0); } + } SCENE { + MESSAGE("Big Malasada cured Wobbuffet's status!"); + } +} + +SINGLE_BATTLE_TEST("Full Heal and local specialties heal a Pokemon from being confused") +{ + u16 item; + PARAMETRIZE { item = ITEM_FULL_HEAL; } + PARAMETRIZE { item = ITEM_PEWTER_CRUNCHIES; } + PARAMETRIZE { item = ITEM_LAVA_COOKIE; } + PARAMETRIZE { item = ITEM_RAGE_CANDY_BAR; } + PARAMETRIZE { item = ITEM_OLD_GATEAU; } + PARAMETRIZE { item = ITEM_CASTELIACONE; } + PARAMETRIZE { item = ITEM_LUMIOSE_GALETTE; } + PARAMETRIZE { item = ITEM_SHALOUR_SABLE; } + PARAMETRIZE { item = ITEM_BIG_MALASADA; } + GIVEN { + ASSUME(gItems[item].battleUsage == EFFECT_ITEM_CURE_STATUS); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_GENGAR); } WHEN { TURN { MOVE(opponent, MOVE_CONFUSE_RAY); } - TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } + TURN { USE_ITEM(player, item, partyIndex: 0); } } SCENE { - MESSAGE("Full Heal cured Wobbuffet's status!"); + switch (item) + { + case ITEM_FULL_HEAL: + MESSAGE("Full Heal cured Wobbuffet's status!"); + break; + case ITEM_PEWTER_CRUNCHIES: + MESSAGE("PewtrCrnches cured Wobbuffet's status!"); + break; + case ITEM_LAVA_COOKIE: + MESSAGE("Lava Cookie cured Wobbuffet's status!"); + break; + case ITEM_RAGE_CANDY_BAR: + MESSAGE("RageCandyBar cured Wobbuffet's status!"); + break; + case ITEM_OLD_GATEAU: + MESSAGE("Old Gateau cured Wobbuffet's status!"); + break; + case ITEM_CASTELIACONE: + MESSAGE("Casteliacone cured Wobbuffet's status!"); + break; + case ITEM_LUMIOSE_GALETTE: + MESSAGE("LumioseGlete cured Wobbuffet's status!"); + break; + case ITEM_SHALOUR_SABLE: + MESSAGE("ShalourSable cured Wobbuffet's status!"); + break; + case ITEM_BIG_MALASADA: + MESSAGE("Big Malasada cured Wobbuffet's status!"); + break; + } } } From 301a12fe98c9d892ace9de3f6d085ed8df5b35cc Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Fri, 21 Apr 2023 10:51:43 +0200 Subject: [PATCH 072/229] fix battleUsage for heal powder --- 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 84436be55b..2df5c36387 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -526,7 +526,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = EFFECT_ITEM_RESTORE_HP, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, From 4a08ede2c49ba55ac9d358d95ee240b238325192 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Apr 2023 20:13:30 +0200 Subject: [PATCH 073/229] Add GetMovesArray in GetMovesArray --- src/battle_ai_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 05e7aec58f..53b5ebed6c 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -477,7 +477,7 @@ bool32 IsAiBattlerAware(u32 battlerId) { if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_OMNISCIENT) return TRUE; - + return BattlerHasAi(battlerId); } @@ -1129,7 +1129,7 @@ bool32 CanTargetFaintAi(u8 battlerDef, u8 battlerAtk) { s32 i, dmg; u32 unusable = AI_DATA->moveLimitations[battlerDef]; - u16 *moves = gBattleResources->battleHistory->usedMoves[battlerDef]; + u16 *moves = GetMovesArray(battlerDef); for (i = 0; i < MAX_MON_MOVES; i++) { From 1cc28c89ef6b23bb37555e40d02839684dc80a91 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 20:36:41 +0200 Subject: [PATCH 074/229] X item tests --- test/item_effect_increase_stat.c | 125 ++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 1 deletion(-) diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index b459e3ac88..7fcbe72794 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("X-Attack sharply raises battler's Attack stat", s16 damage) +SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -23,3 +23,126 @@ SINGLE_BATTLE_TEST("X-Attack sharply raises battler's Attack stat", s16 damage) EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); } } + +SINGLE_BATTLE_TEST("X Defense sharply raises battler's Defense stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_X_DEFENSE].battleUsage == EFFECT_ITEM_INCREASE_STAT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_X_DEFENSE); } + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Foe Wobbuffet used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + if (B_X_ITEMS_BUFF >= GEN_7) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.66), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("X Sp. Atk sharply raises battler's Sp. Attack stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_X_SP_ATK].battleUsage == EFFECT_ITEM_INCREASE_STAT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_X_SP_ATK); } + TURN { MOVE(player, MOVE_DISARMING_VOICE); } + } SCENE { + MESSAGE("Wobbuffet used DisrmngVoice!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + if (B_X_ITEMS_BUFF >= GEN_7) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("X Sp. Def sharply raises battler's Sp. Defense stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_X_SP_DEF].battleUsage == EFFECT_ITEM_INCREASE_STAT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_X_SP_DEF); } + TURN { MOVE(opponent, MOVE_DISARMING_VOICE); } + } SCENE { + MESSAGE("Foe Wobbuffet used DisrmngVoice!"); + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + if (B_X_ITEMS_BUFF >= GEN_7) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.66), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_X_SPEED].battleUsage == EFFECT_ITEM_INCREASE_STAT); + if (B_X_ITEMS_BUFF >= GEN_7) + { + PLAYER(SPECIES_WOBBUFFET) { Speed(3); }; + OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }; + } + else + { + PLAYER(SPECIES_WOBBUFFET) { Speed(4); }; + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); }; + } + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_X_SPEED); } + TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + if (useItem) + { + MESSAGE("Wobbuffet used Tackle!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + } else + { + MESSAGE("Foe Wobbuffet used Tackle!"); + MESSAGE("Wobbuffet used Tackle!"); + } + } +} + +SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 damage) +{ + + ASSUME(gBattleMoves[MOVE_SING].accuracy == 55); + if (B_X_ITEMS_BUFF >= GEN_7) + PASSES_RANDOMLY(gBattleMoves[MOVE_SING].accuracy * 5 / 3, 100, RNG_ACCURACY); + else + PASSES_RANDOMLY(gBattleMoves[MOVE_SING].accuracy * 4 / 3, 100, RNG_ACCURACY); + GIVEN { + ASSUME(gItems[ITEM_X_ACCURACY].battleUsage == EFFECT_ITEM_INCREASE_STAT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_X_ACCURACY); } + TURN { MOVE(player, MOVE_SING); } + } SCENE { + MESSAGE("Wobbuffet used Sing!"); + MESSAGE("Foe Wobbuffet fell asleep!"); + } +} From b4aee00432275f757d519640b497b9ee7d78e136 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 20:57:19 +0200 Subject: [PATCH 075/229] replace pokemon with battler in string --- test/item_effect_cure_status.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 9a850a1311..9747d18be6 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Paralyze Heal heals a Pokemon from being paralyzed") +SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Paralyze Heal heals a Pokemon from being paralyzed") } } -SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being poisoned") +SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -27,7 +27,7 @@ SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being poisoned") } } -SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being badly poisoned") +SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -40,7 +40,7 @@ SINGLE_BATTLE_TEST("Antidote heals a Pokemon from being badly poisoned") } } -SINGLE_BATTLE_TEST("Awakening heals a Pokemon from being asleep") +SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep") { GIVEN { ASSUME(gItems[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -53,7 +53,7 @@ SINGLE_BATTLE_TEST("Awakening heals a Pokemon from being asleep") } } -SINGLE_BATTLE_TEST("Burn Heal heals a Pokemon from being burned") +SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned") { GIVEN { ASSUME(gItems[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -66,7 +66,7 @@ SINGLE_BATTLE_TEST("Burn Heal heals a Pokemon from being burned") } } -SINGLE_BATTLE_TEST("Ice Heal heals a Pokemon from being paralyzed") +SINGLE_BATTLE_TEST("Ice Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("Ice Heal heals a Pokemon from being paralyzed") } } -SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -99,7 +99,7 @@ SINGLE_BATTLE_TEST("Full Heal heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Pewter Crunchies heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -119,7 +119,7 @@ SINGLE_BATTLE_TEST("Pewter Crunchies heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Lava Cookies heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -139,7 +139,7 @@ SINGLE_BATTLE_TEST("Lava Cookies heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Rage Candy Bar heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -159,7 +159,7 @@ SINGLE_BATTLE_TEST("Rage Candy Bar heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Old Gateu heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -179,7 +179,7 @@ SINGLE_BATTLE_TEST("Old Gateu heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Casteliacone heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -199,7 +199,7 @@ SINGLE_BATTLE_TEST("Casteliacone heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Lumiose Galette heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -219,7 +219,7 @@ SINGLE_BATTLE_TEST("Lumiose Galette heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Shalour Sable heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -239,7 +239,7 @@ SINGLE_BATTLE_TEST("Shalour Sable heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Big Malasada heals a Pokemon from any primary status") +SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -259,7 +259,7 @@ SINGLE_BATTLE_TEST("Big Malasada heals a Pokemon from any primary status") } } -SINGLE_BATTLE_TEST("Full Heal and local specialties heal a Pokemon from being confused") +SINGLE_BATTLE_TEST("Full Heal and local specialties heal a battler from being confused") { u16 item; PARAMETRIZE { item = ITEM_FULL_HEAL; } From cbac6d0e87bc1c99a5cb70c0c78971306bc1eadd Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 20:57:30 +0200 Subject: [PATCH 076/229] Full Restore test --- test/item_effect_heal_and_cure_status.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/item_effect_heal_and_cure_status.c diff --git a/test/item_effect_heal_and_cure_status.c b/test/item_effect_heal_and_cure_status.c new file mode 100644 index 0000000000..742f432f50 --- /dev/null +++ b/test/item_effect_heal_and_cure_status.c @@ -0,0 +1,25 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); Status1(status); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); } + } SCENE { + MESSAGE("Full Restore restored Wobbuffet's health!"); + } FINALLY { + EXPECT_EQ(player->hp, player->maxHP); + EXPECT_EQ(player->status1, STATUS1_NONE); + } +} \ No newline at end of file From 30204e99533bf826486c3cd535a04a2c97dc5e09 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Apr 2023 20:59:54 +0200 Subject: [PATCH 077/229] fix wrong z-move ususage --- src/battle_z_move.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 104a44daa5..f435253c7b 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -215,11 +215,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move) if (move != MOVE_NONE && zMove != MOVE_Z_STATUS && gBattleMoves[move].type == ItemId_GetSecondaryId(item)) { - if (IS_MOVE_STATUS(move)) - gBattleStruct->zmove.chosenZMove = move; - else - gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId); - + gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId); return TRUE; } } From 38476bd22c2ef28ab3f5401244178cc7d5e1056c Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 21:37:02 +0200 Subject: [PATCH 078/229] fix Full Restore not healing confusion --- data/battle_scripts_2.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index dee482d1d3..ea1a67a680 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -76,7 +76,7 @@ BattleScript_ItemCureStatus:: BattleScript_ItemHealAndCureStatus:: call BattleScript_UseItemMessage itemrestorehp - curestatus BS_ATTACKER + itemcurestatus printstring STRINGID_ITEMRESTOREDSPECIESHEALTH waitmessage B_WAIT_TIME_LONG bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT From 4bad450ecfe113e51c7ce1400ca577b906435ada Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 21 Apr 2023 21:57:00 +0200 Subject: [PATCH 079/229] Full Restore confusion test PLS READ COMMENT THIS IS KNOWN_FAILING --- test/item_effect_heal_and_cure_status.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/item_effect_heal_and_cure_status.c b/test/item_effect_heal_and_cure_status.c index 742f432f50..d9bf0cf7c8 100644 --- a/test/item_effect_heal_and_cure_status.c +++ b/test/item_effect_heal_and_cure_status.c @@ -22,4 +22,25 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s EXPECT_EQ(player->hp, player->maxHP); EXPECT_EQ(player->status1, STATUS1_NONE); } -} \ No newline at end of file +} + +SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion") +{ + // known failing bc even though it passes there is an underlying bug still that is only obvious in the replay. see #2938 + // this also means that this test is likely not very good so I advice this to be redone + KNOWN_FAILING; + GIVEN { + ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300);}; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN{ MOVE(opponent, MOVE_CONFUSE_RAY); } + TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); } + TURN{ MOVE(player, MOVE_TACKLE); } + } SCENE { + MESSAGE("Full Restore restored Wobbuffet's health!"); + NONE_OF { MESSAGE("Wobbuffet is confused!"); } + } FINALLY { + EXPECT_EQ(player->hp, player->maxHP); + } +} From ff609f2761d69e1d2d0fa042a54fbe9dba95af0b Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Fri, 21 Apr 2023 22:51:33 +0200 Subject: [PATCH 080/229] healing items tests --- test/item_effect_restore_hp.c | 182 ++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index 971ec2400b..d5d652f65b 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -17,6 +17,188 @@ SINGLE_BATTLE_TEST("Potion restores a battler's HP by 20") } } +SINGLE_BATTLE_TEST("Super Potion restores a battler's HP by 50") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_SUPER_POTION, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -50); + } +} + +SINGLE_BATTLE_TEST("Hyper Potion restores a battler's HP by 200") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_HYPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(100); MaxHP(400); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_HYPER_POTION, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -200); + } +} + +SINGLE_BATTLE_TEST("Max Potion restores a battler's HP fully") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_MAX_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_MAX_POTION, partyIndex: 0); } + } FINALLY { + EXPECT_EQ(player->hp, player->maxHP); + } +} + +SINGLE_BATTLE_TEST("Fresh Water restores a battler's HP by 30") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_FRESH_WATER].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_FRESH_WATER, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -30); + } +} + +SINGLE_BATTLE_TEST("Soda Pop restores a battler's HP by 50") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_SODA_POP].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_SODA_POP, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -50); + } +} + +SINGLE_BATTLE_TEST("Lemonade restores a battler's HP by 70") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_LEMONADE].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_LEMONADE, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -70); + } +} + +SINGLE_BATTLE_TEST("Moomoo Milk restores a battler's HP by 100") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_MOOMOO_MILK].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_MOOMOO_MILK, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -100); + } +} + +SINGLE_BATTLE_TEST("Energy Powder restores a battler's HP by 50(60)") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_ENERGY_POWDER].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ENERGY_POWDER, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + #if I_HEALTH_RECOVERY >= GEN_7 + EXPECT_EQ(damage, -60); + #else + EXPECT_EQ(damage, -50); + #endif + } +} + +SINGLE_BATTLE_TEST("Energy Root restores a battler's HP by 120(200)") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_ENERGY_ROOT].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(300); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ENERGY_ROOT, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + #if I_HEALTH_RECOVERY >= GEN_7 + EXPECT_EQ(damage, -120); + #else + EXPECT_EQ(damage, -200); + #endif + } +} + +SINGLE_BATTLE_TEST("Sweet Heart restores a battler's HP by 20") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_SWEET_HEART].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_SWEET_HEART, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -20); + } +} + +SINGLE_BATTLE_TEST("Oran Berry restores a battler's HP by 10") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_ORAN_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ORAN_BERRY, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -10); + } +} + SINGLE_BATTLE_TEST("Sitrus Berry restores a battler's HP") { s16 damage; From 929e4749dabafb2e90a97a2b9fa8bd93c33dd2f7 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 22 Apr 2023 02:34:50 +0200 Subject: [PATCH 081/229] temporarily rename test string for easier test runs --- test/item_effect_cure_status.c | 32 ++++++++++++++++---------------- test/item_effect_restore_hp.c | 26 +++++++++++++------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 9747d18be6..f014a29b78 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed") +SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed") } } -SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned") +SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -27,7 +27,7 @@ SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned") } } -SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned") +SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -40,7 +40,7 @@ SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned") } } -SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep") +SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") { GIVEN { ASSUME(gItems[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -53,7 +53,7 @@ SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep") } } -SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned") +SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") { GIVEN { ASSUME(gItems[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -66,7 +66,7 @@ SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned") } } -SINGLE_BATTLE_TEST("Ice Heal heals a battler from being paralyzed") +SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("Ice Heal heals a battler from being paralyzed") } } -SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -99,7 +99,7 @@ SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -119,7 +119,7 @@ SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -139,7 +139,7 @@ SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -159,7 +159,7 @@ SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -179,7 +179,7 @@ SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -199,7 +199,7 @@ SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -219,7 +219,7 @@ SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -239,7 +239,7 @@ SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status") +SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -259,7 +259,7 @@ SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status") } } -SINGLE_BATTLE_TEST("Full Heal and local specialties heal a battler from being confused") +SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler from being confused") { u16 item; PARAMETRIZE { item = ITEM_FULL_HEAL; } diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index d5d652f65b..8898c772b5 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Potion restores a battler's HP by 20") +SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") { s16 damage; GIVEN { @@ -17,7 +17,7 @@ SINGLE_BATTLE_TEST("Potion restores a battler's HP by 20") } } -SINGLE_BATTLE_TEST("Super Potion restores a battler's HP by 50") +SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 50") { s16 damage; GIVEN { @@ -33,7 +33,7 @@ SINGLE_BATTLE_TEST("Super Potion restores a battler's HP by 50") } } -SINGLE_BATTLE_TEST("Hyper Potion restores a battler's HP by 200") +SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 200") { s16 damage; GIVEN { @@ -49,7 +49,7 @@ SINGLE_BATTLE_TEST("Hyper Potion restores a battler's HP by 200") } } -SINGLE_BATTLE_TEST("Max Potion restores a battler's HP fully") +SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") { s16 damage; GIVEN { @@ -63,7 +63,7 @@ SINGLE_BATTLE_TEST("Max Potion restores a battler's HP fully") } } -SINGLE_BATTLE_TEST("Fresh Water restores a battler's HP by 30") +SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") { s16 damage; GIVEN { @@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("Fresh Water restores a battler's HP by 30") } } -SINGLE_BATTLE_TEST("Soda Pop restores a battler's HP by 50") +SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") { s16 damage; GIVEN { @@ -95,7 +95,7 @@ SINGLE_BATTLE_TEST("Soda Pop restores a battler's HP by 50") } } -SINGLE_BATTLE_TEST("Lemonade restores a battler's HP by 70") +SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") { s16 damage; GIVEN { @@ -111,7 +111,7 @@ SINGLE_BATTLE_TEST("Lemonade restores a battler's HP by 70") } } -SINGLE_BATTLE_TEST("Moomoo Milk restores a battler's HP by 100") +SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") { s16 damage; GIVEN { @@ -127,7 +127,7 @@ SINGLE_BATTLE_TEST("Moomoo Milk restores a battler's HP by 100") } } -SINGLE_BATTLE_TEST("Energy Powder restores a battler's HP by 50(60)") +SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)") { s16 damage; GIVEN { @@ -147,7 +147,7 @@ SINGLE_BATTLE_TEST("Energy Powder restores a battler's HP by 50(60)") } } -SINGLE_BATTLE_TEST("Energy Root restores a battler's HP by 120(200)") +SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)") { s16 damage; GIVEN { @@ -167,7 +167,7 @@ SINGLE_BATTLE_TEST("Energy Root restores a battler's HP by 120(200)") } } -SINGLE_BATTLE_TEST("Sweet Heart restores a battler's HP by 20") +SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") { s16 damage; GIVEN { @@ -183,7 +183,7 @@ SINGLE_BATTLE_TEST("Sweet Heart restores a battler's HP by 20") } } -SINGLE_BATTLE_TEST("Oran Berry restores a battler's HP by 10") +SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") { s16 damage; GIVEN { @@ -199,7 +199,7 @@ SINGLE_BATTLE_TEST("Oran Berry restores a battler's HP by 10") } } -SINGLE_BATTLE_TEST("Sitrus Berry restores a battler's HP") +SINGLE_BATTLE_TEST("Restore HP: Sitrus Berry restores a battler's HP") { s16 damage; GIVEN { From 42215c94e7953375a3a4c0acde8ebac57d67963f Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 22 Apr 2023 02:39:46 +0200 Subject: [PATCH 082/229] actually working restore hp tests --- test/item_effect_restore_hp.c | 106 ++++++++++++++-------------------- 1 file changed, 43 insertions(+), 63 deletions(-) diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index 8898c772b5..67c5eb202f 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -1,51 +1,48 @@ #include "global.h" #include "test_battle.h" +#define TEST_HP 1 +#define MAX_HP 400 + SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") { s16 damage; GIVEN { ASSUME(gItems[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_POTION, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -20); + HP_BAR(player, hp: TEST_HP + 20); } } -SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 50") +SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 60") { s16 damage; GIVEN { ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_SUPER_POTION, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -50); + HP_BAR(player, hp: TEST_HP + 60); } } -SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 200") +SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 120") { s16 damage; GIVEN { ASSUME(gItems[ITEM_HYPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(100); MaxHP(400); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_HYPER_POTION, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -200); + HP_BAR(player, hp: TEST_HP + 120); } } @@ -54,12 +51,12 @@ SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") s16 damage; GIVEN { ASSUME(gItems[ITEM_MAX_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_MAX_POTION, partyIndex: 0); } - } FINALLY { - EXPECT_EQ(player->hp, player->maxHP); + } SCENE { + HP_BAR(player, hp: MAX_HP); } } @@ -68,14 +65,12 @@ SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") s16 damage; GIVEN { ASSUME(gItems[ITEM_FRESH_WATER].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_FRESH_WATER, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -30); + HP_BAR(player, hp: TEST_HP + 30); } } @@ -84,14 +79,12 @@ SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") s16 damage; GIVEN { ASSUME(gItems[ITEM_SODA_POP].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_SODA_POP, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -50); + HP_BAR(player, hp: TEST_HP + 50); } } @@ -100,14 +93,12 @@ SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") s16 damage; GIVEN { ASSUME(gItems[ITEM_LEMONADE].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_LEMONADE, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -70); + HP_BAR(player, hp: TEST_HP + 70); } } @@ -116,14 +107,12 @@ SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") s16 damage; GIVEN { ASSUME(gItems[ITEM_MOOMOO_MILK].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_MOOMOO_MILK, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -100); + HP_BAR(player, hp: TEST_HP + 100); } } @@ -132,18 +121,15 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)" s16 damage; GIVEN { ASSUME(gItems[ITEM_ENERGY_POWDER].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(200); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_ENERGY_POWDER, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - #if I_HEALTH_RECOVERY >= GEN_7 - EXPECT_EQ(damage, -60); - #else - EXPECT_EQ(damage, -50); - #endif + if (I_HEALTH_RECOVERY >= GEN_7) + HP_BAR(player, hp: TEST_HP + 60); + else + HP_BAR(player, hp: TEST_HP + 50); } } @@ -152,18 +138,15 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)" s16 damage; GIVEN { ASSUME(gItems[ITEM_ENERGY_ROOT].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(300); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_ENERGY_ROOT, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - #if I_HEALTH_RECOVERY >= GEN_7 - EXPECT_EQ(damage, -120); - #else - EXPECT_EQ(damage, -200); - #endif + if (I_HEALTH_RECOVERY >= GEN_7) + HP_BAR(player, hp: TEST_HP + 120); + else + HP_BAR(player, hp: TEST_HP + 200); } } @@ -172,14 +155,12 @@ SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") s16 damage; GIVEN { ASSUME(gItems[ITEM_SWEET_HEART].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_SWEET_HEART, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -20); + HP_BAR(player, hp: TEST_HP + 20); } } @@ -188,32 +169,31 @@ SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") s16 damage; GIVEN { ASSUME(gItems[ITEM_ORAN_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_ORAN_BERRY, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { - EXPECT_EQ(damage, -10); + HP_BAR(player, hp: TEST_HP + 10); } } -SINGLE_BATTLE_TEST("Restore HP: Sitrus Berry restores a battler's HP") +SINGLE_BATTLE_TEST("Restore HP: Sitrus Berry restores a battler's HP by 25% of its max HP(30HP flat)") { s16 damage; GIVEN { ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_SITRUS_BERRY, partyIndex: 0); } } SCENE { - HP_BAR(player, captureDamage: &damage); - } FINALLY { if (I_SITRUS_BERRY_HEAL >= GEN_4) - EXPECT_EQ(damage, -25); + HP_BAR(player, hp: TEST_HP + MAX_HP * 0.25); else - EXPECT_EQ(damage, -30); + HP_BAR(player, hp: TEST_HP + 30); } } + +#undef TEST_HP +#undef MAX_HP \ No newline at end of file From 727f1ac37cb4de69e8d4bbf390a5628e7c719501 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 22 Apr 2023 15:04:40 +0200 Subject: [PATCH 083/229] guard spec test --- test/item_effect_set_mist.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/item_effect_set_mist.c diff --git a/test/item_effect_set_mist.c b/test/item_effect_set_mist.c new file mode 100644 index 0000000000..e01775ec48 --- /dev/null +++ b/test/item_effect_set_mist.c @@ -0,0 +1,19 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Guard Spec. sets Mist effect on the battlers side") +{ + GIVEN { + ASSUME(gItems[ITEM_GUARD_SPEC].battleUsage == EFFECT_ITEM_SET_MIST); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_GUARD_SPEC, partyIndex: 0); } + TURN { MOVE(opponent, MOVE_GROWL); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIST, player); + MESSAGE("Ally became shrouded in MIST!"); + MESSAGE("Foe Wobbuffet used Growl!"); + MESSAGE("Wobbuffet is protected by MIST!"); + } +} From 18ac81174d626bf858882dad8861283cd751290c Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 22 Apr 2023 17:41:19 +0200 Subject: [PATCH 084/229] Dire Hit test currently known failing, bc of weird bug. see comment. --- test/item_effect_set_focus_energy.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/item_effect_set_focus_energy.c diff --git a/test/item_effect_set_focus_energy.c b/test/item_effect_set_focus_energy.c new file mode 100644 index 0000000000..ff7d82f497 --- /dev/null +++ b/test/item_effect_set_focus_energy.c @@ -0,0 +1,22 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stages") +{ + KNOWN_FAILING; // Displays Message "Foe Wobbuffet used Dire Hit.." when facing off against Wobbuffet. Doesnt happen against other species? + ASSUME(B_CRIT_CHANCE >= GEN_7); + PASSES_RANDOMLY(1, 2, RNG_CRITICAL_HIT); + GIVEN { + ASSUME(gItems[ITEM_DIRE_HIT].battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_ABOMASNOW); + } WHEN { + TURN { USE_ITEM(player, ITEM_DIRE_HIT, partyIndex: 0); } + TURN { MOVE(player, MOVE_SCRATCH); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_FOCUS_ENERGY, player); + MESSAGE("Wobbuffet used Dire Hit to get pumped!"); + MESSAGE("Wobbuffet used Scratch!"); + MESSAGE("A critical hit!"); + } +} From 1b6bb3e9ebd9380e1f5c3026a986caa6e8b6d963 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 22 Apr 2023 17:53:37 +0200 Subject: [PATCH 085/229] make the test fail intentionally --- test/item_effect_set_focus_energy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/item_effect_set_focus_energy.c b/test/item_effect_set_focus_energy.c index ff7d82f497..72e90d610b 100644 --- a/test/item_effect_set_focus_energy.c +++ b/test/item_effect_set_focus_energy.c @@ -9,7 +9,7 @@ SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stag GIVEN { ASSUME(gItems[ITEM_DIRE_HIT].battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY); PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_ABOMASNOW); + OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { USE_ITEM(player, ITEM_DIRE_HIT, partyIndex: 0); } TURN { MOVE(player, MOVE_SCRATCH); } From 623e7c5f25f79599ff1de98704258f79e8c28ab2 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 22 Apr 2023 18:23:08 +0200 Subject: [PATCH 086/229] Add Frostbite status --- graphics/battle_interface/status.png | Bin 531 -> 559 bytes graphics/battle_interface/status2.png | Bin 531 -> 559 bytes graphics/battle_interface/status3.png | Bin 530 -> 559 bytes graphics/battle_interface/status4.png | Bin 530 -> 559 bytes graphics/interface/status_icons.png | Bin 455 -> 458 bytes include/constants/battle.h | 3 ++- include/constants/party_menu.h | 1 + src/battle_debug.c | 3 +++ src/battle_interface.c | 27 ++++++++++++++++++++++++++ src/data/party_menu.h | 4 ++-- src/party_menu.c | 2 ++ src/pokemon_summary_screen.c | 7 ++++++- 12 files changed, 43 insertions(+), 4 deletions(-) diff --git a/graphics/battle_interface/status.png b/graphics/battle_interface/status.png index 9fae45b71fff0c44e11746fb80c8f84dd1fba71a..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g10z=BLDyZ delta 253 zcmVdlu^|irf6+-qK~yM_g^$@01R)4St>)Jd48af# z!TjS{P7iiwmr_6;wpc(l89}UYokJDRTbGhj{b){Oy?|9JE}*BA?;EF{19I^7`0Kc! zmMs3!8iyu6GLw>$tnHNl0j>gY=m6Hdq!O43&@Htee;fA$d!=Esamg_Z00000NkvXXu0mjf DVL5SM diff --git a/graphics/battle_interface/status2.png b/graphics/battle_interface/status2.png index af7ce05d3bad0de62d22a478535e5939fde21c01..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g10z=BLDyZ delta 253 zcmVdlu^|irf6+-qK~yM_g^$@01R)4St>)Vh48af# z!Ti%%P7iiwmr_6;wpc(l89}UYokJDRTbGhj{b){Oy?|9JE}*BA?;EF{19I^7`0Kc! zmMs3!8iyu6GLw>$tnHNl0j>gY=m6Hdq!O43&@Htee;fA$zBOaqp_a-h00000NkvXXu0mjf DVMlTU diff --git a/graphics/battle_interface/status3.png b/graphics/battle_interface/status3.png index d0febfb17c501b1f65d1e835c79d7dfede349004..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g0>!lA^-pY delta 252 zcmVdlu^|irf6z%pK~yM_g^$@010V=Qo#o#WEWr{i z!T!q$r&ly#6p)82CQv?%AeOk!A&cj&OG(OpG^a6dz$zIV(9_E2jaAP9Irw_~IWDLi z7XK)PLlGaDNl8i8bjtq#SAk2dH^#LIXa}XSp0)ifOpjdK~mKk99TmDJKR9s zW~J&?YJl;$bYqV79v9ROi+{8xQJiN+61Sk4i`Z_!@&K+9_47uEIiOW)ef&8ts2>*p z=$%72T_)B2Xij4vU^FXQfHe=Pevw)L?Namc*SH@6AZ7&y4`C<(0000iOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g0>!lA^-pY delta 252 zcmVdlu^|irf6z%pK~yM_g^!6510V^lJa`5%|b6ik4 zEdEgnhax^Qlai9G>6HHgt^$`@Z;Wdb&<Bb!EJuavn7XN5XqBzftByK@77qQ)dgSCRb3m)q`uKBPP(LjG z(L0B5x=gD3(VWIUz-U&q0Basn{UWsh+NI{>uW>&^v1l#_UZ~0d0000${ZUD;vcm>pd`DI!0Cy|}jT zBY@5ZsM%XQ%Fv1^;NT^^CSS))*Qx9>@tn6gT9P>Hb#b(x2I!9oae(r;mk59}04`a= zHu*ZH(GR5{T_(9)a-yr7kTC_2d;*g}4HN}sa_IpqzbsK-hhQbNP|h8Qgz~wSJtmGn zv>WnHCs4$V0d&NavkxE=0YLd*GX%h60XxQU%%AmP|Nesq`TzrcDCz*QJ~Rm#D~tym ey+qJtJmw$h<04&U&$ZzI0000 delta 381 zcmV-@0fPR@1IGi97zqRe0001qplF?uEf$}&4cPmsZ^Og%s*voSJvbQfmE%tqn>opOM{2`ZkO=hUgi&Xe-w{PaGSR}@9D z(j1S)6dMJtgwo=HLDO3(C4^2uX_7NQ2TCjGKY9Ah5OM+y7J#wIDpEK`h(oir b{~>+>lF0pSLPH5(00000NkvXXu0mjf?VP2v diff --git a/include/constants/battle.h b/include/constants/battle.h index 61c3776c6c..7682b851ec 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -115,8 +115,9 @@ #define STATUS1_TOXIC_POISON (1 << 7) #define STATUS1_TOXIC_COUNTER (1 << 8 | 1 << 9 | 1 << 10 | 1 << 11) #define STATUS1_TOXIC_TURN(num) ((num) << 8) +#define STATUS1_FROSTBITE (1 << 12) #define STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON) -#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON) +#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE) // Volatile status ailments // These are removed after exiting the battle or switching out diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index f28b75122f..fd94afe544 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -11,6 +11,7 @@ #define AILMENT_BRN 5 #define AILMENT_PKRS 6 #define AILMENT_FNT 7 +#define AILMENT_FSB 8 #define PARTY_LAYOUT_SINGLE 0 #define PARTY_LAYOUT_DOUBLE 1 diff --git a/src/battle_debug.c b/src/battle_debug.c index 1d690caaa0..0549cf91ed 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -181,6 +181,7 @@ static const u8 sText_SideStatus[] = _("Side Status"); static const u8 sText_MaxHp[] = _("HP Max"); static const u8 sText_CurrHp[] = _("HP Current"); static const u8 sText_Freeze[] = _("Freeze"); +static const u8 sText_Frostbite[] = _("Frostbite"); static const u8 sText_ToxicPoison[] = _("Toxic Poison"); static const u8 sText_ToxicCounter[] = _("Toxic Counter"); static const u8 sText_Flinch[] = _("Flinch"); @@ -258,6 +259,7 @@ static const struct BitfieldInfo sStatus1Bitfield[] = {/*Paralysis*/1, 6}, {/*Toxic Poison*/ 1, 7}, {/*Toxic Counter*/ 4, 8}, + {/*Frostbite*/ 1, 12}, }; static const struct BitfieldInfo sStatus2Bitfield[] = @@ -397,6 +399,7 @@ static const struct ListMenuItem sStatus1ListItems[] = {gText_Paralysis, 4}, {sText_ToxicPoison, 5}, {sText_ToxicCounter, 6}, + {sText_Frostbite, 7}, }; static const struct ListMenuItem sStatus2ListItems[] = diff --git a/src/battle_interface.c b/src/battle_interface.c index bbe61a3727..eec4e50f0d 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -73,6 +73,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER0, //status brn HEALTHBOX_GFX_34, HEALTHBOX_GFX_35, + HEALTHBOX_GFX_STATUS_FSB_BATTLER0, //status fsb + HEALTHBOX_GFX_116, + HEALTHBOX_GFX_117, HEALTHBOX_GFX_36, //misc [Black section] HEALTHBOX_GFX_37, //misc [Black section] HEALTHBOX_GFX_38, //misc [Black section] @@ -123,6 +126,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER1, //status2 "BRN" HEALTHBOX_GFX_84, HEALTHBOX_GFX_85, + HEALTHBOX_GFX_STATUS_FSB_BATTLER1, //status2 "FSB" + HEALTHBOX_GFX_118, + HEALTHBOX_GFX_119, HEALTHBOX_GFX_STATUS_PSN_BATTLER2, //status3 "PSN" HEALTHBOX_GFX_87, HEALTHBOX_GFX_88, @@ -138,6 +144,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER2, //status3 "BRN" HEALTHBOX_GFX_99, HEALTHBOX_GFX_100, + HEALTHBOX_GFX_STATUS_FSB_BATTLER2, //status3 "FSB" + HEALTHBOX_GFX_120, + HEALTHBOX_GFX_121, HEALTHBOX_GFX_STATUS_PSN_BATTLER3, //status4 "PSN" HEALTHBOX_GFX_102, HEALTHBOX_GFX_103, @@ -153,6 +162,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN" HEALTHBOX_GFX_114, HEALTHBOX_GFX_115, + HEALTHBOX_GFX_STATUS_FSB_BATTLER3, //status4 "FSB" + HEALTHBOX_GFX_122, + HEALTHBOX_GFX_123, HEALTHBOX_GFX_FRAME_END, HEALTHBOX_GFX_FRAME_END_BAR, }; @@ -2208,6 +2220,11 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_FRZ_BATTLER0, battlerId)); statusPalId = PAL_STATUS_FRZ; } + else if (status & STATUS1_FROSTBITE) + { + statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_FSB_BATTLER0, battlerId)); + statusPalId = PAL_STATUS_FRZ; + } else if (status & STATUS1_PARALYSIS) { statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_PRZ_BATTLER0, battlerId)); @@ -2290,6 +2307,16 @@ static u8 GetStatusIconForBattlerId(u8 statusElementId, u8 battlerId) else ret = HEALTHBOX_GFX_STATUS_FRZ_BATTLER3; break; + case HEALTHBOX_GFX_STATUS_FSB_BATTLER0: + if (battlerId == 0) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER0; + else if (battlerId == 1) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER1; + else if (battlerId == 2) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER2; + else + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER3; + break; case HEALTHBOX_GFX_STATUS_BRN_BATTLER0: if (battlerId == 0) ret = HEALTHBOX_GFX_STATUS_BRN_BATTLER0; diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 4a06fa135e..e7ebf98939 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -1054,7 +1054,7 @@ static const union AnimCmd sSpriteAnim_StatusFaint[] = ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_Blank[] = +static const union AnimCmd sSpriteAnim_StatusFrostbite[] = { ANIMCMD_FRAME(28, 0), ANIMCMD_END @@ -1069,7 +1069,7 @@ static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = sSpriteAnim_StatusBurn, sSpriteAnim_StatusPokerus, sSpriteAnim_StatusFaint, - sSpriteAnim_Blank + sSpriteAnim_StatusFrostbite }; static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = diff --git a/src/party_menu.c b/src/party_menu.c index 3cc3efdcdd..43ed5818ad 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1941,6 +1941,8 @@ u8 GetAilmentFromStatus(u32 status) return AILMENT_FRZ; if (status & STATUS1_BURN) return AILMENT_BRN; + if (status & STATUS1_FROSTBITE) + return AILMENT_FSB; return AILMENT_NONE; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 3313076262..f7106b8752 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1112,6 +1112,10 @@ static const union AnimCmd sSpriteAnim_StatusFaint[] = { ANIMCMD_FRAME(24, 0, FALSE, FALSE), ANIMCMD_END }; +static const union AnimCmd sSpriteAnim_StatusFrostbite[] = { + ANIMCMD_FRAME(28, 0, FALSE, FALSE), + ANIMCMD_END +}; static const union AnimCmd *const sSpriteAnimTable_StatusCondition[] = { sSpriteAnim_StatusPoison, sSpriteAnim_StatusParalyzed, @@ -1120,11 +1124,12 @@ static const union AnimCmd *const sSpriteAnimTable_StatusCondition[] = { sSpriteAnim_StatusBurn, sSpriteAnim_StatusPokerus, sSpriteAnim_StatusFaint, + sSpriteAnim_StatusFrostbite, }; static const struct CompressedSpriteSheet sStatusIconsSpriteSheet = { .data = gStatusGfx_Icons, - .size = 0x380, + .size = 0x400, .tag = TAG_MON_STATUS }; static const struct CompressedSpritePalette sStatusIconsSpritePalette = From f50bfb37708396af5f2ab2841041927af6c18352 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 22 Apr 2023 18:47:36 +0200 Subject: [PATCH 087/229] Frostbite hurts at the end of the turn and halves SpA --- data/battle_scripts_1.s | 5 +++++ include/battle_scripts.h | 1 + include/constants/battle_string_ids.h | 3 ++- src/battle_gfx_sfx_util.c | 2 +- src/battle_message.c | 2 ++ src/battle_util.c | 26 ++++++++++++++++++++++++++ 6 files changed, 37 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0be8934127..316a179ab7 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8121,6 +8121,11 @@ BattleScript_BurnTurnDmg:: waitmessage B_WAIT_TIME_LONG goto BattleScript_DoStatusTurnDmg +BattleScript_FrostbiteTurnDmg:: + printstring STRINGID_PKMNHURTBYFROSTBITE + waitmessage B_WAIT_TIME_LONG + goto BattleScript_DoStatusTurnDmg + BattleScript_MoveUsedIsFrozen:: printstring STRINGID_PKMNISFROZEN waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c78fcafe48..1fb7d8cc6a 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -108,6 +108,7 @@ extern const u8 BattleScript_MoveUsedWokeUp[]; extern const u8 BattleScript_MonWokeUpInUproar[]; extern const u8 BattleScript_PoisonTurnDmg[]; extern const u8 BattleScript_BurnTurnDmg[]; +extern const u8 BattleScript_FrostbiteTurnDmg[]; extern const u8 BattleScript_MoveUsedIsFrozen[]; extern const u8 BattleScript_MoveUsedUnfroze[]; extern const u8 BattleScript_DefrostedViaFireMove[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index e552077534..10e2a6fe56 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -651,8 +651,9 @@ #define STRINGID_ITEMRESTOREDSPECIESHEALTH 649 #define STRINGID_ITEMCUREDSPECIESSTATUS 650 #define STRINGID_ITEMRESTOREDSPECIESPP 651 +#define STRINGID_PKMNHURTBYFROSTBITE 652 -#define BATTLESTRINGS_COUNT 652 +#define BATTLESTRINGS_COUNT 653 // 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_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index bc541f0a01..6404bb7dea 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -398,7 +398,7 @@ void InitAndLaunchChosenStatusAnimation(bool8 isStatus2, u32 status) gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].statusAnimActive = 1; if (!isStatus2) { - if (status == STATUS1_FREEZE) + if (status == STATUS1_FREEZE || status == STATUS1_FROSTBITE) LaunchStatusAnimation(gActiveBattler, B_ANIM_STATUS_FRZ); else if (status == STATUS1_POISON || status & STATUS1_TOXIC_POISON) LaunchStatusAnimation(gActiveBattler, B_ANIM_STATUS_PSN); diff --git a/src/battle_message.c b/src/battle_message.c index 7df30cb296..b3be9afd1c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -103,6 +103,7 @@ static const u8 sText_PkmnEnergyDrained[] = _("{B_DEF_NAME_WITH_PREFIX} had its\ static const u8 sText_PkmnWasBurned[] = _("{B_EFF_NAME_WITH_PREFIX} was burned!"); static const u8 sText_PkmnBurnedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nburned {B_EFF_NAME_WITH_PREFIX}!"); static const u8 sText_PkmnHurtByBurn[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its burn!"); +static const u8 sText_PkmnHurtByFrostbite[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its frostbite!"); static const u8 sText_PkmnAlreadyHasBurn[] = _("{B_DEF_NAME_WITH_PREFIX} already\nhas a burn."); static const u8 sText_PkmnWasFrozen[] = _("{B_EFF_NAME_WITH_PREFIX} was\nfrozen solid!"); static const u8 sText_PkmnFrozenBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nfroze {B_EFF_NAME_WITH_PREFIX} solid!"); @@ -1428,6 +1429,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy, [STRINGID_ATTACKERLOSTELECTRICTYPE - BATTLESTRINGS_TABLE_START] = sText_AttackerLostElectricType, [STRINGID_PKMNSABILITYPREVENTSABILITY - BATTLESTRINGS_TABLE_START] = sText_PkmnsAbilityPreventsAbility, + [STRINGID_PKMNHURTBYFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByFrostbite, }; const u16 gTrainerUsedItemStringIds[] = diff --git a/src/battle_util.c b/src/battle_util.c index ac274bf0f8..993a0d5ab3 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2523,6 +2523,7 @@ enum ENDTURN_POISON, ENDTURN_BAD_POISON, ENDTURN_BURN, + ENDTURN_FROSTBITE, ENDTURN_NIGHTMARES, ENDTURN_CURSE, ENDTURN_WRAP, @@ -2736,6 +2737,23 @@ u8 DoBattlerEndTurnEffects(void) } gBattleStruct->turnEffectsTracker++; break; + case ENDTURN_FROSTBITE: // burn + if ((gBattleMons[gActiveBattler].status1 & STATUS1_FROSTBITE) + && gBattleMons[gActiveBattler].hp != 0) + { + MAGIC_GUARD_CHECK; + #if B_BURN_DAMAGE >= GEN_7 + gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 16; + #else + gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8; + #endif + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + BattleScriptExecute(BattleScript_FrostbiteTurnDmg); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; case ENDTURN_NIGHTMARES: // spooky nightmares if ((gBattleMons[gActiveBattler].status2 & STATUS2_NIGHTMARE) && gBattleMons[gActiveBattler].hp != 0) @@ -9508,6 +9526,14 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move && abilityAtk != ABILITY_GUTS) dmg = ApplyModifier(UQ_4_12(0.5), dmg); + // check frostbite + if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE && !IS_MOVE_PHYSICAL(move) + #if B_BURN_FACADE_DMG >= GEN_6 + && gBattleMoves[move].effect != EFFECT_FACADE + #endif + && abilityAtk != ABILITY_GUTS) + dmg = ApplyModifier(UQ_4_12(0.5), dmg); + // check sunny/rain weather if (IsBattlerWeatherAffected(battlerAtk, B_WEATHER_RAIN)) { From 9c9a1fb831eb33e9164f176052c3d5caed9eb362 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 22 Apr 2023 19:18:10 +0200 Subject: [PATCH 088/229] Allow for healing with items --- include/strings.h | 1 + src/battle_ai_switch_items.c | 2 +- src/item.c | 2 +- src/party_menu.c | 2 ++ src/pokemon.c | 2 +- src/strings.c | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/strings.h b/include/strings.h index 72109ed945..4019dee0b1 100644 --- a/include/strings.h +++ b/include/strings.h @@ -475,6 +475,7 @@ extern const u8 gText_EscapeFromHere[]; extern const u8 gText_PkmnCuredOfPoison[]; extern const u8 gText_PkmnWokeUp2[]; extern const u8 gText_PkmnBurnHealed[]; +extern const u8 gText_PkmnFrostbiteHealed[]; extern const u8 gText_PkmnThawedOut[]; extern const u8 gText_PkmnCuredOfParalysis[]; extern const u8 gText_PkmnGotOverInfatuation[]; diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 29911d798f..d7fd062ba2 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -1079,7 +1079,7 @@ static bool8 ShouldUseItem(void) shouldUse = TRUE; if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) shouldUse = TRUE; - if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE) + if (itemEffects[3] & ITEM3_FREEZE && (gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE || gBattleMons[gActiveBattler].status1 & STATUS1_FROSTBITE)) shouldUse = TRUE; if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) shouldUse = TRUE; diff --git a/src/item.c b/src/item.c index b2b19480a3..d07e93782f 100644 --- a/src/item.c +++ b/src/item.c @@ -976,7 +976,7 @@ u32 GetItemStatus1Mask(u16 itemId) case ITEM3_PARALYSIS: return STATUS1_PARALYSIS; case ITEM3_FREEZE: - return STATUS1_FREEZE; + return STATUS1_FREEZE | STATUS1_FROSTBITE; case ITEM3_BURN: return STATUS1_BURN; case ITEM3_POISON: diff --git a/src/party_menu.c b/src/party_menu.c index 43ed5818ad..1623201b10 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4332,6 +4332,8 @@ static void GetMedicineItemEffectMessage(u16 item) break; case ITEM_EFFECT_CURE_FREEZE: StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut); + // TO DO: if it heals frostbite, use the following instead: + // StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed); break; case ITEM_EFFECT_CURE_PARALYSIS: StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis); diff --git a/src/pokemon.c b/src/pokemon.c index e82cb98c30..7fc3399050 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5802,7 +5802,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; if ((itemEffect[i] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0) retVal = FALSE; - if ((itemEffect[i] & ITEM3_FREEZE) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE, battlerId) == 0) + if ((itemEffect[i] & ITEM3_FREEZE) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE | STATUS1_FROSTBITE, battlerId) == 0) retVal = FALSE; if ((itemEffect[i] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0) retVal = FALSE; diff --git a/src/strings.c b/src/strings.c index 75ff2ef994..eb7bb8ba1f 100644 --- a/src/strings.c +++ b/src/strings.c @@ -414,6 +414,7 @@ const u8 gText_PkmnCuredOfPoison[] = _("{STR_VAR_1} was cured of its\npoisoning. const u8 gText_PkmnCuredOfParalysis[] = _("{STR_VAR_1} was cured of\nparalysis.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnWokeUp2[] = _("{STR_VAR_1} woke up.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnBurnHealed[] = _("{STR_VAR_1}'s burn was healed.{PAUSE_UNTIL_PRESS}"); +const u8 gText_PkmnFrostbiteHealed[] = _("{STR_VAR_1}'s frostbite was healed.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnThawedOut[] = _("{STR_VAR_1} was thawed out.{PAUSE_UNTIL_PRESS}"); const u8 gText_PPWasRestored[] = _("PP was restored.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); // Unused From a561c6da6a1aced96f9b992ac00a83cc42420e9e Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 22 Apr 2023 23:14:49 +0200 Subject: [PATCH 089/229] Add config to Frostbite & allow it to be inflicted --- data/battle_scripts_1.s | 15 +++ include/battle_scripts.h | 1 + include/config/battle.h | 17 +-- include/constants/battle.h | 145 ++++++++++++------------ include/constants/battle_move_effects.h | 3 +- include/constants/battle_string_ids.h | 3 +- include/pokemon.h | 2 +- src/battle_message.c | 7 ++ src/battle_script_commands.c | 20 ++++ src/battle_tv.c | 1 + src/data/battle_moves.h | 36 +++++- 11 files changed, 161 insertions(+), 89 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 316a179ab7..3bfc3ac089 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -286,7 +286,11 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectHealPulse @ EFFECT_HEAL_PULSE .4byte BattleScript_EffectQuash @ EFFECT_QUASH .4byte BattleScript_EffectIonDeluge @ EFFECT_ION_DELUGE +#if B_USE_FROSTBITE == TRUE + .4byte BattleScript_EffectFrostbiteHit @ EFFECT_FREEZE_DRY +#else .4byte BattleScript_EffectFreezeHit @ EFFECT_FREEZE_DRY +#endif .4byte BattleScript_EffectTopsyTurvy @ EFFECT_TOPSY_TURVY .4byte BattleScript_EffectMistyTerrain @ EFFECT_MISTY_TERRAIN .4byte BattleScript_EffectGrassyTerrain @ EFFECT_GRASSY_TERRAIN @@ -424,6 +428,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING + .4byte BattleScript_EffectFrostbiteHit @ EFFECT_FROSTBITE_HIT BattleScript_EffectRevivalBlessing:: attackcanceler @@ -3464,6 +3469,10 @@ BattleScript_EffectBurnHit:: setmoveeffect MOVE_EFFECT_BURN goto BattleScript_EffectHit +BattleScript_EffectFrostbiteHit:: + setmoveeffect MOVE_EFFECT_FROSTBITE + goto BattleScript_EffectHit + BattleScript_EffectSleepHit:: setmoveeffect MOVE_EFFECT_SLEEP goto BattleScript_EffectHit @@ -8365,6 +8374,12 @@ BattleScript_MoveEffectBurn:: waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet +BattleScript_MoveEffectFrostbite:: + statusanimation BS_EFFECT_BATTLER + printfromtable gGotFrostbiteStringIds + waitmessage B_WAIT_TIME_LONG + goto BattleScript_UpdateEffectStatusIconRet + BattleScript_MoveEffectFreeze:: statusanimation BS_EFFECT_BATTLER printfromtable gGotFrozenStringIds diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 1fb7d8cc6a..9b9156eb6f 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -132,6 +132,7 @@ extern const u8 BattleScript_MoveEffectSleep[]; extern const u8 BattleScript_YawnMakesAsleep[]; extern const u8 BattleScript_MoveEffectPoison[]; extern const u8 BattleScript_MoveEffectBurn[]; +extern const u8 BattleScript_MoveEffectFrostbite[]; extern const u8 BattleScript_MoveEffectFreeze[]; extern const u8 BattleScript_MoveEffectParalysis[]; extern const u8 BattleScript_MoveEffectUproar[]; diff --git a/include/config/battle.h b/include/config/battle.h index 3e9ec9b9a5..951952416f 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -182,14 +182,15 @@ #define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball. // Other settings -#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. -#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. -#define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // 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_LATEST // 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. -#define B_TRAINER_CLASS_POKE_BALLS GEN_LATEST // In Gen7+, trainers will use certain types of Poké Balls depending on their trainer class. -#define B_OBEDIENCE_MECHANICS GEN_LATEST // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level +#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. +#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. +#define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // 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_LATEST // 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. +#define B_TRAINER_CLASS_POKE_BALLS GEN_LATEST // In Gen7+, trainers will use certain types of Poké Balls depending on their trainer class. +#define B_OBEDIENCE_MECHANICS GEN_LATEST // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level +#define B_USE_FROSTBITE FALSE // In PLA, Frostbite replaces Freeze. Enabling this flag does the same here. Moves can still be cherry-picked to either Freeze or Frostbite. Freeze-Dry, Secret Power & Tri Attack depend on this config. // Animation Settings #define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. diff --git a/include/constants/battle.h b/include/constants/battle.h index 7682b851ec..0e6c66e8d6 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -306,79 +306,80 @@ #define MOVE_EFFECT_FREEZE 4 #define MOVE_EFFECT_PARALYSIS 5 #define MOVE_EFFECT_TOXIC 6 -#define PRIMARY_STATUS_MOVE_EFFECT MOVE_EFFECT_TOXIC // All above move effects apply primary status -#define MOVE_EFFECT_CONFUSION 7 -#define MOVE_EFFECT_FLINCH 8 -#define MOVE_EFFECT_TRI_ATTACK 9 -#define MOVE_EFFECT_UPROAR 10 -#define MOVE_EFFECT_PAYDAY 11 -#define MOVE_EFFECT_CHARGING 12 -#define MOVE_EFFECT_WRAP 13 -#define MOVE_EFFECT_BURN_UP 14 // MOVE_EFFECT_BURN_UP replaces unused MOVE_EFFECT_RECOIL_25 so that stat change animations don't break -#define MOVE_EFFECT_ATK_PLUS_1 15 -#define MOVE_EFFECT_DEF_PLUS_1 16 -#define MOVE_EFFECT_SPD_PLUS_1 17 -#define MOVE_EFFECT_SP_ATK_PLUS_1 18 -#define MOVE_EFFECT_SP_DEF_PLUS_1 19 -#define MOVE_EFFECT_ACC_PLUS_1 20 -#define MOVE_EFFECT_EVS_PLUS_1 21 -#define MOVE_EFFECT_ATK_MINUS_1 22 -#define MOVE_EFFECT_DEF_MINUS_1 23 -#define MOVE_EFFECT_SPD_MINUS_1 24 -#define MOVE_EFFECT_SP_ATK_MINUS_1 25 -#define MOVE_EFFECT_SP_DEF_MINUS_1 26 -#define MOVE_EFFECT_ACC_MINUS_1 27 -#define MOVE_EFFECT_EVS_MINUS_1 28 -#define MOVE_EFFECT_RECHARGE 29 -#define MOVE_EFFECT_RAGE 30 -#define MOVE_EFFECT_STEAL_ITEM 31 -#define MOVE_EFFECT_PREVENT_ESCAPE 32 -#define MOVE_EFFECT_NIGHTMARE 33 -#define MOVE_EFFECT_ALL_STATS_UP 34 -#define MOVE_EFFECT_RAPIDSPIN 35 -#define MOVE_EFFECT_REMOVE_STATUS 36 -#define MOVE_EFFECT_ATK_DEF_DOWN 37 -#define MOVE_EFFECT_SCALE_SHOT 38 // MOVE_EFFECT_SCALE_SHOT replaces unused MOVE_EFFECT_RECOIL_33 so that stat change animations don't break -#define MOVE_EFFECT_ATK_PLUS_2 39 -#define MOVE_EFFECT_DEF_PLUS_2 40 -#define MOVE_EFFECT_SPD_PLUS_2 41 -#define MOVE_EFFECT_SP_ATK_PLUS_2 42 -#define MOVE_EFFECT_SP_DEF_PLUS_2 43 -#define MOVE_EFFECT_ACC_PLUS_2 44 -#define MOVE_EFFECT_EVS_PLUS_2 45 -#define MOVE_EFFECT_ATK_MINUS_2 46 -#define MOVE_EFFECT_DEF_MINUS_2 47 -#define MOVE_EFFECT_SPD_MINUS_2 48 -#define MOVE_EFFECT_SP_ATK_MINUS_2 49 -#define MOVE_EFFECT_SP_DEF_MINUS_2 50 -#define MOVE_EFFECT_ACC_MINUS_2 51 -#define MOVE_EFFECT_EVS_MINUS_2 52 -#define MOVE_EFFECT_THRASH 53 -#define MOVE_EFFECT_KNOCK_OFF 54 -#define MOVE_EFFECT_DEF_SPDEF_DOWN 55 -#define MOVE_EFFECT_CLEAR_SMOG 56 -#define MOVE_EFFECT_SP_ATK_TWO_DOWN 57 -#define MOVE_EFFECT_SMACK_DOWN 58 -#define MOVE_EFFECT_FLAME_BURST 59 -#define MOVE_EFFECT_FEINT 60 -#define MOVE_EFFECT_SPECTRAL_THIEF 61 -#define MOVE_EFFECT_V_CREATE 62 -#define MOVE_EFFECT_HAPPY_HOUR 63 -#define MOVE_EFFECT_CORE_ENFORCER 64 -#define MOVE_EFFECT_THROAT_CHOP 65 -#define MOVE_EFFECT_INCINERATE 66 -#define MOVE_EFFECT_BUG_BITE 67 -#define MOVE_EFFECT_RECOIL_HP_25 68 -#define MOVE_EFFECT_RELIC_SONG 69 -#define MOVE_EFFECT_TRAP_BOTH 70 -#define MOVE_EFFECT_DOUBLE_SHOCK 71 -#define MOVE_EFFECT_ROUND 72 -#define MOVE_EFFECT_STOCKPILE_WORE_OFF 73 -#define MOVE_EFFECT_DIRE_CLAW 74 -#define MOVE_EFFECT_STEALTH_ROCK 75 -#define MOVE_EFFECT_SPIKES 76 +#define MOVE_EFFECT_FROSTBITE 7 +#define PRIMARY_STATUS_MOVE_EFFECT MOVE_EFFECT_FROSTBITE // All above move effects apply primary status +#define MOVE_EFFECT_CONFUSION 8 +#define MOVE_EFFECT_FLINCH 9 +#define MOVE_EFFECT_TRI_ATTACK 10 +#define MOVE_EFFECT_UPROAR 11 +#define MOVE_EFFECT_PAYDAY 12 +#define MOVE_EFFECT_CHARGING 13 +#define MOVE_EFFECT_WRAP 14 +#define MOVE_EFFECT_BURN_UP 15 // MOVE_EFFECT_BURN_UP replaces unused MOVE_EFFECT_RECOIL_25 so that stat change animations don't break +#define MOVE_EFFECT_ATK_PLUS_1 16 +#define MOVE_EFFECT_DEF_PLUS_1 17 +#define MOVE_EFFECT_SPD_PLUS_1 18 +#define MOVE_EFFECT_SP_ATK_PLUS_1 19 +#define MOVE_EFFECT_SP_DEF_PLUS_1 20 +#define MOVE_EFFECT_ACC_PLUS_1 21 +#define MOVE_EFFECT_EVS_PLUS_1 22 +#define MOVE_EFFECT_ATK_MINUS_1 23 +#define MOVE_EFFECT_DEF_MINUS_1 24 +#define MOVE_EFFECT_SPD_MINUS_1 25 +#define MOVE_EFFECT_SP_ATK_MINUS_1 26 +#define MOVE_EFFECT_SP_DEF_MINUS_1 27 +#define MOVE_EFFECT_ACC_MINUS_1 28 +#define MOVE_EFFECT_EVS_MINUS_1 29 +#define MOVE_EFFECT_RECHARGE 30 +#define MOVE_EFFECT_RAGE 31 +#define MOVE_EFFECT_STEAL_ITEM 32 +#define MOVE_EFFECT_PREVENT_ESCAPE 33 +#define MOVE_EFFECT_NIGHTMARE 34 +#define MOVE_EFFECT_ALL_STATS_UP 35 +#define MOVE_EFFECT_RAPIDSPIN 36 +#define MOVE_EFFECT_REMOVE_STATUS 37 +#define MOVE_EFFECT_ATK_DEF_DOWN 38 +#define MOVE_EFFECT_SCALE_SHOT 39 // MOVE_EFFECT_SCALE_SHOT replaces unused MOVE_EFFECT_RECOIL_33 so that stat change animations don't break +#define MOVE_EFFECT_ATK_PLUS_2 40 +#define MOVE_EFFECT_DEF_PLUS_2 41 +#define MOVE_EFFECT_SPD_PLUS_2 42 +#define MOVE_EFFECT_SP_ATK_PLUS_2 43 +#define MOVE_EFFECT_SP_DEF_PLUS_2 44 +#define MOVE_EFFECT_ACC_PLUS_2 45 +#define MOVE_EFFECT_EVS_PLUS_2 46 +#define MOVE_EFFECT_ATK_MINUS_2 47 +#define MOVE_EFFECT_DEF_MINUS_2 48 +#define MOVE_EFFECT_SPD_MINUS_2 49 +#define MOVE_EFFECT_SP_ATK_MINUS_2 50 +#define MOVE_EFFECT_SP_DEF_MINUS_2 51 +#define MOVE_EFFECT_ACC_MINUS_2 52 +#define MOVE_EFFECT_EVS_MINUS_2 53 +#define MOVE_EFFECT_THRASH 54 +#define MOVE_EFFECT_KNOCK_OFF 55 +#define MOVE_EFFECT_DEF_SPDEF_DOWN 56 +#define MOVE_EFFECT_CLEAR_SMOG 57 +#define MOVE_EFFECT_SP_ATK_TWO_DOWN 58 +#define MOVE_EFFECT_SMACK_DOWN 59 +#define MOVE_EFFECT_FLAME_BURST 60 +#define MOVE_EFFECT_FEINT 61 +#define MOVE_EFFECT_SPECTRAL_THIEF 62 +#define MOVE_EFFECT_V_CREATE 63 +#define MOVE_EFFECT_HAPPY_HOUR 64 +#define MOVE_EFFECT_CORE_ENFORCER 65 +#define MOVE_EFFECT_THROAT_CHOP 66 +#define MOVE_EFFECT_INCINERATE 67 +#define MOVE_EFFECT_BUG_BITE 68 +#define MOVE_EFFECT_RECOIL_HP_25 69 +#define MOVE_EFFECT_RELIC_SONG 70 +#define MOVE_EFFECT_TRAP_BOTH 71 +#define MOVE_EFFECT_DOUBLE_SHOCK 72 +#define MOVE_EFFECT_ROUND 73 +#define MOVE_EFFECT_STOCKPILE_WORE_OFF 74 +#define MOVE_EFFECT_DIRE_CLAW 75 +#define MOVE_EFFECT_STEALTH_ROCK 76 +#define MOVE_EFFECT_SPIKES 77 -#define NUM_MOVE_EFFECTS 77 +#define NUM_MOVE_EFFECTS 78 #define MOVE_EFFECT_AFFECTS_USER 0x4000 #define MOVE_EFFECT_CERTAIN 0x8000 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index d1562dec93..5df12b4496 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -405,7 +405,8 @@ #define EFFECT_DIRE_CLAW 399 #define EFFECT_BARB_BARRAGE 400 #define EFFECT_REVIVAL_BLESSING 401 +#define EFFECT_FROSTBITE_HIT 402 -#define NUM_BATTLE_MOVE_EFFECTS 402 +#define NUM_BATTLE_MOVE_EFFECTS 403 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 10e2a6fe56..b482a35947 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -652,8 +652,9 @@ #define STRINGID_ITEMCUREDSPECIESSTATUS 650 #define STRINGID_ITEMRESTOREDSPECIESPP 651 #define STRINGID_PKMNHURTBYFROSTBITE 652 +#define STRINGID_PKMNGOTFROSTBITE 653 -#define BATTLESTRINGS_COUNT 653 +#define BATTLESTRINGS_COUNT 654 // 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/include/pokemon.h b/include/pokemon.h index 581677cae7..a889e70aa5 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -346,7 +346,7 @@ struct BattleMove s8 priority; u32 flags; u8 split; - u8 argument; + u16 argument; u8 zMoveEffect; }; diff --git a/src/battle_message.c b/src/battle_message.c index b3be9afd1c..e77182f1b2 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -101,6 +101,7 @@ static const u8 sText_PkmnAlreadyPoisoned[] = _("{B_DEF_NAME_WITH_PREFIX} is alr static const u8 sText_PkmnBadlyPoisoned[] = _("{B_EFF_NAME_WITH_PREFIX} is badly\npoisoned!"); static const u8 sText_PkmnEnergyDrained[] = _("{B_DEF_NAME_WITH_PREFIX} had its\nenergy drained!"); static const u8 sText_PkmnWasBurned[] = _("{B_EFF_NAME_WITH_PREFIX} was burned!"); +static const u8 sText_PkmnGotFrostbite[] = _("{B_EFF_NAME_WITH_PREFIX} got frostbite!"); static const u8 sText_PkmnBurnedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nburned {B_EFF_NAME_WITH_PREFIX}!"); static const u8 sText_PkmnHurtByBurn[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its burn!"); static const u8 sText_PkmnHurtByFrostbite[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its frostbite!"); @@ -1430,6 +1431,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_ATTACKERLOSTELECTRICTYPE - BATTLESTRINGS_TABLE_START] = sText_AttackerLostElectricType, [STRINGID_PKMNSABILITYPREVENTSABILITY - BATTLESTRINGS_TABLE_START] = sText_PkmnsAbilityPreventsAbility, [STRINGID_PKMNHURTBYFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByFrostbite, + [STRINGID_PKMNGOTFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFrostbite, }; const u16 gTrainerUsedItemStringIds[] = @@ -1731,6 +1733,11 @@ const u16 gGotBurnedStringIds[] = [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNBURNEDBY }; +const u16 gGotFrostbiteStringIds[] = +{ + [B_MSG_STATUSED] = STRINGID_PKMNGOTFROSTBITE +}; + const u16 gGotFrozenStringIds[] = { [B_MSG_STATUSED] = STRINGID_PKMNWASFROZEN, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4e1494ce38..7273b03ae2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -61,6 +61,7 @@ #include "constants/trainers.h" #include "battle_util.h" #include "constants/pokemon.h" +#include "config/battle.h" // Helper for accessing command arguments and advancing gBattlescriptCurrInstr. // @@ -896,6 +897,7 @@ static const u32 sStatusFlagsForMoveEffects[NUM_MOVE_EFFECTS] = [MOVE_EFFECT_FREEZE] = STATUS1_FREEZE, [MOVE_EFFECT_PARALYSIS] = STATUS1_PARALYSIS, [MOVE_EFFECT_TOXIC] = STATUS1_TOXIC_POISON, + [MOVE_EFFECT_FROSTBITE] = STATUS1_FROSTBITE, [MOVE_EFFECT_CONFUSION] = STATUS2_CONFUSION, [MOVE_EFFECT_FLINCH] = STATUS2_FLINCHED, [MOVE_EFFECT_UPROAR] = STATUS2_UPROAR, @@ -919,6 +921,7 @@ static const u8 *const sMoveEffectBS_Ptrs[] = [MOVE_EFFECT_UPROAR] = BattleScript_MoveEffectUproar, [MOVE_EFFECT_PAYDAY] = BattleScript_MoveEffectPayDay, [MOVE_EFFECT_WRAP] = BattleScript_MoveEffectWrap, + [MOVE_EFFECT_FROSTBITE] = BattleScript_MoveEffectFrostbite, }; static const struct WindowTemplate sUnusedWinTemplate = @@ -3161,6 +3164,12 @@ void SetMoveEffect(bool32 primary, u32 certain) gMoveResultFlags |= MOVE_RESULT_DOESNT_AFFECT_FOE; } break; + case STATUS1_FROSTBITE: + if (!CanBeFrozen(gEffectBattler)) + break; + + statusChanged = TRUE; + break; } if (statusChanged == TRUE) { @@ -3319,7 +3328,11 @@ void SetMoveEffect(bool32 primary, u32 certain) } else { + #if B_USE_FROSTBITE == TRUE + static const u8 sTriAttackEffects[] = { MOVE_EFFECT_BURN, MOVE_EFFECT_FROSTBITE, MOVE_EFFECT_PARALYSIS }; + #else static const u8 sTriAttackEffects[] = { MOVE_EFFECT_BURN, MOVE_EFFECT_FREEZE, MOVE_EFFECT_PARALYSIS }; + #endif gBattleScripting.moveEffect = RandomElement(RNG_TRI_ATTACK, sTriAttackEffects); SetMoveEffect(FALSE, 0); } @@ -9960,6 +9973,9 @@ static void Cmd_various(void) case STATUS1_TOXIC_POISON: gBattleScripting.moveEffect = MOVE_EFFECT_TOXIC; break; + case STATUS1_FROSTBITE: + gBattleScripting.moveEffect = MOVE_EFFECT_FROSTBITE; + break; default: gBattleScripting.moveEffect = 0; break; @@ -15079,7 +15095,11 @@ u16 GetSecretPowerMoveEffect(void) break; case BATTLE_TERRAIN_SNOW: case BATTLE_TERRAIN_ICE: + #if B_USE_FROSTBITE == TRUE + moveEffect = MOVE_EFFECT_FROSTBITE; + #else moveEffect = MOVE_EFFECT_FREEZE; + #endif break; case BATTLE_TERRAIN_VOLCANO: moveEffect = MOVE_EFFECT_BURN; diff --git a/src/battle_tv.c b/src/battle_tv.c index 10c2144ccd..f5c9f43c4e 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -481,6 +481,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_DOUBLE_SHOCK] = 0, // TODO: Assign points [EFFECT_SPECIAL_ATTACK_UP_HIT] = 1, [EFFECT_VICTORY_DANCE] = 0, // TODO: Assign points + [EFFECT_FROSTBITE_HIT] = 1, }; static const u16 sPoints_Effectiveness[] = diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 4a89222a96..a1cc695059 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -121,7 +121,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_ICE_PUNCH] = { - .effect = EFFECT_FREEZE_HIT, + #if B_USE_FROSTBITE == TRUE + .effect = EFFECT_FROSTBITE_HIT, + #else + .effect = EFFECT_FREEZE_HIT, + #endif .power = 75, .type = TYPE_ICE, .accuracy = 100, @@ -982,7 +986,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .power = 95, #endif - .effect = EFFECT_FREEZE_HIT, + #if B_USE_FROSTBITE == TRUE + .effect = EFFECT_FROSTBITE_HIT, + #else + .effect = EFFECT_FREEZE_HIT, + #endif .type = TYPE_ICE, .accuracy = 100, .pp = 10, @@ -1001,7 +1009,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .power = 120, #endif - .effect = EFFECT_FREEZE_HIT, + #if B_USE_FROSTBITE == TRUE + .effect = EFFECT_FROSTBITE_HIT, + #else + .effect = EFFECT_FREEZE_HIT, + #endif .type = TYPE_ICE, .accuracy = 70, .pp = 5, @@ -3062,7 +3074,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_POWDER_SNOW] = { - .effect = EFFECT_FREEZE_HIT, + #if B_USE_FROSTBITE == TRUE + .effect = EFFECT_FROSTBITE_HIT, + #else + .effect = EFFECT_FREEZE_HIT, + #endif .power = 40, .type = TYPE_ICE, .accuracy = 100, @@ -7177,6 +7193,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_STRONG_JAW_BOOST, #endif + #if B_USE_FROSTBITE == TRUE + .argument = STATUS1_FROSTBITE, + #else + .argument = STATUS1_FREEZE, + #endif .effect = EFFECT_FLINCH_STATUS, .power = 65, .type = TYPE_ICE, @@ -7186,7 +7207,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .argument = STATUS1_FREEZE, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12354,7 +12374,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_FREEZING_GLARE] = { .power = 90, - .effect = EFFECT_FREEZE_HIT, + #if B_USE_FROSTBITE == TRUE + .effect = EFFECT_FROSTBITE_HIT, + #else + .effect = EFFECT_FREEZE_HIT, + #endif .type = TYPE_PSYCHIC, .accuracy = 100, .pp = 10, From 47b013fc22472ebdcad7e23325595a0d92939be1 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 9 Mar 2023 08:17:29 -0300 Subject: [PATCH 090/229] Debug menu to give items based on max quantity and map number 3digits display (#2807) --- src/debug.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/debug.c b/src/debug.c index 90081eb617..759341d866 100644 --- a/src/debug.c +++ b/src/debug.c @@ -147,7 +147,7 @@ enum { //Sound #define DEBUG_NUMBER_DIGITS_VARIABLES 5 #define DEBUG_NUMBER_DIGITS_VARIABLE_VALUE 5 #define DEBUG_NUMBER_DIGITS_ITEMS 4 -#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 2 +#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 3 #define DEBUG_NUMBER_ICON_X 210 #define DEBUG_NUMBER_ICON_Y 50 @@ -1015,8 +1015,8 @@ static void DebugAction_Util_Warp_SelectMapGroup(u8 taskId) gTasks[taskId].data[3] = 0; gTasks[taskId].data[4] = 0; - ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2); StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1061,8 +1061,8 @@ static void DebugAction_Util_Warp_SelectMap(u8 taskId) gTasks[taskId].data[4] += 1; } - ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2); StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1905,15 +1905,18 @@ static void DebugAction_Give_Item_SelectId(u8 taskId) } static void DebugAction_Give_Item_SelectQuantity(u8 taskId) { + u32 itemId = gTasks[taskId].data[5]; + if (JOY_NEW(DPAD_ANY)) { PlaySE(SE_SELECT); if (JOY_NEW(DPAD_UP)) { + u32 maxCapacity = (ItemId_GetPocket(itemId) - 1 == BERRIES_POCKET) ? MAX_BERRY_CAPACITY : MAX_BAG_ITEM_CAPACITY; gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if (gTasks[taskId].data[3] >= 100) - gTasks[taskId].data[3] = 99; + if (gTasks[taskId].data[3] > maxCapacity) + gTasks[taskId].data[3] = maxCapacity; } if (JOY_NEW(DPAD_DOWN)) { @@ -1947,7 +1950,7 @@ static void DebugAction_Give_Item_SelectQuantity(u8 taskId) DestroySprite(&gSprites[gTasks[taskId].data[6]]); //Destroy item icon PlaySE(MUS_OBTAIN_ITEM); - AddBagItem(gTasks[taskId].data[5], gTasks[taskId].data[3]); + AddBagItem(itemId, gTasks[taskId].data[3]); DebugAction_DestroyExtraWindow(taskId); } else if (JOY_NEW(B_BUTTON)) From 13f6acf9a1e0731afcf0d144c2b12409dde00a3a Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 23 Apr 2023 19:20:48 +0200 Subject: [PATCH 091/229] General mechanics --- data/battle_scripts_1.s | 16 ++++++++++++++ include/battle_scripts.h | 2 ++ include/constants/battle_string_ids.h | 4 +++- src/battle_message.c | 6 +++++- src/battle_script_commands.c | 6 ++++-- src/battle_util.c | 31 +++++++++++++++++++++------ 6 files changed, 55 insertions(+), 10 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 3bfc3ac089..a169b12752 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -581,6 +581,7 @@ BattleScript_AffectionBasedStatusHeal:: jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatus_HealParalysisString jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatus_HealBurnString jumpifstatus BS_ATTACKER, STATUS1_FREEZE, BattleScript_AffectionBasedStatus_HealFreezeString + jumpifstatus BS_ATTACKER, STATUS1_FROSTBITE, BattleScript_AffectionBasedStatus_HealFrostbiteString end2 BattleScript_AffectionBasedStatus_HealPoisonString: printstring STRINGID_ATTACKEREXPELLEDTHEPOISON @@ -596,6 +597,9 @@ BattleScript_AffectionBasedStatus_HealBurnString: goto BattleScript_AffectionBasedStatusHeal_Continue BattleScript_AffectionBasedStatus_HealFreezeString: printstring STRINGID_ATTACKERMELTEDTHEICE + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealFrostbiteString: + printstring STRINGID_ATTACKERHEALEDITSFROSTBITE BattleScript_AffectionBasedStatusHeal_Continue: waitmessage B_WAIT_TIME_LONG clearstatus BS_ATTACKER @@ -9580,6 +9584,18 @@ BattleScript_BerryCureFrzRet:: removeitem BS_SCRIPTING return +BattleScript_BerryCureFsbEnd2:: + call BattleScript_BerryCureFrzRet + end2 + +BattleScript_BerryCureFsbRet:: + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT + printstring STRINGID_PKMNSITEMHEALEDFROSTBITE + waitmessage B_WAIT_TIME_LONG + updatestatusicon BS_SCRIPTING + removeitem BS_SCRIPTING + return + BattleScript_BerryCureSlpEnd2:: call BattleScript_BerryCureSlpRet end2 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 9b9156eb6f..6fcdcac258 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -197,6 +197,8 @@ extern const u8 BattleScript_BerryCureBrnEnd2[]; extern const u8 BattleScript_BerryCureBrnRet[]; extern const u8 BattleScript_BerryCureFrzEnd2[]; extern const u8 BattleScript_BerryCureFrzRet[]; +extern const u8 BattleScript_BerryCureFsbEnd2[]; +extern const u8 BattleScript_BerryCureFsbRet[]; extern const u8 BattleScript_BerryCureSlpEnd2[]; extern const u8 BattleScript_BerryCureSlpRet[]; extern const u8 BattleScript_BerryCureConfusionEnd2[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index b482a35947..4e8cd9ab83 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -653,8 +653,10 @@ #define STRINGID_ITEMRESTOREDSPECIESPP 651 #define STRINGID_PKMNHURTBYFROSTBITE 652 #define STRINGID_PKMNGOTFROSTBITE 653 +#define STRINGID_PKMNSITEMHEALEDFROSTBITE 654 +#define STRINGID_ATTACKERHEALEDITSFROSTBITE 655 -#define BATTLESTRINGS_COUNT 654 +#define BATTLESTRINGS_COUNT 656 // 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 e77182f1b2..39d862057c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -493,6 +493,7 @@ static const u8 sText_BerrySuffix[] = _(" BERRY"); static const u8 sText_PkmnsItemCuredParalysis[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\ncured paralysis!"); static const u8 sText_PkmnsItemCuredPoison[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\ncured poison!"); static const u8 sText_PkmnsItemHealedBurn[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nhealed its burn!"); +static const u8 sText_PkmnsItemHealedFrostbite[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nhealed its frostbite!"); static const u8 sText_PkmnsItemDefrostedIt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\ndefrosted it!"); static const u8 sText_PkmnsItemWokeIt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nwoke it from its sleep!"); static const u8 sText_PkmnsItemSnappedOut[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nsnapped it out of confusion!"); @@ -770,6 +771,7 @@ static const u8 sText_AttackerExpelledThePoison[] = _("{B_ATK_NAME_WITH_PREFIX} 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_AttackerHealedItsFrostbite[] = _("{B_ATK_NAME_WITH_PREFIX} healed its frostbite 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!"); static const u8 sText_AttackerLostElectricType[] = _("{B_ATK_NAME_WITH_PREFIX} used up all\nof its electricity!"); @@ -1432,6 +1434,8 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_PKMNSABILITYPREVENTSABILITY - BATTLESTRINGS_TABLE_START] = sText_PkmnsAbilityPreventsAbility, [STRINGID_PKMNHURTBYFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByFrostbite, [STRINGID_PKMNGOTFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFrostbite, + [STRINGID_PKMNSITEMHEALEDFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemHealedFrostbite, + [STRINGID_ATTACKERHEALEDITSFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsFrostbite, }; const u16 gTrainerUsedItemStringIds[] = @@ -1898,7 +1902,7 @@ const u16 gRoomsStringIds[] = const u16 gStatusConditionsStringIds[] = { - STRINGID_PKMNWASPOISONED, STRINGID_PKMNBADLYPOISONED, STRINGID_PKMNWASBURNED, STRINGID_PKMNWASPARALYZED, STRINGID_PKMNFELLASLEEP + STRINGID_PKMNWASPOISONED, STRINGID_PKMNBADLYPOISONED, STRINGID_PKMNWASBURNED, STRINGID_PKMNWASPARALYZED, STRINGID_PKMNFELLASLEEP, STRINGID_PKMNGOTFROSTBITE }; const u8 gText_PkmnIsEvolving[] = _("What?\n{STR_VAR_1} is evolving!"); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7273b03ae2..ecf9023936 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10144,6 +10144,8 @@ static void Cmd_various(void) gBattleCommunication[MULTISTRING_CHOOSER] = 3; else if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP) && CanSleep(gBattlerTarget)) gBattleCommunication[MULTISTRING_CHOOSER] = 4; + else if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_FROSTBITE) && CanBeFrozen(gBattlerTarget)) + gBattleCommunication[MULTISTRING_CHOOSER] = 5; else { gBattlescriptCurrInstr = cmd->failInstr; @@ -14370,7 +14372,7 @@ static void Cmd_cureifburnedparalysedorpoisoned(void) { CMD_ARGS(const u8 *failInstr); - if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)) + if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)) { gBattleMons[gBattlerAttacker].status1 = 0; gBattlescriptCurrInstr = cmd->nextInstr; @@ -15696,7 +15698,7 @@ static void Cmd_handleballthrow(void) if (gBattleMons[gBattlerTarget].status1 & (STATUS1_SLEEP | STATUS1_FREEZE)) odds *= 2; - if (gBattleMons[gBattlerTarget].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)) + if (gBattleMons[gBattlerTarget].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)) odds = (odds * 15) / 10; if (gBattleResults.catchAttempts[gLastUsedItem - FIRST_BALL] < 255) diff --git a/src/battle_util.c b/src/battle_util.c index 993a0d5ab3..456936fadb 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4916,7 +4916,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); if (gBattleMons[battler].status1 & STATUS1_BURN) StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); - if (gBattleMons[battler].status1 & STATUS1_FREEZE) + if (gBattleMons[battler].status1 & (STATUS1_FREEZE | STATUS1_FROSTBITE)) StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); gBattleMons[battler].status1 = 0; @@ -5957,7 +5957,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_MAGMA_ARMOR: - if (gBattleMons[battler].status1 & STATUS1_FREEZE) + if (gBattleMons[battler].status1 & (STATUS1_FREEZE | STATUS1_FROSTBITE)) { StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); effect = 1; @@ -6904,6 +6904,13 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) gBattlescriptCurrInstr = BattleScript_BerryCureFrzRet; effect = ITEM_STATUS_CHANGE; } + if (gBattleMons[battlerId].status1 & STATUS1_FROSTBITE && !UnnerveOn(battlerId, gLastUsedItem)) + { + gBattleMons[battlerId].status1 &= ~STATUS1_FROSTBITE; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureFsbRet; + effect = ITEM_STATUS_CHANGE; + } break; case HOLD_EFFECT_CURE_SLP: if (gBattleMons[battlerId].status1 & STATUS1_SLEEP && !UnnerveOn(battlerId, gLastUsedItem)) @@ -6952,7 +6959,7 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) if (gBattleMons[battlerId].status1 & STATUS1_BURN) StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); - if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) + if (gBattleMons[battlerId].status1 & STATUS1_FREEZE || gBattleMons[battlerId].status1 & STATUS1_FROSTBITE) StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION) @@ -7125,6 +7132,12 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) BattleScriptExecute(BattleScript_BerryCureFrzEnd2); effect = ITEM_STATUS_CHANGE; } + if (gBattleMons[battlerId].status1 & STATUS1_FROSTBITE && !UnnerveOn(battlerId, gLastUsedItem)) + { + gBattleMons[battlerId].status1 &= ~STATUS1_FROSTBITE; + BattleScriptExecute(BattleScript_BerryCureFsbEnd2); + effect = ITEM_STATUS_CHANGE; + } break; case HOLD_EFFECT_CURE_SLP: if (gBattleMons[battlerId].status1 & STATUS1_SLEEP && !UnnerveOn(battlerId, gLastUsedItem)) @@ -7160,7 +7173,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); i++; } - if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) + if (gBattleMons[battlerId].status1 & STATUS1_FREEZE || gBattleMons[battlerId].status1 & STATUS1_FROSTBITE) { StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); i++; @@ -7443,6 +7456,12 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) BattleScriptExecute(BattleScript_BerryCureFrzEnd2); effect = ITEM_STATUS_CHANGE; } + if (gBattleMons[battlerId].status1 & STATUS1_FROSTBITE && !UnnerveOn(battlerId, gLastUsedItem)) + { + gBattleMons[battlerId].status1 &= ~STATUS1_FROSTBITE; + BattleScriptExecute(BattleScript_BerryCureFsbEnd2); + effect = ITEM_STATUS_CHANGE; + } break; case HOLD_EFFECT_CURE_SLP: if (gBattleMons[battlerId].status1 & STATUS1_SLEEP && !UnnerveOn(battlerId, gLastUsedItem)) @@ -7486,7 +7505,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); i++; } - if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) + if (gBattleMons[battlerId].status1 & STATUS1_FREEZE || gBattleMons[battlerId].status1 & STATUS1_FROSTBITE) { StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); i++; @@ -9054,7 +9073,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe switch (gBattleMoves[move].effect) { case EFFECT_FACADE: - if (gBattleMons[battlerAtk].status1 & (STATUS1_BURN | STATUS1_PSN_ANY | STATUS1_PARALYSIS)) + if (gBattleMons[battlerAtk].status1 & (STATUS1_BURN | STATUS1_PSN_ANY | STATUS1_PARALYSIS | STATUS1_FROSTBITE)) MulModifier(&modifier, UQ_4_12(2.0)); break; case EFFECT_BRINE: From a020001a78e7cd08537d6c6ca85d5cd273792a89 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 23 Apr 2023 20:33:28 +0200 Subject: [PATCH 092/229] Battle Pike functionality --- src/battle_pike.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/battle_pike.c b/src/battle_pike.c index 9751d565de..37dfd9997d 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -729,6 +729,7 @@ static void GetRoomInflictedStatus(void) switch (sStatusFlags) { case STATUS1_FREEZE: + case STATUS1_FROSTBITE: gSpecialVar_Result = PIKE_STATUS_FREEZE; break; case STATUS1_BURN: @@ -818,6 +819,7 @@ static bool8 DoesAbilityPreventStatus(struct Pokemon *mon, u32 status) switch (status) { case STATUS1_FREEZE: + case STATUS1_FROSTBITE: if (ability == ABILITY_MAGMA_ARMOR) ret = TRUE; break; @@ -853,6 +855,7 @@ static bool8 DoesTypePreventStatus(u16 species, u32 status) ret = TRUE; break; case STATUS1_FREEZE: + case STATUS1_FROSTBITE: if (gSpeciesInfo[species].types[0] == TYPE_ICE || gSpeciesInfo[species].types[1] == TYPE_ICE) ret = TRUE; break; @@ -913,7 +916,11 @@ static bool8 TryInflictRandomStatus(void) if (rand < 35) sStatusFlags = STATUS1_TOXIC_POISON; else if (rand < 60) + #if B_USE_FROSTBITE == TRUE + sStatusFlags = STATUS1_FROSTBITE; + #else sStatusFlags = STATUS1_FREEZE; + #endif else if (rand < 80) sStatusFlags = STATUS1_PARALYSIS; else if (rand < 90) @@ -950,6 +957,7 @@ static bool8 TryInflictRandomStatus(void) switch (sStatusFlags) { case STATUS1_FREEZE: + case STATUS1_FROSTBITE: sStatusMon = PIKE_STATUSMON_DUSCLOPS; break; case STATUS1_BURN: From 6b2a873071ae9526d25b784e2d667c48c7d296c1 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 23 Apr 2023 20:41:19 +0200 Subject: [PATCH 093/229] Add comment in Ice Beam --- src/data/battle_moves.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index a1cc695059..9473bae71c 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -986,6 +986,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .power = 95, #endif + // The following effect is also relevant in battle_pike.c + // If you cherry-pick this to use something other than the config, make sure to update it there too #if B_USE_FROSTBITE == TRUE .effect = EFFECT_FROSTBITE_HIT, #else From 0b8d148c2643fdd85735663f602252d590c53582 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 23 Apr 2023 20:53:51 +0200 Subject: [PATCH 094/229] Let AI take Frostbite into account --- include/battle_ai_util.h | 3 +++ src/battle_ai_main.c | 32 +++++++++++++++++++++++++---- src/battle_ai_util.c | 44 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 5 deletions(-) diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index d1319f0ca7..f2dd8f03ed 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -130,6 +130,7 @@ bool32 IsSemiInvulnerable(u8 battlerDef, u16 move); // status checks bool32 AI_CanBeBurned(u8 battler, u16 ability); +bool32 AI_CanGetFrostbite(u8 battler, u16 ability); bool32 AI_CanBeConfused(u8 battler, u16 ability); bool32 AI_CanSleep(u8 battler, u16 ability); bool32 IsBattlerIncapacitated(u8 battler, u16 ability); @@ -140,6 +141,7 @@ bool32 AI_CanParalyze(u8 battlerAtk, u8 battlerDef, u16 defAbility, u16 move, u1 bool32 AI_CanConfuse(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove); bool32 ShouldBurnSelf(u8 battler, u16 ability); bool32 AI_CanBurn(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove); +bool32 AI_CanGiveFrostbite(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove); bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 atkGender, u8 defGender); bool32 AnyPartyMemberStatused(u8 battlerId, bool32 checkSoundproof); u32 ShouldTryToFlinch(u8 battlerAtk, u8 battlerDef, u16 atkAbility, u16 defAbility, u16 move); @@ -175,5 +177,6 @@ void IncreaseBurnScore(u8 battlerAtk, u8 battlerdef, u16 move, s16 *score); void IncreaseParalyzeScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); void IncreaseSleepScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); void IncreaseConfusionScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); +void IncreaseFrostbiteScore(u8 battlerAtk, u8 battlerdef, u16 move, s16 *score); #endif //GUARD_BATTLE_AI_UTIL_H \ No newline at end of file diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 6c60705d5a..77220f79ef 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1725,7 +1725,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 10; break; case EFFECT_REFRESH: - if (!(gBattleMons[battlerDef].status1 & (STATUS1_PSN_ANY | STATUS1_BURN | STATUS1_PARALYSIS))) + if (!(gBattleMons[battlerDef].status1 & (STATUS1_PSN_ANY | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_FROSTBITE))) score -= 10; break; case EFFECT_PSYCHO_SHIFT: @@ -1734,6 +1734,9 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else if (gBattleMons[battlerAtk].status1 & STATUS1_BURN && !AI_CanBurn(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)) score -= 10; + else if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE && !AI_CanGiveFrostbite(battlerAtk, battlerDef, + AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)) + score -= 10; else if (gBattleMons[battlerAtk].status1 & STATUS1_PARALYSIS && !AI_CanParalyze(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove)) score -= 10; else if (gBattleMons[battlerAtk].status1 & STATUS1_SLEEP && !AI_CanPutToSleep(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove)) @@ -3143,7 +3146,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score++; // check thawing moves - if ((gBattleMons[battlerAtk].status1 & STATUS1_FREEZE) && TestMoveFlags(move, FLAG_THAW_USER)) + if ((gBattleMons[battlerAtk].status1 & (STATUS1_FREEZE | STATUS1_FROSTBITE)) && TestMoveFlags(move, FLAG_THAW_USER)) score += (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) ? 20 : 10; // check burn @@ -3165,6 +3168,25 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } + // check frostbite + if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE) + { + switch (AI_DATA->abilities[battlerAtk]) + { + case ABILITY_GUTS: + break; + case ABILITY_NATURAL_CURE: + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING + && HasOnlyMovesWithSplit(battlerAtk, SPLIT_SPECIAL, TRUE)) + score = 90; // Force switch if all your attacking moves are special and you have Natural Cure. + break; + default: + if (IS_MOVE_SPECIAL(move) && gBattleMoves[move].effect != EFFECT_FACADE) + score -= 2; + break; + } + } + // attacker ability checks switch (AI_DATA->abilities[battlerAtk]) { @@ -3602,7 +3624,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUBSTITUTE: if (gStatuses3[battlerDef] & STATUS3_PERISH_SONG) score += 3; - if (gBattleMons[battlerDef].status1 & (STATUS1_BURN | STATUS1_PSN_ANY)) + if (gBattleMons[battlerDef].status1 & (STATUS1_BURN | STATUS1_PSN_ANY | STATUS1_FROSTBITE)) score++; if (HasMoveEffect(battlerDef, EFFECT_SLEEP) || HasMoveEffect(battlerDef, EFFECT_TOXIC) @@ -4391,6 +4413,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) IncreaseParalyzeScore(battlerAtk, battlerDef, move, &score); else if (gBattleMons[battlerAtk].status1 & STATUS1_SLEEP) IncreaseSleepScore(battlerAtk, battlerDef, move, &score); + else if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE) + IncreaseFrostbiteScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_GRUDGE: break; @@ -4781,7 +4805,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; break; case EFFECT_FACADE: - if (gBattleMons[battlerAtk].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)) + if (gBattleMons[battlerAtk].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)) score++; break; case EFFECT_FOCUS_PUNCH: diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 05e7aec58f..dabeb33c78 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -1678,7 +1678,7 @@ void ProtectChecks(u8 battlerAtk, u8 battlerDef, u16 move, u16 predictedMove, s1 (*score) -= min(uses, 3); } - if (gBattleMons[battlerAtk].status1 & (STATUS1_PSN_ANY | STATUS1_BURN) + if (gBattleMons[battlerAtk].status1 & (STATUS1_PSN_ANY | STATUS1_BURN | STATUS1_FROSTBITE) || gBattleMons[battlerAtk].status2 & (STATUS2_CURSED | STATUS2_INFATUATION) || gStatuses3[battlerAtk] & (STATUS3_PERISH_SONG | STATUS3_LEECHSEED | STATUS3_YAWN)) { @@ -2892,6 +2892,17 @@ bool32 AI_CanBeBurned(u8 battler, u16 ability) return TRUE; } +bool32 AI_CanGetFrostbite(u8 battler, u16 ability) +{ + if (ability == ABILITY_MAGMA_ARMOR + || IS_BATTLER_OF_TYPE(battler, TYPE_ICE) + || gBattleMons[battler].status1 & STATUS1_ANY + || IsAbilityStatusProtected(battler) + || gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_SAFEGUARD) + return FALSE; + return TRUE; +} + bool32 ShouldBurnSelf(u8 battler, u16 ability) { if (AI_CanBeBurned(battler, ability) && ( @@ -2918,6 +2929,18 @@ bool32 AI_CanBurn(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPar return TRUE; } +bool32 AI_CanGiveFrostbite(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove) +{ + if (!AI_CanGetFrostbite(battlerDef, defAbility) + || AI_GetMoveEffectiveness(move, battlerAtk, battlerDef) == AI_EFFECTIVENESS_x0 + || DoesSubstituteBlockMove(battlerAtk, battlerDef, move) + || PartnerMoveEffectIsStatusSameTarget(battlerAtkPartner, battlerDef, partnerMove)) + { + return FALSE; + } + return TRUE; +} + bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 atkGender, u8 defGender) { if ((gBattleMons[battlerDef].status2 & STATUS2_INFATUATION) @@ -3717,6 +3740,25 @@ void IncreaseConfusionScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score) } } +void IncreaseFrostbiteScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score) +{ + if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0)) + return; + + if (AI_CanGiveFrostbite(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)) + { + (*score)++; // frostbite is good + if (HasMoveWithSplit(battlerDef, SPLIT_SPECIAL)) + { + if (CanTargetFaintAi(battlerDef, battlerAtk)) + *score += 2; // frostbiting the target to stay alive is cool + } + + if (HasMoveEffect(battlerAtk, EFFECT_HEX) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_HEX)) + (*score)++; + } +} + bool32 AI_MoveMakesContact(u32 ability, u32 holdEffect, u16 move) { if (TestMoveFlags(move, FLAG_MAKES_CONTACT) From f13c39d784d15186374b7e81cf29e296bb41ede3 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 23 Apr 2023 21:20:23 +0200 Subject: [PATCH 095/229] Thawing out for frostbite --- data/battle_scripts_1.s | 12 ++++++++++++ include/battle_scripts.h | 2 ++ include/constants/battle_string_ids.h | 9 ++++++++- src/battle_message.c | 12 ++++++++++++ src/battle_script_commands.c | 19 +++++++++++++++++++ src/battle_util.c | 11 +++++++++++ 6 files changed, 64 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a169b12752..f65d6e18a6 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8151,12 +8151,24 @@ BattleScript_MoveUsedUnfroze:: updatestatusicon BS_ATTACKER return +BattleScript_MoveUsedUnfrostbite:: + printfromtable gFrostbiteHealedStringIds + waitmessage B_WAIT_TIME_LONG + updatestatusicon BS_ATTACKER + return + BattleScript_DefrostedViaFireMove:: printstring STRINGID_PKMNWASDEFROSTED waitmessage B_WAIT_TIME_LONG updatestatusicon BS_TARGET return +BattleScript_FrostbiteHealedViaFireMove:: + printstring STRINGID_PKMNFROSTBITEHEALED + waitmessage B_WAIT_TIME_LONG + updatestatusicon BS_TARGET + return + BattleScript_MoveUsedIsParalyzed:: printstring STRINGID_PKMNISPARALYZED waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 6fcdcac258..d10d5ba07f 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -111,7 +111,9 @@ extern const u8 BattleScript_BurnTurnDmg[]; extern const u8 BattleScript_FrostbiteTurnDmg[]; extern const u8 BattleScript_MoveUsedIsFrozen[]; extern const u8 BattleScript_MoveUsedUnfroze[]; +extern const u8 BattleScript_MoveUsedUnfrostbite[]; extern const u8 BattleScript_DefrostedViaFireMove[]; +extern const u8 BattleScript_FrostbiteHealedViaFireMove[]; extern const u8 BattleScript_MoveUsedIsParalyzed[]; extern const u8 BattleScript_MoveUsedFlinched[]; extern const u8 BattleScript_PrintUproarOverTurns[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 4e8cd9ab83..294bd1f7cb 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -655,8 +655,11 @@ #define STRINGID_PKMNGOTFROSTBITE 653 #define STRINGID_PKMNSITEMHEALEDFROSTBITE 654 #define STRINGID_ATTACKERHEALEDITSFROSTBITE 655 +#define STRINGID_PKMNFROSTBITEHEALED 656 +#define STRINGID_PKMNFROSTBITEHEALED2 657 +#define STRINGID_PKMNFROSTBITEHEALEDBY 658 -#define BATTLESTRINGS_COUNT 656 +#define BATTLESTRINGS_COUNT 659 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -864,6 +867,10 @@ #define B_MSG_DEFROSTED 0 #define B_MSG_DEFROSTED_BY_MOVE 1 +// gFrostbiteHealedStringIds +#define B_MSG_FROSTBITE_HEALED 0 +#define B_MSG_FROSTBITE_HEALED_BY_MOVE 1 + // gBattlePalaceFlavorTextTable #define B_MSG_GLINT_IN_EYE 0 #define B_MSG_GETTING_IN_POS 1 diff --git a/src/battle_message.c b/src/battle_message.c index 39d862057c..48c4f222ab 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -112,6 +112,9 @@ static const u8 sText_PkmnIsFrozen[] = _("{B_ATK_NAME_WITH_PREFIX} is\nfrozen so static const u8 sText_PkmnWasDefrosted[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndefrosted!"); static const u8 sText_PkmnWasDefrosted2[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted!"); static const u8 sText_PkmnWasDefrostedBy[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted by {B_CURRENT_MOVE}!"); +static const u8 sText_PkmnFrostbiteHealed[] = _("{B_DEF_NAME_WITH_PREFIX}'s\nfrostbite was healed!"); +static const u8 sText_PkmnFrostbiteHealed2[] = _("{B_ATK_NAME_WITH_PREFIX}'s\nfrostbite was healed!"); +static const u8 sText_PkmnFrostbiteHealedBy[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_CURRENT_MOVE}\nhealed its frostbite!"); static const u8 sText_PkmnWasParalyzed[] = _("{B_EFF_NAME_WITH_PREFIX} is paralyzed!\nIt may be unable to move!"); static const u8 sText_PkmnWasParalyzedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nparalyzed {B_EFF_NAME_WITH_PREFIX}!\lIt may be unable to move!"); static const u8 sText_PkmnIsParalyzed[] = _("{B_ATK_NAME_WITH_PREFIX} is paralyzed!\nIt can't move!"); @@ -1436,6 +1439,9 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_PKMNGOTFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFrostbite, [STRINGID_PKMNSITEMHEALEDFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemHealedFrostbite, [STRINGID_ATTACKERHEALEDITSFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsFrostbite, + [STRINGID_PKMNFROSTBITEHEALED - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealed, + [STRINGID_PKMNFROSTBITEHEALED2 - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealed2, + [STRINGID_PKMNFROSTBITEHEALEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealedBy, }; const u16 gTrainerUsedItemStringIds[] = @@ -1742,6 +1748,12 @@ const u16 gGotFrostbiteStringIds[] = [B_MSG_STATUSED] = STRINGID_PKMNGOTFROSTBITE }; +const u16 gFrostbiteHealedStringIds[] = +{ + [B_MSG_FROSTBITE_HEALED] = STRINGID_PKMNFROSTBITEHEALED2, + [B_MSG_FROSTBITE_HEALED_BY_MOVE] = STRINGID_PKMNFROSTBITEHEALEDBY +}; + const u16 gGotFrozenStringIds[] = { [B_MSG_STATUSED] = STRINGID_PKMNWASFROZEN, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ecf9023936..81d1a94e81 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5565,6 +5565,25 @@ static void Cmd_moveend(void) gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove; effect = TRUE; } + if (gBattleMons[gBattlerTarget].status1 & STATUS1_FROSTBITE + && gBattleMons[gBattlerTarget].hp != 0 + && gBattlerAttacker != gBattlerTarget + && gSpecialStatuses[gBattlerTarget].specialDmg + && (moveType == TYPE_FIRE + #if B_BURN_HIT_THAW >= GEN_6 + || gBattleMoves[gCurrentMove].effect == EFFECT_BURN_HIT + #endif + ) + && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) + { + gBattleMons[gBattlerTarget].status1 &= ~STATUS1_FROSTBITE; + gActiveBattler = gBattlerTarget; + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].status1), &gBattleMons[gBattlerTarget].status1); + MarkBattlerForControllerExec(gActiveBattler); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_FrostbiteHealedViaFireMove; + effect = TRUE; + } gBattleScripting.moveendState++; break; case MOVEEND_RECOIL: diff --git a/src/battle_util.c b/src/battle_util.c index 456936fadb..97043f7dfd 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3644,6 +3644,17 @@ u8 AtkCanceller_UnableToUseMove(void) } effect = 2; } + if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FROSTBITE) + { + if (!(gBattleMoves[gCurrentMove].effect == EFFECT_BURN_UP && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE))) + { + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_FROSTBITE; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_MoveUsedUnfrostbite; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FROSTBITE_HEALED_BY_MOVE; + } + effect = 2; + } gBattleStruct->atkCancellerTracker++; break; case CANCELLER_POWDER_MOVE: From a2bc21d902a373e6ca759bcb81f1d785bb1bfdd2 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Mon, 24 Apr 2023 14:05:35 +0200 Subject: [PATCH 096/229] Update battle_ai_util.h Co-Authored-By: Salem <65783283+callmeechoo@users.noreply.github.com> --- include/battle_ai_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index f2dd8f03ed..1a0fbc2645 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -172,11 +172,11 @@ bool32 SideHasMoveSplit(u8 battlerId, u8 split); // score increases void IncreaseStatUpScore(u8 battlerAtk, u8 battlerDef, u8 statId, s16 *score); -void IncreasePoisonScore(u8 battlerAtk, u8 battlerdef, u16 move, s16 *score); -void IncreaseBurnScore(u8 battlerAtk, u8 battlerdef, u16 move, s16 *score); +void IncreasePoisonScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); +void IncreaseBurnScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); void IncreaseParalyzeScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); void IncreaseSleepScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); void IncreaseConfusionScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); -void IncreaseFrostbiteScore(u8 battlerAtk, u8 battlerdef, u16 move, s16 *score); +void IncreaseFrostbiteScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score); -#endif //GUARD_BATTLE_AI_UTIL_H \ No newline at end of file +#endif //GUARD_BATTLE_AI_UTIL_H From 0b66cf01ecb71fe83c98a2b70edc4eeb443a5864 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Mon, 24 Apr 2023 14:15:43 +0200 Subject: [PATCH 097/229] remove no longer needed variable --- test/item_effect_restore_hp.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index 67c5eb202f..4572a0d8be 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -6,7 +6,6 @@ SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -20,7 +19,6 @@ SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 60") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -34,7 +32,6 @@ SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 60") SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 120") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_HYPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -48,7 +45,6 @@ SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 120") SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_MAX_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -62,7 +58,6 @@ SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_FRESH_WATER].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -76,7 +71,6 @@ SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_SODA_POP].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -90,7 +84,6 @@ SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_LEMONADE].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -104,7 +97,6 @@ SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_MOOMOO_MILK].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -118,7 +110,6 @@ SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_ENERGY_POWDER].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -135,7 +126,6 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)" SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_ENERGY_ROOT].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -152,7 +142,6 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)" SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_SWEET_HEART].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -166,7 +155,6 @@ SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_ORAN_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } @@ -180,7 +168,6 @@ SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") SINGLE_BATTLE_TEST("Restore HP: Sitrus Berry restores a battler's HP by 25% of its max HP(30HP flat)") { - s16 damage; GIVEN { ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } From c4497bc0a8ca077eccf305f9d16982e4cc8a80f2 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Mon, 24 Apr 2023 14:16:17 +0200 Subject: [PATCH 098/229] revive tests --- test/item_effect_revive.c | 96 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 test/item_effect_revive.c diff --git a/test/item_effect_revive.c b/test/item_effect_revive.c new file mode 100644 index 0000000000..9ced527f4e --- /dev/null +++ b/test/item_effect_revive.c @@ -0,0 +1,96 @@ +#include "global.h" +#include "test_battle.h" + +#define MAX_HP 200 + +SINGLE_BATTLE_TEST("Revive: Super Potion restores a fainted battler's HP to half") +{ + GIVEN { + ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + TURN { USE_ITEM(player, ITEM_SUPER_POTION, partyIndex: 0); } + TURN { SWITCH(player, 0); } + } SCENE { + MESSAGE("Super Potion restored Wynaut's health!"); + } FINALLY { + EXPECT_EQ(player->hp, 60); + } +} + +SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") +{ + GIVEN { + ASSUME(gItems[ITEM_REVIVE].battleUsage == EFFECT_ITEM_REVIVE); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + TURN { USE_ITEM(player, ITEM_REVIVE, partyIndex: 0); } + TURN { SWITCH(player, 0); } + } SCENE { + MESSAGE("Revive restored Wynaut's health!"); + } FINALLY { + EXPECT_EQ(player->hp, MAX_HP/2); + } +} + +SINGLE_BATTLE_TEST("Revive: Max Revive restores a fainted battler's HP fully") +{ + GIVEN { + ASSUME(gItems[ITEM_MAX_REVIVE].battleUsage == EFFECT_ITEM_REVIVE); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + TURN { USE_ITEM(player, ITEM_MAX_REVIVE, partyIndex: 0); } + TURN { SWITCH(player, 0); } + } SCENE { + MESSAGE("Max Revive restored Wynaut's health!"); + } FINALLY { + EXPECT_EQ(player->hp, MAX_HP); + } +} + +SINGLE_BATTLE_TEST("Revive: Revival Herb restores a fainted battler's HP fully") +{ + GIVEN { + ASSUME(gItems[ITEM_REVIVAL_HERB].battleUsage == EFFECT_ITEM_REVIVE); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + TURN { USE_ITEM(player, ITEM_REVIVAL_HERB, partyIndex: 0); } + TURN { SWITCH(player, 0); } + } SCENE { + MESSAGE("Revival Herb restored Wynaut's health!"); + } FINALLY { + EXPECT_EQ(player->hp, MAX_HP); + } +} + +SINGLE_BATTLE_TEST("Revive: Max Honey restores a fainted battler's HP fully") +{ + GIVEN { + ASSUME(gItems[ITEM_MAX_HONEY].battleUsage == EFFECT_ITEM_REVIVE); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + TURN { USE_ITEM(player, ITEM_MAX_HONEY, partyIndex: 0); } + TURN { SWITCH(player, 0); } + } SCENE { + MESSAGE("Max Honey restored Wynaut's health!"); + } FINALLY { + EXPECT_EQ(player->hp, MAX_HP); + } +} + +#undef MAX_HP From 330e85ba64b1b23d602a83ad3bef16f93a05b73c Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 24 Apr 2023 09:34:11 -0300 Subject: [PATCH 099/229] Updates -Undeclared size for certain trainer slide-in variables at struct BattleStruct for reasons. -Added a BattlerHPPercentage function to make HP threshold checks in ShouldDoTrainerSlide a bit more readable. --- include/battle.h | 10 +++++----- src/battle_message.c | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/include/battle.h b/include/battle.h index 44aa063c9c..2b72d48365 100644 --- a/include/battle.h +++ b/include/battle.h @@ -622,7 +622,7 @@ struct BattleStruct struct MegaEvolutionData mega; struct ZMoveData zmove; const u8 *trainerSlideMsg; - bool8 trainerSlideLowHpMsgDone:1; + bool8 trainerSlideLowHpMsgDone; u8 introState; u8 ateBerry[2]; // array id determined by side, each party pokemon as bit u8 stolenStats[NUM_BATTLE_STATS]; // hp byte is used for which stats to raise, other inform about by how many stages @@ -663,14 +663,14 @@ struct BattleStruct u8 storedHealingWish:4; // Each battler as a bit. u8 storedLunarDance:4; // Each battler as a bit. u16 supremeOverlordModifier[MAX_BATTLERS_COUNT]; - bool8 trainerSlideHalfHpMsgDone:1; + bool8 trainerSlideHalfHpMsgDone; u8 trainerSlideFirstCriticalHitMsgState:2; u8 trainerSlideFirstSuperEffectiveHitMsgState:2; u8 trainerSlideFirstSTABMoveMsgState:2; u8 trainerSlidePlayerMonUnaffectedMsgState:2; - bool8 trainerSlideMegaEvolutionMsgDone:1; - bool8 trainerSlideZMoveMsgDone:1; - bool8 trainerSlideBeforeFirstTurnMsgDone:1; + bool8 trainerSlideMegaEvolutionMsgDone; + bool8 trainerSlideZMoveMsgDone; + bool8 trainerSlideBeforeFirstTurnMsgDone; }; #define F_DYNAMIC_TYPE_1 (1 << 6) diff --git a/src/battle_message.c b/src/battle_message.c index fab65a46b4..dd6390d282 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3934,6 +3934,37 @@ static u32 GetEnemyMonCount(u32 firstId, u32 lastId, bool32 onlyAlive) return count; } +enum +{ + LESS_THAN, + EQUAL, + GREATER_THAN, + LESS_THAN_OR_EQUAL, + GREATER_THAN_OR_EQUAL, + NOT_EQUAL, +}; + +u32 BattlerHPPercentage(u32 battlerId, u32 operation, u32 threshold) +{ + switch (operation) + { + case LESS_THAN: + return gBattleMons[battlerId].hp < (gBattleMons[battlerId].maxHP / threshold); + case EQUAL: + return gBattleMons[battlerId].hp == (gBattleMons[battlerId].maxHP / threshold); + case GREATER_THAN: + return gBattleMons[battlerId].hp > (gBattleMons[battlerId].maxHP / threshold); + case LESS_THAN_OR_EQUAL: + return gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / threshold); + case GREATER_THAN_OR_EQUAL: + return gBattleMons[battlerId].hp >= (gBattleMons[battlerId].maxHP / threshold); + case NOT_EQUAL: + return gBattleMons[battlerId].hp != (gBattleMons[battlerId].maxHP / threshold); + default: + break; + } +} + u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) { u32 i, firstId, lastId, trainerId, retValue = 1; @@ -3979,7 +4010,7 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL && GetEnemyMonCount(firstId, lastId, TRUE) == 1 - && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) + && BattlerHPPercentage(battlerId, GREATER_THAN_OR_EQUAL, 4) && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE; @@ -3997,7 +4028,7 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) case TRAINER_SLIDE_LAST_HALF_HP: if (sTrainerSlides[i].msgLastHalfHp != NULL && GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE) - 1 - && (gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 2) && gBattleMons[battlerId].hp > (gBattleMons[battlerId].maxHP / 4)) + && BattlerHPPercentage(battlerId, LESS_THAN_OR_EQUAL, 2) && BattlerHPPercentage(battlerId, GREATER_THAN, 4) && !gBattleStruct->trainerSlideHalfHpMsgDone) { gBattleStruct->trainerSlideHalfHpMsgDone = TRUE; From d922ac43e9c6be89cd46cbcd4a945bc6c558bba4 Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Thu, 23 Mar 2023 01:50:44 -0700 Subject: [PATCH 100/229] changed CanBeConfused to actually check its argument (#2855) --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 3c4201f467..66a5ca6221 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6524,8 +6524,8 @@ bool32 CanBeFrozen(u8 battlerId) bool32 CanBeConfused(u8 battlerId) { - if (GetBattlerAbility(gEffectBattler) == ABILITY_OWN_TEMPO - || gBattleMons[gEffectBattler].status2 & STATUS2_CONFUSION + if (GetBattlerAbility(battlerId) == ABILITY_OWN_TEMPO + || gBattleMons[battlerId].status2 & STATUS2_CONFUSION || IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN)) return FALSE; return TRUE; From e176fd285ed866f6e9d79a99997f2e4dc7d48feb Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 23 Mar 2023 05:58:26 -0300 Subject: [PATCH 101/229] Fixed erroneous uses of non e-reader Enigma Berries (#2839) --- src/battle_util.c | 6 +++--- src/battle_z_move.c | 2 +- src/pokemon.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 66a5ca6221..6801e6b293 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8172,7 +8172,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating) return gBattleStruct->debugHoldEffects[battlerId]; else #endif - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffect; else return ItemId_GetHoldEffect(gBattleMons[battlerId].item); @@ -8181,7 +8181,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating) // static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item) { - if (item == ITEM_ENIGMA_BERRY) + if (item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffectParam; else return ItemId_GetHoldEffectParam(item); @@ -8189,7 +8189,7 @@ static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item) u32 GetBattlerHoldEffectParam(u8 battlerId) { - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffectParam; else return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item); diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 536080aa96..0fe777a2ba 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -199,7 +199,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move) holdEffect = gBattleStruct->debugHoldEffects[battlerId]; else #endif - if (item == ITEM_ENIGMA_BERRY) + if (item == ITEM_ENIGMA_BERRY_E_READER) return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect; else holdEffect = ItemId_GetHoldEffect(item); diff --git a/src/pokemon.c b/src/pokemon.c index 71dcb5bcbc..afb6e90278 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6543,7 +6543,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0); partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0); - if (partnerHeldItem == ITEM_ENIGMA_BERRY) + if (partnerHeldItem == ITEM_ENIGMA_BERRY_E_READER) partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem); @@ -7213,7 +7213,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) u8 bonus; heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0); - if (heldItem == ITEM_ENIGMA_BERRY) + if (heldItem == ITEM_ENIGMA_BERRY_E_READER) { if (gMain.inBattle) holdEffect = gEnigmaBerries[0].holdEffect; From 69f58adbb22bde492a0d66593bd93c5a66fbff39 Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Sun, 26 Mar 2023 15:03:56 -0400 Subject: [PATCH 102/229] add check for Gorilla Tactics when resetting choicedMove from knock off (#2854) --- src/battle_script_commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 8b8d4f1e94..f9c117842a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5304,7 +5304,8 @@ static bool32 TryKnockOffBattleScript(u32 battlerDef) gLastUsedItem = gBattleMons[battlerDef].item; gBattleMons[battlerDef].item = 0; - gBattleStruct->choicedMove[battlerDef] = 0; + if (gBattleMons[battlerDef].ability != ABILITY_GORILLA_TACTICS) + gBattleStruct->choicedMove[battlerDef] = 0; gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[battlerDef]]; CheckSetUnburden(battlerDef); From c283eacd08eb97f4abfc6ed9fcd37f2515e76a7d Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:48:50 -0400 Subject: [PATCH 103/229] Fixed instances of gSideTimers not using side constants (#2867) --- src/battle_script_commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f9c117842a..5452a6836d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3863,14 +3863,14 @@ static void Cmd_tryfaintmon(void) if (gBattleResults.playerFaintCounter < 255) gBattleResults.playerFaintCounter++; AdjustFriendshipOnBattleFaint(gActiveBattler); - gSideTimers[0].retaliateTimer = 2; + gSideTimers[B_SIDE_PLAYER].retaliateTimer = 2; } else { if (gBattleResults.opponentFaintCounter < 255) gBattleResults.opponentFaintCounter++; gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL); - gSideTimers[1].retaliateTimer = 2; + gSideTimers[B_SIDE_OPPONENT].retaliateTimer = 2; } if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0) { From e89dc0dd0068b7a7c3883e0b29c51aa62d40241c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 8 Apr 2023 13:01:42 -0400 Subject: [PATCH 104/229] Fixes Ominous Wind targeting (#2896) --- src/data/battle_moves.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 9fdf268d6f..0f2aa1ffa4 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -8399,7 +8399,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 10, - .target = MOVE_TARGET_BOTH, + .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, From a845eb1dfad616f3b32415885438df0481814493 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Tue, 18 Apr 2023 16:28:02 -0400 Subject: [PATCH 105/229] Fixed Budew evolution method (#2928) --- src/data/pokemon/evolution.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 4f09867a6c..a0e5024f5b 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -311,7 +311,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_KRICKETOT] = {{EVO_LEVEL, 10, SPECIES_KRICKETUNE}}, [SPECIES_SHINX] = {{EVO_LEVEL, 15, SPECIES_LUXIO}}, [SPECIES_LUXIO] = {{EVO_LEVEL, 30, SPECIES_LUXRAY}}, - [SPECIES_BUDEW] = {{EVO_FRIENDSHIP, 0, SPECIES_ROSELIA}}, + [SPECIES_BUDEW] = {{EVO_FRIENDSHIP_DAY, 0, SPECIES_ROSELIA}}, [SPECIES_CRANIDOS] = {{EVO_LEVEL, 30, SPECIES_RAMPARDOS}}, [SPECIES_SHIELDON] = {{EVO_LEVEL, 30, SPECIES_BASTIODON}}, [SPECIES_BURMY] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM}, From 868838a87d8af109ee90835d6c33bd7d8928328c Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:35:42 -0400 Subject: [PATCH 106/229] Add thunder cage case to trap anim IDs (#2941) --- data/battle_anim_scripts.s | 5 +++++ include/constants/battle_anim.h | 1 + include/constants/battle_string_ids.h | 24 +++++++++++--------- src/battle_anim_throw.c | 32 +++++++++++++++++++-------- src/battle_message.c | 3 +++ 5 files changed, 45 insertions(+), 20 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index cca8706cbc..adcb88c881 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -24463,6 +24463,7 @@ General_TurnTrap: jumpargeq 0, TRAP_ANIM_MAGMA_STORM, Status_MagmaStorm jumpargeq 0, TRAP_ANIM_INFESTATION, Status_Infestation jumpargeq 0, TRAP_ANIM_SNAP_TRAP, Status_Snap_Trap + jumpargeq 0, TRAP_ANIM_THUNDER_CAGE, Status_Thunder_Cage goto Status_BindWrap Status_BindWrap: loadspritegfx ANIM_TAG_TENDRILS @@ -24549,6 +24550,10 @@ Status_Clamp: waitforvisualfinish end +Status_Thunder_Cage: + @ TODO + goto Move_THUNDER_CAGE + Status_Snap_Trap: @ placeholder goto Move_BITE diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 4316191a2e..46e229a319 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -583,6 +583,7 @@ #define TRAP_ANIM_MAGMA_STORM 5 #define TRAP_ANIM_INFESTATION 6 #define TRAP_ANIM_SNAP_TRAP 7 +#define TRAP_ANIM_THUNDER_CAGE 8 // Weather defines for battle animation scripts. #define ANIM_WEATHER_NONE 0 diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index e552077534..f4fd589db1 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -651,8 +651,9 @@ #define STRINGID_ITEMRESTOREDSPECIESHEALTH 649 #define STRINGID_ITEMCUREDSPECIESSTATUS 650 #define STRINGID_ITEMRESTOREDSPECIESPP 651 +#define STRINGID_THUNDERCAGETRAPPED 652 -#define BATTLESTRINGS_COUNT 652 +#define BATTLESTRINGS_COUNT 653 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -917,16 +918,17 @@ #define B_MSG_TERRAINENDS_COUNT 4 // gWrappedStringIds -#define B_MSG_WRAPPED_BIND 0 -#define B_MSG_WRAPPED_WRAP 1 -#define B_MSG_WRAPPED_FIRE_SPIN 2 -#define B_MSG_WRAPPED_CLAMP 3 -#define B_MSG_WRAPPED_WHIRLPOOL 4 -#define B_MSG_WRAPPED_SAND_TOMB 5 -#define B_MSG_WRAPPED_MAGMA_STORM 6 -#define B_MSG_WRAPPED_INFESTATION 7 -#define B_MSG_WRAPPED_SNAP_TRAP 8 -#define NUM_TRAPPING_MOVES 9 +#define B_MSG_WRAPPED_BIND 0 +#define B_MSG_WRAPPED_WRAP 1 +#define B_MSG_WRAPPED_FIRE_SPIN 2 +#define B_MSG_WRAPPED_CLAMP 3 +#define B_MSG_WRAPPED_WHIRLPOOL 4 +#define B_MSG_WRAPPED_SAND_TOMB 5 +#define B_MSG_WRAPPED_MAGMA_STORM 6 +#define B_MSG_WRAPPED_INFESTATION 7 +#define B_MSG_WRAPPED_SNAP_TRAP 8 +#define B_MSG_WRAPPED_THUNDER_CAGE 9 +#define NUM_TRAPPING_MOVES 10 // z effects #define B_MSG_Z_RESET_STATS 0 diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index a3197d4477..3fc2000e4a 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2736,23 +2736,37 @@ void AnimTask_SetAttackerTargetLeftPos(u8 taskId) void AnimTask_GetTrappedMoveAnimId(u8 taskId) { - if (gBattleSpritesDataPtr->animationData->animArg == MOVE_FIRE_SPIN) + switch (gBattleSpritesDataPtr->animationData->animArg) + { + case MOVE_FIRE_SPIN: gBattleAnimArgs[0] = TRAP_ANIM_FIRE_SPIN; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_WHIRLPOOL) + break; + case MOVE_WHIRLPOOL: gBattleAnimArgs[0] = TRAP_ANIM_WHIRLPOOL; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_CLAMP) + break; + case MOVE_CLAMP: gBattleAnimArgs[0] = TRAP_ANIM_CLAMP; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_SAND_TOMB) + break; + case MOVE_SAND_TOMB: gBattleAnimArgs[0] = TRAP_ANIM_SAND_TOMB; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_MAGMA_STORM) + break; + case MOVE_MAGMA_STORM: gBattleAnimArgs[0] = TRAP_ANIM_MAGMA_STORM; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_INFESTATION) + break; + case MOVE_INFESTATION: gBattleAnimArgs[0] = TRAP_ANIM_INFESTATION; - else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_SNAP_TRAP) + break; + case MOVE_SNAP_TRAP: gBattleAnimArgs[0] = TRAP_ANIM_SNAP_TRAP; - else + break; + case MOVE_THUNDER_CAGE: + gBattleAnimArgs[0] = TRAP_ANIM_THUNDER_CAGE; + break; + default: gBattleAnimArgs[0] = TRAP_ANIM_BIND; - + break; + } + DestroyAnimVisualTask(taskId); } diff --git a/src/battle_message.c b/src/battle_message.c index e1122c7aac..21f7098f81 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -786,9 +786,11 @@ static const u8 sText_PkmnRevivedReadyToFight[] = _("{B_BUFF1} was revived and\n static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_BUFF1} had its\nHP restored!"); static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_BUFF1} had\nits status healed!"); static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_BUFF1} had its\nPP restored!"); +static const u8 sText_AtkTrappedDef[] = _("{B_ATK_NAME_WITH_PREFIX} trapped\nthe {B_DEF_NAME_WITH_PREFIX}!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_THUNDERCAGETRAPPED - BATTLESTRINGS_TABLE_START] = sText_AtkTrappedDef, [STRINGID_ITEMRESTOREDSPECIESHEALTH - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesHealth, [STRINGID_ITEMCUREDSPECIESSTATUS - BATTLESTRINGS_TABLE_START] = sText_ItemCuredSpeciesStatus, [STRINGID_ITEMRESTOREDSPECIESPP - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesPP, @@ -1679,6 +1681,7 @@ const u16 gWrappedStringIds[NUM_TRAPPING_MOVES] = [B_MSG_WRAPPED_MAGMA_STORM] = STRINGID_TRAPPEDBYSWIRLINGMAGMA, // MOVE_MAGMA_STORM [B_MSG_WRAPPED_INFESTATION] = STRINGID_INFESTATION, // MOVE_INFESTATION [B_MSG_WRAPPED_SNAP_TRAP] = STRINGID_PKMNINSNAPTRAP, // MOVE_SNAP_TRAP + [B_MSG_WRAPPED_THUNDER_CAGE]= STRINGID_THUNDERCAGETRAPPED, // MOVE_THUNDER_CAGE }; const u16 gMistUsedStringIds[] = From f74a1b07660ad5fd8c2e205074f1e265df98657d Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Mon, 24 Apr 2023 22:26:56 +0200 Subject: [PATCH 107/229] fix strings after update --- test/item_effect_cure_status.c | 61 +++++++------------------ test/item_effect_heal_and_cure_status.c | 5 +- test/item_effect_revive.c | 10 ++-- 3 files changed, 23 insertions(+), 53 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index f014a29b78..c593aa016c 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -10,7 +10,7 @@ SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paraly } WHEN { TURN { USE_ITEM(player, ITEM_PARALYZE_HEAL, partyIndex: 0); } } SCENE { - MESSAGE("Paralyze Heal cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -23,7 +23,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") } WHEN { TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { - MESSAGE("Antidote cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -36,7 +36,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poiso } WHEN { TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { - MESSAGE("Antidote cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -49,7 +49,7 @@ SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") } WHEN { TURN { USE_ITEM(player, ITEM_AWAKENING, partyIndex: 0); } } SCENE { - MESSAGE("Awakening cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -62,7 +62,7 @@ SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") } WHEN { TURN { USE_ITEM(player, ITEM_BURN_HEAL, partyIndex: 0); } } SCENE { - MESSAGE("Burn Heal cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -75,7 +75,7 @@ SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") } WHEN { TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); } } SCENE { - MESSAGE("Ice Heal cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -95,7 +95,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat } WHEN { TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } } SCENE { - MESSAGE("Full Heal cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -115,7 +115,7 @@ SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any prima } WHEN { TURN { USE_ITEM(player, ITEM_PEWTER_CRUNCHIES, partyIndex: 0); } } SCENE { - MESSAGE("PewtrCrnches cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -135,7 +135,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary s } WHEN { TURN { USE_ITEM(player, ITEM_LAVA_COOKIE, partyIndex: 0); } } SCENE { - MESSAGE("Lava Cookie cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -155,7 +155,7 @@ SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary } WHEN { TURN { USE_ITEM(player, ITEM_RAGE_CANDY_BAR, partyIndex: 0); } } SCENE { - MESSAGE("RageCandyBar cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -175,7 +175,7 @@ SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary stat } WHEN { TURN { USE_ITEM(player, ITEM_OLD_GATEAU, partyIndex: 0); } } SCENE { - MESSAGE("Old Gateau cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -195,7 +195,7 @@ SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary s } WHEN { TURN { USE_ITEM(player, ITEM_CASTELIACONE, partyIndex: 0); } } SCENE { - MESSAGE("Casteliacone cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -215,7 +215,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primar } WHEN { TURN { USE_ITEM(player, ITEM_LUMIOSE_GALETTE, partyIndex: 0); } } SCENE { - MESSAGE("LumioseGlete cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!");; } } @@ -235,7 +235,7 @@ SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary } WHEN { TURN { USE_ITEM(player, ITEM_SHALOUR_SABLE, partyIndex: 0); } } SCENE { - MESSAGE("ShalourSable cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -255,7 +255,7 @@ SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary s } WHEN { TURN { USE_ITEM(player, ITEM_BIG_MALASADA, partyIndex: 0); } } SCENE { - MESSAGE("Big Malasada cured Wobbuffet's status!"); + MESSAGE("Wobbuffet had its status healed!"); } } @@ -279,35 +279,6 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler TURN { MOVE(opponent, MOVE_CONFUSE_RAY); } TURN { USE_ITEM(player, item, partyIndex: 0); } } SCENE { - switch (item) - { - case ITEM_FULL_HEAL: - MESSAGE("Full Heal cured Wobbuffet's status!"); - break; - case ITEM_PEWTER_CRUNCHIES: - MESSAGE("PewtrCrnches cured Wobbuffet's status!"); - break; - case ITEM_LAVA_COOKIE: - MESSAGE("Lava Cookie cured Wobbuffet's status!"); - break; - case ITEM_RAGE_CANDY_BAR: - MESSAGE("RageCandyBar cured Wobbuffet's status!"); - break; - case ITEM_OLD_GATEAU: - MESSAGE("Old Gateau cured Wobbuffet's status!"); - break; - case ITEM_CASTELIACONE: - MESSAGE("Casteliacone cured Wobbuffet's status!"); - break; - case ITEM_LUMIOSE_GALETTE: - MESSAGE("LumioseGlete cured Wobbuffet's status!"); - break; - case ITEM_SHALOUR_SABLE: - MESSAGE("ShalourSable cured Wobbuffet's status!"); - break; - case ITEM_BIG_MALASADA: - MESSAGE("Big Malasada cured Wobbuffet's status!"); - break; - } + MESSAGE("Wobbuffet had its status healed!"); } } diff --git a/test/item_effect_heal_and_cure_status.c b/test/item_effect_heal_and_cure_status.c index d9bf0cf7c8..95f97fbaa3 100644 --- a/test/item_effect_heal_and_cure_status.c +++ b/test/item_effect_heal_and_cure_status.c @@ -17,7 +17,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s } WHEN { TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); } } SCENE { - MESSAGE("Full Restore restored Wobbuffet's health!"); + MESSAGE("Wobbuffet had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, player->maxHP); EXPECT_EQ(player->status1, STATUS1_NONE); @@ -28,7 +28,6 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion") { // known failing bc even though it passes there is an underlying bug still that is only obvious in the replay. see #2938 // this also means that this test is likely not very good so I advice this to be redone - KNOWN_FAILING; GIVEN { ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS); PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300);}; @@ -38,7 +37,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion") TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); } TURN{ MOVE(player, MOVE_TACKLE); } } SCENE { - MESSAGE("Full Restore restored Wobbuffet's health!"); + MESSAGE("Wobbuffet had its HP restored!"); NONE_OF { MESSAGE("Wobbuffet is confused!"); } } FINALLY { EXPECT_EQ(player->hp, player->maxHP); diff --git a/test/item_effect_revive.c b/test/item_effect_revive.c index 9ced527f4e..695361892e 100644 --- a/test/item_effect_revive.c +++ b/test/item_effect_revive.c @@ -15,7 +15,7 @@ SINGLE_BATTLE_TEST("Revive: Super Potion restores a fainted battler's HP to half TURN { USE_ITEM(player, ITEM_SUPER_POTION, partyIndex: 0); } TURN { SWITCH(player, 0); } } SCENE { - MESSAGE("Super Potion restored Wynaut's health!"); + MESSAGE("Wynaut had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, 60); } @@ -33,7 +33,7 @@ SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") TURN { USE_ITEM(player, ITEM_REVIVE, partyIndex: 0); } TURN { SWITCH(player, 0); } } SCENE { - MESSAGE("Revive restored Wynaut's health!"); + MESSAGE("Wynaut had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, MAX_HP/2); } @@ -51,7 +51,7 @@ SINGLE_BATTLE_TEST("Revive: Max Revive restores a fainted battler's HP fully") TURN { USE_ITEM(player, ITEM_MAX_REVIVE, partyIndex: 0); } TURN { SWITCH(player, 0); } } SCENE { - MESSAGE("Max Revive restored Wynaut's health!"); + MESSAGE("Wynaut had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, MAX_HP); } @@ -69,7 +69,7 @@ SINGLE_BATTLE_TEST("Revive: Revival Herb restores a fainted battler's HP fully") TURN { USE_ITEM(player, ITEM_REVIVAL_HERB, partyIndex: 0); } TURN { SWITCH(player, 0); } } SCENE { - MESSAGE("Revival Herb restored Wynaut's health!"); + MESSAGE("Wynaut had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, MAX_HP); } @@ -87,7 +87,7 @@ SINGLE_BATTLE_TEST("Revive: Max Honey restores a fainted battler's HP fully") TURN { USE_ITEM(player, ITEM_MAX_HONEY, partyIndex: 0); } TURN { SWITCH(player, 0); } } SCENE { - MESSAGE("Max Honey restored Wynaut's health!"); + MESSAGE("Wynaut had its HP restored!"); } FINALLY { EXPECT_EQ(player->hp, MAX_HP); } From 59666a1eb42d0699f27c102614234f4a8abd03eb Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Mon, 24 Apr 2023 22:36:58 +0200 Subject: [PATCH 108/229] heal powder test --- test/item_effect_cure_status.c | 21 +++++++++++++++++++++ test/item_effect_heal_and_cure_status.c | 2 -- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index c593aa016c..229f4e2b79 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -99,6 +99,26 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat } } +SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary status") +{ + u16 status; + PARAMETRIZE{ status = STATUS1_BURN; } + PARAMETRIZE{ status = STATUS1_FREEZE; } + PARAMETRIZE{ status = STATUS1_PARALYSIS; } + PARAMETRIZE{ status = STATUS1_POISON; } + PARAMETRIZE{ status = STATUS1_TOXIC_POISON; } + PARAMETRIZE{ status = STATUS1_SLEEP; } + GIVEN { + ASSUME(gItems[ITEM_HEAL_POWDER].battleUsage == EFFECT_ITEM_CURE_STATUS); + PLAYER(SPECIES_WOBBUFFET) { Status1(status); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { USE_ITEM(player, ITEM_HEAL_POWDER, partyIndex: 0); } + } SCENE { + MESSAGE("Wobbuffet had its status healed!"); + } +} + SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any primary status") { u16 status; @@ -263,6 +283,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler { u16 item; PARAMETRIZE { item = ITEM_FULL_HEAL; } + PARAMETRIZE { item = ITEM_HEAL_POWDER; } PARAMETRIZE { item = ITEM_PEWTER_CRUNCHIES; } PARAMETRIZE { item = ITEM_LAVA_COOKIE; } PARAMETRIZE { item = ITEM_RAGE_CANDY_BAR; } diff --git a/test/item_effect_heal_and_cure_status.c b/test/item_effect_heal_and_cure_status.c index 95f97fbaa3..6e264d25ac 100644 --- a/test/item_effect_heal_and_cure_status.c +++ b/test/item_effect_heal_and_cure_status.c @@ -26,8 +26,6 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion") { - // known failing bc even though it passes there is an underlying bug still that is only obvious in the replay. see #2938 - // this also means that this test is likely not very good so I advice this to be redone GIVEN { ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS); PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300);}; From 9562c7a37a000b4cfa34650ad717e300f7234c9e Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Mon, 24 Apr 2023 18:49:53 -0400 Subject: [PATCH 109/229] Added forbidden Metronome moves from PLA and SV (#2949) --- src/battle_script_commands.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 07669635e3..3632095963 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -979,6 +979,7 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_STRUGGLE] = 0xFF, // Neither Struggle [MOVE_AFTER_YOU] = FORBIDDEN_METRONOME, [MOVE_APPLE_ACID] = FORBIDDEN_METRONOME, + [MOVE_ARMOR_CANNON] = FORBIDDEN_METRONOME, [MOVE_ARM_THRUST] = FORBIDDEN_PARENTAL_BOND, [MOVE_ASSIST] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_ASTRAL_BARRAGE] = FORBIDDEN_METRONOME, @@ -994,6 +995,7 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_BESTOW] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_BIDE] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, // Note: Bide should work with Parental Bond. This will be addressed in future. [MOVE_BLAST_BURN] = FORBIDDEN_INSTRUCT, + [MOVE_BLAZING_TORQUE] = FORBIDDEN_MIMIC | FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_BODY_PRESS] = FORBIDDEN_METRONOME, [MOVE_BONE_RUSH] = FORBIDDEN_PARENTAL_BOND, [MOVE_BONEMERANG] = FORBIDDEN_PARENTAL_BOND, @@ -1005,9 +1007,14 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_BUZZY_BUZZ] = FORBIDDEN_METRONOME, [MOVE_CELEBRATE] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_CHATTER] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_MIMIC | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, + [MOVE_CHILLING_WATER] = FORBIDDEN_METRONOME, + [MOVE_CHILLY_RECEPTION] = FORBIDDEN_METRONOME, [MOVE_CIRCLE_THROW] = FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_CLANGOROUS_SOUL] = FORBIDDEN_METRONOME, + [MOVE_COLLISION_COURSE] = FORBIDDEN_METRONOME, + [MOVE_COMBAT_TORQUE] = FORBIDDEN_MIMIC | FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_COMET_PUNCH] = FORBIDDEN_PARENTAL_BOND, + [MOVE_COMEUPPANCE] = FORBIDDEN_METRONOME, [MOVE_COPYCAT] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_COUNTER] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_COVET] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, @@ -1018,9 +1025,11 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_DIAMOND_STORM] = FORBIDDEN_METRONOME, [MOVE_DIG] = FORBIDDEN_ASSIST | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_DIVE] = FORBIDDEN_ASSIST | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, + [MOVE_DOODLE] = FORBIDDEN_METRONOME, [MOVE_DOUBLE_IRON_BASH] = FORBIDDEN_METRONOME | FORBIDDEN_PARENTAL_BOND, [MOVE_DOUBLE_HIT] = FORBIDDEN_PARENTAL_BOND, [MOVE_DOUBLE_KICK] = FORBIDDEN_PARENTAL_BOND, + [MOVE_DOUBLE_SHOCK] = FORBIDDEN_METRONOME, [MOVE_DOUBLE_SLAP] = FORBIDDEN_PARENTAL_BOND, [MOVE_DRAGON_ASCENT] = FORBIDDEN_METRONOME, [MOVE_DRAGON_ENERGY] = FORBIDDEN_METRONOME, @@ -1030,6 +1039,7 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_DUAL_CHOP] = FORBIDDEN_PARENTAL_BOND, [MOVE_DUAL_WINGBEAT] = FORBIDDEN_PARENTAL_BOND, [MOVE_DYNAMAX_CANNON] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, + [MOVE_ELECTRO_DRIFT] = FORBIDDEN_METRONOME, [MOVE_ENDEAVOR] = FORBIDDEN_PARENTAL_BOND, [MOVE_ENDURE] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_ETERNABEAM] = FORBIDDEN_METRONOME | FORBIDDEN_INSTRUCT, @@ -1037,6 +1047,7 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_FALSE_SURRENDER] = FORBIDDEN_METRONOME, [MOVE_FEINT] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_FIERY_WRATH] = FORBIDDEN_METRONOME, + [MOVE_FILLET_AWAY] = FORBIDDEN_METRONOME, [MOVE_FINAL_GAMBIT] = FORBIDDEN_PARENTAL_BOND, [MOVE_FISSURE] = FORBIDDEN_PARENTAL_BOND, [MOVE_FLEUR_CANNON] = FORBIDDEN_METRONOME, @@ -1062,16 +1073,20 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_HORN_DRILL] = FORBIDDEN_PARENTAL_BOND, [MOVE_HYDRO_CANNON] = FORBIDDEN_INSTRUCT, [MOVE_HYPER_BEAM] = FORBIDDEN_INSTRUCT, + [MOVE_HYPER_DRILL] = FORBIDDEN_METRONOME, [MOVE_HYPERSPACE_FURY] = FORBIDDEN_METRONOME, [MOVE_HYPERSPACE_HOLE] = FORBIDDEN_METRONOME, [MOVE_ICE_BALL] = FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_ICE_BURN] = FORBIDDEN_METRONOME | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_ICICLE_SPEAR] = FORBIDDEN_PARENTAL_BOND, [MOVE_INSTRUCT] = FORBIDDEN_METRONOME | FORBIDDEN_INSTRUCT, + [MOVE_JET_PUNCH] = FORBIDDEN_METRONOME, [MOVE_JUNGLE_HEALING] = FORBIDDEN_METRONOME, [MOVE_KINGS_SHIELD] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_INSTRUCT, [MOVE_LIFE_DEW] = FORBIDDEN_METRONOME, [MOVE_LIGHT_OF_RUIN] = FORBIDDEN_METRONOME, + [MOVE_MAKE_IT_RAIN] = FORBIDDEN_METRONOME, + [MOVE_MAGICAL_TORQUE] = FORBIDDEN_MIMIC | FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_MAT_BLOCK] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_ME_FIRST] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_METEOR_ASSAULT] = FORBIDDEN_METRONOME | FORBIDDEN_INSTRUCT, @@ -1085,32 +1100,47 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_MOONGEIST_BEAM] = FORBIDDEN_METRONOME, [MOVE_NATURE_POWER] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_NATURES_MADNESS] = FORBIDDEN_METRONOME, + [MOVE_NOXIOUS_TORQUE] = FORBIDDEN_MIMIC | FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_OBSTRUCT] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_INSTRUCT, + [MOVE_ORDER_UP] = FORBIDDEN_METRONOME, [MOVE_ORIGIN_PULSE] = FORBIDDEN_METRONOME, [MOVE_OUTRAGE] = FORBIDDEN_INSTRUCT, [MOVE_OVERDRIVE] = FORBIDDEN_METRONOME, [MOVE_PHANTOM_FORCE] = FORBIDDEN_ASSIST | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_PHOTON_GEYSER] = FORBIDDEN_METRONOME, + [MOVE_PLASMA_FISTS] = FORBIDDEN_METRONOME, + [MOVE_POPULATION_BOMB] = FORBIDDEN_METRONOME, + [MOVE_POUNCE] = FORBIDDEN_METRONOME, + [MOVE_POWER_SHIFT] = FORBIDDEN_METRONOME, + [MOVE_PRECIPICE_BLADES] = FORBIDDEN_METRONOME, [MOVE_PRISMATIC_LASER] = FORBIDDEN_INSTRUCT, [MOVE_PROTECT] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_PYRO_BALL] = FORBIDDEN_METRONOME, [MOVE_QUASH] = FORBIDDEN_METRONOME, [MOVE_QUICK_GUARD] = FORBIDDEN_METRONOME, + [MOVE_RAGE_FIST] = FORBIDDEN_METRONOME, [MOVE_RAGE_POWDER] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, + [MOVE_RAGING_BULL] = FORBIDDEN_METRONOME, + [MOVE_RAGING_FURY] = FORBIDDEN_METRONOME, [MOVE_RAZOR_WIND] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_RELIC_SONG] = FORBIDDEN_METRONOME, + [MOVE_REVIVAL_BLESSING] = FORBIDDEN_METRONOME, [MOVE_ROAR] = FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_ROAR_OF_TIME] = FORBIDDEN_INSTRUCT, [MOVE_ROCK_BLAST] = FORBIDDEN_PARENTAL_BOND, [MOVE_ROCK_WRECKER] = FORBIDDEN_INSTRUCT, [MOVE_ROLLOUT] = FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, + [MOVE_RUINATION] = FORBIDDEN_METRONOME, [MOVE_SAPPY_SEED] = FORBIDDEN_METRONOME, + [MOVE_SALT_CURE] = FORBIDDEN_METRONOME, [MOVE_SCALE_SHOT] = FORBIDDEN_PARENTAL_BOND, [MOVE_SECRET_SWORD] = FORBIDDEN_METRONOME, [MOVE_SELF_DESTRUCT] = FORBIDDEN_PARENTAL_BOND, [MOVE_SHADOW_FORCE] = FORBIDDEN_ASSIST | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, + [MOVE_SHED_TAIL] = FORBIDDEN_METRONOME, [MOVE_SHEER_COLD] = FORBIDDEN_PARENTAL_BOND, [MOVE_SHELL_TRAP] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, + [MOVE_SILK_TRAP] = FORBIDDEN_METRONOME, [MOVE_SIZZLY_SLIDE] = FORBIDDEN_METRONOME, [MOVE_SKETCH] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_MIMIC | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_SKULL_BASH] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, @@ -1121,10 +1151,12 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_SNARL] = FORBIDDEN_METRONOME, [MOVE_SNATCH] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_INSTRUCT, [MOVE_SNORE] = FORBIDDEN_METRONOME, + [MOVE_SNOWSCAPE] = FORBIDDEN_METRONOME, [MOVE_SOLAR_BEAM] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_SOLAR_BLADE] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_SPARKLY_SWIRL] = FORBIDDEN_METRONOME, [MOVE_SPECTRAL_THIEF] = FORBIDDEN_METRONOME, + [MOVE_SPICY_EXTRACT] = FORBIDDEN_METRONOME, [MOVE_SPIKE_CANNON] = FORBIDDEN_PARENTAL_BOND, [MOVE_SPIKY_SHIELD] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_SPIRIT_BREAK] = FORBIDDEN_METRONOME, @@ -1144,17 +1176,21 @@ static const u8 sForbiddenMoves[MOVES_COUNT] = [MOVE_THRASH] = FORBIDDEN_INSTRUCT, [MOVE_THUNDER_CAGE] = FORBIDDEN_METRONOME, [MOVE_THUNDEROUS_KICK] = FORBIDDEN_METRONOME, + [MOVE_TIDY_UP] = FORBIDDEN_METRONOME, + [MOVE_TRAILBLAZE] = FORBIDDEN_METRONOME, [MOVE_TRANSFORM] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_MIMIC | FORBIDDEN_INSTRUCT, [MOVE_TRICK] = FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_TRIPLE_AXEL] = FORBIDDEN_PARENTAL_BOND, [MOVE_TRIPLE_KICK] = FORBIDDEN_PARENTAL_BOND, [MOVE_TWINEEDLE] = FORBIDDEN_PARENTAL_BOND, + [MOVE_TWIN_BEAM] = FORBIDDEN_METRONOME, [MOVE_UPROAR] = FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT | FORBIDDEN_PARENTAL_BOND, [MOVE_V_CREATE] = FORBIDDEN_METRONOME, [MOVE_VEEVEE_VOLLEY] = FORBIDDEN_METRONOME, [MOVE_WATER_SHURIKEN] = FORBIDDEN_PARENTAL_BOND, [MOVE_WHIRLWIND] = FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT, [MOVE_WICKED_BLOW] = FORBIDDEN_METRONOME, + [MOVE_WICKED_TORQUE] = FORBIDDEN_MIMIC | FORBIDDEN_METRONOME | FORBIDDEN_ASSIST | FORBIDDEN_COPYCAT | FORBIDDEN_SLEEP_TALK | FORBIDDEN_INSTRUCT, [MOVE_WIDE_GUARD] = FORBIDDEN_METRONOME, [MOVE_ZIPPY_ZAP] = FORBIDDEN_METRONOME, }; From 60e048b83e967db723f2b6893555e14a44a8b0cb Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 13:44:16 +0200 Subject: [PATCH 110/229] more robust status cure tests --- test/item_effect_cure_status.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 229f4e2b79..4d4cbda2ee 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -11,6 +11,8 @@ SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paraly TURN { USE_ITEM(player, ITEM_PARALYZE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -24,6 +26,8 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -37,6 +41,8 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poiso TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -50,6 +56,8 @@ SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") TURN { USE_ITEM(player, ITEM_AWAKENING, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -63,6 +71,8 @@ SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") TURN { USE_ITEM(player, ITEM_BURN_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -76,6 +86,8 @@ SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -96,6 +108,8 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -116,6 +130,8 @@ SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary st TURN { USE_ITEM(player, ITEM_HEAL_POWDER, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -136,6 +152,8 @@ SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any prima TURN { USE_ITEM(player, ITEM_PEWTER_CRUNCHIES, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -156,6 +174,8 @@ SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary s TURN { USE_ITEM(player, ITEM_LAVA_COOKIE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -176,6 +196,8 @@ SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary TURN { USE_ITEM(player, ITEM_RAGE_CANDY_BAR, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -196,6 +218,8 @@ SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_OLD_GATEAU, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -216,6 +240,8 @@ SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary s TURN { USE_ITEM(player, ITEM_CASTELIACONE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -236,6 +262,8 @@ SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primar TURN { USE_ITEM(player, ITEM_LUMIOSE_GALETTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!");; + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -256,6 +284,8 @@ SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary TURN { USE_ITEM(player, ITEM_SHALOUR_SABLE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -276,6 +306,8 @@ SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary s TURN { USE_ITEM(player, ITEM_BIG_MALASADA, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -301,5 +333,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler TURN { USE_ITEM(player, item, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status2, STATUS1_NONE); // because we dont have STATUS2_NONE } } From 2aa4d2da3836cad4e422c2f722970ae795105c39 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Tue, 25 Apr 2023 19:38:47 +0200 Subject: [PATCH 111/229] Fix Ice Heal message --- include/constants/item_effects.h | 2 +- src/item.c | 2 +- src/item_use.c | 2 +- src/party_menu.c | 18 ++++++++++-------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h index 7cd4a58f48..fca7924514 100644 --- a/include/constants/item_effects.h +++ b/include/constants/item_effects.h @@ -74,7 +74,7 @@ #define ITEM_EFFECT_CURE_POISON 3 #define ITEM_EFFECT_CURE_SLEEP 4 #define ITEM_EFFECT_CURE_BURN 5 -#define ITEM_EFFECT_CURE_FREEZE 6 +#define ITEM_EFFECT_CURE_FREEZE_FROSTBITE 6 #define ITEM_EFFECT_CURE_PARALYSIS 7 #define ITEM_EFFECT_CURE_CONFUSION 8 #define ITEM_EFFECT_CURE_INFATUATION 9 diff --git a/src/item.c b/src/item.c index d07e93782f..2c69372446 100644 --- a/src/item.c +++ b/src/item.c @@ -941,7 +941,7 @@ u8 ItemId_GetBattleUsage(u16 itemId) case ITEM_EFFECT_CURE_POISON: case ITEM_EFFECT_CURE_SLEEP: case ITEM_EFFECT_CURE_BURN: - case ITEM_EFFECT_CURE_FREEZE: + case ITEM_EFFECT_CURE_FREEZE_FROSTBITE: case ITEM_EFFECT_CURE_PARALYSIS: case ITEM_EFFECT_CURE_ALL_STATUS: case ITEM_EFFECT_CURE_CONFUSION: diff --git a/src/item_use.c b/src/item_use.c index 3a838288b1..86764be3b6 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -1244,7 +1244,7 @@ void ItemUseOutOfBattle_EnigmaBerry(u8 taskId) case ITEM_EFFECT_CURE_POISON: case ITEM_EFFECT_CURE_SLEEP: case ITEM_EFFECT_CURE_BURN: - case ITEM_EFFECT_CURE_FREEZE: + case ITEM_EFFECT_CURE_FREEZE_FROSTBITE: case ITEM_EFFECT_CURE_PARALYSIS: case ITEM_EFFECT_CURE_ALL_STATUS: case ITEM_EFFECT_ATK_EV: diff --git a/src/party_menu.c b/src/party_menu.c index 1623201b10..4eb09c1385 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4317,7 +4317,7 @@ static bool8 IsHPRecoveryItem(u16 item) return FALSE; } -static void GetMedicineItemEffectMessage(u16 item) +static void GetMedicineItemEffectMessage(u16 item, u32 statusCured) { switch (GetItemEffectType(item)) { @@ -4330,10 +4330,11 @@ static void GetMedicineItemEffectMessage(u16 item) case ITEM_EFFECT_CURE_BURN: StringExpandPlaceholders(gStringVar4, gText_PkmnBurnHealed); break; - case ITEM_EFFECT_CURE_FREEZE: - StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut); - // TO DO: if it heals frostbite, use the following instead: - // StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed); + case ITEM_EFFECT_CURE_FREEZE_FROSTBITE: + if (statusCured & STATUS1_FREEZE) + StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut); + if (statusCured & STATUS1_FROSTBITE) + StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed); break; case ITEM_EFFECT_CURE_PARALYSIS: StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis); @@ -4497,6 +4498,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 item = gSpecialVar_ItemId; bool8 canHeal, cannotUse; + u32 oldStatus = GetMonData(mon, MON_DATA_STATUS); if (NotUsingHPEVItemOnShedinja(mon, item) == FALSE) { @@ -4549,7 +4551,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) else { GetMonNickname(mon, gStringVar1); - GetMedicineItemEffectMessage(item); + GetMedicineItemEffectMessage(item, oldStatus); DisplayPartyMenuMessage(gStringVar4, TRUE); ScheduleBgCopyTilemapToVram(2); gTasks[taskId].func = task; @@ -4976,7 +4978,7 @@ static void TryUseItemOnMove(u8 taskId) RemoveBagItem(item, 1); move = GetMonData(mon, MON_DATA_MOVE1 + *moveSlot); StringCopy(gStringVar1, gMoveNames[move]); - GetMedicineItemEffectMessage(item); + GetMedicineItemEffectMessage(item, 0); DisplayPartyMenuMessage(gStringVar4, TRUE); ScheduleBgCopyTilemapToVram(2); gTasks[taskId].func = Task_ClosePartyMenuAfterText; @@ -5826,7 +5828,7 @@ u8 GetItemEffectType(u16 item) else if (statusCure == ITEM3_BURN) return ITEM_EFFECT_CURE_BURN; else if (statusCure == ITEM3_FREEZE) - return ITEM_EFFECT_CURE_FREEZE; + return ITEM_EFFECT_CURE_FREEZE_FROSTBITE; else if (statusCure == ITEM3_PARALYSIS) return ITEM_EFFECT_CURE_PARALYSIS; else if (statusCure == ITEM3_CONFUSION) From 7fad0a2dbce29dfa50e40e6c2194c3462df7626d Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 19:45:35 +0200 Subject: [PATCH 112/229] add MovesWithPP macro to allow for setting pps in tests --- test/test_battle.h | 5 +++++ test/test_runner_battle.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/test/test_battle.h b/test/test_battle.h index 967bb661dd..0f413a2e47 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -713,6 +713,9 @@ void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext); /* Given */ +#define MOVE_ARGS(...) {__VA_ARGS__} +#define PP_ARGS(...) {__VA_ARGS__} + #define GIVEN for (; gBattleTestRunnerState->runGiven; gBattleTestRunnerState->runGiven = FALSE) #define RNGSeed(seed) RNGSeed_(__LINE__, seed) @@ -733,6 +736,7 @@ void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext); #define Speed(speed) Speed_(__LINE__, speed) #define Item(item) Item_(__LINE__, item) #define Moves(move1, ...) Moves_(__LINE__, (const u16 [MAX_MON_MOVES]) { move1, __VA_ARGS__ }) +#define MovesWithPP(moves, pp) MovesWithPP_(__LINE__, (const u16 [MAX_MON_MOVES]) MOVE_ARGS moves, (const u8 [MAX_MON_MOVES]) PP_ARGS pp) #define Friendship(friendship) Friendship_(__LINE__, friendship) #define Status1(status1) Status1_(__LINE__, status1) @@ -753,6 +757,7 @@ void SpDefense_(u32 sourceLine, u32 spDefense); void Speed_(u32 sourceLine, u32 speed); void Item_(u32 sourceLine, u32 item); void Moves_(u32 sourceLine, const u16 moves[MAX_MON_MOVES]); +void MovesWithPP_(u32 sourceLine, const u16 moves[MAX_MON_MOVES], const u8 pp[MAX_MON_MOVES]); void Friendship_(u32 sourceLine, u32 friendship); void Status1_(u32 sourceLine, u32 status1); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 2a44cc018b..33fcd5a0f3 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1161,6 +1161,21 @@ void Moves_(u32 sourceLine, const u16 moves[MAX_MON_MOVES]) DATA.explicitMoves[DATA.currentSide] |= 1 << DATA.currentPartyIndex; } +void MovesWithPP_(u32 sourceLine, const u16 moves[MAX_MON_MOVES], const u8 pp[MAX_MON_MOVES]) +{ + s32 i; + INVALID_IF(!DATA.currentMon, "Moves outside of PLAYER/OPPONENT"); + for (i = 0; i < MAX_MON_MOVES; i++) + { + if (moves[i] == MOVE_NONE) + break; + INVALID_IF(moves[i] >= MOVES_COUNT, "Illegal move: %d", moves[i]); + SetMonData(DATA.currentMon, MON_DATA_MOVE1 + i, &moves[i]); + SetMonData(DATA.currentMon, MON_DATA_PP1 + i, &pp[i]); + } + DATA.explicitMoves[DATA.currentSide] |= 1 << DATA.currentPartyIndex; +} + void Friendship_(u32 sourceLine, u32 friendship) { INVALID_IF(!DATA.currentMon, "Friendship outside of PLAYER/OPPONENT"); From 2885ec24117f47628b2795483594d8793499589b Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Tue, 25 Apr 2023 19:48:45 +0200 Subject: [PATCH 113/229] Fix move descriptions --- src/data/text/move_descriptions.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index c2b7e0b234..f950c2a1aa 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -38,7 +38,11 @@ static const u8 sFirePunchDescription[] = _( static const u8 sIcePunchDescription[] = _( "An icy punch that may\n" +#if B_USE_FROSTBITE == TRUE + "leave the foe with frostbite."); +#else "freeze the foe."); +#endif static const u8 sThunderPunchDescription[] = _( "An electrified punch that\n" @@ -238,11 +242,19 @@ static const u8 sSurfDescription[] = _( static const u8 sIceBeamDescription[] = _( "Blasts the foe with an icy\n" +#if B_USE_FROSTBITE == TRUE + "beam. May cause frostbite."); +#else "beam that may freeze it."); +#endif static const u8 sBlizzardDescription[] = _( "Hits the foe with an icy\n" +#if B_USE_FROSTBITE == TRUE + "storm. May cause frostbite."); +#else "storm that may freeze it."); +#endif static const u8 sPsybeamDescription[] = _( "Fires a peculiar ray that\n" @@ -2931,7 +2943,11 @@ static const u8 sDragonEnergyDescription[] = _( static const u8 sFreezingGlareDescription[] = _( "Shoots psychic power from\n" +#if B_USE_FROSTBITE == TRUE + "the eyes. May frostbite."); +#else "the eyes. May freeze the foe."); +#endif static const u8 sFieryWrathDescription[] = _( "An attack fueled by your\n" From 08ec873ef27da02404c35c9ae911779043edaf9a Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 20:35:36 +0200 Subject: [PATCH 114/229] update MoveWithPP macro to use struct --- test/test_battle.h | 10 ++++++---- test/test_runner_battle.c | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/test/test_battle.h b/test/test_battle.h index 0f413a2e47..f2d8bab786 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -713,8 +713,10 @@ void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext); /* Given */ -#define MOVE_ARGS(...) {__VA_ARGS__} -#define PP_ARGS(...) {__VA_ARGS__} +struct moveWithPP { + u16 moveId; + u8 pp; +}; #define GIVEN for (; gBattleTestRunnerState->runGiven; gBattleTestRunnerState->runGiven = FALSE) @@ -736,7 +738,7 @@ void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext); #define Speed(speed) Speed_(__LINE__, speed) #define Item(item) Item_(__LINE__, item) #define Moves(move1, ...) Moves_(__LINE__, (const u16 [MAX_MON_MOVES]) { move1, __VA_ARGS__ }) -#define MovesWithPP(moves, pp) MovesWithPP_(__LINE__, (const u16 [MAX_MON_MOVES]) MOVE_ARGS moves, (const u8 [MAX_MON_MOVES]) PP_ARGS pp) +#define MovesWithPP(movewithpp1, ...) MovesWithPP_(__LINE__, (struct moveWithPP[MAX_MON_MOVES]) {movewithpp1, __VA_ARGS__}) #define Friendship(friendship) Friendship_(__LINE__, friendship) #define Status1(status1) Status1_(__LINE__, status1) @@ -757,7 +759,7 @@ void SpDefense_(u32 sourceLine, u32 spDefense); void Speed_(u32 sourceLine, u32 speed); void Item_(u32 sourceLine, u32 item); void Moves_(u32 sourceLine, const u16 moves[MAX_MON_MOVES]); -void MovesWithPP_(u32 sourceLine, const u16 moves[MAX_MON_MOVES], const u8 pp[MAX_MON_MOVES]); +void MovesWithPP_(u32 sourceLine, struct moveWithPP moveWithPP[MAX_MON_MOVES]); void Friendship_(u32 sourceLine, u32 friendship); void Status1_(u32 sourceLine, u32 status1); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 33fcd5a0f3..75e459e49b 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1161,17 +1161,17 @@ void Moves_(u32 sourceLine, const u16 moves[MAX_MON_MOVES]) DATA.explicitMoves[DATA.currentSide] |= 1 << DATA.currentPartyIndex; } -void MovesWithPP_(u32 sourceLine, const u16 moves[MAX_MON_MOVES], const u8 pp[MAX_MON_MOVES]) +void MovesWithPP_(u32 sourceLine, struct moveWithPP moveWithPP[MAX_MON_MOVES]) { s32 i; INVALID_IF(!DATA.currentMon, "Moves outside of PLAYER/OPPONENT"); for (i = 0; i < MAX_MON_MOVES; i++) { - if (moves[i] == MOVE_NONE) + if (moveWithPP[i].moveId == MOVE_NONE) break; - INVALID_IF(moves[i] >= MOVES_COUNT, "Illegal move: %d", moves[i]); - SetMonData(DATA.currentMon, MON_DATA_MOVE1 + i, &moves[i]); - SetMonData(DATA.currentMon, MON_DATA_PP1 + i, &pp[i]); + INVALID_IF(moveWithPP[i].moveId >= MOVES_COUNT, "Illegal move: %d", &moveWithPP[i].moveId); + SetMonData(DATA.currentMon, MON_DATA_MOVE1 + i, &moveWithPP[i].moveId); + SetMonData(DATA.currentMon, MON_DATA_PP1 + i, &moveWithPP[i].pp); } DATA.explicitMoves[DATA.currentSide] |= 1 << DATA.currentPartyIndex; } From 78c4d07b234c026304898bdc2b2fe8edc77a8402 Mon Sep 17 00:00:00 2001 From: Salem <65783283+CallmeEchoo@users.noreply.github.com> Date: Tue, 25 Apr 2023 21:03:57 +0200 Subject: [PATCH 115/229] Add Berserk Gene Item (#2893) Co-authored-by: Eduardo Quezada D'Ottone --- data/battle_scripts_1.s | 27 +++ graphics/items/icon_palettes/berserk_gene.pal | 19 ++ graphics/items/icons/berserk_gene.png | Bin 0 -> 356 bytes include/battle_scripts.h | 1 + include/battle_util.h | 1 + include/constants/battle.h | 1 + include/constants/hold_effects.h | 3 + include/constants/items.h | 3 +- include/graphics.h | 2 + src/battle_main.c | 2 +- src/battle_script_commands.c | 2 + src/battle_util.c | 79 +++++++- src/data/graphics/items.h | 3 + src/data/item_icon_table.h | 1 + src/data/items.h | 13 ++ src/data/text/item_descriptions.h | 5 + test/hold_effect_berserk_gene.c | 187 ++++++++++++++++++ 17 files changed, 340 insertions(+), 9 deletions(-) create mode 100644 graphics/items/icon_palettes/berserk_gene.pal create mode 100644 graphics/items/icons/berserk_gene.png create mode 100644 test/hold_effect_berserk_gene.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 4a5af83a2d..dcb076c278 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -10395,3 +10395,30 @@ BattleScript_CouldntFullyProtect:: printstring STRINGID_COULDNTFULLYPROTECT waitmessage B_WAIT_TIME_LONG return + +BattleScript_BerserkGeneRet:: +BattleScript_BerserkGeneRet_Anim: + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerserkGeneRet_TryConfuse + setgraphicalstatchangevalues + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1 + setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM + call BattleScript_StatUp +BattleScript_BerserkGeneRet_TryConfuse: + jumpifability BS_SCRIPTING, ABILITY_OWN_TEMPO, BattleScript_BerserkGeneRet_OwnTempoPrevents + jumpifsafeguard BattleScript_BerserkGeneRet_SafeguardProtected + setmoveeffect MOVE_EFFECT_CONFUSION + seteffectprimary + goto BattleScript_BerserkGeneRet_End +BattleScript_BerserkGeneRet_SafeguardProtected:: + pause B_WAIT_TIME_SHORT + printstring STRINGID_PKMNUSEDSAFEGUARD + waitmessage B_WAIT_TIME_LONG + goto BattleScript_BerserkGeneRet_End +BattleScript_BerserkGeneRet_OwnTempoPrevents: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_PKMNPREVENTSCONFUSIONWITH + waitmessage B_WAIT_TIME_LONG +BattleScript_BerserkGeneRet_End: + removeitem BS_SCRIPTING + end3 diff --git a/graphics/items/icon_palettes/berserk_gene.pal b/graphics/items/icon_palettes/berserk_gene.pal new file mode 100644 index 0000000000..3ac8981aa0 --- /dev/null +++ b/graphics/items/icon_palettes/berserk_gene.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +212 146 75 +49 49 49 +131 123 131 +98 90 98 +74 65 74 +164 90 222 +230 180 255 +255 230 238 +255 230 106 +255 189 74 +255 171 32 +238 148 0 +255 246 189 +123 82 32 +0 0 0 +0 0 0 diff --git a/graphics/items/icons/berserk_gene.png b/graphics/items/icons/berserk_gene.png new file mode 100644 index 0000000000000000000000000000000000000000..faac0f67690b8861aa2794e781924c47b26ada27 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;w_7YEDSN7*DZ2W5c{>}^efI{LW zt`Q}{`DrEPiAAXl?mjL+V-(6#ixiCYObT0QTLv0`TzgfyZ_I!{_pkrzgpql z6o&ub_ErZe0CfOCK(E1XAjO#E?e6k_Df_3RKu(9Ji(^Q|oaBUr1OXOCMm7V15GF=f zgZ_&gX9A5_ienDsh`MvIGbzjoNM6vgDO15kZS9^tdvuNpCP_sc6G+;|azl<&BmLUE zyVYfH8;Z)_S{A2W=Sh*YNdNxwvd0|T-4EwTY8Y|Y_BimJFmW_+7tk>lJX9#Sr~3Ol nS3#zAX(f!OXC!=NQd+^_oM!J?|9kIKkV8FP{an^LB{Ts5%RhFk literal 0 HcmV?d00001 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c78fcafe48..876e2d343a 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -461,6 +461,7 @@ extern const u8 BattleScript_CouldntFullyProtect[]; extern const u8 BattleScript_MoveEffectStockpileWoreOff[]; extern const u8 BattleScript_StealthRockActivates[]; extern const u8 BattleScript_SpikesActivates[]; +extern const u8 BattleScript_BerserkGeneRet[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/battle_util.h b/include/battle_util.h index b83209a697..3a28f9b3d8 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -234,5 +234,6 @@ u32 GetBattlerFriendshipScore(u8 battlerId); u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc); bool32 IsMyceliumMightOnField(void); bool8 ChangeTypeBasedOnTerrain(u8 battlerId); +void RemoveConfusionStatus(u8 battlerId); #endif // GUARD_BATTLE_UTIL_H diff --git a/include/constants/battle.h b/include/constants/battle.h index 61c3776c6c..f0130e58f2 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -185,6 +185,7 @@ #define STATUS4_PLASMA_FISTS (1 << 1) #define STATUS4_MUD_SPORT (1 << 2) // Only used if B_SPORT_TURNS < GEN_6 #define STATUS4_WATER_SPORT (1 << 3) // Only used if B_SPORT_TURNS < GEN_6 +#define STATUS4_INFINITE_CONFUSION (1 << 4) // Used for Berserk Gene #define HITMARKER_WAKE_UP_CLEAR (1 << 4) // Cleared when waking up. Never set or checked. #define HITMARKER_SKIP_DMG_TRACK (1 << 5) diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index 5fc268cb05..9f877cffa8 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -161,6 +161,9 @@ #define HOLD_EFFECT_LOADED_DICE 180 #define HOLD_EFFECT_BOOSTER_ENERGY 181 // Not implemented. +// Gen2 hold effect +#define HOLD_EFFECT_BERSERK_GENE 182 + #define HOLD_EFFECT_CHOICE(holdEffect)((holdEffect == HOLD_EFFECT_CHOICE_BAND || holdEffect == HOLD_EFFECT_CHOICE_SCARF || holdEffect == HOLD_EFFECT_CHOICE_SPECS)) // Terrain seed params diff --git a/include/constants/items.h b/include/constants/items.h index 4421181668..57ed63feb4 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -972,8 +972,9 @@ #define ITEM_BLACK_AUGURITE 795 #define ITEM_LINKING_CORD 796 #define ITEM_PEAT_BLOCK 797 +#define ITEM_BERSERK_GENE 798 -#define ITEMS_COUNT 798 +#define ITEMS_COUNT 799 #define ITEM_FIELD_ARROW ITEMS_COUNT // A special item id associated with "Cancel"/"Exit" etc. in a list of items or decorations diff --git a/include/graphics.h b/include/graphics.h index 76f6e5d7cf..ad23dc67c8 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -8878,6 +8878,8 @@ extern const u32 gItemIcon_GriseousCore[]; extern const u32 gItemIconPalette_GriseousCore[]; extern const u32 gItemIcon_LustrousGlobe[]; extern const u32 gItemIconPalette_LustrousGlobe[]; +extern const u32 gItemIcon_BerserkGene[]; +extern const u32 gItemIconPalette_BerserkGene[]; extern const u32 gItemIcon_ReturnToFieldArrow[]; extern const u32 gItemIconPalette_ReturnToFieldArrow[]; diff --git a/src/battle_main.c b/src/battle_main.c index c43a2dc3b9..dec2100961 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3227,7 +3227,7 @@ void SwitchInClearSetData(void) gStatuses3[gActiveBattler] &= (STATUS3_LEECHSEED_BATTLER | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_GASTRO_ACID | STATUS3_EMBARGO | STATUS3_TELEKINESIS | STATUS3_MAGNET_RISE | STATUS3_HEAL_BLOCK | STATUS3_AQUA_RING | STATUS3_POWER_TRICK); - gStatuses4[gActiveBattler] &= (STATUS4_MUD_SPORT | STATUS4_WATER_SPORT); + gStatuses4[gActiveBattler] &= (STATUS4_MUD_SPORT | STATUS4_WATER_SPORT | STATUS4_INFINITE_CONFUSION); for (i = 0; i < gBattlersCount; i++) { if (GetBattlerSide(gActiveBattler) != GetBattlerSide(i) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3632095963..7195892ffc 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16583,6 +16583,8 @@ void BS_ItemCureStatus(void) { if (GetItemStatus1Mask(gLastUsedItem) & STATUS1_SLEEP) gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; + if (GetItemStatus2Mask(gLastUsedItem) & STATUS2_CONFUSION) + gStatuses4[gBattlerAttacker] &= ~STATUS4_INFINITE_CONFUSION; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_SPECIES)); gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index cbe7629ee2..f6a9c642bf 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -64,6 +64,7 @@ static void SetRandomMultiHitCounter(); static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item); static u16 GetInverseTypeMultiplier(u16 multiplier); static u16 GetSupremeOverlordModifier(u8 battlerId); +static bool8 CanBeInfinitelyConfused(u8 battlerId); extern const u8 *const gBattleScriptsForMoveEffects[]; extern const u8 *const gBattlescriptsForRunningByItem[]; @@ -3526,7 +3527,8 @@ u8 AtkCanceller_UnableToUseMove(void) case CANCELLER_CONFUSED: // confusion if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION) { - gBattleMons[gBattlerAttacker].status2 -= STATUS2_CONFUSION_TURN(1); + if (!(gStatuses4[gBattlerAttacker] & STATUS4_INFINITE_CONFUSION)) + gBattleMons[gBattlerAttacker].status2 -= STATUS2_CONFUSION_TURN(1); if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION) { // confusion dmg @@ -5968,7 +5970,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; break; case 2: // get rid of confusion - gBattleMons[battler].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battler); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; break; @@ -6906,7 +6908,7 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) case HOLD_EFFECT_CURE_CONFUSION: if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION && !UnnerveOn(battlerId, gLastUsedItem)) { - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battlerId); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureConfusionRet; effect = ITEM_EFFECT_OTHER; @@ -6947,7 +6949,7 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); gBattleMons[battlerId].status1 = 0; - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battlerId); BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; @@ -6985,6 +6987,21 @@ static u8 ItemEffectMoveEnd(u32 battlerId, u16 holdEffect) effect = ITEM_EFFECT_OTHER; } break; + case HOLD_EFFECT_BERSERK_GENE: + BufferStatChange(battlerId, STAT_ATK, STRINGID_STATROSE); + gEffectBattler = battlerId; + if (CanBeInfinitelyConfused(gEffectBattler)) + { + gStatuses4[gEffectBattler] |= STATUS4_INFINITE_CONFUSION; + } + SET_STATCHANGER(STAT_ATK, 2, FALSE); + + gBattleScripting.animArg1 = 14 + STAT_ATK; + gBattleScripting.animArg2 = 0; + + BattleScriptPushCursorAndCallback(BattleScript_BerserkGeneRet); + effect = ITEM_STATS_CHANGE; + break; } return effect; @@ -7163,7 +7180,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NORMALIZED_STATUS; gBattleMons[battlerId].status1 = 0; - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battlerId); BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); effect = ITEM_STATUS_CHANGE; } @@ -7224,6 +7241,21 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } } break; + case HOLD_EFFECT_BERSERK_GENE: + BufferStatChange(battlerId, STAT_ATK, STRINGID_STATROSE); + gEffectBattler = battlerId; + if (CanBeInfinitelyConfused(gEffectBattler)) + { + gStatuses4[gEffectBattler] |= STATUS4_INFINITE_CONFUSION; + } + SET_STATCHANGER(STAT_ATK, 2, FALSE); + + gBattleScripting.animArg1 = 14 + STAT_ATK; + gBattleScripting.animArg2 = 0; + + BattleScriptPushCursorAndCallback(BattleScript_BerserkGeneRet); + effect = ITEM_STATS_CHANGE; + break; } if (effect != 0) { @@ -7444,7 +7476,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_CONFUSION: if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION && !UnnerveOn(battlerId, gLastUsedItem)) { - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battlerId); BattleScriptExecute(BattleScript_BerryCureConfusionEnd2); effect = ITEM_EFFECT_OTHER; } @@ -7489,7 +7521,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NORMALIZED_STATUS; gBattleMons[battlerId].status1 = 0; - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + RemoveConfusionStatus(battlerId); BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); effect = ITEM_STATUS_CHANGE; } @@ -7507,6 +7539,21 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (!moveTurn) effect = TrySetMicleBerry(battlerId, gLastUsedItem, TRUE); break; + case HOLD_EFFECT_BERSERK_GENE: + BufferStatChange(battlerId, STAT_ATK, STRINGID_STATROSE); + gEffectBattler = battlerId; + if (CanBeInfinitelyConfused(gEffectBattler)) + { + gStatuses4[gEffectBattler] |= STATUS4_INFINITE_CONFUSION; + } + SET_STATCHANGER(STAT_ATK, 2, FALSE); + + gBattleScripting.animArg1 = 14 + STAT_ATK; + gBattleScripting.animArg2 = 0; + + BattleScriptPushCursorAndCallback(BattleScript_BerserkGeneRet); + effect = ITEM_STATS_CHANGE; + break; } if (effect != 0) @@ -10870,3 +10917,21 @@ static void SetRandomMultiHitCounter() gMultiHitCounter = 5 - (Random() & 1); } } + +void RemoveConfusionStatus(u8 battlerId) +{ + gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; + gStatuses4[battlerId] &= ~STATUS4_INFINITE_CONFUSION; +} + +static bool8 CanBeInfinitelyConfused(u8 battlerId) +{ + if (gBattleMons[battlerId].ability == ABILITY_OWN_TEMPO + || IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN) + || gSideStatuses[GetBattlerSide(battlerId)] & SIDE_STATUS_SAFEGUARD) + { + return FALSE; + } + return TRUE; +} + diff --git a/src/data/graphics/items.h b/src/data/graphics/items.h index 1e60357b3e..9ef79b2c92 100644 --- a/src/data/graphics/items.h +++ b/src/data/graphics/items.h @@ -1998,3 +1998,6 @@ const u32 gItemIconPalette_GriseousCore[] = INCBIN_U32("graphics/items/icon_pale const u32 gItemIcon_LustrousGlobe[] = INCBIN_U32("graphics/items/icons/lustrous_globe.4bpp.lz"); const u32 gItemIconPalette_LustrousGlobe[] = INCBIN_U32("graphics/items/icon_palettes/lustrous_globe.gbapal.lz"); + +const u32 gItemIcon_BerserkGene[] = INCBIN_U32("graphics/items/icons/berserk_gene.4bpp.lz"); +const u32 gItemIconPalette_BerserkGene[] = INCBIN_U32("graphics/items/icon_palettes/berserk_gene.gbapal.lz"); diff --git a/src/data/item_icon_table.h b/src/data/item_icon_table.h index f220bd819c..05a8782812 100644 --- a/src/data/item_icon_table.h +++ b/src/data/item_icon_table.h @@ -843,6 +843,7 @@ const u32 *const gItemIconTable[ITEMS_COUNT + 1][2] = [ITEM_BLACK_AUGURITE] = {gItemIcon_BlackAugurite, gItemIconPalette_BlackAugurite}, [ITEM_LINKING_CORD] = {gItemIcon_LinkingCord, gItemIconPalette_LinkingCord}, [ITEM_PEAT_BLOCK] = {gItemIcon_PeatBlock, gItemIconPalette_PeatBlock}, + [ITEM_BERSERK_GENE] = {gItemIcon_BerserkGene, gItemIconPalette_BerserkGene}, // Return to field arrow [ITEMS_COUNT] = {gItemIcon_ReturnToFieldArrow, gItemIconPalette_ReturnToFieldArrow}, }; diff --git a/src/data/items.h b/src/data/items.h index 84436be55b..67c5b477f5 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -10340,4 +10340,17 @@ const struct Item gItems[] = .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, .flingPower = 30, }, + + [ITEM_BERSERK_GENE] = + { + .name = _("Berserk Gene"), + .itemId = ITEM_BERSERK_GENE, + .price = 20, + .holdEffect = HOLD_EFFECT_BERSERK_GENE, + .description = sBerserkGene, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 10, + }, }; diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index 5dc870038a..dddf8552f5 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -3907,3 +3907,8 @@ static const u8 sLustrousGlobeDesc[] = _( "A large, glowing gem\n" "that lets Palkia\n" "change form."); + +static const u8 sBerserkGene[] = _( + "Sharply boosts\n" + "Attack, but causes\n" + "lasting confusion."); diff --git a/test/hold_effect_berserk_gene.c b/test/hold_effect_berserk_gene.c new file mode 100644 index 0000000000..361d148611 --- /dev/null +++ b/test/hold_effect_berserk_gene.c @@ -0,0 +1,187 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gItems[ITEM_BERSERK_GENE].holdEffect == HOLD_EFFECT_BERSERK_GENE); +} + +SINGLE_BATTLE_TEST("Berserk Gene sharply raises attack at the start of battle", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + if (useItem) PASSES_RANDOMLY(66, 100, RNG_CONFUSION); + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_TACKLE); + } + } SCENE { + if (useItem) + { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Berserk Gene, the Attack of Wobbuffet sharply rose!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, player); + MESSAGE("Wobbuffet became confused!"); + } + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Berserk Gene activates on switch in", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + if (useItem) PASSES_RANDOMLY(66, 100, RNG_CONFUSION); + GIVEN { + PLAYER(SPECIES_WYNAUT); + PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + SWITCH(player, 1); + } TURN { + MOVE(player, MOVE_TACKLE); + } + } SCENE { + if (useItem) + { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Berserk Gene, the Attack of Wobbuffet sharply rose!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, player); + MESSAGE("Wobbuffet became confused!"); + } + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Berserk Gene does not confuse a Pokemon with Own Tempo but still raises attack sharply", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + PLAYER(SPECIES_SLOWBRO) { Ability(ABILITY_OWN_TEMPO); if (useItem) Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_TACKLE); + } + } SCENE { + if (useItem) + { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Berserk Gene, the Attack of Slowbro sharply rose!"); + ABILITY_POPUP(player, ABILITY_OWN_TEMPO); + MESSAGE("Slowbro's Own Tempo prevents confusion!"); + } + HP_BAR(opponent, captureDamage: &results[i].damage); + NONE_OF + { + MESSAGE("Slowbro became confused!"); + } + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Berserk Gene does not confuse on Misty Terrain but still raises attack sharply") +{ + GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); + PLAYER(SPECIES_TAPU_FINI) { Ability(ABILITY_MISTY_SURGE); Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Berserk Gene, the Attack of Tapu Fini sharply rose!"); + NONE_OF + { + MESSAGE("Tapu Fini became confused!"); + } + } +} + +SINGLE_BATTLE_TEST("Berserk Gene does not confuse when Safeguard is active") +{ + GIVEN { + PLAYER(SPECIES_WYNAUT); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SAFEGUARD); } + TURN { SWITCH(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Berserk Gene, the Attack of Wobbuffet sharply rose!"); + MESSAGE("Wobbuffet's party is protected by SAFEGUARD!"); + NONE_OF + { + MESSAGE("Wobbuffet became confused!"); + } + } +} + +SINGLE_BATTLE_TEST("Berserk Gene causes confusion for more than 5 turns") // how else would be check for infinite? +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + TURN {} + TURN {} + TURN {} + TURN {} + TURN {} + } SCENE { + NONE_OF + { + MESSAGE("Wobbuffet snapped out of confusion!"); + } + } +} + +SINGLE_BATTLE_TEST("Berserk Gene causes infinite confusion") // check if bit is set +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + } THEN { + EXPECT(gStatuses4[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)] & STATUS4_INFINITE_CONFUSION); + } +} + +SINGLE_BATTLE_TEST("Berserk Gene causes confusion timer to not tick down", u32 status2) +{ + u32 turns; + PARAMETRIZE { turns = 1; } + PARAMETRIZE { turns = 2; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_BERSERK_GENE); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + u32 count; + for (count = 0; count < turns; count++) { + TURN {} + } + } THEN { + results[i].status2 = player->status2; + } FINALLY { + EXPECT_EQ(results[0].status2, results[1].status2); + } +} From d3e9a689fdf1a42519f0cf77777bde189758232f Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 21:26:19 +0200 Subject: [PATCH 116/229] restore pp item tests --- test/item_effect_restore_pp.c | 61 +++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/test/item_effect_restore_pp.c b/test/item_effect_restore_pp.c index 234d4ae4e5..f21593566f 100644 --- a/test/item_effect_restore_pp.c +++ b/test/item_effect_restore_pp.c @@ -1,19 +1,66 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves") +SINGLE_BATTLE_TEST("Restore PP: Ether restores the PP of one of a battler's moves by 10 ") { GIVEN { ASSUME(gItems[ITEM_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP); ASSUME(gItems[ITEM_ETHER].type == ITEM_USE_PARTY_MENU_MOVES); - PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_CONFUSION); } + PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 20}); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } - TURN { MOVE(player, MOVE_CONFUSION); } TURN { USE_ITEM(player, ITEM_ETHER, partyIndex: 0, move: MOVE_TACKLE); } - } FINALLY { - EXPECT_EQ(player->pp[0], 35); - EXPECT_EQ(player->pp[1], 24); + } THEN { + EXPECT_EQ(player->pp[0], 10); + EXPECT_EQ(player->pp[1], 20); + } +} + +SINGLE_BATTLE_TEST("Restore PP: Max Ether restores the PP of one of a battler's moves fully") +{ + GIVEN { + ASSUME(gItems[ITEM_MAX_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP); + ASSUME(gItems[ITEM_MAX_ETHER].type == ITEM_USE_PARTY_MENU_MOVES); + PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 20}); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_MAX_ETHER, partyIndex: 0, move: MOVE_TACKLE); } + } THEN { + EXPECT_EQ(player->pp[0], 35); + EXPECT_EQ(player->pp[1], 20); + } +} + +SINGLE_BATTLE_TEST("Restore PP: Elixir restores the PP of all of a battler's moves by 10") +{ + GIVEN { + ASSUME(gItems[ITEM_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP); + ASSUME(gItems[ITEM_ELIXIR].type == ITEM_USE_PARTY_MENU); + PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 0}, {MOVE_SCRATCH, 0}, {MOVE_GROWL, 0}); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_ELIXIR, partyIndex: 0); } + } THEN { + EXPECT_EQ(player->pp[0], 10); + EXPECT_EQ(player->pp[1], 10); + EXPECT_EQ(player->pp[2], 10); + EXPECT_EQ(player->pp[3], 10); + } +} + +SINGLE_BATTLE_TEST("Restore PP: Max Elixir restores the PP of all of a battler's moves fully") +{ + GIVEN { + ASSUME(gItems[ITEM_MAX_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP); + ASSUME(gItems[ITEM_MAX_ELIXIR].type == ITEM_USE_PARTY_MENU); + PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 0}, {MOVE_SCRATCH, 0}, {MOVE_GROWL, 0}); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_MAX_ELIXIR, partyIndex: 0); } + } THEN { + EXPECT_EQ(player->pp[0], 35); + EXPECT_EQ(player->pp[1], 25); + EXPECT_EQ(player->pp[2], 35); + EXPECT_EQ(player->pp[3], 40); } } From 0315f704c1639cc1c37a4fa816797a15bef63d2c Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Tue, 25 Apr 2023 23:01:58 +0200 Subject: [PATCH 117/229] Fix thawing being triggered by every move --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 903edc1ac6..98b0b6744f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3650,7 +3650,7 @@ u8 AtkCanceller_UnableToUseMove(void) } effect = 2; } - if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FROSTBITE) + if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FROSTBITE && (gBattleMoves[gCurrentMove].flags & FLAG_THAW_USER)) { if (!(gBattleMoves[gCurrentMove].effect == EFFECT_BURN_UP && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE))) { From 9f2589e1595cd8bf9f40a734bfc13b195b03f967 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 23:06:07 +0200 Subject: [PATCH 118/229] better usage of THEN over FINALLY --- test/item_effect_cure_status.c | 36 ++++++++++++------------- test/item_effect_heal_and_cure_status.c | 4 +-- test/item_effect_revive.c | 26 +++--------------- 3 files changed, 24 insertions(+), 42 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 4d4cbda2ee..949f60f0e4 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -11,7 +11,7 @@ SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paraly TURN { USE_ITEM(player, ITEM_PARALYZE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -26,7 +26,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -41,7 +41,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poiso TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -56,7 +56,7 @@ SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") TURN { USE_ITEM(player, ITEM_AWAKENING, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -71,7 +71,7 @@ SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") TURN { USE_ITEM(player, ITEM_BURN_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -86,7 +86,7 @@ SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -108,7 +108,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -130,7 +130,7 @@ SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary st TURN { USE_ITEM(player, ITEM_HEAL_POWDER, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -152,7 +152,7 @@ SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any prima TURN { USE_ITEM(player, ITEM_PEWTER_CRUNCHIES, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -174,7 +174,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary s TURN { USE_ITEM(player, ITEM_LAVA_COOKIE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -196,7 +196,7 @@ SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary TURN { USE_ITEM(player, ITEM_RAGE_CANDY_BAR, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -218,7 +218,7 @@ SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_OLD_GATEAU, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -240,7 +240,7 @@ SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary s TURN { USE_ITEM(player, ITEM_CASTELIACONE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -262,7 +262,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primar TURN { USE_ITEM(player, ITEM_LUMIOSE_GALETTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!");; - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -284,7 +284,7 @@ SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary TURN { USE_ITEM(player, ITEM_SHALOUR_SABLE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -306,12 +306,12 @@ SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary s TURN { USE_ITEM(player, ITEM_BIG_MALASADA, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status1, STATUS1_NONE); } } -SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler from being confused") +SINGLE_BATTLE_TEST("Cure Status: Full Heal, Heal Powder and Local Specialties heal a battler from being confused") { u16 item; PARAMETRIZE { item = ITEM_FULL_HEAL; } @@ -333,7 +333,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler TURN { USE_ITEM(player, item, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); - } FINALLY { + } THEN { EXPECT_EQ(player->status2, STATUS1_NONE); // because we dont have STATUS2_NONE } } diff --git a/test/item_effect_heal_and_cure_status.c b/test/item_effect_heal_and_cure_status.c index 6e264d25ac..17ac5be969 100644 --- a/test/item_effect_heal_and_cure_status.c +++ b/test/item_effect_heal_and_cure_status.c @@ -18,7 +18,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its HP restored!"); - } FINALLY { + } THEN { EXPECT_EQ(player->hp, player->maxHP); EXPECT_EQ(player->status1, STATUS1_NONE); } @@ -37,7 +37,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion") } SCENE { MESSAGE("Wobbuffet had its HP restored!"); NONE_OF { MESSAGE("Wobbuffet is confused!"); } - } FINALLY { + } THEN { EXPECT_EQ(player->hp, player->maxHP); } } diff --git a/test/item_effect_revive.c b/test/item_effect_revive.c index 695361892e..3c6995176e 100644 --- a/test/item_effect_revive.c +++ b/test/item_effect_revive.c @@ -3,24 +3,6 @@ #define MAX_HP 200 -SINGLE_BATTLE_TEST("Revive: Super Potion restores a fainted battler's HP to half") -{ - GIVEN { - ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); - PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(MAX_HP); } - PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } - TURN { USE_ITEM(player, ITEM_SUPER_POTION, partyIndex: 0); } - TURN { SWITCH(player, 0); } - } SCENE { - MESSAGE("Wynaut had its HP restored!"); - } FINALLY { - EXPECT_EQ(player->hp, 60); - } -} - SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") { GIVEN { @@ -34,7 +16,7 @@ SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") TURN { SWITCH(player, 0); } } SCENE { MESSAGE("Wynaut had its HP restored!"); - } FINALLY { + } THEN { EXPECT_EQ(player->hp, MAX_HP/2); } } @@ -52,7 +34,7 @@ SINGLE_BATTLE_TEST("Revive: Max Revive restores a fainted battler's HP fully") TURN { SWITCH(player, 0); } } SCENE { MESSAGE("Wynaut had its HP restored!"); - } FINALLY { + } THEN { EXPECT_EQ(player->hp, MAX_HP); } } @@ -70,7 +52,7 @@ SINGLE_BATTLE_TEST("Revive: Revival Herb restores a fainted battler's HP fully") TURN { SWITCH(player, 0); } } SCENE { MESSAGE("Wynaut had its HP restored!"); - } FINALLY { + } THEN { EXPECT_EQ(player->hp, MAX_HP); } } @@ -88,7 +70,7 @@ SINGLE_BATTLE_TEST("Revive: Max Honey restores a fainted battler's HP fully") TURN { SWITCH(player, 0); } } SCENE { MESSAGE("Wynaut had its HP restored!"); - } FINALLY { + } THEN { EXPECT_EQ(player->hp, MAX_HP); } } From a2809acfd1d6818acb6d39c5d8f1520746201c20 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Wed, 26 Apr 2023 01:02:47 +0200 Subject: [PATCH 119/229] fix gChosenMovePos not being assigned correctly for battle items thanks griffin <3 Co-Authored-By: Martin Griffin <838573+mrgriffin@users.noreply.github.com> --- include/recorded_battle.h | 1 + src/battle_controller_recorded_opponent.c | 1 + src/battle_controller_recorded_player.c | 1 + src/battle_script_commands.c | 10 +++++++--- test/test_runner_battle.c | 8 ++------ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/recorded_battle.h b/include/recorded_battle.h index ea66096d7f..02bbe8fc3f 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -46,6 +46,7 @@ enum RECORDED_BATTLE_PALACE_ACTION, RECORDED_ITEM_ID, RECORDED_ITEM_TARGET, + RECORDED_ITEM_MOVE, }; extern u32 gRecordedBattleRngSeed; diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index bb41b42d65..8255abcab0 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1442,6 +1442,7 @@ static void RecordedOpponentHandleChooseItem(void) u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); + gChosenMovePos = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index efbd60f18b..8350e8594e 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1466,6 +1466,7 @@ static void RecordedPlayerHandleChooseItem(void) u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); + gChosenMovePos = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 07669635e3..31ef4cea75 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16563,8 +16563,7 @@ void BS_ItemIncreaseStat(void) { void BS_ItemRestorePP(void) { NATIVE_ARGS(); const u8 *effect = GetItemEffect(gLastUsedItem); - u32 i, pp, maxPP, moveId; - u32 loopEnd = MAX_MON_MOVES; + u32 i, pp, maxPP, moveId, loopEnd; u32 battlerId = MAX_BATTLERS_COUNT; struct Pokemon *mon = (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) ? &gPlayerParty[gBattleStruct->itemPartyIndex[gBattlerAttacker]] : &gEnemyParty[gBattleStruct->itemPartyIndex[gBattlerAttacker]]; @@ -16574,6 +16573,11 @@ void BS_ItemRestorePP(void) { i = gChosenMovePos; loopEnd = gChosenMovePos + 1; } + else + { + i = 0; + loopEnd = MAX_MON_MOVES; + } // Check if the recipient is an active battler. if (gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[gBattlerAttacker]) @@ -16583,7 +16587,7 @@ void BS_ItemRestorePP(void) { battlerId = BATTLE_PARTNER(gBattlerAttacker); // Heal PP! - for (i = 0; i < loopEnd; i++) + for (; i < loopEnd; i++) { pp = GetMonData(mon, MON_DATA_PP1 + i, NULL); moveId = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 75e459e49b..f102912620 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1554,12 +1554,8 @@ void UseItem(u32 sourceLine, struct BattlePokemon *battler, struct ItemContext c PushBattlerAction(sourceLine, battlerId, RECORDED_ACTION_TYPE, B_ACTION_USE_ITEM); PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, (ctx.itemId >> 8) & 0xFF); PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, ctx.itemId & 0xFF); - if (ctx.explicitPartyIndex) - PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, ctx.partyIndex); - else if (ctx.explicitMove) - PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, i); - else - PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, 0); + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_TARGET, ctx.partyIndex); + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_MOVE, i); DATA.actionBattlers |= 1 << battlerId; } From a5d39155c641da90df709db174961618ebd1b812 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Wed, 26 Apr 2023 14:15:35 +0200 Subject: [PATCH 120/229] add Max Mushroom test --- test/item_effect_increase_stat.c | 121 +++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 8 deletions(-) diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index 7fcbe72794..bb5989207a 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Attack sharply raises battler's Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -24,7 +24,7 @@ SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage) } } -SINGLE_BATTLE_TEST("X Defense sharply raises battler's Defense stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Defense sharply raises battler's Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -47,7 +47,7 @@ SINGLE_BATTLE_TEST("X Defense sharply raises battler's Defense stat", s16 damage } } -SINGLE_BATTLE_TEST("X Sp. Atk sharply raises battler's Sp. Attack stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Sp. Atk sharply raises battler's Sp. Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -70,7 +70,7 @@ SINGLE_BATTLE_TEST("X Sp. Atk sharply raises battler's Sp. Attack stat", s16 dam } } -SINGLE_BATTLE_TEST("X Sp. Def sharply raises battler's Sp. Defense stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Sp. Def sharply raises battler's Sp. Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -93,7 +93,7 @@ SINGLE_BATTLE_TEST("X Sp. Def sharply raises battler's Sp. Defense stat", s16 da } } -SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Speed sharply raises battler's Speed stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -106,7 +106,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }; } else - { + { PLAYER(SPECIES_WOBBUFFET) { Speed(4); }; OPPONENT(SPECIES_WOBBUFFET) { Speed(5); }; } @@ -118,7 +118,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) { MESSAGE("Wobbuffet used Tackle!"); MESSAGE("Foe Wobbuffet used Tackle!"); - } else + } else { MESSAGE("Foe Wobbuffet used Tackle!"); MESSAGE("Wobbuffet used Tackle!"); @@ -126,7 +126,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) } } -SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 damage) +SINGLE_BATTLE_TEST("Increase Stat: X Accuracy sharply raises battler's Accuracy stat", s16 damage) { ASSUME(gBattleMoves[MOVE_SING].accuracy == 55); @@ -146,3 +146,108 @@ SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 dama MESSAGE("Foe Wobbuffet fell asleep!"); } } + +SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Attack stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_MAX_MUSHROOMS); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + MESSAGE("Wobbuffet used Tackle!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Defense stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_MAX_MUSHROOMS); } + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Foe Wobbuffet used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.66), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Sp. Attack stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_MAX_MUSHROOMS); } + TURN { MOVE(player, MOVE_DISARMING_VOICE); } + } SCENE { + MESSAGE("Wobbuffet used DisrmngVoice!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms battler's Sp. Defense stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_MAX_MUSHROOMS); } + TURN { MOVE(opponent, MOVE_DISARMING_VOICE); } + } SCENE { + MESSAGE("Foe Wobbuffet used DisrmngVoice!"); + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.66), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Speed stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS); + PLAYER(SPECIES_WOBBUFFET) { Speed(4); }; + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); }; + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_MAX_MUSHROOMS); } + TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + if (useItem) + { + MESSAGE("Wobbuffet used Tackle!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + } else + { + MESSAGE("Foe Wobbuffet used Tackle!"); + MESSAGE("Wobbuffet used Tackle!"); + } + } +} From e83e08f21c2d05c8a844fce17a5da55abb96ccee Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 26 Apr 2023 12:32:43 -0400 Subject: [PATCH 121/229] Add time ranges to UpdateAmbientCry --- src/overworld.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/overworld.c b/src/overworld.c index 70b102fd28..3d46fc5005 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1260,23 +1260,34 @@ static void PlayAmbientCry(void) PlayCry_NormalNoDucking(sAmbientCrySpecies, pan, volume, CRY_PRIORITY_AMBIENT); } +// States for UpdateAmbientCry +enum { + AMB_CRY_INIT, + AMB_CRY_FIRST, + AMB_CRY_RESET, + AMB_CRY_WAIT, + AMB_CRY_IDLE, +}; + void UpdateAmbientCry(s16 *state, u16 *delayCounter) { u8 i, monsCount, divBy; switch (*state) { - case 0: + case AMB_CRY_INIT: + // This state will be revisited whenever ResetFieldTasksArgs is called (which happens on map transition) if (sAmbientCrySpecies == SPECIES_NONE) - *state = 4; + *state = AMB_CRY_IDLE; else - *state = 1; + *state = AMB_CRY_FIRST; break; - case 1: + case AMB_CRY_FIRST: + // It takes between 1200-3599 frames (~20-60 seconds) to play the first ambient cry after entering a map *delayCounter = (Random() % 2400) + 1200; - *state = 3; + *state = AMB_CRY_WAIT; break; - case 2: + case AMB_CRY_RESET: divBy = 1; monsCount = CalculatePlayerPartyCount(); for (i = 0; i < monsCount; i++) @@ -1288,18 +1299,20 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter) break; } } + // Ambient cries after the first one take between 1200-2399 frames (~20-40 seconds) + // If the player has a pokemon with the ability Swarm in their party, the time is halved to 600-1199 frames (~10-20 seconds) *delayCounter = ((Random() % 1200) + 1200) / divBy; - *state = 3; + *state = AMB_CRY_WAIT; break; - case 3: - (*delayCounter)--; - if (*delayCounter == 0) + case AMB_CRY_WAIT: + if (--(*delayCounter) == 0) { PlayAmbientCry(); - *state = 2; + *state = AMB_CRY_RESET; } break; - case 4: + case AMB_CRY_IDLE: + // No land/water pokemon on this map break; } } From 32dcea0cdb52a747b552bf3ccac5e598f864444a Mon Sep 17 00:00:00 2001 From: grunt-lucas Date: Wed, 26 Apr 2023 13:08:15 -0600 Subject: [PATCH 122/229] Fix issue with Enamorus Therian cry define order (#2956) --- sound/direct_sound_data.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 05a1b7145e..3020a8f1a5 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -4246,6 +4246,10 @@ Cry_ThundurusTherian:: Cry_LandorusTherian:: .incbin "sound/direct_sound_samples/cries/landorus_therian.bin" + .align 2 +Cry_EnamorusTherian:: + .incbin "sound/direct_sound_samples/cries/enamorus_therian.bin" + .align 2 Cry_KyuremWhite:: .incbin "sound/direct_sound_samples/cries/kyurem_white.bin" @@ -4360,10 +4364,6 @@ Cry_CalyrexIceRider:: Cry_CalyrexShadowRider:: .incbin "sound/direct_sound_samples/cries/calyrex_shadow_rider.bin" - .align 2 -Cry_EnamorusTherian:: - .incbin "sound/direct_sound_samples/cries/enamorus_therian.bin" - .endif .align 2 From 36e6981ac0df338f85cb49a3c1d56f4410dbe007 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 26 Apr 2023 16:12:00 -0400 Subject: [PATCH 123/229] Replace some & usage with % --- src/event_object_movement.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 3025e0849a..d4b89fbae1 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -2575,7 +2575,7 @@ bool8 MovementType_WanderAround_Step2(struct ObjectEvent *objectEvent, struct Sp { if (!ObjectEventExecSingleMovementAction(objectEvent, sprite)) return FALSE; - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); sprite->sTypeFuncId = 3; return TRUE; } @@ -2855,7 +2855,7 @@ bool8 MovementType_LookAround_Step2(struct ObjectEvent *objectEvent, struct Spri { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -2907,7 +2907,7 @@ bool8 MovementType_WanderUpAndDown_Step2(struct ObjectEvent *objectEvent, struct if (!ObjectEventExecSingleMovementAction(objectEvent, sprite)) return FALSE; - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); sprite->sTypeFuncId = 3; return TRUE; } @@ -2975,7 +2975,7 @@ bool8 MovementType_WanderLeftAndRight_Step2(struct ObjectEvent *objectEvent, str if (!ObjectEventExecSingleMovementAction(objectEvent, sprite)) return FALSE; - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); sprite->sTypeFuncId = 3; return TRUE; } @@ -3195,7 +3195,7 @@ bool8 MovementType_FaceDownAndUp_Step2(struct ObjectEvent *objectEvent, struct S { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3245,7 +3245,7 @@ bool8 MovementType_FaceLeftAndRight_Step2(struct ObjectEvent *objectEvent, struc { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3295,7 +3295,7 @@ bool8 MovementType_FaceUpAndLeft_Step2(struct ObjectEvent *objectEvent, struct S { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3345,7 +3345,7 @@ bool8 MovementType_FaceUpAndRight_Step2(struct ObjectEvent *objectEvent, struct { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3395,7 +3395,7 @@ bool8 MovementType_FaceDownAndLeft_Step2(struct ObjectEvent *objectEvent, struct { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3445,7 +3445,7 @@ bool8 MovementType_FaceDownAndRight_Step2(struct ObjectEvent *objectEvent, struc { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3495,7 +3495,7 @@ bool8 MovementType_FaceDownUpAndLeft_Step2(struct ObjectEvent *objectEvent, stru { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3545,7 +3545,7 @@ bool8 MovementType_FaceDownUpAndRight_Step2(struct ObjectEvent *objectEvent, str { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3595,7 +3595,7 @@ bool8 MovementType_FaceUpLeftAndRight_Step2(struct ObjectEvent *objectEvent, str { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } @@ -3645,7 +3645,7 @@ bool8 MovementType_FaceDownLeftAndRight_Step2(struct ObjectEvent *objectEvent, s { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) { - SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]); + SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]); objectEvent->singleMovementActive = FALSE; sprite->sTypeFuncId = 3; } From d5fb13ca17d0b59eb029e9ebbbdadbed61ac1b73 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Wed, 26 Apr 2023 23:33:22 +0200 Subject: [PATCH 124/229] Fix status icons --- graphics/battle_interface/status2.png | Bin 559 -> 559 bytes graphics/battle_interface/status3.png | Bin 559 -> 559 bytes graphics/battle_interface/status4.png | Bin 559 -> 559 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/battle_interface/status2.png b/graphics/battle_interface/status2.png index 0b212907e5574725f3c8f3d4f95a713b44fc02e2..5d7f6459be316f5e0b6d75db60329c71761e3c98 100644 GIT binary patch delta 42 xcmZ3_vYusw9V6$qmMICG(-Qu_o$StdMWpF|y~*_l6&egc;OXk;vd$@?2>^5#5SRb} delta 42 xcmZ3_vYusw9V6$~mMICG(-QuFo$StdMI^5>kRCSc3g`vz($tH;e)0=@&x*tjQ4A3gszO z_VmdRQmQT0Nvs>tOoa`|YUOca)iZzwUYB3X1$>hEJD!Ka!`^2q#VH=)gns~20h3x! z%wqv?2R!h9xqvO1zk{X#^fj4)lhPyy26Tf1U7SGMrP@(yf_Zv5?}jMrUM^ry=I`j8 zBRiWZDYON;I*lc7?>mg*#q3Fc-&3((C| zDuIyz?ox62wcO8s^!Ss9e!!t0o_Y1dTXpW>3NYHXUw$k12f#gqW~~#ZPXGV_07*qo IM6N<$f~|6R+5i9m delta 258 zcmV+d0sa231g`|JHUWRz5yT(}MIHFHgp^KQ--ugkCH0zS$79nVAIVed1Q;uMc?!asnifJv<< z=CJ^{10MLlT)>vh-$7FV`kG9@NokS;1G>S1E>58BQtc=;!Mu8$cSDqQFBh;U^LO;l zk)6$y6xsq^oyUFxI(J|yp3f&-%mA)Z>*d#S0Y@@_#~2jc$xx|bOLY>*1aq^X1?c7} zmB2^lKj6?0&%FBKtvYvb1sHAHFTa)h17t9Kn;^jN>i_@%07*qo IM6N<$g3XM3`v3p{ From c2dad5ac44960f6d7b762c5ebb8199b66c1090df Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 27 Apr 2023 13:59:09 -0400 Subject: [PATCH 125/229] Redefine TV_SHOWS_COUNT --- include/constants/global.h | 1 - include/constants/tv.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/global.h b/include/constants/global.h index 8e40e63786..04f1d548c4 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -46,7 +46,6 @@ #define OBJECT_EVENTS_COUNT 16 #define MAIL_COUNT (10 + PARTY_SIZE) #define SECRET_BASES_COUNT 20 -#define TV_SHOWS_COUNT 25 #define POKE_NEWS_COUNT 16 #define PC_ITEMS_COUNT 50 #define BAG_ITEMS_COUNT 30 diff --git a/include/constants/tv.h b/include/constants/tv.h index 87748a31de..13ec88ecdc 100644 --- a/include/constants/tv.h +++ b/include/constants/tv.h @@ -74,6 +74,7 @@ // for TV shows from TVGROUP_NORMAL. The remainder are for TV // shows from TVGROUP_RECORD_MIX. #define NUM_NORMAL_TVSHOW_SLOTS 5 +#define TV_SHOWS_COUNT (NUM_NORMAL_TVSHOW_SLOTS + 20) #define PLAYERS_HOUSE_TV_NONE 0 #define PLAYERS_HOUSE_TV_LATI 1 From 854e9be3257c227242cff643e887bd68123d12c5 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Fri, 28 Apr 2023 11:26:31 +0200 Subject: [PATCH 126/229] Fix move defrosting for both Freeze and Frostbite --- src/battle_script_commands.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4792504a6d..fecea28927 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5596,7 +5596,6 @@ static void Cmd_moveend(void) if (gBattleMons[gBattlerTarget].status1 & STATUS1_FREEZE && gBattleMons[gBattlerTarget].hp != 0 && gBattlerAttacker != gBattlerTarget - && gSpecialStatuses[gBattlerTarget].specialDmg && (moveType == TYPE_FIRE #if B_BURN_HIT_THAW >= GEN_6 || gBattleMoves[gCurrentMove].effect == EFFECT_BURN_HIT @@ -5615,12 +5614,7 @@ static void Cmd_moveend(void) if (gBattleMons[gBattlerTarget].status1 & STATUS1_FROSTBITE && gBattleMons[gBattlerTarget].hp != 0 && gBattlerAttacker != gBattlerTarget - && gSpecialStatuses[gBattlerTarget].specialDmg - && (moveType == TYPE_FIRE - #if B_BURN_HIT_THAW >= GEN_6 - || gBattleMoves[gCurrentMove].effect == EFFECT_BURN_HIT - #endif - ) + && gBattleMoves[originallyUsedMove].flags & FLAG_THAW_USER && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) { gBattleMons[gBattlerTarget].status1 &= ~STATUS1_FROSTBITE; From a98da30ec7bb8b11127367c397cbcdef2a7137c6 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 28 Apr 2023 12:38:34 +0200 Subject: [PATCH 127/229] frostbite tests --- test/status_frostbite.c | 98 +++++++++++++++++++++++++++++++++++++++ test/test_battle.h | 6 +-- test/test_runner_battle.c | 2 + 3 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 test/status_frostbite.c diff --git a/test/status_frostbite.c b/test/status_frostbite.c new file mode 100644 index 0000000000..6abd34a312 --- /dev/null +++ b/test/status_frostbite.c @@ -0,0 +1,98 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Frostbite reduces the special attack by 50 percent") +{ + s16 reducedDamage; + s16 normaleDamage; + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } + } WHEN { + TURN { MOVE(opponent, MOVE_SWIFT); MOVE(player, MOVE_FIRE_PUNCH); } + TURN { MOVE(opponent, MOVE_SWIFT); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, opponent); + HP_BAR(player, captureDamage: &reducedDamage); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PUNCH, player); + HP_BAR(opponent); + MESSAGE("Foe Wobbuffet is hurt by its frostbite!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, opponent); + HP_BAR(player, captureDamage: &normaleDamage); + } THEN { EXPECT_EQ(reducedDamage, normaleDamage); } +} + +SINGLE_BATTLE_TEST("Frostbite deals 1/16 damage to effected pokemon") +{ + s16 frostbiteDamage; + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } + } WHEN { + TURN { } + } SCENE { + MESSAGE("Foe Wobbuffet is hurt by its frostbite!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent); + HP_BAR(opponent, captureDamage: &frostbiteDamage); + } THEN { EXPECT_EQ(frostbiteDamage, opponent->maxHP / 16); } +} + +SINGLE_BATTLE_TEST("Frostbite is healed if hit with a thawing move") +{ + u32 move; + + PARAMETRIZE { move = MOVE_FLAME_WHEEL; } + PARAMETRIZE { move = MOVE_SACRED_FIRE; } + PARAMETRIZE { move = MOVE_FLARE_BLITZ; } + PARAMETRIZE { move = MOVE_FUSION_FLARE; } + PARAMETRIZE { move = MOVE_EMBER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } + } WHEN { + TURN { MOVE(player, move); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); + if (move == MOVE_EMBER) { + NONE_OF { + MESSAGE("Foe Wobbuffet's frostbite was healed!"); + } + } else { + MESSAGE("Foe Wobbuffet's frostbite was healed!"); + } + } +} + +SINGLE_BATTLE_TEST("Frostbite is healed when the user uses a thawing move") +{ + u32 move; + + PARAMETRIZE { move = MOVE_FLAME_WHEEL; } + PARAMETRIZE { move = MOVE_SACRED_FIRE; } + PARAMETRIZE { move = MOVE_FLARE_BLITZ; } + PARAMETRIZE { move = MOVE_FUSION_FLARE; } + PARAMETRIZE { move = MOVE_EMBER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, move); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); + HP_BAR(opponent); + if (move == MOVE_EMBER) { + MESSAGE("Wobbuffet is hurt by its frostbite!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, player); + } else { + NONE_OF { + MESSAGE("Wobbuffet is hurt by its frostbite!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, player); + } + } + } +} diff --git a/test/test_battle.h b/test/test_battle.h index 967bb661dd..432e33fa80 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -333,7 +333,7 @@ * Used when the battler chooses to switch to another Pokémon but not * via Switch, e.g. after fainting or due to a U-turn. * SEND_OUT(player, 1); - * + * * USE_ITEM(battler, itemId, [partyIndex:], [move:]) * Used when the battler chooses to use an item from the Bag. The item * ID must be specified, and party index and move slot if applicable, e.g: @@ -526,8 +526,7 @@ struct QueuedMessageEvent struct QueuedStatusEvent { u32 battlerId:3; - u32 mask:8; - u32 unused_01:21; + u32 mask:29; }; struct QueuedEvent @@ -872,6 +871,7 @@ struct StatusEventContext bool8 freeze:1; bool8 paralysis:1; bool8 badPoison:1; + bool8 frostbite:1; }; void OpenQueueGroup(u32 sourceLine, enum QueueGroupType); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 365120f137..a6fc00c276 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1717,6 +1717,8 @@ void QueueStatus(u32 sourceLine, struct BattlePokemon *battler, struct StatusEve mask = STATUS1_PARALYSIS; else if (ctx.badPoison) mask = STATUS1_TOXIC_POISON; + else if (ctx.frostbite) + mask = STATUS1_FROSTBITE; else mask = ctx.status1; From bfcddff3ca37bdcfbde2f2b08a2942e5477090a0 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 28 Apr 2023 12:47:30 +0200 Subject: [PATCH 128/229] correct first test --- test/status_frostbite.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/status_frostbite.c b/test/status_frostbite.c index 6abd34a312..f034478217 100644 --- a/test/status_frostbite.c +++ b/test/status_frostbite.c @@ -10,18 +10,16 @@ SINGLE_BATTLE_TEST("Frostbite reduces the special attack by 50 percent") PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_FROSTBITE); } } WHEN { - TURN { MOVE(opponent, MOVE_SWIFT); MOVE(player, MOVE_FIRE_PUNCH); } + TURN { MOVE(opponent, MOVE_SWIFT); MOVE(player, MOVE_FLAME_WHEEL); } TURN { MOVE(opponent, MOVE_SWIFT); } } SCENE { ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, opponent); HP_BAR(player, captureDamage: &reducedDamage); - ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PUNCH, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FLAME_WHEEL, player); HP_BAR(opponent); - MESSAGE("Foe Wobbuffet is hurt by its frostbite!"); - ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent); ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, opponent); HP_BAR(player, captureDamage: &normaleDamage); - } THEN { EXPECT_EQ(reducedDamage, normaleDamage); } + } THEN { EXPECT_EQ(reducedDamage * 2, normaleDamage); } } SINGLE_BATTLE_TEST("Frostbite deals 1/16 damage to effected pokemon") From 0cbb80dda76175a0ec5cb94aded25ed505ae74a8 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Fri, 28 Apr 2023 14:58:43 +0200 Subject: [PATCH 129/229] Fix grassy terrain freezing the game (#2959) --- data/battle_scripts_1.s | 4 ++-- test/terrain_electric.c | 29 +++++++++++++++++++++++++++++ test/terrain_grassy.c | 29 +++++++++++++++++++++++++++++ test/terrain_misty.c | 29 +++++++++++++++++++++++++++++ test/terrain_psychic.c | 29 +++++++++++++++++++++++++++++ 5 files changed, 118 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index dcb076c278..ec73fd6b25 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6944,14 +6944,14 @@ BattleScript_MagicRoomEnds:: waitmessage B_WAIT_TIME_LONG end2 -BattleScript_GrassyTerrainEnds: - setbyte cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_GRASS BattleScript_TerrainEnds_Ret:: printfromtable gTerrainEndingStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_RESTORE_BG return +BattleScript_GrassyTerrainEnds: + setbyte cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_GRASS BattleScript_TerrainEnds:: call BattleScript_TerrainEnds_Ret end2 diff --git a/test/terrain_electric.c b/test/terrain_electric.c index bb397fdf9b..e9c34ef923 100644 --- a/test/terrain_electric.c +++ b/test/terrain_electric.c @@ -61,3 +61,32 @@ SINGLE_BATTLE_TEST("Electric Terrain increases power of Electric-type moves by 3 EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); } } + +SINGLE_BATTLE_TEST("Electric Terrain lasts for 5 turns") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_ELECTRIC_TERRAIN); } + TURN {} + TURN {} + TURN {} + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_ELECTRIC_TERRAIN, player); + MESSAGE("An electric current runs across the battlefield!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("The electricity disappeared from the battlefield."); + } +} diff --git a/test/terrain_grassy.c b/test/terrain_grassy.c index ae6e6d9e92..7668c49bde 100644 --- a/test/terrain_grassy.c +++ b/test/terrain_grassy.c @@ -84,3 +84,32 @@ SINGLE_BATTLE_TEST("Grassy Terrain decreases power of Earthquake and Bulldoze by EXPECT_MUL_EQ(results[2].damage, Q_4_12(0.5), results[3].damage); } } + +SINGLE_BATTLE_TEST("Grassy Terrain lasts for 5 turns") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_GRASSY_TERRAIN); } + TURN {} + TURN {} + TURN {} + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_GRASSY_TERRAIN, player); + MESSAGE("Grass grew to cover the battlefield!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("The grass disappeared from the battlefield."); + } +} diff --git a/test/terrain_misty.c b/test/terrain_misty.c index 668b036992..4f8793d9d0 100644 --- a/test/terrain_misty.c +++ b/test/terrain_misty.c @@ -78,3 +78,32 @@ SINGLE_BATTLE_TEST("Misty Terrain decreases power of Dragon-type moves by 50 per EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); } } + +SINGLE_BATTLE_TEST("Misty Terrain lasts for 5 turns") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_MISTY_TERRAIN); } + TURN {} + TURN {} + TURN {} + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MISTY_TERRAIN, player); + MESSAGE("Mist swirled about the battlefield!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("The mist disappeared from the battlefield."); + } +} diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c index 2cddef070f..3ecfa99e06 100644 --- a/test/terrain_psychic.c +++ b/test/terrain_psychic.c @@ -136,3 +136,32 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves", s16 dam MESSAGE("Sableye used Sunny Day!"); } } + +SINGLE_BATTLE_TEST("Psychic Terrain lasts for 5 turns") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN {} + TURN {} + TURN {} + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHIC_TERRAIN, player); + MESSAGE("The battlefield got weird!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + + MESSAGE("The weirdness disappeared from the battlefield."); + } +} From b53c913558c5c454922a29c12cd864822b5da3dc Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 29 Apr 2023 18:16:36 +0200 Subject: [PATCH 130/229] Manually port daycare expansion to modern standards --- include/config/pokemon.h | 13 +++-- src/daycare.c | 108 ++++++++++++++++++++++++++------------- 2 files changed, 82 insertions(+), 39 deletions(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index 1cde573c96..6247217465 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -8,10 +8,15 @@ #define P_UPDATED_EGG_GROUPS GEN_LATEST // Since Gen 8, certain Pokémon have gained new egg groups. // Breeding settings -#define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat. -#define P_INCENSE_BREEDING GEN_LATEST // Since Gen 9, cross-generation Baby Pokémon don't require Incense being held by the parents to be obtained via breeding. -#define P_EGG_HATCH_LEVEL GEN_LATEST // Since Gen 4, Pokémon will hatch from eggs at level 1 instead of 5. -#define P_BALL_INHERITING GEN_LATEST // Since Gen 6, Eggs from the Daycare will inherit the Poké Ball from their mother. From Gen7 onwards, the father can pass it down as well, as long as it's of the same species as the mother. +#define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat. +#define P_INCENSE_BREEDING GEN_LATEST // Since Gen 9, cross-generation Baby Pokémon don't require Incense being held by the parents to be obtained via breeding. +#define P_EGG_HATCH_LEVEL GEN_LATEST // Since Gen 4, Pokémon will hatch from eggs at level 1 instead of 5. +#define P_BALL_INHERITING GEN_LATEST // Since Gen 6, Eggs from the Daycare will inherit the Poké Ball from their mother. From Gen 7 onwards, the father can pass it down as well, as long as it's of the same species as the mother. +#define P_TM_INHERITANCE GEN_LATEST // Since Gen 6, the father no longer passes down TMs to the baby. +#define P_MOTHER_EGG_MOVE_INHERITANCE GEN_LATEST // Since Gen 6, the mother can also pass down Egg Moves. +#define P_NATURE_INHERITANCE GEN_LATEST // In Gen 3, Everstone grants Ditto and mothers a 50% chance to pass on Nature. Since Gen 4, anyone can pass on nature. Since Gen 5, the chance is 100%. +#define P_ABILITY_INHERITANCE GEN_LATEST // TODO: In B2W2, a female Pokémon has an 80% chance of passing down their ability if bred with a male. Since Gen 6, the chance is 80% for normal ability and 60% for Hidden Ability, and anyone can pass down their abilities if bred with Ditto. NOTE: BW's effect: 60% chance to pass down HA and random for normal ability has been omitted. +#define P_EGG_MOVE_TRANSFER GEN_LATEST // TODO: Starting in Gen 8, if two Pokémon of the same species are together in the Daycare, one knows an Egg Move, and the other has an empty slot, the other Pokémon will receive the Egg Move in the empty slot. // Species-specific settings #define P_SHEDINJA_BALL GEN_LATEST // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. diff --git a/src/daycare.c b/src/daycare.c index 803c0cacf9..3feabe9ba9 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -21,11 +21,14 @@ #include "overworld.h" #include "item.h" #include "constants/items.h" +#include "constants/hold_effects.h" #include "constants/moves.h" #include "constants/region_map_sections.h" extern const struct Evolution gEvolutionTable[][EVOS_PER_MON]; +#define IS_DITTO(species) (gBaseStats[species].eggGroup1 == EGG_GROUP_DITTO || gBaseStats[species].eggGroup2 == EGG_GROUP_DITTO) + static void ClearDaycareMonMail(struct DaycareMail *mail); static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *daycare); static u8 GetDaycareCompatibilityScore(struct DayCare *daycare); @@ -425,43 +428,29 @@ static u16 GetEggSpecies(u16 species) static s32 GetParentToInheritNature(struct DayCare *daycare) { - u32 species[DAYCARE_MON_COUNT]; - s32 i; - s32 dittoCount; - s32 parent = -1; + u32 i; + u8 numWithEverstone = 0; + s32 slot = -1; - // search for female gender for (i = 0; i < DAYCARE_MON_COUNT; i++) { - if (GetBoxMonGender(&daycare->mons[i].mon) == MON_FEMALE) - parent = i; + if (ItemId_GetHoldEffect(GetBoxMonData(&daycare->mons[i].mon, MON_DATA_HELD_ITEM)) == HOLD_EFFECT_PREVENT_EVOLVE + #if P_NATURE_INHERITANCE == GEN_3 + && (GetBoxMonGender(&daycare->mons[i].mon) == MON_FEMALE || IS_DITTO(GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES))) + #endif + ) { + slot = i; + numWithEverstone++; + } } - // search for ditto - for (dittoCount = 0, i = 0; i < DAYCARE_MON_COUNT; i++) - { - species[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES); - if (species[i] == SPECIES_DITTO) - dittoCount++, parent = i; - } - - // coin flip on ...two Dittos - if (dittoCount == DAYCARE_MON_COUNT) - { - if (Random() >= USHRT_MAX / 2) - parent = 0; - else - parent = 1; - } - - // Don't inherit nature if not holding Everstone - if (GetBoxMonData(&daycare->mons[parent].mon, MON_DATA_HELD_ITEM) != ITEM_EVERSTONE - || Random() >= USHRT_MAX / 2) - { - return -1; - } - - return parent; + if (numWithEverstone >= DAYCARE_MON_COUNT) + return Random() & 1; +#if P_NATURE_INHERITANCE > GEN_4 + return slot; +#else + return Random() & 1 ? slot : -1; +#endif } static void _TriggerPendingDaycareEgg(struct DayCare *daycare) @@ -541,7 +530,7 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare) { u16 motherItem = GetBoxMonData(&daycare->mons[0].mon, MON_DATA_HELD_ITEM); u16 fatherItem = GetBoxMonData(&daycare->mons[1].mon, MON_DATA_HELD_ITEM); - u8 i; + u8 i, start; u8 selectedIvs[5]; u8 availableIVs[NUM_STATS]; u8 whichParents[5]; @@ -557,8 +546,33 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare) availableIVs[i] = i; } + start = 0; + if (ItemId_GetHoldEffect(motherItem) == HOLD_EFFECT_POWER_ITEM && + ItemId_GetHoldEffect(fatherItem) == HOLD_EFFECT_POWER_ITEM) + { + whichParents[0] = Random() % DAYCARE_MON_COUNT; + selectedIvs[0] = ItemId_GetSecondaryId( + GetBoxMonData(&daycare->mons[whichParents[0]].mon, MON_DATA_HELD_ITEM)); + RemoveIVIndexFromList(availableIVs, selectedIvs[0]); + start++; + } + else if (ItemId_GetHoldEffect(motherItem) == HOLD_EFFECT_POWER_ITEM) + { + whichParents[0] = 0; + selectedIvs[0] = ItemId_GetSecondaryId(motherItem); + RemoveIVIndexFromList(availableIVs, selectedIvs[0]); + start++; + } + else if (ItemId_GetHoldEffect(fatherItem) == HOLD_EFFECT_POWER_ITEM) + { + whichParents[0] = 1; + selectedIvs[0] = ItemId_GetSecondaryId(fatherItem); + RemoveIVIndexFromList(availableIVs, selectedIvs[0]); + start++; + } + // Select which IVs that will be inherited. - for (i = 0; i < howManyIVs; i++) + for (i = start; i < howManyIVs; i++) { // Randomly pick an IV from the available list and stop from being chosen again. // BUG: Instead of removing the IV that was just picked, this @@ -577,7 +591,7 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare) } // Determine which parent each of the selected IVs should inherit from. - for (i = 0; i < howManyIVs; i++) + for (i = start; i < howManyIVs; i++) { whichParents[i] = Random() % DAYCARE_MON_COUNT; } @@ -703,6 +717,28 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru numEggMoves = GetEggMoves(egg, sHatchedEggEggMoves); +#if P_MOTHER_EGG_MOVE_INHERITANCE >= GEN_6 + for (i = 0; i < MAX_MON_MOVES; i++) + { + if (sHatchedEggMotherMoves[i] != MOVE_NONE) + { + for (j = 0; j < numEggMoves; j++) + { + if (sHatchedEggMotherMoves[i] == sHatchedEggEggMoves[j]) + { + if (GiveMoveToMon(egg, sHatchedEggMotherMoves[i]) == MON_HAS_MAX_MOVES) + DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggMotherMoves[i]); + break; + } + } + } + else + { + break; + } + } +#endif + for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] != MOVE_NONE) @@ -722,6 +758,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru break; } } +#if P_TM_INHERITANCE < GEN_6 for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] != MOVE_NONE) @@ -737,6 +774,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru } } } +#endif for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] == MOVE_NONE) From c82c2c185ecc62b58e79ab5feb5e29b3e4268f8f Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 29 Apr 2023 18:29:50 +0200 Subject: [PATCH 131/229] Integrate ghoul's review Co-Authored-By: ghoulslash <41651341+ghoulslash@users.noreply.github.com> --- src/battle_script_commands.c | 10 ---------- src/battle_util.c | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 81c39f893c..ccbb488d2e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -15147,16 +15147,6 @@ static void Cmd_doweatherformchangeanimation(void) static void Cmd_tryweatherformdatachange(void) { CMD_ARGS(); - - u8 form; - - // gBattlescriptCurrInstr = cmd->nextInstr; - // form = TryWeatherFormChange(gBattleScripting.battler); - // if (form) - // { - // BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - // *(&gBattleStruct->formToChangeInto) = form - 1; - // } } // Water and Mud Sport diff --git a/src/battle_util.c b/src/battle_util.c index e3c4ceed69..aab0f2db6d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2487,7 +2487,7 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_WEATHER_FORM: - for (i = 0; i < gBattlersCount; ++i) + for (i = 0; i < gBattlersCount; i++) { if (AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, i, 0, 0, 0)) { @@ -10154,7 +10154,7 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) { u8 monId = gBattlerPartyIndexes[battlerId]; u8 side = GET_BATTLER_SIDE(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(battlerId); u16 targetSpecies; if (!CanBattlerFormChange(battlerId, method)) From 99cbd2af37004fef58e8838f130b293b09f0ed2d Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sat, 29 Apr 2023 12:30:39 +0200 Subject: [PATCH 132/229] add snow weather --- asm/macros/battle_script.inc | 4 ++ data/battle_anim_scripts.s | 19 ++++++++- data/battle_scripts_1.s | 30 ++++++++++++++- include/battle_ai_util.h | 1 + include/battle_scripts.h | 4 +- include/config/battle.h | 1 + include/constants/battle.h | 6 ++- include/constants/battle_ai.h | 1 + include/constants/battle_anim.h | 2 + include/constants/battle_move_effects.h | 3 +- include/constants/battle_string_ids.h | 14 ++++++- src/battle_ai_main.c | 34 ++++++++++++++++- src/battle_ai_util.c | 30 +++++++++++++-- src/battle_anim_effects_3.c | 2 + src/battle_gfx_sfx_util.c | 1 + src/battle_main.c | 4 +- src/battle_message.c | 19 ++++++++- src/battle_script_commands.c | 29 +++++++++++--- src/battle_tv.c | 3 +- src/battle_util.c | 51 +++++++++++++++++++++---- src/data/battle_moves.h | 2 +- 21 files changed, 229 insertions(+), 31 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 78fb914063..bfc81fbb6c 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1346,6 +1346,10 @@ callnative BS_ItemRestorePP .endm + .macro setsnow + callnative BS_SetSnow + .endm + @ various command changed to more readable macros .macro cancelmultiturnmoves battler:req various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index adcb88c881..f1637fff9d 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -947,6 +947,7 @@ gBattleAnims_General:: .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON + .4byte General_Snow @ B_ANIM_SNOW_CONTINUES .align 2 gBattleAnims_Special:: @@ -14448,7 +14449,19 @@ Move_ELECTRO_DRIFT:: Move_SHED_TAIL:: Move_CHILLY_RECEPTION:: Move_TIDY_UP:: -Move_SNOWSCAPE:: + +@ Also used by Snow weather. Currently identical with Move_HAIL +Move_SNOWSCAPE: + loadspritegfx ANIM_TAG_HAIL + loadspritegfx ANIM_TAG_ICE_CRYSTALS + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK + waitforvisualfinish + createvisualtask AnimTask_Hail, 5 + loopsewithpan SE_M_HAIL, 0, 8, 10 + waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK + end + Move_POUNCE:: Move_TRAILBLAZE:: Move_CHILLING_WATER:: @@ -23924,6 +23937,7 @@ Move_WEATHER_BALL: jumpreteq ANIM_WEATHER_RAIN, WeatherBallWater jumpreteq ANIM_WEATHER_SANDSTORM, WeatherBallSandstorm jumpreteq ANIM_WEATHER_HAIL, WeatherBallIce + jumpreteq ANIM_WEATHER_SNOW, WeatherBallIce WeatherBallNormal: loadspritegfx ANIM_TAG_IMPACT createsprite gWeatherBallNormalDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 @@ -24679,6 +24693,9 @@ General_Sandstorm: General_Hail: goto Move_HAIL +General_Snow: + goto Move_SNOWSCAPE + General_LeechSeedDrain: createvisualtask AnimTask_GetBattlersFromArg, 5 delay 0 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ec73fd6b25..0b76d8648d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -424,6 +424,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING + .4byte BattleScript_EffectSnow @ EFFECT_SNOW BattleScript_EffectRevivalBlessing:: attackcanceler @@ -6858,6 +6859,14 @@ BattleScript_DamagingWeatherContinuesEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE end2 +BattleScript_SnowContinuesOrEnds:: + printfromtable gSnowContinuesStringIds + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SNOW_STOPPED, BattleScript_SnowContinuesOrEndsEnd + playanimation BS_ATTACKER, B_ANIM_SNOW_CONTINUES +BattleScript_SnowContinuesOrEndsEnd:: + end2 + BattleScript_SandStormHailEnds:: printfromtable gSandStormHailEndStringIds waitmessage B_WAIT_TIME_LONG @@ -8840,7 +8849,7 @@ BattleScript_MimicryActivates_End3:: waitmessage B_WAIT_TIME_SHORT end3 -BattleScript_SnowWarningActivates:: +BattleScript_SnowWarningActivatesHail:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_SNOWWARNINGHAIL @@ -8849,6 +8858,15 @@ BattleScript_SnowWarningActivates:: call BattleScript_WeatherFormChanges end3 +BattleScript_SnowWarningActivatesSnow:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_SNOWWARNINGSNOW + waitstate + playanimation BS_BATTLER_0, B_ANIM_SNOW_CONTINUES + call BattleScript_WeatherFormChanges + end3 + BattleScript_ActivateTerrainEffects: savetarget setbyte gBattlerTarget, 0 @@ -10422,3 +10440,13 @@ BattleScript_BerserkGeneRet_OwnTempoPrevents: BattleScript_BerserkGeneRet_End: removeitem BS_SCRIPTING end3 + +BattleScript_EffectSnow:: + attackcanceler + attackstring + ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn + setsnow + goto BattleScript_MoveWeatherChange diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index d1319f0ca7..0d134ff1ce 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -112,6 +112,7 @@ bool32 IsEncoreEncouragedEffect(u16 moveEffect); void ProtectChecks(u8 battlerAtk, u8 battlerDef, u16 move, u16 predictedMove, s16 *score); bool32 ShouldSetSandstorm(u8 battler, u16 ability, u16 holdEffect); bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect); +bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect); bool32 ShouldSetRain(u8 battlerAtk, u16 ability, u16 holdEffect); bool32 ShouldSetSun(u8 battlerAtk, u16 atkAbility, u16 holdEffect); bool32 HasSleepMoveWithLowAccuracy(u8 battlerAtk, u8 battlerDef); diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 876e2d343a..e0b756e937 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -43,6 +43,7 @@ extern const u8 BattleScript_ActionSwitch[]; extern const u8 BattleScript_Pausex20[]; extern const u8 BattleScript_LevelUp[]; extern const u8 BattleScript_RainContinuesOrEnds[]; +extern const u8 BattleScript_SnowContinuesOrEnds[]; extern const u8 BattleScript_DamagingWeatherContinues[]; extern const u8 BattleScript_SandStormHailEnds[]; extern const u8 BattleScript_SunlightContinues[]; @@ -269,7 +270,8 @@ extern const u8 BattleScript_CursedBodyActivates[]; extern const u8 BattleScript_MummyActivates[]; extern const u8 BattleScript_WeakArmorActivates[]; extern const u8 BattleScript_FellStingerRaisesStat[]; -extern const u8 BattleScript_SnowWarningActivates[]; +extern const u8 BattleScript_SnowWarningActivatesHail[]; +extern const u8 BattleScript_SnowWarningActivatesSnow[]; extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; diff --git a/include/config/battle.h b/include/config/battle.h index b9d3926b05..e3975e7199 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -118,6 +118,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. +#define B_SNOW_WARNING GEN_9 // In Gen9+, Snowwarning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/include/constants/battle.h b/include/constants/battle.h index f0130e58f2..7a4ede37a5 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -286,8 +286,11 @@ #define B_WEATHER_HAIL_PERMANENT (1 << 10) #define B_WEATHER_HAIL (B_WEATHER_HAIL_TEMPORARY | B_WEATHER_HAIL_PERMANENT) #define B_WEATHER_STRONG_WINDS (1 << 11) -#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS) +#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS | B_WEATHER_SNOW) #define B_WEATHER_PRIMAL_ANY (B_WEATHER_RAIN_PRIMAL | B_WEATHER_SUN_PRIMAL | B_WEATHER_STRONG_WINDS) +#define B_WEATHER_SNOW_TEMPORARY (1 << 12) +#define B_WEATHER_SNOW_PERMANENT (1 << 13) +#define B_WEATHER_SNOW (B_WEATHER_SNOW_TEMPORARY | B_WEATHER_SNOW_PERMANENT) // Battle Weather as enum #define ENUM_WEATHER_NONE 0 @@ -298,6 +301,7 @@ #define ENUM_WEATHER_SUN_PRIMAL 5 #define ENUM_WEATHER_RAIN_PRIMAL 6 #define ENUM_WEATHER_STRONG_WINDS 7 +#define ENUM_WEATHER_SNOW 8 // Move Effects #define MOVE_EFFECT_SLEEP 1 diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h index 1316054cd1..81dbdad163 100644 --- a/include/constants/battle_ai.h +++ b/include/constants/battle_ai.h @@ -30,6 +30,7 @@ #define AI_WEATHER_RAIN 2 #define AI_WEATHER_SANDSTORM 3 #define AI_WEATHER_HAIL 4 +#define AI_WEATHER_SNOW 5 // get_how_powerful_move_is #define MOVE_POWER_OTHER 0 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 46e229a319..4b772022e5 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -544,6 +544,7 @@ #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_SNOW_CONTINUES 37 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 @@ -591,6 +592,7 @@ #define ANIM_WEATHER_RAIN 2 #define ANIM_WEATHER_SANDSTORM 3 #define ANIM_WEATHER_HAIL 4 +#define ANIM_WEATHER_SNOW 5 // mon pal blend #define ANIM_PAL_BG 0x1 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index d1562dec93..e67348bfc4 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -405,7 +405,8 @@ #define EFFECT_DIRE_CLAW 399 #define EFFECT_BARB_BARRAGE 400 #define EFFECT_REVIVAL_BLESSING 401 +#define EFFECT_SNOW 402 -#define NUM_BATTLE_MOVE_EFFECTS 402 +#define NUM_BATTLE_MOVE_EFFECTS 403 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index f4fd589db1..f9d55a8a9d 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -652,8 +652,15 @@ #define STRINGID_ITEMCUREDSPECIESSTATUS 650 #define STRINGID_ITEMRESTOREDSPECIESPP 651 #define STRINGID_THUNDERCAGETRAPPED 652 +#define STRINGID_STARTEDSNOW 653 +#define STRINGID_SNOWCONTINUES 654 +#define STRINGID_SNOWSTOPPED 655 +#define STRINGID_STARTEDSNOW 653 +#define STRINGID_SNOWCONTINUES 654 +#define STRINGID_SNOWSTOPPED 655 +#define STRINGID_SNOWWARNINGSNOW 656 -#define BATTLESTRINGS_COUNT 653 +#define BATTLESTRINGS_COUNT 657 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -719,12 +726,17 @@ #define B_MSG_STARTED_SANDSTORM 3 #define B_MSG_STARTED_SUNLIGHT 4 #define B_MSG_STARTED_HAIL 5 +#define B_MSG_STARTED_SNOW 6 // gRainContinuesStringIds #define B_MSG_RAIN_CONTINUES 0 #define B_MSG_DOWNPOUR_CONTINUES 1 #define B_MSG_RAIN_STOPPED 2 +// gSnowContinuesStringIds +#define B_MSG_SNOW_CONTINUES 0 +#define B_MSG_SNOW_STOPPED 1 + // gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds #define B_MSG_SANDSTORM 0 #define B_MSG_HAIL 1 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 6c60705d5a..3933c455d0 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1372,7 +1372,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_AURORA_VEIL: if (gSideStatuses[GetBattlerSide(battlerAtk)] & SIDE_STATUS_AURORA_VEIL || PartnerHasSameMoveEffectWithoutTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) - || !(gBattleWeather & B_WEATHER_HAIL)) + || !(gBattleWeather & B_WEATHER_HAIL && gBattleWeather & B_WEATHER_SNOW)) score -= 10; break; case EFFECT_OHKO: @@ -1578,7 +1578,12 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 8; break; case EFFECT_HAIL: - if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) + if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) // should hail be discouraged if snow is up? + || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) + score -= 8; + break; + case EFFECT_SNOW: + if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) // should snow be discouraged if hail is up? || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; break; @@ -2800,6 +2805,13 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_PLUS(2); // our partner benefits from hail } break; + case EFFECT_SNOW: + if (IsBattlerAlive(battlerAtkPartner) + && ShouldSetSnow(battlerAtkPartner, atkPartnerAbility, atkPartnerHoldEffect)) + { + RETURN_SCORE_PLUS(2); // our partner benefits from snow + } + break; } // global move effect check @@ -3949,6 +3961,22 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; } break; + case EFFECT_SNOW: // any other reasons? + if (ShouldSetSnow(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) + { + 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++; + if (HasMoveEffect(battlerDef, EFFECT_MORNING_SUN) + || HasMoveEffect(battlerDef, EFFECT_SYNTHESIS) + || HasMoveEffect(battlerDef, EFFECT_MOONLIGHT)) + score += 2; + } + break; case EFFECT_RAIN_DANCE: if (ShouldSetRain(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) { @@ -4932,6 +4960,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: + case EFFECT_SNOW: case EFFECT_GEOMANCY: case EFFECT_VICTORY_DANCE: case EFFECT_HIT_SET_ENTRY_HAZARD: @@ -5158,6 +5187,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: + case EFFECT_SNOW: case EFFECT_RAIN_DANCE: score -= 2; break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index f23127a0c3..230bc255f1 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -331,6 +331,7 @@ static const u16 sEncouragedEncoreEffects[] = EFFECT_SPIT_UP, EFFECT_SWALLOW, EFFECT_HAIL, + EFFECT_SNOW, EFFECT_TORMENT, EFFECT_WILL_O_WISP, EFFECT_FOLLOW_ME, @@ -1504,7 +1505,7 @@ bool32 IsMoveEncouragedToHit(u8 battlerAtk, u8 battlerDef, u16 move) // increased accuracy but don't always hit if ((AI_WeatherHasEffect() && (((gBattleWeather & B_WEATHER_RAIN) && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE)) - || (((gBattleWeather & B_WEATHER_HAIL) && move == MOVE_BLIZZARD)))) + || (((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD)))) || (gBattleMoves[move].effect == EFFECT_VITAL_THROW) #if B_MINIMIZE_DMG_ACC >= GEN_6 || ((gStatuses3[battlerDef] & STATUS3_MINIMIZED) && (gBattleMoves[move].flags & FLAG_DMG_MINIMIZE)) @@ -1579,7 +1580,7 @@ bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect) { if (!AI_WeatherHasEffect()) return FALSE; - else if (gBattleWeather & B_WEATHER_HAIL) + else if (gBattleWeather & B_WEATHER_HAIL) // dont set hail if snow is up? return FALSE; if (ability == ABILITY_SNOW_CLOAK @@ -1649,6 +1650,26 @@ bool32 ShouldSetSun(u8 battlerAtk, u16 atkAbility, u16 holdEffect) return FALSE; } +bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect) // any other reasons snow should be set? +{ + if (!AI_WeatherHasEffect()) + return FALSE; + else if (gBattleWeather & B_WEATHER_SNOW) // dont set snow if hail is up? + return FALSE; + + if (ability == ABILITY_SNOW_CLOAK + || ability == ABILITY_ICE_BODY + || ability == ABILITY_FORECAST + || ability == ABILITY_SLUSH_RUSH + || IS_BATTLER_OF_TYPE(battler, TYPE_ICE) + || HasMove(battler, MOVE_BLIZZARD) + || HasMoveEffect(battler, EFFECT_AURORA_VEIL) + || HasMoveEffect(battler, EFFECT_WEATHER_BALL)) + { + return TRUE; + } + return FALSE; +} void ProtectChecks(u8 battlerAtk, u8 battlerDef, u16 move, u16 predictedMove, s16 *score) { @@ -3110,7 +3131,7 @@ bool32 ShouldSetScreen(u8 battlerAtk, u8 battlerDef, u16 moveEffect) { case EFFECT_AURORA_VEIL: // Use only in Hail and only if AI doesn't already have Reflect, Light Screen or Aurora Veil itself active. - if (gBattleWeather & B_WEATHER_HAIL + if ((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && !(gSideStatuses[atkSide] & (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL))) return TRUE; break; @@ -3215,7 +3236,8 @@ bool32 PartnerMoveEffectIsWeather(u8 battlerAtkPartner, u16 partnerMove) && (gBattleMoves[partnerMove].effect == EFFECT_SUNNY_DAY || gBattleMoves[partnerMove].effect == EFFECT_RAIN_DANCE || gBattleMoves[partnerMove].effect == EFFECT_SANDSTORM - || gBattleMoves[partnerMove].effect == EFFECT_HAIL)) + || gBattleMoves[partnerMove].effect == EFFECT_HAIL + || gBattleMoves[partnerMove].effect == EFFECT_SNOW)) return TRUE; return FALSE; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index ff5f044464..e18dfc9027 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -5601,6 +5601,8 @@ void AnimTask_GetWeather(u8 taskId) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM; else if (gWeatherMoveAnim & B_WEATHER_HAIL) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_HAIL; + else if (gWeatherMoveAnim & B_WEATHER_SNOW) + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SNOW; DestroyAnimVisualTask(taskId); } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index bc541f0a01..2cc6b45bf8 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -492,6 +492,7 @@ static bool8 ShouldAnimBeDoneRegardlessOfSubstitute(u8 animId) case B_ANIM_SUN_CONTINUES: case B_ANIM_SANDSTORM_CONTINUES: case B_ANIM_HAIL_CONTINUES: + case B_ANIM_SNOW_CONTINUES: case B_ANIM_SNATCH_MOVE: return TRUE; default: diff --git a/src/battle_main.c b/src/battle_main.c index 2faeb84f2c..43b9c4a77a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4665,7 +4665,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId) speed *= 2; else if (ability == ABILITY_SAND_RUSH && gBattleWeather & B_WEATHER_SANDSTORM) speed *= 2; - else if (ability == ABILITY_SLUSH_RUSH && gBattleWeather & B_WEATHER_HAIL) + else if (ability == ABILITY_SLUSH_RUSH && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) speed *= 2; } @@ -5603,7 +5603,7 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk) gBattleStruct->dynamicMoveType = TYPE_ROCK | F_DYNAMIC_TYPE_2; else if (gBattleWeather & B_WEATHER_SUN && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA) gBattleStruct->dynamicMoveType = TYPE_FIRE | F_DYNAMIC_TYPE_2; - else if (gBattleWeather & B_WEATHER_HAIL) + else if (gBattleWeather & (B_WEATHER_HAIL |B_WEATHER_SNOW)) gBattleStruct->dynamicMoveType = TYPE_ICE | F_DYNAMIC_TYPE_2; else gBattleStruct->dynamicMoveType = TYPE_NORMAL | F_DYNAMIC_TYPE_2; diff --git a/src/battle_message.c b/src/battle_message.c index 21f7098f81..b2fb17c34b 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -358,8 +358,11 @@ static const u8 sText_SunlightGotBright[] = _("The sunlight got bright!"); static const u8 sText_SunlightStrong[] = _("The sunlight is strong."); static const u8 sText_SunlightFaded[] = _("The sunlight faded."); static const u8 sText_StartedHail[] = _("It started to hail!"); +static const u8 sText_StartedSnow[] = _("It started to snow!"); static const u8 sText_HailContinues[] = _("Hail continues to fall."); +static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_HailStopped[] = _("The hail stopped."); +static const u8 sText_SnowStopped[] = _("The snow stopped."); static const u8 sText_FailedToSpitUp[] = _("But it failed to spit up\na thing!"); static const u8 sText_FailedToSwallow[] = _("But it failed to swallow\na thing!"); static const u8 sText_WindBecameHeatWave[] = _("The wind turned into a\nHEAT WAVE!"); @@ -608,6 +611,7 @@ static const u8 sText_AnticipationActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFI static const u8 sText_ForewarnActivates[] = _("{B_SCR_ACTIVE_ABILITY} alerted {B_SCR_ACTIVE_NAME_WITH_PREFIX}\nto the {B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!"); static const u8 sText_IceBodyHpGain[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nhealed it a little bit!"); static const u8 sText_SnowWarningHail[] = _("It started to hail!"); +static const u8 sText_SnowWarningSnow[] = _("It started to snow!"); static const u8 sText_FriskActivates[] = _("{B_ATK_NAME_WITH_PREFIX} frisked {B_DEF_NAME_WITH_PREFIX} and\nfound its {B_LAST_ITEM}!"); static const u8 sText_UnnerveEnters[] = _("The opposing team is too nervous\nto eat Berries!"); static const u8 sText_HarvestBerry[] = _("{B_ATK_NAME_WITH_PREFIX} harvested\nits {B_LAST_ITEM}!"); @@ -1134,6 +1138,9 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_STARTEDHAIL - BATTLESTRINGS_TABLE_START] = sText_StartedHail, [STRINGID_HAILCONTINUES - BATTLESTRINGS_TABLE_START] = sText_HailContinues, [STRINGID_HAILSTOPPED - BATTLESTRINGS_TABLE_START] = sText_HailStopped, + [STRINGID_STARTEDSNOW - BATTLESTRINGS_TABLE_START] = sText_StartedSnow, + [STRINGID_SNOWCONTINUES -BATTLESTRINGS_TABLE_START] = sText_SnowContinues, + [STRINGID_SNOWSTOPPED - BATTLESTRINGS_TABLE_START] = sText_SnowStopped, [STRINGID_FAILEDTOSPITUP - BATTLESTRINGS_TABLE_START] = sText_FailedToSpitUp, [STRINGID_FAILEDTOSWALLOW - BATTLESTRINGS_TABLE_START] = sText_FailedToSwallow, [STRINGID_WINDBECAMEHEATWAVE - BATTLESTRINGS_TABLE_START] = sText_WindBecameHeatWave, @@ -1354,6 +1361,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_FOREWARNACTIVATES - BATTLESTRINGS_TABLE_START] = sText_ForewarnActivates, [STRINGID_ICEBODYHPGAIN - BATTLESTRINGS_TABLE_START] = sText_IceBodyHpGain, [STRINGID_SNOWWARNINGHAIL - BATTLESTRINGS_TABLE_START] = sText_SnowWarningHail, + [STRINGID_SNOWWARNINGSNOW - BATTLESTRINGS_TABLE_START] = sText_SnowWarningSnow, [STRINGID_FRISKACTIVATES - BATTLESTRINGS_TABLE_START] = sText_FriskActivates, [STRINGID_UNNERVEENTERS - BATTLESTRINGS_TABLE_START] = sText_UnnerveEnters, [STRINGID_HARVESTBERRY - BATTLESTRINGS_TABLE_START] = sText_HarvestBerry, @@ -1543,12 +1551,13 @@ const u16 gMoveWeatherChangeStringIds[] = [B_MSG_STARTED_SANDSTORM] = STRINGID_SANDSTORMBREWED, [B_MSG_STARTED_SUNLIGHT] = STRINGID_SUNLIGHTGOTBRIGHT, [B_MSG_STARTED_HAIL] = STRINGID_STARTEDHAIL, + [B_MSG_STARTED_SNOW] = STRINGID_STARTEDSNOW, }; const u16 gSandStormHailContinuesStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES, - [B_MSG_HAIL] = STRINGID_HAILCONTINUES + [B_MSG_HAIL] = STRINGID_HAILCONTINUES, }; const u16 gSandStormHailDmgStringIds[] = @@ -1560,7 +1569,7 @@ const u16 gSandStormHailDmgStringIds[] = const u16 gSandStormHailEndStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED, - [B_MSG_HAIL] = STRINGID_HAILSTOPPED + [B_MSG_HAIL] = STRINGID_HAILSTOPPED, }; const u16 gRainContinuesStringIds[] = @@ -1570,6 +1579,12 @@ const u16 gRainContinuesStringIds[] = [B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED }; +const u16 gSnowContinuesStringIds[] = +{ + [B_MSG_SNOW_CONTINUES] = STRINGID_SNOWCONTINUES, + [B_MSG_SNOW_STOPPED] = STRINGID_SNOWSTOPPED, +}; + const u16 gProtectLikeUsedStringIds[] = { [B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a561307483..f9edb21708 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1809,7 +1809,7 @@ static bool32 AccuracyCalcHelper(u16 move) return TRUE; } #if B_BLIZZARD_HAIL >= GEN_4 - else if ((gBattleWeather & B_WEATHER_HAIL) && move == MOVE_BLIZZARD) + else if ((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD) { // thunder/hurricane ignore acc checks in rain unless target is holding utility umbrella JumpIfMoveFailed(7, move); @@ -1889,7 +1889,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u if (defAbility == ABILITY_SAND_VEIL && WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_SANDSTORM) calc = (calc * 80) / 100; // 1.2 sand veil loss - else if (defAbility == ABILITY_SNOW_CLOAK && WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_HAIL) + else if (defAbility == ABILITY_SNOW_CLOAK && WEATHER_HAS_EFFECT && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) calc = (calc * 80) / 100; // 1.2 snow cloak loss else if (defAbility == ABILITY_TANGLED_FEET && gBattleMons[battlerDef].status2 & STATUS2_CONFUSION) calc = (calc * 50) / 100; // 1.5 tangled feet loss @@ -5185,7 +5185,8 @@ static void Cmd_playanimation(void) else if (animId == B_ANIM_RAIN_CONTINUES || animId == B_ANIM_SUN_CONTINUES || animId == B_ANIM_SANDSTORM_CONTINUES - || animId == B_ANIM_HAIL_CONTINUES) + || animId == B_ANIM_HAIL_CONTINUES + || animId == B_ANIM_SNOW_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, animId, *argPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -5234,7 +5235,8 @@ static void Cmd_playanimation_var(void) else if (*animIdPtr == B_ANIM_RAIN_CONTINUES || *animIdPtr == B_ANIM_SUN_CONTINUES || *animIdPtr == B_ANIM_SANDSTORM_CONTINUES - || *animIdPtr == B_ANIM_HAIL_CONTINUES) + || *animIdPtr == B_ANIM_HAIL_CONTINUES + || *animIdPtr == B_ANIM_SNOW_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, *animIdPtr, *argPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -10300,7 +10302,7 @@ static void Cmd_various(void) { VARIOUS_ARGS(); if (gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] & SIDE_STATUS_AURORA_VEIL - || !(WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_HAIL)) + || !(WEATHER_HAS_EFFECT && gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = 0; @@ -16620,3 +16622,20 @@ void BS_ItemRestorePP(void) { PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(mon, MON_DATA_SPECIES)); gBattlescriptCurrInstr = cmd->nextInstr; } + +void BS_SetSnow(void) +{ + NATIVE_ARGS(); + + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_SNOW, FALSE)) + { + gMoveResultFlags |= MOVE_RESULT_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; + + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SNOW; + } + gBattlescriptCurrInstr = cmd->nextInstr; +} \ No newline at end of file diff --git a/src/battle_tv.c b/src/battle_tv.c index 10c2144ccd..0ed75c1768 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -251,6 +251,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_SWALLOW] = 3, // [EFFECT_UNUSED_A3] = 1, [EFFECT_HAIL] = 4, + [EFFECT_SNOW] = 4, [EFFECT_TORMENT] = 7, [EFFECT_FLATTER] = 7, [EFFECT_WILL_O_WISP] = 5, @@ -1769,6 +1770,6 @@ static void AddPointsBasedOnWeather(u16 weatherFlags, u16 moveId, u8 moveSlot) AddMovePoints(PTS_SUN, moveId, moveSlot, 0); else if (weatherFlags & B_WEATHER_SANDSTORM) AddMovePoints(PTS_SANDSTORM, moveId, moveSlot, 0); - else if (weatherFlags & B_WEATHER_HAIL) + else if (weatherFlags & (B_WEATHER_HAIL | B_WEATHER_SNOW)) AddMovePoints(PTS_HAIL, moveId, moveSlot, 0); } diff --git a/src/battle_util.c b/src/battle_util.c index b89b9976ee..594d412110 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2032,6 +2032,7 @@ enum ENDTURN_SANDSTORM, ENDTURN_SUN, ENDTURN_HAIL, + ENDTURN_SNOW, ENDTURN_GRAVITY, ENDTURN_WATER_SPORT, ENDTURN_MUD_SPORT, @@ -2394,6 +2395,27 @@ u8 DoFieldEndTurnEffects(void) } gBattleStruct->turnCountersTracker++; break; + case ENDTURN_SNOW: + if (gBattleWeather & B_WEATHER_SNOW) + { + if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT)) + { + if (--gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_STOPPED; + } + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_CONTINUES; + } + + BattleScriptExecute(BattleScript_SnowContinuesOrEnds); + effect++; + } + gBattleStruct->turnCountersTracker++; + break; case ENDTURN_TRICK_ROOM: if (gFieldStatuses & STATUS_FIELD_TRICK_ROOM && --gFieldTimers.trickRoomTimer == 0) { @@ -3995,7 +4017,7 @@ u8 TryWeatherFormChange(u8 battler) } } #endif - else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))) + else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_SNOW)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))) { SET_BATTLER_TYPE(battler, TYPE_NORMAL); ret = CASTFORM_NORMAL + 1; @@ -4010,7 +4032,7 @@ u8 TryWeatherFormChange(u8 battler) SET_BATTLER_TYPE(battler, TYPE_WATER); ret = CASTFORM_WATER + 1; } - else if (gBattleWeather & B_WEATHER_HAIL && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) + else if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW) && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) { SET_BATTLER_TYPE(battler, TYPE_ICE); ret = CASTFORM_ICE + 1; @@ -4046,6 +4068,7 @@ static const u16 sWeatherFlagsInfo[][3] = [ENUM_WEATHER_SANDSTORM] = {B_WEATHER_SANDSTORM_TEMPORARY, B_WEATHER_SANDSTORM_PERMANENT, HOLD_EFFECT_SMOOTH_ROCK}, [ENUM_WEATHER_HAIL] = {B_WEATHER_HAIL_TEMPORARY, B_WEATHER_HAIL_PERMANENT, HOLD_EFFECT_ICY_ROCK}, [ENUM_WEATHER_STRONG_WINDS] = {B_WEATHER_STRONG_WINDS, B_WEATHER_STRONG_WINDS, HOLD_EFFECT_NONE}, + [ENUM_WEATHER_SNOW] = {B_WEATHER_SNOW_TEMPORARY, B_WEATHER_SNOW_PERMANENT, HOLD_EFFECT_ICY_ROCK}, }; static void ShouldChangeFormInWeather(u8 battler) @@ -4066,7 +4089,6 @@ static void ShouldChangeFormInWeather(u8 battler) bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) { u16 battlerAbility = GetBattlerAbility(battler); - if (gBattleWeather & B_WEATHER_PRIMAL_ANY && battlerAbility != ABILITY_DESOLATE_LAND && battlerAbility != ABILITY_PRIMORDIAL_SEA @@ -4092,7 +4114,6 @@ bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) ShouldChangeFormInWeather(battler); return TRUE; } - return FALSE; } @@ -4642,11 +4663,19 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_SNOW_WARNING: - if (TryChangeBattleWeather(battler, ENUM_WEATHER_HAIL, TRUE)) + #if B_SNOW_WARNING >= GEN_9 + if (TryChangeBattleWeather(battler, ENUM_WEATHER_SNOW, TRUE)) { - BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivates); + BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivatesSnow); effect++; } + #else + if (TryChangeBattleWeather(battler, ENUM_WEATHER_HAIL, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivatesHail); + effect++; + } + #endif else if (gBattleWeather & B_WEATHER_PRIMAL_ANY && WEATHER_HAS_EFFECT && !gSpecialStatuses[battler].switchInAbilityDone) { gSpecialStatuses[battler].switchInAbilityDone = TRUE; @@ -6132,7 +6161,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_ICE_FACE: - if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL) + if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL | B_WEATHER_SNOW) && gBattleMons[battler].species == SPECIES_EISCUE_NOICE_FACE && !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) && gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)]) @@ -9087,7 +9116,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(2.0)); break; case EFFECT_SOLAR_BEAM: - if (IsBattlerWeatherAffected(battlerAtk, (B_WEATHER_HAIL | B_WEATHER_SANDSTORM | B_WEATHER_RAIN))) + if (IsBattlerWeatherAffected(battlerAtk, (B_WEATHER_HAIL | B_WEATHER_SANDSTORM | B_WEATHER_RAIN | B_WEATHER_SNOW))) MulModifier(&modifier, UQ_4_12(0.5)); break; case EFFECT_STOMPING_TANTRUM: @@ -9495,6 +9524,12 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, // sandstorm sp.def boost for rock types if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ROCK) && gBattleWeather & B_WEATHER_SANDSTORM && WEATHER_HAS_EFFECT && !usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); + // snow def boost for ice types + if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) + MulModifier(&modifier, UQ_4_12(1.5)); + + if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) + MulModifier(&modifier, UQ_4_12(1.5)); // The defensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 5th badge and 7th badges. // Having the 5th badge boosts physical defense while having the 7th badge boosts special defense. diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 4a89222a96..5cb428d9a3 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13330,7 +13330,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_SNOWSCAPE] = { - .effect = EFFECT_HAIL, + .effect = EFFECT_SNOW, .power = 0, .type = TYPE_ICE, .accuracy = 0, From c7d39e561dd638e9da7b96768fb51c085ea5b58b Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 29 Apr 2023 20:41:54 +0200 Subject: [PATCH 133/229] Clarify weather function --- src/battle_script_commands.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ccbb488d2e..aead0fe3c2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -15147,6 +15147,8 @@ static void Cmd_doweatherformchangeanimation(void) static void Cmd_tryweatherformdatachange(void) { CMD_ARGS(); + + // removed in favor of new form system } // Water and Mud Sport From 62ec4989f24644da1296b46017f7975780b89716 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sun, 30 Apr 2023 02:35:09 +0200 Subject: [PATCH 134/229] spelling --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index e3975e7199..0605ad43e5 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -118,7 +118,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. -#define B_SNOW_WARNING GEN_9 // In Gen9+, Snowwarning will summon snow instead of hail. +#define B_SNOW_WARNING GEN_9 // In Gen9+, Snow Warning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. From b30dad3e7aa4655ccb659cbbe3e909253d49be57 Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Sat, 29 Apr 2023 21:56:23 -0400 Subject: [PATCH 135/229] Fix anger shell activating when fainted (#2945) Co-authored-by: ghoulslash --- src/battle_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/battle_util.c b/src/battle_util.c index b89b9976ee..bf332e64df 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5767,6 +5767,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED + && IsBattlerAlive(gBattlerTarget) && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2) && !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove))) { From acf4529d8b48587a7033e7cf71251ec8eb97ff06 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 30 Apr 2023 11:25:48 +0200 Subject: [PATCH 136/229] Allow Egg Move transfer for non-eggs --- include/config/pokemon.h | 2 +- include/pokemon.h | 1 + src/daycare.c | 50 ++++++++++++++++++++++++++++++++++++++++ src/pokemon.c | 3 +-- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index 6247217465..d6e239515e 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -16,7 +16,7 @@ #define P_MOTHER_EGG_MOVE_INHERITANCE GEN_LATEST // Since Gen 6, the mother can also pass down Egg Moves. #define P_NATURE_INHERITANCE GEN_LATEST // In Gen 3, Everstone grants Ditto and mothers a 50% chance to pass on Nature. Since Gen 4, anyone can pass on nature. Since Gen 5, the chance is 100%. #define P_ABILITY_INHERITANCE GEN_LATEST // TODO: In B2W2, a female Pokémon has an 80% chance of passing down their ability if bred with a male. Since Gen 6, the chance is 80% for normal ability and 60% for Hidden Ability, and anyone can pass down their abilities if bred with Ditto. NOTE: BW's effect: 60% chance to pass down HA and random for normal ability has been omitted. -#define P_EGG_MOVE_TRANSFER GEN_LATEST // TODO: Starting in Gen 8, if two Pokémon of the same species are together in the Daycare, one knows an Egg Move, and the other has an empty slot, the other Pokémon will receive the Egg Move in the empty slot. +#define P_EGG_MOVE_TRANSFER GEN_LATEST // Starting in Gen 8, if two Pokémon of the same species are together in the Daycare, one knows an Egg Move, and the other has an empty slot, the other Pokémon will receive the Egg Move in the empty slot. In Gen 9, if a Pokémon holds a Mirror Herb, it will receive Egg Moves from the other regardless of species. // Species-specific settings #define P_SHEDINJA_BALL GEN_LATEST // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. diff --git a/include/pokemon.h b/include/pokemon.h index 581677cae7..2394861060 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -442,6 +442,7 @@ void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon); u16 GiveMoveToMon(struct Pokemon *mon, u16 move); +u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move); void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot); void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot); diff --git a/src/daycare.c b/src/daycare.c index 3feabe9ba9..a058ce9052 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -34,6 +34,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare * static u8 GetDaycareCompatibilityScore(struct DayCare *daycare); static void DaycarePrintMonInfo(u8 windowId, u32 daycareSlotId, u8 y); static u8 ModifyBreedingScoreForOvalCharm(u8 score); +static u8 GetEggMoves(struct Pokemon *pokemon, u16 *eggMoves); // RAM buffers used to assist with BuildEggMoveset() EWRAM_DATA static u16 sHatchedEggLevelUpMoves[EGG_LVL_UP_MOVES_ARRAY_COUNT] = {0}; @@ -164,6 +165,51 @@ static s8 Daycare_FindEmptySpot(struct DayCare *daycare) return -1; } +static void TransferEggMoves(void) +{ + u32 i, j, k, l; + u16 numEggMoves; + struct Pokemon mon; + + for (i = 0; i < DAYCARE_MON_COUNT; i++) + { + if (!GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[i].mon, MON_DATA_SANITY_HAS_SPECIES)) + continue; + + // Get list of egg moves for mon + BoxMonToMon(&gSaveBlock1Ptr->daycare.mons[i].mon, &mon); + for (j = 0; j < EGG_MOVES_ARRAY_COUNT; j++) + sHatchedEggEggMoves[j] = MOVE_NONE; + numEggMoves = GetEggMoves(&mon, sHatchedEggEggMoves); + for (j = 0; j < numEggMoves; j++) + { + // Go through other Daycare mons + for (k = 0; k < DAYCARE_MON_COUNT; k++) + { + if (k == i || !GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[k].mon, MON_DATA_SANITY_HAS_SPECIES)) + continue; + + // Check if you can inherit from them + if (GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[k].mon, MON_DATA_SPECIES) != GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[i].mon, MON_DATA_SPECIES) + #if P_EGG_MOVE_TRANSFER >= GEN_9 + && GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[i].mon, MON_DATA_HELD_ITEM) != ITEM_MIRROR_HERB + #endif + ) + continue; + + for (l = 0; l < MAX_MON_MOVES; l++) + { + if (GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[k].mon, MON_DATA_MOVE1 + l) != sHatchedEggEggMoves[j]) + continue; + + if (GiveMoveToBoxMon(&gSaveBlock1Ptr->daycare.mons[i].mon, sHatchedEggEggMoves[j]) == MON_HAS_MAX_MOVES) + break; + } + } + } + } +} + static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycareMon) { if (MonHasMail(mon)) @@ -186,6 +232,10 @@ static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycar ZeroMonData(mon); CompactPartySlots(); CalculatePlayerPartyCount(); + +#if P_EGG_MOVE_TRANSFER >= GEN_8 + TransferEggMoves(); +#endif } static void StorePokemonInEmptyDaycareSlot(struct Pokemon *mon, struct DayCare *daycare) diff --git a/src/pokemon.c b/src/pokemon.c index e82cb98c30..5b83e97488 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -63,7 +63,6 @@ static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 perso static void EncryptBoxMon(struct BoxPokemon *boxMon); static void DecryptBoxMon(struct BoxPokemon *boxMon); static void Task_PlayMapChosenOrBattleBGM(u8 taskId); -static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); static bool8 ShouldSkipFriendshipChange(void); static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv); void TrySpecialOverworldEvo(); @@ -4194,7 +4193,7 @@ u16 GiveMoveToMon(struct Pokemon *mon, u16 move) return GiveMoveToBoxMon(&mon->box, move); } -static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) +u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; for (i = 0; i < MAX_MON_MOVES; i++) From 21fa91b80b76b8e4b67b8ea0df45c94bc7d078de Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 30 Apr 2023 11:45:24 +0200 Subject: [PATCH 137/229] Add ClearHatchedEggMoves per SBird's suggestion Co-Authored-By: Philipp AUER --- src/daycare.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/daycare.c b/src/daycare.c index a058ce9052..2997578d5f 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -165,6 +165,14 @@ static s8 Daycare_FindEmptySpot(struct DayCare *daycare) return -1; } +static void ClearHatchedEggMoves(void) +{ + u16 i; + + for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++) + sHatchedEggEggMoves[i] = MOVE_NONE; +} + static void TransferEggMoves(void) { u32 i, j, k, l; @@ -176,10 +184,8 @@ static void TransferEggMoves(void) if (!GetBoxMonData(&gSaveBlock1Ptr->daycare.mons[i].mon, MON_DATA_SANITY_HAS_SPECIES)) continue; - // Get list of egg moves for mon BoxMonToMon(&gSaveBlock1Ptr->daycare.mons[i].mon, &mon); - for (j = 0; j < EGG_MOVES_ARRAY_COUNT; j++) - sHatchedEggEggMoves[j] = MOVE_NONE; + ClearHatchedEggMoves(); numEggMoves = GetEggMoves(&mon, sHatchedEggEggMoves); for (j = 0; j < numEggMoves; j++) { @@ -753,8 +759,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru sHatchedEggFatherMoves[i] = MOVE_NONE; sHatchedEggFinalMoves[i] = MOVE_NONE; } - for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++) - sHatchedEggEggMoves[i] = MOVE_NONE; + ClearHatchedEggMoves(); for (i = 0; i < EGG_LVL_UP_MOVES_ARRAY_COUNT; i++) sHatchedEggLevelUpMoves[i] = MOVE_NONE; From 8f75844ece7546df6b06db53302685f458c1f8b9 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 30 Apr 2023 12:58:18 +0200 Subject: [PATCH 138/229] Add Ability inheritance --- include/config/pokemon.h | 2 +- src/daycare.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index d6e239515e..a65eddb73c 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -15,7 +15,7 @@ #define P_TM_INHERITANCE GEN_LATEST // Since Gen 6, the father no longer passes down TMs to the baby. #define P_MOTHER_EGG_MOVE_INHERITANCE GEN_LATEST // Since Gen 6, the mother can also pass down Egg Moves. #define P_NATURE_INHERITANCE GEN_LATEST // In Gen 3, Everstone grants Ditto and mothers a 50% chance to pass on Nature. Since Gen 4, anyone can pass on nature. Since Gen 5, the chance is 100%. -#define P_ABILITY_INHERITANCE GEN_LATEST // TODO: In B2W2, a female Pokémon has an 80% chance of passing down their ability if bred with a male. Since Gen 6, the chance is 80% for normal ability and 60% for Hidden Ability, and anyone can pass down their abilities if bred with Ditto. NOTE: BW's effect: 60% chance to pass down HA and random for normal ability has been omitted. +#define P_ABILITY_INHERITANCE GEN_LATEST // In B2W2, a female Pokémon has an 80% chance of passing down their ability if bred with a male. Since Gen 6, the chance is 80% for normal ability and 60% for Hidden Ability, and anyone can pass down their abilities if bred with Ditto. NOTE: BW's effect: 60% chance to pass down HA and random for normal ability has been omitted. #define P_EGG_MOVE_TRANSFER GEN_LATEST // Starting in Gen 8, if two Pokémon of the same species are together in the Daycare, one knows an Egg Move, and the other has an empty slot, the other Pokémon will receive the Egg Move in the empty slot. In Gen 9, if a Pokémon holds a Mirror Herb, it will receive Egg Moves from the other regardless of species. // Species-specific settings diff --git a/src/daycare.c b/src/daycare.c index 2997578d5f..08b9ec23fc 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -712,6 +712,35 @@ static void InheritPokeball(struct Pokemon *egg, struct BoxPokemon *father, stru SetMonData(egg, MON_DATA_POKEBALL, &inheritBall); } +static void InheritAbility(struct Pokemon *egg, struct BoxPokemon *father, struct BoxPokemon *mother) +{ + u8 fatherAbility = GetBoxMonData(father, MON_DATA_ABILITY_NUM); + u8 motherAbility = GetBoxMonData(mother, MON_DATA_ABILITY_NUM); + u8 motherSpecies = GetBoxMonData(mother, MON_DATA_SPECIES); + u8 inheritAbility = motherAbility; + + if (motherSpecies == SPECIES_DITTO) + #if P_ABILITY_INHERITANCE < GEN_6 + return; + #else + inheritAbility = fatherAbility; + #endif + + if (inheritAbility < 2 && (Random() % 10 < 8)) + { + SetMonData(egg, MON_DATA_ABILITY_NUM, &inheritAbility); + } +#if P_ABILITY_INHERITANCE < GEN_6 + else if (Random() % 10 < 8) +#else + else if (Random() % 10 < 6) +#endif + { + // Hidden Abilities have a different chance of being passed down + SetMonData(egg, MON_DATA_ABILITY_NUM, &inheritAbility); + } +} + // Counts the number of egg moves a pokemon learns and stores the moves in // the given array. static u8 GetEggMoves(struct Pokemon *pokemon, u16 *eggMoves) @@ -1000,6 +1029,9 @@ static void _GiveEggFromDaycare(struct DayCare *daycare) InheritIVs(&egg, daycare); InheritPokeball(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); BuildEggMoveset(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); +#if P_ABILITY_INHERITANCE >= GEN_8 + InheritAbility(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); +#endif GiveMoveIfItem(&egg, daycare); From dc368727ea458463b74aef280a21069e1e442838 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:11:35 +0200 Subject: [PATCH 139/229] remove stupidity for some reason I added the 50% def increase in snow check twice? this removes that --- src/battle_util.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 594d412110..45208c0baf 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9528,9 +9528,6 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); - if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) - MulModifier(&modifier, UQ_4_12(1.5)); - // The defensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 5th badge and 7th badges. // Having the 5th badge boosts physical defense while having the 7th badge boosts special defense. if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerDef) && IS_MOVE_PHYSICAL(move)) From 176c6750aa9ce07d72647dc9487234421626a82d Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sun, 30 Apr 2023 16:02:18 +0200 Subject: [PATCH 140/229] Set new animations as default (#2964) --- include/config/battle.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index d1d4fc52fc..4b3caf4abe 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -197,21 +197,21 @@ #define B_OBEDIENCE_MECHANICS GEN_LATEST // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level // Animation Settings -#define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. -#define B_NEW_LEECH_SEED_PARTICLE FALSE // If set to TRUE, it updates Leech Seed's animation particle. -#define B_NEW_HORN_ATTACK_PARTICLE FALSE // If set to TRUE, it updates Horn Attack's horn particle. +#define B_NEW_SWORD_PARTICLE TRUE // If set to TRUE, it updates Swords Dance's particle. +#define B_NEW_LEECH_SEED_PARTICLE TRUE // If set to TRUE, it updates Leech Seed's animation particle. +#define B_NEW_HORN_ATTACK_PARTICLE TRUE // If set to TRUE, it updates Horn Attack's horn particle. #define B_NEW_ROCKS_PARTICLE TRUE // If set to TRUE, it updates rock particles. -#define B_NEW_LEAF_PARTICLE FALSE // If set to TRUE, it updates leaf particle. -#define B_NEW_EMBER_PARTICLES FALSE // If set to TRUE, it updates Ember's fire particle. -#define B_NEW_MEAN_LOOK_PARTICLE FALSE // If set to TRUE, it updates Mean Look's eye particle. -#define B_NEW_TEETH_PARTICLE FALSE // If set to TRUE, it updates Bite/Crunch teeth particle. -#define B_NEW_HANDS_FEET_PARTICLE FALSE // If set to TRUE, it updates chop/kick/punch particles. -#define B_NEW_SPIKES_PARTICLE FALSE // If set to TRUE, it updates Spikes particle. -#define B_NEW_FLY_BUBBLE_PARTICLE FALSE // If set to TRUE, it updates Fly's 'bubble' particle. -#define B_NEW_CURSE_NAIL_PARTICLE FALSE // If set to TRUE, it updates Curse's nail. -#define B_NEW_BATON_PASS_BALL_PARTICLE FALSE // If set to TRUE, it updates Baton Pass' Poké Ball sprite. -#define B_NEW_MORNING_SUN_STAR_PARTICLE FALSE // If set to TRUE, it updates Morning Sun's star particles. -#define B_NEW_IMPACT_PALETTE FALSE // If set to TRUE, it updates the basic 'hit' palette. -#define B_NEW_SURF_PARTICLE_PALETTE FALSE // If set to TRUE, it updates Surf's wave palette. +#define B_NEW_LEAF_PARTICLE TRUE // If set to TRUE, it updates leaf particle. +#define B_NEW_EMBER_PARTICLES TRUE // If set to TRUE, it updates Ember's fire particle. +#define B_NEW_MEAN_LOOK_PARTICLE TRUE // If set to TRUE, it updates Mean Look's eye particle. +#define B_NEW_TEETH_PARTICLE TRUE // If set to TRUE, it updates Bite/Crunch teeth particle. +#define B_NEW_HANDS_FEET_PARTICLE TRUE // If set to TRUE, it updates chop/kick/punch particles. +#define B_NEW_SPIKES_PARTICLE TRUE // If set to TRUE, it updates Spikes particle. +#define B_NEW_FLY_BUBBLE_PARTICLE TRUE // If set to TRUE, it updates Fly's 'bubble' particle. +#define B_NEW_CURSE_NAIL_PARTICLE TRUE // If set to TRUE, it updates Curse's nail. +#define B_NEW_BATON_PASS_BALL_PARTICLE TRUE // If set to TRUE, it updates Baton Pass' Poké Ball sprite. +#define B_NEW_MORNING_SUN_STAR_PARTICLE TRUE // If set to TRUE, it updates Morning Sun's star particles. +#define B_NEW_IMPACT_PALETTE TRUE // If set to TRUE, it updates the basic 'hit' palette. +#define B_NEW_SURF_PARTICLE_PALETTE TRUE // If set to TRUE, it updates Surf's wave palette. #endif // GUARD_CONFIG_BATTLE_H From 2d6282fece6327275b26e8697cc0f949d94a2c2f Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sun, 30 Apr 2023 16:46:21 +0200 Subject: [PATCH 141/229] Fix for Burn Up/Double Shock (#2962) --- data/battle_scripts_1.s | 10 ++++--- test/move_effect_burn_up.c | 53 +++++++++++++++++++++++++++++++++ test/move_effect_double_shock.c | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 test/move_effect_burn_up.c create mode 100644 test/move_effect_double_shock.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index be20f6809d..42219c7ee2 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1444,8 +1444,9 @@ BattleScript_EffectBurnUp: goto BattleScript_ButItFailed BattleScript_BurnUpWorks: - setmoveeffect MOVE_EFFECT_BURN_UP | MOVE_EFFECT_CERTAIN - goto BattleScript_EffectHit + setmoveeffect MOVE_EFFECT_BURN_UP | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN + accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE + goto BattleScript_HitFromCritCalc BattleScript_BurnUpRemoveType:: losetype BS_ATTACKER, TYPE_FIRE @@ -1461,8 +1462,9 @@ BattleScript_EffectDoubleShock: goto BattleScript_ButItFailed BattleScript_DoubleShockWorks: - setmoveeffect MOVE_EFFECT_DOUBLE_SHOCK | MOVE_EFFECT_CERTAIN - goto BattleScript_EffectHit + setmoveeffect MOVE_EFFECT_DOUBLE_SHOCK | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN + accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE + goto BattleScript_HitFromCritCalc BattleScript_DoubleShockRemoveType:: losetype BS_ATTACKER, TYPE_ELECTRIC diff --git a/test/move_effect_burn_up.c b/test/move_effect_burn_up.c new file mode 100644 index 0000000000..a53b1afa86 --- /dev/null +++ b/test/move_effect_burn_up.c @@ -0,0 +1,53 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_BURN_UP].effect == EFFECT_BURN_UP); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_FIRE || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_CYNDAQUIL].types[0] == TYPE_FIRE || gSpeciesInfo[SPECIES_CYNDAQUIL].types[1] == TYPE_FIRE); +} + +SINGLE_BATTLE_TEST("Burn Up user loses its Fire-type") +{ + GIVEN { + PLAYER(SPECIES_CYNDAQUIL); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BURN_UP); } + TURN { MOVE(player, MOVE_BURN_UP); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); + MESSAGE("Cyndaquil burned itself out!"); + MESSAGE("Cyndaquil used Burn Up!"); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Burn Up fails if the user isn't a Fire-type") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BURN_UP); } + } SCENE { + NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); } + MESSAGE("Wobbuffet used Burn Up!"); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Burn Up user loses its Fire-type if enemy faints") +{ + GIVEN { + PLAYER(SPECIES_CYNDAQUIL); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + } WHEN { + TURN { MOVE(player, MOVE_BURN_UP); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); + HP_BAR(opponent, hp: 0); + MESSAGE("Cyndaquil burned itself out!"); + } +} diff --git a/test/move_effect_double_shock.c b/test/move_effect_double_shock.c new file mode 100644 index 0000000000..c3651c4034 --- /dev/null +++ b/test/move_effect_double_shock.c @@ -0,0 +1,53 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_DOUBLE_SHOCK].effect == EFFECT_DOUBLE_SHOCK); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ELECTRIC || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ELECTRIC); + ASSUME(gSpeciesInfo[SPECIES_PIKACHU].types[0] == TYPE_ELECTRIC || gSpeciesInfo[SPECIES_PIKACHU].types[1] == TYPE_ELECTRIC); +} + +SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type") +{ + GIVEN { + PLAYER(SPECIES_PIKACHU); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } + TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); + MESSAGE("Pikachu used up all of its electricity!"); + MESSAGE("Pikachu used Double Shock!"); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Double Shock fails if the user isn't an Electric-type") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } + } SCENE { + NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); } + MESSAGE("Wobbuffet used Double Shock!"); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type if enemy faints") +{ + GIVEN { + PLAYER(SPECIES_PIKACHU); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + } WHEN { + TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); + HP_BAR(opponent, hp: 0); + MESSAGE("Pikachu used up all of its electricity!"); + } +} From 47cd903fdecc3d2636a30479fa698de720a5650d Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sun, 30 Apr 2023 18:02:41 +0200 Subject: [PATCH 142/229] update dire hit failing comment --- test/item_effect_set_focus_energy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/item_effect_set_focus_energy.c b/test/item_effect_set_focus_energy.c index 72e90d610b..19093e739a 100644 --- a/test/item_effect_set_focus_energy.c +++ b/test/item_effect_set_focus_energy.c @@ -3,7 +3,10 @@ SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stages") { - KNOWN_FAILING; // Displays Message "Foe Wobbuffet used Dire Hit.." when facing off against Wobbuffet. Doesnt happen against other species? + /* KNOWN_FAILING due to message mismatch for "Wobbuffet used Dire Hit to get pumped!" + * As of the time of writing, this test passes if the above mentioned message is removed + * For more details refer to description of PR #2940 */ + KNOWN_FAILING; ASSUME(B_CRIT_CHANCE >= GEN_7); PASSES_RANDOMLY(1, 2, RNG_CRITICAL_HIT); GIVEN { From f1d60a4a04b13882c91ef2b5a0496119675e246b Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 30 Apr 2023 22:52:37 +0200 Subject: [PATCH 143/229] Fixed wrong generation in check --- src/daycare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daycare.c b/src/daycare.c index 08b9ec23fc..31a7bade05 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1029,7 +1029,7 @@ static void _GiveEggFromDaycare(struct DayCare *daycare) InheritIVs(&egg, daycare); InheritPokeball(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); BuildEggMoveset(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); -#if P_ABILITY_INHERITANCE >= GEN_8 +#if P_ABILITY_INHERITANCE >= GEN_6 InheritAbility(&egg, &daycare->mons[parentSlots[1]].mon, &daycare->mons[parentSlots[0]].mon); #endif From 772c50408cf93957f545855c8ca9d8a660f64f84 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sun, 30 Apr 2023 23:22:51 +0200 Subject: [PATCH 144/229] remove identifier strings no longer needed since testing is done. --- test/item_effect_cure_status.c | 34 ++++++++++++++++---------------- test/item_effect_increase_stat.c | 22 ++++++++++----------- test/item_effect_restore_hp.c | 26 ++++++++++++------------ test/item_effect_restore_pp.c | 8 ++++---- test/item_effect_revive.c | 8 ++++---- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 949f60f0e4..1f7c9d7a23 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paralyzed") +SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -16,7 +16,7 @@ SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paraly } } -SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") +SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") } } -SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poisoned") +SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned") { GIVEN { ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -46,7 +46,7 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poiso } } -SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") +SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep") { GIVEN { ASSUME(gItems[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -61,7 +61,7 @@ SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") } } -SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") +SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned") { GIVEN { ASSUME(gItems[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -76,7 +76,7 @@ SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") } } -SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") +SINGLE_BATTLE_TEST("Ice Heal heals a battler from being paralyzed") { GIVEN { ASSUME(gItems[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS); @@ -91,7 +91,7 @@ SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") } } -SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary status") +SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -113,7 +113,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat } } -SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary status") +SINGLE_BATTLE_TEST("Heal Powder heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -135,7 +135,7 @@ SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary st } } -SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any primary status") +SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -157,7 +157,7 @@ SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any prima } } -SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary status") +SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -179,7 +179,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary s } } -SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary status") +SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -201,7 +201,7 @@ SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary } } -SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary status") +SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -223,7 +223,7 @@ SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary stat } } -SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary status") +SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -245,7 +245,7 @@ SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary s } } -SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primary status") +SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -267,7 +267,7 @@ SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primar } } -SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary status") +SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -289,7 +289,7 @@ SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary } } -SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary status") +SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status") { u16 status; PARAMETRIZE{ status = STATUS1_BURN; } @@ -311,7 +311,7 @@ SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary s } } -SINGLE_BATTLE_TEST("Cure Status: Full Heal, Heal Powder and Local Specialties heal a battler from being confused") +SINGLE_BATTLE_TEST("Full Heal, Heal Powder and Local Specialties heal a battler from being confused") { u16 item; PARAMETRIZE { item = ITEM_FULL_HEAL; } diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index bb5989207a..bbaf20e2fa 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Increase Stat: X Attack sharply raises battler's Attack stat", s16 damage) +SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -24,7 +24,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Attack sharply raises battler's Attack stat } } -SINGLE_BATTLE_TEST("Increase Stat: X Defense sharply raises battler's Defense stat", s16 damage) +SINGLE_BATTLE_TEST("X Defense sharply raises battler's Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -47,7 +47,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Defense sharply raises battler's Defense st } } -SINGLE_BATTLE_TEST("Increase Stat: X Sp. Atk sharply raises battler's Sp. Attack stat", s16 damage) +SINGLE_BATTLE_TEST("X Sp. Atk sharply raises battler's Sp. Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -70,7 +70,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Sp. Atk sharply raises battler's Sp. Attack } } -SINGLE_BATTLE_TEST("Increase Stat: X Sp. Def sharply raises battler's Sp. Defense stat", s16 damage) +SINGLE_BATTLE_TEST("X Sp. Def sharply raises battler's Sp. Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -93,7 +93,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Sp. Def sharply raises battler's Sp. Defens } } -SINGLE_BATTLE_TEST("Increase Stat: X Speed sharply raises battler's Speed stat", s16 damage) +SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -126,7 +126,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Speed sharply raises battler's Speed stat", } } -SINGLE_BATTLE_TEST("Increase Stat: X Accuracy sharply raises battler's Accuracy stat", s16 damage) +SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 damage) { ASSUME(gBattleMoves[MOVE_SING].accuracy == 55); @@ -147,7 +147,7 @@ SINGLE_BATTLE_TEST("Increase Stat: X Accuracy sharply raises battler's Accuracy } } -SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Attack stat", s16 damage) +SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -167,7 +167,7 @@ SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Attack stat", } } -SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Defense stat", s16 damage) +SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -187,7 +187,7 @@ SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Defense stat", } } -SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Sp. Attack stat", s16 damage) +SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Sp. Attack stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -207,7 +207,7 @@ SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Sp. Attack sta } } -SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms battler's Sp. Defense stat", s16 damage) +SINGLE_BATTLE_TEST("Max Mushrooms battler's Sp. Defense stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } @@ -227,7 +227,7 @@ SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms battler's Sp. Defense stat", s1 } } -SINGLE_BATTLE_TEST("Increase Stat: Max Mushrooms raises battler's Speed stat", s16 damage) +SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Speed stat", s16 damage) { u16 useItem; PARAMETRIZE { useItem = FALSE; } diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index 4572a0d8be..4662e9f25c 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -4,7 +4,7 @@ #define TEST_HP 1 #define MAX_HP 400 -SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") +SINGLE_BATTLE_TEST("Potion restores a battler's HP by 20") { GIVEN { ASSUME(gItems[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -17,7 +17,7 @@ SINGLE_BATTLE_TEST("Restore HP: Potion restores a battler's HP by 20") } } -SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 60") +SINGLE_BATTLE_TEST("Super Potion restores a battler's HP by 60") { GIVEN { ASSUME(gItems[ITEM_SUPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -30,7 +30,7 @@ SINGLE_BATTLE_TEST("Restore HP: Super Potion restores a battler's HP by 60") } } -SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 120") +SINGLE_BATTLE_TEST("Hyper Potion restores a battler's HP by 120") { GIVEN { ASSUME(gItems[ITEM_HYPER_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -43,7 +43,7 @@ SINGLE_BATTLE_TEST("Restore HP: Hyper Potion restores a battler's HP by 120") } } -SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") +SINGLE_BATTLE_TEST("Max Potion restores a battler's HP fully") { GIVEN { ASSUME(gItems[ITEM_MAX_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -56,7 +56,7 @@ SINGLE_BATTLE_TEST("Restore HP: Max Potion restores a battler's HP fully") } } -SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") +SINGLE_BATTLE_TEST("Fresh Water restores a battler's HP by 30") { GIVEN { ASSUME(gItems[ITEM_FRESH_WATER].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -69,7 +69,7 @@ SINGLE_BATTLE_TEST("Restore HP: Fresh Water restores a battler's HP by 30") } } -SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") +SINGLE_BATTLE_TEST("Soda Pop restores a battler's HP by 50") { GIVEN { ASSUME(gItems[ITEM_SODA_POP].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -82,7 +82,7 @@ SINGLE_BATTLE_TEST("Restore HP: Soda Pop restores a battler's HP by 50") } } -SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") +SINGLE_BATTLE_TEST("Lemonade restores a battler's HP by 70") { GIVEN { ASSUME(gItems[ITEM_LEMONADE].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -95,7 +95,7 @@ SINGLE_BATTLE_TEST("Restore HP: Lemonade restores a battler's HP by 70") } } -SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") +SINGLE_BATTLE_TEST("Moomoo Milk restores a battler's HP by 100") { GIVEN { ASSUME(gItems[ITEM_MOOMOO_MILK].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -108,7 +108,7 @@ SINGLE_BATTLE_TEST("Restore HP: Moomoo Milk restores a battler's HP by 100") } } -SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)") +SINGLE_BATTLE_TEST("Energy Powder restores a battler's HP by 60(50)") { GIVEN { ASSUME(gItems[ITEM_ENERGY_POWDER].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -124,7 +124,7 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Powder restores a battler's HP by 60(50)" } } -SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)") +SINGLE_BATTLE_TEST("Energy Root restores a battler's HP by 120(200)") { GIVEN { ASSUME(gItems[ITEM_ENERGY_ROOT].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -140,7 +140,7 @@ SINGLE_BATTLE_TEST("Restore HP: Energy Root restores a battler's HP by 120(200)" } } -SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") +SINGLE_BATTLE_TEST("Sweet Heart restores a battler's HP by 20") { GIVEN { ASSUME(gItems[ITEM_SWEET_HEART].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -153,7 +153,7 @@ SINGLE_BATTLE_TEST("Restore HP: Sweet Heart restores a battler's HP by 20") } } -SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") +SINGLE_BATTLE_TEST("Oran Berry restores a battler's HP by 10") { GIVEN { ASSUME(gItems[ITEM_ORAN_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); @@ -166,7 +166,7 @@ SINGLE_BATTLE_TEST("Restore HP: Oran Berry restores a battler's HP by 10") } } -SINGLE_BATTLE_TEST("Restore HP: Sitrus Berry restores a battler's HP by 25% of its max HP(30HP flat)") +SINGLE_BATTLE_TEST("Sitrus Berry restores a battler's HP by 25% of its max HP(30HP flat)") { GIVEN { ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); diff --git a/test/item_effect_restore_pp.c b/test/item_effect_restore_pp.c index f21593566f..7194efbbb5 100644 --- a/test/item_effect_restore_pp.c +++ b/test/item_effect_restore_pp.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Restore PP: Ether restores the PP of one of a battler's moves by 10 ") +SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves by 10 ") { GIVEN { ASSUME(gItems[ITEM_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP); @@ -16,7 +16,7 @@ SINGLE_BATTLE_TEST("Restore PP: Ether restores the PP of one of a battler's move } } -SINGLE_BATTLE_TEST("Restore PP: Max Ether restores the PP of one of a battler's moves fully") +SINGLE_BATTLE_TEST("Max Ether restores the PP of one of a battler's moves fully") { GIVEN { ASSUME(gItems[ITEM_MAX_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP); @@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Restore PP: Max Ether restores the PP of one of a battler's } } -SINGLE_BATTLE_TEST("Restore PP: Elixir restores the PP of all of a battler's moves by 10") +SINGLE_BATTLE_TEST("Elixir restores the PP of all of a battler's moves by 10") { GIVEN { ASSUME(gItems[ITEM_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP); @@ -48,7 +48,7 @@ SINGLE_BATTLE_TEST("Restore PP: Elixir restores the PP of all of a battler's mov } } -SINGLE_BATTLE_TEST("Restore PP: Max Elixir restores the PP of all of a battler's moves fully") +SINGLE_BATTLE_TEST("Max Elixir restores the PP of all of a battler's moves fully") { GIVEN { ASSUME(gItems[ITEM_MAX_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP); diff --git a/test/item_effect_revive.c b/test/item_effect_revive.c index 3c6995176e..77423fff1b 100644 --- a/test/item_effect_revive.c +++ b/test/item_effect_revive.c @@ -3,7 +3,7 @@ #define MAX_HP 200 -SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") +SINGLE_BATTLE_TEST("Revive restores a fainted battler's HP to half") { GIVEN { ASSUME(gItems[ITEM_REVIVE].battleUsage == EFFECT_ITEM_REVIVE); @@ -21,7 +21,7 @@ SINGLE_BATTLE_TEST("Revive: Revive restores a fainted battler's HP to half") } } -SINGLE_BATTLE_TEST("Revive: Max Revive restores a fainted battler's HP fully") +SINGLE_BATTLE_TEST("Max Revive restores a fainted battler's HP fully") { GIVEN { ASSUME(gItems[ITEM_MAX_REVIVE].battleUsage == EFFECT_ITEM_REVIVE); @@ -39,7 +39,7 @@ SINGLE_BATTLE_TEST("Revive: Max Revive restores a fainted battler's HP fully") } } -SINGLE_BATTLE_TEST("Revive: Revival Herb restores a fainted battler's HP fully") +SINGLE_BATTLE_TEST("Revival Herb restores a fainted battler's HP fully") { GIVEN { ASSUME(gItems[ITEM_REVIVAL_HERB].battleUsage == EFFECT_ITEM_REVIVE); @@ -57,7 +57,7 @@ SINGLE_BATTLE_TEST("Revive: Revival Herb restores a fainted battler's HP fully") } } -SINGLE_BATTLE_TEST("Revive: Max Honey restores a fainted battler's HP fully") +SINGLE_BATTLE_TEST("Max Honey restores a fainted battler's HP fully") { GIVEN { ASSUME(gItems[ITEM_MAX_HONEY].battleUsage == EFFECT_ITEM_REVIVE); From 32e63d8cc7bae997c2dc520a27a17ee18984b285 Mon Sep 17 00:00:00 2001 From: Ultimate_Bob Date: Mon, 1 May 2023 11:15:03 +1000 Subject: [PATCH 145/229] Don't copy opponent personality when swapping mon sprite during Mega Evolution (#2852) Co-authored-by: Eduardo Quezada D'Ottone --- data/battle_anim_scripts.s | 14 +++++----- include/battle.h | 2 ++ include/battle_gfx_sfx_util.h | 2 +- include/config/battle.h | 1 + src/battle_anim_effects_3.c | 4 ++- src/battle_controller_link_opponent.c | 1 + src/battle_controller_link_partner.c | 1 + src/battle_controller_opponent.c | 1 + src/battle_controller_player.c | 1 + src/battle_controller_player_partner.c | 1 + src/battle_controller_recorded_opponent.c | 1 + src/battle_controller_recorded_player.c | 1 + src/battle_controller_wally.c | 1 + src/battle_gfx_sfx_util.c | 34 +++++++++++++++++++---- src/battle_main.c | 1 + src/battle_script_commands.c | 1 + 16 files changed, 53 insertions(+), 14 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index adcb88c881..dcfdac88ed 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -22317,7 +22317,7 @@ Move_TRANSFORM: monbg ANIM_ATTACKER playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER waitplaysewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER, 48 - createvisualtask AnimTask_TransformMon, 2, 0, 0 + createvisualtask AnimTask_TransformMon, 2, 0, 0, 1 waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -24406,7 +24406,7 @@ WeatherFormChangeContinue: monbg ANIM_ATTACKER playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER waitplaysewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER, 48 - createvisualtask AnimTask_TransformMon, 2, 1, 0 + createvisualtask AnimTask_TransformMon, 2, 1, 0, 0 waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -24829,14 +24829,14 @@ General_WishHeal: General_IllusionOff: monbg ANIM_TARGET - createvisualtask AnimTask_TransformMon, 2, 0, 1 + createvisualtask AnimTask_TransformMon, 2, 0, 1, 0 waitforvisualfinish clearmonbg ANIM_TARGET end General_FormChange: monbg ANIM_ATTACKER - createvisualtask AnimTask_TransformMon, 2, 0, 1 + createvisualtask AnimTask_TransformMon, 2, 0, 1, 0 waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -24865,7 +24865,7 @@ General_MegaEvolution: delay 20 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish - createvisualtask AnimTask_TransformMon, 2, 0, 1 + createvisualtask AnimTask_TransformMon, 2, 0, 1, 0 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish @@ -25011,7 +25011,7 @@ General_PrimalReversion_Alpha: delay 20 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish - createvisualtask AnimTask_TransformMon, 2, 0, 1 + createvisualtask AnimTask_TransformMon, 2, 0, 1, 0 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish @@ -25038,7 +25038,7 @@ General_PrimalReversion_Omega: delay 20 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish - createvisualtask AnimTask_TransformMon, 2, 0, 1 + createvisualtask AnimTask_TransformMon, 2, 0, 1, 0 createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish diff --git a/include/battle.h b/include/battle.h index 4ba3cba6e3..35c3525b81 100644 --- a/include/battle.h +++ b/include/battle.h @@ -62,6 +62,7 @@ struct ResourceFlags struct DisableStruct { u32 transformedMonPersonality; + u32 transformedMonOtId; u16 disabledMove; u16 encoredMove; u8 protectUses; @@ -976,6 +977,7 @@ extern u8 gBattlerStatusSummaryTaskId[MAX_BATTLERS_COUNT]; extern u8 gBattlerInMenuId; extern bool8 gDoingBattleAnim; extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; +extern u32 gTransformedOtIds[MAX_BATTLERS_COUNT]; extern u8 gPlayerDpadHoldFrames; extern struct BattleSpriteData *gBattleSpritesDataPtr; extern struct MonSpritesGfx *gMonSpritesGfxPtr; diff --git a/include/battle_gfx_sfx_util.h b/include/battle_gfx_sfx_util.h index 491d5fefd1..9a0b79c313 100644 --- a/include/battle_gfx_sfx_util.h +++ b/include/battle_gfx_sfx_util.h @@ -23,7 +23,7 @@ bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId); void ClearSpritesHealthboxAnimData(void); void CopyAllBattleSpritesInvisibilities(void); void CopyBattleSpriteInvisibility(u8 battlerId); -void HandleSpeciesGfxDataChange(u8 attacker, u8 target, bool8 notTransform, bool32 megaEvo, bool8 trackEnemyPersonality); +void HandleSpeciesGfxDataChange(u8 attacker, u8 target, bool8 castform, bool32 megaEvo, bool8 trackEnemyPersonality); void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite); void LoadBattleMonGfxAndAnimate(u8 battlerId, bool8 loadMonSprite, u8 spriteId); void TrySetBehindSubstituteSpriteBit(u8 battlerId, u16 move); diff --git a/include/config/battle.h b/include/config/battle.h index 4b3caf4abe..4861d046ca 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -99,6 +99,7 @@ // Additionally, in gen8+ the Healing Wish's effect will be stored until the user switches into a statused or hurt mon. #define B_DEFOG_CLEARS_TERRAIN GEN_LATEST // In Gen8+, Defog also clears active Terrain. #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. +#define B_TRANSFORM_SHINY GEN_LATEST // In Gen4+, Transform will copy the shiny state of the opponent instead of maintaining its own shiny state. #define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. // Ability settings diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index ff5f044464..7d449c767e 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2350,6 +2350,8 @@ void AnimTask_TransformMon(u8 taskId) SetAnimBgAttribute(2, BG_ANIM_MOSAIC, 1); gTasks[taskId].data[10] = gBattleAnimArgs[0]; + gTasks[taskId].data[11] = gBattleAnimArgs[1]; + gTasks[taskId].data[12] = gBattleAnimArgs[2]; gTasks[taskId].data[0]++; break; case 1: @@ -2364,7 +2366,7 @@ void AnimTask_TransformMon(u8 taskId) } break; case 2: - HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, gTasks[taskId].data[10], gBattleAnimArgs[1], TRUE); + HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, gTasks[taskId].data[10], gTasks[taskId].data[11], gTasks[taskId].data[12]); GetBgDataForTransform(&animBg, gBattleAnimAttacker); if (IsContest()) diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 908363907b..b4936da5c2 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1395,6 +1395,7 @@ static void LinkOpponentHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = LinkOpponentDoMoveAnimation; BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 1ef5d63555..d07a92e93f 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -1232,6 +1232,7 @@ static void LinkPartnerHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = LinkPartnerDoMoveAnimation; BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 4eda81b094..c3e4a90374 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1470,6 +1470,7 @@ static void OpponentHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = OpponentDoMoveAnimation; } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 1065994164..b9eb566c02 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -2709,6 +2709,7 @@ static void PlayerHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = PlayerDoMoveAnimation; BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 4c54b68aa3..b94d5347aa 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -1433,6 +1433,7 @@ static void PlayerPartnerHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = PlayerPartnerDoMoveAnimation; } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index e7fc6fd84a..ea98820547 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1327,6 +1327,7 @@ static void RecordedOpponentHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = RecordedOpponentDoMoveAnimation; } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 87f5758399..8957b285ab 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1335,6 +1335,7 @@ static void RecordedPlayerHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = RecordedPlayerDoMoveAnimation; } diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index ae20c54ecf..fa1fa00fb2 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -1115,6 +1115,7 @@ static void WallyHandleMoveAnimation(void) gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8); gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16]; gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality; + gTransformedOtIds[gActiveBattler] = gAnimDisableStructPtr->transformedMonOtId; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = WallyDoMoveAnimation; } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index bc541f0a01..d926494a8d 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -551,7 +551,7 @@ bool8 IsBattleSEPlaying(u8 battlerId) static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 opponent) { - u32 monsPersonality, currentPersonality, otId, species, paletteOffset, position; + u32 monsPersonality, currentPersonality, otId, currentOtId, species, paletteOffset, position; const void *lzPaletteData; struct Pokemon *illusionMon = GetIllusionMonPtr(battlerId); if (illusionMon != NULL) @@ -561,18 +561,26 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op return; monsPersonality = GetMonData(mon, MON_DATA_PERSONALITY); + otId = GetMonData(mon, MON_DATA_OT_ID); + if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE) { species = GetMonData(mon, MON_DATA_SPECIES); currentPersonality = monsPersonality; + currentOtId = otId; } else { species = gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies; - currentPersonality = gTransformedPersonalities[battlerId]; + #if B_TRANSFORM_SHINY >= GEN_4 + currentPersonality = gTransformedPersonalities[battlerId]; + currentOtId = gTransformedOtIds[battlerId]; + #else + currentPersonality = monsPersonality; + currentOtId = otId; + #endif } - otId = GetMonData(mon, MON_DATA_OT_ID); position = GetBattlerPosition(battlerId); if (opponent) { @@ -592,7 +600,7 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE) lzPaletteData = GetMonFrontSpritePal(mon); else - lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality); + lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, currentOtId, currentPersonality); LZDecompressWram(lzPaletteData, gDecompressionBuffer); LoadPalette(gDecompressionBuffer, paletteOffset, PLTT_SIZE_4BPP); @@ -880,10 +888,18 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo if (GetBattlerSide(battlerAtk) == B_SIDE_PLAYER) { + #if B_TRANSFORM_SHINY >= GEN_4 if (trackEnemyPersonality) + { personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); + otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); + } else + #endif + { personalityValue = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); + otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); + } otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); HandleLoadSpecialPokePic(FALSE, @@ -893,11 +909,19 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo } else { + #if B_TRANSFORM_SHINY >= GEN_4 if (trackEnemyPersonality) + { personalityValue = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); + otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); + + } else + #endif + { personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); - otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); + otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); + } HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[position], diff --git a/src/battle_main.c b/src/battle_main.c index e59653f313..91d5c3aa50 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -226,6 +226,7 @@ EWRAM_DATA u8 gBattlerStatusSummaryTaskId[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA u8 gBattlerInMenuId = 0; EWRAM_DATA bool8 gDoingBattleAnim = FALSE; EWRAM_DATA u32 gTransformedPersonalities[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA u32 gTransformedOtIds[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA u8 gPlayerDpadHoldFrames = 0; EWRAM_DATA struct BattleSpriteData *gBattleSpritesDataPtr = NULL; EWRAM_DATA struct MonSpritesGfx *gMonSpritesGfxPtr = NULL; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index aead0fe3c2..cdc8cfa904 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12881,6 +12881,7 @@ static void Cmd_transformdataexecution(void) gDisableStructs[gBattlerAttacker].disabledMove = MOVE_NONE; gDisableStructs[gBattlerAttacker].disableTimer = 0; gDisableStructs[gBattlerAttacker].transformedMonPersonality = gBattleMons[gBattlerTarget].personality; + gDisableStructs[gBattlerAttacker].transformedMonOtId = gBattleMons[gBattlerTarget].otId; gDisableStructs[gBattlerAttacker].mimickedMoves = 0; gDisableStructs[gBattlerAttacker].usedMoves = 0; From 8e5347b450f4b655cc58a783de70e14b0fd115e1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 21 Apr 2023 03:20:36 -0400 Subject: [PATCH 146/229] Fix mapjson misreporting errors when processing map_groups.json --- tools/mapjson/mapjson.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index cfe95c485a..e53ac7924d 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -75,6 +75,9 @@ string json_to_string(const Json &data, const string &field = "", bool silent = case Json::Type::BOOL: output = value.bool_value() ? "TRUE" : "FALSE"; break; + case Json::Type::NUL: + output = ""; + break; default:{ if (!silent) { string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; @@ -459,23 +462,24 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) { for (auto &group : groups_data["group_order"].array_items()) { string groupName = json_to_string(group); text << "// " << groupName << "\n"; - vector map_ids; + vector map_ids; size_t max_length = 0; for (auto &map_name : groups_data[groupName].array_items()) { - string header_filepath = file_dir + json_to_string(map_name) + dir_separator + "map.json"; + string map_filepath = file_dir + json_to_string(map_name) + dir_separator + "map.json"; string err_str; - Json map_data = Json::parse(read_text_file(header_filepath), err_str); - map_ids.push_back(map_data["id"]); - string id = json_to_string(map_data, "id"); + Json map_data = Json::parse(read_text_file(map_filepath), err_str); + if (map_data == Json()) + FATAL_ERROR("%s: %s\n", map_filepath.c_str(), err_str.c_str()); + string id = json_to_string(map_data, "id", true); + map_ids.push_back(id); if (id.length() > max_length) max_length = id.length(); } int map_id_num = 0; - for (Json map_id : map_ids) { - string id = json_to_string(map_id); - text << "#define " << id << string((max_length - id.length() + 1), ' ') + for (string map_id : map_ids) { + text << "#define " << map_id << string((max_length - map_id.length() + 1), ' ') << "(" << map_id_num++ << " | (" << group_num << " << 8))\n"; } text << "\n"; From 39b50d09dd9c18da8a0a81da355565338943c031 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Mon, 1 May 2023 11:19:10 +0200 Subject: [PATCH 147/229] Add missing CanGetFrostbite --- include/battle_util.h | 1 + src/battle_script_commands.c | 2 +- src/battle_util.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/battle_util.h b/include/battle_util.h index b83209a697..2644ca64a9 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -228,6 +228,7 @@ bool32 CanBePoisoned(u8 battlerAttacker, u8 battlerTarget); bool32 CanBeBurned(u8 battlerId); bool32 CanBeParalyzed(u8 battlerId); bool32 CanBeFrozen(u8 battlerId); +bool32 CanGetFrostbite(u8 battlerId); bool32 CanBeConfused(u8 battlerId); bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag); u32 GetBattlerFriendshipScore(u8 battlerId); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index fecea28927..d81b3575dd 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3212,7 +3212,7 @@ void SetMoveEffect(bool32 primary, u32 certain) } break; case STATUS1_FROSTBITE: - if (!CanBeFrozen(gEffectBattler)) + if (!CanGetFrostbite(gEffectBattler)) break; statusChanged = TRUE; diff --git a/src/battle_util.c b/src/battle_util.c index 98b0b6744f..aa3c1ecac8 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6507,6 +6507,20 @@ bool32 CanBeFrozen(u8 battlerId) return TRUE; } +bool32 CanGetFrostbite(u8 battlerId) +{ + u16 ability = GetBattlerAbility(battlerId); + if (IS_BATTLER_OF_TYPE(battlerId, TYPE_ICE) + || gSideStatuses[GetBattlerSide(battlerId)] & SIDE_STATUS_SAFEGUARD + || ability == ABILITY_MAGMA_ARMOR + || ability == ABILITY_COMATOSE + || gBattleMons[battlerId].status1 & STATUS1_ANY + || IsAbilityStatusProtected(battlerId) + || IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN)) + return FALSE; + return TRUE; +} + bool32 CanBeConfused(u8 battlerId) { if (GetBattlerAbility(battlerId) == ABILITY_OWN_TEMPO From dd96ac0c4ff3c45c6c29caab6d6e6e38b6971d8d Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Mon, 1 May 2023 15:35:05 +0200 Subject: [PATCH 148/229] Add Comatose check to AI "can be Xed" status checks --- src/battle_ai_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 09815519af..f5cef9d903 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2766,6 +2766,7 @@ bool32 AI_CanSleep(u8 battler, u16 ability) { if (ability == ABILITY_INSOMNIA || ability == ABILITY_VITAL_SPIRIT + || ability == ABILITY_COMATOSE || gBattleMons[battler].status1 & STATUS1_ANY || gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_SAFEGUARD || (gFieldStatuses & (STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN)) @@ -2839,6 +2840,7 @@ bool32 AI_CanPoison(u8 battlerAtk, u8 battlerDef, u16 defAbility, u16 move, u16 static bool32 AI_CanBeParalyzed(u8 battler, u16 ability) { if (ability == ABILITY_LIMBER + || ability == ABILITY_COMATOSE || IS_BATTLER_OF_TYPE(battler, TYPE_ELECTRIC) || gBattleMons[battler].status1 & STATUS1_ANY || IsAbilityStatusProtected(battler)) @@ -2884,6 +2886,7 @@ bool32 AI_CanBeBurned(u8 battler, u16 ability) { if (ability == ABILITY_WATER_VEIL || ability == ABILITY_WATER_BUBBLE + || ability == ABILITY_COMATOSE || IS_BATTLER_OF_TYPE(battler, TYPE_FIRE) || gBattleMons[battler].status1 & STATUS1_ANY || IsAbilityStatusProtected(battler) @@ -2895,6 +2898,7 @@ bool32 AI_CanBeBurned(u8 battler, u16 ability) bool32 AI_CanGetFrostbite(u8 battler, u16 ability) { if (ability == ABILITY_MAGMA_ARMOR + || ability == ABILITY_COMATOSE || IS_BATTLER_OF_TYPE(battler, TYPE_ICE) || gBattleMons[battler].status1 & STATUS1_ANY || IsAbilityStatusProtected(battler) From 15ce9eb71cde27b9142bb20c067fef19333ca852 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Mon, 1 May 2023 18:53:06 +0200 Subject: [PATCH 149/229] fix dire hit message mismatch --- src/battle_message.c | 2 +- test/item_effect_set_focus_energy.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 21f7098f81..cf42176a1b 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -260,7 +260,7 @@ static const u8 sText_XFoundOneY[] = _("{B_ATK_NAME_WITH_PREFIX} found\none {B_L static const u8 sText_SoothingAroma[] = _("A soothing aroma wafted\nthrough the area!"); static const u8 sText_ItemsCantBeUsedNow[] = _("Items can't be used now.{PAUSE 64}"); static const u8 sText_ForXCommaYZ[] = _("For {B_SCR_ACTIVE_NAME_WITH_PREFIX},\n{B_LAST_ITEM} {B_BUFF1}"); -static const u8 sText_PkmnUsedXToGetPumped[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} used\n{B_LAST_ITEM} to get pumped!"); +static const u8 sText_PkmnUsedXToGetPumped[] = _("{B_ACTIVE_NAME_WITH_PREFIX} used\n{B_LAST_ITEM} to get pumped!"); static const u8 sText_PkmnLostFocus[] = _("{B_ATK_NAME_WITH_PREFIX} lost its\nfocus and couldn't move!"); static const u8 sText_PkmnWasDraggedOut[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndragged out!\p"); static const u8 sText_TheWallShattered[] = _("The wall shattered!"); diff --git a/test/item_effect_set_focus_energy.c b/test/item_effect_set_focus_energy.c index 19093e739a..95648465e6 100644 --- a/test/item_effect_set_focus_energy.c +++ b/test/item_effect_set_focus_energy.c @@ -3,10 +3,6 @@ SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stages") { - /* KNOWN_FAILING due to message mismatch for "Wobbuffet used Dire Hit to get pumped!" - * As of the time of writing, this test passes if the above mentioned message is removed - * For more details refer to description of PR #2940 */ - KNOWN_FAILING; ASSUME(B_CRIT_CHANCE >= GEN_7); PASSES_RANDOMLY(1, 2, RNG_CRITICAL_HIT); GIVEN { From bdd0195fe01963e81dfe09c5b8e2368a1d12f0be Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 1 May 2023 17:00:37 -0400 Subject: [PATCH 150/229] add mirror herb tests --- test/hold_effect_mirror_herb.c | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 test/hold_effect_mirror_herb.c diff --git a/test/hold_effect_mirror_herb.c b/test/hold_effect_mirror_herb.c new file mode 100644 index 0000000000..68ea5614b4 --- /dev/null +++ b/test/hold_effect_mirror_herb.c @@ -0,0 +1,51 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB; +}; + +SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage) +{ + u32 item; + PARAMETRIZE{ item = ITEM_NONE; } + PARAMETRIZE{ item = ITEM_MIRROR_HERB; } + GIVEN { + ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); Item(item); } + } WHEN { + TURN { MOVE(player, MOVE_DRAGON_DANCE); } + TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + if (item == ITEM_NONE) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + HP_BAR(player, captureDamage: &results[i].damage); + } else { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + HP_BAR(player, captureDamage: &results[i].damage); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + } + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + EXPECT_EQ(player->statStages[STAT_ATK], opponent->statStages[STAT_ATK]); + EXPECT_EQ(player->statStages[STAT_SPEED], opponent->statStages[STAT_SPEED]); + } +} + +SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks", s16 damage) +{ + GIVEN { + ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); + ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP); + PLAYER(SPECIES_SKWOVET) { Item(ITEM_LIECHI_BERRY); } + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MIRROR_HERB); } + } WHEN { + TURN { MOVE(player, MOVE_STUFF_CHEEKS); } + } THEN { + EXPECT_EQ(player->statStages[STAT_ATK], opponent->statStages[STAT_ATK]); + EXPECT_EQ(player->statStages[STAT_DEF], opponent->statStages[STAT_DEF]); + } +} From 3652e8261a3fa8575c0f54a194d562f5c11f434c Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Mon, 1 May 2023 15:09:20 -0600 Subject: [PATCH 151/229] Apply suggestions from code review Co-authored-by: Salem <65783283+CallmeEchoo@users.noreply.github.com> --- test/hold_effect_mirror_herb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/hold_effect_mirror_herb.c b/test/hold_effect_mirror_herb.c index 68ea5614b4..b1c3c8132b 100644 --- a/test/hold_effect_mirror_herb.c +++ b/test/hold_effect_mirror_herb.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB; + ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); }; SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage) @@ -12,7 +12,6 @@ SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 PARAMETRIZE{ item = ITEM_NONE; } PARAMETRIZE{ item = ITEM_MIRROR_HERB; } GIVEN { - ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_WOBBUFFET) { Speed(5); Item(item); } } WHEN { @@ -38,7 +37,6 @@ SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks", s16 damage) { GIVEN { - ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP); PLAYER(SPECIES_SKWOVET) { Item(ITEM_LIECHI_BERRY); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MIRROR_HERB); } From 63c2e8a7d98b50921bdc1398dfb41bf04326de4e Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 1 May 2023 18:02:21 -0400 Subject: [PATCH 152/229] small mirror herb test synta fix --- test/hold_effect_mirror_herb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hold_effect_mirror_herb.c b/test/hold_effect_mirror_herb.c index b1c3c8132b..fc0a6de957 100644 --- a/test/hold_effect_mirror_herb.c +++ b/test/hold_effect_mirror_herb.c @@ -4,7 +4,7 @@ ASSUMPTIONS { ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB); -}; +} SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage) { From 52cc3bb45ea0c272e8311834114855144b2ec9db Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 16:16:58 +0200 Subject: [PATCH 153/229] add some snow related tests --- include/config/battle.h | 2 +- test/ability_snow_warning.c | 20 +++++ test/weather_snow.c | 159 ++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 test/ability_snow_warning.c create mode 100644 test/weather_snow.c diff --git a/include/config/battle.h b/include/config/battle.h index 0605ad43e5..4be810ed2a 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -118,7 +118,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. -#define B_SNOW_WARNING GEN_9 // In Gen9+, Snow Warning will summon snow instead of hail. +#define B_SNOW_WARNING GEN_LATEST // In Gen9+, Snow Warning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/test/ability_snow_warning.c b/test/ability_snow_warning.c new file mode 100644 index 0000000000..6c0753ad39 --- /dev/null +++ b/test/ability_snow_warning.c @@ -0,0 +1,20 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Snow Warning summons hail(snow)") +{ + GIVEN { + PLAYER(SPECIES_ABOMASNOW) { Ability(ABILITY_SNOW_WARNING); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + #if B_SNOW_WARNING < GEN_9 + MESSAGE("It started to hail!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HAIL_CONTINUES); + #elif B_SNOW_WARNING >= GEN_9 + MESSAGE("It started to snow!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SNOW_CONTINUES); + #endif + } +} diff --git a/test/weather_snow.c b/test/weather_snow.c new file mode 100644 index 0000000000..07afa48d57 --- /dev/null +++ b/test/weather_snow.c @@ -0,0 +1,159 @@ +#include "global.h" +#include "test_battle.h" + +#define TEST_HP 1 +#define MAX_HP 400 + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOW); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); +} + +SINGLE_BATTLE_TEST("Snow increases the defense of Ice types by 50 %", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + PARAMETRIZE{ move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GLALIE); + } WHEN { + TURN { MOVE(opponent, move); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow turns Weather Ball to an Ice-type move and doubles its power", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_WEATHER_BALL].effect == EFFECT_WEATHER_BALL); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_DRAGONAIR); + } WHEN { + TURN { MOVE(player, move); } + TURN { MOVE(player, MOVE_WEATHER_BALL); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(4.0), results[1].damage); // double base power + type effectiveness. + } +} + +SINGLE_BATTLE_TEST("Snow allows Blizzard to bypass accuracy checks") +{ + PASSES_RANDOMLY(100, 100); + GIVEN { + ASSUME(gBattleMoves[MOVE_BLIZZARD].accuracy == 70); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_BLIZZARD); } + } SCENE { + NONE_OF { MESSAGE("Wobbuffet's attack missed!"); } + } +} + +SINGLE_BATTLE_TEST("Snow halves the power of Solar Beam", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SOLAR_BEAM].effect == EFFECT_SOLAR_BEAM); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_SOLAR_BEAM); } + TURN { SKIP_TURN(player); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow halves the power of Solar Blade", s16 damage) +{ + u16 move; + KNOWN_FAILING; // fails bc the bp of solar blade gets rounded up which leads to slightly incorrect calcs down the line + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SOLAR_BLADE].effect == EFFECT_SOLAR_BEAM); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_SOLAR_BLADE); } + TURN { SKIP_TURN(player); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow causes Moonlight to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MOONLIGHT].effect == EFFECT_MOONLIGHT); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MOONLIGHT); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Moonlight to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MOONLIGHT].effect == EFFECT_MOONLIGHT); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MOONLIGHT); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Synthesis to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_SYNTHESIS].effect == EFFECT_SYNTHESIS); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_SYNTHESIS); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Morning Sun to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MORNING_SUN].effect == EFFECT_MORNING_SUN); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MORNING_SUN); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +#undef MAX_HP +#undef TEST_HP \ No newline at end of file From d6f15104a38cc5186b60591c0c747dedf69e4504 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 16:23:31 +0200 Subject: [PATCH 154/229] remove duplicate stringIDs --- include/constants/battle_string_ids.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index f9d55a8a9d..a43ea91ec3 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -655,9 +655,6 @@ #define STRINGID_STARTEDSNOW 653 #define STRINGID_SNOWCONTINUES 654 #define STRINGID_SNOWSTOPPED 655 -#define STRINGID_STARTEDSNOW 653 -#define STRINGID_SNOWCONTINUES 654 -#define STRINGID_SNOWSTOPPED 655 #define STRINGID_SNOWWARNINGSNOW 656 #define BATTLESTRINGS_COUNT 657 From 76721b16f89ca49893471880a68b193836450d09 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sat, 29 Apr 2023 12:30:39 +0200 Subject: [PATCH 155/229] add snow weather --- asm/macros/battle_script.inc | 4 ++ data/battle_anim_scripts.s | 19 ++++++++- data/battle_scripts_1.s | 30 ++++++++++++++- include/battle_ai_util.h | 1 + include/battle_scripts.h | 4 +- include/config/battle.h | 1 + include/constants/battle.h | 6 ++- include/constants/battle_ai.h | 1 + include/constants/battle_anim.h | 2 + include/constants/battle_move_effects.h | 3 +- include/constants/battle_string_ids.h | 11 +++++- src/battle_ai_main.c | 34 ++++++++++++++++- src/battle_ai_util.c | 30 +++++++++++++-- src/battle_anim_effects_3.c | 2 + src/battle_gfx_sfx_util.c | 1 + src/battle_main.c | 4 +- src/battle_message.c | 19 ++++++++- src/battle_script_commands.c | 29 +++++++++++--- src/battle_tv.c | 3 +- src/battle_util.c | 51 +++++++++++++++++++++---- src/data/battle_moves.h | 2 +- 21 files changed, 226 insertions(+), 31 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 78fb914063..bfc81fbb6c 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1346,6 +1346,10 @@ callnative BS_ItemRestorePP .endm + .macro setsnow + callnative BS_SetSnow + .endm + @ various command changed to more readable macros .macro cancelmultiturnmoves battler:req various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index dcfdac88ed..01311c35d1 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -947,6 +947,7 @@ gBattleAnims_General:: .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON + .4byte General_Snow @ B_ANIM_SNOW_CONTINUES .align 2 gBattleAnims_Special:: @@ -14448,7 +14449,19 @@ Move_ELECTRO_DRIFT:: Move_SHED_TAIL:: Move_CHILLY_RECEPTION:: Move_TIDY_UP:: -Move_SNOWSCAPE:: + +@ Also used by Snow weather. Currently identical with Move_HAIL +Move_SNOWSCAPE: + loadspritegfx ANIM_TAG_HAIL + loadspritegfx ANIM_TAG_ICE_CRYSTALS + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK + waitforvisualfinish + createvisualtask AnimTask_Hail, 5 + loopsewithpan SE_M_HAIL, 0, 8, 10 + waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK + end + Move_POUNCE:: Move_TRAILBLAZE:: Move_CHILLING_WATER:: @@ -23924,6 +23937,7 @@ Move_WEATHER_BALL: jumpreteq ANIM_WEATHER_RAIN, WeatherBallWater jumpreteq ANIM_WEATHER_SANDSTORM, WeatherBallSandstorm jumpreteq ANIM_WEATHER_HAIL, WeatherBallIce + jumpreteq ANIM_WEATHER_SNOW, WeatherBallIce WeatherBallNormal: loadspritegfx ANIM_TAG_IMPACT createsprite gWeatherBallNormalDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 @@ -24679,6 +24693,9 @@ General_Sandstorm: General_Hail: goto Move_HAIL +General_Snow: + goto Move_SNOWSCAPE + General_LeechSeedDrain: createvisualtask AnimTask_GetBattlersFromArg, 5 delay 0 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 4f41d154ef..d949e6cf72 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -429,6 +429,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING .4byte BattleScript_EffectFrostbiteHit @ EFFECT_FROSTBITE_HIT + .4byte BattleScript_EffectSnow @ EFFECT_SNOW BattleScript_EffectRevivalBlessing:: attackcanceler @@ -6873,6 +6874,14 @@ BattleScript_DamagingWeatherContinuesEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE end2 +BattleScript_SnowContinuesOrEnds:: + printfromtable gSnowContinuesStringIds + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SNOW_STOPPED, BattleScript_SnowContinuesOrEndsEnd + playanimation BS_ATTACKER, B_ANIM_SNOW_CONTINUES +BattleScript_SnowContinuesOrEndsEnd:: + end2 + BattleScript_SandStormHailEnds:: printfromtable gSandStormHailEndStringIds waitmessage B_WAIT_TIME_LONG @@ -8856,7 +8865,7 @@ BattleScript_MimicryActivates_End3:: waitmessage B_WAIT_TIME_SHORT end3 -BattleScript_SnowWarningActivates:: +BattleScript_SnowWarningActivatesHail:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_SNOWWARNINGHAIL @@ -8865,6 +8874,15 @@ BattleScript_SnowWarningActivates:: call BattleScript_ActivateWeatherAbilities end3 +BattleScript_SnowWarningActivatesSnow:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_SNOWWARNINGSNOW + waitstate + playanimation BS_BATTLER_0, B_ANIM_SNOW_CONTINUES + call BattleScript_WeatherFormChanges + end3 + BattleScript_ActivateTerrainEffects: savetarget setbyte gBattlerTarget, 0 @@ -10450,3 +10468,13 @@ BattleScript_BerserkGeneRet_OwnTempoPrevents: BattleScript_BerserkGeneRet_End: removeitem BS_SCRIPTING end3 + +BattleScript_EffectSnow:: + attackcanceler + attackstring + ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn + setsnow + goto BattleScript_MoveWeatherChange diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 1a0fbc2645..37c9e9c19c 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -112,6 +112,7 @@ bool32 IsEncoreEncouragedEffect(u16 moveEffect); void ProtectChecks(u8 battlerAtk, u8 battlerDef, u16 move, u16 predictedMove, s16 *score); bool32 ShouldSetSandstorm(u8 battler, u16 ability, u16 holdEffect); bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect); +bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect); bool32 ShouldSetRain(u8 battlerAtk, u16 ability, u16 holdEffect); bool32 ShouldSetSun(u8 battlerAtk, u16 atkAbility, u16 holdEffect); bool32 HasSleepMoveWithLowAccuracy(u8 battlerAtk, u8 battlerDef); diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 8cd8606a54..68b3a0c965 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -43,6 +43,7 @@ extern const u8 BattleScript_ActionSwitch[]; extern const u8 BattleScript_Pausex20[]; extern const u8 BattleScript_LevelUp[]; extern const u8 BattleScript_RainContinuesOrEnds[]; +extern const u8 BattleScript_SnowContinuesOrEnds[]; extern const u8 BattleScript_DamagingWeatherContinues[]; extern const u8 BattleScript_SandStormHailEnds[]; extern const u8 BattleScript_SunlightContinues[]; @@ -272,7 +273,8 @@ extern const u8 BattleScript_CursedBodyActivates[]; extern const u8 BattleScript_MummyActivates[]; extern const u8 BattleScript_WeakArmorActivates[]; extern const u8 BattleScript_FellStingerRaisesStat[]; -extern const u8 BattleScript_SnowWarningActivates[]; +extern const u8 BattleScript_SnowWarningActivatesHail[]; +extern const u8 BattleScript_SnowWarningActivatesSnow[]; extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; diff --git a/include/config/battle.h b/include/config/battle.h index da58c8bbf8..1ed337ca35 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -120,6 +120,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. +#define B_SNOW_WARNING GEN_9 // In Gen9+, Snowwarning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/include/constants/battle.h b/include/constants/battle.h index 950d98484f..814d1bfa57 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -288,8 +288,11 @@ #define B_WEATHER_HAIL_PERMANENT (1 << 10) #define B_WEATHER_HAIL (B_WEATHER_HAIL_TEMPORARY | B_WEATHER_HAIL_PERMANENT) #define B_WEATHER_STRONG_WINDS (1 << 11) -#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS) +#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS | B_WEATHER_SNOW) #define B_WEATHER_PRIMAL_ANY (B_WEATHER_RAIN_PRIMAL | B_WEATHER_SUN_PRIMAL | B_WEATHER_STRONG_WINDS) +#define B_WEATHER_SNOW_TEMPORARY (1 << 12) +#define B_WEATHER_SNOW_PERMANENT (1 << 13) +#define B_WEATHER_SNOW (B_WEATHER_SNOW_TEMPORARY | B_WEATHER_SNOW_PERMANENT) // Battle Weather as enum #define ENUM_WEATHER_NONE 0 @@ -300,6 +303,7 @@ #define ENUM_WEATHER_SUN_PRIMAL 5 #define ENUM_WEATHER_RAIN_PRIMAL 6 #define ENUM_WEATHER_STRONG_WINDS 7 +#define ENUM_WEATHER_SNOW 8 // Move Effects #define MOVE_EFFECT_SLEEP 1 diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h index 1316054cd1..81dbdad163 100644 --- a/include/constants/battle_ai.h +++ b/include/constants/battle_ai.h @@ -30,6 +30,7 @@ #define AI_WEATHER_RAIN 2 #define AI_WEATHER_SANDSTORM 3 #define AI_WEATHER_HAIL 4 +#define AI_WEATHER_SNOW 5 // get_how_powerful_move_is #define MOVE_POWER_OTHER 0 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 46e229a319..4b772022e5 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -544,6 +544,7 @@ #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_SNOW_CONTINUES 37 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 @@ -591,6 +592,7 @@ #define ANIM_WEATHER_RAIN 2 #define ANIM_WEATHER_SANDSTORM 3 #define ANIM_WEATHER_HAIL 4 +#define ANIM_WEATHER_SNOW 5 // mon pal blend #define ANIM_PAL_BG 0x1 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 5df12b4496..bcc077055e 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -406,7 +406,8 @@ #define EFFECT_BARB_BARRAGE 400 #define EFFECT_REVIVAL_BLESSING 401 #define EFFECT_FROSTBITE_HIT 402 +#define EFFECT_SNOW 403 -#define NUM_BATTLE_MOVE_EFFECTS 403 +#define NUM_BATTLE_MOVE_EFFECTS 404 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 48abc03b9e..4946f74e77 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -659,8 +659,12 @@ #define STRINGID_PKMNFROSTBITEHEALED 657 #define STRINGID_PKMNFROSTBITEHEALED2 658 #define STRINGID_PKMNFROSTBITEHEALEDBY 659 +#define STRINGID_STARTEDSNOW 660 +#define STRINGID_SNOWCONTINUES 661 +#define STRINGID_SNOWSTOPPED 662 +#define STRINGID_SNOWWARNINGSNOW 663 -#define BATTLESTRINGS_COUNT 660 +#define BATTLESTRINGS_COUNT 664 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -726,12 +730,17 @@ #define B_MSG_STARTED_SANDSTORM 3 #define B_MSG_STARTED_SUNLIGHT 4 #define B_MSG_STARTED_HAIL 5 +#define B_MSG_STARTED_SNOW 6 // gRainContinuesStringIds #define B_MSG_RAIN_CONTINUES 0 #define B_MSG_DOWNPOUR_CONTINUES 1 #define B_MSG_RAIN_STOPPED 2 +// gSnowContinuesStringIds +#define B_MSG_SNOW_CONTINUES 0 +#define B_MSG_SNOW_STOPPED 1 + // gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds #define B_MSG_SANDSTORM 0 #define B_MSG_HAIL 1 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 7dc33dd3b2..de64913fac 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1372,7 +1372,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_AURORA_VEIL: if (gSideStatuses[GetBattlerSide(battlerAtk)] & SIDE_STATUS_AURORA_VEIL || PartnerHasSameMoveEffectWithoutTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) - || !(gBattleWeather & B_WEATHER_HAIL)) + || !(gBattleWeather & B_WEATHER_HAIL && gBattleWeather & B_WEATHER_SNOW)) score -= 10; break; case EFFECT_OHKO: @@ -1578,7 +1578,12 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 8; break; case EFFECT_HAIL: - if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) + if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) // should hail be discouraged if snow is up? + || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) + score -= 8; + break; + case EFFECT_SNOW: + if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) // should snow be discouraged if hail is up? || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; break; @@ -2803,6 +2808,13 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_PLUS(2); // our partner benefits from hail } break; + case EFFECT_SNOW: + if (IsBattlerAlive(battlerAtkPartner) + && ShouldSetSnow(battlerAtkPartner, atkPartnerAbility, atkPartnerHoldEffect)) + { + RETURN_SCORE_PLUS(2); // our partner benefits from snow + } + break; } // global move effect check @@ -3965,6 +3977,22 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; } break; + case EFFECT_SNOW: // any other reasons? + if (ShouldSetSnow(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) + { + 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++; + if (HasMoveEffect(battlerDef, EFFECT_MORNING_SUN) + || HasMoveEffect(battlerDef, EFFECT_SYNTHESIS) + || HasMoveEffect(battlerDef, EFFECT_MOONLIGHT)) + score += 2; + } + break; case EFFECT_RAIN_DANCE: if (ShouldSetRain(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) { @@ -4948,6 +4976,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: + case EFFECT_SNOW: case EFFECT_GEOMANCY: case EFFECT_VICTORY_DANCE: case EFFECT_HIT_SET_ENTRY_HAZARD: @@ -5174,6 +5203,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: + case EFFECT_SNOW: case EFFECT_RAIN_DANCE: score -= 2; break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 3adbd77ae2..010c5a01c9 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -331,6 +331,7 @@ static const u16 sEncouragedEncoreEffects[] = EFFECT_SPIT_UP, EFFECT_SWALLOW, EFFECT_HAIL, + EFFECT_SNOW, EFFECT_TORMENT, EFFECT_WILL_O_WISP, EFFECT_FOLLOW_ME, @@ -1504,7 +1505,7 @@ bool32 IsMoveEncouragedToHit(u8 battlerAtk, u8 battlerDef, u16 move) // increased accuracy but don't always hit if ((AI_WeatherHasEffect() && (((gBattleWeather & B_WEATHER_RAIN) && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE)) - || (((gBattleWeather & B_WEATHER_HAIL) && move == MOVE_BLIZZARD)))) + || (((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD)))) || (gBattleMoves[move].effect == EFFECT_VITAL_THROW) #if B_MINIMIZE_DMG_ACC >= GEN_6 || ((gStatuses3[battlerDef] & STATUS3_MINIMIZED) && (gBattleMoves[move].flags & FLAG_DMG_MINIMIZE)) @@ -1579,7 +1580,7 @@ bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect) { if (!AI_WeatherHasEffect()) return FALSE; - else if (gBattleWeather & B_WEATHER_HAIL) + else if (gBattleWeather & B_WEATHER_HAIL) // dont set hail if snow is up? return FALSE; if (ability == ABILITY_SNOW_CLOAK @@ -1649,6 +1650,26 @@ bool32 ShouldSetSun(u8 battlerAtk, u16 atkAbility, u16 holdEffect) return FALSE; } +bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect) // any other reasons snow should be set? +{ + if (!AI_WeatherHasEffect()) + return FALSE; + else if (gBattleWeather & B_WEATHER_SNOW) // dont set snow if hail is up? + return FALSE; + + if (ability == ABILITY_SNOW_CLOAK + || ability == ABILITY_ICE_BODY + || ability == ABILITY_FORECAST + || ability == ABILITY_SLUSH_RUSH + || IS_BATTLER_OF_TYPE(battler, TYPE_ICE) + || HasMove(battler, MOVE_BLIZZARD) + || HasMoveEffect(battler, EFFECT_AURORA_VEIL) + || HasMoveEffect(battler, EFFECT_WEATHER_BALL)) + { + return TRUE; + } + return FALSE; +} void ProtectChecks(u8 battlerAtk, u8 battlerDef, u16 move, u16 predictedMove, s16 *score) { @@ -3137,7 +3158,7 @@ bool32 ShouldSetScreen(u8 battlerAtk, u8 battlerDef, u16 moveEffect) { case EFFECT_AURORA_VEIL: // Use only in Hail and only if AI doesn't already have Reflect, Light Screen or Aurora Veil itself active. - if (gBattleWeather & B_WEATHER_HAIL + if ((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && !(gSideStatuses[atkSide] & (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL))) return TRUE; break; @@ -3242,7 +3263,8 @@ bool32 PartnerMoveEffectIsWeather(u8 battlerAtkPartner, u16 partnerMove) && (gBattleMoves[partnerMove].effect == EFFECT_SUNNY_DAY || gBattleMoves[partnerMove].effect == EFFECT_RAIN_DANCE || gBattleMoves[partnerMove].effect == EFFECT_SANDSTORM - || gBattleMoves[partnerMove].effect == EFFECT_HAIL)) + || gBattleMoves[partnerMove].effect == EFFECT_HAIL + || gBattleMoves[partnerMove].effect == EFFECT_SNOW)) return TRUE; return FALSE; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 7d449c767e..4e510c59c7 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -5603,6 +5603,8 @@ void AnimTask_GetWeather(u8 taskId) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM; else if (gWeatherMoveAnim & B_WEATHER_HAIL) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_HAIL; + else if (gWeatherMoveAnim & B_WEATHER_SNOW) + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SNOW; DestroyAnimVisualTask(taskId); } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index c06a7795a5..b1187b59e7 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -492,6 +492,7 @@ static bool8 ShouldAnimBeDoneRegardlessOfSubstitute(u8 animId) case B_ANIM_SUN_CONTINUES: case B_ANIM_SANDSTORM_CONTINUES: case B_ANIM_HAIL_CONTINUES: + case B_ANIM_SNOW_CONTINUES: case B_ANIM_SNATCH_MOVE: return TRUE; default: diff --git a/src/battle_main.c b/src/battle_main.c index 91d5c3aa50..7270e0f369 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4642,7 +4642,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId) speed *= 2; else if (ability == ABILITY_SAND_RUSH && gBattleWeather & B_WEATHER_SANDSTORM) speed *= 2; - else if (ability == ABILITY_SLUSH_RUSH && gBattleWeather & B_WEATHER_HAIL) + else if (ability == ABILITY_SLUSH_RUSH && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) speed *= 2; } @@ -5590,7 +5590,7 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk) gBattleStruct->dynamicMoveType = TYPE_ROCK | F_DYNAMIC_TYPE_2; else if (gBattleWeather & B_WEATHER_SUN && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA) gBattleStruct->dynamicMoveType = TYPE_FIRE | F_DYNAMIC_TYPE_2; - else if (gBattleWeather & B_WEATHER_HAIL) + else if (gBattleWeather & (B_WEATHER_HAIL |B_WEATHER_SNOW)) gBattleStruct->dynamicMoveType = TYPE_ICE | F_DYNAMIC_TYPE_2; else gBattleStruct->dynamicMoveType = TYPE_NORMAL | F_DYNAMIC_TYPE_2; diff --git a/src/battle_message.c b/src/battle_message.c index 29fdbd28c2..66bc4a7737 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -363,8 +363,11 @@ static const u8 sText_SunlightGotBright[] = _("The sunlight got bright!"); static const u8 sText_SunlightStrong[] = _("The sunlight is strong."); static const u8 sText_SunlightFaded[] = _("The sunlight faded."); static const u8 sText_StartedHail[] = _("It started to hail!"); +static const u8 sText_StartedSnow[] = _("It started to snow!"); static const u8 sText_HailContinues[] = _("Hail continues to fall."); +static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_HailStopped[] = _("The hail stopped."); +static const u8 sText_SnowStopped[] = _("The snow stopped."); static const u8 sText_FailedToSpitUp[] = _("But it failed to spit up\na thing!"); static const u8 sText_FailedToSwallow[] = _("But it failed to swallow\na thing!"); static const u8 sText_WindBecameHeatWave[] = _("The wind turned into a\nHEAT WAVE!"); @@ -614,6 +617,7 @@ static const u8 sText_AnticipationActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFI static const u8 sText_ForewarnActivates[] = _("{B_SCR_ACTIVE_ABILITY} alerted {B_SCR_ACTIVE_NAME_WITH_PREFIX}\nto the {B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!"); static const u8 sText_IceBodyHpGain[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nhealed it a little bit!"); static const u8 sText_SnowWarningHail[] = _("It started to hail!"); +static const u8 sText_SnowWarningSnow[] = _("It started to snow!"); static const u8 sText_FriskActivates[] = _("{B_ATK_NAME_WITH_PREFIX} frisked {B_DEF_NAME_WITH_PREFIX} and\nfound its {B_LAST_ITEM}!"); static const u8 sText_UnnerveEnters[] = _("The opposing team is too nervous\nto eat Berries!"); static const u8 sText_HarvestBerry[] = _("{B_ATK_NAME_WITH_PREFIX} harvested\nits {B_LAST_ITEM}!"); @@ -1141,6 +1145,9 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_STARTEDHAIL - BATTLESTRINGS_TABLE_START] = sText_StartedHail, [STRINGID_HAILCONTINUES - BATTLESTRINGS_TABLE_START] = sText_HailContinues, [STRINGID_HAILSTOPPED - BATTLESTRINGS_TABLE_START] = sText_HailStopped, + [STRINGID_STARTEDSNOW - BATTLESTRINGS_TABLE_START] = sText_StartedSnow, + [STRINGID_SNOWCONTINUES -BATTLESTRINGS_TABLE_START] = sText_SnowContinues, + [STRINGID_SNOWSTOPPED - BATTLESTRINGS_TABLE_START] = sText_SnowStopped, [STRINGID_FAILEDTOSPITUP - BATTLESTRINGS_TABLE_START] = sText_FailedToSpitUp, [STRINGID_FAILEDTOSWALLOW - BATTLESTRINGS_TABLE_START] = sText_FailedToSwallow, [STRINGID_WINDBECAMEHEATWAVE - BATTLESTRINGS_TABLE_START] = sText_WindBecameHeatWave, @@ -1361,6 +1368,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_FOREWARNACTIVATES - BATTLESTRINGS_TABLE_START] = sText_ForewarnActivates, [STRINGID_ICEBODYHPGAIN - BATTLESTRINGS_TABLE_START] = sText_IceBodyHpGain, [STRINGID_SNOWWARNINGHAIL - BATTLESTRINGS_TABLE_START] = sText_SnowWarningHail, + [STRINGID_SNOWWARNINGSNOW - BATTLESTRINGS_TABLE_START] = sText_SnowWarningSnow, [STRINGID_FRISKACTIVATES - BATTLESTRINGS_TABLE_START] = sText_FriskActivates, [STRINGID_UNNERVEENTERS - BATTLESTRINGS_TABLE_START] = sText_UnnerveEnters, [STRINGID_HARVESTBERRY - BATTLESTRINGS_TABLE_START] = sText_HarvestBerry, @@ -1557,12 +1565,13 @@ const u16 gMoveWeatherChangeStringIds[] = [B_MSG_STARTED_SANDSTORM] = STRINGID_SANDSTORMBREWED, [B_MSG_STARTED_SUNLIGHT] = STRINGID_SUNLIGHTGOTBRIGHT, [B_MSG_STARTED_HAIL] = STRINGID_STARTEDHAIL, + [B_MSG_STARTED_SNOW] = STRINGID_STARTEDSNOW, }; const u16 gSandStormHailContinuesStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES, - [B_MSG_HAIL] = STRINGID_HAILCONTINUES + [B_MSG_HAIL] = STRINGID_HAILCONTINUES, }; const u16 gSandStormHailDmgStringIds[] = @@ -1574,7 +1583,7 @@ const u16 gSandStormHailDmgStringIds[] = const u16 gSandStormHailEndStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED, - [B_MSG_HAIL] = STRINGID_HAILSTOPPED + [B_MSG_HAIL] = STRINGID_HAILSTOPPED, }; const u16 gRainContinuesStringIds[] = @@ -1584,6 +1593,12 @@ const u16 gRainContinuesStringIds[] = [B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED }; +const u16 gSnowContinuesStringIds[] = +{ + [B_MSG_SNOW_CONTINUES] = STRINGID_SNOWCONTINUES, + [B_MSG_SNOW_STOPPED] = STRINGID_SNOWSTOPPED, +}; + const u16 gProtectLikeUsedStringIds[] = { [B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 1784f9682b..3bc77e8485 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1812,7 +1812,7 @@ static bool32 AccuracyCalcHelper(u16 move) return TRUE; } #if B_BLIZZARD_HAIL >= GEN_4 - else if ((gBattleWeather & B_WEATHER_HAIL) && move == MOVE_BLIZZARD) + else if ((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD) { // thunder/hurricane ignore acc checks in rain unless target is holding utility umbrella JumpIfMoveFailed(7, move); @@ -1892,7 +1892,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u if (defAbility == ABILITY_SAND_VEIL && WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_SANDSTORM) calc = (calc * 80) / 100; // 1.2 sand veil loss - else if (defAbility == ABILITY_SNOW_CLOAK && WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_HAIL) + else if (defAbility == ABILITY_SNOW_CLOAK && WEATHER_HAS_EFFECT && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) calc = (calc * 80) / 100; // 1.2 snow cloak loss else if (defAbility == ABILITY_TANGLED_FEET && gBattleMons[battlerDef].status2 & STATUS2_CONFUSION) calc = (calc * 50) / 100; // 1.5 tangled feet loss @@ -5190,7 +5190,8 @@ static void Cmd_playanimation(void) else if (animId == B_ANIM_RAIN_CONTINUES || animId == B_ANIM_SUN_CONTINUES || animId == B_ANIM_SANDSTORM_CONTINUES - || animId == B_ANIM_HAIL_CONTINUES) + || animId == B_ANIM_HAIL_CONTINUES + || animId == B_ANIM_SNOW_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, animId, *argPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -5239,7 +5240,8 @@ static void Cmd_playanimation_var(void) else if (*animIdPtr == B_ANIM_RAIN_CONTINUES || *animIdPtr == B_ANIM_SUN_CONTINUES || *animIdPtr == B_ANIM_SANDSTORM_CONTINUES - || *animIdPtr == B_ANIM_HAIL_CONTINUES) + || *animIdPtr == B_ANIM_HAIL_CONTINUES + || *animIdPtr == B_ANIM_SNOW_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, *animIdPtr, *argPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -10250,7 +10252,7 @@ static void Cmd_various(void) { VARIOUS_ARGS(); if (gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] & SIDE_STATUS_AURORA_VEIL - || !(WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_HAIL)) + || !(WEATHER_HAS_EFFECT && gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = 0; @@ -16559,3 +16561,20 @@ void BS_ItemRestorePP(void) { PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(mon, MON_DATA_SPECIES)); gBattlescriptCurrInstr = cmd->nextInstr; } + +void BS_SetSnow(void) +{ + NATIVE_ARGS(); + + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_SNOW, FALSE)) + { + gMoveResultFlags |= MOVE_RESULT_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; + + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SNOW; + } + gBattlescriptCurrInstr = cmd->nextInstr; +} \ No newline at end of file diff --git a/src/battle_tv.c b/src/battle_tv.c index f5c9f43c4e..74f8c7008c 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -251,6 +251,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_SWALLOW] = 3, // [EFFECT_UNUSED_A3] = 1, [EFFECT_HAIL] = 4, + [EFFECT_SNOW] = 4, [EFFECT_TORMENT] = 7, [EFFECT_FLATTER] = 7, [EFFECT_WILL_O_WISP] = 5, @@ -1770,6 +1771,6 @@ static void AddPointsBasedOnWeather(u16 weatherFlags, u16 moveId, u8 moveSlot) AddMovePoints(PTS_SUN, moveId, moveSlot, 0); else if (weatherFlags & B_WEATHER_SANDSTORM) AddMovePoints(PTS_SANDSTORM, moveId, moveSlot, 0); - else if (weatherFlags & B_WEATHER_HAIL) + else if (weatherFlags & (B_WEATHER_HAIL | B_WEATHER_SNOW)) AddMovePoints(PTS_HAIL, moveId, moveSlot, 0); } diff --git a/src/battle_util.c b/src/battle_util.c index 1c5a5d5d94..563ab9818a 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2032,6 +2032,7 @@ enum ENDTURN_SANDSTORM, ENDTURN_SUN, ENDTURN_HAIL, + ENDTURN_SNOW, ENDTURN_GRAVITY, ENDTURN_WATER_SPORT, ENDTURN_MUD_SPORT, @@ -2394,6 +2395,27 @@ u8 DoFieldEndTurnEffects(void) } gBattleStruct->turnCountersTracker++; break; + case ENDTURN_SNOW: + if (gBattleWeather & B_WEATHER_SNOW) + { + if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT)) + { + if (--gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_STOPPED; + } + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_CONTINUES; + } + + BattleScriptExecute(BattleScript_SnowContinuesOrEnds); + effect++; + } + gBattleStruct->turnCountersTracker++; + break; case ENDTURN_TRICK_ROOM: if (gFieldStatuses & STATUS_FIELD_TRICK_ROOM && --gFieldTimers.trickRoomTimer == 0) { @@ -4032,7 +4054,7 @@ u8 TryWeatherFormChange(u8 battler) } } #endif - else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))) + else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_SNOW)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))) { SET_BATTLER_TYPE(battler, TYPE_NORMAL); ret = CASTFORM_NORMAL + 1; @@ -4047,7 +4069,7 @@ u8 TryWeatherFormChange(u8 battler) SET_BATTLER_TYPE(battler, TYPE_WATER); ret = CASTFORM_WATER + 1; } - else if (gBattleWeather & B_WEATHER_HAIL && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) + else if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW) && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) { SET_BATTLER_TYPE(battler, TYPE_ICE); ret = CASTFORM_ICE + 1; @@ -4083,6 +4105,7 @@ static const u16 sWeatherFlagsInfo[][3] = [ENUM_WEATHER_SANDSTORM] = {B_WEATHER_SANDSTORM_TEMPORARY, B_WEATHER_SANDSTORM_PERMANENT, HOLD_EFFECT_SMOOTH_ROCK}, [ENUM_WEATHER_HAIL] = {B_WEATHER_HAIL_TEMPORARY, B_WEATHER_HAIL_PERMANENT, HOLD_EFFECT_ICY_ROCK}, [ENUM_WEATHER_STRONG_WINDS] = {B_WEATHER_STRONG_WINDS, B_WEATHER_STRONG_WINDS, HOLD_EFFECT_NONE}, + [ENUM_WEATHER_SNOW] = {B_WEATHER_SNOW_TEMPORARY, B_WEATHER_SNOW_PERMANENT, HOLD_EFFECT_ICY_ROCK}, }; static void ShouldChangeFormInWeather(u8 battler) @@ -4103,7 +4126,6 @@ static void ShouldChangeFormInWeather(u8 battler) bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) { u16 battlerAbility = GetBattlerAbility(battler); - if (gBattleWeather & B_WEATHER_PRIMAL_ANY && battlerAbility != ABILITY_DESOLATE_LAND && battlerAbility != ABILITY_PRIMORDIAL_SEA @@ -4129,7 +4151,6 @@ bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) ShouldChangeFormInWeather(battler); return TRUE; } - return FALSE; } @@ -4634,11 +4655,19 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_SNOW_WARNING: - if (TryChangeBattleWeather(battler, ENUM_WEATHER_HAIL, TRUE)) + #if B_SNOW_WARNING >= GEN_9 + if (TryChangeBattleWeather(battler, ENUM_WEATHER_SNOW, TRUE)) { - BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivates); + BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivatesSnow); effect++; } + #else + if (TryChangeBattleWeather(battler, ENUM_WEATHER_HAIL, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivatesHail); + effect++; + } + #endif else if (gBattleWeather & B_WEATHER_PRIMAL_ANY && WEATHER_HAS_EFFECT && !gSpecialStatuses[battler].switchInAbilityDone) { gSpecialStatuses[battler].switchInAbilityDone = TRUE; @@ -6111,7 +6140,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_ICE_FACE: - if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL) + if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL | B_WEATHER_SNOW) && gBattleMons[battler].species == SPECIES_EISCUE_NOICE_FACE && !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) && gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)]) @@ -9099,7 +9128,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(2.0)); break; case EFFECT_SOLAR_BEAM: - if (IsBattlerWeatherAffected(battlerAtk, (B_WEATHER_HAIL | B_WEATHER_SANDSTORM | B_WEATHER_RAIN))) + if (IsBattlerWeatherAffected(battlerAtk, (B_WEATHER_HAIL | B_WEATHER_SANDSTORM | B_WEATHER_RAIN | B_WEATHER_SNOW))) MulModifier(&modifier, UQ_4_12(0.5)); break; case EFFECT_STOMPING_TANTRUM: @@ -9504,6 +9533,12 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, // sandstorm sp.def boost for rock types if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ROCK) && gBattleWeather & B_WEATHER_SANDSTORM && WEATHER_HAS_EFFECT && !usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); + // snow def boost for ice types + if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) + MulModifier(&modifier, UQ_4_12(1.5)); + + if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) + MulModifier(&modifier, UQ_4_12(1.5)); // The defensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 5th badge and 7th badges. // Having the 5th badge boosts physical defense while having the 7th badge boosts special defense. diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 9473bae71c..6d88acb8cd 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13356,7 +13356,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_SNOWSCAPE] = { - .effect = EFFECT_HAIL, + .effect = EFFECT_SNOW, .power = 0, .type = TYPE_ICE, .accuracy = 0, From 0bf92943d441091fe7f0459bc8fd66ee632f1345 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sun, 30 Apr 2023 02:35:09 +0200 Subject: [PATCH 156/229] spelling --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index 1ed337ca35..4daeb59b4b 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -120,7 +120,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. -#define B_SNOW_WARNING GEN_9 // In Gen9+, Snowwarning will summon snow instead of hail. +#define B_SNOW_WARNING GEN_9 // In Gen9+, Snow Warning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. From c6fbde6d5c03452f284afa6526016ee1d6bdc148 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:11:35 +0200 Subject: [PATCH 157/229] remove stupidity for some reason I added the 50% def increase in snow check twice? this removes that --- src/battle_util.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 563ab9818a..1ab2f32e53 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9537,9 +9537,6 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); - if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ICE) && gBattleWeather & B_WEATHER_SNOW && WEATHER_HAS_EFFECT && usesDefStat) - MulModifier(&modifier, UQ_4_12(1.5)); - // The defensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 5th badge and 7th badges. // Having the 5th badge boosts physical defense while having the 7th badge boosts special defense. if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerDef) && IS_MOVE_PHYSICAL(move)) From 6758f6ebe755e6961d365ec2ecdfffea6f9c6f2f Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 16:16:58 +0200 Subject: [PATCH 158/229] add some snow related tests --- include/config/battle.h | 2 +- test/ability_snow_warning.c | 20 +++++ test/weather_snow.c | 159 ++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 test/ability_snow_warning.c create mode 100644 test/weather_snow.c diff --git a/include/config/battle.h b/include/config/battle.h index 4daeb59b4b..6ba84409f6 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -120,7 +120,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. -#define B_SNOW_WARNING GEN_9 // In Gen9+, Snow Warning will summon snow instead of hail. +#define B_SNOW_WARNING GEN_LATEST // In Gen9+, Snow Warning will summon snow instead of hail. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/test/ability_snow_warning.c b/test/ability_snow_warning.c new file mode 100644 index 0000000000..6c0753ad39 --- /dev/null +++ b/test/ability_snow_warning.c @@ -0,0 +1,20 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Snow Warning summons hail(snow)") +{ + GIVEN { + PLAYER(SPECIES_ABOMASNOW) { Ability(ABILITY_SNOW_WARNING); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + } SCENE { + #if B_SNOW_WARNING < GEN_9 + MESSAGE("It started to hail!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HAIL_CONTINUES); + #elif B_SNOW_WARNING >= GEN_9 + MESSAGE("It started to snow!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SNOW_CONTINUES); + #endif + } +} diff --git a/test/weather_snow.c b/test/weather_snow.c new file mode 100644 index 0000000000..07afa48d57 --- /dev/null +++ b/test/weather_snow.c @@ -0,0 +1,159 @@ +#include "global.h" +#include "test_battle.h" + +#define TEST_HP 1 +#define MAX_HP 400 + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOW); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); +} + +SINGLE_BATTLE_TEST("Snow increases the defense of Ice types by 50 %", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + PARAMETRIZE{ move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GLALIE); + } WHEN { + TURN { MOVE(opponent, move); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow turns Weather Ball to an Ice-type move and doubles its power", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_WEATHER_BALL].effect == EFFECT_WEATHER_BALL); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_DRAGONAIR); + } WHEN { + TURN { MOVE(player, move); } + TURN { MOVE(player, MOVE_WEATHER_BALL); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(4.0), results[1].damage); // double base power + type effectiveness. + } +} + +SINGLE_BATTLE_TEST("Snow allows Blizzard to bypass accuracy checks") +{ + PASSES_RANDOMLY(100, 100); + GIVEN { + ASSUME(gBattleMoves[MOVE_BLIZZARD].accuracy == 70); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_BLIZZARD); } + } SCENE { + NONE_OF { MESSAGE("Wobbuffet's attack missed!"); } + } +} + +SINGLE_BATTLE_TEST("Snow halves the power of Solar Beam", s16 damage) +{ + u16 move; + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SOLAR_BEAM].effect == EFFECT_SOLAR_BEAM); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_SOLAR_BEAM); } + TURN { SKIP_TURN(player); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow halves the power of Solar Blade", s16 damage) +{ + u16 move; + KNOWN_FAILING; // fails bc the bp of solar blade gets rounded up which leads to slightly incorrect calcs down the line + PARAMETRIZE{ move = MOVE_CELEBRATE; } + PARAMETRIZE{ move = MOVE_SNOWSCAPE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SOLAR_BLADE].effect == EFFECT_SOLAR_BEAM); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_SOLAR_BLADE); } + TURN { SKIP_TURN(player); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Snow causes Moonlight to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MOONLIGHT].effect == EFFECT_MOONLIGHT); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MOONLIGHT); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Moonlight to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MOONLIGHT].effect == EFFECT_MOONLIGHT); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MOONLIGHT); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Synthesis to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_SYNTHESIS].effect == EFFECT_SYNTHESIS); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_SYNTHESIS); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +SINGLE_BATTLE_TEST("Snow causes Morning Sun to recover 1/4 of the user's max HP") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MORNING_SUN].effect == EFFECT_MORNING_SUN); + PLAYER(SPECIES_WOBBUFFET) { HP(TEST_HP); MaxHP(MAX_HP); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SNOWSCAPE); MOVE(player, MOVE_MORNING_SUN); } + } SCENE { + HP_BAR(player, hp: TEST_HP + (MAX_HP/4)); + } +} + +#undef MAX_HP +#undef TEST_HP \ No newline at end of file From c32d5f455b7dcfcd9c34542e9c2a06fabd8381df Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 16:44:42 +0200 Subject: [PATCH 159/229] fix rebase issues --- data/battle_scripts_1.s | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 6e32ce0afd..d1795dcf55 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8880,16 +8880,7 @@ BattleScript_SnowWarningActivatesSnow:: printstring STRINGID_SNOWWARNINGSNOW waitstate playanimation BS_BATTLER_0, B_ANIM_SNOW_CONTINUES - call BattleScript_WeatherFormChanges - end3 - -BattleScript_SnowWarningActivatesSnow:: - pause B_WAIT_TIME_SHORT - call BattleScript_AbilityPopUp - printstring STRINGID_SNOWWARNINGSNOW - waitstate - playanimation BS_BATTLER_0, B_ANIM_SNOW_CONTINUES - call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_ActivateTerrainEffects: From 095422c0c065247ca685c08cdafc9c35db585975 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 19:48:03 +0200 Subject: [PATCH 160/229] small ai logic fix --- src/battle_ai_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index de64913fac..2aedc32ee8 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1372,7 +1372,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_AURORA_VEIL: if (gSideStatuses[GetBattlerSide(battlerAtk)] & SIDE_STATUS_AURORA_VEIL || PartnerHasSameMoveEffectWithoutTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) - || !(gBattleWeather & B_WEATHER_HAIL && gBattleWeather & B_WEATHER_SNOW)) + || !(gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW))) score -= 10; break; case EFFECT_OHKO: From ae2d5f7d1e2e9ed8d045c7cb3c48a91283116abb Mon Sep 17 00:00:00 2001 From: Shae <85393060+ShaeTsuPog@users.noreply.github.com> Date: Tue, 2 May 2023 11:08:05 -0700 Subject: [PATCH 161/229] Weather related Ability tests, fix for Leaf Guard not preventing Rest. (#2957) --- data/battle_scripts_1.s | 9 +++ include/config/battle.h | 1 + test/ability_dry_skin.c | 114 ++++++++++++++++++++++++++++++++++++ test/ability_hydration.c | 16 +++++ test/ability_ice_body.c | 30 ++++++++++ test/ability_leaf_guard.c | 95 ++++++++++++++++++++++++++++++ test/ability_rain_dish.c | 18 ++++++ test/ability_sand_veil.c | 4 +- test/ability_snow_cloak.c | 29 +++++++++ test/ability_water_absorb.c | 2 +- 10 files changed, 315 insertions(+), 3 deletions(-) create mode 100644 test/ability_dry_skin.c create mode 100644 test/ability_hydration.c create mode 100644 test/ability_ice_body.c create mode 100644 test/ability_leaf_guard.c create mode 100644 test/ability_rain_dish.c create mode 100644 test/ability_snow_cloak.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 4f41d154ef..575c889399 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3984,6 +3984,9 @@ BattleScript_EffectRest:: jumpifuproarwakes BattleScript_RestCantSleep jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_InsomniaProtects jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_InsomniaProtects +.if B_LEAF_GUARD_PREVENTS_REST >= GEN_5 + jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardPreventsRest +.endif trysetrest BattleScript_AlreadyAtFullHp pause B_WAIT_TIME_SHORT printfromtable gRestUsedStringIds @@ -4005,6 +4008,12 @@ BattleScript_RestIsAlreadyAsleep:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd +BattleScript_LeafGuardPreventsRest:: + pause B_WAIT_TIME_SHORT + printstring STRINGID_BUTITFAILED + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + BattleScript_EffectOHKO:: attackcanceler attackstring diff --git a/include/config/battle.h b/include/config/battle.h index da58c8bbf8..6a6a829d65 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -120,6 +120,7 @@ #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. #define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. +#define B_LEAF_GUARD_PREVENTS_REST GEN_LATEST // In Gen5+, Leaf Guard prevents the use of Rest in harsh sunlight. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/test/ability_dry_skin.c b/test/ability_dry_skin.c new file mode 100644 index 0000000000..6c28d0c428 --- /dev/null +++ b/test/ability_dry_skin.c @@ -0,0 +1,114 @@ +#include "global.h" +#include "test_battle.h" + +#define TEST_MAX_HP (200) + +SINGLE_BATTLE_TEST("Dry Skin causes 1/8th Max HP damage in Sun") +{ + GIVEN { + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SUNNY_DAY); } + } SCENE { + ABILITY_POPUP(player, ABILITY_DRY_SKIN); + HP_BAR(player, damage: TEST_MAX_HP / 8); + MESSAGE("The Parasect's Dry Skin takes its toll!"); + } +} + +SINGLE_BATTLE_TEST("Dry Skin heals 1/8th Max HP in Rain") +{ + GIVEN { + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_DRY_SKIN); + MESSAGE("Parasect's Dry Skin restored its HP a little!"); + HP_BAR(player, hp: TEST_MAX_HP / 8 + 100); + } +} + +SINGLE_BATTLE_TEST("Dry Skin increases damage taken from Fire-type moves by 25%", s16 damage) +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); }; + } WHEN { + TURN {MOVE(player, MOVE_EMBER); } + } SCENE { + MESSAGE("Wobbuffet used Ember!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.25), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Dry Skin heals 25% when hit by water type moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_BUBBLE].type == TYPE_WATER); + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_BUBBLE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_DRY_SKIN); + HP_BAR(player, hp: TEST_MAX_HP / 4 + 100); + MESSAGE("Parasect restored HP using its Dry Skin!"); + } +} + +SINGLE_BATTLE_TEST("Dry Skin does not activate if protected") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_BUBBLE].type == TYPE_WATER); + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PROTECT); MOVE(opponent, MOVE_BUBBLE); } + } SCENE { + NONE_OF { ABILITY_POPUP(player, ABILITY_DRY_SKIN); HP_BAR(player); MESSAGE("Parasect restored HP using its Dry Skin!"); } + } +} + +SINGLE_BATTLE_TEST("Dry Skin is only triggered once on multi strike moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_WATER_SHURIKEN].type == TYPE_WATER); + ASSUME(gBattleMoves[MOVE_WATER_SHURIKEN].effect == EFFECT_MULTI_HIT); + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_WATER_SHURIKEN); } + } SCENE { + ABILITY_POPUP(player, ABILITY_DRY_SKIN); + HP_BAR(player, hp: TEST_MAX_HP / 4 + 100); + MESSAGE("Parasect restored HP using its Dry Skin!"); + } +} + +SINGLE_BATTLE_TEST("Dry Skin prevents Absorb Bulb and Luminous Moss from activating") +{ + u32 item; + PARAMETRIZE { item = ITEM_ABSORB_BULB; } + PARAMETRIZE { item = ITEM_LUMINOUS_MOSS; } + GIVEN { + ASSUME(gBattleMoves[MOVE_BUBBLE].type == TYPE_WATER); + PLAYER(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); HP(100); MaxHP(TEST_MAX_HP); Item(item); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_BUBBLE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_DRY_SKIN); + HP_BAR(player, hp: TEST_MAX_HP / 4 + 100); + MESSAGE("Parasect restored HP using its Dry Skin!"); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + } + } +} diff --git a/test/ability_hydration.c b/test/ability_hydration.c new file mode 100644 index 0000000000..45689b2121 --- /dev/null +++ b/test/ability_hydration.c @@ -0,0 +1,16 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Hydration cures non-volatile Status conditions if it is raining") +{ + GIVEN { + PLAYER(SPECIES_VAPOREON) { Ability(ABILITY_HYDRATION); Status1(STATUS1_BURN); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_HYDRATION); + MESSAGE("Vaporeon's Hydration cured its burn problem!"); + STATUS_ICON(player, none: TRUE); + } +} diff --git a/test/ability_ice_body.c b/test/ability_ice_body.c new file mode 100644 index 0000000000..b28c5ef0ab --- /dev/null +++ b/test/ability_ice_body.c @@ -0,0 +1,30 @@ +#include "global.h" +#include "test_battle.h" + +#define TEST_MAX_HP (100) + +SINGLE_BATTLE_TEST("Ice Body prevents damage from hail") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); }; + } WHEN { + TURN { MOVE(player, MOVE_HAIL); MOVE(opponent, MOVE_SKILL_SWAP); } + } SCENE { + NONE_OF { HP_BAR(player); } + } +} + +SINGLE_BATTLE_TEST("Ice Body recovers 1/16th of Max HP in hail.") +{ + GIVEN { + PLAYER(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); HP(1); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_HAIL); } + } SCENE { + ABILITY_POPUP(player, ABILITY_ICE_BODY); + MESSAGE("Glalie's Ice Body healed it a little bit!"); + HP_BAR(player, hp: TEST_MAX_HP / 16 + 1); + } +} diff --git a/test/ability_leaf_guard.c b/test/ability_leaf_guard.c new file mode 100644 index 0000000000..a4c83c4856 --- /dev/null +++ b/test/ability_leaf_guard.c @@ -0,0 +1,95 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Leaf Guard prevents non-volatile status conditions in sun") +{ + u32 move; + PARAMETRIZE { move = MOVE_WILL_O_WISP; } + PARAMETRIZE { move = MOVE_HYPNOSIS; } + PARAMETRIZE { move = MOVE_THUNDER_WAVE; } + PARAMETRIZE { move = MOVE_TOXIC; } + PARAMETRIZE { move = MOVE_POWDER_SNOW; } + GIVEN { + ASSUME(gBattleMoves[MOVE_WILL_O_WISP].effect == EFFECT_WILL_O_WISP); + ASSUME(gBattleMoves[MOVE_HYPNOSIS].effect == EFFECT_SLEEP); + ASSUME(gBattleMoves[MOVE_THUNDER_WAVE].effect == EFFECT_PARALYZE); + ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC); + ASSUME(gBattleMoves[MOVE_POWDER_SNOW].effect == EFFECT_FREEZE_HIT); + PLAYER(SPECIES_LEAFEON) { Ability(ABILITY_LEAF_GUARD); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SUNNY_DAY); MOVE(opponent, move); } + } SCENE { + switch (move) + { + case MOVE_WILL_O_WISP: + MESSAGE("Foe Wobbuffet used Will-o-Wisp!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_WILL_O_WISP, opponent); + ABILITY_POPUP(player, ABILITY_LEAF_GUARD); + MESSAGE("It doesn't affect Leafeon…"); + break; + case MOVE_HYPNOSIS: + MESSAGE("Foe Wobbuffet used Hypnosis!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPNOSIS, opponent); + ABILITY_POPUP(player, ABILITY_LEAF_GUARD); + MESSAGE("It doesn't affect Leafeon…"); + break; + case MOVE_THUNDER_WAVE: + MESSAGE("Foe Wobbuffet used Thunder Wave!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER_WAVE, opponent); + ABILITY_POPUP(player, ABILITY_LEAF_GUARD); + MESSAGE("It doesn't affect Leafeon…"); + break; + case MOVE_TOXIC: + MESSAGE("Foe Wobbuffet used Toxic!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, opponent); + ABILITY_POPUP(player, ABILITY_LEAF_GUARD); + MESSAGE("It doesn't affect Leafeon…"); + break; + case MOVE_POWDER_SNOW: + MESSAGE("Foe Wobbuffet used Powder Snow!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_POWDER_SNOW, opponent); + MESSAGE("It's super effective!"); + break; + } + NONE_OF {STATUS_ICON(player, status1: TRUE);} + } +} + +SINGLE_BATTLE_TEST("Leaf Guard prevents status conditions from Flame Orb and Toxic Orb") +{ + u32 item; + PARAMETRIZE { item = ITEM_FLAME_ORB; } + PARAMETRIZE { item = ITEM_TOXIC_ORB; } + GIVEN { + ASSUME(gItems[ITEM_FLAME_ORB].holdEffect == HOLD_EFFECT_FLAME_ORB); + ASSUME(gItems[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB); + PLAYER(SPECIES_LEAFEON) {Ability(ABILITY_LEAF_GUARD); Item(item); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SUNNY_DAY); } + } SCENE { + if (item == ITEM_FLAME_ORB) { + NONE_OF { MESSAGE("Leafeon was burned!"); STATUS_ICON(player, burn: TRUE);} + } + else { + NONE_OF { MESSAGE("Leafeon is badly poisoned!"); STATUS_ICON(player, poison: TRUE);} + } + } +} + +SINGLE_BATTLE_TEST("Leaf Guard prevents Rest during sun") +{ + GIVEN { + ASSUME(B_LEAF_GUARD_PREVENTS_REST >= GEN_5); + ASSUME(gBattleMoves[MOVE_REST].effect == EFFECT_REST); + PLAYER(SPECIES_LEAFEON) { Ability(ABILITY_LEAF_GUARD); HP(100); MaxHP(200); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SUNNY_DAY); MOVE(player, MOVE_REST); } + } SCENE { + MESSAGE("But it failed!"); + NOT STATUS_ICON(player, sleep: TRUE); + NONE_OF {HP_BAR(player);} + } +} diff --git a/test/ability_rain_dish.c b/test/ability_rain_dish.c new file mode 100644 index 0000000000..f9a457d4a5 --- /dev/null +++ b/test/ability_rain_dish.c @@ -0,0 +1,18 @@ +#include "global.h" +#include "test_battle.h" + +#define TEST_MAX_HP (100) + +SINGLE_BATTLE_TEST("Rain Dish recovers 1/16th of Max HP in Rain") +{ + GIVEN { + PLAYER(SPECIES_LUDICOLO) { Ability(ABILITY_RAIN_DISH); HP(1); MaxHP(TEST_MAX_HP); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_RAIN_DANCE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_RAIN_DISH); + MESSAGE("Ludicolo's Rain Dish restored its HP a little!"); + HP_BAR(player, hp: TEST_MAX_HP / 16 + 1); + } +} diff --git a/test/ability_sand_veil.c b/test/ability_sand_veil.c index 5514f27c0e..ec7c17f8ec 100644 --- a/test/ability_sand_veil.c +++ b/test/ability_sand_veil.c @@ -4,7 +4,7 @@ SINGLE_BATTLE_TEST("Sand Veil prevents damage from sandstorm") { GIVEN { - PLAYER(SPECIES_SANDSHREW) { Ability(ABILITY_SAND_VEIL); }; + PLAYER(SPECIES_CACNEA) { Ability(ABILITY_SAND_VEIL); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(opponent, MOVE_SANDSTORM); } @@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Sand Veil prevents damage from sandstorm") } } -SINGLE_BATTLE_TEST("Sand Veil reduces accuracy during sandstorm") +SINGLE_BATTLE_TEST("Sand Veil increases evasion during sandstorm") { PASSES_RANDOMLY(4, 5, RNG_ACCURACY); GIVEN { diff --git a/test/ability_snow_cloak.c b/test/ability_snow_cloak.c new file mode 100644 index 0000000000..1f47eb94ba --- /dev/null +++ b/test/ability_snow_cloak.c @@ -0,0 +1,29 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Snow Cloak prevents damage from hail") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GLACEON) { Ability(ABILITY_SNOW_CLOAK); }; + } WHEN { + TURN { MOVE(player, MOVE_HAIL); MOVE(opponent, MOVE_SKILL_SWAP); } + } SCENE { + NONE_OF { HP_BAR(player); } + } +} + +SINGLE_BATTLE_TEST("Snow Cloak increases evasion during hail") +{ + PASSES_RANDOMLY(4, 5, RNG_ACCURACY); + GIVEN { + ASSUME(gBattleMoves[MOVE_POUND].accuracy == 100); + PLAYER(SPECIES_GLACEON) { Ability(ABILITY_SNOW_CLOAK); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_HAIL); } + TURN { MOVE(opponent, MOVE_POUND); } + } SCENE { + HP_BAR(player); + } +} diff --git a/test/ability_water_absorb.c b/test/ability_water_absorb.c index aaaa149ace..7d62748367 100644 --- a/test/ability_water_absorb.c +++ b/test/ability_water_absorb.c @@ -63,7 +63,7 @@ SINGLE_BATTLE_TEST("Water Absorb is only triggered once on multi strike moves") } } -SINGLE_BATTLE_TEST("Water Absorb prevents Items from activating") +SINGLE_BATTLE_TEST("Water Absorb prevents Absorb Bulb and Luminous Moss from activating") { u32 item; PARAMETRIZE { item = ITEM_ABSORB_BULB; } From dd43d62a123ea8c43d54536f5ce32917a5ea9798 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 2 May 2023 21:06:21 +0200 Subject: [PATCH 162/229] Fixes Triple Dive effect (#2947) --- include/constants/pokemon.h | 5 +-- src/battle_ai_util.c | 2 +- src/battle_util.c | 2 +- src/data/battle_moves.h | 6 ++-- test/move_effect_triple_kick.c | 31 ++++++++++++++++++ test/move_flag_three_strikes.c | 57 ++++++++++++++++++++++++++++++++++ 6 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 test/move_effect_triple_kick.c create mode 100644 test/move_flag_three_strikes.c diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index ff2a44dc9c..504a94ea3d 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -242,8 +242,9 @@ #define FLAG_THAW_USER (1 << 25) #define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury #define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit -#define FLAG_WIND_MOVE (1 << 28) -#define FLAG_SLICING_MOVE (1 << 29) +#define FLAG_THREE_STRIKES (1 << 28) // A move with this flag will strike thrice, and may apply its effect on each hit +#define FLAG_WIND_MOVE (1 << 29) +#define FLAG_SLICING_MOVE (1 << 30) // Split defines. #define SPLIT_PHYSICAL 0x0 diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 3adbd77ae2..e187a06a98 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -856,7 +856,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, // Handle other multi-strike moves if (gBattleMoves[move].flags & FLAG_TWO_STRIKES) dmg *= 2; - else if (move == MOVE_SURGING_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH)) + else if (gBattleMoves[move].flags & FLAG_THREE_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH)) dmg *= 3; if (dmg == 0) diff --git a/src/battle_util.c b/src/battle_util.c index 1c5a5d5d94..402af3544a 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3779,7 +3779,7 @@ u8 AtkCanceller_UnableToUseMove(void) // TODO } } - else if (gBattleMoves[gCurrentMove].effect == EFFECT_TRIPLE_KICK || gCurrentMove == MOVE_SURGING_STRIKES) + else if (gBattleMoves[gCurrentMove].effect == EFFECT_TRIPLE_KICK || gBattleMoves[gCurrentMove].flags & FLAG_THREE_STRIKES) { gMultiHitCounter = 3; PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 9473bae71c..4d04c743fd 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -12338,7 +12338,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_THREE_STRIKES, .split = SPLIT_PHYSICAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13106,7 +13106,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_TRIPLE_DIVE] = { - .effect = EFFECT_TRIPLE_KICK, + .effect = EFFECT_HIT, .power = 30, .type = TYPE_WATER, .accuracy = 95, @@ -13114,7 +13114,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_THREE_STRIKES, .split = SPLIT_PHYSICAL, .zMoveEffect = Z_EFFECT_NONE, }, diff --git a/test/move_effect_triple_kick.c b/test/move_effect_triple_kick.c new file mode 100644 index 0000000000..d3187aefec --- /dev/null +++ b/test/move_effect_triple_kick.c @@ -0,0 +1,31 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TRIPLE_KICK].effect & EFFECT_TRIPLE_KICK); +} + +SINGLE_BATTLE_TEST("Triple Kick damage is increaased by its base damage for each hit") +{ + s16 firstHit; + s16 secondHit; + s16 thirdHit; + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TRIPLE_KICK); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_KICK, player); + HP_BAR(opponent, captureDamage: &firstHit); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_KICK, player); + HP_BAR(opponent, captureDamage: &secondHit); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_KICK, player); + HP_BAR(opponent, captureDamage: &thirdHit); + } FINALLY { + EXPECT_EQ(secondHit, firstHit * 2); + EXPECT_EQ(thirdHit, firstHit * 3); + } +} diff --git a/test/move_flag_three_strikes.c b/test/move_flag_three_strikes.c new file mode 100644 index 0000000000..7ea7844c4f --- /dev/null +++ b/test/move_flag_three_strikes.c @@ -0,0 +1,57 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Three-strike flag turns a move into a 3-hit move") +{ + s16 firstHit; + s16 secondHit; + s16 thirdHit; + + GIVEN { + ASSUME(gBattleMoves[MOVE_TRIPLE_DIVE].flags & FLAG_THREE_STRIKES); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TRIPLE_DIVE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player); + HP_BAR(opponent, captureDamage: &firstHit); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player); + HP_BAR(opponent, captureDamage: &secondHit); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player); + HP_BAR(opponent, captureDamage: &thirdHit); + } FINALLY { + EXPECT_EQ(firstHit, secondHit); + EXPECT_EQ(secondHit, thirdHit); + EXPECT_EQ(firstHit, thirdHit); + } +} + +SINGLE_BATTLE_TEST("Surging Strikes hits 3 times with each hit being a critical hit") +{ + s16 firstHit; + s16 secondHit; + s16 thirdHit; + + GIVEN { + ASSUME(gBattleMoves[MOVE_SURGING_STRIKES].flags & FLAG_THREE_STRIKES); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SURGING_STRIKES); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player); + HP_BAR(opponent, captureDamage: &firstHit); + MESSAGE("A critical hit!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player); + HP_BAR(opponent, captureDamage: &secondHit); + MESSAGE("A critical hit!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player); + HP_BAR(opponent, captureDamage: &thirdHit); + MESSAGE("A critical hit!"); + } FINALLY { + EXPECT_EQ(firstHit, secondHit); + EXPECT_EQ(secondHit, thirdHit); + EXPECT_EQ(firstHit, thirdHit); + } +} From c5a73f59a4a34949c8c17185eaf29ef76cbdd7d1 Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 2 May 2023 21:17:14 +0200 Subject: [PATCH 163/229] ad suggested changes --- data/battle_anim_scripts.s | 27 ++++++++++++------------- data/battle_scripts_1.s | 2 +- include/constants/battle_move_effects.h | 2 +- src/battle_ai_main.c | 10 ++++----- src/battle_ai_util.c | 4 ++-- src/battle_message.c | 4 ++-- src/battle_script_commands.c | 2 +- src/battle_tv.c | 2 +- src/data/battle_moves.h | 2 +- test/ability_snow_warning.c | 6 +++++- test/weather_snow.c | 10 ++++----- 11 files changed, 36 insertions(+), 35 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 01311c35d1..a0b035704d 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -947,7 +947,7 @@ gBattleAnims_General:: .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON - .4byte General_Snow @ B_ANIM_SNOW_CONTINUES + .4byte General_Snow @ B_ANIM_SNOW_CONTINUES .align 2 gBattleAnims_Special:: @@ -14386,6 +14386,18 @@ Move_SILK_TRAP:: clearmonbg ANIM_ATK_PARTNER end +@ Also used by Snow weather. Currently identical with Move_HAIL +Move_SNOWSCAPE:: + loadspritegfx ANIM_TAG_HAIL + loadspritegfx ANIM_TAG_ICE_CRYSTALS + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK + waitforvisualfinish + createvisualtask AnimTask_Hail, 5 + loopsewithpan SE_M_HAIL, 0, 8, 10 + waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK + end + Move_WICKED_BLOW:: Move_SURGING_STRIKES:: Move_THUNDER_CAGE:: @@ -14449,19 +14461,6 @@ Move_ELECTRO_DRIFT:: Move_SHED_TAIL:: Move_CHILLY_RECEPTION:: Move_TIDY_UP:: - -@ Also used by Snow weather. Currently identical with Move_HAIL -Move_SNOWSCAPE: - loadspritegfx ANIM_TAG_HAIL - loadspritegfx ANIM_TAG_ICE_CRYSTALS - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 6, RGB_BLACK - waitforvisualfinish - createvisualtask AnimTask_Hail, 5 - loopsewithpan SE_M_HAIL, 0, 8, 10 - waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 6, 0, RGB_BLACK - end - Move_POUNCE:: Move_TRAILBLAZE:: Move_CHILLING_WATER:: diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d1795dcf55..90459c5ba8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -429,7 +429,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING .4byte BattleScript_EffectFrostbiteHit @ EFFECT_FROSTBITE_HIT - .4byte BattleScript_EffectSnow @ EFFECT_SNOW + .4byte BattleScript_EffectSnow @ EFFECT_SNOWSCAPE BattleScript_EffectRevivalBlessing:: attackcanceler diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index bcc077055e..4d8330498d 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -406,7 +406,7 @@ #define EFFECT_BARB_BARRAGE 400 #define EFFECT_REVIVAL_BLESSING 401 #define EFFECT_FROSTBITE_HIT 402 -#define EFFECT_SNOW 403 +#define EFFECT_SNOWSCAPE 403 #define NUM_BATTLE_MOVE_EFFECTS 404 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 2aedc32ee8..1fd07ef79f 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1582,7 +1582,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; break; - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) // should snow be discouraged if hail is up? || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; @@ -2808,7 +2808,7 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_PLUS(2); // our partner benefits from hail } break; - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: if (IsBattlerAlive(battlerAtkPartner) && ShouldSetSnow(battlerAtkPartner, atkPartnerAbility, atkPartnerHoldEffect)) { @@ -3977,7 +3977,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; } break; - case EFFECT_SNOW: // any other reasons? + case EFFECT_SNOWSCAPE: // any other reasons? if (ShouldSetSnow(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) { if ((HasMoveEffect(battlerAtk, EFFECT_AURORA_VEIL) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_AURORA_VEIL)) @@ -4976,7 +4976,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: case EFFECT_GEOMANCY: case EFFECT_VICTORY_DANCE: case EFFECT_HIT_SET_ENTRY_HAZARD: @@ -5203,7 +5203,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SUNNY_DAY: case EFFECT_SANDSTORM: case EFFECT_HAIL: - case EFFECT_SNOW: + case EFFECT_SNOWSCAPE: case EFFECT_RAIN_DANCE: score -= 2; break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 010c5a01c9..18acf15cc2 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -331,7 +331,7 @@ static const u16 sEncouragedEncoreEffects[] = EFFECT_SPIT_UP, EFFECT_SWALLOW, EFFECT_HAIL, - EFFECT_SNOW, + EFFECT_SNOWSCAPE, EFFECT_TORMENT, EFFECT_WILL_O_WISP, EFFECT_FOLLOW_ME, @@ -3264,7 +3264,7 @@ bool32 PartnerMoveEffectIsWeather(u8 battlerAtkPartner, u16 partnerMove) || gBattleMoves[partnerMove].effect == EFFECT_RAIN_DANCE || gBattleMoves[partnerMove].effect == EFFECT_SANDSTORM || gBattleMoves[partnerMove].effect == EFFECT_HAIL - || gBattleMoves[partnerMove].effect == EFFECT_SNOW)) + || gBattleMoves[partnerMove].effect == EFFECT_SNOWSCAPE)) return TRUE; return FALSE; diff --git a/src/battle_message.c b/src/battle_message.c index 66bc4a7737..e2a8eb0cb6 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -363,10 +363,10 @@ static const u8 sText_SunlightGotBright[] = _("The sunlight got bright!"); static const u8 sText_SunlightStrong[] = _("The sunlight is strong."); static const u8 sText_SunlightFaded[] = _("The sunlight faded."); static const u8 sText_StartedHail[] = _("It started to hail!"); -static const u8 sText_StartedSnow[] = _("It started to snow!"); static const u8 sText_HailContinues[] = _("Hail continues to fall."); -static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_HailStopped[] = _("The hail stopped."); +static const u8 sText_StartedSnow[] = _("It started to snow!"); +static const u8 sText_SnowContinues[] = _("Snow continues to fall."); static const u8 sText_SnowStopped[] = _("The snow stopped."); static const u8 sText_FailedToSpitUp[] = _("But it failed to spit up\na thing!"); static const u8 sText_FailedToSwallow[] = _("But it failed to swallow\na thing!"); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3bc77e8485..847ddb9aa9 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16577,4 +16577,4 @@ void BS_SetSnow(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SNOW; } gBattlescriptCurrInstr = cmd->nextInstr; -} \ No newline at end of file +} diff --git a/src/battle_tv.c b/src/battle_tv.c index 74f8c7008c..7379b72e4b 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -251,7 +251,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_SWALLOW] = 3, // [EFFECT_UNUSED_A3] = 1, [EFFECT_HAIL] = 4, - [EFFECT_SNOW] = 4, + [EFFECT_SNOWSCAPE] = 4, [EFFECT_TORMENT] = 7, [EFFECT_FLATTER] = 7, [EFFECT_WILL_O_WISP] = 5, diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 6d88acb8cd..522895992e 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13356,7 +13356,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_SNOWSCAPE] = { - .effect = EFFECT_SNOW, + .effect = EFFECT_SNOWSCAPE, .power = 0, .type = TYPE_ICE, .accuracy = 0, diff --git a/test/ability_snow_warning.c b/test/ability_snow_warning.c index 6c0753ad39..200a14acaf 100644 --- a/test/ability_snow_warning.c +++ b/test/ability_snow_warning.c @@ -1,7 +1,11 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Snow Warning summons hail(snow)") +#if B_SNOW_WARNING < GEN_9 +SINGLE_BATTLE_TEST("Snow Warning summons hail") +#elif B_SNOW_WARNING >= GEN_9 +SINGLE_BATTLE_TEST("Snow Warning summons snow") +#endif { GIVEN { PLAYER(SPECIES_ABOMASNOW) { Ability(ABILITY_SNOW_WARNING); }; diff --git a/test/weather_snow.c b/test/weather_snow.c index 07afa48d57..d313c921bb 100644 --- a/test/weather_snow.c +++ b/test/weather_snow.c @@ -6,11 +6,9 @@ ASSUMPTIONS { - ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOW); - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); - ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); + ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ICE && gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ICE); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE || gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE); } SINGLE_BATTLE_TEST("Snow increases the defense of Ice types by 50 %", s16 damage) @@ -156,4 +154,4 @@ SINGLE_BATTLE_TEST("Snow causes Morning Sun to recover 1/4 of the user's max HP" } #undef MAX_HP -#undef TEST_HP \ No newline at end of file +#undef TEST_HP From 957ee36c75cac33e83eadf540d440164b2902adf Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 2 May 2023 23:25:44 +0200 Subject: [PATCH 164/229] Fix for Ceaseless Edge/Axe Kick visual glitch (#2969) --- data/battle_scripts_1.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 575c889399..23a7632bd3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -452,7 +452,7 @@ BattleScript_StealthRockActivates:: setstealthrock BattleScript_MoveEnd printfromtable gDmgHazardsStringIds waitmessage B_WAIT_TIME_LONG - goto BattleScript_MoveEnd + return BattleScript_EffectDireClaw:: setmoveeffect MOVE_EFFECT_DIRE_CLAW @@ -466,7 +466,7 @@ BattleScript_SpikesActivates:: trysetspikes BattleScript_MoveEnd printfromtable gDmgHazardsStringIds waitmessage B_WAIT_TIME_LONG - goto BattleScript_MoveEnd + return BattleScript_EffectAttackUpUserAlly: jumpifnoally BS_ATTACKER, BattleScript_EffectAttackUp From 1068ec5d9fcf8a6550b1f37d78f4c719c077245b Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Wed, 3 May 2023 13:03:40 +0200 Subject: [PATCH 165/229] Fix Plus/Minus to only work with special moves --- 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 402af3544a..831e658292 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9255,7 +9255,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b #if B_PLUS_MINUS_INTERACTION >= GEN_5 case ABILITY_PLUS: case ABILITY_MINUS: - if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk))) + if (IS_MOVE_SPECIAL(move) && IsBattlerAlive(BATTLE_PARTNER(battlerAtk))) { u32 partnerAbility = GetBattlerAbility(BATTLE_PARTNER(battlerAtk)); if (partnerAbility == ABILITY_PLUS || partnerAbility == ABILITY_MINUS) @@ -9264,11 +9264,11 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b break; #else case ABILITY_PLUS: - if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_MINUS) + if (IS_MOVE_SPECIAL(move) && IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_MINUS) MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_MINUS: - if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_PLUS) + if (IS_MOVE_SPECIAL(move) && IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_PLUS) MulModifier(&modifier, UQ_4_12(1.5)); break; #endif From 069627a7fc03b3f699059b93d2cd8bf5d6e00e49 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Wed, 3 May 2023 15:36:17 +0200 Subject: [PATCH 166/229] Hydra OSX support --- Makefile | 2 +- tools/mgba-rom-test-hydra/main.c | 40 +- tools/patchelf/elf.h | 3147 ++++++++++++++++++++++++++++++ tools/patchelf/patchelf.c | 2 +- 4 files changed, 3186 insertions(+), 5 deletions(-) create mode 100644 tools/patchelf/elf.h diff --git a/Makefile b/Makefile index 87bd771b08..7486e41f0d 100644 --- a/Makefile +++ b/Makefile @@ -480,7 +480,7 @@ endif check: $(TESTELF) @cp $< $(HEADLESSELF) $(PATCHELF) $(HEADLESSELF) gTestRunnerHeadless '\x01' gTestRunnerSkipIsFail "$(TEST_SKIP_IS_FAIL)" - $(ROMTESTHYDRA) $(ROMTEST) $(HEADLESSELF) + $(ROMTESTHYDRA) $(ROMTEST) $(OBJCOPY) $(HEADLESSELF) libagbsyscall: @$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN) diff --git a/tools/mgba-rom-test-hydra/main.c b/tools/mgba-rom-test-hydra/main.c index 8705225b85..2e2fe7ce85 100644 --- a/tools/mgba-rom-test-hydra/main.c +++ b/tools/mgba-rom-test-hydra/main.c @@ -23,7 +23,9 @@ #include #include #include +#ifndef __APPLE__ #include +#endif #include #include #include @@ -176,9 +178,9 @@ static void exit2(int _) int main(int argc, char *argv[]) { - if (argc < 3) + if (argc < 4) { - fprintf(stderr, "usage %s mgba-rom-test rom\n", argv[0]); + fprintf(stderr, "usage %s mgba-rom-test objcopy rom\n", argv[0]); exit(2); } @@ -205,7 +207,7 @@ int main(int argc, char *argv[]) } int elffd; - if ((elffd = open(argv[2], O_RDONLY)) == -1) + if ((elffd = open(argv[3], O_RDONLY)) == -1) { perror("open elffd failed"); exit(2); @@ -264,11 +266,13 @@ int main(int argc, char *argv[]) perror("fork mgba-rom-test failed"); exit(2); } else if (pid == 0) { + #ifndef __APPLE__ if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { perror("prctl failed"); _exit(2); } + #endif if (getppid() != parent_pid) // Parent died. { _exit(2); @@ -332,6 +336,36 @@ int main(int argc, char *argv[]) _exit(2); } } +#ifdef __APPLE__ + pid_t objcopypid = fork(); + if (objcopypid == -1) + { + perror("fork objcopy failed"); + _exit(2); + } + else if (objcopypid == 0) + { + if (execlp(argv[2], argv[2], "-O", "binary", rom_path, rom_path, NULL) == -1) + { + perror("execlp objcopy failed"); + _exit(2); + } + } + else + { + int wstatus; + if (waitpid(objcopypid, &wstatus, 0) == -1) + { + perror("waitpid objcopy failed"); + _exit(2); + } + if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus) != 0) + { + fprintf(stderr, "objcopy exited with an error\n"); + _exit(2); + } + } +#endif // stdbuf is required because otherwise mgba never flushes // stdout. if (execlp("stdbuf", "stdbuf", "-oL", argv[1], "-l15", "-ClogLevel.gba.dma=16", "-Rr0", rom_path, NULL) == -1) diff --git a/tools/patchelf/elf.h b/tools/patchelf/elf.h new file mode 100644 index 0000000000..79d3b974bd --- /dev/null +++ b/tools/patchelf/elf.h @@ -0,0 +1,3147 @@ +/* +From musl include/elf.h + +Copyright © 2005-2014 Rich Felker, et al. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef _ELF_H +#define _ELF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef uint16_t Elf32_Half; +typedef uint16_t Elf64_Half; + +typedef uint32_t Elf32_Word; +typedef int32_t Elf32_Sword; +typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; + +typedef uint64_t Elf32_Xword; +typedef int64_t Elf32_Sxword; +typedef uint64_t Elf64_Xword; +typedef int64_t Elf64_Sxword; + +typedef uint32_t Elf32_Addr; +typedef uint64_t Elf64_Addr; + +typedef uint32_t Elf32_Off; +typedef uint64_t Elf64_Off; + +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; + +typedef Elf32_Half Elf32_Versym; +typedef Elf64_Half Elf64_Versym; + +#define EI_NIDENT (16) + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf32_Half e_type; + Elf32_Half e_machine; + Elf32_Word e_version; + Elf32_Addr e_entry; + Elf32_Off e_phoff; + Elf32_Off e_shoff; + Elf32_Word e_flags; + Elf32_Half e_ehsize; + Elf32_Half e_phentsize; + Elf32_Half e_phnum; + Elf32_Half e_shentsize; + Elf32_Half e_shnum; + Elf32_Half e_shstrndx; +} Elf32_Ehdr; + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf64_Half e_type; + Elf64_Half e_machine; + Elf64_Word e_version; + Elf64_Addr e_entry; + Elf64_Off e_phoff; + Elf64_Off e_shoff; + Elf64_Word e_flags; + Elf64_Half e_ehsize; + Elf64_Half e_phentsize; + Elf64_Half e_phnum; + Elf64_Half e_shentsize; + Elf64_Half e_shnum; + Elf64_Half e_shstrndx; +} Elf64_Ehdr; + +#define EI_MAG0 0 +#define ELFMAG0 0x7f + +#define EI_MAG1 1 +#define ELFMAG1 'E' + +#define EI_MAG2 2 +#define ELFMAG2 'L' + +#define EI_MAG3 3 +#define ELFMAG3 'F' + + +#define ELFMAG "\177ELF" +#define SELFMAG 4 + +#define EI_CLASS 4 +#define ELFCLASSNONE 0 +#define ELFCLASS32 1 +#define ELFCLASS64 2 +#define ELFCLASSNUM 3 + +#define EI_DATA 5 +#define ELFDATANONE 0 +#define ELFDATA2LSB 1 +#define ELFDATA2MSB 2 +#define ELFDATANUM 3 + +#define EI_VERSION 6 + + +#define EI_OSABI 7 +#define ELFOSABI_NONE 0 +#define ELFOSABI_SYSV 0 +#define ELFOSABI_HPUX 1 +#define ELFOSABI_NETBSD 2 +#define ELFOSABI_LINUX 3 +#define ELFOSABI_GNU 3 +#define ELFOSABI_SOLARIS 6 +#define ELFOSABI_AIX 7 +#define ELFOSABI_IRIX 8 +#define ELFOSABI_FREEBSD 9 +#define ELFOSABI_TRU64 10 +#define ELFOSABI_MODESTO 11 +#define ELFOSABI_OPENBSD 12 +#define ELFOSABI_ARM 97 +#define ELFOSABI_STANDALONE 255 + +#define EI_ABIVERSION 8 + +#define EI_PAD 9 + + + +#define ET_NONE 0 +#define ET_REL 1 +#define ET_EXEC 2 +#define ET_DYN 3 +#define ET_CORE 4 +#define ET_NUM 5 +#define ET_LOOS 0xfe00 +#define ET_HIOS 0xfeff +#define ET_LOPROC 0xff00 +#define ET_HIPROC 0xffff + + + +#define EM_NONE 0 +#define EM_M32 1 +#define EM_SPARC 2 +#define EM_386 3 +#define EM_68K 4 +#define EM_88K 5 +#define EM_860 7 +#define EM_MIPS 8 +#define EM_S370 9 +#define EM_MIPS_RS3_LE 10 + +#define EM_PARISC 15 +#define EM_VPP500 17 +#define EM_SPARC32PLUS 18 +#define EM_960 19 +#define EM_PPC 20 +#define EM_PPC64 21 +#define EM_S390 22 + +#define EM_V800 36 +#define EM_FR20 37 +#define EM_RH32 38 +#define EM_RCE 39 +#define EM_ARM 40 +#define EM_FAKE_ALPHA 41 +#define EM_SH 42 +#define EM_SPARCV9 43 +#define EM_TRICORE 44 +#define EM_ARC 45 +#define EM_H8_300 46 +#define EM_H8_300H 47 +#define EM_H8S 48 +#define EM_H8_500 49 +#define EM_IA_64 50 +#define EM_MIPS_X 51 +#define EM_COLDFIRE 52 +#define EM_68HC12 53 +#define EM_MMA 54 +#define EM_PCP 55 +#define EM_NCPU 56 +#define EM_NDR1 57 +#define EM_STARCORE 58 +#define EM_ME16 59 +#define EM_ST100 60 +#define EM_TINYJ 61 +#define EM_X86_64 62 +#define EM_PDSP 63 + +#define EM_FX66 66 +#define EM_ST9PLUS 67 +#define EM_ST7 68 +#define EM_68HC16 69 +#define EM_68HC11 70 +#define EM_68HC08 71 +#define EM_68HC05 72 +#define EM_SVX 73 +#define EM_ST19 74 +#define EM_VAX 75 +#define EM_CRIS 76 +#define EM_JAVELIN 77 +#define EM_FIREPATH 78 +#define EM_ZSP 79 +#define EM_MMIX 80 +#define EM_HUANY 81 +#define EM_PRISM 82 +#define EM_AVR 83 +#define EM_FR30 84 +#define EM_D10V 85 +#define EM_D30V 86 +#define EM_V850 87 +#define EM_M32R 88 +#define EM_MN10300 89 +#define EM_MN10200 90 +#define EM_PJ 91 +#define EM_OR1K 92 +#define EM_OPENRISC 92 +#define EM_ARC_A5 93 +#define EM_ARC_COMPACT 93 +#define EM_XTENSA 94 +#define EM_VIDEOCORE 95 +#define EM_TMM_GPP 96 +#define EM_NS32K 97 +#define EM_TPC 98 +#define EM_SNP1K 99 +#define EM_ST200 100 +#define EM_IP2K 101 +#define EM_MAX 102 +#define EM_CR 103 +#define EM_F2MC16 104 +#define EM_MSP430 105 +#define EM_BLACKFIN 106 +#define EM_SE_C33 107 +#define EM_SEP 108 +#define EM_ARCA 109 +#define EM_UNICORE 110 +#define EM_EXCESS 111 +#define EM_DXP 112 +#define EM_ALTERA_NIOS2 113 +#define EM_CRX 114 +#define EM_XGATE 115 +#define EM_C166 116 +#define EM_M16C 117 +#define EM_DSPIC30F 118 +#define EM_CE 119 +#define EM_M32C 120 +#define EM_TSK3000 131 +#define EM_RS08 132 +#define EM_SHARC 133 +#define EM_ECOG2 134 +#define EM_SCORE7 135 +#define EM_DSP24 136 +#define EM_VIDEOCORE3 137 +#define EM_LATTICEMICO32 138 +#define EM_SE_C17 139 +#define EM_TI_C6000 140 +#define EM_TI_C2000 141 +#define EM_TI_C5500 142 +#define EM_TI_ARP32 143 +#define EM_TI_PRU 144 +#define EM_MMDSP_PLUS 160 +#define EM_CYPRESS_M8C 161 +#define EM_R32C 162 +#define EM_TRIMEDIA 163 +#define EM_QDSP6 164 +#define EM_8051 165 +#define EM_STXP7X 166 +#define EM_NDS32 167 +#define EM_ECOG1X 168 +#define EM_MAXQ30 169 +#define EM_XIMO16 170 +#define EM_MANIK 171 +#define EM_CRAYNV2 172 +#define EM_RX 173 +#define EM_METAG 174 +#define EM_MCST_ELBRUS 175 +#define EM_ECOG16 176 +#define EM_CR16 177 +#define EM_ETPU 178 +#define EM_SLE9X 179 +#define EM_L10M 180 +#define EM_K10M 181 +#define EM_AARCH64 183 +#define EM_AVR32 185 +#define EM_STM8 186 +#define EM_TILE64 187 +#define EM_TILEPRO 188 +#define EM_MICROBLAZE 189 +#define EM_CUDA 190 +#define EM_TILEGX 191 +#define EM_CLOUDSHIELD 192 +#define EM_COREA_1ST 193 +#define EM_COREA_2ND 194 +#define EM_ARC_COMPACT2 195 +#define EM_OPEN8 196 +#define EM_RL78 197 +#define EM_VIDEOCORE5 198 +#define EM_78KOR 199 +#define EM_56800EX 200 +#define EM_BA1 201 +#define EM_BA2 202 +#define EM_XCORE 203 +#define EM_MCHP_PIC 204 +#define EM_KM32 210 +#define EM_KMX32 211 +#define EM_EMX16 212 +#define EM_EMX8 213 +#define EM_KVARC 214 +#define EM_CDP 215 +#define EM_COGE 216 +#define EM_COOL 217 +#define EM_NORC 218 +#define EM_CSR_KALIMBA 219 +#define EM_Z80 220 +#define EM_VISIUM 221 +#define EM_FT32 222 +#define EM_MOXIE 223 +#define EM_AMDGPU 224 +#define EM_RISCV 243 +#define EM_BPF 247 +#define EM_NUM 248 + +#define EM_ALPHA 0x9026 + +#define EV_NONE 0 +#define EV_CURRENT 1 +#define EV_NUM 2 + +typedef struct { + Elf32_Word sh_name; + Elf32_Word sh_type; + Elf32_Word sh_flags; + Elf32_Addr sh_addr; + Elf32_Off sh_offset; + Elf32_Word sh_size; + Elf32_Word sh_link; + Elf32_Word sh_info; + Elf32_Word sh_addralign; + Elf32_Word sh_entsize; +} Elf32_Shdr; + +typedef struct { + Elf64_Word sh_name; + Elf64_Word sh_type; + Elf64_Xword sh_flags; + Elf64_Addr sh_addr; + Elf64_Off sh_offset; + Elf64_Xword sh_size; + Elf64_Word sh_link; + Elf64_Word sh_info; + Elf64_Xword sh_addralign; + Elf64_Xword sh_entsize; +} Elf64_Shdr; + + + +#define SHN_UNDEF 0 +#define SHN_LORESERVE 0xff00 +#define SHN_LOPROC 0xff00 +#define SHN_BEFORE 0xff00 + +#define SHN_AFTER 0xff01 + +#define SHN_HIPROC 0xff1f +#define SHN_LOOS 0xff20 +#define SHN_HIOS 0xff3f +#define SHN_ABS 0xfff1 +#define SHN_COMMON 0xfff2 +#define SHN_XINDEX 0xffff +#define SHN_HIRESERVE 0xffff + + + +#define SHT_NULL 0 +#define SHT_PROGBITS 1 +#define SHT_SYMTAB 2 +#define SHT_STRTAB 3 +#define SHT_RELA 4 +#define SHT_HASH 5 +#define SHT_DYNAMIC 6 +#define SHT_NOTE 7 +#define SHT_NOBITS 8 +#define SHT_REL 9 +#define SHT_SHLIB 10 +#define SHT_DYNSYM 11 +#define SHT_INIT_ARRAY 14 +#define SHT_FINI_ARRAY 15 +#define SHT_PREINIT_ARRAY 16 +#define SHT_GROUP 17 +#define SHT_SYMTAB_SHNDX 18 +#define SHT_NUM 19 +#define SHT_LOOS 0x60000000 +#define SHT_GNU_ATTRIBUTES 0x6ffffff5 +#define SHT_GNU_HASH 0x6ffffff6 +#define SHT_GNU_LIBLIST 0x6ffffff7 +#define SHT_CHECKSUM 0x6ffffff8 +#define SHT_LOSUNW 0x6ffffffa +#define SHT_SUNW_move 0x6ffffffa +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_GNU_verdef 0x6ffffffd +#define SHT_GNU_verneed 0x6ffffffe +#define SHT_GNU_versym 0x6fffffff +#define SHT_HISUNW 0x6fffffff +#define SHT_HIOS 0x6fffffff +#define SHT_LOPROC 0x70000000 +#define SHT_HIPROC 0x7fffffff +#define SHT_LOUSER 0x80000000 +#define SHT_HIUSER 0x8fffffff + +#define SHF_WRITE (1 << 0) +#define SHF_ALLOC (1 << 1) +#define SHF_EXECINSTR (1 << 2) +#define SHF_MERGE (1 << 4) +#define SHF_STRINGS (1 << 5) +#define SHF_INFO_LINK (1 << 6) +#define SHF_LINK_ORDER (1 << 7) +#define SHF_OS_NONCONFORMING (1 << 8) + +#define SHF_GROUP (1 << 9) +#define SHF_TLS (1 << 10) +#define SHF_COMPRESSED (1 << 11) +#define SHF_MASKOS 0x0ff00000 +#define SHF_MASKPROC 0xf0000000 +#define SHF_ORDERED (1 << 30) +#define SHF_EXCLUDE (1U << 31) + +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + +#define ELFCOMPRESS_ZLIB 1 +#define ELFCOMPRESS_LOOS 0x60000000 +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 +#define ELFCOMPRESS_HIPROC 0x7fffffff + + +#define GRP_COMDAT 0x1 + +typedef struct { + Elf32_Word st_name; + Elf32_Addr st_value; + Elf32_Word st_size; + unsigned char st_info; + unsigned char st_other; + Elf32_Section st_shndx; +} Elf32_Sym; + +typedef struct { + Elf64_Word st_name; + unsigned char st_info; + unsigned char st_other; + Elf64_Section st_shndx; + Elf64_Addr st_value; + Elf64_Xword st_size; +} Elf64_Sym; + +typedef struct { + Elf32_Half si_boundto; + Elf32_Half si_flags; +} Elf32_Syminfo; + +typedef struct { + Elf64_Half si_boundto; + Elf64_Half si_flags; +} Elf64_Syminfo; + +#define SYMINFO_BT_SELF 0xffff +#define SYMINFO_BT_PARENT 0xfffe +#define SYMINFO_BT_LOWRESERVE 0xff00 + +#define SYMINFO_FLG_DIRECT 0x0001 +#define SYMINFO_FLG_PASSTHRU 0x0002 +#define SYMINFO_FLG_COPY 0x0004 +#define SYMINFO_FLG_LAZYLOAD 0x0008 + +#define SYMINFO_NONE 0 +#define SYMINFO_CURRENT 1 +#define SYMINFO_NUM 2 + +#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) +#define ELF32_ST_TYPE(val) ((val) & 0xf) +#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) + +#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) +#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) +#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) + +#define STB_LOCAL 0 +#define STB_GLOBAL 1 +#define STB_WEAK 2 +#define STB_NUM 3 +#define STB_LOOS 10 +#define STB_GNU_UNIQUE 10 +#define STB_HIOS 12 +#define STB_LOPROC 13 +#define STB_HIPROC 15 + +#define STT_NOTYPE 0 +#define STT_OBJECT 1 +#define STT_FUNC 2 +#define STT_SECTION 3 +#define STT_FILE 4 +#define STT_COMMON 5 +#define STT_TLS 6 +#define STT_NUM 7 +#define STT_LOOS 10 +#define STT_GNU_IFUNC 10 +#define STT_HIOS 12 +#define STT_LOPROC 13 +#define STT_HIPROC 15 + +#define STN_UNDEF 0 + +#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) +#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) + +#define STV_DEFAULT 0 +#define STV_INTERNAL 1 +#define STV_HIDDEN 2 +#define STV_PROTECTED 3 + + + + +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; +} Elf32_Rel; + +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; +} Elf64_Rel; + + + +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; + Elf32_Sword r_addend; +} Elf32_Rela; + +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; + Elf64_Sxword r_addend; +} Elf64_Rela; + + + +#define ELF32_R_SYM(val) ((val) >> 8) +#define ELF32_R_TYPE(val) ((val) & 0xff) +#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) + +#define ELF64_R_SYM(i) ((i) >> 32) +#define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) + + + +typedef struct { + Elf32_Word p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + Elf32_Word p_filesz; + Elf32_Word p_memsz; + Elf32_Word p_flags; + Elf32_Word p_align; +} Elf32_Phdr; + +typedef struct { + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; + + + +#define PT_NULL 0 +#define PT_LOAD 1 +#define PT_DYNAMIC 2 +#define PT_INTERP 3 +#define PT_NOTE 4 +#define PT_SHLIB 5 +#define PT_PHDR 6 +#define PT_TLS 7 +#define PT_NUM 8 +#define PT_LOOS 0x60000000 +#define PT_GNU_EH_FRAME 0x6474e550 +#define PT_GNU_STACK 0x6474e551 +#define PT_GNU_RELRO 0x6474e552 +#define PT_LOSUNW 0x6ffffffa +#define PT_SUNWBSS 0x6ffffffa +#define PT_SUNWSTACK 0x6ffffffb +#define PT_HISUNW 0x6fffffff +#define PT_HIOS 0x6fffffff +#define PT_LOPROC 0x70000000 +#define PT_HIPROC 0x7fffffff + + +#define PN_XNUM 0xffff + + +#define PF_X (1 << 0) +#define PF_W (1 << 1) +#define PF_R (1 << 2) +#define PF_MASKOS 0x0ff00000 +#define PF_MASKPROC 0xf0000000 + + + +#define NT_PRSTATUS 1 +#define NT_FPREGSET 2 +#define NT_PRPSINFO 3 +#define NT_PRXREG 4 +#define NT_TASKSTRUCT 4 +#define NT_PLATFORM 5 +#define NT_AUXV 6 +#define NT_GWINDOWS 7 +#define NT_ASRS 8 +#define NT_PSTATUS 10 +#define NT_PSINFO 13 +#define NT_PRCRED 14 +#define NT_UTSNAME 15 +#define NT_LWPSTATUS 16 +#define NT_LWPSINFO 17 +#define NT_PRFPXREG 20 +#define NT_SIGINFO 0x53494749 +#define NT_FILE 0x46494c45 +#define NT_PRXFPREG 0x46e62b7f +#define NT_PPC_VMX 0x100 +#define NT_PPC_SPE 0x101 +#define NT_PPC_VSX 0x102 +#define NT_386_TLS 0x200 +#define NT_386_IOPERM 0x201 +#define NT_X86_XSTATE 0x202 +#define NT_S390_HIGH_GPRS 0x300 +#define NT_S390_TIMER 0x301 +#define NT_S390_TODCMP 0x302 +#define NT_S390_TODPREG 0x303 +#define NT_S390_CTRS 0x304 +#define NT_S390_PREFIX 0x305 +#define NT_S390_LAST_BREAK 0x306 +#define NT_S390_SYSTEM_CALL 0x307 +#define NT_S390_TDB 0x308 +#define NT_ARM_VFP 0x400 +#define NT_ARM_TLS 0x401 +#define NT_ARM_HW_BREAK 0x402 +#define NT_ARM_HW_WATCH 0x403 +#define NT_ARM_SYSTEM_CALL 0x404 +#define NT_ARM_SVE 0x405 +#define NT_METAG_CBUF 0x500 +#define NT_METAG_RPIPE 0x501 +#define NT_METAG_TLS 0x502 +#define NT_VERSION 1 + + + + +typedef struct { + Elf32_Sword d_tag; + union { + Elf32_Word d_val; + Elf32_Addr d_ptr; + } d_un; +} Elf32_Dyn; + +typedef struct { + Elf64_Sxword d_tag; + union { + Elf64_Xword d_val; + Elf64_Addr d_ptr; + } d_un; +} Elf64_Dyn; + + + +#define DT_NULL 0 +#define DT_NEEDED 1 +#define DT_PLTRELSZ 2 +#define DT_PLTGOT 3 +#define DT_HASH 4 +#define DT_STRTAB 5 +#define DT_SYMTAB 6 +#define DT_RELA 7 +#define DT_RELASZ 8 +#define DT_RELAENT 9 +#define DT_STRSZ 10 +#define DT_SYMENT 11 +#define DT_INIT 12 +#define DT_FINI 13 +#define DT_SONAME 14 +#define DT_RPATH 15 +#define DT_SYMBOLIC 16 +#define DT_REL 17 +#define DT_RELSZ 18 +#define DT_RELENT 19 +#define DT_PLTREL 20 +#define DT_DEBUG 21 +#define DT_TEXTREL 22 +#define DT_JMPREL 23 +#define DT_BIND_NOW 24 +#define DT_INIT_ARRAY 25 +#define DT_FINI_ARRAY 26 +#define DT_INIT_ARRAYSZ 27 +#define DT_FINI_ARRAYSZ 28 +#define DT_RUNPATH 29 +#define DT_FLAGS 30 +#define DT_ENCODING 32 +#define DT_PREINIT_ARRAY 32 +#define DT_PREINIT_ARRAYSZ 33 +#define DT_NUM 34 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6ffff000 +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff +#define DT_PROCNUM DT_MIPS_NUM + +#define DT_VALRNGLO 0x6ffffd00 +#define DT_GNU_PRELINKED 0x6ffffdf5 +#define DT_GNU_CONFLICTSZ 0x6ffffdf6 +#define DT_GNU_LIBLISTSZ 0x6ffffdf7 +#define DT_CHECKSUM 0x6ffffdf8 +#define DT_PLTPADSZ 0x6ffffdf9 +#define DT_MOVEENT 0x6ffffdfa +#define DT_MOVESZ 0x6ffffdfb +#define DT_FEATURE_1 0x6ffffdfc +#define DT_POSFLAG_1 0x6ffffdfd + +#define DT_SYMINSZ 0x6ffffdfe +#define DT_SYMINENT 0x6ffffdff +#define DT_VALRNGHI 0x6ffffdff +#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) +#define DT_VALNUM 12 + +#define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_HASH 0x6ffffef5 +#define DT_TLSDESC_PLT 0x6ffffef6 +#define DT_TLSDESC_GOT 0x6ffffef7 +#define DT_GNU_CONFLICT 0x6ffffef8 +#define DT_GNU_LIBLIST 0x6ffffef9 +#define DT_CONFIG 0x6ffffefa +#define DT_DEPAUDIT 0x6ffffefb +#define DT_AUDIT 0x6ffffefc +#define DT_PLTPAD 0x6ffffefd +#define DT_MOVETAB 0x6ffffefe +#define DT_SYMINFO 0x6ffffeff +#define DT_ADDRRNGHI 0x6ffffeff +#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) +#define DT_ADDRNUM 11 + + + +#define DT_VERSYM 0x6ffffff0 + +#define DT_RELACOUNT 0x6ffffff9 +#define DT_RELCOUNT 0x6ffffffa + + +#define DT_FLAGS_1 0x6ffffffb +#define DT_VERDEF 0x6ffffffc + +#define DT_VERDEFNUM 0x6ffffffd +#define DT_VERNEED 0x6ffffffe + +#define DT_VERNEEDNUM 0x6fffffff +#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) +#define DT_VERSIONTAGNUM 16 + + + +#define DT_AUXILIARY 0x7ffffffd +#define DT_FILTER 0x7fffffff +#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) +#define DT_EXTRANUM 3 + + +#define DF_ORIGIN 0x00000001 +#define DF_SYMBOLIC 0x00000002 +#define DF_TEXTREL 0x00000004 +#define DF_BIND_NOW 0x00000008 +#define DF_STATIC_TLS 0x00000010 + + + +#define DF_1_NOW 0x00000001 +#define DF_1_GLOBAL 0x00000002 +#define DF_1_GROUP 0x00000004 +#define DF_1_NODELETE 0x00000008 +#define DF_1_LOADFLTR 0x00000010 +#define DF_1_INITFIRST 0x00000020 +#define DF_1_NOOPEN 0x00000040 +#define DF_1_ORIGIN 0x00000080 +#define DF_1_DIRECT 0x00000100 +#define DF_1_TRANS 0x00000200 +#define DF_1_INTERPOSE 0x00000400 +#define DF_1_NODEFLIB 0x00000800 +#define DF_1_NODUMP 0x00001000 +#define DF_1_CONFALT 0x00002000 +#define DF_1_ENDFILTEE 0x00004000 +#define DF_1_DISPRELDNE 0x00008000 +#define DF_1_DISPRELPND 0x00010000 +#define DF_1_NODIRECT 0x00020000 +#define DF_1_IGNMULDEF 0x00040000 +#define DF_1_NOKSYMS 0x00080000 +#define DF_1_NOHDR 0x00100000 +#define DF_1_EDITED 0x00200000 +#define DF_1_NORELOC 0x00400000 +#define DF_1_SYMINTPOSE 0x00800000 +#define DF_1_GLOBAUDIT 0x01000000 +#define DF_1_SINGLETON 0x02000000 + +#define DTF_1_PARINIT 0x00000001 +#define DTF_1_CONFEXP 0x00000002 + + +#define DF_P1_LAZYLOAD 0x00000001 +#define DF_P1_GROUPPERM 0x00000002 + + + + +typedef struct { + Elf32_Half vd_version; + Elf32_Half vd_flags; + Elf32_Half vd_ndx; + Elf32_Half vd_cnt; + Elf32_Word vd_hash; + Elf32_Word vd_aux; + Elf32_Word vd_next; +} Elf32_Verdef; + +typedef struct { + Elf64_Half vd_version; + Elf64_Half vd_flags; + Elf64_Half vd_ndx; + Elf64_Half vd_cnt; + Elf64_Word vd_hash; + Elf64_Word vd_aux; + Elf64_Word vd_next; +} Elf64_Verdef; + + + +#define VER_DEF_NONE 0 +#define VER_DEF_CURRENT 1 +#define VER_DEF_NUM 2 + + +#define VER_FLG_BASE 0x1 +#define VER_FLG_WEAK 0x2 + + +#define VER_NDX_LOCAL 0 +#define VER_NDX_GLOBAL 1 +#define VER_NDX_LORESERVE 0xff00 +#define VER_NDX_ELIMINATE 0xff01 + + + +typedef struct { + Elf32_Word vda_name; + Elf32_Word vda_next; +} Elf32_Verdaux; + +typedef struct { + Elf64_Word vda_name; + Elf64_Word vda_next; +} Elf64_Verdaux; + + + + +typedef struct { + Elf32_Half vn_version; + Elf32_Half vn_cnt; + Elf32_Word vn_file; + Elf32_Word vn_aux; + Elf32_Word vn_next; +} Elf32_Verneed; + +typedef struct { + Elf64_Half vn_version; + Elf64_Half vn_cnt; + Elf64_Word vn_file; + Elf64_Word vn_aux; + Elf64_Word vn_next; +} Elf64_Verneed; + + + +#define VER_NEED_NONE 0 +#define VER_NEED_CURRENT 1 +#define VER_NEED_NUM 2 + + + +typedef struct { + Elf32_Word vna_hash; + Elf32_Half vna_flags; + Elf32_Half vna_other; + Elf32_Word vna_name; + Elf32_Word vna_next; +} Elf32_Vernaux; + +typedef struct { + Elf64_Word vna_hash; + Elf64_Half vna_flags; + Elf64_Half vna_other; + Elf64_Word vna_name; + Elf64_Word vna_next; +} Elf64_Vernaux; + + + +#define VER_FLG_WEAK 0x2 + + + +typedef struct { + uint32_t a_type; + union { + uint32_t a_val; + } a_un; +} Elf32_auxv_t; + +typedef struct { + uint64_t a_type; + union { + uint64_t a_val; + } a_un; +} Elf64_auxv_t; + + + +#define AT_NULL 0 +#define AT_IGNORE 1 +#define AT_EXECFD 2 +#define AT_PHDR 3 +#define AT_PHENT 4 +#define AT_PHNUM 5 +#define AT_PAGESZ 6 +#define AT_BASE 7 +#define AT_FLAGS 8 +#define AT_ENTRY 9 +#define AT_NOTELF 10 +#define AT_UID 11 +#define AT_EUID 12 +#define AT_GID 13 +#define AT_EGID 14 +#define AT_CLKTCK 17 + + +#define AT_PLATFORM 15 +#define AT_HWCAP 16 + + + + +#define AT_FPUCW 18 + + +#define AT_DCACHEBSIZE 19 +#define AT_ICACHEBSIZE 20 +#define AT_UCACHEBSIZE 21 + + + +#define AT_IGNOREPPC 22 + +#define AT_SECURE 23 + +#define AT_BASE_PLATFORM 24 + +#define AT_RANDOM 25 + +#define AT_HWCAP2 26 + +#define AT_EXECFN 31 + + + +#define AT_SYSINFO 32 +#define AT_SYSINFO_EHDR 33 + + + +#define AT_L1I_CACHESHAPE 34 +#define AT_L1D_CACHESHAPE 35 +#define AT_L2_CACHESHAPE 36 +#define AT_L3_CACHESHAPE 37 + + + + +typedef struct { + Elf32_Word n_namesz; + Elf32_Word n_descsz; + Elf32_Word n_type; +} Elf32_Nhdr; + +typedef struct { + Elf64_Word n_namesz; + Elf64_Word n_descsz; + Elf64_Word n_type; +} Elf64_Nhdr; + + + + +#define ELF_NOTE_SOLARIS "SUNW Solaris" + + +#define ELF_NOTE_GNU "GNU" + + + + + +#define ELF_NOTE_PAGESIZE_HINT 1 + + +#define NT_GNU_ABI_TAG 1 +#define ELF_NOTE_ABI NT_GNU_ABI_TAG + + + +#define ELF_NOTE_OS_LINUX 0 +#define ELF_NOTE_OS_GNU 1 +#define ELF_NOTE_OS_SOLARIS2 2 +#define ELF_NOTE_OS_FREEBSD 3 + +#define NT_GNU_BUILD_ID 3 +#define NT_GNU_GOLD_VERSION 4 + + + +typedef struct { + Elf32_Xword m_value; + Elf32_Word m_info; + Elf32_Word m_poffset; + Elf32_Half m_repeat; + Elf32_Half m_stride; +} Elf32_Move; + +typedef struct { + Elf64_Xword m_value; + Elf64_Xword m_info; + Elf64_Xword m_poffset; + Elf64_Half m_repeat; + Elf64_Half m_stride; +} Elf64_Move; + + +#define ELF32_M_SYM(info) ((info) >> 8) +#define ELF32_M_SIZE(info) ((unsigned char) (info)) +#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) + +#define ELF64_M_SYM(info) ELF32_M_SYM (info) +#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) +#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) + +#define EF_CPU32 0x00810000 + +#define R_68K_NONE 0 +#define R_68K_32 1 +#define R_68K_16 2 +#define R_68K_8 3 +#define R_68K_PC32 4 +#define R_68K_PC16 5 +#define R_68K_PC8 6 +#define R_68K_GOT32 7 +#define R_68K_GOT16 8 +#define R_68K_GOT8 9 +#define R_68K_GOT32O 10 +#define R_68K_GOT16O 11 +#define R_68K_GOT8O 12 +#define R_68K_PLT32 13 +#define R_68K_PLT16 14 +#define R_68K_PLT8 15 +#define R_68K_PLT32O 16 +#define R_68K_PLT16O 17 +#define R_68K_PLT8O 18 +#define R_68K_COPY 19 +#define R_68K_GLOB_DAT 20 +#define R_68K_JMP_SLOT 21 +#define R_68K_RELATIVE 22 +#define R_68K_NUM 23 + +#define R_386_NONE 0 +#define R_386_32 1 +#define R_386_PC32 2 +#define R_386_GOT32 3 +#define R_386_PLT32 4 +#define R_386_COPY 5 +#define R_386_GLOB_DAT 6 +#define R_386_JMP_SLOT 7 +#define R_386_RELATIVE 8 +#define R_386_GOTOFF 9 +#define R_386_GOTPC 10 +#define R_386_32PLT 11 +#define R_386_TLS_TPOFF 14 +#define R_386_TLS_IE 15 +#define R_386_TLS_GOTIE 16 +#define R_386_TLS_LE 17 +#define R_386_TLS_GD 18 +#define R_386_TLS_LDM 19 +#define R_386_16 20 +#define R_386_PC16 21 +#define R_386_8 22 +#define R_386_PC8 23 +#define R_386_TLS_GD_32 24 +#define R_386_TLS_GD_PUSH 25 +#define R_386_TLS_GD_CALL 26 +#define R_386_TLS_GD_POP 27 +#define R_386_TLS_LDM_32 28 +#define R_386_TLS_LDM_PUSH 29 +#define R_386_TLS_LDM_CALL 30 +#define R_386_TLS_LDM_POP 31 +#define R_386_TLS_LDO_32 32 +#define R_386_TLS_IE_32 33 +#define R_386_TLS_LE_32 34 +#define R_386_TLS_DTPMOD32 35 +#define R_386_TLS_DTPOFF32 36 +#define R_386_TLS_TPOFF32 37 +#define R_386_SIZE32 38 +#define R_386_TLS_GOTDESC 39 +#define R_386_TLS_DESC_CALL 40 +#define R_386_TLS_DESC 41 +#define R_386_IRELATIVE 42 +#define R_386_GOT32X 43 +#define R_386_NUM 44 + + + + + +#define STT_SPARC_REGISTER 13 + + + +#define EF_SPARCV9_MM 3 +#define EF_SPARCV9_TSO 0 +#define EF_SPARCV9_PSO 1 +#define EF_SPARCV9_RMO 2 +#define EF_SPARC_LEDATA 0x800000 +#define EF_SPARC_EXT_MASK 0xFFFF00 +#define EF_SPARC_32PLUS 0x000100 +#define EF_SPARC_SUN_US1 0x000200 +#define EF_SPARC_HAL_R1 0x000400 +#define EF_SPARC_SUN_US3 0x000800 + + + +#define R_SPARC_NONE 0 +#define R_SPARC_8 1 +#define R_SPARC_16 2 +#define R_SPARC_32 3 +#define R_SPARC_DISP8 4 +#define R_SPARC_DISP16 5 +#define R_SPARC_DISP32 6 +#define R_SPARC_WDISP30 7 +#define R_SPARC_WDISP22 8 +#define R_SPARC_HI22 9 +#define R_SPARC_22 10 +#define R_SPARC_13 11 +#define R_SPARC_LO10 12 +#define R_SPARC_GOT10 13 +#define R_SPARC_GOT13 14 +#define R_SPARC_GOT22 15 +#define R_SPARC_PC10 16 +#define R_SPARC_PC22 17 +#define R_SPARC_WPLT30 18 +#define R_SPARC_COPY 19 +#define R_SPARC_GLOB_DAT 20 +#define R_SPARC_JMP_SLOT 21 +#define R_SPARC_RELATIVE 22 +#define R_SPARC_UA32 23 + + + +#define R_SPARC_PLT32 24 +#define R_SPARC_HIPLT22 25 +#define R_SPARC_LOPLT10 26 +#define R_SPARC_PCPLT32 27 +#define R_SPARC_PCPLT22 28 +#define R_SPARC_PCPLT10 29 +#define R_SPARC_10 30 +#define R_SPARC_11 31 +#define R_SPARC_64 32 +#define R_SPARC_OLO10 33 +#define R_SPARC_HH22 34 +#define R_SPARC_HM10 35 +#define R_SPARC_LM22 36 +#define R_SPARC_PC_HH22 37 +#define R_SPARC_PC_HM10 38 +#define R_SPARC_PC_LM22 39 +#define R_SPARC_WDISP16 40 +#define R_SPARC_WDISP19 41 +#define R_SPARC_GLOB_JMP 42 +#define R_SPARC_7 43 +#define R_SPARC_5 44 +#define R_SPARC_6 45 +#define R_SPARC_DISP64 46 +#define R_SPARC_PLT64 47 +#define R_SPARC_HIX22 48 +#define R_SPARC_LOX10 49 +#define R_SPARC_H44 50 +#define R_SPARC_M44 51 +#define R_SPARC_L44 52 +#define R_SPARC_REGISTER 53 +#define R_SPARC_UA64 54 +#define R_SPARC_UA16 55 +#define R_SPARC_TLS_GD_HI22 56 +#define R_SPARC_TLS_GD_LO10 57 +#define R_SPARC_TLS_GD_ADD 58 +#define R_SPARC_TLS_GD_CALL 59 +#define R_SPARC_TLS_LDM_HI22 60 +#define R_SPARC_TLS_LDM_LO10 61 +#define R_SPARC_TLS_LDM_ADD 62 +#define R_SPARC_TLS_LDM_CALL 63 +#define R_SPARC_TLS_LDO_HIX22 64 +#define R_SPARC_TLS_LDO_LOX10 65 +#define R_SPARC_TLS_LDO_ADD 66 +#define R_SPARC_TLS_IE_HI22 67 +#define R_SPARC_TLS_IE_LO10 68 +#define R_SPARC_TLS_IE_LD 69 +#define R_SPARC_TLS_IE_LDX 70 +#define R_SPARC_TLS_IE_ADD 71 +#define R_SPARC_TLS_LE_HIX22 72 +#define R_SPARC_TLS_LE_LOX10 73 +#define R_SPARC_TLS_DTPMOD32 74 +#define R_SPARC_TLS_DTPMOD64 75 +#define R_SPARC_TLS_DTPOFF32 76 +#define R_SPARC_TLS_DTPOFF64 77 +#define R_SPARC_TLS_TPOFF32 78 +#define R_SPARC_TLS_TPOFF64 79 +#define R_SPARC_GOTDATA_HIX22 80 +#define R_SPARC_GOTDATA_LOX10 81 +#define R_SPARC_GOTDATA_OP_HIX22 82 +#define R_SPARC_GOTDATA_OP_LOX10 83 +#define R_SPARC_GOTDATA_OP 84 +#define R_SPARC_H34 85 +#define R_SPARC_SIZE32 86 +#define R_SPARC_SIZE64 87 +#define R_SPARC_GNU_VTINHERIT 250 +#define R_SPARC_GNU_VTENTRY 251 +#define R_SPARC_REV32 252 + +#define R_SPARC_NUM 253 + + + +#define DT_SPARC_REGISTER 0x70000001 +#define DT_SPARC_NUM 2 + + +#define EF_MIPS_NOREORDER 1 +#define EF_MIPS_PIC 2 +#define EF_MIPS_CPIC 4 +#define EF_MIPS_XGOT 8 +#define EF_MIPS_64BIT_WHIRL 16 +#define EF_MIPS_ABI2 32 +#define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_FP64 512 +#define EF_MIPS_NAN2008 1024 +#define EF_MIPS_ARCH 0xf0000000 + + + +#define EF_MIPS_ARCH_1 0x00000000 +#define EF_MIPS_ARCH_2 0x10000000 +#define EF_MIPS_ARCH_3 0x20000000 +#define EF_MIPS_ARCH_4 0x30000000 +#define EF_MIPS_ARCH_5 0x40000000 +#define EF_MIPS_ARCH_32 0x50000000 +#define EF_MIPS_ARCH_64 0x60000000 +#define EF_MIPS_ARCH_32R2 0x70000000 +#define EF_MIPS_ARCH_64R2 0x80000000 + + +#define E_MIPS_ARCH_1 0x00000000 +#define E_MIPS_ARCH_2 0x10000000 +#define E_MIPS_ARCH_3 0x20000000 +#define E_MIPS_ARCH_4 0x30000000 +#define E_MIPS_ARCH_5 0x40000000 +#define E_MIPS_ARCH_32 0x50000000 +#define E_MIPS_ARCH_64 0x60000000 + + + +#define SHN_MIPS_ACOMMON 0xff00 +#define SHN_MIPS_TEXT 0xff01 +#define SHN_MIPS_DATA 0xff02 +#define SHN_MIPS_SCOMMON 0xff03 +#define SHN_MIPS_SUNDEFINED 0xff04 + + + +#define SHT_MIPS_LIBLIST 0x70000000 +#define SHT_MIPS_MSYM 0x70000001 +#define SHT_MIPS_CONFLICT 0x70000002 +#define SHT_MIPS_GPTAB 0x70000003 +#define SHT_MIPS_UCODE 0x70000004 +#define SHT_MIPS_DEBUG 0x70000005 +#define SHT_MIPS_REGINFO 0x70000006 +#define SHT_MIPS_PACKAGE 0x70000007 +#define SHT_MIPS_PACKSYM 0x70000008 +#define SHT_MIPS_RELD 0x70000009 +#define SHT_MIPS_IFACE 0x7000000b +#define SHT_MIPS_CONTENT 0x7000000c +#define SHT_MIPS_OPTIONS 0x7000000d +#define SHT_MIPS_SHDR 0x70000010 +#define SHT_MIPS_FDESC 0x70000011 +#define SHT_MIPS_EXTSYM 0x70000012 +#define SHT_MIPS_DENSE 0x70000013 +#define SHT_MIPS_PDESC 0x70000014 +#define SHT_MIPS_LOCSYM 0x70000015 +#define SHT_MIPS_AUXSYM 0x70000016 +#define SHT_MIPS_OPTSYM 0x70000017 +#define SHT_MIPS_LOCSTR 0x70000018 +#define SHT_MIPS_LINE 0x70000019 +#define SHT_MIPS_RFDESC 0x7000001a +#define SHT_MIPS_DELTASYM 0x7000001b +#define SHT_MIPS_DELTAINST 0x7000001c +#define SHT_MIPS_DELTACLASS 0x7000001d +#define SHT_MIPS_DWARF 0x7000001e +#define SHT_MIPS_DELTADECL 0x7000001f +#define SHT_MIPS_SYMBOL_LIB 0x70000020 +#define SHT_MIPS_EVENTS 0x70000021 +#define SHT_MIPS_TRANSLATE 0x70000022 +#define SHT_MIPS_PIXIE 0x70000023 +#define SHT_MIPS_XLATE 0x70000024 +#define SHT_MIPS_XLATE_DEBUG 0x70000025 +#define SHT_MIPS_WHIRL 0x70000026 +#define SHT_MIPS_EH_REGION 0x70000027 +#define SHT_MIPS_XLATE_OLD 0x70000028 +#define SHT_MIPS_PDR_EXCEPTION 0x70000029 + + + +#define SHF_MIPS_GPREL 0x10000000 +#define SHF_MIPS_MERGE 0x20000000 +#define SHF_MIPS_ADDR 0x40000000 +#define SHF_MIPS_STRINGS 0x80000000 +#define SHF_MIPS_NOSTRIP 0x08000000 +#define SHF_MIPS_LOCAL 0x04000000 +#define SHF_MIPS_NAMES 0x02000000 +#define SHF_MIPS_NODUPE 0x01000000 + + + + + +#define STO_MIPS_DEFAULT 0x0 +#define STO_MIPS_INTERNAL 0x1 +#define STO_MIPS_HIDDEN 0x2 +#define STO_MIPS_PROTECTED 0x3 +#define STO_MIPS_PLT 0x8 +#define STO_MIPS_SC_ALIGN_UNUSED 0xff + + +#define STB_MIPS_SPLIT_COMMON 13 + + + +typedef union { + struct { + Elf32_Word gt_current_g_value; + Elf32_Word gt_unused; + } gt_header; + struct { + Elf32_Word gt_g_value; + Elf32_Word gt_bytes; + } gt_entry; +} Elf32_gptab; + + + +typedef struct { + Elf32_Word ri_gprmask; + Elf32_Word ri_cprmask[4]; + Elf32_Sword ri_gp_value; +} Elf32_RegInfo; + + + +typedef struct { + unsigned char kind; + + unsigned char size; + Elf32_Section section; + + Elf32_Word info; +} Elf_Options; + + + +#define ODK_NULL 0 +#define ODK_REGINFO 1 +#define ODK_EXCEPTIONS 2 +#define ODK_PAD 3 +#define ODK_HWPATCH 4 +#define ODK_FILL 5 +#define ODK_TAGS 6 +#define ODK_HWAND 7 +#define ODK_HWOR 8 + + + +#define OEX_FPU_MIN 0x1f +#define OEX_FPU_MAX 0x1f00 +#define OEX_PAGE0 0x10000 +#define OEX_SMM 0x20000 +#define OEX_FPDBUG 0x40000 +#define OEX_PRECISEFP OEX_FPDBUG +#define OEX_DISMISS 0x80000 + +#define OEX_FPU_INVAL 0x10 +#define OEX_FPU_DIV0 0x08 +#define OEX_FPU_OFLO 0x04 +#define OEX_FPU_UFLO 0x02 +#define OEX_FPU_INEX 0x01 + + + +#define OHW_R4KEOP 0x1 +#define OHW_R8KPFETCH 0x2 +#define OHW_R5KEOP 0x4 +#define OHW_R5KCVTL 0x8 + +#define OPAD_PREFIX 0x1 +#define OPAD_POSTFIX 0x2 +#define OPAD_SYMBOL 0x4 + + + +typedef struct { + Elf32_Word hwp_flags1; + Elf32_Word hwp_flags2; +} Elf_Options_Hw; + + + +#define OHWA0_R4KEOP_CHECKED 0x00000001 +#define OHWA1_R4KEOP_CLEAN 0x00000002 + + + +#define R_MIPS_NONE 0 +#define R_MIPS_16 1 +#define R_MIPS_32 2 +#define R_MIPS_REL32 3 +#define R_MIPS_26 4 +#define R_MIPS_HI16 5 +#define R_MIPS_LO16 6 +#define R_MIPS_GPREL16 7 +#define R_MIPS_LITERAL 8 +#define R_MIPS_GOT16 9 +#define R_MIPS_PC16 10 +#define R_MIPS_CALL16 11 +#define R_MIPS_GPREL32 12 + +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 +#define R_MIPS_JALR 37 +#define R_MIPS_TLS_DTPMOD32 38 +#define R_MIPS_TLS_DTPREL32 39 +#define R_MIPS_TLS_DTPMOD64 40 +#define R_MIPS_TLS_DTPREL64 41 +#define R_MIPS_TLS_GD 42 +#define R_MIPS_TLS_LDM 43 +#define R_MIPS_TLS_DTPREL_HI16 44 +#define R_MIPS_TLS_DTPREL_LO16 45 +#define R_MIPS_TLS_GOTTPREL 46 +#define R_MIPS_TLS_TPREL32 47 +#define R_MIPS_TLS_TPREL64 48 +#define R_MIPS_TLS_TPREL_HI16 49 +#define R_MIPS_TLS_TPREL_LO16 50 +#define R_MIPS_GLOB_DAT 51 +#define R_MIPS_COPY 126 +#define R_MIPS_JUMP_SLOT 127 + +#define R_MIPS_NUM 128 + + + +#define PT_MIPS_REGINFO 0x70000000 +#define PT_MIPS_RTPROC 0x70000001 +#define PT_MIPS_OPTIONS 0x70000002 +#define PT_MIPS_ABIFLAGS 0x70000003 + + + +#define PF_MIPS_LOCAL 0x10000000 + + + +#define DT_MIPS_RLD_VERSION 0x70000001 +#define DT_MIPS_TIME_STAMP 0x70000002 +#define DT_MIPS_ICHECKSUM 0x70000003 +#define DT_MIPS_IVERSION 0x70000004 +#define DT_MIPS_FLAGS 0x70000005 +#define DT_MIPS_BASE_ADDRESS 0x70000006 +#define DT_MIPS_MSYM 0x70000007 +#define DT_MIPS_CONFLICT 0x70000008 +#define DT_MIPS_LIBLIST 0x70000009 +#define DT_MIPS_LOCAL_GOTNO 0x7000000a +#define DT_MIPS_CONFLICTNO 0x7000000b +#define DT_MIPS_LIBLISTNO 0x70000010 +#define DT_MIPS_SYMTABNO 0x70000011 +#define DT_MIPS_UNREFEXTNO 0x70000012 +#define DT_MIPS_GOTSYM 0x70000013 +#define DT_MIPS_HIPAGENO 0x70000014 +#define DT_MIPS_RLD_MAP 0x70000016 +#define DT_MIPS_DELTA_CLASS 0x70000017 +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 + +#define DT_MIPS_DELTA_INSTANCE 0x70000019 +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a + +#define DT_MIPS_DELTA_RELOC 0x7000001b +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c + +#define DT_MIPS_DELTA_SYM 0x7000001d + +#define DT_MIPS_DELTA_SYM_NO 0x7000001e + +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 + +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 + +#define DT_MIPS_CXX_FLAGS 0x70000022 +#define DT_MIPS_PIXIE_INIT 0x70000023 +#define DT_MIPS_SYMBOL_LIB 0x70000024 +#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 +#define DT_MIPS_LOCAL_GOTIDX 0x70000026 +#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 +#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 +#define DT_MIPS_OPTIONS 0x70000029 +#define DT_MIPS_INTERFACE 0x7000002a +#define DT_MIPS_DYNSTR_ALIGN 0x7000002b +#define DT_MIPS_INTERFACE_SIZE 0x7000002c +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d + +#define DT_MIPS_PERF_SUFFIX 0x7000002e + +#define DT_MIPS_COMPACT_SIZE 0x7000002f +#define DT_MIPS_GP_VALUE 0x70000030 +#define DT_MIPS_AUX_DYNAMIC 0x70000031 + +#define DT_MIPS_PLTGOT 0x70000032 + +#define DT_MIPS_RWPLT 0x70000034 +#define DT_MIPS_RLD_MAP_REL 0x70000035 +#define DT_MIPS_NUM 0x36 + + + +#define RHF_NONE 0 +#define RHF_QUICKSTART (1 << 0) +#define RHF_NOTPOT (1 << 1) +#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) +#define RHF_NO_MOVE (1 << 3) +#define RHF_SGI_ONLY (1 << 4) +#define RHF_GUARANTEE_INIT (1 << 5) +#define RHF_DELTA_C_PLUS_PLUS (1 << 6) +#define RHF_GUARANTEE_START_INIT (1 << 7) +#define RHF_PIXIE (1 << 8) +#define RHF_DEFAULT_DELAY_LOAD (1 << 9) +#define RHF_REQUICKSTART (1 << 10) +#define RHF_REQUICKSTARTED (1 << 11) +#define RHF_CORD (1 << 12) +#define RHF_NO_UNRES_UNDEF (1 << 13) +#define RHF_RLD_ORDER_SAFE (1 << 14) + + + +typedef struct { + Elf32_Word l_name; + Elf32_Word l_time_stamp; + Elf32_Word l_checksum; + Elf32_Word l_version; + Elf32_Word l_flags; +} Elf32_Lib; + +typedef struct { + Elf64_Word l_name; + Elf64_Word l_time_stamp; + Elf64_Word l_checksum; + Elf64_Word l_version; + Elf64_Word l_flags; +} Elf64_Lib; + + + + +#define LL_NONE 0 +#define LL_EXACT_MATCH (1 << 0) +#define LL_IGNORE_INT_VER (1 << 1) +#define LL_REQUIRE_MINOR (1 << 2) +#define LL_EXPORTS (1 << 3) +#define LL_DELAY_LOAD (1 << 4) +#define LL_DELTA (1 << 5) + + + +typedef Elf32_Addr Elf32_Conflict; + +typedef struct { + Elf32_Half version; + unsigned char isa_level; + unsigned char isa_rev; + unsigned char gpr_size; + unsigned char cpr1_size; + unsigned char cpr2_size; + unsigned char fp_abi; + Elf32_Word isa_ext; + Elf32_Word ases; + Elf32_Word flags1; + Elf32_Word flags2; +} Elf_MIPS_ABIFlags_v0; + +#define MIPS_AFL_REG_NONE 0x00 +#define MIPS_AFL_REG_32 0x01 +#define MIPS_AFL_REG_64 0x02 +#define MIPS_AFL_REG_128 0x03 + +#define MIPS_AFL_ASE_DSP 0x00000001 +#define MIPS_AFL_ASE_DSPR2 0x00000002 +#define MIPS_AFL_ASE_EVA 0x00000004 +#define MIPS_AFL_ASE_MCU 0x00000008 +#define MIPS_AFL_ASE_MDMX 0x00000010 +#define MIPS_AFL_ASE_MIPS3D 0x00000020 +#define MIPS_AFL_ASE_MT 0x00000040 +#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 +#define MIPS_AFL_ASE_VIRT 0x00000100 +#define MIPS_AFL_ASE_MSA 0x00000200 +#define MIPS_AFL_ASE_MIPS16 0x00000400 +#define MIPS_AFL_ASE_MICROMIPS 0x00000800 +#define MIPS_AFL_ASE_XPA 0x00001000 +#define MIPS_AFL_ASE_MASK 0x00001fff + +#define MIPS_AFL_EXT_XLR 1 +#define MIPS_AFL_EXT_OCTEON2 2 +#define MIPS_AFL_EXT_OCTEONP 3 +#define MIPS_AFL_EXT_LOONGSON_3A 4 +#define MIPS_AFL_EXT_OCTEON 5 +#define MIPS_AFL_EXT_5900 6 +#define MIPS_AFL_EXT_4650 7 +#define MIPS_AFL_EXT_4010 8 +#define MIPS_AFL_EXT_4100 9 +#define MIPS_AFL_EXT_3900 10 +#define MIPS_AFL_EXT_10000 11 +#define MIPS_AFL_EXT_SB1 12 +#define MIPS_AFL_EXT_4111 13 +#define MIPS_AFL_EXT_4120 14 +#define MIPS_AFL_EXT_5400 15 +#define MIPS_AFL_EXT_5500 16 +#define MIPS_AFL_EXT_LOONGSON_2E 17 +#define MIPS_AFL_EXT_LOONGSON_2F 18 + +#define MIPS_AFL_FLAGS1_ODDSPREG 1 + +enum +{ + Val_GNU_MIPS_ABI_FP_ANY = 0, + Val_GNU_MIPS_ABI_FP_DOUBLE = 1, + Val_GNU_MIPS_ABI_FP_SINGLE = 2, + Val_GNU_MIPS_ABI_FP_SOFT = 3, + Val_GNU_MIPS_ABI_FP_OLD_64 = 4, + Val_GNU_MIPS_ABI_FP_XX = 5, + Val_GNU_MIPS_ABI_FP_64 = 6, + Val_GNU_MIPS_ABI_FP_64A = 7, + Val_GNU_MIPS_ABI_FP_MAX = 7 +}; + + + + +#define EF_PARISC_TRAPNIL 0x00010000 +#define EF_PARISC_EXT 0x00020000 +#define EF_PARISC_LSB 0x00040000 +#define EF_PARISC_WIDE 0x00080000 +#define EF_PARISC_NO_KABP 0x00100000 + +#define EF_PARISC_LAZYSWAP 0x00400000 +#define EF_PARISC_ARCH 0x0000ffff + + + +#define EFA_PARISC_1_0 0x020b +#define EFA_PARISC_1_1 0x0210 +#define EFA_PARISC_2_0 0x0214 + + + +#define SHN_PARISC_ANSI_COMMON 0xff00 + +#define SHN_PARISC_HUGE_COMMON 0xff01 + + + +#define SHT_PARISC_EXT 0x70000000 +#define SHT_PARISC_UNWIND 0x70000001 +#define SHT_PARISC_DOC 0x70000002 + + + +#define SHF_PARISC_SHORT 0x20000000 +#define SHF_PARISC_HUGE 0x40000000 +#define SHF_PARISC_SBP 0x80000000 + + + +#define STT_PARISC_MILLICODE 13 + +#define STT_HP_OPAQUE (STT_LOOS + 0x1) +#define STT_HP_STUB (STT_LOOS + 0x2) + + + +#define R_PARISC_NONE 0 +#define R_PARISC_DIR32 1 +#define R_PARISC_DIR21L 2 +#define R_PARISC_DIR17R 3 +#define R_PARISC_DIR17F 4 +#define R_PARISC_DIR14R 6 +#define R_PARISC_PCREL32 9 +#define R_PARISC_PCREL21L 10 +#define R_PARISC_PCREL17R 11 +#define R_PARISC_PCREL17F 12 +#define R_PARISC_PCREL14R 14 +#define R_PARISC_DPREL21L 18 +#define R_PARISC_DPREL14R 22 +#define R_PARISC_GPREL21L 26 +#define R_PARISC_GPREL14R 30 +#define R_PARISC_LTOFF21L 34 +#define R_PARISC_LTOFF14R 38 +#define R_PARISC_SECREL32 41 +#define R_PARISC_SEGBASE 48 +#define R_PARISC_SEGREL32 49 +#define R_PARISC_PLTOFF21L 50 +#define R_PARISC_PLTOFF14R 54 +#define R_PARISC_LTOFF_FPTR32 57 +#define R_PARISC_LTOFF_FPTR21L 58 +#define R_PARISC_LTOFF_FPTR14R 62 +#define R_PARISC_FPTR64 64 +#define R_PARISC_PLABEL32 65 +#define R_PARISC_PLABEL21L 66 +#define R_PARISC_PLABEL14R 70 +#define R_PARISC_PCREL64 72 +#define R_PARISC_PCREL22F 74 +#define R_PARISC_PCREL14WR 75 +#define R_PARISC_PCREL14DR 76 +#define R_PARISC_PCREL16F 77 +#define R_PARISC_PCREL16WF 78 +#define R_PARISC_PCREL16DF 79 +#define R_PARISC_DIR64 80 +#define R_PARISC_DIR14WR 83 +#define R_PARISC_DIR14DR 84 +#define R_PARISC_DIR16F 85 +#define R_PARISC_DIR16WF 86 +#define R_PARISC_DIR16DF 87 +#define R_PARISC_GPREL64 88 +#define R_PARISC_GPREL14WR 91 +#define R_PARISC_GPREL14DR 92 +#define R_PARISC_GPREL16F 93 +#define R_PARISC_GPREL16WF 94 +#define R_PARISC_GPREL16DF 95 +#define R_PARISC_LTOFF64 96 +#define R_PARISC_LTOFF14WR 99 +#define R_PARISC_LTOFF14DR 100 +#define R_PARISC_LTOFF16F 101 +#define R_PARISC_LTOFF16WF 102 +#define R_PARISC_LTOFF16DF 103 +#define R_PARISC_SECREL64 104 +#define R_PARISC_SEGREL64 112 +#define R_PARISC_PLTOFF14WR 115 +#define R_PARISC_PLTOFF14DR 116 +#define R_PARISC_PLTOFF16F 117 +#define R_PARISC_PLTOFF16WF 118 +#define R_PARISC_PLTOFF16DF 119 +#define R_PARISC_LTOFF_FPTR64 120 +#define R_PARISC_LTOFF_FPTR14WR 123 +#define R_PARISC_LTOFF_FPTR14DR 124 +#define R_PARISC_LTOFF_FPTR16F 125 +#define R_PARISC_LTOFF_FPTR16WF 126 +#define R_PARISC_LTOFF_FPTR16DF 127 +#define R_PARISC_LORESERVE 128 +#define R_PARISC_COPY 128 +#define R_PARISC_IPLT 129 +#define R_PARISC_EPLT 130 +#define R_PARISC_TPREL32 153 +#define R_PARISC_TPREL21L 154 +#define R_PARISC_TPREL14R 158 +#define R_PARISC_LTOFF_TP21L 162 +#define R_PARISC_LTOFF_TP14R 166 +#define R_PARISC_LTOFF_TP14F 167 +#define R_PARISC_TPREL64 216 +#define R_PARISC_TPREL14WR 219 +#define R_PARISC_TPREL14DR 220 +#define R_PARISC_TPREL16F 221 +#define R_PARISC_TPREL16WF 222 +#define R_PARISC_TPREL16DF 223 +#define R_PARISC_LTOFF_TP64 224 +#define R_PARISC_LTOFF_TP14WR 227 +#define R_PARISC_LTOFF_TP14DR 228 +#define R_PARISC_LTOFF_TP16F 229 +#define R_PARISC_LTOFF_TP16WF 230 +#define R_PARISC_LTOFF_TP16DF 231 +#define R_PARISC_GNU_VTENTRY 232 +#define R_PARISC_GNU_VTINHERIT 233 +#define R_PARISC_TLS_GD21L 234 +#define R_PARISC_TLS_GD14R 235 +#define R_PARISC_TLS_GDCALL 236 +#define R_PARISC_TLS_LDM21L 237 +#define R_PARISC_TLS_LDM14R 238 +#define R_PARISC_TLS_LDMCALL 239 +#define R_PARISC_TLS_LDO21L 240 +#define R_PARISC_TLS_LDO14R 241 +#define R_PARISC_TLS_DTPMOD32 242 +#define R_PARISC_TLS_DTPMOD64 243 +#define R_PARISC_TLS_DTPOFF32 244 +#define R_PARISC_TLS_DTPOFF64 245 +#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L +#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R +#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L +#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R +#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 +#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 +#define R_PARISC_HIRESERVE 255 + + + +#define PT_HP_TLS (PT_LOOS + 0x0) +#define PT_HP_CORE_NONE (PT_LOOS + 0x1) +#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) +#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) +#define PT_HP_CORE_COMM (PT_LOOS + 0x4) +#define PT_HP_CORE_PROC (PT_LOOS + 0x5) +#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) +#define PT_HP_CORE_STACK (PT_LOOS + 0x7) +#define PT_HP_CORE_SHM (PT_LOOS + 0x8) +#define PT_HP_CORE_MMF (PT_LOOS + 0x9) +#define PT_HP_PARALLEL (PT_LOOS + 0x10) +#define PT_HP_FASTBIND (PT_LOOS + 0x11) +#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) +#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) +#define PT_HP_STACK (PT_LOOS + 0x14) + +#define PT_PARISC_ARCHEXT 0x70000000 +#define PT_PARISC_UNWIND 0x70000001 + + + +#define PF_PARISC_SBP 0x08000000 + +#define PF_HP_PAGE_SIZE 0x00100000 +#define PF_HP_FAR_SHARED 0x00200000 +#define PF_HP_NEAR_SHARED 0x00400000 +#define PF_HP_CODE 0x01000000 +#define PF_HP_MODIFY 0x02000000 +#define PF_HP_LAZYSWAP 0x04000000 +#define PF_HP_SBP 0x08000000 + + + + + + +#define EF_ALPHA_32BIT 1 +#define EF_ALPHA_CANRELAX 2 + + + + +#define SHT_ALPHA_DEBUG 0x70000001 +#define SHT_ALPHA_REGINFO 0x70000002 + + + +#define SHF_ALPHA_GPREL 0x10000000 + + +#define STO_ALPHA_NOPV 0x80 +#define STO_ALPHA_STD_GPLOAD 0x88 + + + +#define R_ALPHA_NONE 0 +#define R_ALPHA_REFLONG 1 +#define R_ALPHA_REFQUAD 2 +#define R_ALPHA_GPREL32 3 +#define R_ALPHA_LITERAL 4 +#define R_ALPHA_LITUSE 5 +#define R_ALPHA_GPDISP 6 +#define R_ALPHA_BRADDR 7 +#define R_ALPHA_HINT 8 +#define R_ALPHA_SREL16 9 +#define R_ALPHA_SREL32 10 +#define R_ALPHA_SREL64 11 +#define R_ALPHA_GPRELHIGH 17 +#define R_ALPHA_GPRELLOW 18 +#define R_ALPHA_GPREL16 19 +#define R_ALPHA_COPY 24 +#define R_ALPHA_GLOB_DAT 25 +#define R_ALPHA_JMP_SLOT 26 +#define R_ALPHA_RELATIVE 27 +#define R_ALPHA_TLS_GD_HI 28 +#define R_ALPHA_TLSGD 29 +#define R_ALPHA_TLS_LDM 30 +#define R_ALPHA_DTPMOD64 31 +#define R_ALPHA_GOTDTPREL 32 +#define R_ALPHA_DTPREL64 33 +#define R_ALPHA_DTPRELHI 34 +#define R_ALPHA_DTPRELLO 35 +#define R_ALPHA_DTPREL16 36 +#define R_ALPHA_GOTTPREL 37 +#define R_ALPHA_TPREL64 38 +#define R_ALPHA_TPRELHI 39 +#define R_ALPHA_TPRELLO 40 +#define R_ALPHA_TPREL16 41 + +#define R_ALPHA_NUM 46 + + +#define LITUSE_ALPHA_ADDR 0 +#define LITUSE_ALPHA_BASE 1 +#define LITUSE_ALPHA_BYTOFF 2 +#define LITUSE_ALPHA_JSR 3 +#define LITUSE_ALPHA_TLS_GD 4 +#define LITUSE_ALPHA_TLS_LDM 5 + + +#define DT_ALPHA_PLTRO (DT_LOPROC + 0) +#define DT_ALPHA_NUM 1 + + + + +#define EF_PPC_EMB 0x80000000 + + +#define EF_PPC_RELOCATABLE 0x00010000 +#define EF_PPC_RELOCATABLE_LIB 0x00008000 + + + +#define R_PPC_NONE 0 +#define R_PPC_ADDR32 1 +#define R_PPC_ADDR24 2 +#define R_PPC_ADDR16 3 +#define R_PPC_ADDR16_LO 4 +#define R_PPC_ADDR16_HI 5 +#define R_PPC_ADDR16_HA 6 +#define R_PPC_ADDR14 7 +#define R_PPC_ADDR14_BRTAKEN 8 +#define R_PPC_ADDR14_BRNTAKEN 9 +#define R_PPC_REL24 10 +#define R_PPC_REL14 11 +#define R_PPC_REL14_BRTAKEN 12 +#define R_PPC_REL14_BRNTAKEN 13 +#define R_PPC_GOT16 14 +#define R_PPC_GOT16_LO 15 +#define R_PPC_GOT16_HI 16 +#define R_PPC_GOT16_HA 17 +#define R_PPC_PLTREL24 18 +#define R_PPC_COPY 19 +#define R_PPC_GLOB_DAT 20 +#define R_PPC_JMP_SLOT 21 +#define R_PPC_RELATIVE 22 +#define R_PPC_LOCAL24PC 23 +#define R_PPC_UADDR32 24 +#define R_PPC_UADDR16 25 +#define R_PPC_REL32 26 +#define R_PPC_PLT32 27 +#define R_PPC_PLTREL32 28 +#define R_PPC_PLT16_LO 29 +#define R_PPC_PLT16_HI 30 +#define R_PPC_PLT16_HA 31 +#define R_PPC_SDAREL16 32 +#define R_PPC_SECTOFF 33 +#define R_PPC_SECTOFF_LO 34 +#define R_PPC_SECTOFF_HI 35 +#define R_PPC_SECTOFF_HA 36 + + +#define R_PPC_TLS 67 +#define R_PPC_DTPMOD32 68 +#define R_PPC_TPREL16 69 +#define R_PPC_TPREL16_LO 70 +#define R_PPC_TPREL16_HI 71 +#define R_PPC_TPREL16_HA 72 +#define R_PPC_TPREL32 73 +#define R_PPC_DTPREL16 74 +#define R_PPC_DTPREL16_LO 75 +#define R_PPC_DTPREL16_HI 76 +#define R_PPC_DTPREL16_HA 77 +#define R_PPC_DTPREL32 78 +#define R_PPC_GOT_TLSGD16 79 +#define R_PPC_GOT_TLSGD16_LO 80 +#define R_PPC_GOT_TLSGD16_HI 81 +#define R_PPC_GOT_TLSGD16_HA 82 +#define R_PPC_GOT_TLSLD16 83 +#define R_PPC_GOT_TLSLD16_LO 84 +#define R_PPC_GOT_TLSLD16_HI 85 +#define R_PPC_GOT_TLSLD16_HA 86 +#define R_PPC_GOT_TPREL16 87 +#define R_PPC_GOT_TPREL16_LO 88 +#define R_PPC_GOT_TPREL16_HI 89 +#define R_PPC_GOT_TPREL16_HA 90 +#define R_PPC_GOT_DTPREL16 91 +#define R_PPC_GOT_DTPREL16_LO 92 +#define R_PPC_GOT_DTPREL16_HI 93 +#define R_PPC_GOT_DTPREL16_HA 94 +#define R_PPC_TLSGD 95 +#define R_PPC_TLSLD 96 + + +#define R_PPC_EMB_NADDR32 101 +#define R_PPC_EMB_NADDR16 102 +#define R_PPC_EMB_NADDR16_LO 103 +#define R_PPC_EMB_NADDR16_HI 104 +#define R_PPC_EMB_NADDR16_HA 105 +#define R_PPC_EMB_SDAI16 106 +#define R_PPC_EMB_SDA2I16 107 +#define R_PPC_EMB_SDA2REL 108 +#define R_PPC_EMB_SDA21 109 +#define R_PPC_EMB_MRKREF 110 +#define R_PPC_EMB_RELSEC16 111 +#define R_PPC_EMB_RELST_LO 112 +#define R_PPC_EMB_RELST_HI 113 +#define R_PPC_EMB_RELST_HA 114 +#define R_PPC_EMB_BIT_FLD 115 +#define R_PPC_EMB_RELSDA 116 + + +#define R_PPC_DIAB_SDA21_LO 180 +#define R_PPC_DIAB_SDA21_HI 181 +#define R_PPC_DIAB_SDA21_HA 182 +#define R_PPC_DIAB_RELSDA_LO 183 +#define R_PPC_DIAB_RELSDA_HI 184 +#define R_PPC_DIAB_RELSDA_HA 185 + + +#define R_PPC_IRELATIVE 248 + + +#define R_PPC_REL16 249 +#define R_PPC_REL16_LO 250 +#define R_PPC_REL16_HI 251 +#define R_PPC_REL16_HA 252 + + + +#define R_PPC_TOC16 255 + + +#define DT_PPC_GOT (DT_LOPROC + 0) +#define DT_PPC_OPT (DT_LOPROC + 1) +#define DT_PPC_NUM 2 + +#define PPC_OPT_TLS 1 + + +#define R_PPC64_NONE R_PPC_NONE +#define R_PPC64_ADDR32 R_PPC_ADDR32 +#define R_PPC64_ADDR24 R_PPC_ADDR24 +#define R_PPC64_ADDR16 R_PPC_ADDR16 +#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO +#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI +#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA +#define R_PPC64_ADDR14 R_PPC_ADDR14 +#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN +#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN +#define R_PPC64_REL24 R_PPC_REL24 +#define R_PPC64_REL14 R_PPC_REL14 +#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN +#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN +#define R_PPC64_GOT16 R_PPC_GOT16 +#define R_PPC64_GOT16_LO R_PPC_GOT16_LO +#define R_PPC64_GOT16_HI R_PPC_GOT16_HI +#define R_PPC64_GOT16_HA R_PPC_GOT16_HA + +#define R_PPC64_COPY R_PPC_COPY +#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT +#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT +#define R_PPC64_RELATIVE R_PPC_RELATIVE + +#define R_PPC64_UADDR32 R_PPC_UADDR32 +#define R_PPC64_UADDR16 R_PPC_UADDR16 +#define R_PPC64_REL32 R_PPC_REL32 +#define R_PPC64_PLT32 R_PPC_PLT32 +#define R_PPC64_PLTREL32 R_PPC_PLTREL32 +#define R_PPC64_PLT16_LO R_PPC_PLT16_LO +#define R_PPC64_PLT16_HI R_PPC_PLT16_HI +#define R_PPC64_PLT16_HA R_PPC_PLT16_HA + +#define R_PPC64_SECTOFF R_PPC_SECTOFF +#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO +#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI +#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA +#define R_PPC64_ADDR30 37 +#define R_PPC64_ADDR64 38 +#define R_PPC64_ADDR16_HIGHER 39 +#define R_PPC64_ADDR16_HIGHERA 40 +#define R_PPC64_ADDR16_HIGHEST 41 +#define R_PPC64_ADDR16_HIGHESTA 42 +#define R_PPC64_UADDR64 43 +#define R_PPC64_REL64 44 +#define R_PPC64_PLT64 45 +#define R_PPC64_PLTREL64 46 +#define R_PPC64_TOC16 47 +#define R_PPC64_TOC16_LO 48 +#define R_PPC64_TOC16_HI 49 +#define R_PPC64_TOC16_HA 50 +#define R_PPC64_TOC 51 +#define R_PPC64_PLTGOT16 52 +#define R_PPC64_PLTGOT16_LO 53 +#define R_PPC64_PLTGOT16_HI 54 +#define R_PPC64_PLTGOT16_HA 55 + +#define R_PPC64_ADDR16_DS 56 +#define R_PPC64_ADDR16_LO_DS 57 +#define R_PPC64_GOT16_DS 58 +#define R_PPC64_GOT16_LO_DS 59 +#define R_PPC64_PLT16_LO_DS 60 +#define R_PPC64_SECTOFF_DS 61 +#define R_PPC64_SECTOFF_LO_DS 62 +#define R_PPC64_TOC16_DS 63 +#define R_PPC64_TOC16_LO_DS 64 +#define R_PPC64_PLTGOT16_DS 65 +#define R_PPC64_PLTGOT16_LO_DS 66 + + +#define R_PPC64_TLS 67 +#define R_PPC64_DTPMOD64 68 +#define R_PPC64_TPREL16 69 +#define R_PPC64_TPREL16_LO 70 +#define R_PPC64_TPREL16_HI 71 +#define R_PPC64_TPREL16_HA 72 +#define R_PPC64_TPREL64 73 +#define R_PPC64_DTPREL16 74 +#define R_PPC64_DTPREL16_LO 75 +#define R_PPC64_DTPREL16_HI 76 +#define R_PPC64_DTPREL16_HA 77 +#define R_PPC64_DTPREL64 78 +#define R_PPC64_GOT_TLSGD16 79 +#define R_PPC64_GOT_TLSGD16_LO 80 +#define R_PPC64_GOT_TLSGD16_HI 81 +#define R_PPC64_GOT_TLSGD16_HA 82 +#define R_PPC64_GOT_TLSLD16 83 +#define R_PPC64_GOT_TLSLD16_LO 84 +#define R_PPC64_GOT_TLSLD16_HI 85 +#define R_PPC64_GOT_TLSLD16_HA 86 +#define R_PPC64_GOT_TPREL16_DS 87 +#define R_PPC64_GOT_TPREL16_LO_DS 88 +#define R_PPC64_GOT_TPREL16_HI 89 +#define R_PPC64_GOT_TPREL16_HA 90 +#define R_PPC64_GOT_DTPREL16_DS 91 +#define R_PPC64_GOT_DTPREL16_LO_DS 92 +#define R_PPC64_GOT_DTPREL16_HI 93 +#define R_PPC64_GOT_DTPREL16_HA 94 +#define R_PPC64_TPREL16_DS 95 +#define R_PPC64_TPREL16_LO_DS 96 +#define R_PPC64_TPREL16_HIGHER 97 +#define R_PPC64_TPREL16_HIGHERA 98 +#define R_PPC64_TPREL16_HIGHEST 99 +#define R_PPC64_TPREL16_HIGHESTA 100 +#define R_PPC64_DTPREL16_DS 101 +#define R_PPC64_DTPREL16_LO_DS 102 +#define R_PPC64_DTPREL16_HIGHER 103 +#define R_PPC64_DTPREL16_HIGHERA 104 +#define R_PPC64_DTPREL16_HIGHEST 105 +#define R_PPC64_DTPREL16_HIGHESTA 106 +#define R_PPC64_TLSGD 107 +#define R_PPC64_TLSLD 108 +#define R_PPC64_TOCSAVE 109 +#define R_PPC64_ADDR16_HIGH 110 +#define R_PPC64_ADDR16_HIGHA 111 +#define R_PPC64_TPREL16_HIGH 112 +#define R_PPC64_TPREL16_HIGHA 113 +#define R_PPC64_DTPREL16_HIGH 114 +#define R_PPC64_DTPREL16_HIGHA 115 + + +#define R_PPC64_JMP_IREL 247 +#define R_PPC64_IRELATIVE 248 +#define R_PPC64_REL16 249 +#define R_PPC64_REL16_LO 250 +#define R_PPC64_REL16_HI 251 +#define R_PPC64_REL16_HA 252 + +#define EF_PPC64_ABI 3 + +#define DT_PPC64_GLINK (DT_LOPROC + 0) +#define DT_PPC64_OPD (DT_LOPROC + 1) +#define DT_PPC64_OPDSZ (DT_LOPROC + 2) +#define DT_PPC64_OPT (DT_LOPROC + 3) +#define DT_PPC64_NUM 4 + +#define PPC64_OPT_TLS 1 +#define PPC64_OPT_MULTI_TOC 2 + +#define STO_PPC64_LOCAL_BIT 5 +#define STO_PPC64_LOCAL_MASK 0xe0 +#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc) + + +#define EF_ARM_RELEXEC 0x01 +#define EF_ARM_HASENTRY 0x02 +#define EF_ARM_INTERWORK 0x04 +#define EF_ARM_APCS_26 0x08 +#define EF_ARM_APCS_FLOAT 0x10 +#define EF_ARM_PIC 0x20 +#define EF_ARM_ALIGN8 0x40 +#define EF_ARM_NEW_ABI 0x80 +#define EF_ARM_OLD_ABI 0x100 +#define EF_ARM_SOFT_FLOAT 0x200 +#define EF_ARM_VFP_FLOAT 0x400 +#define EF_ARM_MAVERICK_FLOAT 0x800 + +#define EF_ARM_ABI_FLOAT_SOFT 0x200 +#define EF_ARM_ABI_FLOAT_HARD 0x400 + + +#define EF_ARM_SYMSARESORTED 0x04 +#define EF_ARM_DYNSYMSUSESEGIDX 0x08 +#define EF_ARM_MAPSYMSFIRST 0x10 +#define EF_ARM_EABIMASK 0XFF000000 + + +#define EF_ARM_BE8 0x00800000 +#define EF_ARM_LE8 0x00400000 + +#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) +#define EF_ARM_EABI_UNKNOWN 0x00000000 +#define EF_ARM_EABI_VER1 0x01000000 +#define EF_ARM_EABI_VER2 0x02000000 +#define EF_ARM_EABI_VER3 0x03000000 +#define EF_ARM_EABI_VER4 0x04000000 +#define EF_ARM_EABI_VER5 0x05000000 + + +#define STT_ARM_TFUNC STT_LOPROC +#define STT_ARM_16BIT STT_HIPROC + + +#define SHF_ARM_ENTRYSECT 0x10000000 +#define SHF_ARM_COMDEF 0x80000000 + + + +#define PF_ARM_SB 0x10000000 + +#define PF_ARM_PI 0x20000000 +#define PF_ARM_ABS 0x40000000 + + +#define PT_ARM_EXIDX (PT_LOPROC + 1) + + +#define SHT_ARM_EXIDX (SHT_LOPROC + 1) +#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) +#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) + +#define R_AARCH64_NONE 0 +#define R_AARCH64_P32_ABS32 1 +#define R_AARCH64_P32_COPY 180 +#define R_AARCH64_P32_GLOB_DAT 181 +#define R_AARCH64_P32_JUMP_SLOT 182 +#define R_AARCH64_P32_RELATIVE 183 +#define R_AARCH64_P32_TLS_DTPMOD 184 +#define R_AARCH64_P32_TLS_DTPREL 185 +#define R_AARCH64_P32_TLS_TPREL 186 +#define R_AARCH64_P32_TLSDESC 187 +#define R_AARCH64_P32_IRELATIVE 188 +#define R_AARCH64_ABS64 257 +#define R_AARCH64_ABS32 258 +#define R_AARCH64_ABS16 259 +#define R_AARCH64_PREL64 260 +#define R_AARCH64_PREL32 261 +#define R_AARCH64_PREL16 262 +#define R_AARCH64_MOVW_UABS_G0 263 +#define R_AARCH64_MOVW_UABS_G0_NC 264 +#define R_AARCH64_MOVW_UABS_G1 265 +#define R_AARCH64_MOVW_UABS_G1_NC 266 +#define R_AARCH64_MOVW_UABS_G2 267 +#define R_AARCH64_MOVW_UABS_G2_NC 268 +#define R_AARCH64_MOVW_UABS_G3 269 +#define R_AARCH64_MOVW_SABS_G0 270 +#define R_AARCH64_MOVW_SABS_G1 271 +#define R_AARCH64_MOVW_SABS_G2 272 +#define R_AARCH64_LD_PREL_LO19 273 +#define R_AARCH64_ADR_PREL_LO21 274 +#define R_AARCH64_ADR_PREL_PG_HI21 275 +#define R_AARCH64_ADR_PREL_PG_HI21_NC 276 +#define R_AARCH64_ADD_ABS_LO12_NC 277 +#define R_AARCH64_LDST8_ABS_LO12_NC 278 +#define R_AARCH64_TSTBR14 279 +#define R_AARCH64_CONDBR19 280 +#define R_AARCH64_JUMP26 282 +#define R_AARCH64_CALL26 283 +#define R_AARCH64_LDST16_ABS_LO12_NC 284 +#define R_AARCH64_LDST32_ABS_LO12_NC 285 +#define R_AARCH64_LDST64_ABS_LO12_NC 286 +#define R_AARCH64_MOVW_PREL_G0 287 +#define R_AARCH64_MOVW_PREL_G0_NC 288 +#define R_AARCH64_MOVW_PREL_G1 289 +#define R_AARCH64_MOVW_PREL_G1_NC 290 +#define R_AARCH64_MOVW_PREL_G2 291 +#define R_AARCH64_MOVW_PREL_G2_NC 292 +#define R_AARCH64_MOVW_PREL_G3 293 +#define R_AARCH64_LDST128_ABS_LO12_NC 299 +#define R_AARCH64_MOVW_GOTOFF_G0 300 +#define R_AARCH64_MOVW_GOTOFF_G0_NC 301 +#define R_AARCH64_MOVW_GOTOFF_G1 302 +#define R_AARCH64_MOVW_GOTOFF_G1_NC 303 +#define R_AARCH64_MOVW_GOTOFF_G2 304 +#define R_AARCH64_MOVW_GOTOFF_G2_NC 305 +#define R_AARCH64_MOVW_GOTOFF_G3 306 +#define R_AARCH64_GOTREL64 307 +#define R_AARCH64_GOTREL32 308 +#define R_AARCH64_GOT_LD_PREL19 309 +#define R_AARCH64_LD64_GOTOFF_LO15 310 +#define R_AARCH64_ADR_GOT_PAGE 311 +#define R_AARCH64_LD64_GOT_LO12_NC 312 +#define R_AARCH64_LD64_GOTPAGE_LO15 313 +#define R_AARCH64_TLSGD_ADR_PREL21 512 +#define R_AARCH64_TLSGD_ADR_PAGE21 513 +#define R_AARCH64_TLSGD_ADD_LO12_NC 514 +#define R_AARCH64_TLSGD_MOVW_G1 515 +#define R_AARCH64_TLSGD_MOVW_G0_NC 516 +#define R_AARCH64_TLSLD_ADR_PREL21 517 +#define R_AARCH64_TLSLD_ADR_PAGE21 518 +#define R_AARCH64_TLSLD_ADD_LO12_NC 519 +#define R_AARCH64_TLSLD_MOVW_G1 520 +#define R_AARCH64_TLSLD_MOVW_G0_NC 521 +#define R_AARCH64_TLSLD_LD_PREL19 522 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 +#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 +#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 +#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 +#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 +#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 +#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 +#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 +#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 +#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 +#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 +#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 +#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 +#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 +#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 +#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 +#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 +#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 +#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 +#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 +#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 +#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 +#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 +#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 +#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 +#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 +#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 +#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 +#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 +#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 +#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 +#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 +#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 +#define R_AARCH64_TLSDESC_LD_PREL19 560 +#define R_AARCH64_TLSDESC_ADR_PREL21 561 +#define R_AARCH64_TLSDESC_ADR_PAGE21 562 +#define R_AARCH64_TLSDESC_LD64_LO12 563 +#define R_AARCH64_TLSDESC_ADD_LO12 564 +#define R_AARCH64_TLSDESC_OFF_G1 565 +#define R_AARCH64_TLSDESC_OFF_G0_NC 566 +#define R_AARCH64_TLSDESC_LDR 567 +#define R_AARCH64_TLSDESC_ADD 568 +#define R_AARCH64_TLSDESC_CALL 569 +#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 +#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 +#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 +#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 +#define R_AARCH64_COPY 1024 +#define R_AARCH64_GLOB_DAT 1025 +#define R_AARCH64_JUMP_SLOT 1026 +#define R_AARCH64_RELATIVE 1027 +#define R_AARCH64_TLS_DTPMOD 1028 +#define R_AARCH64_TLS_DTPMOD64 1028 +#define R_AARCH64_TLS_DTPREL 1029 +#define R_AARCH64_TLS_DTPREL64 1029 +#define R_AARCH64_TLS_TPREL 1030 +#define R_AARCH64_TLS_TPREL64 1030 +#define R_AARCH64_TLSDESC 1031 + + +#define R_ARM_NONE 0 +#define R_ARM_PC24 1 +#define R_ARM_ABS32 2 +#define R_ARM_REL32 3 +#define R_ARM_PC13 4 +#define R_ARM_ABS16 5 +#define R_ARM_ABS12 6 +#define R_ARM_THM_ABS5 7 +#define R_ARM_ABS8 8 +#define R_ARM_SBREL32 9 +#define R_ARM_THM_PC22 10 +#define R_ARM_THM_PC8 11 +#define R_ARM_AMP_VCALL9 12 +#define R_ARM_TLS_DESC 13 +#define R_ARM_THM_SWI8 14 +#define R_ARM_XPC25 15 +#define R_ARM_THM_XPC22 16 +#define R_ARM_TLS_DTPMOD32 17 +#define R_ARM_TLS_DTPOFF32 18 +#define R_ARM_TLS_TPOFF32 19 +#define R_ARM_COPY 20 +#define R_ARM_GLOB_DAT 21 +#define R_ARM_JUMP_SLOT 22 +#define R_ARM_RELATIVE 23 +#define R_ARM_GOTOFF 24 +#define R_ARM_GOTPC 25 +#define R_ARM_GOT32 26 +#define R_ARM_PLT32 27 +#define R_ARM_CALL 28 +#define R_ARM_JUMP24 29 +#define R_ARM_THM_JUMP24 30 +#define R_ARM_BASE_ABS 31 +#define R_ARM_ALU_PCREL_7_0 32 +#define R_ARM_ALU_PCREL_15_8 33 +#define R_ARM_ALU_PCREL_23_15 34 +#define R_ARM_LDR_SBREL_11_0 35 +#define R_ARM_ALU_SBREL_19_12 36 +#define R_ARM_ALU_SBREL_27_20 37 +#define R_ARM_TARGET1 38 +#define R_ARM_SBREL31 39 +#define R_ARM_V4BX 40 +#define R_ARM_TARGET2 41 +#define R_ARM_PREL31 42 +#define R_ARM_MOVW_ABS_NC 43 +#define R_ARM_MOVT_ABS 44 +#define R_ARM_MOVW_PREL_NC 45 +#define R_ARM_MOVT_PREL 46 +#define R_ARM_THM_MOVW_ABS_NC 47 +#define R_ARM_THM_MOVT_ABS 48 +#define R_ARM_THM_MOVW_PREL_NC 49 +#define R_ARM_THM_MOVT_PREL 50 +#define R_ARM_THM_JUMP19 51 +#define R_ARM_THM_JUMP6 52 +#define R_ARM_THM_ALU_PREL_11_0 53 +#define R_ARM_THM_PC12 54 +#define R_ARM_ABS32_NOI 55 +#define R_ARM_REL32_NOI 56 +#define R_ARM_ALU_PC_G0_NC 57 +#define R_ARM_ALU_PC_G0 58 +#define R_ARM_ALU_PC_G1_NC 59 +#define R_ARM_ALU_PC_G1 60 +#define R_ARM_ALU_PC_G2 61 +#define R_ARM_LDR_PC_G1 62 +#define R_ARM_LDR_PC_G2 63 +#define R_ARM_LDRS_PC_G0 64 +#define R_ARM_LDRS_PC_G1 65 +#define R_ARM_LDRS_PC_G2 66 +#define R_ARM_LDC_PC_G0 67 +#define R_ARM_LDC_PC_G1 68 +#define R_ARM_LDC_PC_G2 69 +#define R_ARM_ALU_SB_G0_NC 70 +#define R_ARM_ALU_SB_G0 71 +#define R_ARM_ALU_SB_G1_NC 72 +#define R_ARM_ALU_SB_G1 73 +#define R_ARM_ALU_SB_G2 74 +#define R_ARM_LDR_SB_G0 75 +#define R_ARM_LDR_SB_G1 76 +#define R_ARM_LDR_SB_G2 77 +#define R_ARM_LDRS_SB_G0 78 +#define R_ARM_LDRS_SB_G1 79 +#define R_ARM_LDRS_SB_G2 80 +#define R_ARM_LDC_SB_G0 81 +#define R_ARM_LDC_SB_G1 82 +#define R_ARM_LDC_SB_G2 83 +#define R_ARM_MOVW_BREL_NC 84 +#define R_ARM_MOVT_BREL 85 +#define R_ARM_MOVW_BREL 86 +#define R_ARM_THM_MOVW_BREL_NC 87 +#define R_ARM_THM_MOVT_BREL 88 +#define R_ARM_THM_MOVW_BREL 89 +#define R_ARM_TLS_GOTDESC 90 +#define R_ARM_TLS_CALL 91 +#define R_ARM_TLS_DESCSEQ 92 +#define R_ARM_THM_TLS_CALL 93 +#define R_ARM_PLT32_ABS 94 +#define R_ARM_GOT_ABS 95 +#define R_ARM_GOT_PREL 96 +#define R_ARM_GOT_BREL12 97 +#define R_ARM_GOTOFF12 98 +#define R_ARM_GOTRELAX 99 +#define R_ARM_GNU_VTENTRY 100 +#define R_ARM_GNU_VTINHERIT 101 +#define R_ARM_THM_PC11 102 +#define R_ARM_THM_PC9 103 +#define R_ARM_TLS_GD32 104 + +#define R_ARM_TLS_LDM32 105 + +#define R_ARM_TLS_LDO32 106 + +#define R_ARM_TLS_IE32 107 + +#define R_ARM_TLS_LE32 108 +#define R_ARM_TLS_LDO12 109 +#define R_ARM_TLS_LE12 110 +#define R_ARM_TLS_IE12GP 111 +#define R_ARM_ME_TOO 128 +#define R_ARM_THM_TLS_DESCSEQ 129 +#define R_ARM_THM_TLS_DESCSEQ16 129 +#define R_ARM_THM_TLS_DESCSEQ32 130 +#define R_ARM_THM_GOT_BREL12 131 +#define R_ARM_IRELATIVE 160 +#define R_ARM_RXPC25 249 +#define R_ARM_RSBREL32 250 +#define R_ARM_THM_RPC22 251 +#define R_ARM_RREL32 252 +#define R_ARM_RABS22 253 +#define R_ARM_RPC24 254 +#define R_ARM_RBASE 255 + +#define R_ARM_NUM 256 + + + + +#define EF_IA_64_MASKOS 0x0000000f +#define EF_IA_64_ABI64 0x00000010 +#define EF_IA_64_ARCH 0xff000000 + + +#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) +#define PT_IA_64_UNWIND (PT_LOPROC + 1) +#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) +#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) +#define PT_IA_64_HP_STACK (PT_LOOS + 0x14) + + +#define PF_IA_64_NORECOV 0x80000000 + + +#define SHT_IA_64_EXT (SHT_LOPROC + 0) +#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) + + +#define SHF_IA_64_SHORT 0x10000000 +#define SHF_IA_64_NORECOV 0x20000000 + + +#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) +#define DT_IA_64_NUM 1 + + +#define R_IA64_NONE 0x00 +#define R_IA64_IMM14 0x21 +#define R_IA64_IMM22 0x22 +#define R_IA64_IMM64 0x23 +#define R_IA64_DIR32MSB 0x24 +#define R_IA64_DIR32LSB 0x25 +#define R_IA64_DIR64MSB 0x26 +#define R_IA64_DIR64LSB 0x27 +#define R_IA64_GPREL22 0x2a +#define R_IA64_GPREL64I 0x2b +#define R_IA64_GPREL32MSB 0x2c +#define R_IA64_GPREL32LSB 0x2d +#define R_IA64_GPREL64MSB 0x2e +#define R_IA64_GPREL64LSB 0x2f +#define R_IA64_LTOFF22 0x32 +#define R_IA64_LTOFF64I 0x33 +#define R_IA64_PLTOFF22 0x3a +#define R_IA64_PLTOFF64I 0x3b +#define R_IA64_PLTOFF64MSB 0x3e +#define R_IA64_PLTOFF64LSB 0x3f +#define R_IA64_FPTR64I 0x43 +#define R_IA64_FPTR32MSB 0x44 +#define R_IA64_FPTR32LSB 0x45 +#define R_IA64_FPTR64MSB 0x46 +#define R_IA64_FPTR64LSB 0x47 +#define R_IA64_PCREL60B 0x48 +#define R_IA64_PCREL21B 0x49 +#define R_IA64_PCREL21M 0x4a +#define R_IA64_PCREL21F 0x4b +#define R_IA64_PCREL32MSB 0x4c +#define R_IA64_PCREL32LSB 0x4d +#define R_IA64_PCREL64MSB 0x4e +#define R_IA64_PCREL64LSB 0x4f +#define R_IA64_LTOFF_FPTR22 0x52 +#define R_IA64_LTOFF_FPTR64I 0x53 +#define R_IA64_LTOFF_FPTR32MSB 0x54 +#define R_IA64_LTOFF_FPTR32LSB 0x55 +#define R_IA64_LTOFF_FPTR64MSB 0x56 +#define R_IA64_LTOFF_FPTR64LSB 0x57 +#define R_IA64_SEGREL32MSB 0x5c +#define R_IA64_SEGREL32LSB 0x5d +#define R_IA64_SEGREL64MSB 0x5e +#define R_IA64_SEGREL64LSB 0x5f +#define R_IA64_SECREL32MSB 0x64 +#define R_IA64_SECREL32LSB 0x65 +#define R_IA64_SECREL64MSB 0x66 +#define R_IA64_SECREL64LSB 0x67 +#define R_IA64_REL32MSB 0x6c +#define R_IA64_REL32LSB 0x6d +#define R_IA64_REL64MSB 0x6e +#define R_IA64_REL64LSB 0x6f +#define R_IA64_LTV32MSB 0x74 +#define R_IA64_LTV32LSB 0x75 +#define R_IA64_LTV64MSB 0x76 +#define R_IA64_LTV64LSB 0x77 +#define R_IA64_PCREL21BI 0x79 +#define R_IA64_PCREL22 0x7a +#define R_IA64_PCREL64I 0x7b +#define R_IA64_IPLTMSB 0x80 +#define R_IA64_IPLTLSB 0x81 +#define R_IA64_COPY 0x84 +#define R_IA64_SUB 0x85 +#define R_IA64_LTOFF22X 0x86 +#define R_IA64_LDXMOV 0x87 +#define R_IA64_TPREL14 0x91 +#define R_IA64_TPREL22 0x92 +#define R_IA64_TPREL64I 0x93 +#define R_IA64_TPREL64MSB 0x96 +#define R_IA64_TPREL64LSB 0x97 +#define R_IA64_LTOFF_TPREL22 0x9a +#define R_IA64_DTPMOD64MSB 0xa6 +#define R_IA64_DTPMOD64LSB 0xa7 +#define R_IA64_LTOFF_DTPMOD22 0xaa +#define R_IA64_DTPREL14 0xb1 +#define R_IA64_DTPREL22 0xb2 +#define R_IA64_DTPREL64I 0xb3 +#define R_IA64_DTPREL32MSB 0xb4 +#define R_IA64_DTPREL32LSB 0xb5 +#define R_IA64_DTPREL64MSB 0xb6 +#define R_IA64_DTPREL64LSB 0xb7 +#define R_IA64_LTOFF_DTPREL22 0xba + + +#define EF_SH_MACH_MASK 0x1f +#define EF_SH_UNKNOWN 0x0 +#define EF_SH1 0x1 +#define EF_SH2 0x2 +#define EF_SH3 0x3 +#define EF_SH_DSP 0x4 +#define EF_SH3_DSP 0x5 +#define EF_SH4AL_DSP 0x6 +#define EF_SH3E 0x8 +#define EF_SH4 0x9 +#define EF_SH2E 0xb +#define EF_SH4A 0xc +#define EF_SH2A 0xd +#define EF_SH4_NOFPU 0x10 +#define EF_SH4A_NOFPU 0x11 +#define EF_SH4_NOMMU_NOFPU 0x12 +#define EF_SH2A_NOFPU 0x13 +#define EF_SH3_NOMMU 0x14 +#define EF_SH2A_SH4_NOFPU 0x15 +#define EF_SH2A_SH3_NOFPU 0x16 +#define EF_SH2A_SH4 0x17 +#define EF_SH2A_SH3E 0x18 + +#define R_SH_NONE 0 +#define R_SH_DIR32 1 +#define R_SH_REL32 2 +#define R_SH_DIR8WPN 3 +#define R_SH_IND12W 4 +#define R_SH_DIR8WPL 5 +#define R_SH_DIR8WPZ 6 +#define R_SH_DIR8BP 7 +#define R_SH_DIR8W 8 +#define R_SH_DIR8L 9 +#define R_SH_SWITCH16 25 +#define R_SH_SWITCH32 26 +#define R_SH_USES 27 +#define R_SH_COUNT 28 +#define R_SH_ALIGN 29 +#define R_SH_CODE 30 +#define R_SH_DATA 31 +#define R_SH_LABEL 32 +#define R_SH_SWITCH8 33 +#define R_SH_GNU_VTINHERIT 34 +#define R_SH_GNU_VTENTRY 35 +#define R_SH_TLS_GD_32 144 +#define R_SH_TLS_LD_32 145 +#define R_SH_TLS_LDO_32 146 +#define R_SH_TLS_IE_32 147 +#define R_SH_TLS_LE_32 148 +#define R_SH_TLS_DTPMOD32 149 +#define R_SH_TLS_DTPOFF32 150 +#define R_SH_TLS_TPOFF32 151 +#define R_SH_GOT32 160 +#define R_SH_PLT32 161 +#define R_SH_COPY 162 +#define R_SH_GLOB_DAT 163 +#define R_SH_JMP_SLOT 164 +#define R_SH_RELATIVE 165 +#define R_SH_GOTOFF 166 +#define R_SH_GOTPC 167 +#define R_SH_GOT20 201 +#define R_SH_GOTOFF20 202 +#define R_SH_GOTFUNCDESC 203 +#define R_SH_GOTFUNCDEST20 204 +#define R_SH_GOTOFFFUNCDESC 205 +#define R_SH_GOTOFFFUNCDEST20 206 +#define R_SH_FUNCDESC 207 +#define R_SH_FUNCDESC_VALUE 208 + +#define R_SH_NUM 256 + + + +#define R_390_NONE 0 +#define R_390_8 1 +#define R_390_12 2 +#define R_390_16 3 +#define R_390_32 4 +#define R_390_PC32 5 +#define R_390_GOT12 6 +#define R_390_GOT32 7 +#define R_390_PLT32 8 +#define R_390_COPY 9 +#define R_390_GLOB_DAT 10 +#define R_390_JMP_SLOT 11 +#define R_390_RELATIVE 12 +#define R_390_GOTOFF32 13 +#define R_390_GOTPC 14 +#define R_390_GOT16 15 +#define R_390_PC16 16 +#define R_390_PC16DBL 17 +#define R_390_PLT16DBL 18 +#define R_390_PC32DBL 19 +#define R_390_PLT32DBL 20 +#define R_390_GOTPCDBL 21 +#define R_390_64 22 +#define R_390_PC64 23 +#define R_390_GOT64 24 +#define R_390_PLT64 25 +#define R_390_GOTENT 26 +#define R_390_GOTOFF16 27 +#define R_390_GOTOFF64 28 +#define R_390_GOTPLT12 29 +#define R_390_GOTPLT16 30 +#define R_390_GOTPLT32 31 +#define R_390_GOTPLT64 32 +#define R_390_GOTPLTENT 33 +#define R_390_PLTOFF16 34 +#define R_390_PLTOFF32 35 +#define R_390_PLTOFF64 36 +#define R_390_TLS_LOAD 37 +#define R_390_TLS_GDCALL 38 + +#define R_390_TLS_LDCALL 39 + +#define R_390_TLS_GD32 40 + +#define R_390_TLS_GD64 41 + +#define R_390_TLS_GOTIE12 42 + +#define R_390_TLS_GOTIE32 43 + +#define R_390_TLS_GOTIE64 44 + +#define R_390_TLS_LDM32 45 + +#define R_390_TLS_LDM64 46 + +#define R_390_TLS_IE32 47 + +#define R_390_TLS_IE64 48 + +#define R_390_TLS_IEENT 49 + +#define R_390_TLS_LE32 50 + +#define R_390_TLS_LE64 51 + +#define R_390_TLS_LDO32 52 + +#define R_390_TLS_LDO64 53 + +#define R_390_TLS_DTPMOD 54 +#define R_390_TLS_DTPOFF 55 +#define R_390_TLS_TPOFF 56 + +#define R_390_20 57 +#define R_390_GOT20 58 +#define R_390_GOTPLT20 59 +#define R_390_TLS_GOTIE20 60 + + +#define R_390_NUM 61 + + + +#define R_CRIS_NONE 0 +#define R_CRIS_8 1 +#define R_CRIS_16 2 +#define R_CRIS_32 3 +#define R_CRIS_8_PCREL 4 +#define R_CRIS_16_PCREL 5 +#define R_CRIS_32_PCREL 6 +#define R_CRIS_GNU_VTINHERIT 7 +#define R_CRIS_GNU_VTENTRY 8 +#define R_CRIS_COPY 9 +#define R_CRIS_GLOB_DAT 10 +#define R_CRIS_JUMP_SLOT 11 +#define R_CRIS_RELATIVE 12 +#define R_CRIS_16_GOT 13 +#define R_CRIS_32_GOT 14 +#define R_CRIS_16_GOTPLT 15 +#define R_CRIS_32_GOTPLT 16 +#define R_CRIS_32_GOTREL 17 +#define R_CRIS_32_PLT_GOTREL 18 +#define R_CRIS_32_PLT_PCREL 19 + +#define R_CRIS_NUM 20 + + + +#define R_X86_64_NONE 0 +#define R_X86_64_64 1 +#define R_X86_64_PC32 2 +#define R_X86_64_GOT32 3 +#define R_X86_64_PLT32 4 +#define R_X86_64_COPY 5 +#define R_X86_64_GLOB_DAT 6 +#define R_X86_64_JUMP_SLOT 7 +#define R_X86_64_RELATIVE 8 +#define R_X86_64_GOTPCREL 9 + +#define R_X86_64_32 10 +#define R_X86_64_32S 11 +#define R_X86_64_16 12 +#define R_X86_64_PC16 13 +#define R_X86_64_8 14 +#define R_X86_64_PC8 15 +#define R_X86_64_DTPMOD64 16 +#define R_X86_64_DTPOFF64 17 +#define R_X86_64_TPOFF64 18 +#define R_X86_64_TLSGD 19 + +#define R_X86_64_TLSLD 20 + +#define R_X86_64_DTPOFF32 21 +#define R_X86_64_GOTTPOFF 22 + +#define R_X86_64_TPOFF32 23 +#define R_X86_64_PC64 24 +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 + +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 + +#define R_X86_64_TLSDESC 36 +#define R_X86_64_IRELATIVE 37 +#define R_X86_64_RELATIVE64 38 +#define R_X86_64_GOTPCRELX 41 +#define R_X86_64_REX_GOTPCRELX 42 +#define R_X86_64_NUM 43 + + + +#define R_MN10300_NONE 0 +#define R_MN10300_32 1 +#define R_MN10300_16 2 +#define R_MN10300_8 3 +#define R_MN10300_PCREL32 4 +#define R_MN10300_PCREL16 5 +#define R_MN10300_PCREL8 6 +#define R_MN10300_GNU_VTINHERIT 7 +#define R_MN10300_GNU_VTENTRY 8 +#define R_MN10300_24 9 +#define R_MN10300_GOTPC32 10 +#define R_MN10300_GOTPC16 11 +#define R_MN10300_GOTOFF32 12 +#define R_MN10300_GOTOFF24 13 +#define R_MN10300_GOTOFF16 14 +#define R_MN10300_PLT32 15 +#define R_MN10300_PLT16 16 +#define R_MN10300_GOT32 17 +#define R_MN10300_GOT24 18 +#define R_MN10300_GOT16 19 +#define R_MN10300_COPY 20 +#define R_MN10300_GLOB_DAT 21 +#define R_MN10300_JMP_SLOT 22 +#define R_MN10300_RELATIVE 23 + +#define R_MN10300_NUM 24 + + + +#define R_M32R_NONE 0 +#define R_M32R_16 1 +#define R_M32R_32 2 +#define R_M32R_24 3 +#define R_M32R_10_PCREL 4 +#define R_M32R_18_PCREL 5 +#define R_M32R_26_PCREL 6 +#define R_M32R_HI16_ULO 7 +#define R_M32R_HI16_SLO 8 +#define R_M32R_LO16 9 +#define R_M32R_SDA16 10 +#define R_M32R_GNU_VTINHERIT 11 +#define R_M32R_GNU_VTENTRY 12 + +#define R_M32R_16_RELA 33 +#define R_M32R_32_RELA 34 +#define R_M32R_24_RELA 35 +#define R_M32R_10_PCREL_RELA 36 +#define R_M32R_18_PCREL_RELA 37 +#define R_M32R_26_PCREL_RELA 38 +#define R_M32R_HI16_ULO_RELA 39 +#define R_M32R_HI16_SLO_RELA 40 +#define R_M32R_LO16_RELA 41 +#define R_M32R_SDA16_RELA 42 +#define R_M32R_RELA_GNU_VTINHERIT 43 +#define R_M32R_RELA_GNU_VTENTRY 44 +#define R_M32R_REL32 45 + +#define R_M32R_GOT24 48 +#define R_M32R_26_PLTREL 49 +#define R_M32R_COPY 50 +#define R_M32R_GLOB_DAT 51 +#define R_M32R_JMP_SLOT 52 +#define R_M32R_RELATIVE 53 +#define R_M32R_GOTOFF 54 +#define R_M32R_GOTPC24 55 +#define R_M32R_GOT16_HI_ULO 56 + +#define R_M32R_GOT16_HI_SLO 57 + +#define R_M32R_GOT16_LO 58 +#define R_M32R_GOTPC_HI_ULO 59 + +#define R_M32R_GOTPC_HI_SLO 60 + +#define R_M32R_GOTPC_LO 61 + +#define R_M32R_GOTOFF_HI_ULO 62 + +#define R_M32R_GOTOFF_HI_SLO 63 + +#define R_M32R_GOTOFF_LO 64 +#define R_M32R_NUM 256 + +#define R_MICROBLAZE_NONE 0 +#define R_MICROBLAZE_32 1 +#define R_MICROBLAZE_32_PCREL 2 +#define R_MICROBLAZE_64_PCREL 3 +#define R_MICROBLAZE_32_PCREL_LO 4 +#define R_MICROBLAZE_64 5 +#define R_MICROBLAZE_32_LO 6 +#define R_MICROBLAZE_SRO32 7 +#define R_MICROBLAZE_SRW32 8 +#define R_MICROBLAZE_64_NONE 9 +#define R_MICROBLAZE_32_SYM_OP_SYM 10 +#define R_MICROBLAZE_GNU_VTINHERIT 11 +#define R_MICROBLAZE_GNU_VTENTRY 12 +#define R_MICROBLAZE_GOTPC_64 13 +#define R_MICROBLAZE_GOT_64 14 +#define R_MICROBLAZE_PLT_64 15 +#define R_MICROBLAZE_REL 16 +#define R_MICROBLAZE_JUMP_SLOT 17 +#define R_MICROBLAZE_GLOB_DAT 18 +#define R_MICROBLAZE_GOTOFF_64 19 +#define R_MICROBLAZE_GOTOFF_32 20 +#define R_MICROBLAZE_COPY 21 +#define R_MICROBLAZE_TLS 22 +#define R_MICROBLAZE_TLSGD 23 +#define R_MICROBLAZE_TLSLD 24 +#define R_MICROBLAZE_TLSDTPMOD32 25 +#define R_MICROBLAZE_TLSDTPREL32 26 +#define R_MICROBLAZE_TLSDTPREL64 27 +#define R_MICROBLAZE_TLSGOTTPREL32 28 +#define R_MICROBLAZE_TLSTPREL32 29 + +#define DT_NIOS2_GP 0x70000002 + +#define R_NIOS2_NONE 0 +#define R_NIOS2_S16 1 +#define R_NIOS2_U16 2 +#define R_NIOS2_PCREL16 3 +#define R_NIOS2_CALL26 4 +#define R_NIOS2_IMM5 5 +#define R_NIOS2_CACHE_OPX 6 +#define R_NIOS2_IMM6 7 +#define R_NIOS2_IMM8 8 +#define R_NIOS2_HI16 9 +#define R_NIOS2_LO16 10 +#define R_NIOS2_HIADJ16 11 +#define R_NIOS2_BFD_RELOC_32 12 +#define R_NIOS2_BFD_RELOC_16 13 +#define R_NIOS2_BFD_RELOC_8 14 +#define R_NIOS2_GPREL 15 +#define R_NIOS2_GNU_VTINHERIT 16 +#define R_NIOS2_GNU_VTENTRY 17 +#define R_NIOS2_UJMP 18 +#define R_NIOS2_CJMP 19 +#define R_NIOS2_CALLR 20 +#define R_NIOS2_ALIGN 21 +#define R_NIOS2_GOT16 22 +#define R_NIOS2_CALL16 23 +#define R_NIOS2_GOTOFF_LO 24 +#define R_NIOS2_GOTOFF_HA 25 +#define R_NIOS2_PCREL_LO 26 +#define R_NIOS2_PCREL_HA 27 +#define R_NIOS2_TLS_GD16 28 +#define R_NIOS2_TLS_LDM16 29 +#define R_NIOS2_TLS_LDO16 30 +#define R_NIOS2_TLS_IE16 31 +#define R_NIOS2_TLS_LE16 32 +#define R_NIOS2_TLS_DTPMOD 33 +#define R_NIOS2_TLS_DTPREL 34 +#define R_NIOS2_TLS_TPREL 35 +#define R_NIOS2_COPY 36 +#define R_NIOS2_GLOB_DAT 37 +#define R_NIOS2_JUMP_SLOT 38 +#define R_NIOS2_RELATIVE 39 +#define R_NIOS2_GOTOFF 40 +#define R_NIOS2_CALL26_NOAT 41 +#define R_NIOS2_GOT_LO 42 +#define R_NIOS2_GOT_HA 43 +#define R_NIOS2_CALL_LO 44 +#define R_NIOS2_CALL_HA 45 + +#define R_OR1K_NONE 0 +#define R_OR1K_32 1 +#define R_OR1K_16 2 +#define R_OR1K_8 3 +#define R_OR1K_LO_16_IN_INSN 4 +#define R_OR1K_HI_16_IN_INSN 5 +#define R_OR1K_INSN_REL_26 6 +#define R_OR1K_GNU_VTENTRY 7 +#define R_OR1K_GNU_VTINHERIT 8 +#define R_OR1K_32_PCREL 9 +#define R_OR1K_16_PCREL 10 +#define R_OR1K_8_PCREL 11 +#define R_OR1K_GOTPC_HI16 12 +#define R_OR1K_GOTPC_LO16 13 +#define R_OR1K_GOT16 14 +#define R_OR1K_PLT26 15 +#define R_OR1K_GOTOFF_HI16 16 +#define R_OR1K_GOTOFF_LO16 17 +#define R_OR1K_COPY 18 +#define R_OR1K_GLOB_DAT 19 +#define R_OR1K_JMP_SLOT 20 +#define R_OR1K_RELATIVE 21 +#define R_OR1K_TLS_GD_HI16 22 +#define R_OR1K_TLS_GD_LO16 23 +#define R_OR1K_TLS_LDM_HI16 24 +#define R_OR1K_TLS_LDM_LO16 25 +#define R_OR1K_TLS_LDO_HI16 26 +#define R_OR1K_TLS_LDO_LO16 27 +#define R_OR1K_TLS_IE_HI16 28 +#define R_OR1K_TLS_IE_LO16 29 +#define R_OR1K_TLS_LE_HI16 30 +#define R_OR1K_TLS_LE_LO16 31 +#define R_OR1K_TLS_TPOFF 32 +#define R_OR1K_TLS_DTPOFF 33 +#define R_OR1K_TLS_DTPMOD 34 + +#define R_BPF_NONE 0 +#define R_BPF_MAP_FD 1 + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/tools/patchelf/patchelf.c b/tools/patchelf/patchelf.c index 19363c55f0..573b5808aa 100644 --- a/tools/patchelf/patchelf.c +++ b/tools/patchelf/patchelf.c @@ -1,5 +1,5 @@ #include -#include +#include "elf.h" #include #include #include From 74f074f5f39da88848cf80a6bfd3463f7fad3a17 Mon Sep 17 00:00:00 2001 From: CallmeEchoo <65783283+CallmeEchoo@users.noreply.github.com> Date: Wed, 3 May 2023 16:26:41 +0200 Subject: [PATCH 167/229] ai scoring for snow and hail relation we generally dont want to ecourage to use snow when hail is up and vice versa to avoid looping between the two weathers if score adds up. so we return false in the ShouldSetX functions if either weather is up We also reduce score by a little as further disincentive to loop and since both effect are so similar that switching between them is usually not a good idea --- src/battle_ai_main.c | 12 ++++++++---- src/battle_ai_util.c | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 1fd07ef79f..76bf2261e6 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -280,7 +280,7 @@ void Ai_InitPartyStruct(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) AI_PARTY->mons[B_SIDE_PLAYER][i].isFainted = TRUE; - + if (isOmniscient) { u32 j; @@ -1578,14 +1578,18 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 8; break; case EFFECT_HAIL: - if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) // should hail be discouraged if snow is up? + if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_PRIMAL_ANY) || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; + else if (gBattleWeather & B_WEATHER_SNOW) + score -= 2; // mainly to prevent looping between hail and snow break; case EFFECT_SNOWSCAPE: - if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) // should snow be discouraged if hail is up? + if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) || PartnerMoveEffectIsWeather(BATTLE_PARTNER(battlerAtk), AI_DATA->partnerMove)) score -= 8; + else if (gBattleWeather & B_WEATHER_HAIL) + score -= 2; // mainly to prevent looping between hail and snow break; case EFFECT_ATTRACT: if (!AI_CanBeInfatuated(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], @@ -3977,7 +3981,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; } break; - case EFFECT_SNOWSCAPE: // any other reasons? + case EFFECT_SNOWSCAPE: if (ShouldSetSnow(battlerAtk, AI_DATA->abilities[battlerAtk], AI_DATA->holdEffects[battlerAtk])) { if ((HasMoveEffect(battlerAtk, EFFECT_AURORA_VEIL) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_AURORA_VEIL)) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 02af845344..13d70f28f2 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -1580,7 +1580,7 @@ bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect) { if (!AI_WeatherHasEffect()) return FALSE; - else if (gBattleWeather & B_WEATHER_HAIL) // dont set hail if snow is up? + else if (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) return FALSE; if (ability == ABILITY_SNOW_CLOAK @@ -1650,11 +1650,11 @@ bool32 ShouldSetSun(u8 battlerAtk, u16 atkAbility, u16 holdEffect) return FALSE; } -bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect) // any other reasons snow should be set? +bool32 ShouldSetSnow(u8 battler, u16 ability, u16 holdEffect) { if (!AI_WeatherHasEffect()) return FALSE; - else if (gBattleWeather & B_WEATHER_SNOW) // dont set snow if hail is up? + else if (gBattleWeather & (B_WEATHER_SNOW | B_WEATHER_HAIL)) return FALSE; if (ability == ABILITY_SNOW_CLOAK From eb5b81684c4409ed00be42b1a29b3f599a7036ba Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 5 May 2023 01:38:12 +0200 Subject: [PATCH 168/229] refactored snow into damaging weather this is necessary for ice body to properly work. doesnt actually do any damage --- data/battle_scripts_1.s | 14 +++----------- include/battle_scripts.h | 2 +- include/constants/battle_string_ids.h | 7 ++----- src/battle_message.c | 12 ++++-------- src/battle_script_commands.c | 14 ++++++++++++++ src/battle_util.c | 19 +++++++++---------- src/data/text/abilities.h | 2 +- 7 files changed, 34 insertions(+), 36 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7e1811c0b9..256db2a1ef 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6851,7 +6851,7 @@ BattleScript_RainContinuesOrEndsEnd:: end2 BattleScript_DamagingWeatherContinues:: - printfromtable gSandStormHailContinuesStringIds + printfromtable gSandStormHailSnowContinuesStringIds waitmessage B_WAIT_TIME_LONG playanimation_var BS_ATTACKER, sB_ANIM_ARG1 setbyte gBattleCommunication, 0 @@ -6883,16 +6883,8 @@ BattleScript_DamagingWeatherContinuesEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE end2 -BattleScript_SnowContinuesOrEnds:: - printfromtable gSnowContinuesStringIds - waitmessage B_WAIT_TIME_LONG - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SNOW_STOPPED, BattleScript_SnowContinuesOrEndsEnd - playanimation BS_ATTACKER, B_ANIM_SNOW_CONTINUES -BattleScript_SnowContinuesOrEndsEnd:: - end2 - -BattleScript_SandStormHailEnds:: - printfromtable gSandStormHailEndStringIds +BattleScript_SandStormHailSnowEnds:: + printfromtable gSandStormHailSnowEndStringIds waitmessage B_WAIT_TIME_LONG end2 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 68b3a0c965..320743694b 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -45,7 +45,7 @@ extern const u8 BattleScript_LevelUp[]; extern const u8 BattleScript_RainContinuesOrEnds[]; extern const u8 BattleScript_SnowContinuesOrEnds[]; extern const u8 BattleScript_DamagingWeatherContinues[]; -extern const u8 BattleScript_SandStormHailEnds[]; +extern const u8 BattleScript_SandStormHailSnowEnds[]; extern const u8 BattleScript_SunlightContinues[]; extern const u8 BattleScript_SunlightFaded[]; extern const u8 BattleScript_OverworldWeatherStarts[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 4946f74e77..ddf1be7736 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -737,13 +737,10 @@ #define B_MSG_DOWNPOUR_CONTINUES 1 #define B_MSG_RAIN_STOPPED 2 -// gSnowContinuesStringIds -#define B_MSG_SNOW_CONTINUES 0 -#define B_MSG_SNOW_STOPPED 1 - -// gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds +// gSandStormHailSnowContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailSnowEndStringIds #define B_MSG_SANDSTORM 0 #define B_MSG_HAIL 1 +#define B_MSG_SNOW 2 // gReflectLightScreenSafeguardStringIds #define B_MSG_SIDE_STATUS_FAILED 0 diff --git a/src/battle_message.c b/src/battle_message.c index e2a8eb0cb6..472cdf4d7f 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1568,10 +1568,11 @@ const u16 gMoveWeatherChangeStringIds[] = [B_MSG_STARTED_SNOW] = STRINGID_STARTEDSNOW, }; -const u16 gSandStormHailContinuesStringIds[] = +const u16 gSandStormHailSnowContinuesStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES, [B_MSG_HAIL] = STRINGID_HAILCONTINUES, + [B_MSG_SNOW] = STRINGID_SNOWCONTINUES, }; const u16 gSandStormHailDmgStringIds[] = @@ -1580,10 +1581,11 @@ const u16 gSandStormHailDmgStringIds[] = [B_MSG_HAIL] = STRINGID_PKMNPELTEDBYHAIL }; -const u16 gSandStormHailEndStringIds[] = +const u16 gSandStormHailSnowEndStringIds[] = { [B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED, [B_MSG_HAIL] = STRINGID_HAILSTOPPED, + [B_MSG_SNOW] = STRINGID_SNOWSTOPPED, }; const u16 gRainContinuesStringIds[] = @@ -1593,12 +1595,6 @@ const u16 gRainContinuesStringIds[] = [B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED }; -const u16 gSnowContinuesStringIds[] = -{ - [B_MSG_SNOW_CONTINUES] = STRINGID_SNOWCONTINUES, - [B_MSG_SNOW_STOPPED] = STRINGID_SNOWSTOPPED, -}; - const u16 gProtectLikeUsedStringIds[] = { [B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 847ddb9aa9..553b4ff97c 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12769,6 +12769,20 @@ static void Cmd_weatherdamage(void) gBattleMoveDamage = 1; } } + if (gBattleWeather & B_WEATHER_SNOW) + { + if (ability == ABILITY_ICE_BODY + && !(gStatuses3[gBattlerAttacker] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) + && !BATTLER_MAX_HP(gBattlerAttacker) + && !(gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK)) + { + gBattlerAbility = gBattlerAttacker; + gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + } + } } gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index 37fc3d81b4..5d13461cf9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2341,7 +2341,7 @@ u8 DoFieldEndTurnEffects(void) if (!(gBattleWeather & B_WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { gBattleWeather &= ~B_WEATHER_SANDSTORM_TEMPORARY; - gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { @@ -2381,7 +2381,7 @@ u8 DoFieldEndTurnEffects(void) if (!(gBattleWeather & B_WEATHER_HAIL_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { gBattleWeather &= ~B_WEATHER_HAIL_TEMPORARY; - gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { @@ -2398,20 +2398,19 @@ u8 DoFieldEndTurnEffects(void) case ENDTURN_SNOW: if (gBattleWeather & B_WEATHER_SNOW) { - if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_SNOW_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { - if (--gWishFutureKnock.weatherDuration == 0) - { - gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_STOPPED; - } + gBattleWeather &= ~B_WEATHER_SNOW_TEMPORARY; + gBattlescriptCurrInstr = BattleScript_SandStormHailSnowEnds; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW_CONTINUES; + gBattlescriptCurrInstr = BattleScript_DamagingWeatherContinues; } - BattleScriptExecute(BattleScript_SnowContinuesOrEnds); + gBattleScripting.animArg1 = B_ANIM_SNOW_CONTINUES; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SNOW; + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turnCountersTracker++; diff --git a/src/data/text/abilities.h b/src/data/text/abilities.h index 96407c3409..368b0cb4dc 100644 --- a/src/data/text/abilities.h +++ b/src/data/text/abilities.h @@ -113,7 +113,7 @@ static const u8 sFilterDescription[] = _("Weakens “supereffective”."); static const u8 sSlowStartDescription[] = _("Takes a while to get going."); static const u8 sScrappyDescription[] = _("Hits Ghost-type Pokémon."); static const u8 sStormDrainDescription[] = _("Draws in Water moves."); -static const u8 sIceBodyDescription[] = _("Slight HP recovery in Hail."); +static const u8 sIceBodyDescription[] = _("HP recovery in Hail or Snow."); static const u8 sSnowWarningDescription[] = _("Summons a hailstorm."); static const u8 sHoneyGatherDescription[] = _("May gather Honey."); static const u8 sFriskDescription[] = _("Checks a foe's item."); From a5f28afe427f51d6f50c11ee879a271b505f5204 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Thu, 4 May 2023 17:01:03 -0700 Subject: [PATCH 169/229] fixed Forecast and Flower Gift --- asm/macros/battle_script.inc | 4 + data/battle_scripts_1.s | 35 ++- include/battle_scripts.h | 1 + include/battle_util.h | 1 - include/config/battle.h | 1 + src/battle_script_commands.c | 27 ++- src/battle_util.c | 98 +-------- src/data/pokemon/form_change_table_pointers.h | 2 + test/ability_flower_gift.c | 86 ++++++++ test/ability_forecast.c | 201 ++++++++++++++++++ 10 files changed, 351 insertions(+), 105 deletions(-) create mode 100644 test/ability_flower_gift.c create mode 100644 test/ability_forecast.c diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 78fb914063..dec096e6e1 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1346,6 +1346,10 @@ callnative BS_ItemRestorePP .endm + .macro trytorevertweatherform + callnative BS_TryRevertWeatherForm + .endm + @ various command changed to more readable macros .macro cancelmultiturnmoves battler:req various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 23a7632bd3..26f30ef3f5 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1580,6 +1580,7 @@ BattleScript_MoveEffectCoreEnforcer:: printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG trytoclearprimalweather + trytorevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 BattleScript_CoreEnforcerRet: @@ -2728,6 +2729,7 @@ BattleScript_EffectSimpleBeam: printstring STRINGID_PKMNACQUIREDSIMPLE waitmessage B_WAIT_TIME_LONG trytoclearprimalweather + trytorevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 tryendneutralizinggas BS_TARGET @@ -2827,6 +2829,7 @@ BattleScript_EffectWorrySeed: printstring STRINGID_PKMNACQUIREDABILITY waitmessage B_WAIT_TIME_LONG trytoclearprimalweather + trytorevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 goto BattleScript_MoveEnd @@ -2958,6 +2961,7 @@ BattleScript_EffectGastroAcid: printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG trytoclearprimalweather + trytorevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 tryendneutralizinggas BS_TARGET @@ -6847,6 +6851,7 @@ BattleScript_RainContinuesOrEnds:: jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES BattleScript_RainContinuesOrEndsEnd:: + call BattleScript_ActivateWeatherAbilities end2 BattleScript_DamagingWeatherContinues:: @@ -6880,22 +6885,26 @@ BattleScript_DamagingWeatherLoopIncrement:: jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop BattleScript_DamagingWeatherContinuesEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE + call BattleScript_ActivateWeatherAbilities end2 BattleScript_SandStormHailEnds:: printfromtable gSandStormHailEndStringIds waitmessage B_WAIT_TIME_LONG + call BattleScript_ActivateWeatherAbilities end2 BattleScript_SunlightContinues:: printstring STRINGID_SUNLIGHTSTRONG waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES + call BattleScript_ActivateWeatherAbilities end2 BattleScript_SunlightFaded:: printstring STRINGID_SUNLIGHTFADED waitmessage B_WAIT_TIME_LONG + call BattleScript_ActivateWeatherAbilities end2 BattleScript_OverworldWeatherStarts:: @@ -8020,6 +8029,19 @@ BattleScript_TargetFormChangeWithString:: waitmessage B_WAIT_TIME_LONG return +BattleScript_TargetFormChangeWithStringNoPopupEnd3:: + pause 5 + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 + handleformchange BS_TARGET, 0 + handleformchange BS_TARGET, 1 + playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL + waitanimation + handleformchange BS_TARGET, 2 + printstring STRINGID_PKMNTRANSFORMED + waitmessage B_WAIT_TIME_LONG + end3 + BattleScript_BattlerFormChangeWithStringEnd3:: pause 5 call BattleScript_AbilityPopUp @@ -8663,14 +8685,15 @@ BattleScript_ShedSkinActivates:: end3 BattleScript_ActivateWeatherAbilities: - copybyte sBATTLER, gBattlerAttacker - setbyte gBattlerAttacker, 0 + savetarget + setbyte gBattlerTarget, 0 BattleScript_ActivateWeatherAbilities_Loop: - activateweatherchangeabilities BS_ATTACKER + copybyte sBATTLER, gBattlerTarget + activateweatherchangeabilities BS_TARGET BattleScript_ActivateWeatherAbilities_Increment: - addbyte gBattlerAttacker, 1 - jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop - copybyte gBattlerAttacker, sBATTLER + addbyte gBattlerTarget, 1 + jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop + restoretarget return BattleScript_TryAdrenalineOrb: diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 8cd8606a54..4a00572753 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -465,6 +465,7 @@ extern const u8 BattleScript_MoveEffectStockpileWoreOff[]; extern const u8 BattleScript_StealthRockActivates[]; extern const u8 BattleScript_SpikesActivates[]; extern const u8 BattleScript_BerserkGeneRet[]; +extern const u8 BattleScript_TargetFormChangeWithStringNoPopupEnd3[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/battle_util.h b/include/battle_util.h index e28e41aad7..0337dacba2 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -139,7 +139,6 @@ void TryClearRageAndFuryCutter(void); u8 AtkCanceller_UnableToUseMove(void); u8 AtkCanceller_UnableToUseMove2(void); bool8 HasNoMonsToSwitch(u8 battlerId, u8 r1, u8 r2); -u8 TryWeatherFormChange(u8 battlerId); bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility); u8 AbilityBattleEffects(u8 caseID, u8 battlerId, u16 ability, u8 special, u16 moveArg); bool32 IsNeutralizingGasOnField(void); diff --git a/include/config/battle.h b/include/config/battle.h index 6a6a829d65..73ae9a7a7c 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -101,6 +101,7 @@ #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. #define B_TRANSFORM_SHINY GEN_LATEST // In Gen4+, Transform will copy the shiny state of the opponent instead of maintaining its own shiny state. #define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. +#define B_WEATHER_FORM_SUPPRESS GEN_LATEST // In Gen5+, Cherrim and Castform revert to their normal forms upon losing their ability. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 1784f9682b..b21197a679 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16414,7 +16414,8 @@ u8 GetFirstFaintedPartyIndex(u8 battlerId) return PARTY_SIZE; } -void BS_ItemRestoreHP(void) { +void BS_ItemRestoreHP(void) +{ NATIVE_ARGS(); u16 healAmount; u32 battlerId = MAX_BATTLERS_COUNT; @@ -16476,7 +16477,8 @@ void BS_ItemRestoreHP(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemCureStatus(void) { +void BS_ItemCureStatus(void) +{ NATIVE_ARGS(); struct Pokemon *party = GetBattlerParty(gBattlerAttacker); @@ -16504,7 +16506,8 @@ void BS_ItemCureStatus(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemIncreaseStat(void) { +void BS_ItemIncreaseStat(void) +{ NATIVE_ARGS(); u16 statId = GetItemEffect(gLastUsedItem)[1]; u16 stages = ItemId_GetHoldEffectParam(gLastUsedItem); @@ -16512,7 +16515,8 @@ void BS_ItemIncreaseStat(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemRestorePP(void) { +void BS_ItemRestorePP(void) +{ NATIVE_ARGS(); const u8 *effect = GetItemEffect(gLastUsedItem); u32 i, pp, maxPP, moveId; @@ -16559,3 +16563,18 @@ void BS_ItemRestorePP(void) { PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(mon, MON_DATA_SPECIES)); gBattlescriptCurrInstr = cmd->nextInstr; } + +void BS_TryRevertWeatherForm(void) +{ + NATIVE_ARGS(); + u16 ability = gBattleMons[gBattlerTarget].ability; + if (B_WEATHER_FORM_SUPPRESS >= GEN_5 + && (ability == ABILITY_FORECAST || ability == ABILITY_FLOWER_GIFT) + && TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_SWITCH)) // revert form + { + gBattleScripting.battler = gBattlerTarget; + BattleScriptPushCursorAndCallback(BattleScript_TargetFormChangeWithStringNoPopupEnd3); + return; + } + gBattlescriptCurrInstr = cmd->nextInstr; +} diff --git a/src/battle_util.c b/src/battle_util.c index 831e658292..67270469ea 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3984,96 +3984,6 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) } } -u8 TryWeatherFormChange(u8 battler) -{ - u8 ret = 0; - bool32 weatherEffect = WEATHER_HAS_EFFECT; - u16 holdEffect = GetBattlerHoldEffect(battler, TRUE); - - switch (gBattleMons[battler].species) - { - case SPECIES_CASTFORM: -/* Placeholder - case SPECIES_CASTFORM_RAINY: - case SPECIES_CASTFORM_SNOWY: - case SPECIES_CASTFORM_SUNNY:*/ -#if B_WEATHER_FORMS >= GEN_5 - if (gBattleMons[battler].hp == 0) - { - ret = 0; // No change - } - else if (GetBattlerAbility(battler) != ABILITY_FORECAST || !weatherEffect) - { - if (!IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) - { - SET_BATTLER_TYPE(battler, TYPE_NORMAL); - ret = CASTFORM_NORMAL + 1; - } - else - { - ret = 0; // No change - } - } -#else - if (GetBattlerAbility(battler) != ABILITY_FORECAST || gBattleMons[battler].hp == 0) - { - ret = 0; // No change - } - else if (!weatherEffect) - { - if (!IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) - { - SET_BATTLER_TYPE(battler, TYPE_NORMAL); - ret = CASTFORM_NORMAL + 1; - } - else - { - ret = 0; // No change - } - } -#endif - else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))) - { - SET_BATTLER_TYPE(battler, TYPE_NORMAL); - ret = CASTFORM_NORMAL + 1; - } - else if (gBattleWeather & B_WEATHER_SUN && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA && !IS_BATTLER_OF_TYPE(battler, TYPE_FIRE)) - { - SET_BATTLER_TYPE(battler, TYPE_FIRE); - ret = CASTFORM_FIRE + 1; - } - else if (gBattleWeather & B_WEATHER_RAIN && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA && !IS_BATTLER_OF_TYPE(battler, TYPE_WATER)) - { - SET_BATTLER_TYPE(battler, TYPE_WATER); - ret = CASTFORM_WATER + 1; - } - else if (gBattleWeather & B_WEATHER_HAIL && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) - { - SET_BATTLER_TYPE(battler, TYPE_ICE); - ret = CASTFORM_ICE + 1; - } - break; - case SPECIES_CHERRIM: -// case SPECIES_CHERRIM_SUNSHINE: - if (gBattleMons[battler].hp == 0) - ret = 0; // No change -#if B_WEATHER_FORMS >= GEN_5 - if (GetBattlerAbility(battler) != ABILITY_FLOWER_GIFT) - if (gBattleMonForms[battler] != 0) - ret = CHERRIM_OVERCAST + 1; - else - ret = 0; // No change -#endif - else if (gBattleMonForms[battler] == 0 && weatherEffect && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA && gBattleWeather & B_WEATHER_SUN) - ret = CHERRIM_SUNSHINE + 1; - else if (gBattleMonForms[battler] != 0 && (!weatherEffect || holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || !(gBattleWeather & B_WEATHER_SUN))) - ret = CHERRIM_OVERCAST + 1; - break; - } - - return ret; -} - static const u16 sWeatherFlagsInfo[][3] = { [ENUM_WEATHER_RAIN] = {B_WEATHER_RAIN_TEMPORARY, B_WEATHER_RAIN_PERMANENT, HOLD_EFFECT_DAMP_ROCK}, @@ -9273,7 +9183,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b break; #endif case ABILITY_FLOWER_GIFT: - if (gBattleMons[battlerAtk].species == SPECIES_CHERRIM && IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN) && IS_MOVE_PHYSICAL(move)) + if (gBattleMons[battlerAtk].species == SPECIES_CHERRIM_SUNSHINE && IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN) && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_HUSTLE: @@ -9313,7 +9223,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b switch (GetBattlerAbility(BATTLE_PARTNER(battlerAtk))) { case ABILITY_FLOWER_GIFT: - if (gBattleMons[BATTLE_PARTNER(battlerAtk)].species == SPECIES_CHERRIM && IsBattlerWeatherAffected(BATTLE_PARTNER(battlerAtk), B_WEATHER_SUN) && IS_MOVE_PHYSICAL(move)) + if (gBattleMons[BATTLE_PARTNER(battlerAtk)].species == SPECIES_CHERRIM_SUNSHINE && IsBattlerWeatherAffected(BATTLE_PARTNER(battlerAtk), B_WEATHER_SUN) && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(1.5)); break; } @@ -9447,7 +9357,7 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, } break; case ABILITY_FLOWER_GIFT: - if (gBattleMons[battlerDef].species == SPECIES_CHERRIM && IsBattlerWeatherAffected(battlerDef, B_WEATHER_SUN) && !usesDefStat) + if (gBattleMons[battlerDef].species == SPECIES_CHERRIM_SUNSHINE && IsBattlerWeatherAffected(battlerDef, B_WEATHER_SUN) && !usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_PUNK_ROCK: @@ -9466,7 +9376,7 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, switch (GetBattlerAbility(BATTLE_PARTNER(battlerDef))) { case ABILITY_FLOWER_GIFT: - if (gBattleMons[BATTLE_PARTNER(battlerDef)].species == SPECIES_CHERRIM && IsBattlerWeatherAffected(BATTLE_PARTNER(battlerDef), B_WEATHER_SUN) && !usesDefStat) + if (gBattleMons[BATTLE_PARTNER(battlerDef)].species == SPECIES_CHERRIM_SUNSHINE && IsBattlerWeatherAffected(BATTLE_PARTNER(battlerDef), B_WEATHER_SUN) && !usesDefStat) MulModifier(&modifier, UQ_4_12(1.5)); break; } diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index daeaa9cbbe..8453ed480e 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -92,6 +92,8 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_BURMY] = sBurmyFormChangeTable, [SPECIES_BURMY_SANDY_CLOAK] = sBurmyFormChangeTable, [SPECIES_BURMY_TRASH_CLOAK] = sBurmyFormChangeTable, + [SPECIES_CHERRIM] = sCherrimFormChangeTable, + [SPECIES_CHERRIM_SUNSHINE] = sCherrimFormChangeTable, [SPECIES_LOPUNNY] = sLopunnyFormChangeTable, [SPECIES_LOPUNNY_MEGA] = sLopunnyFormChangeTable, [SPECIES_GARCHOMP] = sGarchompFormChangeTable, diff --git a/test/ability_flower_gift.c b/test/ability_flower_gift.c new file mode 100644 index 0000000000..2f2b98d1ef --- /dev/null +++ b/test/ability_flower_gift.c @@ -0,0 +1,86 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim in harsh sunlight") +{ + GIVEN { + PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SUNNY_DAY); } + } SCENE { + ABILITY_POPUP(player, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Cherrim transformed!"); + } +} + +SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when weather changes") +{ + GIVEN { + PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SUNNY_DAY); } + TURN { MOVE(opponent, MOVE_RAIN_DANCE); } + } SCENE { + // transforms in sun + ABILITY_POPUP(player, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Cherrim transformed!"); + // back to normal + ABILITY_POPUP(player, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Cherrim transformed!"); + } +} + +SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when its ability is suppressed") +{ + GIVEN { + PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SUNNY_DAY); } + TURN { MOVE(opponent, MOVE_GASTRO_ACID); } + } SCENE { + // transforms in sun + ABILITY_POPUP(player, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Cherrim transformed!"); + // back to normal + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Cherrim transformed!"); + } +} + +DOUBLE_BATTLE_TEST("Flower Gift increases the attack of Cherrim's ally by 1.5x", s16 damage) +{ + bool32 sunny; + PARAMETRIZE { sunny = FALSE; } + PARAMETRIZE { sunny = TRUE; } + GIVEN { + PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (sunny) + TURN { MOVE(playerLeft, MOVE_SUNNY_DAY); } + TURN { MOVE(playerRight, MOVE_TACKLE, target: opponentLeft); } + } SCENE { + // Sun activates + if (sunny) { + ABILITY_POPUP(playerLeft, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerLeft); + MESSAGE("Cherrim transformed!"); + } + // Partner uses Tackle + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerRight); + HP_BAR(opponentLeft, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, UQ_4_12(1.5), results[1].damage); + } +} + +TO_DO_BATTLE_TEST("Flower Gift does not transform Cherrim back to normal when suppressed if Cherrim is Dynamaxed"); diff --git a/test/ability_forecast.c b/test/ability_forecast.c new file mode 100644 index 0000000000..dba09992d7 --- /dev/null +++ b/test/ability_forecast.c @@ -0,0 +1,201 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an opponent's move") +{ + u32 move; + PARAMETRIZE { move = MOVE_SUNNY_DAY; } + PARAMETRIZE { move = MOVE_RAIN_DANCE; } + PARAMETRIZE { move = MOVE_HAIL; } + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, move); } + } SCENE { + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from its own move") +{ + u32 move; + PARAMETRIZE { move = MOVE_SUNNY_DAY; } + PARAMETRIZE { move = MOVE_RAIN_DANCE; } + PARAMETRIZE { move = MOVE_HAIL; } + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, move); } + } SCENE { + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +DOUBLE_BATTLE_TEST("Forecast transforms Castform in weather from a partner's move") +{ + u32 move; + PARAMETRIZE { move = MOVE_SUNNY_DAY; } + PARAMETRIZE { move = MOVE_RAIN_DANCE; } + PARAMETRIZE { move = MOVE_HAIL; } + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(playerRight, move); } + } SCENE { + ABILITY_POPUP(playerLeft, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerLeft); + MESSAGE("Castform transformed!"); + } +} + +DOUBLE_BATTLE_TEST("Forecast transforms all Castforms present in weather") +{ + u32 move; + PARAMETRIZE { move = MOVE_SUNNY_DAY; } + PARAMETRIZE { move = MOVE_RAIN_DANCE; } + PARAMETRIZE { move = MOVE_HAIL; } + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + } WHEN { + TURN { MOVE(playerRight, move); } + } SCENE { + ABILITY_POPUP(playerLeft, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerLeft); + MESSAGE("Castform transformed!"); + ABILITY_POPUP(opponentLeft, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponentLeft); + MESSAGE("Foe Castform transformed!"); + ABILITY_POPUP(playerRight, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerRight); + MESSAGE("Castform transformed!"); + ABILITY_POPUP(opponentRight, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponentRight); + MESSAGE("Foe Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an ability") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_KYOGRE) { Ability(ABILITY_DRIZZLE); }; + } WHEN { + TURN { SWITCH(opponent, 1); } + } SCENE { + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform in primal weather") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_KYOGRE) { Ability(ABILITY_DRIZZLE); Item(ITEM_BLUE_ORB); }; + } WHEN { + TURN { SWITCH(opponent, 1); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_PRIMORDIAL_SEA); + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when weather expires") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + TURN { } + TURN { } + TURN { } + TURN { } + TURN { } + } SCENE { + // transforms + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + // back to normal + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when Sandstorm is active") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + TURN { MOVE(player, MOVE_SANDSTORM); } + } SCENE { + // transforms + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + // back to normal + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform on switch-in") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + TURN { SWITCH(player, 1); } + } SCENE { + // turn 1 + ANIMATION(ANIM_TYPE_MOVE, MOVE_RAIN_DANCE, player); + // turn 2 + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + +SINGLE_BATTLE_TEST("Forecast transforms Castform when weather changes") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + TURN { MOVE(player, MOVE_SUNNY_DAY); } + } SCENE { + // transforms + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + // transforms again + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} From 488cc410a000b6096132b5d90ee345e3dbff406e Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Fri, 5 May 2023 10:24:12 +0200 Subject: [PATCH 170/229] update ability descriptions --- src/data/text/abilities.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/data/text/abilities.h b/src/data/text/abilities.h index 368b0cb4dc..a3bad09b1b 100644 --- a/src/data/text/abilities.h +++ b/src/data/text/abilities.h @@ -79,7 +79,7 @@ static const u8 sTangledFeetDescription[] = _("Ups evasion if confused."); static const u8 sMotorDriveDescription[] = _("Electricity raises Speed."); static const u8 sRivalryDescription[] = _("Powers up against rivals."); static const u8 sSteadfastDescription[] = _("Flinching raises Speed."); -static const u8 sSnowCloakDescription[] = _("Ups evasion in Hail."); +static const u8 sSnowCloakDescription[] = _("Ups evasion in Hail or Snow."); static const u8 sGluttonyDescription[] = _("Eats Berries early."); static const u8 sAngerPointDescription[] = _("Critical hits raise Attack."); static const u8 sUnburdenDescription[] = _("Using a hold item ups Speed."); @@ -114,7 +114,11 @@ static const u8 sSlowStartDescription[] = _("Takes a while to get going."); static const u8 sScrappyDescription[] = _("Hits Ghost-type Pokémon."); static const u8 sStormDrainDescription[] = _("Draws in Water moves."); static const u8 sIceBodyDescription[] = _("HP recovery in Hail or Snow."); -static const u8 sSnowWarningDescription[] = _("Summons a hailstorm."); +#if B_SNOW_WARNING < GEN_9 +static const u8 sSnowWarningDescription[] = _("Summons a Hailstorm."); +#elif B_SNOW_WARNING >= GEN_9 +static const u8 sSnowWarningDescription[] = _("Summons a Snowstorm."); +#endif static const u8 sHoneyGatherDescription[] = _("May gather Honey."); static const u8 sFriskDescription[] = _("Checks a foe's item."); static const u8 sRecklessDescription[] = _("Boosts moves with recoil."); @@ -192,7 +196,7 @@ static const u8 sStakeoutDescription[] = _("Stronger as foes switch in."); static const u8 sWaterBubbleDescription[] = _("Guards from fire and burns."); static const u8 sSteelworkerDescription[] = _("Powers up Steel moves."); static const u8 sBerserkDescription[] = _("Boosts Sp. Atk at low HP."); -static const u8 sSlushRushDescription[] = _("Raises Speed in hail."); +static const u8 sSlushRushDescription[] = _("Raises Speed in Hail or Snow."); static const u8 sLongReachDescription[] = _("Never makes contact."); static const u8 sLiquidVoiceDescription[] = _("Makes sound moves Water."); static const u8 sTriageDescription[] = _("Healing moves go first."); @@ -234,7 +238,7 @@ static const u8 sPunkRockDescription[] = _("Ups and resists sound."); static const u8 sSandSpitDescription[] = _("Creates a sandstorm if hit."); static const u8 sIceScalesDescription[] = _("Halves special damage."); static const u8 sRipenDescription[] = _("Doubles effect of Berries."); -static const u8 sIceFaceDescription[] = _("Take a free hit. Hail renews."); +static const u8 sIceFaceDescription[] = _("Hail or Snow renew free hit."); static const u8 sPowerSpotDescription[] = _("Powers up ally moves."); static const u8 sMimicryDescription[] = _("Changes type on terrain."); static const u8 sScreenCleanerDescription[] = _("Removes walls of light."); From 7e7384ee0225ccd470a3724186ad01f2e2437b8d Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Sat, 6 May 2023 19:12:49 +0200 Subject: [PATCH 171/229] tiny test doc fix --- test/test_battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_battle.h b/test/test_battle.h index 432e33fa80..81cb7e5943 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -369,7 +369,7 @@ * s16 damage; * HP_BAR(player, captureDamage: &damage); * If none of the above are used, causes the test to fail if the HP - * changes at all. + * does not change at all. * * MESSAGE(pattern) * Causes the test to fail if the message in pattern is not displayed. From e0bed6776b215e96f45799f685af1aaad9bc5408 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Wed, 26 Apr 2023 11:12:41 +0100 Subject: [PATCH 172/229] INVALID if FINALLY without PARAMETRIZE --- test/ability_volt_absorb.c | 3 +-- test/item_effect_restore_hp.c | 2 +- test/move_effect_bide.c | 4 ++-- test/move_effect_triple_kick.c | 8 ++++---- test/move_flag_three_strikes.c | 4 ++-- test/terrain_electric.c | 2 +- test/terrain_grassy.c | 2 +- test/terrain_misty.c | 2 +- test/terrain_psychic.c | 2 +- test/test_battle.h | 4 +++- test/test_runner_battle.c | 9 ++++++++- 11 files changed, 25 insertions(+), 17 deletions(-) diff --git a/test/ability_volt_absorb.c b/test/ability_volt_absorb.c index 18902eaa20..8a3c21ef6a 100644 --- a/test/ability_volt_absorb.c +++ b/test/ability_volt_absorb.c @@ -80,8 +80,7 @@ DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from dama MESSAGE("Jolteon restored HP using its Volt Absorb!"); HP_BAR(playerRight, captureDamage: &results->damage1); HP_BAR(opponentRight, captureDamage: &results->damage2); - } - FINALLY { + } THEN { EXPECT_NE(results[0].damage1, 0); EXPECT_NE(results[0].damage2, 0); } diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c index 4662e9f25c..6fd58fe824 100644 --- a/test/item_effect_restore_hp.c +++ b/test/item_effect_restore_hp.c @@ -183,4 +183,4 @@ SINGLE_BATTLE_TEST("Sitrus Berry restores a battler's HP by 25% of its max HP(30 } #undef TEST_HP -#undef MAX_HP \ No newline at end of file +#undef MAX_HP diff --git a/test/move_effect_bide.c b/test/move_effect_bide.c index 3a5c387353..0b0e184087 100644 --- a/test/move_effect_bide.c +++ b/test/move_effect_bide.c @@ -28,7 +28,7 @@ SINGLE_BATTLE_TEST("Bide deals twice the taken damage over two turns") MESSAGE("Wobbuffet unleashed energy!"); ANIMATION(ANIM_TYPE_MOVE, MOVE_BIDE, player); HP_BAR(opponent, captureDamage: &bideDamage); - } FINALLY { - EXPECT_EQ(bideDamage, damage1 + damage2); + } THEN { + EXPECT_EQ(bideDamage, 2 * (damage1 + damage2)); } } diff --git a/test/move_effect_triple_kick.c b/test/move_effect_triple_kick.c index d3187aefec..e0a91b0112 100644 --- a/test/move_effect_triple_kick.c +++ b/test/move_effect_triple_kick.c @@ -6,7 +6,7 @@ ASSUMPTIONS ASSUME(gBattleMoves[MOVE_TRIPLE_KICK].effect & EFFECT_TRIPLE_KICK); } -SINGLE_BATTLE_TEST("Triple Kick damage is increaased by its base damage for each hit") +SINGLE_BATTLE_TEST("Triple Kick damage is increased by its base damage for each hit") { s16 firstHit; s16 secondHit; @@ -24,8 +24,8 @@ SINGLE_BATTLE_TEST("Triple Kick damage is increaased by its base damage for each HP_BAR(opponent, captureDamage: &secondHit); ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_KICK, player); HP_BAR(opponent, captureDamage: &thirdHit); - } FINALLY { - EXPECT_EQ(secondHit, firstHit * 2); - EXPECT_EQ(thirdHit, firstHit * 3); + } THEN { + EXPECT_MUL_EQ(firstHit, Q_4_12(2.0), secondHit); + EXPECT_MUL_EQ(firstHit, Q_4_12(3.0), thirdHit); } } diff --git a/test/move_flag_three_strikes.c b/test/move_flag_three_strikes.c index 7ea7844c4f..b597b4efef 100644 --- a/test/move_flag_three_strikes.c +++ b/test/move_flag_three_strikes.c @@ -20,7 +20,7 @@ SINGLE_BATTLE_TEST("Three-strike flag turns a move into a 3-hit move") HP_BAR(opponent, captureDamage: &secondHit); ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player); HP_BAR(opponent, captureDamage: &thirdHit); - } FINALLY { + } THEN { EXPECT_EQ(firstHit, secondHit); EXPECT_EQ(secondHit, thirdHit); EXPECT_EQ(firstHit, thirdHit); @@ -49,7 +49,7 @@ SINGLE_BATTLE_TEST("Surging Strikes hits 3 times with each hit being a critical ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player); HP_BAR(opponent, captureDamage: &thirdHit); MESSAGE("A critical hit!"); - } FINALLY { + } THEN { EXPECT_EQ(firstHit, secondHit); EXPECT_EQ(secondHit, thirdHit); EXPECT_EQ(firstHit, thirdHit); diff --git a/test/terrain_electric.c b/test/terrain_electric.c index e9c34ef923..78f490c425 100644 --- a/test/terrain_electric.c +++ b/test/terrain_electric.c @@ -34,7 +34,7 @@ SINGLE_BATTLE_TEST("Electric Terrain activates Electric Seed and Mimicry") MESSAGE("Using Electric Seed, the Defense of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Electr!"); - } FINALLY { + } THEN { EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_ELECTRIC); } } diff --git a/test/terrain_grassy.c b/test/terrain_grassy.c index 7668c49bde..21d64f61e4 100644 --- a/test/terrain_grassy.c +++ b/test/terrain_grassy.c @@ -30,7 +30,7 @@ SINGLE_BATTLE_TEST("Grassy Terrain activates Grassy Seed and Mimicry") MESSAGE("Using Grassy Seed, the Defense of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Grass!"); - } FINALLY { + } THEN { EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_GRASS); } } diff --git a/test/terrain_misty.c b/test/terrain_misty.c index 4f8793d9d0..f60122075c 100644 --- a/test/terrain_misty.c +++ b/test/terrain_misty.c @@ -34,7 +34,7 @@ SINGLE_BATTLE_TEST("Misty Terrain activates Misty Seed and Mimicry") MESSAGE("Using Misty Seed, the Sp. Def of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Fairy!"); - } FINALLY { + } THEN { EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_FAIRY); } } diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c index 3ecfa99e06..f7e3a2af73 100644 --- a/test/terrain_psychic.c +++ b/test/terrain_psychic.c @@ -33,7 +33,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain activates Psychic Seed and Mimicry") MESSAGE("Using Psychic Seed, the Sp. Def of Wobbuffet rose!"); ABILITY_POPUP(opponent); MESSAGE("Foe Stunfisk's type changed to Psychc!"); - } FINALLY { + } THEN { EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_PSYCHIC); } } diff --git a/test/test_battle.h b/test/test_battle.h index 4c563c91d6..205c699192 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -897,7 +897,9 @@ void QueueStatus(u32 sourceLine, struct BattlePokemon *battler, struct StatusEve /* Finally */ -#define FINALLY for (; gBattleTestRunnerState->runFinally; gBattleTestRunnerState->runFinally = FALSE) if ((gBattleTestRunnerState->runningFinally = TRUE)) +#define FINALLY for (ValidateFinally(__LINE__); gBattleTestRunnerState->runFinally; gBattleTestRunnerState->runFinally = FALSE) if ((gBattleTestRunnerState->runningFinally = TRUE)) + +void ValidateFinally(u32 sourceLine); /* Expect */ diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 7740783b2c..2c26e39180 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1719,7 +1719,6 @@ void QueueMessage(u32 sourceLine, const u8 *pattern) }; } - void QueueStatus(u32 sourceLine, struct BattlePokemon *battler, struct StatusEventContext ctx) { s32 battlerId = battler - gBattleMons; @@ -1759,3 +1758,11 @@ void QueueStatus(u32 sourceLine, struct BattlePokemon *battler, struct StatusEve }}, }; } + +void ValidateFinally(u32 sourceLine) +{ + // Defer this error until after estimating the cost. + if (STATE->results == NULL) + return; + INVALID_IF(STATE->parametersCount == 0, "FINALLY without PARAMETRIZE"); +} From 9cd13cc52024fbdaca2e1515e47d354084371ae4 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 20 Apr 2023 21:45:16 +0100 Subject: [PATCH 173/229] Fix USE_ITEM explicit targets --- include/battle.h | 1 + src/battle_controller_recorded_opponent.c | 2 +- src/battle_controller_recorded_player.c | 2 +- src/battle_script_commands.c | 6 +++--- src/party_menu.c | 2 +- test/test_runner_battle.c | 4 ++++ 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/battle.h b/include/battle.h index 466a9138d5..00c7081fb8 100644 --- a/include/battle.h +++ b/include/battle.h @@ -658,6 +658,7 @@ struct BattleStruct u8 storedLunarDance:4; // Each battler as a bit. u16 supremeOverlordModifier[MAX_BATTLERS_COUNT]; u8 itemPartyIndex[MAX_BATTLERS_COUNT]; + u8 itemMoveIndex[MAX_BATTLERS_COUNT]; bool8 trainerSlideHalfHpMsgDone; u8 trainerSlideFirstCriticalHitMsgState:2; u8 trainerSlideFirstSuperEffectiveHitMsgState:2; diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 7515840761..d1c60343ac 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1443,7 +1443,7 @@ static void RecordedOpponentHandleChooseItem(void) u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); - gChosenMovePos = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); + gBattleStruct->itemMoveIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 1a56220d7f..46f3de4f12 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1467,7 +1467,7 @@ static void RecordedPlayerHandleChooseItem(void) u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; gBattleStruct->itemPartyIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_TARGET, gActiveBattler); - gChosenMovePos = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); + gBattleStruct->itemMoveIndex[gActiveBattler] = RecordedBattle_GetBattlerAction(RECORDED_ITEM_MOVE, gActiveBattler); BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 1187267b2a..0842884311 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16536,10 +16536,10 @@ void BS_ItemRestorePP(void) { // Check whether to apply to all moves. if (effect[4] & ITEM4_HEAL_PP_ONE) { - i = gChosenMovePos; - loopEnd = gChosenMovePos + 1; + i = gBattleStruct->itemMoveIndex[gBattlerAttacker]; + loopEnd = i + 1; } - else + else { i = 0; loopEnd = MAX_MON_MOVES; diff --git a/src/party_menu.c b/src/party_menu.c index 773495a4d5..aa37b1c691 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4944,7 +4944,7 @@ static void TryUseItemOnMove(u8 taskId) else { gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId); - gChosenMovePos = ptr->data1; + gBattleStruct->itemMoveIndex[gBattlerInMenuId] = ptr->data1; gPartyMenuUseExitCallback = TRUE; RemoveBagItem(gSpecialVar_ItemId, 1); ScheduleBgCopyTilemapToVram(2); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 2c26e39180..b7360e19c8 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1564,6 +1564,10 @@ void UseItem(u32 sourceLine, struct BattlePokemon *battler, struct ItemContext c } INVALID_IF(i == MAX_MON_MOVES, "USE_ITEM on invalid move: %d", ctx.move); } + else + { + i = 0; + } PushBattlerAction(sourceLine, battlerId, RECORDED_ACTION_TYPE, B_ACTION_USE_ITEM); PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, (ctx.itemId >> 8) & 0xFF); PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, ctx.itemId & 0xFF); From 29fa6ba5743f2a1c636af0c7e3491f2f2e3bb81d Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Wed, 26 Apr 2023 11:31:19 +0100 Subject: [PATCH 174/229] INVALID if PASSES_RANDOMLY and results --- test/hold_effect_berserk_gene.c | 17 +++++------------ test/test_runner_battle.c | 2 ++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/test/hold_effect_berserk_gene.c b/test/hold_effect_berserk_gene.c index 361d148611..103a0a1a3e 100644 --- a/test/hold_effect_berserk_gene.c +++ b/test/hold_effect_berserk_gene.c @@ -11,14 +11,11 @@ SINGLE_BATTLE_TEST("Berserk Gene sharply raises attack at the start of battle", u16 useItem; PARAMETRIZE { useItem = FALSE; } PARAMETRIZE { useItem = TRUE; } - if (useItem) PASSES_RANDOMLY(66, 100, RNG_CONFUSION); GIVEN { - PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); }; + PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { - TURN { - MOVE(player, MOVE_TACKLE); - } + TURN { MOVE(player, MOVE_TACKLE, WITH_RNG(RNG_CONFUSION, FALSE)); } } SCENE { if (useItem) { @@ -38,17 +35,13 @@ SINGLE_BATTLE_TEST("Berserk Gene activates on switch in", s16 damage) u16 useItem; PARAMETRIZE { useItem = FALSE; } PARAMETRIZE { useItem = TRUE; } - if (useItem) PASSES_RANDOMLY(66, 100, RNG_CONFUSION); GIVEN { PLAYER(SPECIES_WYNAUT); - PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); }; + PLAYER(SPECIES_WOBBUFFET) { if (useItem) Item(ITEM_BERSERK_GENE); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { - TURN { - SWITCH(player, 1); - } TURN { - MOVE(player, MOVE_TACKLE); - } + TURN { SWITCH(player, 1); } + TURN { MOVE(player, MOVE_TACKLE, WITH_RNG(RNG_CONFUSION, FALSE)); } } SCENE { if (useItem) { diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index b7360e19c8..c1ea34e8cb 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -939,6 +939,8 @@ static bool32 BattleTest_HandleExitWithResult(void *data, enum TestResult result void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext ctx) { + const struct BattleTest *test = gTestRunnerState.test->data; + INVALID_IF(test->resultsSize > 0, "PASSES_RANDOMLY is incompatible with results"); INVALID_IF(passes > trials, "%d passes specified, but only %d trials", passes, trials); STATE->rngTag = ctx.tag; STATE->runTrial = 0; From efab893c470eed58e41727852440f58c528b60bc Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Wed, 26 Apr 2023 11:38:52 +0100 Subject: [PATCH 175/229] INVALID if results without PARAMETRIZE --- test/ability_dry_skin.c | 5 ++++- test/ability_volt_absorb.c | 11 ++++++----- test/hold_effect_mirror_herb.c | 6 +++--- test/item_effect_increase_stat.c | 2 +- test/terrain_psychic.c | 10 +++++----- test/test_runner_battle.c | 2 ++ 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/test/ability_dry_skin.c b/test/ability_dry_skin.c index 6c28d0c428..855872d761 100644 --- a/test/ability_dry_skin.c +++ b/test/ability_dry_skin.c @@ -33,10 +33,13 @@ SINGLE_BATTLE_TEST("Dry Skin heals 1/8th Max HP in Rain") SINGLE_BATTLE_TEST("Dry Skin increases damage taken from Fire-type moves by 25%", s16 damage) { + u32 ability; + PARAMETRIZE { ability = ABILITY_EFFECT_SPORE; } + PARAMETRIZE { ability = ABILITY_DRY_SKIN; } GIVEN { ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); }; + OPPONENT(SPECIES_PARASECT) { Ability(ability); }; } WHEN { TURN {MOVE(player, MOVE_EMBER); } } SCENE { diff --git a/test/ability_volt_absorb.c b/test/ability_volt_absorb.c index 8a3c21ef6a..6b9296268c 100644 --- a/test/ability_volt_absorb.c +++ b/test/ability_volt_absorb.c @@ -63,8 +63,9 @@ SINGLE_BATTLE_TEST("Volt Absorb is only triggered once on multi strike moves") } } -DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon", s16 damage1, s16 damage2) // Fixed issue #1961 +DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon") // Fixed issue #1961 { + s16 damage1, damage2; GIVEN { ASSUME(gBattleMoves[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION); ASSUME(gBattleMoves[MOVE_EXPLOSION].type == TYPE_NORMAL); @@ -78,11 +79,11 @@ DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from dama ABILITY_POPUP(playerLeft, ABILITY_VOLT_ABSORB); HP_BAR(playerLeft, hp: TEST_MAX_HP / 4 + 1); MESSAGE("Jolteon restored HP using its Volt Absorb!"); - HP_BAR(playerRight, captureDamage: &results->damage1); - HP_BAR(opponentRight, captureDamage: &results->damage2); + HP_BAR(playerRight, captureDamage: &damage1); + HP_BAR(opponentRight, captureDamage: &damage2); } THEN { - EXPECT_NE(results[0].damage1, 0); - EXPECT_NE(results[0].damage2, 0); + EXPECT_NE(damage1, 0); + EXPECT_NE(damage2, 0); } } diff --git a/test/hold_effect_mirror_herb.c b/test/hold_effect_mirror_herb.c index fc0a6de957..22f564b850 100644 --- a/test/hold_effect_mirror_herb.c +++ b/test/hold_effect_mirror_herb.c @@ -9,8 +9,8 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage) { u32 item; - PARAMETRIZE{ item = ITEM_NONE; } - PARAMETRIZE{ item = ITEM_MIRROR_HERB; } + PARAMETRIZE { item = ITEM_NONE; } + PARAMETRIZE { item = ITEM_MIRROR_HERB; } GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_WOBBUFFET) { Speed(5); Item(item); } @@ -34,7 +34,7 @@ SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 } } -SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks", s16 damage) +SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks") { GIVEN { ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP); diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index bbaf20e2fa..310932040c 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -126,7 +126,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) } } -SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 damage) +SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat") { ASSUME(gBattleMoves[MOVE_SING].accuracy == 55); diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c index f7e3a2af73..f9f95a47db 100644 --- a/test/terrain_psychic.c +++ b/test/terrain_psychic.c @@ -61,7 +61,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain increases power of Psychic-type moves by 30/ } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the user", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the user") { GIVEN { PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); HP(1); } @@ -76,7 +76,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers") { KNOWN_FAILING; GIVEN { @@ -91,7 +91,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents") { KNOWN_FAILING; GIVEN { @@ -106,7 +106,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target allies", s16 damage) +DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target allies") { GIVEN { PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } @@ -122,7 +122,7 @@ DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves") { KNOWN_FAILING; GIVEN { diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index c1ea34e8cb..cfe5db9d6e 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -134,6 +134,8 @@ static void BattleTest_SetUp(void *data) Test_ExitWithResult(TEST_RESULT_ERROR, "OOM: STATE = AllocZerod(%d)", sizeof(*STATE)); InvokeTestFunction(test); STATE->parameters = STATE->parametersCount; + if (STATE->parametersCount == 0 && test->resultsSize > 0) + Test_ExitWithResult(TEST_RESULT_INVALID, "results without PARAMETRIZE"); STATE->results = AllocZeroed(test->resultsSize * STATE->parameters); if (!STATE->results) Test_ExitWithResult(TEST_RESULT_ERROR, "OOM: STATE->results = AllocZerod(%d)", sizeof(test->resultsSize * STATE->parameters)); From a2ca2aa7d90c091aea4d72df81237fa75843e212 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 27 Apr 2023 09:25:04 +0100 Subject: [PATCH 176/229] Report errors in estimateCost --- test/test_runner.c | 88 ++++++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/test/test_runner.c b/test/test_runner.c index 64cb20e269..bfd7b47a56 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -42,7 +42,14 @@ static bool32 PrefixMatch(const char *pattern, const char *string) } } -enum { STATE_INIT, STATE_NEXT_TEST, STATE_REPORT_RESULT, STATE_EXIT }; +enum +{ + STATE_INIT, + STATE_NEXT_TEST, + STATE_RUN_TEST, + STATE_REPORT_RESULT, + STATE_EXIT, +}; void CB2_TestRunner(void) { @@ -81,6 +88,26 @@ void CB2_TestRunner(void) return; } + MgbaPrintf_(":N%s", gTestRunnerState.test->name); + gTestRunnerState.result = TEST_RESULT_PASS; + gTestRunnerState.expectedResult = TEST_RESULT_PASS; + gTestRunnerState.expectLeaks = FALSE; + if (gTestRunnerHeadless) + gTestRunnerState.timeoutSeconds = TIMEOUT_SECONDS; + else + gTestRunnerState.timeoutSeconds = UINT_MAX; + InitHeap(gHeap, HEAP_SIZE); + EnableInterrupts(INTR_FLAG_TIMER2); + REG_TM2CNT_L = UINT16_MAX - (274 * 60); // Approx. 1 second. + REG_TM2CNT_H = TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_1024CLK; + + // NOTE: Assumes that the compiler interns __FILE__. + if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename) + { + gTestRunnerState.result = TEST_RESULT_ASSUMPTION_FAIL; + return; + } + // Greedily assign tests to processes based on estimated cost. // TODO: Make processCosts a min heap. if (gTestRunnerState.test->runner != &gAssumptionsRunner) @@ -98,40 +125,26 @@ void CB2_TestRunner(void) } } + if (minCostProcess == gTestRunnerI) + gTestRunnerState.state = STATE_RUN_TEST; + else + gTestRunnerState.state = STATE_NEXT_TEST; + + // XXX: If estimateCost exits only on some processes then + // processCosts will be inconsistent. if (gTestRunnerState.test->runner->estimateCost) gTestRunnerState.processCosts[minCostProcess] += gTestRunnerState.test->runner->estimateCost(gTestRunnerState.test->data); else gTestRunnerState.processCosts[minCostProcess] += 1; - - if (minCostProcess != gTestRunnerI) - return; } - MgbaPrintf_(":N%s", gTestRunnerState.test->name); + break; + + case STATE_RUN_TEST: gTestRunnerState.state = STATE_REPORT_RESULT; - gTestRunnerState.result = TEST_RESULT_PASS; - gTestRunnerState.expectedResult = TEST_RESULT_PASS; - gTestRunnerState.expectLeaks = FALSE; - if (gTestRunnerHeadless) - gTestRunnerState.timeoutSeconds = TIMEOUT_SECONDS; - else - gTestRunnerState.timeoutSeconds = UINT_MAX; - InitHeap(gHeap, HEAP_SIZE); - EnableInterrupts(INTR_FLAG_TIMER2); - REG_TM2CNT_L = UINT16_MAX - (274 * 60); // Approx. 1 second. - REG_TM2CNT_H = TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_1024CLK; - - // NOTE: Assumes that the compiler interns __FILE__. - if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename) - { - gTestRunnerState.result = TEST_RESULT_ASSUMPTION_FAIL; - } - else - { - if (gTestRunnerState.test->runner->setUp) - gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data); - gTestRunnerState.test->runner->run(gTestRunnerState.test->data); - } + if (gTestRunnerState.test->runner->setUp) + gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data); + gTestRunnerState.test->runner->run(gTestRunnerState.test->data); break; case STATE_REPORT_RESULT: @@ -345,6 +358,8 @@ static void Intr_Timer2(void) } else { + if (gTestRunnerState.state == STATE_RUN_TEST) + gTestRunnerState.state = STATE_REPORT_RESULT; gTestRunnerState.result = TEST_RESULT_TIMEOUT; ReinitCallbacks(); IRQ_LR = ((uintptr_t)JumpToAgbMainLoop & ~1) + 4; @@ -354,16 +369,19 @@ static void Intr_Timer2(void) void Test_ExitWithResult(enum TestResult result, const char *fmt, ...) { - bool32 handled = FALSE; gTestRunnerState.result = result; ReinitCallbacks(); - if (gTestRunnerState.test->runner->handleExitWithResult) - handled = gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result); - if (!handled && gTestRunnerState.result != gTestRunnerState.expectedResult) + if (gTestRunnerState.state == STATE_REPORT_RESULT + && gTestRunnerState.test->runner->handleExitWithResult) { - va_list va; - va_start(va, fmt); - MgbaVPrintf_(fmt, va); + if (!gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result) + && gTestRunnerState.result != gTestRunnerState.expectedResult) + { + va_list va; + va_start(va, fmt); + MgbaVPrintf_(fmt, va); + va_end(va); + } } JumpToAgbMainLoop(); } From e52e8ce7e15f96f753f37af1f44e62ac1c90c52a Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Sun, 7 May 2023 07:50:29 +0100 Subject: [PATCH 177/229] Cleanup Compound Eyes tests --- test/ability_compound_eyes.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/ability_compound_eyes.c b/test/ability_compound_eyes.c index d90604d5c3..6bdb15fa78 100644 --- a/test/ability_compound_eyes.c +++ b/test/ability_compound_eyes.c @@ -6,7 +6,7 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") PASSES_RANDOMLY(91, 100, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_THUNDER].accuracy == 70); - PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }; + PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_THUNDER); } @@ -16,16 +16,13 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") } } -// This fails even though the ability works correctly. The failure is due to -// a statistical anomaly in the test system where FISSURE hits 3 times more often -// than we expect. SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves") { PASSES_RANDOMLY(30, 100, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30); ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO); - PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }; + PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_FISSURE); } From ebc8edd5a65c92b1211aacb3ac4efdbeffd7d207 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 00:58:38 +1000 Subject: [PATCH 178/229] Fix shiny animation not respecting illusion mon. --- src/battle_anim_throw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 3fc2000e4a..4a3cf7cf27 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2484,9 +2484,14 @@ void TryShinyAnimation(u8 battler, struct Pokemon *mon) u32 otId, personality; u32 shinyValue; u8 taskCirc, taskDgnl; + struct Pokemon* illusionMon; isShiny = FALSE; gBattleSpritesDataPtr->healthBoxesData[battler].triedShinyMonAnim = TRUE; + illusionMon = GetIllusionMonPtr(battler); + if (illusionMon != NULL) + mon = illusionMon; + otId = GetMonData(mon, MON_DATA_OT_ID); personality = GetMonData(mon, MON_DATA_PERSONALITY); From f985eefaa139017c2d67b1ea1591bd3d36bb6af4 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 01:40:28 +1000 Subject: [PATCH 179/229] Show Imposter abilty in popup instead of opponent's ability. --- data/battle_scripts_1.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index fdc7c8a3fd..b62eb465eb 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9373,8 +9373,8 @@ BattleScript_FriskActivates:: end3 BattleScript_ImposterActivates:: - transformdataexecution call BattleScript_AbilityPopUp + transformdataexecution playmoveanimation BS_ATTACKER, MOVE_TRANSFORM waitanimation printstring STRINGID_IMPOSTERTRANSFORM From 64c2eb39c0f65632ed06b1b19bbf2fca4dc7b089 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 02:33:12 +1000 Subject: [PATCH 180/229] Ignore Illusion if the pokemon is the last slot in the party. --- src/battle_util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index cd65d58093..dd6e2bc06e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10398,12 +10398,19 @@ bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId) { struct Pokemon *party, *partnerMon; s32 i, id; + u8 side, partyCount; gBattleStruct->illusion[battlerId].set = 1; if (GetMonAbility(mon) != ABILITY_ILLUSION) return FALSE; party = GetBattlerParty(battlerId); + side = GetBattlerSide(battlerId); + partyCount = side == B_SIDE_PLAYER ? gPlayerPartyCount : gEnemyPartyCount; + + // If this pokemon is last in the party, ignore Illusion. + if (&party[partyCount - 1] == mon) + return FALSE; if (IsBattlerAlive(BATTLE_PARTNER(battlerId))) partnerMon = &party[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]]; From 8b37b4292a17c67a4711b90aa0e83d63acf26af6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 May 2023 22:04:26 -0400 Subject: [PATCH 181/229] Document DrawFootprint --- include/gba/defines.h | 17 +++++++++++++---- src/pokedex.c | 40 +++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/include/gba/defines.h b/include/gba/defines.h index 82caf56e68..f2ea0899d9 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -64,14 +64,23 @@ #define ROM_HEADER_SIZE 0xC0 +// Dimensions of a tile in pixels +#define TILE_WIDTH 8 +#define TILE_HEIGHT 8 + +// Dimensions of the GBA screen in pixels #define DISPLAY_WIDTH 240 #define DISPLAY_HEIGHT 160 -#define DISPLAY_TILE_WIDTH (DISPLAY_WIDTH / 8) -#define DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / 8) +// Dimensions of the GBA screen in tiles +#define DISPLAY_TILE_WIDTH (DISPLAY_WIDTH / TILE_WIDTH) +#define DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / TILE_HEIGHT) -#define TILE_SIZE_4BPP 32 -#define TILE_SIZE_8BPP 64 +// Size of different tile formats in bytes +#define TILE_SIZE(bpp)((bpp) * TILE_WIDTH * TILE_HEIGHT / 8) +#define TILE_SIZE_1BPP TILE_SIZE(1) // 8 +#define TILE_SIZE_4BPP TILE_SIZE(4) // 32 +#define TILE_SIZE_8BPP TILE_SIZE(8) // 64 #define TILE_OFFSET_4BPP(n) ((n) * TILE_SIZE_4BPP) #define TILE_OFFSET_8BPP(n) ((n) * TILE_SIZE_8BPP) diff --git a/src/pokedex.c b/src/pokedex.c index 88558d6f2c..af96b88771 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -93,6 +93,13 @@ enum NAME_YZ, }; +enum { + WIN_INFO, + WIN_FOOTPRINT, + WIN_CRY_WAVE, + WIN_VU_METER, +}; + // For scrolling search parameter #define MAX_SEARCH_PARAM_ON_SCREEN 6 #define MAX_SEARCH_PARAM_CURSOR_POS (MAX_SEARCH_PARAM_ON_SCREEN - 1) @@ -888,11 +895,6 @@ static const struct BgTemplate sInfoScreen_BgTemplate[] = } }; -#define WIN_INFO 0 -#define WIN_FOOTPRINT 1 -#define WIN_CRY_WAVE 2 -#define WIN_VU_METER 3 - static const struct WindowTemplate sInfoScreen_WindowTemplates[] = { [WIN_INFO] = @@ -4570,26 +4572,38 @@ static void PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top) PrintInfoSubMenuText(windowId, str, left, top); } +// The footprints are drawn on WIN_FOOTPRINT, which uses BG palette 15 (loaded with graphics/text_window/message_box.gbapal) +// The footprint pixels are stored as 1BPP, and set to the below color index in this palette when converted to 4BPP. +#define FOOTPRINT_COLOR_IDX 2 + +#define NUM_FOOTPRINT_TILES 4 + static void DrawFootprint(u8 windowId, u16 dexNum) { - u8 footprint[32 * 4]; + u8 footprint4bpp[TILE_SIZE_4BPP * NUM_FOOTPRINT_TILES]; const u8 * footprintGfx = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)]; u16 tileIdx = 0; u16 i, j; - for (i = 0; i < 32; i++) + for (i = 0; i < TILE_SIZE_1BPP * NUM_FOOTPRINT_TILES; i++) { - u8 tile = footprintGfx[i]; + u8 footprint1bpp = footprintGfx[i]; + + // Convert the 8 pixels in the above 1BPP byte to 4BPP. + // Each iteration creates one 4BPP byte (2 pixels), + // so we need 4 iterations to do all 8 pixels. for (j = 0; j < 4; j++) { - u8 value = ((tile >> (2 * j)) & 1 ? 2 : 0); - if (tile & (2 << (2 * j))) - value |= 0x20; - footprint[tileIdx] = value; + u8 tile = 0; + if (footprint1bpp & (1 << (2 * j))) + tile |= FOOTPRINT_COLOR_IDX; // Set pixel + if (footprint1bpp & (2 << (2 * j))) + tile |= FOOTPRINT_COLOR_IDX << 4; // Set pixel + footprint4bpp[tileIdx] = tile; tileIdx++; } } - CopyToWindowPixelBuffer(windowId, footprint, sizeof(footprint), 0); + CopyToWindowPixelBuffer(windowId, footprint4bpp, sizeof(footprint4bpp), 0); } // Unused Ruby/Sapphire function. From 41ac28b2107e409a7ba39079a8435cb02a21eda6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 May 2023 22:43:48 -0400 Subject: [PATCH 182/229] Index pokemon footprint pngs --- graphics/pokemon/abra/footprint.png | Bin 94 -> 108 bytes graphics/pokemon/absol/footprint.png | Bin 102 -> 119 bytes graphics/pokemon/aerodactyl/footprint.png | Bin 92 -> 108 bytes graphics/pokemon/aggron/footprint.png | Bin 102 -> 119 bytes graphics/pokemon/aipom/footprint.png | Bin 86 -> 102 bytes graphics/pokemon/alakazam/footprint.png | Bin 95 -> 112 bytes graphics/pokemon/altaria/footprint.png | Bin 100 -> 118 bytes graphics/pokemon/ampharos/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/anorith/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/arbok/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/arcanine/footprint.png | Bin 99 -> 114 bytes graphics/pokemon/ariados/footprint.png | Bin 86 -> 100 bytes graphics/pokemon/armaldo/footprint.png | Bin 95 -> 112 bytes graphics/pokemon/aron/footprint.png | Bin 90 -> 103 bytes graphics/pokemon/articuno/footprint.png | Bin 106 -> 122 bytes graphics/pokemon/azumarill/footprint.png | Bin 88 -> 101 bytes graphics/pokemon/azurill/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/bagon/footprint.png | Bin 91 -> 106 bytes graphics/pokemon/baltoy/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/banette/footprint.png | Bin 85 -> 98 bytes graphics/pokemon/barboach/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/bayleef/footprint.png | Bin 87 -> 103 bytes graphics/pokemon/beautifly/footprint.png | Bin 89 -> 103 bytes graphics/pokemon/beedrill/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/beldum/footprint.png | Bin 82 -> 96 bytes graphics/pokemon/bellossom/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/bellsprout/footprint.png | Bin 109 -> 122 bytes graphics/pokemon/blastoise/footprint.png | Bin 98 -> 115 bytes graphics/pokemon/blaziken/footprint.png | Bin 116 -> 132 bytes graphics/pokemon/blissey/footprint.png | Bin 96 -> 111 bytes graphics/pokemon/breloom/footprint.png | Bin 94 -> 110 bytes graphics/pokemon/bulbasaur/footprint.png | Bin 88 -> 102 bytes graphics/pokemon/butterfree/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/cacnea/footprint.png | Bin 81 -> 95 bytes graphics/pokemon/cacturne/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/camerupt/footprint.png | Bin 109 -> 125 bytes graphics/pokemon/carvanha/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/cascoon/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/castform/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/caterpie/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/celebi/footprint.png | Bin 88 -> 101 bytes graphics/pokemon/chansey/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/charizard/footprint.png | Bin 95 -> 110 bytes graphics/pokemon/charmander/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/charmeleon/footprint.png | Bin 95 -> 109 bytes graphics/pokemon/chikorita/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/chimecho/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/chinchou/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/clamperl/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/claydol/footprint.png | Bin 80 -> 95 bytes graphics/pokemon/clefable/footprint.png | Bin 101 -> 114 bytes graphics/pokemon/clefairy/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/cleffa/footprint.png | Bin 79 -> 95 bytes graphics/pokemon/cloyster/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/combusken/footprint.png | Bin 109 -> 123 bytes graphics/pokemon/corphish/footprint.png | Bin 102 -> 116 bytes graphics/pokemon/corsola/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/cradily/footprint.png | Bin 98 -> 116 bytes graphics/pokemon/crawdaunt/footprint.png | Bin 104 -> 119 bytes graphics/pokemon/crobat/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/croconaw/footprint.png | Bin 85 -> 101 bytes graphics/pokemon/cubone/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/cyndaquil/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/delcatty/footprint.png | Bin 107 -> 121 bytes graphics/pokemon/delibird/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/deoxys/footprint.png | Bin 84 -> 97 bytes graphics/pokemon/dewgong/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/diglett/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/ditto/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/dodrio/footprint.png | Bin 110 -> 125 bytes graphics/pokemon/doduo/footprint.png | Bin 101 -> 114 bytes graphics/pokemon/donphan/footprint.png | Bin 96 -> 113 bytes graphics/pokemon/dragonair/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/dragonite/footprint.png | Bin 92 -> 108 bytes graphics/pokemon/dratini/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/drowzee/footprint.png | Bin 87 -> 103 bytes graphics/pokemon/dugtrio/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/dunsparce/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/dusclops/footprint.png | Bin 106 -> 124 bytes graphics/pokemon/duskull/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/dustox/footprint.png | Bin 92 -> 107 bytes graphics/pokemon/eevee/footprint.png | Bin 96 -> 111 bytes graphics/pokemon/ekans/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/electabuzz/footprint.png | Bin 93 -> 109 bytes graphics/pokemon/electrike/footprint.png | Bin 101 -> 115 bytes graphics/pokemon/electrode/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/elekid/footprint.png | Bin 89 -> 102 bytes graphics/pokemon/entei/footprint.png | Bin 101 -> 117 bytes graphics/pokemon/espeon/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/exeggcute/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/exeggutor/footprint.png | Bin 92 -> 108 bytes graphics/pokemon/exploud/footprint.png | Bin 108 -> 125 bytes graphics/pokemon/farfetchd/footprint.png | Bin 99 -> 115 bytes graphics/pokemon/fearow/footprint.png | Bin 102 -> 118 bytes graphics/pokemon/feebas/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/feraligatr/footprint.png | Bin 94 -> 111 bytes graphics/pokemon/flaaffy/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/flareon/footprint.png | Bin 103 -> 118 bytes graphics/pokemon/flygon/footprint.png | Bin 92 -> 110 bytes graphics/pokemon/forretress/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/furret/footprint.png | Bin 87 -> 100 bytes graphics/pokemon/gardevoir/footprint.png | Bin 86 -> 99 bytes graphics/pokemon/gastly/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/gengar/footprint.png | Bin 91 -> 106 bytes graphics/pokemon/geodude/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/girafarig/footprint.png | Bin 83 -> 97 bytes graphics/pokemon/glalie/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/gligar/footprint.png | Bin 92 -> 105 bytes graphics/pokemon/gloom/footprint.png | Bin 90 -> 104 bytes graphics/pokemon/golbat/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/goldeen/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/golduck/footprint.png | Bin 98 -> 113 bytes graphics/pokemon/golem/footprint.png | Bin 97 -> 114 bytes graphics/pokemon/gorebyss/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/granbull/footprint.png | Bin 93 -> 109 bytes graphics/pokemon/graveler/footprint.png | Bin 91 -> 107 bytes graphics/pokemon/grimer/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/groudon/footprint.png | Bin 103 -> 121 bytes graphics/pokemon/grovyle/footprint.png | Bin 100 -> 114 bytes graphics/pokemon/growlithe/footprint.png | Bin 91 -> 104 bytes graphics/pokemon/grumpig/footprint.png | Bin 96 -> 113 bytes graphics/pokemon/gulpin/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/gyarados/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/hariyama/footprint.png | Bin 94 -> 113 bytes graphics/pokemon/haunter/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/heracross/footprint.png | Bin 92 -> 106 bytes graphics/pokemon/hitmonchan/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/hitmonlee/footprint.png | Bin 104 -> 121 bytes graphics/pokemon/hitmontop/footprint.png | Bin 103 -> 119 bytes graphics/pokemon/ho_oh/footprint.png | Bin 95 -> 110 bytes graphics/pokemon/hoothoot/footprint.png | Bin 102 -> 115 bytes graphics/pokemon/hoppip/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/horsea/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/houndoom/footprint.png | Bin 103 -> 118 bytes graphics/pokemon/houndour/footprint.png | Bin 91 -> 104 bytes graphics/pokemon/huntail/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/hypno/footprint.png | Bin 95 -> 111 bytes graphics/pokemon/igglybuff/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/illumise/footprint.png | Bin 84 -> 100 bytes graphics/pokemon/ivysaur/footprint.png | Bin 96 -> 112 bytes graphics/pokemon/jigglypuff/footprint.png | Bin 85 -> 101 bytes graphics/pokemon/jirachi/footprint.png | Bin 83 -> 98 bytes graphics/pokemon/jolteon/footprint.png | Bin 91 -> 107 bytes graphics/pokemon/jumpluff/footprint.png | Bin 84 -> 100 bytes graphics/pokemon/jynx/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/kabuto/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/kabutops/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/kadabra/footprint.png | Bin 100 -> 117 bytes graphics/pokemon/kakuna/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/kangaskhan/footprint.png | Bin 96 -> 111 bytes graphics/pokemon/kecleon/footprint.png | Bin 96 -> 108 bytes graphics/pokemon/kingdra/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/kingler/footprint.png | Bin 93 -> 106 bytes graphics/pokemon/kirlia/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/koffing/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/krabby/footprint.png | Bin 86 -> 101 bytes graphics/pokemon/kyogre/footprint.png | Bin 104 -> 121 bytes graphics/pokemon/lairon/footprint.png | Bin 101 -> 116 bytes graphics/pokemon/lanturn/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/lapras/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/larvitar/footprint.png | Bin 82 -> 96 bytes graphics/pokemon/latias/footprint.png | Bin 104 -> 119 bytes graphics/pokemon/latios/footprint.png | Bin 105 -> 121 bytes graphics/pokemon/ledian/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/ledyba/footprint.png | Bin 99 -> 112 bytes graphics/pokemon/lickitung/footprint.png | Bin 102 -> 117 bytes graphics/pokemon/lileep/footprint.png | Bin 99 -> 112 bytes graphics/pokemon/linoone/footprint.png | Bin 90 -> 107 bytes graphics/pokemon/lombre/footprint.png | Bin 110 -> 124 bytes graphics/pokemon/lotad/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/loudred/footprint.png | Bin 105 -> 120 bytes graphics/pokemon/ludicolo/footprint.png | Bin 94 -> 111 bytes graphics/pokemon/lugia/footprint.png | Bin 95 -> 111 bytes graphics/pokemon/lunatone/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/luvdisc/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/machamp/footprint.png | Bin 98 -> 115 bytes graphics/pokemon/machoke/footprint.png | Bin 97 -> 112 bytes graphics/pokemon/machop/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/magby/footprint.png | Bin 88 -> 102 bytes graphics/pokemon/magcargo/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/magikarp/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/magmar/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/magnemite/footprint.png | Bin 83 -> 98 bytes graphics/pokemon/magneton/footprint.png | Bin 90 -> 104 bytes graphics/pokemon/makuhita/footprint.png | Bin 97 -> 112 bytes graphics/pokemon/manectric/footprint.png | Bin 100 -> 117 bytes graphics/pokemon/mankey/footprint.png | Bin 110 -> 125 bytes graphics/pokemon/mantine/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/mareep/footprint.png | Bin 84 -> 100 bytes graphics/pokemon/marill/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/marowak/footprint.png | Bin 86 -> 102 bytes graphics/pokemon/marshtomp/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/masquerain/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/mawile/footprint.png | Bin 102 -> 116 bytes graphics/pokemon/medicham/footprint.png | Bin 92 -> 107 bytes graphics/pokemon/meditite/footprint.png | Bin 89 -> 104 bytes graphics/pokemon/meganium/footprint.png | Bin 97 -> 111 bytes graphics/pokemon/meowth/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/metagross/footprint.png | Bin 91 -> 108 bytes graphics/pokemon/metang/footprint.png | Bin 92 -> 106 bytes graphics/pokemon/metapod/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/mew/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/mewtwo/footprint.png | Bin 100 -> 117 bytes graphics/pokemon/mightyena/footprint.png | Bin 113 -> 129 bytes graphics/pokemon/milotic/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/miltank/footprint.png | Bin 86 -> 100 bytes graphics/pokemon/minun/footprint.png | Bin 86 -> 101 bytes graphics/pokemon/misdreavus/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/moltres/footprint.png | Bin 101 -> 116 bytes graphics/pokemon/mr_mime/footprint.png | Bin 89 -> 105 bytes graphics/pokemon/mudkip/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/muk/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/murkrow/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/natu/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/nidoking/footprint.png | Bin 94 -> 111 bytes graphics/pokemon/nidoqueen/footprint.png | Bin 98 -> 114 bytes graphics/pokemon/nidoran_f/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/nidoran_m/footprint.png | Bin 89 -> 104 bytes graphics/pokemon/nidorina/footprint.png | Bin 94 -> 110 bytes graphics/pokemon/nidorino/footprint.png | Bin 100 -> 114 bytes graphics/pokemon/nincada/footprint.png | Bin 92 -> 106 bytes graphics/pokemon/ninetales/footprint.png | Bin 96 -> 110 bytes graphics/pokemon/ninjask/footprint.png | Bin 91 -> 107 bytes graphics/pokemon/noctowl/footprint.png | Bin 101 -> 118 bytes graphics/pokemon/nosepass/footprint.png | Bin 96 -> 111 bytes graphics/pokemon/numel/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/nuzleaf/footprint.png | Bin 101 -> 115 bytes graphics/pokemon/octillery/footprint.png | Bin 101 -> 114 bytes graphics/pokemon/oddish/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/omanyte/footprint.png | Bin 80 -> 96 bytes graphics/pokemon/omastar/footprint.png | Bin 85 -> 101 bytes graphics/pokemon/onix/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/paras/footprint.png | Bin 83 -> 99 bytes graphics/pokemon/parasect/footprint.png | Bin 85 -> 99 bytes graphics/pokemon/pelipper/footprint.png | Bin 102 -> 119 bytes graphics/pokemon/persian/footprint.png | Bin 98 -> 114 bytes graphics/pokemon/phanpy/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/pichu/footprint.png | Bin 85 -> 99 bytes graphics/pokemon/pidgeot/footprint.png | Bin 100 -> 115 bytes graphics/pokemon/pidgeotto/footprint.png | Bin 93 -> 108 bytes graphics/pokemon/pidgey/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/pikachu/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/piloswine/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/pineco/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/pinsir/footprint.png | Bin 93 -> 106 bytes graphics/pokemon/plusle/footprint.png | Bin 86 -> 101 bytes graphics/pokemon/politoed/footprint.png | Bin 95 -> 112 bytes graphics/pokemon/poliwag/footprint.png | Bin 86 -> 101 bytes graphics/pokemon/poliwhirl/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/poliwrath/footprint.png | Bin 92 -> 107 bytes graphics/pokemon/ponyta/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/poochyena/footprint.png | Bin 107 -> 119 bytes graphics/pokemon/porygon/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/porygon2/footprint.png | Bin 87 -> 103 bytes graphics/pokemon/primeape/footprint.png | Bin 99 -> 115 bytes graphics/pokemon/psyduck/footprint.png | Bin 95 -> 109 bytes graphics/pokemon/pupitar/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/quagsire/footprint.png | Bin 88 -> 105 bytes graphics/pokemon/question_mark/footprint.png | Bin 110 -> 127 bytes graphics/pokemon/quilava/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/qwilfish/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/raichu/footprint.png | Bin 87 -> 103 bytes graphics/pokemon/raikou/footprint.png | Bin 95 -> 110 bytes graphics/pokemon/ralts/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/rapidash/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/raticate/footprint.png | Bin 95 -> 110 bytes graphics/pokemon/rattata/footprint.png | Bin 88 -> 101 bytes graphics/pokemon/rayquaza/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/regice/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/regirock/footprint.png | Bin 100 -> 117 bytes graphics/pokemon/registeel/footprint.png | Bin 105 -> 122 bytes graphics/pokemon/relicanth/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/remoraid/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/rhydon/footprint.png | Bin 97 -> 114 bytes graphics/pokemon/rhyhorn/footprint.png | Bin 85 -> 101 bytes graphics/pokemon/roselia/footprint.png | Bin 82 -> 95 bytes graphics/pokemon/sableye/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/salamence/footprint.png | Bin 102 -> 119 bytes graphics/pokemon/sandshrew/footprint.png | Bin 91 -> 106 bytes graphics/pokemon/sandslash/footprint.png | Bin 90 -> 106 bytes graphics/pokemon/sceptile/footprint.png | Bin 99 -> 116 bytes graphics/pokemon/scizor/footprint.png | Bin 87 -> 105 bytes graphics/pokemon/scyther/footprint.png | Bin 99 -> 114 bytes graphics/pokemon/seadra/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/seaking/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/sealeo/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/seedot/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/seel/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/sentret/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/seviper/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/sharpedo/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/shedinja/footprint.png | Bin 92 -> 107 bytes graphics/pokemon/shelgon/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/shellder/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/shiftry/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/shroomish/footprint.png | Bin 89 -> 104 bytes graphics/pokemon/shuckle/footprint.png | Bin 86 -> 101 bytes graphics/pokemon/shuppet/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/silcoon/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/skarmory/footprint.png | Bin 101 -> 116 bytes graphics/pokemon/skiploom/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/skitty/footprint.png | Bin 106 -> 118 bytes graphics/pokemon/slaking/footprint.png | Bin 114 -> 132 bytes graphics/pokemon/slakoth/footprint.png | Bin 97 -> 112 bytes graphics/pokemon/slowbro/footprint.png | Bin 90 -> 105 bytes graphics/pokemon/slowking/footprint.png | Bin 84 -> 100 bytes graphics/pokemon/slowpoke/footprint.png | Bin 85 -> 100 bytes graphics/pokemon/slugma/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/smeargle/footprint.png | Bin 94 -> 110 bytes graphics/pokemon/smoochum/footprint.png | Bin 83 -> 98 bytes graphics/pokemon/sneasel/footprint.png | Bin 93 -> 108 bytes graphics/pokemon/snorlax/footprint.png | Bin 102 -> 116 bytes graphics/pokemon/snorunt/footprint.png | Bin 91 -> 107 bytes graphics/pokemon/snubbull/footprint.png | Bin 89 -> 103 bytes graphics/pokemon/solrock/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/spearow/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/spheal/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/spinarak/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/spinda/footprint.png | Bin 94 -> 109 bytes graphics/pokemon/spoink/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/squirtle/footprint.png | Bin 89 -> 103 bytes graphics/pokemon/stantler/footprint.png | Bin 86 -> 100 bytes graphics/pokemon/starmie/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/staryu/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/steelix/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/sudowoodo/footprint.png | Bin 87 -> 102 bytes graphics/pokemon/suicune/footprint.png | Bin 84 -> 100 bytes graphics/pokemon/sunflora/footprint.png | Bin 89 -> 105 bytes graphics/pokemon/sunkern/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/surskit/footprint.png | Bin 87 -> 99 bytes graphics/pokemon/swablu/footprint.png | Bin 82 -> 97 bytes graphics/pokemon/swalot/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/swampert/footprint.png | Bin 103 -> 121 bytes graphics/pokemon/swellow/footprint.png | Bin 107 -> 124 bytes graphics/pokemon/swinub/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/taillow/footprint.png | Bin 97 -> 112 bytes graphics/pokemon/tangela/footprint.png | Bin 97 -> 111 bytes graphics/pokemon/tauros/footprint.png | Bin 91 -> 105 bytes graphics/pokemon/teddiursa/footprint.png | Bin 91 -> 105 bytes graphics/pokemon/tentacool/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/tentacruel/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/togepi/footprint.png | Bin 90 -> 104 bytes graphics/pokemon/togetic/footprint.png | Bin 90 -> 104 bytes graphics/pokemon/torchic/footprint.png | Bin 103 -> 118 bytes graphics/pokemon/torkoal/footprint.png | Bin 104 -> 119 bytes graphics/pokemon/totodile/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/trapinch/footprint.png | Bin 95 -> 107 bytes graphics/pokemon/treecko/footprint.png | Bin 96 -> 112 bytes graphics/pokemon/tropius/footprint.png | Bin 109 -> 125 bytes graphics/pokemon/typhlosion/footprint.png | Bin 88 -> 103 bytes graphics/pokemon/tyranitar/footprint.png | Bin 97 -> 112 bytes graphics/pokemon/tyrogue/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/umbreon/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/unown/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/ursaring/footprint.png | Bin 99 -> 113 bytes graphics/pokemon/vaporeon/footprint.png | Bin 94 -> 110 bytes graphics/pokemon/venomoth/footprint.png | Bin 76 -> 92 bytes graphics/pokemon/venonat/footprint.png | Bin 89 -> 103 bytes graphics/pokemon/venusaur/footprint.png | Bin 96 -> 111 bytes graphics/pokemon/vibrava/footprint.png | Bin 86 -> 99 bytes graphics/pokemon/victreebel/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/vigoroth/footprint.png | Bin 110 -> 125 bytes graphics/pokemon/vileplume/footprint.png | Bin 89 -> 105 bytes graphics/pokemon/volbeat/footprint.png | Bin 84 -> 99 bytes graphics/pokemon/voltorb/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/vulpix/footprint.png | Bin 95 -> 110 bytes graphics/pokemon/wailmer/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/wailord/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/walrein/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/wartortle/footprint.png | Bin 93 -> 109 bytes graphics/pokemon/weedle/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/weepinbell/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/weezing/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/whiscash/footprint.png | Bin 71 -> 87 bytes graphics/pokemon/whismur/footprint.png | Bin 114 -> 129 bytes graphics/pokemon/wigglytuff/footprint.png | Bin 89 -> 105 bytes graphics/pokemon/wingull/footprint.png | Bin 92 -> 105 bytes graphics/pokemon/wobbuffet/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/wooper/footprint.png | Bin 81 -> 96 bytes graphics/pokemon/wurmple/footprint.png | Bin 81 -> 97 bytes graphics/pokemon/wynaut/footprint.png | Bin 88 -> 101 bytes graphics/pokemon/xatu/footprint.png | Bin 88 -> 105 bytes graphics/pokemon/yanma/footprint.png | Bin 84 -> 97 bytes graphics/pokemon/zangoose/footprint.png | Bin 103 -> 117 bytes graphics/pokemon/zapdos/footprint.png | Bin 104 -> 120 bytes graphics/pokemon/zigzagoon/footprint.png | Bin 100 -> 115 bytes graphics/pokemon/zubat/footprint.png | Bin 71 -> 87 bytes 387 files changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/pokemon/abra/footprint.png b/graphics/pokemon/abra/footprint.png index 42b5e416f322f2978dbc04b358abf827e95edfaf..073c7871915c099e80c94bfd126361c51d819c52 100644 GIT binary patch delta 88 zcma#cnIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRq}21YSgRZkbk5RRG2KmN~WY^r;o{=-JT#qN~xpAGB_?Y{%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}l!SmM2?p~H zChTQyabcGDA!qQRSgT~8Os5RRG2Kfcd@c(1(8_$80~9mf|}tJ?ZM@yH)|!7gyK j`NI6FHv7+xFYZ?}@NE=hb9Vjm9b|x~tDnm{r-UW|Zki%8 diff --git a/graphics/pokemon/aerodactyl/footprint.png b/graphics/pokemon/aerodactyl/footprint.png index 7c5d3e6c19cad818f67914aceb1c0cbc52fac27a..b127884a536f67f8cb4c5916e85bb1e707e2370c 100644 GIT binary patch delta 88 zcma#anIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRpeAP{6wG-DP> ns%vQBYYgWltB!5RRG2KmN~u_`O=-SEXFbzZ1%eKo+~p*Mu+gAO5dr Xh*>I8ZdIiq0n+B_>gTe~DWM4f?^GM; diff --git a/graphics/pokemon/aggron/footprint.png b/graphics/pokemon/aggron/footprint.png index 3ba6d480ba6d642c5f3aa522cfc4b63518f5bc66..7c9d7177c917efcc4c23d099b61c92cc958a8ef6 100644 GIT binary patch delta 99 zcmYc*pCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}oP-3s;|VqW z2b=m2{^D-_!O!;3p6Anwj`K~8f0>vcGqbfZGx+@Av$(%^Uq4VEgQu&X%Q~loCIAR? BCAgT~8Os5RRG2Kf=#{I6mQFkJ90f{XFhFB;z(1*CeD>G<4a? jrTbP0l+XkK$&D9Q delta 66 zcmYcbn;>b+00ib8ht2>gSx*?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bcG1Ob7B4I3B~ sXLGUrzopr05=&NmjD0& delta 75 zcmXSjpCIYR00ib8ht2>gHBT4E5RRG2KmN~u__w<4@o~o&1=fd|>qNdd&U@Hydw718 c#;@=43?c_b7hPH=vkj!v)78&qol`;+0DW*C_W%F@ diff --git a/graphics/pokemon/altaria/footprint.png b/graphics/pokemon/altaria/footprint.png index 6c65deae5395825eff738bb3460ff29bd8dcc550..3310f5d0d2a2985d67a558d5bc406120da30d233 100644 GIT binary patch delta 98 zcmYc(n;;p>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRq}l!S!51dn%# z8uJb({BL&r$INUmV4IL&&*0>sX~DEAC53@OQkyII#pn57fZ7;5UHx3vIVCg!07)<) A_5c6? delta 80 zcmXR*nIP%S00ib8ht2>gZBG}+5RRG2Kfcd@=x=*?PEy;vls4u!Jp4Z-?HDH79OkbU hVDdUB81Quee}*T)qWyl=b235NJzf1=);T3K0RWVd9cBOk diff --git a/graphics/pokemon/ampharos/footprint.png b/graphics/pokemon/ampharos/footprint.png index bfc2f80345670bfe3002935ba5e737bd42f12ce6..6f0cc20f08d37c26c301638136ec2a207445e735 100644 GIT binary patch delta 86 zcma#bnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRpe2IgaIY|of^ o-taqg{Aadm>R=W%FkoQ#F`0Ybtf$9M1C=s(y85}Sb4q9e0F65wE&u=k delta 70 zcmd0bnjq=O00ib8ht2>gMNb#U5RRG2KmN~W?D%)p_|L}lABy}=@;@#Ly2z|}@V}mc W<+X^*QK_DJAWfdGelF{r5}E*%h8l+e diff --git a/graphics/pokemon/anorith/footprint.png b/graphics/pokemon/anorith/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgEl(H65RRG2KmN~u7;k%6xU`M=3=eM)2g?(ti_B#LzYd)L gaC{!)ickOR8R~xu+*lwx_cTbir>mdKI;Vst0H56-cmMzZ diff --git a/graphics/pokemon/ariados/footprint.png b/graphics/pokemon/ariados/footprint.png index cee3b1ba5b53c8cc52a6ff71946dc20d77698941..e766c18df2e60c152225016d8c48db11440c819e 100644 GIT binary patch delta 80 zcmWGbnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRq}0}MXW5;yD( hKG-KbC_ONRg~3gi>6u*f^kSeQ22WQ%mvv4FO#lNB8c+ZL delta 66 zcmYcZn;>b+00ib8ht2>gSx*bP0l+XkKap)W? diff --git a/graphics/pokemon/armaldo/footprint.png b/graphics/pokemon/armaldo/footprint.png index d12d2e42c098253a7527ec000040c60abae4a5de..b6c085f3dfd29b0561e2b38f3b63fe0935454b19 100644 GIT binary patch delta 92 zcmazqm>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bOv2?i4w6uG(C t9&+-$QkQsBzd-pXzrvBahQ>xl2EOAwuO@8ix&_q0;OXk;vd$@?2>@@QACCY4 delta 75 zcmXSjpCIYR00ib8ht2>gHBT4E5RRG2JO0mo_@`LFs&39hU%SJ+#cj-QUc6wm=lHuJ c{l|ZKhIiYAe%vs7oCVV9>FVdQ&MBb@08!H(!TLuwofoV}SSmdq8yzp00i_>zopr05#|ui2wiq delta 70 zcmYd~njq=O00ib8ht2>gMNb#U5RRG2KmN~WZ2EWA_|N9_AIkhr_6aZgZJA>jB^Vh( WZb&BbSe{D;Y4UXSb6Mw<&;$Tfg%`U3 diff --git a/graphics/pokemon/articuno/footprint.png b/graphics/pokemon/articuno/footprint.png index e6e4fa9ef33bf4f1b978535ddb9d1a8715fafaa5..b364b5211b9a580aacc7772bc8918f3c341c9045 100644 GIT binary patch delta 102 zcmd0*njo3T%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vir;B3<$IRq}j06UygTg#* z=@L4P8GOx8c-U^r^8AsPxFK(_K|UcNuR+O;O@VgLr)jS5RRG2KjP0bxV%3jc}~(;hIvs+Tl!0${yUO(AB_J@ nNdJ*|{=;&)u77{ifBctcc(_ZngjdMwAjl9;S3j3^P6KWqz delta 68 zcmYd|m>_A-00ib8ht2>gc~2L|5RRG2KmN~W?D%)X_|F7)cLzs~U*YE&0>AyYXAt!h UdsSYV`w^tY)78&qol`;+07oYoM*si- diff --git a/graphics/pokemon/azurill/footprint.png b/graphics/pokemon/azurill/footprint.png index 60db8e03b896c91b1789ba71a1f212454ba311d8..0839c9c089a55ea5364b9ba3c65338c2d5cbe3ff 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2c|RZ4jq3P gnH*gtq#t-OEIiMy)y;pv52%L0)78&qol`;+0Kq31ivR!s delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~W?E814`2v3>OH;?6)$OYp8KT!q>@b;k QCm5vM)78&qol`;+0OLXzwEzGB diff --git a/graphics/pokemon/bagon/footprint.png b/graphics/pokemon/bagon/footprint.png index 9a93a7564e0f78f9fecae9c42d7a9960f329c610..aec25f6acb3bf172236b0fee04ed811fa45d93f4 100644 GIT binary patch delta 86 zcma#fnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRq}2F7j7JT?3h nKOVkdV76v4H85Zn3=w5G;>Z4G?;C+1K&1?xu6{1-oD!MgB~KT}5RRG2KmN~WY^u9uTr(y82ZQ@J9(#oq^B(dGI8J3` Xurv_=#=q&^TaYeKS3j3^P6gVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/banette/footprint.png b/graphics/pokemon/banette/footprint.png index a15814f2f0c258a565160837b88e47a3dc474ca6..20f6b642e3f26a0c763aa339e7fda8e9907b6415 100644 GIT binary patch delta 78 zcmWGdnjq=P%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vcr;B3<$IRpe2i6{5o*s6I f83#E|9AjVz3SstgRIm60RKnot>gTe~DWM4fnba55 delta 65 zcmYcaogit$00ib8ht2>g8BZ6-5RRG2KmN~Wl>ECo{YU!w59~b+IVLy%|7TpSB{M_y Rn56+oy{D_6%Q~loCIAUR7-Ikc diff --git a/graphics/pokemon/barboach/footprint.png b/graphics/pokemon/barboach/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vmdKI;Vst02lHZa{vGU delta 67 zcmYcfpCD<+00ib8ht2>gIZqeI5RRG2KmN~Wl>ECo{YT>Y4~}vzbqyEgt5aARn!=^D T&NDaf1L^Q|^>bP0l+XkK9#0qL diff --git a/graphics/pokemon/beautifly/footprint.png b/graphics/pokemon/beautifly/footprint.png index 49175cb0267fddea4ef305365c533bf55c2bfce8..7111a8b703abce4f8ccabeb30011d6e2ec6081ba 100644 GIT binary patch delta 83 zcmaz{pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpe2i6{5o-=$r lK3ob%<{UUs!Qd;$U~r8|_twG5pMdHZJYD@<);T3K0RS~=8u9=D delta 69 zcmYd~oFM7I00ib8ht2>g1y2{p5RRG2KmN~Wl>ECo{m16{58u}c{4$>ZaK0_`Dkg?A WD`dA$_vknb(&Ops=d#Wzp$Pz#yBj?K diff --git a/graphics/pokemon/beedrill/footprint.png b/graphics/pokemon/beedrill/footprint.png index 5c3f21090f08b937a65491e712a8ba637195f7d0..475d5235a5af0450b13c4b6a279fdd1cf73de659 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2WDQL9*2^K gM#-LroDc?v@Sn`5I`)aK0jgo}boFyt=akR{0K}ykDF6Tf delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~WWW8$qhgqq*%|3x8Ww90m!_rn6iP9)% PE0A(eS3j3^P6}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRpe2i6{51s28} dPK6dO2JP33=T&D|od+sl@O1TaS?83{1OQAa7D@mB delta 62 zcmYcYnjmS(00ib8ht2>gNlzEY5RRG2KmN~Wl>EDzU6JGW^BMuCPzHvJljVfZU0Qho Oq}bEd&t;ucLK6Uao)u02 diff --git a/graphics/pokemon/bellossom/footprint.png b/graphics/pokemon/bellossom/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg6Hgb%5RRG2KmN~WYS6G7^>bP0l+XkK_--Gq delta 78 zcmXR;njq=P00ib8ht2>gO-~oc5RRG2KmN~u7;k%6zPe5Q6_5KANj?K(n*?`9`5%s( e99TlW{kLa0x<%;zMQgn}kY-O;KbLh*2~7YpA{*)e diff --git a/graphics/pokemon/blaziken/footprint.png b/graphics/pokemon/blaziken/footprint.png index cf18a353ab28f3f74a971e1e86a267dad8000207..371621ba4574669ee2403925c81ba6ff807b0b9e 100644 GIT binary patch delta 113 zcmXSEVVoeD&CI~SplX||1f|G|6zsNHpd?<%^zggPXFim|KIS+-^2;46EgTe~DWM4fb0#e@ delta 97 zcmZo+ESVq~%>V@E9f!^UDQiy`#}JO0j0Ozn|1}uS00ib8ht2>gbx#+^5RRG2KmN~W?D{47Z@clIboPbye-ysB%eB8-u65gursIjg26!p00i_>zopr07^p~m;e9( diff --git a/graphics/pokemon/breloom/footprint.png b/graphics/pokemon/breloom/footprint.png index 98d920669da7e8cd5784a8a447c1645812c79427..7e940a5d7f9f686a6d5f1096fb73ec396343711d 100644 GIT binary patch delta 90 zcma#cn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRq}f`kOmgaq$| r2igt_*I0Ra*d=B>T+!Gl*d)QQXAOsif?3`npmGLJS3j3^P6gRZkbk5RRG2Klaam_`RlW{%1+MZ^{?eSG3iCgTe~DWM4fNy;7O diff --git a/graphics/pokemon/bulbasaur/footprint.png b/graphics/pokemon/bulbasaur/footprint.png index 8e9ab9c6bd25f1d07d0eb421947deda30eee968f..6dafa96e2bd8e86290ed1c93739becf9aee603fe 100644 GIT binary patch delta 82 zcmaz@n;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2R2@wHR2LC k>=gt)GqW9IKB2`h_dMIRL!WKDfyx*>UHx3vIVCg!01^QjOaK4? delta 68 zcmYd`m>_A-00ib8ht2>gc~2L|5RRG2KmN~WYzopr09~&c+5i9m diff --git a/graphics/pokemon/butterfree/footprint.png b/graphics/pokemon/butterfree/footprint.png index b2740e9ccc7a3f58bfabb6b9ed66b973d9391201..c6b4750d3097dc04a7633f10ab8861da50695749 100644 GIT binary patch delta 82 zcmWGfn;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRq}2F7D-Y|oe# jj{IY2R8Vrzlwe@kQp&#ib6rXVP#J@#tDnm{r-UW|8{8TB delta 67 zcmYcbpCD<+00ib8ht2>gIZqeI5RRG2KmN~WZ2EWA_|Hc6h4P;`SOgip4o+cY@Z^** T-^r;B3<$IRq}11y|8JoX1P c7=!s3>?4>qw&bcC1LYY!UHx3vIVCg!05rT6cK`qY delta 61 zcmazKoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wls%jN<2;|+XTv4`m>Kq|$r>Ko_0gIZqeI5RRG2KmN~W?5I0oY?Hvgkon9D4kf-2hA>WsJr9LK T3T&6RIK6a(XGuBP)2f@(nB44$rjF6*2U FngCtdBar|A delta 89 zcmb=;ogf*)00ib8ht2>g6Hgb%5RRG2KmN~uxZKv+Q|IuMgtmRhd7jTRK2e`CSio#oT+$p`onwWZU6r>{=O`lptx}&8^|0_S3j3^P6?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MU9JZIP) dI8Gd3V6fi8)cJ|OLm8-m!PC{xWt~$(699Oc7o`9I delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1ORFT6$tHQ6dLO|`x-X#-FdgQu&X%Q~loCIH+`7;gXo delta 68 zcmYd|m>_A-00ib8ht2>gc~2L|5RRG2KmN~Wl>GbW{D;N!9`@UE{9T>yF!}F)d4>Zq Vvc3oE^cg`~JYD@<);T3K0RVoa8hHQ! diff --git a/graphics/pokemon/chansey/footprint.png b/graphics/pokemon/chansey/footprint.png index 17893b9fb7abe7579687ad5eb471d53578fab3d0..20028e8b7487691a082b65d1ebc46bb62384399e 100644 GIT binary patch delta 83 zcmaz@pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpe2IgbTJZJbX k2>xc2$Vy0PTanDb@Jxf_v#`ReD4;q9Pgg&ebxsLQ05?Dyb^rhX delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~W?D%)n_|HUlcl$SqE9O1qkGT2&KZAIf U*n6#32@{YOPgg&ebxsLQ0A@}Z&Hw-a diff --git a/graphics/pokemon/charizard/footprint.png b/graphics/pokemon/charizard/footprint.png index e69f383927475ff6ba14ae45014dfbc9c03d9721..86218af32e6a9d28d92b6644618425926fa99b9f 100644 GIT binary patch delta 90 zcma#gn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRpeh9)+FM>Yo! sR5v^R delta 75 zcmd0cpCIYR00ib8ht2>gHBT4E5RRG2KmN~uSZ~WwYn=XL$+-^=lCrf4>Ny85}Sb4q9e05*3WVgLXD diff --git a/graphics/pokemon/charmander/footprint.png b/graphics/pokemon/charmander/footprint.png index 2f7723621e4196de12eaa3ddf4ceb7b2bb2e2559..9f0bcbdd913c976a674f7334bdee95b101756c07 100644 GIT binary patch delta 86 zcma#bnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRq}hGsUlX`DQ3 o#3gRnFHm^Ku5hG+VG#$z5fx6Co1gQnfJzxWUHx3vIVCg!0FgNxrT_o{ delta 70 zcmd0bnjq=O00ib8ht2>gMNb#U5RRG2KmN~W?0O|x_uTl;rSu;M`NRy|lpUXO@geCyJq8r`- diff --git a/graphics/pokemon/charmeleon/footprint.png b/graphics/pokemon/charmeleon/footprint.png index 6ec15ee2042e2a1b3dff94fbe87151e9ae69ba34..87305df5be941d8d826cc80bbf0a3318993db2eb 100644 GIT binary patch delta 89 zcma#gogf*)%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V0r;B3<$IRq}h6Xl)M>Yo! rR5v&NXBXL6-=Or2ou`Lg;T6LRZm!T*hYH<*su?_8{an^LB{Ts5L}MQp delta 75 zcmd0epCIYR00ib8ht2>gHBT4E5RRG2KmN~WYg2~QWt5RRG2KmN~W6#lz8{f9EYlLOl-5r$n%GBbJZGVcPZ N^>p=fS?83{1OQAT6IlQN diff --git a/graphics/pokemon/chimecho/footprint.png b/graphics/pokemon/chimecho/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vr;B3<$IRq}11#(k67mfK c6B-#Ad=4@@hehtl2Ff#dy85}Sb4q9e07GIHQ~&?~ delta 60 zcmazKm>_A+00ib8ht2>gaZeY=5RRG2KmN~Wl)Y*EXEM8@0<*Ii!-l;w^SkH0ssbtX MboFyt=akR{06B>hv;Y7A diff --git a/graphics/pokemon/clefable/footprint.png b/graphics/pokemon/clefable/footprint.png index 5ff3e19a1de46290dfdd4b12941b2a23c16d4ff4..2f3f60fbdf45b5ddae26dfd3c9f37d9a2160aa9e 100644 GIT binary patch delta 94 zcmYc-njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRpe24*v6wtrk~ vcHC?~?E_TO4g9Zwg>5RRG2KmN~W?5LZU{^P>A4<9WKGpA`(Rm^z!xmbXS i>)(U)AL-{A!Z;bCT_oO`P12GD>GyQ?b6Mw<&;$S$?H_dj diff --git a/graphics/pokemon/clefairy/footprint.png b/graphics/pokemon/clefairy/footprint.png index 85c25a5dccebc65df4bb478874680cc968ac15ad..86276e6d0a6d10a3805b0cb4e02ee45ec4ecec07 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRq}2F7D-Y|oe# gj{IYgWn=|P?N;Y7J$12i3Q!S)r>mdKI;Vst0NSh=@Bjb+ delta 65 zcmYcZogit$00ib8ht2>g8BZ6-5RRG2KmN~WZ2EWA_|Hc6h4Pr;B3<$IRq}18frf1_t&F c6D1fJOdd0(r3zKa1LYY!UHx3vIVCg!056agHUIzs delta 59 zcma#|pCD<*00ib8ht2>gF;5rA5RRG2KmN~W6#lz8{f9EYlHn4D6SHM&GgTe~DWM4fKkyW1 diff --git a/graphics/pokemon/cloyster/footprint.png b/graphics/pokemon/cloyster/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v`dswtV)<6rf%PPgg&ebxsLQ E0E?6$5&!@I delta 89 zcmb=g6Hgb%5RRG2Kfcd@c)q%=`nlveCP^T{5NLmR@=qTACz5tI pjQ^}i|H16?U-I97_KE-hF*DR(klKD!c)1D498Xt2mvv4FO#oQ=B>DgV diff --git a/graphics/pokemon/corphish/footprint.png b/graphics/pokemon/corphish/footprint.png index f624724c71d78759167096cf7be0241a7803aade..5717fd7f23bfa71082034a1742bf63b038fb759f 100644 GIT binary patch delta 96 zcmYc*nIIX>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRpe2Uas4o^K8% x4UYd9ng6r1eUsgT~8Os5RRG2KmN~Wl$8B}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MUv5;No* d1ST{xGWdotd){(hdm5;K!PC{xWt~$(699C>7rg)g delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~W%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRq_ghY)8$vgO-~oc5RRG2JO0mJ_+Od1o5`73nL{?gZ2|img)c61ANJcG f-d`o~>%Tlh`Wu0nt)C`xgEV`(`njxgN@xNAF6%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}goFtX5-03E ztnjz3@i!~;Z+5miiAnVgZtN0oBqiQ7oNDlrWDp4Es!Q3g775hH;OXk;vd$@?2>`f5 BB60u# delta 84 zcmXTVm>}uT00ib8ht2>geNPw15RRG2KmN~u_%prD{S=RXi{!oz<3A75e=s=nKRI|} l-opd+ZOsm;|0VzZXJ>e;Et(Q#^KdfA2v1i(mvv4FO#r@`BWM5s diff --git a/graphics/pokemon/crobat/footprint.png b/graphics/pokemon/crobat/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vA9|ar~L}@_8Ik6@#a%pUXO@geCy@bs6jc delta 65 zcmYcdogit$00ib8ht2>g8BZ6-5RRG2KmN~W?0O^l@09VMgD&3`zO0v9#KT}1Blheq RPjneby{D_6%Q~loCIAH97#jcp diff --git a/graphics/pokemon/cubone/footprint.png b/graphics/pokemon/cubone/footprint.png index 21deee1a6c1f32760c6a541df45babb5238a5c41..46a6a96595508a686a2d4c18d46270dc4fc915fa 100644 GIT binary patch delta 82 zcmWGfn;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2c{lgo-^zY j9e)``7;ic_sxUD0tYc%eJkR+XsEonW)z4*}Q$iB}{!SS0 delta 67 zcmYcbpCD<+00ib8ht2>gIZqeI5RRG2KmN~W?E81s_|Hc6h4P;QSW=i-CthJ-D7YZ` T@Oau8S&$A-S3j3^P6F?c233{=D5>FVdQ&MBb@0H;nDp8x;= delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~Wl>ECo{YUco56*Ip4KXUL3@yP@cKhas QsezPxy85}Sb4q9e0KNGYX5on&x2c|%v?hSiB1CL{_xVDMxVZD3?L`I-Hz-JOVuK%ESpu6{1-oD!M< D-sU72 delta 87 zcmb=-o*)^-00ib8ht2>gBTpB{5RRG2KmN~W?5I0oTyr|zV%nJvC#NSS>mNSZ$>T0= oER&OF@o&b%zvUA|0vIDy8H~Hd-@2ZRy8<%B)78&qol`;+0Jn!BkpKVy diff --git a/graphics/pokemon/delibird/footprint.png b/graphics/pokemon/delibird/footprint.png index e7348586ec32968bd988c204b0baa2332db7ca2b..56baaef90a3d3f2085241819636b8c6ee6288374 100644 GIT binary patch delta 85 zcma#boFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpe2IggK0!h{f m4)8hu;TPaIk($?_!NPF<52xDMgrIVuN(N6?KbLh*2~7ZNsT(2y delta 70 zcmd0dnjq=O00ib8ht2>gMNb#U5RRG2KmN~W?D%)B`GS9So4mmnN4ds^JN93B5~ecf WHi_*yb@wM1NRy|lpUXO@geCxwjT)%{ diff --git a/graphics/pokemon/deoxys/footprint.png b/graphics/pokemon/deoxys/footprint.png index ea97e4014c644dc0e5f62ff9fa3ed23c91c893c2..31270c17c1be199ed735d0e0ec8216e177651726 100644 GIT binary patch delta 77 zcmWGZoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}N+)dCssq ebbMr3ro!N`j_I`W368ly6%3xPelF{r5}E*}J{ZFQ delta 64 zcmYccnILJ+00ib8ht2>gX-^l&5RRG2KmN~WJzf1=);T3K0Ra1(83O?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgTe~ HDWM4fU5q4N delta 90 zcmb=;n;;p=00ib8ht2>gQ%@Ji5RRG2Klaam__wa@^CyLpJM$jS)IGe|sg3^(kNgkG sx*NuSe(*cV|2MArcmBg4`@{eLGcbjUFFMkm=m|2&)78&qol`;+0Qhhx^Z)<= diff --git a/graphics/pokemon/doduo/footprint.png b/graphics/pokemon/doduo/footprint.png index 0710eca52335487793d62a73c3e601a453c398b7..21ca1be91cd24ff127bee58b944ad29f1a954798 100644 GIT binary patch delta 94 zcmYc-njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRpe24+4+fk%c6 wirZKOs{YSi_)ot14?o*Cex5Vz5(x|pGY#2SvT?522Gqjf>FVdQ&MBb@0BpS-kN^Mx delta 81 zcmXR)ognGM00ib8ht2>g9Zwg>5RRG2KmN~W?AW)Tec}1%jxV0q2nan$$Vf=3IB@Pm i^ZbYXw#+U!|Nm!5@s+StlH+Lu>GyQ?b6Mw<&;$S@{2(a+ diff --git a/graphics/pokemon/donphan/footprint.png b/graphics/pokemon/donphan/footprint.png index 394cf64570335f0d1ff910eed817c8c175a8eb97..0bb8543ed59ab68ec3a7245ef1f4ed5db8bc23a1 100644 GIT binary patch delta 93 zcmYc&oFEy&%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V8r;B3<$IRpeAjnBbuw!s~ tmM`(_2y9zFm7 delta 76 zcmXR+m>}uS00ib8ht2>gbx#+^5RRG2KmN~u7;k%6zFNRa@k~L3WQ*JeXGsAwf!YV` cnm_)_Gi>)0?3_FG+Eb8LPgg&ebxsLQ0Pjy5F#rGn diff --git a/graphics/pokemon/dragonair/footprint.png b/graphics/pokemon/dragonair/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vX7F_Nb6Mw<&;$VP=N={i delta 72 zcmd0anIP%R00ib8ht2>gWltB!5RRG2KmN~uSZ{k+zqZZ)mBN<>$ws>k$`|asU7T diff --git a/graphics/pokemon/dratini/footprint.png b/graphics/pokemon/dratini/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vzopr07OL^mH+?% delta 67 zcmYcfpCD<+00ib8ht2>gIZqeI5RRG2KmN~WZ2EU5{l`ImC;1x}1zrC1+XP55$kvEV Ty`GcH2-4x{>gTe~DWM4fAXXQ> diff --git a/graphics/pokemon/dugtrio/footprint.png b/graphics/pokemon/dugtrio/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgLr)jS5RRG2Ka$UXXq^A>XK|bLH6G~-NuFwnDg6x-lDM0h mxSJXIJp?pZLl{E79hYOMn91+ixN^^TkRhI~elF{r5}E)ZryczO diff --git a/graphics/pokemon/duskull/footprint.png b/graphics/pokemon/duskull/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgWltB!5RRG2KmN~Wl>ECo{fG7Zhwp3K_P>|>#~5gL`2Wun ZTny*#%ARobaq0kR^K|udS?83{1ON%j9c=&r diff --git a/graphics/pokemon/eevee/footprint.png b/graphics/pokemon/eevee/footprint.png index 4e4c01c9f52e8e339c7e5b2e69396dcd98705720..793daaba5287a9c136ac686ff458b1b7586e799b 100644 GIT binary patch delta 91 zcmYeupCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRpe2i6{5o;}hM sPwE>c#IQ2=Gcw0BGXG|tU?IW4P$kNy>fLnm4p2RVr>mdKI;Vst0P$%XV*mgE delta 76 zcmc~#m>}uS00ib8ht2>gbx#+^5RRG2KmN~Wl>ECo{l}B@9~xv^?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vCz`*dom*Y$BhM50A)eN4lelF{r5}E)2m>pjL delta 73 zcmd0eognGL00ib8ht2>g6;Bt(5RRG2KlaUM?6A9SY%`&K5&t)h7w)!)=l@su^4SkK6Oo0(0Foh^)=?HQX!Qi=l`!{+0xrylc|lmYcHc)I$ztaD0e0s!(TAFu!b delta 81 zcmXR;ognGM00ib8ht2>g9Zwg>5RRG2KmN~u7;Jkuys~ZmM;`e{l69wy|J*zOA>01& i{3?xK-{(KHXJTaV+%6?CiG$}4NWZ76pUXO@geCwms3492 diff --git a/graphics/pokemon/electrode/footprint.png b/graphics/pokemon/electrode/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg1y2{p5RRG2KmN~W?D%)X_|F9Ph5UasIFvZ1v}*kRFVDch VBYMOt&`uPj$J5o%Wt~$(696()7YqOZ diff --git a/graphics/pokemon/entei/footprint.png b/graphics/pokemon/entei/footprint.png index 7336df599ddbf4867b284a1eac39f6b54f8a30a5..50470342a1dfc63a51de702e4aaf3bb2ec14c2ea 100644 GIT binary patch delta 97 zcmYc-ogf**%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V4r;B3<$IRpeAjnCWV0R#) yzWLxkevXs>6CeCPc;G){*A00G!Ox5fq8J=qcpJH=xl9J?V(@hJb6Mw<&;$UvvLsLd delta 81 zcmXR-ognGM00ib8ht2>g9Zwg>5RRG2KmN~u7;k%6xVnw`6%YFi#}|yohuO>8`2Pfa iahB`)cf@PJZ3cUWbiu6+*99pg8BZ6-5RRG2KmN~W?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vR;L-mB2Wl8rh%rdn^ZI$1$36urX7F_Nb6Mw<&;$S?86IT- delta 72 zcmd0anIP%R00ib8ht2>gWltB!5RRG2KmN~u_`AC8_;JS<48~$#8f07SJ{bSmnEvCx YJi}vqp(#Oedio%3p00i_>zopr0Qoc=B>(^b diff --git a/graphics/pokemon/exploud/footprint.png b/graphics/pokemon/exploud/footprint.png index b27283a141af13e22cd338bd6cf3c068980bc019..daecfd459d369de32f16e8531775097edabba067 100644 GIT binary patch delta 105 zcmd0)ogkUQ%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U~r;B3<$IRq}v;>cLi5l|` zC+uxM=+xx+hmrX|JDVgo8z-m0qX`KQ_8mA-!_XqpxPp=4)oRXdE@E-~K-~gV^0^y5RRG2KR(Y-^fPq!H##hs-uC#sWZVhkng{6>HFF;R pEEf3nZ_dMRyTkI;0>9W@zA^}17Spj)3Cjf;vd$@?2>|cyB60u# diff --git a/graphics/pokemon/farfetchd/footprint.png b/graphics/pokemon/farfetchd/footprint.png index 2f08f732d57ba03dd0dc4c80f222e72fae641c16..cbfca034d5eee3883f7f201bb83fd69bcca33d25 100644 GIT binary patch delta 95 zcmYc;o*)^;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Uv8w7_Mq^7By^15(nyG@O1TaS?83{1OV{6AP4{e delta 79 zcmXR;o*?PP00ib8ht2>gEl(H65RRG2KmN~W?D*GsaZXa3Sb7`t8-*_o@-22JjQ?y% f{}IgZ^xr{?Q6p5Wpsp@33#8lA)z4*}Q$iB}oQNHP diff --git a/graphics/pokemon/fearow/footprint.png b/graphics/pokemon/fearow/footprint.png index 04ea7924d542db2a49a487eb02dd537ce482d089..82302a8043948dfb7b5398b6109718c3f7d37e54 100644 GIT binary patch delta 98 zcmYc*n;;p>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRq}goFno2@mER zP_S%vEMw>RSkIvNja}hLO+%w#htvU%6;l`)p1kBtl;_fO1!`mPboFyt=akR{0A>*( AIsgCw delta 82 zcmXR*n;_}S00ib8ht2>gT~8Os5RRG2KmN~uc)PkS|0mD+OOkRsn=i1}3H(yzcdCCQ j`HwNsR^o5^kN@%v5>v$*<+u*GgADL=^>bP0l+XkK9kL%M diff --git a/graphics/pokemon/feebas/footprint.png b/graphics/pokemon/feebas/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgRZkbk5RRG2KmN~um~VGDzP4@tD}^u3vW@>f9G+mq@pp6j bkN@%vckT(NR=xMm2Wj+l^>bP0l+XkKWc43Z diff --git a/graphics/pokemon/flaaffy/footprint.png b/graphics/pokemon/flaaffy/footprint.png index d1695ec805ec5d5c06d1b784fd4f4158ac56c48f..6824d2bb9e28d6866aa388f8de1e55f10f7c396a 100644 GIT binary patch delta 77 zcmWGcoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}MU93P)-f e8XICH7#KnWSSD=w>7EZ%!QkoY=d#Wzp$Pz$$QVQb delta 61 zcmYccoFHkz00ib8ht2>g2~QWt5RRG2KmN~W*?y}vd$@?2>@oP6q5h| diff --git a/graphics/pokemon/flareon/footprint.png b/graphics/pokemon/flareon/footprint.png index db5d37ed461ebfb586a73eeabf27814696f06a4d..aecf35c717cf1cbf8d8f1ad85533d8625b5ae4a3 100644 GIT binary patch delta 98 zcmYc%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRpe2c{lgo;}hM zKkN-o{7;y$I$^@bga?KR53~~!>JJ>KVOYe%&^?)L@l9r@eL!stp00i_>zopr0E}WI AZvX%Q delta 83 zcmXR*pCIYS00ib8ht2>gJx>?M5RRG2KmN~W?E81sxaL#(j|1mFG|YXNXnpwcW1jiv ljceYd|4=;t;keu)Hip92lJ>#hc@01&c)I$ztaD0e0s!IWBpv_& diff --git a/graphics/pokemon/flygon/footprint.png b/graphics/pokemon/flygon/footprint.png index 5af877878d1576ba585bad5fc76442f91b1b0638..ef9f392cf1072bb4830e4352edef5f45adbc6e1d 100644 GIT binary patch delta 90 zcma#an;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRq}oP-2B2B#cO ro;BPKJm1(8N*J{GLKwmi-(X;1Hs<gWltB!5RRG2Kf=#{I4;*xcP{;hD1XwQ3GB+%D=Y#SW6tic YV)*4P^5SVk1V|Tyr>mdKI;Vst0I`1>fdBvi diff --git a/graphics/pokemon/forretress/footprint.png b/graphics/pokemon/forretress/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgIZqeI5RRG2KmN~W?E81s_|L}nMf-m{a%eQIdGNoUVP?II T(5~6JIUpULu6{1-oD!Mb+00ib8ht2>gSx*ECo{RgwlH=h4*9CJ)={{PRoNlxa5 T{Gz$@K^i<={an^LB{Ts5D3uw9 diff --git a/graphics/pokemon/gastly/footprint.png b/graphics/pokemon/gastly/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgB~KT}5RRG2KmN~W?0O|xchtD%Q~Hks{SNj|9AEU?`kbw2 Xurn7g`oHvUEl8KAtDnm{r-UW|ziS)X diff --git a/graphics/pokemon/geodude/footprint.png b/graphics/pokemon/geodude/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgDNh&25RRG2KmN~Wl>ECk{YPTIL;Wks08s{pIl9sZ7P&6) P0jc(M^>bP0l+XkKo2M0C diff --git a/graphics/pokemon/glalie/footprint.png b/graphics/pokemon/glalie/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v{vGWE{C4;A{pUXO@geCw{N*YT5 delta 72 zcmd0dnIP%R00ib8ht2>gWltB!5RRG2KmN~WZ2HF-Xxs7e_`HYhHX@8S|G$xZkoE6B ZJ3}j%RPr3nC0jw-JYD@<);T3K0RYqO8_WOz diff --git a/graphics/pokemon/gloom/footprint.png b/graphics/pokemon/gloom/footprint.png index 7e9c265e81c8f7c24bf5d8385c93ed02ed9bacab..13ca4ee71eaf5eaa4eec2b2b4f90a8d4e6718b03 100644 GIT binary patch delta 84 zcma#bm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2R3#I3Hb&A lV*%NO1olO2Y-u8*4Bc;8tHRixr2`c*c)I$ztaD0e0s!?V7svnr delta 70 zcmd0Znjq=O00ib8ht2>gMNb#U5RRG2KmN~WYgRZkbk5RRG2KmN~WY< diff --git a/graphics/pokemon/goldeen/footprint.png b/graphics/pokemon/goldeen/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v}@~zk6q+sJ%i#uc7-E#4UIb+8F?6-fACB$v|9cUsDr`N)z4*}Q$iB}gO-~oc5RRG2JHF3l?5LXLxZ>!{hYZ#twh!1B@_$nJa(LcD ff7`?V|2wcS>}(VEXSsI852V@C)z4*}Q$iB}bVwcc diff --git a/graphics/pokemon/golem/footprint.png b/graphics/pokemon/golem/footprint.png index 8ddc6345cc597c7221e869abf81b99dce36b3103..c9f61444290bb9d6885ca773eaedfafb624feaa0 100644 GIT binary patch delta 94 zcmYc+njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRpeAV^9G5KGu# umN4NzgVP`W0D<4kY|of^dUz9#FfiN=g4Nn)x5RRG2KmN~u_`bf)`n_b|ob-wV{7&*u0x$4aw%LE< e`Ty$R3ws6yUD4Bi`&r9CdOcnJT-G@yGywpKP#zNi diff --git a/graphics/pokemon/gorebyss/footprint.png b/graphics/pokemon/gorebyss/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg6;Bt(5RRG2KmN~WY_j`lY*Un8ae&W>ea1qLLw^sP|8QJx Z5f20NRgs2_ANeLAeV(p0w{ew*%EOc)I$ztaD0e0s!Ye9vA=s delta 71 zcmd0fo*?PO00ib8ht2>gB~KT}5RRG2KmN~W?6do6Y*Un8ae&WB{)ga;cALZU)g4j{ X){n)i|5-FF2kG*3^>bP0l+XkKZPpn> diff --git a/graphics/pokemon/grimer/footprint.png b/graphics/pokemon/grimer/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgJx>?M5RRG2KjP1S*gNOpY|F#SsRF;M=RagMXR;MctN1hH kA*1nO_OdqrS3LVaGhR;;dS=EV69zKD)78&qol`;+056#zjQ{`u diff --git a/graphics/pokemon/grovyle/footprint.png b/graphics/pokemon/grovyle/footprint.png index c78ea507c9d1ad31443fbc7fb1531c862f38bca2..149efec284efb96c6c9d8469289ace7a2727f0db 100644 GIT binary patch delta 94 zcmYc(njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRq}goFo%2?C!I w1WqSRSe@|T|A7Pl7`kTgD+nYrGfOZqT(seM!`+`40o20a>FVdQ&MBb@00TuJyZ`_I delta 80 zcmXR)nIP%S00ib8ht2>gZBG}+5RRG2KmN~u__?xe`)$cMzx0Y5=RP#ff7os#@^_>A hg8HvK4paaCXJ*iG68o0fmpcul-P6_2Wt~$(697YbA;$m! diff --git a/graphics/pokemon/growlithe/footprint.png b/graphics/pokemon/growlithe/footprint.png index 2517cdcbadabf5a79cac05d35cf1f7a1df6c9438..b9af4c119c797d11771944fed097c284c9efc4be 100644 GIT binary patch delta 84 zcma#fm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2IgaIZ11>v lKG_Ed{AU+PvOCbg!thI;bK(}cBPKwF44$rjF6*2UngB|t8hZc$ delta 71 zcmd0Zo*?PO00ib8ht2>gB~KT}5RRG2KmN~W?D%)pxaMMd#eu#iyARD5}uS00ib8ht2>gbx#+^5RRG2KmN~uxZIYbc1rpWh4UXO?G8_`5MXYqyP>gnp|vd$@?2>^l|AC>?B diff --git a/graphics/pokemon/gulpin/footprint.png b/graphics/pokemon/gulpin/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgRZkbk5RRG26?*3jI%HdJ&6Kp7B`GB#_=3S$#5RF_A^#tq a`ZtV?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgWltB!5RRG2KmN~uSZ~YmcXRuq`|l;|J}6(1uM}YFY7Y6w Y&LDk6OkHW~qZW`hPgg&ebxsLQ0MAkz00000 diff --git a/graphics/pokemon/hitmonchan/footprint.png b/graphics/pokemon/hitmonchan/footprint.png index cfd1efd54a09ddefdf5afadc77a802ebd8f0c9a0..4a185f878a3592c9036fa9c3abf893863685f66a 100644 GIT binary patch delta 86 zcma#bnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRpe2IgnXJa6~| n1U@rQQ1FoHkaFmdTq3~mMwGMTDDRRLK&1?xu6{1-oD!MgMNb#U5RRG2KmN~W?D%)X_|F7)$NDFZO$vnytJoLXD@V+6lZg>aWV@$3P^b1nUIjjz;H8#v%T-$O-`Ur22WQ%mvv4FO#q^Y BA}0U< delta 84 zcmb=-m>}uT00ib8ht2>geNPw15RRG2KmN~uc)z}_{JrG8C&o4((<=_}yRzSKd{JP1 l`15ClFMsV0KmW;7|B6vXN-SEd(8~^Fgr}>Y%Q~loCIHcIBJ%(M diff --git a/graphics/pokemon/hitmontop/footprint.png b/graphics/pokemon/hitmontop/footprint.png index ba8c1cca2a11f05817497af73be5943bf891e08e..16e5173ce4a530642a81c628e6bf4dd491dc0997 100644 GIT binary patch delta 99 zcmYc%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}goJ{GM2`oF z8}1!U_}}cftl{7xrmlvZf9yPGcomMEU~uB$VL14R-Rh@M{VAY622WQ%mvv4FO#uGz BB?kZi delta 83 zcmXRgJx>?M5RRG2KmN~8{GZ?UbG~HX4r7^w^ol#@3;tM$Fy54Z kBKhx1^M(EY6~6qpXRw|lvBK6rtQlm2r>mdKI;Vst0EWmSV*mgE diff --git a/graphics/pokemon/ho_oh/footprint.png b/graphics/pokemon/ho_oh/footprint.png index adceb38787b4292ab1935316d591bda35f49496e..a6cfc377d555b2edee4023116425160bafe471ec 100644 GIT binary patch delta 90 zcma#gn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRpe2IgaIZ09(6 rCK)?)lrxKLv}aI!#;m{+!r;bmES0l+Lm}HWpmGLJS3j3^P6gHBT4E5RRG2KmN~W?D%)pxaM?v#WX&r`F|F^Xt&|`yOCXS b0h0j}gSn(wxXax-NsvxYS3j3^P6gLVG4!*uJ#gT~8Os5RRG2KmN~WY^s}={-Z+1<=@Qn1#XibGAJKrPHU6@ j!&Co6^51pi15+3o^2#L{h30xCfDG_-^>bP0l+XkK`xYLG diff --git a/graphics/pokemon/hoppip/footprint.png b/graphics/pokemon/hoppip/footprint.png index 0be22ed86982f826ab6fa1d9f8d052810f88adb5..d482d69e5ea243c57f56d390714a46dd835c0631 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRq}0}MU9JZIP? gX2>{joN!}hFkxcy+OxVZ9H@rD)78&qol`;+0Ii=FumAu6 delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~W?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRpe2IgaIY|of^ zgoJpWzopr08d0B AY5)KL delta 83 zcmXR*pCIYS00ib8ht2>gJx>?M5RRG2KmN~W?D%)p_|L}lihpw+wip~{&1++S!z2I0 k@kP6h2xDqv*1!Mk3?h7@l3Gg3Z9yh@y85}Sb4q9e06{7q?*IS* diff --git a/graphics/pokemon/houndour/footprint.png b/graphics/pokemon/houndour/footprint.png index 3f81614316c28197620e00c0cbbdf2fffb0891f5..bbc1115d75b46e88deaea266d1656aa40891d022 100644 GIT binary patch delta 84 zcma#fm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2c{lgo;}hM lKkN-Q*f%IWW9C`Gz|h0Px-Cohpd3&kgQu&X%Q~loCICRg8O;Cy delta 71 zcmd0Zo*?PO00ib8ht2>gB~KT}5RRG2KmN~W?E81sxaL#(j|1mFILmeYyJ4)L{o}tp YLt&AW&adkezk_sny85}Sb4q9e0Q8<6ga7~l diff --git a/graphics/pokemon/huntail/footprint.png b/graphics/pokemon/huntail/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v|BrjGq}Ftcj)-Z5TMJT$Hpt_cI2TMP(6dEtDnm{r-UW|mewDi delta 75 zcmd0gpCIYR00ib8ht2>gHBT4E5RRG2KmN~u7;k%6y}r%;9S{GFzzghk8ow0zo$B96 b{`=3)aK1w5Y?faP3rMG@tDnm{r-UW|2A&&p diff --git a/graphics/pokemon/igglybuff/footprint.png b/graphics/pokemon/igglybuff/footprint.png index bbb7352a6016ea4b5a824f1afb1065adc80bf28e..d24c1760df92d06bd51e3799ee673bc9f2e46ef8 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2i6{Ti5c<+ h8=M6u+-*?fXDGbOvX}F7q$p4kgQu&X%Q~loCIH#u82kVL delta 65 zcmYcZogit$00ib8ht2>g8BZ6-5RRG2KmN~Wl>ECn{fF}T56n#sZ>rcrSQ)w(N~`YZ Rv7ZA{@9FC2vd$@?2>|9A7Zv~j diff --git a/graphics/pokemon/illumise/footprint.png b/graphics/pokemon/illumise/footprint.png index 451d532b2f44e88db71bb31f1051d51ff4669458..d39b4f00541e985e0e62141ad25228f14f082d73 100644 GIT binary patch delta 80 zcmWGZnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2i6{5o-^zR hUNDLn$~jD9XDFG@S~UIl)lQ%y22WQ%mvv4FO#t8y8J++D delta 64 zcmYcZnILJ+00ib8ht2>gX-^l&5RRG2KmN~Wl>ECo{YNst+oymp=j9?989JUz6{NoN QHv=j6boFyt=akR{0L=at+5i9m diff --git a/graphics/pokemon/ivysaur/footprint.png b/graphics/pokemon/ivysaur/footprint.png index 29206b935ee19c1ab050067906f6fa1016567e31..d837294f9db2cc31700a40e576eee6dcb79c9a43 100644 GIT binary patch delta 92 zcmYc&m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bcIW;V7yKDK+( tJb&yZp8R(ZoWSeyMqWaK-$8_t;mQ&&k=FlPqk$S2JYD@<);T3K0RTyR9i0FG delta 76 zcmXR&m>}uS00ib8ht2>gbx#+^5RRG2KmN~W?0O}+Z@O_!Q2LJp=RPz@b~WTE{5p94 d!+E(yJPaDQM9p=fS?83{1ORkG9-9CF diff --git a/graphics/pokemon/jigglypuff/footprint.png b/graphics/pokemon/jigglypuff/footprint.png index 59b5f1171b3c10c930f8c598a8e81dae8a46f804..b6d981b10489da2e1352dcaf486e2bbb534ec60b 100644 GIT binary patch delta 81 zcmWGdognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRpe2IgbTJZJa~ iE--2&&t;ucLK6VrgBa%k delta 65 zcmYcdogit$00ib8ht2>g8BZ6-5RRG2KmN~W?D%)n_|L@S4&MU4te0y!pv5TiMXb3$ R^xX!KdQVqBmvv4FO#mSQ8Fv5x diff --git a/graphics/pokemon/jirachi/footprint.png b/graphics/pokemon/jirachi/footprint.png index 856bb5faafd226f980ad8165ae3bf048bb4ee251..1153c76dfef3d2c54ccd621023ae3f0b79def0d7 100644 GIT binary patch delta 78 zcmWGenjq=P%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vcr;B3<$IRpe2i6{5o-^zV fI8LxBg)lHg&1XJ)FLOs0Pzi<Dnm{r-UW|pT-zk delta 63 zcmYcao*-$(00ib8ht2>gDNh&25RRG2KmN~Wl>ECo{YNsttAm-qLM;Y{MfYVy|K#i| P2dVaS^>bP0l+XkKi@Fsi diff --git a/graphics/pokemon/jolteon/footprint.png b/graphics/pokemon/jolteon/footprint.png index d1e9477b3d0c9da9d144ac0fe63e0bf72c968881..450c3c4953d212df6b81d2c4f4074edd7079030a 100644 GIT binary patch delta 87 zcma#fo*)^-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U*r;B3<$IRpe2c{lgo;}hM pKkN-o{BKZFknWhle_$#D!$xHemxND~)&SKqc)I$ztaD0e0sz1F9Jc@f delta 71 zcmd0fo*?PO00ib8ht2>gB~KT}5RRG2KmN~W?E81sxaL#(j|1mFG{|-}gX-^l&5RRG2KmN~Wl>ECn{fF}T56pcHcdAlY8R~+i?0oxI Q+yN=~boFyt=akR{0MiW@7XSbN diff --git a/graphics/pokemon/jynx/footprint.png b/graphics/pokemon/jynx/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/kabutops/footprint.png b/graphics/pokemon/kabutops/footprint.png index 127b741d827af8c403e29d4b5bad7dce3b1725b9..54f193c502e7aca95eeec8573d008696fee44239 100644 GIT binary patch delta 89 zcma#cogf*)%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V0r;B3<$IRpe24*o#bOUs&EVgRZkbk5RRG2KmN~W?5MlXzOetV!k1z@j=vMqebP0l+XkKHLV`Y diff --git a/graphics/pokemon/kadabra/footprint.png b/graphics/pokemon/kadabra/footprint.png index a699f29879c7bf7c74af15c828cbaab32f7c638b..8cbac4eddc77046f61ed6e3e02b4b75207cabdea 100644 GIT binary patch delta 97 zcmYc(ogf**%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V4r;B3<$IRq}goFnH2@gCI zCTKD!?qlcqB)_2JKO@IR`GkZ#21PeE1ty03=A5NB-bQc(buoCl`njxgN@xNA7{DLb delta 80 zcmXR-nIP%S00ib8ht2>gZBG}+5RRG2KmN~u_`A04{AWqI@68w7E8E!r1blInYpJ_o h{AVTm!utP>91L>qV!0O{cngBGd%F6$taD0e0stW%AXfkY diff --git a/graphics/pokemon/kakuna/footprint.png b/graphics/pokemon/kakuna/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vK9Ase7o5~aPoI8FOP(6dEtDnm{r-UW|f}uS00ib8ht2>gbx#+^5RRG2KmN~u7;k%6zFMH_z`243$(Dv5{y!XFoaI!w cLw^3ZXE^s#c!EW`_ezjfPgg&ebxsLQ059bnd;kCd diff --git a/graphics/pokemon/kecleon/footprint.png b/graphics/pokemon/kecleon/footprint.png index 3c69684379972211f839eaae341bbc76858585a8..986c726fa04414f813911ef60cac5d903ab4637e 100644 GIT binary patch delta 88 zcmYeunIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRq}21YkFwx@h- pFL`+;vGKfNm-r#?AUL6yg`w*Mn@n$c-xi=^22WQ%mvv4FO#rR_8}uS00ib8ht2>gbx#+^5RRG2KmN~WZ2I>%eMj)Q4@c%dyjj^M|BXlf$wH13 dZL5F&muD#IlRPGO=H4cdR!>(ymvv4FO#r|~Am0E0 diff --git a/graphics/pokemon/kingdra/footprint.png b/graphics/pokemon/kingdra/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg6;Bt(5RRG2KmN~W?5n$CY%?L<;=s8J2hLphGx6b%c(#;C a115&zZBkFYR=@cS(&y>w=d#Wzp$PyL8Xdy` diff --git a/graphics/pokemon/kirlia/footprint.png b/graphics/pokemon/kirlia/footprint.png index c1c0058e74e9c2354f9bf9ca74251c564bcb95d1..2a1c1f3dd159502c8024d197d965920376b79bfa 100644 GIT binary patch delta 76 zcmWGcm>}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MU9JZIP) dI8Gd3V6fi8)cJ|OLm8-m!PC{xWt~$(699Oc7o`9I delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1ORFT6$t?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vi%o!8~8#WZE~NDh5wiKbLh*2~7b078zIo delta 66 zcmYcdn;>b+00ib8ht2>gSx*P$z?@tDnm{r-UW| D{skj3 delta 84 zcmb=-m>}uT00ib8ht2>geNPw15RRG27XRlj{Aqu|)JAC3S3 diff --git a/graphics/pokemon/lairon/footprint.png b/graphics/pokemon/lairon/footprint.png index 9a6527c1c98c0721021880ea08322388afeedf8d..e465f42d51ca4e0d21420ae0be39096947978638 100644 GIT binary patch delta 96 zcmYc-nIIX>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRpeh9)+)W6V5z y%pE%N*_nT{v;C9j`BcAv;{==1Gj^T?1_s%+JVFoGNbmzSF?hQAxvXg9Zwg>5RRG2KmN~uSZ{mSzPio-mBN>cb04zXA7(FWV?PtX ilEQpZzLIUiss9Z3FA84>3Rxlo((mc&=d#Wzp$P!|ryqp? diff --git a/graphics/pokemon/lanturn/footprint.png b/graphics/pokemon/lanturn/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRpe2i6{5o*woI d0nD>(7~&4Iu)DpNX9Ox>@O1TaS?83{1OQgI7B2t* delta 62 zcmYcYnjmS(00ib8ht2>gNlzEY5RRG2KmN~Wl>ECo{YQF#%PYwMQ3i&2yQOctMb7&T OQtavK=d#Wzp$Pz(n-((w diff --git a/graphics/pokemon/latias/footprint.png b/graphics/pokemon/latias/footprint.png index 0419630c1521eb245bb63cda013ca98adca12c89..f0f34c50042edc58ca31fe61eea9db5b318e7cf2 100644 GIT binary patch delta 99 zcmc~OpCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRpe2IgaIY-Mb0 zmTYYQ?0NpkOWfdZ*zty!=MTR_%mNGR2wrAphROA8vzC60xDC|D;OXk;vd$@?2>=0x BAFlua delta 84 zcmXTVm>}uT00ib8ht2>geNPw15RRG2KmN~W?D%)p_|K2?A3oS0W>0J5|HEVd#_^8) mS04E%jxh^<@Nby)|372qe@PEB*~w}kBRpOGT-G@yGywq0K_d+S diff --git a/graphics/pokemon/latios/footprint.png b/graphics/pokemon/latios/footprint.png index f77d0fa867c580f726d9ca9fba181a0b1f89e597..7c22956b66b01ef1d585d86fb63cef6ecb008815 100644 GIT binary patch delta 101 zcmd0-oFJLN%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VCr;B3<$IRpeAV^D?keu)U z$gDqbpst~DXJg|}M&{4_1~(am7`vELpE_zWF1^CuJp1kLzopr04aPW Ang9R* delta 85 zcmb=-oFEy%00ib8ht2>g15X#n5RRG2KmN~uc)q@^{lBE$zw{r9=RX{t_t4+=uzY2k m{hNeMaw<$B?5FG)R#2 pUuKby{~MGz#5Gu59841!81z$lM5;gK)dN*Cc)I$ztaD0e0st+_9i0FG delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~uIN$cLd}W*bpMWoovRw)>3q%AMuQG)G a`_IpCPEz?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bayMl&|He=KbO snAo;4vGwuu{7E?Suc7fL1G5kVL+e#G?z~hrE}#YmPgg&ebxsLQ05WPEi~s-t delta 79 zcmXR&o*?PP00ib8ht2>gEl(H65RRG2KmN~WY^wX0{=;DYLudQL=j+ZzGnTKEyv}gzI2TB_r>mdKI;Vst0R5>U0ssI2 diff --git a/graphics/pokemon/lickitung/footprint.png b/graphics/pokemon/lickitung/footprint.png index 1f88f23fc620f3ff118b2413d255c43f04fe7e3f..fb92001035934b955f8bdc9c5f45d0d2d2e1500e 100644 GIT binary patch delta 97 zcmYc*ogf**%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V4r;B3<$IRpe2IgmMY~Pr9 z{_smYv2U30mtSDh%7h6942mGY~5pe_baS3j3^P6gT~8Os5RRG2KmN~W?D%)Z_|Jy)9}4F`G|0E`ZD_vmu&nL* kbH^8j_8wd-p8c<9;6E;UYt_fz86X2ZUHx3vIVCg!0G)Rv4FCWD diff --git a/graphics/pokemon/lileep/footprint.png b/graphics/pokemon/lileep/footprint.png index ce6b2790e1380c56b9d03076b830c1cff67fa766..ee68853045d81fce9ad012f2e3c4a080934eda15 100644 GIT binary patch delta 92 zcmYc;m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;W?HW@b6I+qOKP s>>WD(GjllJxK=K~Q!ODOEs?;$@I96DX;Q-PV?YfIp00i_>zopr05LNip8x;= delta 79 zcmXR&o*?PP00ib8ht2>gEl(H65RRG2KmN~W>^N7SX7S|AhX&aeyARC*EwwH)AI2CS g-e1MmvFZPRMm9;&zdPD2r-F2Qy85}Sb4q9e0L;@LrT_o{ diff --git a/graphics/pokemon/linoone/footprint.png b/graphics/pokemon/linoone/footprint.png index 8d83166d3e8e16cf12134420cb6c7577c190675d..ff6019b7bc24400ff531729115e154ed41fbbd97 100644 GIT binary patch delta 87 zcma#bo*)^-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U*r;B3<$IRq}tON$7ZOj2j p9vwJv=D>kEhQ=Av2_1|b47aU0JT*^?h5*$vc)I$ztaD0e0ssK{9q#}D delta 70 zcmd0fnjq=O00ib8ht2>gMNb#U5RRG2KcdewxY)m4_~LtAoBe;ux*N(D=2uDl;&)+C Wau%Oi*FLKRq{-9O&t;ucLK6UWiW!ms diff --git a/graphics/pokemon/lombre/footprint.png b/graphics/pokemon/lombre/footprint.png index 051e5ab550250967b005534e57782ff6fd31e40d..333b1c7b448111256d012265db932237eac23079 100644 GIT binary patch delta 104 zcmd0+nIM_W%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VFr;B3<$IRpeh90y^hU|`TI;y(ED-lMlb%?zHdelF{r G5}E*4>m`i< delta 90 zcmb=)n;;p=00ib8ht2>gQ%@Ji5RRG2KmN~uSZ{mSrn+s~P9E{ulIJRnZ4AmdKI;Vst04JLo82|tP delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~Wl>ECg{YT>Y4~}wOb*GH~-0fe(z|bKk UwP?{&z9x_sPgg&ebxsLQ09=I`ssI20 diff --git a/graphics/pokemon/loudred/footprint.png b/graphics/pokemon/loudred/footprint.png index 604af90004997cc9af74376a03aae66c14e76dd3..8468d3ea6cb1549811f06024e43019cb42747ef1 100644 GIT binary patch delta 100 zcmd0-m>?O?%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VSr;B3<$IRq}gam^Ji5n&) zPS}_*Vc)?6{~8?EF&$y+a+uJ<(s4Tcz=0Zu6=DoCrP#6(ychleYGm+q^>bP0l+XkK DJMAU^ delta 85 zcmb=(oFEy%00ib8ht2>g15X#n5RRG2KmN~u_$R&XalfRTe0s&Ab03`NJxsLj;1y|H m@cg{vo&LW(^=~Bq{by%LNs+9$ZQQR6GQ-o=&t;ucLK6VfZzBr; diff --git a/graphics/pokemon/ludicolo/footprint.png b/graphics/pokemon/ludicolo/footprint.png index 23163f358cdc6e382e2fd53e1dd42d97f0eacf18..e5aa759abcd6b46c24beb819df1c19ee8f9986d3 100644 GIT binary patch delta 91 zcma#cpCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRq}goFpx2NeD{ tI=*9WzRS^>xAI$&& delta 74 zcmd0gn;_}R00ib8ht2>gRZkbk5RRG2KmN~uxY*_}b6s2eA0GCbf-e{(7>_ExXtv?_ ayON!u=ZOH*P7jIMAdQ}`elF{r5}E+oVH#fm diff --git a/graphics/pokemon/lugia/footprint.png b/graphics/pokemon/lugia/footprint.png index e6642ed07f1cd991dc6bcd8dc7bab0bd1c64f894..bb807c6dd543deb9a98bc751d3a3b3ed7cc4d692 100644 GIT binary patch delta 91 zcma#gpCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRpeAjnC0aQA@1 r?q>?lQ8gHBT4E5RRG2KmN~u7;k%6y}r%;9S{GFg)f-xMgC53Uts@@ c=l_3ZhHEE;b>&2*?tyfAy85}Sb4q9e02~S&5dZ)H diff --git a/graphics/pokemon/lunatone/footprint.png b/graphics/pokemon/lunatone/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgO-~oc5RRG2KmN~u_`If#|1XdHElIl##(x?X+W%4b!rbxX f;0d{we^;0pes&0N{cnBs9!RsNtDnm{r-UW|)(jyM diff --git a/graphics/pokemon/machoke/footprint.png b/graphics/pokemon/machoke/footprint.png index d9009d3e19ccdb3a3744bea78bf0ece180b8d59f..5cde0083d574b77244440bfe9e6004f60b797c6b 100644 GIT binary patch delta 92 zcmYc+m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;W?hNKbfBp73D* sfdl^;TW%=6VC0cyP<+P5X28JkT95OE{nKlcfEpM)UHx3vIVCg!0L8f=+yDRo delta 77 zcmXR&oFM7J00ib8ht2>g4Nn)x5RRG2KmN~uc)Y%i|F@*w3*(vx>GgE=b6Mw<&;$Ts=^cIm diff --git a/graphics/pokemon/machop/footprint.png b/graphics/pokemon/machop/footprint.png index 8b2808553b5498ecfc464696ab5f03a82de570f4..9bb3ae06333f26a7cfd5d889dbcce600a4a8b333 100644 GIT binary patch delta 86 zcma#bnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRpe2c{l&i5c<+ n2K5YzWeQacZVm_8b_g-7KF>bO;M+N6pi%};S3j3^P6gMNb#U5RRG2KmN~W?E81q_|L@jABXv!>>E7fdK#L(7ML;w Wu9xsI_kNcS(&Xvt=d#Wzp$PzrHW}yu diff --git a/graphics/pokemon/magby/footprint.png b/graphics/pokemon/magby/footprint.png index 655d0ca2b84422a87f978db6a4a46e4ca7d0f71f..45e1a343e083c3d5fa6fd69ca6a9ab2eaa76a7cd 100644 GIT binary patch delta 82 zcmaz@n;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2c{fOg(LqO j8viqkFy8FpJ>kXB70V{cmiL+osEonW)z4*}Q$iB}EQlH` delta 68 zcmYd`m>_A-00ib8ht2>gc~2L|5RRG2KmN~W?5jJ+zEJ)XkNl5?94G#TpKn;g#!##% Uc~WKR(p?}ep00i_>zopr05+)@)c^nh diff --git a/graphics/pokemon/magcargo/footprint.png b/graphics/pokemon/magcargo/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgRZkbk5RRG2KmN~u_`A04{Ab4(%{C&o58M?xPViT^*?;Bv a|DTzGYm&$Y;~d{GkVa2eKbLh*2~7YfXB<8N diff --git a/graphics/pokemon/magnemite/footprint.png b/graphics/pokemon/magnemite/footprint.png index f710e502832073b9517ea3df1521259e00ef78fd..3f8f930cbee499d9c468f4931a20183279deb790 100644 GIT binary patch delta 78 zcmWGenjq=P%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vcr;B3<$IRq}0}MTUJZCr+ f*e0-S3S?xE$zb$cdRt~cPzi<Dnm{r-UW|mq8by delta 63 zcmYcao*-$(00ib8ht2>gDNh&25RRG2KmN~W}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2i6{Ti5bEY lH@GDtSR7O)@QOGxF?cLv_Lko^K>(gMNb#U5RRG2KmN~Wl>ECn{fF`Vhwk==-+xySI>FYZpvl0n X<%Z03lhQ^1L7F^W{an^LB{Ts5gbx}p diff --git a/graphics/pokemon/makuhita/footprint.png b/graphics/pokemon/makuhita/footprint.png index 3da20ccb317125c24760c5cb14189361dc6bbc69..4f2aca69ec30ea5169cdd41a4758796a08ed52b0 100644 GIT binary patch delta 92 zcmYc+m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bcI1{St9ex4e8 ti6?aiC;mG+{;_xH_{+@vm~nv>gHRC9uGLblbAcKdJYD@<);T3K0RVGd9_0W4 delta 77 zcmXR&oFM7J00ib8ht2>g4Nn)x5RRG2KmN~WY^x`K9Xd8Lwn;D?vfz-uK1oIlsEfhV)z4*}Q$iB}PpTl? delta 80 zcmXR-nIP%S00ib8ht2>gZBG}+5RRG2Kfca?xZ3vc^$LMs0_Q&z+8uuXTj7iLyodcZ hhvlmUeueWp|7Wyz6F**^bX6Rr-P6_2Wt~$(696g*AiDqn diff --git a/graphics/pokemon/mankey/footprint.png b/graphics/pokemon/mankey/footprint.png index f02036af503a8618ff23ddf0eb1a09426c978b50..4881d17c33cf3dc42ff0754acaf2a6f862383116 100644 GIT binary patch delta 105 zcmd0+ogkUQ%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U~r;B3<$IRq}goFtb5;kl| z+^{im!b%3kef&Is_$6-e8*DH)*kIfsV9(4f&&(_xpvlazsFii2y-0BvP&b38tDnm{ Hr-UW|Lc1Z; delta 90 zcmb=;n;;p=00ib8ht2>gQ%@Ji5RRFmhYST76nIz;7B{dgQRo#))D&=3HRWS`YC02Ai8-k$RJNwKbLh*2~7a|;T_=s diff --git a/graphics/pokemon/mantine/footprint.png b/graphics/pokemon/mantine/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v`AWYGS@9> delta 64 zcmYcZnILJ+00ib8ht2>gX-^l&5RRG2KmN~W6#jer{D*YA!}67F_1`jr7%n!+&b)Bb Q_a;cWr>mdKI;Vst0QjpI>i_@% diff --git a/graphics/pokemon/marill/footprint.png b/graphics/pokemon/marill/footprint.png index a09d8f2c0187020e679dc1dd4434a05d24af92af..f70b3ea55d540bcc40a444bc5a1dab03200e6e77 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRq}2F7P>Y~PqU hSe`fuC^H)|F!WflYWc2_a{(%1@O1TaS?83{1OT)67To{< delta 65 zcmYcZogit$00ib8ht2>g8BZ6-5RRG2KmN~WZ2EV__|FD+1qJb@e+NYx1Q`llq;_a< Ro%RQ*_jL7hS?83{1OV3$7C`_2 diff --git a/graphics/pokemon/marowak/footprint.png b/graphics/pokemon/marowak/footprint.png index fbde41d04b5ae5170d314a631c21e1f9db79b3d1..e05d5d0005f667cac5ce2580072b525769dc4138 100644 GIT binary patch delta 82 zcmWGbn;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2c{l&i5c<@ j0>9Z=n2H)7889$xsN~>~F^h5nDr4|;^>bP0l+XkK?+O?8 delta 66 zcmYcbn;>b+00ib8ht2>gSx*gMNb#U5RRG2KmN~W?E81c*ybbqLiRsA>^A}h0-m(n2JkYN WT8Uf`yjgMrq{-9O&t;ucLK6T|7#L9i diff --git a/graphics/pokemon/masquerain/footprint.png b/graphics/pokemon/masquerain/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRpeAh0@cU=o8< xjl9H;UfpgT~8Os5RRG2KmN~uxZd{g`=1J5CeDAzEcB~p{=@mUhxsep jgWltB!5RRG2KmN~W?D*#xV0&0zVH5kp`h+j?9j_c8Ik1Fr YGE~l#ocLpNKoCfqr>mdKI;Vst0Fclbwg3PC diff --git a/graphics/pokemon/meditite/footprint.png b/graphics/pokemon/meditite/footprint.png index 034cb0df8db238d6009b91e340d55de7355089f7..4cf72d9aef9cc848fdd1c1d6278bd326b12d0f04 100644 GIT binary patch delta 84 zcma#dm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRq}2F7R1Ja70N lI{q^=ZLDwLVoE*8z;JIemzZ;EQU_2WgQu&X%Q~loCIDie8rc8< delta 69 zcmd0ZoFM7I00ib8ht2>g1y2{p5RRG2KmN~WZ2EV@_|F9Ph5UawzBJ2gaZF*=W@eCk VEqZ1~?;>-M9#2<4mvv4FO#ne$7!Uve diff --git a/graphics/pokemon/meganium/footprint.png b/graphics/pokemon/meganium/footprint.png index 39303ac4fa069d961f8b65445136b3d9bed42d79..1592e145c05107d95cc29d4ffd4d2f71eb52d28e 100644 GIT binary patch delta 91 zcmYeypCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRpe2IgaIY%isG szST=Ssc-PGU@B_t_|MGznX$u(LA{!1al}8x6rg$rPgg&ebxsLQ06(A|^#A|> delta 77 zcmc~#oFM7J00ib8ht2>g4Nn)x5RRG2KmN~W?D%)p*d{RD;=q{?4YDqW1SfF2$p4W1 dcf+_Ll!@UQv#@gRZkbk5RRG2KmN~W?E81s_|Js&AENw9|8F#3xc^syC6PJx b|9^Id!s8NmtUg@J1Znhi^>bP0l+XkKK7Jl8 diff --git a/graphics/pokemon/metagross/footprint.png b/graphics/pokemon/metagross/footprint.png index 07f91d604f6dff45dc0f8aa2acd8a39f29e4ef36..fd7039efd32dee848261a7583f5f403330e99b01 100644 GIT binary patch delta 88 zcma#fnIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRq}l!Syl2E}j8 p3PLAbnOTh#zBu+hWRRY~&QNro)t*g0IRvPf!PC{xWt~$(69BBM8leCH delta 71 zcmd0ao*?PO00ib8ht2>gB~KT}5RRG2Kfcd@=x@vMcLV!Ghj;ZMSN==1{E#=g@t>uL Xv1`55;@6gau^?TZu6{1-oD!MbP0l+XkK5lt5P delta 72 zcmd0bnIP%R00ib8ht2>gWltB!5RRG2KmN~WZ2I>%{YNmr)Bgk|hcAC@4u5>i^L+kc ZSB7&=vNwNAN{55AdAj?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vY~PqU kSe`Hm3QI6b_5_47On<mdKI;Vst01+G*+5i9m delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~WZ2EV__|FD+1qJbre@%iDKJu^PVMv`P UxuqhqzXhbl)78&qol`;+06eM~rvLx| diff --git a/graphics/pokemon/mewtwo/footprint.png b/graphics/pokemon/mewtwo/footprint.png index 0f7573dd3b9663a98152411aa68ba6474e86f3d8..bedffad65db4a03110a8244148a231b295331242 100644 GIT binary patch delta 97 zcmYc(ogf**%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V4r;B3<$IRq}tjY?_k{wbK5)uq={&S`N=z8Q1)WzWG>gTe~DWM4fM%N*{ delta 80 zcmXR-nIP%S00ib8ht2>gZBG}+5RRG2KYq@Cc(}5S|82sN^Bhj|-R7Ub hlJbXfQB~Xj|BM3lqO~ti=U)M7_jL7hS?83{1OO-AA(H?A diff --git a/graphics/pokemon/mightyena/footprint.png b/graphics/pokemon/mightyena/footprint.png index b39af65bc021851d7d0e440e9623123885884c37..f7693643515a6b54f97773722dc74bd7ee6d3170 100644 GIT binary patch delta 110 zcmXSHWSk(G!OXzGplX||1fm| zB#)wGjzopr06cCeA^-pY delta 94 zcmZoFVdQ&MBb@04mQX%K!iX diff --git a/graphics/pokemon/milotic/footprint.png b/graphics/pokemon/milotic/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?0 hXZRO%d}Nqq!w|Zh`Tf@msR2Mm44$rjF6*2UngI4J8iD`- delta 66 zcmYcZn;>b+00ib8ht2>gSx*EE<{D*YA!}66HztYb)tYTnTeqH+W Timcl=KpH$<{an^LB{Ts5G9?-v diff --git a/graphics/pokemon/minun/footprint.png b/graphics/pokemon/minun/footprint.png index 1071b8069e0e22818c1ee50c9958c643828a02fa..3a2365e1685731ea78a0f4d297a9670310477e63 100644 GIT binary patch delta 81 zcmWGbognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRpe2i6{5o-^zc iH{=}zC-90mGBFf)v)U~Sm%R#9#o+1c=d#Wzp$P!a(-+JD delta 66 zcmYcdn;>b+00ib8ht2>gSx*ECo{YUco56*I34LJ)qCNVK|ewJFI Sc-m_wNQ0-VpUXO@geCwD2^bjw diff --git a/graphics/pokemon/misdreavus/footprint.png b/graphics/pokemon/misdreavus/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRpeh9)+)K2DxV x<^mn%Y|QW31d{3*oX)UI%#fD2At`Y~g5ggFm#j5^w**iVgQu&X%Q~loCID-x94G() delta 81 zcmXR(ognGM00ib8ht2>g9Zwg>5RRG2KmN~uSZ{mydre#VD~>Okb01E&=lDB;eWCp~ ip88jkb$`--{FG;46carg1y2{p5RRG2KmN~W?D%)p_|HamKl~4u`4*LFfdH`!{+&Irspf5N(N6?KbLh*2~7ZLbsJy+ delta 70 zcmd0dnjq=O00ib8ht2>gMNb#U5RRG2KmN~W?E81s_)k~*k0<9pG|G3?ooHs6c!hx> Wr%7_=1P3=ckS0%8KbLh*2~7aIX&V;+ diff --git a/graphics/pokemon/muk/footprint.png b/graphics/pokemon/muk/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vkHf delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~WYgTe~DWM4f6fYcv diff --git a/graphics/pokemon/natu/footprint.png b/graphics/pokemon/natu/footprint.png index f17821fc00dcc247dd6c8179d1696d3c5e211d39..348068d1c534d734f3eb7d61708f6a5172252f9c 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2UZ`xfFm^w gEfUfPI28FAoKG?bEXkU}3RJ`3>FVdQ&MBb@0HoX(X8-^I delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~Wl>B>_-?jdYFVdQ&MBb@0HLWB5dZ)H diff --git a/graphics/pokemon/nidoking/footprint.png b/graphics/pokemon/nidoking/footprint.png index 577e14f302b4639921e6bff5c839e751ab4f7083..c0e6690e10e666ea9d9e0b931728022815865b09 100644 GIT binary patch delta 91 zcma#cpCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRq}oP>n>0|)*$ tI{ssyvgJRstAiN}f1}#YmhO$<^Pg!?v>H^g>c)I$ztaD0e0sy27AbtP< delta 74 zcmd0gn;_}R00ib8ht2>gRZkbk5RRG2Kf=#{aGv*&+5RwdnMP%UWLHBD2U8dGRff=i a|M?l(ehPd@o7-gt(&*{x=d#Wzp$P!Gry5rP diff --git a/graphics/pokemon/nidoqueen/footprint.png b/graphics/pokemon/nidoqueen/footprint.png index c3156e6215e1f951c582334ed8cbd33489f84c3e..a5b255592946a350acef6368360b7defe219e8d7 100644 GIT binary patch delta 94 zcmYc)njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRq}gam;H2@@tH wOjw<;;eT_}lllgM|Lg)u^#=~zUHq)$ delta 78 zcmXR)njq=P00ib8ht2>gO-~oc5RRG2KmN~u__w_6`FTmXZN@SQZjSsn9A7ZobNro< f{v-VShyV5rFKUH7y0)gKgEV`(`njxgN@xNAr^g=z diff --git a/graphics/pokemon/nidoran_f/footprint.png b/graphics/pokemon/nidoran_f/footprint.png index f673df1128c0dd0eb1c4453f406ba2a3bea78a65..d0111077b5e16ed781320c4918c8a722552a547a 100644 GIT binary patch delta 82 zcmWGfn;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2UZ_Go-^zc jH{=}zC!D>}pu^9Q{hH-}!HU={pfUzeS3j3^P6gIZqeI5RRG2KmN~Wl>B@5{DbP0l+XkKT!I>A diff --git a/graphics/pokemon/nidoran_m/footprint.png b/graphics/pokemon/nidoran_m/footprint.png index 874c6078172949c6f4b6df926e31b40bdd692131..a6b3e3b4ad5586c930fd1e7ca2ae6d3f724308fc 100644 GIT binary patch delta 84 zcma#dm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRq}21Ye@fh4;F l2mUcMHpD0-g1y2{p5RRG2KmN~WZ2I?(eWCp~9{VSP94A;8)qmwNNM%TN VllX35l6w%O$J5o%Wt~$(697dg7gRZkbk5RRG2KmN~WZ2I>%{l~QPA5PAH$Y{+}`+$9+{3o9O buM|%)I7W({*pxZ#7)Yb1tDnm{r-UW|Rl**5 diff --git a/graphics/pokemon/nidorino/footprint.png b/graphics/pokemon/nidorino/footprint.png index eaa67b3791b4933647c59e160a8a1b42a5578d52..9ab80e766aa01039fd853c90cf08cfc8c5fd8d04 100644 GIT binary patch delta 94 zcmYc(njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRpe24*)lwsV|3 wd#oj%)Ej)LXP79!lEN(bo0;txTZa?FgCZ_PuOri&fm#?mUHx3vIVCg!09&XXWdHyG delta 80 zcmXR)nIP%S00ib8ht2>gZBG}+5RRG2KmN~W?D+RL{l~QPA5PAF$Y_0-y-tAB(ZNjM h?}YRp;pZ8`I2mMlL=V2?etZR_-P6_2Wt~$(69DKW9`67E diff --git a/graphics/pokemon/nincada/footprint.png b/graphics/pokemon/nincada/footprint.png index deea05721e666cdff97872ffbea1eecd620b4fad..69d2b0491dd02815656ec8fbdee018f52a538fb2 100644 GIT binary patch delta 86 zcma#anjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRq}2F9OkY|r?4 mcuaYCiV{K&ANbM02-KOO$-Kfn>dzaXQU*^~KbLh*2~7Zo7aM8- delta 72 zcmd0bnIP%R00ib8ht2>gWltB!5RRG2KmN~WY?8ZT{O4i%kNamn{8yAPHU2X>z2WpB Z0fwoeGFCIKceaDHdAjFVdQ&MBb@06QWcMgRZ+ delta 76 zcmc~xm>}uS00ib8ht2>gbx#+^5RRG2KmN~WZ2EWAxaL!O#Q{E7{@apv^Vt{9|1A0M dhVg+Zj10l0lIrt5SbYF#^>p=fS?83{1OP$r9UA}u diff --git a/graphics/pokemon/ninjask/footprint.png b/graphics/pokemon/ninjask/footprint.png index eacba16dc87057ad313731b6d7a45aaa64a7cabd..f582fcc058c498573e3f924938f72c83b3192adb 100644 GIT binary patch delta 87 zcma#fo*)^-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U*r;B3<$IRpe2WD2D9(xH1 oEeVM_1B3d63HApL^egc)WPM`UJtO^E1yC)6r>mdKI;Vst0EA~7eEgB~KT}5RRG2KmN~WWc_OVCprDc{c|7Y&wa>mf0((tjbDR{ XVN#E@x`?q!AV`;|tDnm{r-UW|l%yE< diff --git a/graphics/pokemon/noctowl/footprint.png b/graphics/pokemon/noctowl/footprint.png index 89ed409e986e46064eea8fa700354b218129423d..0386b465ac0199f04483ed8d03d583752220c61f 100644 GIT binary patch delta 98 zcmYc-n;;p>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRpeAV^6_$V>2e ym#8uCaKis)$A8Ss|Ct4n>=}gG6&6StFfhE^#PMUg*0ae#Z492SelF{r5}E*USt3>d delta 81 zcmXR*ognGM00ib8ht2>g9Zwg>5RRG2KmN~uc)z~Q{wq&$mt@r>NxlunHV@K&DDXSk hzj1sdz!LIVzJ-DBjM%Gmg;GzDeot3Fmvv4FO#s8P9e@A; diff --git a/graphics/pokemon/nosepass/footprint.png b/graphics/pokemon/nosepass/footprint.png index 9b9ad27082eb00b534f55cdaeec20639a82b34cb..ad8673add30396f0784450cf19a49cdf9c7dd49e 100644 GIT binary patch delta 91 zcmYeupCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRpe2Ig7bx6{Xeq@*9rz6hNsz_+bxy~F9E7&@O1TaS?83{1OO@59Wnp_ delta 76 zcmc~#m>}uS00ib8ht2>gbx#+^5RRG2KmN~W?5Mk8Tr(lPLgD;}3G*Ko+A}fkl>gxv cgIZqeI5RRG2KmN~WY^pn9Y?HvgkogP;iy))d!6}Rk-%UhL T?_Sd<2h!o`>gTe~DWM4f%i0yF diff --git a/graphics/pokemon/nuzleaf/footprint.png b/graphics/pokemon/nuzleaf/footprint.png index b35288e05947ef6d7fcbbd6f4c392d0152384447..bd9be61709573c7903b283cd2c5f98f34ca7ca2f 100644 GIT binary patch delta 95 zcmYc-o*)^;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*US6G7^>bP0l+XkK;S(S- delta 81 zcmXR;ognGM00ib8ht2>g9Zwg>5RRG2KmN~u7;k%6zq-x;6_0#Fhiq3JgP=XfUq+?M hw)$^84paaCXJ&YyEMm6jfcP4aeot3Fmvv4FO#q%p9Z&!O diff --git a/graphics/pokemon/octillery/footprint.png b/graphics/pokemon/octillery/footprint.png index afa1f5433c3e8e975aa346658e2395ab26ceb1e4..2306c5b0bef512b1cd89356d1714be1efc92f3cb 100644 GIT binary patch delta 94 zcmYc-njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRq}24*=nIXN~n vMYd=DJm=~qF6BzR(UtgNZ(tyw;K0OCyp`2=*DKRwKrIZOu6{1-oD!Mg9Zwg>5RRG2KmN~W?6Nbi`FG~SXWhf{ac#C|c#QdsWh~Bp iXq^AB-^n1GcxvXg2~QWt5RRG2KmN~Wl)Y*Ehk3F6SDyL{sf@ec$x7bbD{lu< N>*?y}vd$@?2>^6j6*&L^ diff --git a/graphics/pokemon/omanyte/footprint.png b/graphics/pokemon/omanyte/footprint.png index f5eb9fdba0aa321d78f34dbfb6b2e9ecead8e81f..ec2dde19c66618e61c2d61194f93a2376d58d515 100644 GIT binary patch delta 76 zcmWGYm>}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}11#(k5{)Yu dyLp(I8H^Q~m`mD~rUMl)c)I$ztaD0e0suob6-595 delta 60 zcmYcYm>_A+00ib8ht2>gaZeY=5RRG2KmN~Wl)Y*Ehj~#IPoV%4!>L%=`%gY?Uk+00 M>FVdQ&MBb@08XqF&Hw-a diff --git a/graphics/pokemon/omastar/footprint.png b/graphics/pokemon/omastar/footprint.png index fdd911ecf7c7fe51a86b733ddfc3df41f511fa01..e587f45031f2e2401775e4e27a5f650796da3432 100644 GIT binary patch delta 81 zcmWGdognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRpe2WEB&33&qp iX2A&;8}v>dU|>j?!hF)5S=&t;ucLK6VRofn1x delta 65 zcmYcdogit$00ib8ht2>g8BZ6-5RRG2KmN~WWW8zpXL9-vW)}xHTjpJF>KW#|l99Bm R;d~EL@9FC2vd$@?2>{7!7Eu5I diff --git a/graphics/pokemon/onix/footprint.png b/graphics/pokemon/onix/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vcY`rW?!c2dZK4boFyt=akR{0E~|oZ2$lO delta 63 zcmYceo*-$(00ib8ht2>gDNh&25RRG2KmN~WJuQJhOI9n^*(3{Y< P8l>9O)z4*}Q$iB}&%qar diff --git a/graphics/pokemon/parasect/footprint.png b/graphics/pokemon/parasect/footprint.png index e0f1715f2f04f00c853813b74b6d1e4984791432..ed9221adef53034ade55a9e652085f93d4ca3c59 100644 GIT binary patch delta 79 zcmWGdo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2WEDM4#5s7 gi5Zd-H!dt?^k!x{bF|y(IZzFQr>mdKI;Vst0KPRD4FCWD delta 65 zcmYceogit$00ib8ht2>g8BZ6-5RRG2KmN~WWWCvZ!Cqli`j5}^AF9uKQ_rxeT2^e; ReP?cvdQVqBmvv4FO#uAq7$pDz diff --git a/graphics/pokemon/pelipper/footprint.png b/graphics/pokemon/pelipper/footprint.png index 54718d259e56a8cf58d8809950e3186a62d12ab5..bfb9703f55f6465ba8dcd356eb562046e1ebb5ad 100644 GIT binary patch delta 99 zcmYc*pCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}l!Syg2?Bc# zD%7?g{KqeHlKCRPz$5lW{5)?QzBDxcWMqEK$l#mJ_m*p4^*o?H22WQ%mvv4FO#sE7 BBg_B* delta 82 zcmXRgT~8Os5RRG2Kfcd@7;kyly0lIG6c781g)bNdHa1^iS9p~E jgVE&^PyG|ge>a&KHV6xR-4(y?9LNAqS3j3^P6mdKI;Vst06%vks{jB1 delta 78 zcmXR)njq=P00ib8ht2>gO-~oc5RRG2Kf=#{aGCp%!I;A~A??S3a~~Y#+TJXD!7gys f_|MPtAO71j%x@R=`X!{j6QtSG)z4*}Q$iB}t?(bW diff --git a/graphics/pokemon/phanpy/footprint.png b/graphics/pokemon/phanpy/footprint.png index 70498b18f6b273c127e876706cfde3a76b70fa84..61eb3ebac37cc186126f1fe4df697b22dd8f8717 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2i7g8BZ6-5RRG2KmN~Wl>9p({l|fR2M0ZYzZ=`N85k0$N#x$1 RW?BnU@9FC2vd$@?2>{xz7RUeq diff --git a/graphics/pokemon/pichu/footprint.png b/graphics/pokemon/pichu/footprint.png index 823c7e32d4a43522b56932071ae5bd7df9342816..62d82450417cf9ea8ec47bd18a3f5c2772d1c2a5 100644 GIT binary patch delta 79 zcmWGdo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2R2?FA9jfu g69tl)nY9=gD$-dlSf^F?0@W~hy85}Sb4q9e0E1Z;bN~PV delta 65 zcmYceogit$00ib8ht2>g8BZ6-5RRG2KmN~WYR;go~~gFq5@+u_^Oo&)tTc)I$ztaD0e0szMsAaei! delta 80 zcmXR;nIP%S00ib8ht2>gZBG}+5RRG2KmN~uSZ{mydr@2dGoJn_jxU(4MgBfW|Dk;T h!+E)`hExCkvopMv5sBGV_H!CYyQiz4%Q~loCIC5&B3l3e diff --git a/graphics/pokemon/pidgeotto/footprint.png b/graphics/pokemon/pidgeotto/footprint.png index c507f72b8308b7b3cebc55ee37efa2fd298ddfc0..8d9cd78e0d839a121abfa1cbfc21df1113712585 100644 GIT binary patch delta 88 zcma#enIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRpe24*ovfk&Ge q6un=x(4;|-nPEy8`+=58^F)A(89ZJ6T-G@yGywp{5F8W$ delta 73 zcmd0aognGL00ib8ht2>g6;Bt(5RRG2KmN~W?5Nw%zOete;|q3sk-rnuf28xf{(pV& Zg*`*2hJ@12-Jw<>eV(pqCb(4;|-gMp!F2^$Ch42F83Y6eeNKbLh*2~7al+#4_e delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~WY^vMOzOete;|q3sj=vMrf28v}{eOLs aV+jvK*Dc9gg@R1lAdQ}`elF{r5}E+)KN}qY diff --git a/graphics/pokemon/pikachu/footprint.png b/graphics/pokemon/pikachu/footprint.png index a8ee2e4ac9a4e18dddd27fb3126b657980aa7d01..9145eff5b81ea35c86a21abd98279868313863ca 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2WDO#A8v^m g@(Kcv8B;PDihr>d1S!-s0@W~hy85}Sb4q9e0F>?*Hvj+t delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~WWW8$qr#JnFa=*j>Hxoq}7&=>|iu`}a Q&IT#>boFyt=akR{0L)ky1^@s6 diff --git a/graphics/pokemon/piloswine/footprint.png b/graphics/pokemon/piloswine/footprint.png index 0b7405eceb5df61de5729b7af406ff2fac69fd7b..122f3e3529ad21060ec6f4e4890d309c99eef7eb 100644 GIT binary patch delta 89 zcma#cogf*)%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V0r;B3<$IRpe2PPdZo*Gu3 qKk^b!>Kz0p@VdO=mynQF@M2h`z~Q^TJ-h&@n!(f6&t;ucLK6U@`x;09 delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~W?5n$<{^Q2^4~_F5GFpo;-gNllJnvz= btqU(hbe#CqBbh(0gEV@&`njxgN@xNAC>$Lt diff --git a/graphics/pokemon/pineco/footprint.png b/graphics/pokemon/pineco/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg6;Bt(5RRG2KmN~W?69*>uc(k{v17Ve$kw62@^@qVqWZ56 ZdJJ36Nv}6%TwV#%=jrO_vd$@?2>^-#8Cn1U diff --git a/graphics/pokemon/plusle/footprint.png b/graphics/pokemon/plusle/footprint.png index 1071b8069e0e22818c1ee50c9958c643828a02fa..3a2365e1685731ea78a0f4d297a9670310477e63 100644 GIT binary patch delta 81 zcmWGbognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRpe2i6{5o-^zc iH{=}zC-90mGBFf)v)U~Sm%R#9#o+1c=d#Wzp$P!a(-+JD delta 66 zcmYcdn;>b+00ib8ht2>gSx*ECo{YUco56*I34LJ)qCNVK|ewJFI Sc-m_wNQ0-VpUXO@geCwD2^bjw diff --git a/graphics/pokemon/politoed/footprint.png b/graphics/pokemon/politoed/footprint.png index f97b789949904a280aa0feb94a9a63a65b32adee..9499c60ecc1a794d67de8f8e5b2870432838a8d8 100644 GIT binary patch delta 92 zcmazqm>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bcegakVVr#4$2 s(ITF&|0T}cH`rj`z@?AHI!N7?7>#s$P=0FV$p00i_>zopr09Y0t6aWAK delta 75 zcmXSjpCIYR00ib8ht2>gHBT4E5RRG2Kf=#{I4;+6PSkjdeM&|`iiP5t56*I09X$V(@hJb6Mw<&;$U+!xtF< delta 66 zcmYcdn;>b+00ib8ht2>gSx*gMNb#U5RRG2KmN~WYbP0l+XkKzqlMk diff --git a/graphics/pokemon/poliwrath/footprint.png b/graphics/pokemon/poliwrath/footprint.png index 8f562fcef69f3b823f11712c9d16b2a50d0fb07a..393f8191c8639eaff28e5274b4537be56478e8a8 100644 GIT binary patch delta 87 zcma#ao*)^-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U*r;B3<$IRq}h6Z+?9(jow o^$G%y`8RL~*fJ;{V-_f7;9}ucdLFjwA5blWr>mdKI;Vst0DyZMMgRZ+ delta 72 zcmd0fnIP%R00ib8ht2>gWltB!5RRG2KmN~WYtZxRF*Cb2K9|CW&Y ZpYd~*$bm20K7({Ic)I$ztaD0e0s!rS9S8sb diff --git a/graphics/pokemon/ponyta/footprint.png b/graphics/pokemon/ponyta/footprint.png index 906ee7a5b5306d3ac20589488b697be0ff9b74f4..593b4eae8155988bea5aace81c0955245325af23 100644 GIT binary patch delta 85 zcma#boFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpe2c|RZ5;x=< m1pc#YFm1XiBr!wgffvK_3G8y*T0#myl?gMNb#U5RRG2KmN~W?E81a_|F9Ph5Ua4SW^DaIsc*DK8BYe W^qs^JmsO2iAWfdGelF{r5}E*%wi;>x diff --git a/graphics/pokemon/poochyena/footprint.png b/graphics/pokemon/poochyena/footprint.png index c4afe995f028c17f3013e5c3adc00383dc796659..820645c7cd1fec261fc47c035127cdded119b561 100644 GIT binary patch delta 99 zcmc~UpCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRpe24*)lwr6Yt zM)M9PWFAaNJgBg@vGFeh^M7Wxee66sd^`pW43iVt(o=u9{sZb`@O1TaS?83{1OO*b BAM*eJ delta 87 zcmXTVo*)^-00ib8ht2>gBTpB{5RRG2KmN~W?D+RL{YNmrQ~D*zKG}4Ox;YO!?GN); oxAA}Ck$);#_ddNrZ@i!l^|0*UHx3vIVCg!0J?)AbN~PV diff --git a/graphics/pokemon/porygon/footprint.png b/graphics/pokemon/porygon/footprint.png index 02243e3bc455be68400e4e593bdfe4bb84da39f5..39764c24a40afa748e9927a8fb0adbab7d18ff23 100644 GIT binary patch delta 83 zcmaz@pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpeAjnHd_}9>M iL-7S8lc8M#12cpCM(%aG$_{2gbqt=aelF{r5}E)=!5QWN delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~u=x=*izE0!|bJG*S7xQhH1D^i>&v5sw Uh{<=RnlB(Np00i_>zopr09;fWWdHyG diff --git a/graphics/pokemon/porygon2/footprint.png b/graphics/pokemon/porygon2/footprint.png index f92224af35c43509cc3e19c400fff249400a23d2..40f947b463556e97a3f621928aebadc69badbfca 100644 GIT binary patch delta 83 zcmWGfpCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpe2IgnXJa70H jbo^)LYU*abYG43V{)YRFk)z`spgIOmS3j3^P6 delta 67 zcmYcfpCD<+00ib8ht2>gIZqeI5RRG2KmN~W?D%)X_|Js)Mf`s>IP~~JKL598_%=!S T8*5-l7D$JutDnm{r-UW|F>n~C diff --git a/graphics/pokemon/primeape/footprint.png b/graphics/pokemon/primeape/footprint.png index f4c90ee17574c08ea0a8fb14feb3bacda9eccd69..76f77d387ec8010c70b953c9558510559de22173 100644 GIT binary patch delta 95 zcmYc;o*)^;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Uzopr0E;~x@c;k- delta 79 zcmXR;o*?PP00ib8ht2>gEl(H65RRG2KmN~uSZ{yWy{xVM4Nw0KNjnBX`@`&&0>2Xb f9qL~>zW86yaI;&)N^oA&G>~pjS3j3^P6gHBT4E5RRG2KmN~WYDigP ct=ROR;ok<)O1J9MUqL!OUHx3vIVCg!02>n>CjbBd diff --git a/graphics/pokemon/pupitar/footprint.png b/graphics/pokemon/pupitar/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v_A-00ib8ht2>gc~2L|5RRG2KmN~u7;bY|y}phAkHtm)N`YU==Rf?nXSi@h U==*!QZyq2mp00i_>zopr0B)ljB>(^b diff --git a/graphics/pokemon/question_mark/footprint.png b/graphics/pokemon/question_mark/footprint.png index 7c4f45eaad890c5daa66312196220449bae97634..8da752a46b30d4f1163cdadd9b84f2d418bd9e75 100644 GIT binary patch delta 107 zcmd0+pCFmW%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U?r;B3<$IRpeAjnBDusa-3 z+rO|#u9=aa`8PA$PkA0AF`j9~5^r)P-eft%?BtqY!OYCSdzM>PaQ`eBpne8VS3j3^ HP6gQ%@Ji5RRG2KmN~u7;k%6GPzC6wQZYA+voX`btjB%64EPb s<~)orI^1}ehkdr=o%Xj1AOHVne7{lT=&pFNO(26jUHx3vIVCg!0AWQXkpKVy diff --git a/graphics/pokemon/quilava/footprint.png b/graphics/pokemon/quilava/footprint.png index 28324dd7c98bfc45dc45be134ce91dbb01426e7b..46c185bffe9e260608a049d2806b42eef920cbda 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2UZ_mo*Zt8 h8}bSQpBYms8OoGcJ8u8Zo&r?F;OXk;vd$@?2>`?K7_tBW delta 65 zcmYcZogit$00ib8ht2>g8BZ6-5RRG2KmN~Wl>ECk{fFfF56*Ip|86L2GcdHrNJR-> RKOqEC@9FC2vd$@?2>{}y7SaF! diff --git a/graphics/pokemon/qwilfish/footprint.png b/graphics/pokemon/qwilfish/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgIZqeI5RRG2KmN~WZ2EW8_|L@j9|!v#9Q0%uQxBeEP>~iB Tc^B*z4$|T2>gTe~DWM4fAdnZ1 diff --git a/graphics/pokemon/raikou/footprint.png b/graphics/pokemon/raikou/footprint.png index b7081dcd35bb2e252476df282d527b5d729adf85..b7cd9c7dbf4d7aa76f07cb8f2274db828f94a4c4 100644 GIT binary patch delta 90 zcma#gn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRpeh9)+)Wvo1J rgHBT4E5RRG2KmN~uSZ{myenp%7AB8WCvW*H#4qx2oJ)CdL b?D4do;enor&W8<=%pjefu6{1-oD!MgVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/rapidash/footprint.png b/graphics/pokemon/rapidash/footprint.png index 3361489fd9fe30cdc6b98a6edf53ce626b9ed607..ffa2c80a9f23987ee5b78e6ffc11a8268e31f14a 100644 GIT binary patch delta 89 zcma#cogf*)%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V0r;B3<$IRpeAh0`d;D4jz pKX#6r{~a9#92e+BGcijrFvL0XuAVSEa~e=JgQu&X%Q~loCIBr(9mfCw delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~u*l&B7y{?V@jY3I-B&#D!<0kv(#tfnV a{_``;w-qus)Vg&8q|wvW&t;ucLK6VJ=o#Js diff --git a/graphics/pokemon/raticate/footprint.png b/graphics/pokemon/raticate/footprint.png index 6628cfdd7563bd2c276372cd55dbb9c98933d1ac..e1462e71a47fbe507217d909bb48a2610e71fa34 100644 GIT binary patch delta 90 zcma#gn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRq}hGsUlX`DQJ r%q4!*HwgS@7f7l*aG;`rk&}U8M=<-WxX{ZcK;;acu6{1-oD!M<9G@Lk delta 75 zcmd0cpCIYR00ib8ht2>gHBT4E5RRG2KmN~W?0O|x_uRN9DE-F)J}3JhjxYLc4%=6= bwaog@;HoX*@%?V@T98gpS3j3^P6_A-00ib8ht2>gc~2L|5RRG2KmN~Wl>Gbq{D*A&!~E3(zk<&?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/regirock/footprint.png b/graphics/pokemon/regirock/footprint.png index 44da2a57fd99456cc87a3b26569c3b06ece88ee7..d7a4380a77ee37f4c6ddd69b8678063e57936c7a 100644 GIT binary patch delta 97 zcmYc(ogf**%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V4r;B3<$IRpeAc#G1pr)bm xHxqL^L-P-AjYt0(oCLOourR-8n_$Go#=yLdTXRL{iDsZK22WQ%mvv4FO#ne3Am{)9 delta 80 zcmXR-nIP%S00ib8ht2>gZBG}+5RRG2KmN~u7;bY|zPe5S7tj6s#(MluEY5ZNj8_t_+nc28G7mvv4FO#u76AzJ_d diff --git a/graphics/pokemon/registeel/footprint.png b/graphics/pokemon/registeel/footprint.png index e191faabc874c27330f63af3b9bd51571239febe..7f4ee5797017d5ca3e212745377d2459a8b67753 100644 GIT binary patch delta 102 zcmd0-njo3T%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vir;B3<$IRpeAh0`d;D4jz zv8IC!?FTosE1v9CbmeVn;876Q;F!Xs#h{g(z`$_oBuDebE3z&?tqh*7elF{r5}E)p Ct0T4m delta 85 zcmb=*oFEy%00ib8ht2>g15X#n5RRG2KmN~u*l&B7y{_%}amjP_X%^vU49e9HznQJT mlESdl!Eu2|0As+-|Nj|`wu;A33cs}lWQM1!pUXO@geCxZMIjOZ diff --git a/graphics/pokemon/relicanth/footprint.png b/graphics/pokemon/relicanth/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v^wcZJUl!MK5zMi9?$+$57ffo>FVdQ&MBb@0Q&_YApigX delta 77 zcmXR)oFM7J00ib8ht2>g4Nn)x5RRG2KkDZ{thPV=xUQ}J4G+7)1!jdu=|2vf|KL3D eVZ80(|Nj{_OccD(nzyzFq}S8c&t;ucLK6V3XdrU{ diff --git a/graphics/pokemon/rhyhorn/footprint.png b/graphics/pokemon/rhyhorn/footprint.png index 632b753c24f66704784dc8ea326165c9c4b23e65..84e88598c7bb03ba04100dacf814744e3f77a9a8 100644 GIT binary patch delta 81 zcmWGdognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRq}21YSfwtY+j ilm0idew1(sVPx3xkK

uG)n_RScf4elF{r5}E)B_Zqg8BZ6-5RRG2KmN~WY^uAT{^JI}6aS5k3(h}RJjLMBAoj$< R>Bl{gdQVqBmvv4FO#loi83q6V diff --git a/graphics/pokemon/roselia/footprint.png b/graphics/pokemon/roselia/footprint.png index bedf2ab695d1eb9a1a5bd7230764362960d7a89c..6ea3494a033b21d5a9875d67a60c250454aaca8a 100644 GIT binary patch delta 75 zcmWHFpCIYR%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U>r;B3<$IRq}0}MU9JZJbF cRLmF{^d~VsdzEp)3MkLu>FVdQ&MBb@09fZ2Qvd(} delta 62 zcmazKnjmS(00ib8ht2>gNlzEY5RRG2KmN~WgX-^l&5RRG2KmN~Wl>B?^{D;Hy9`dtXJuKkF$gpUd^x^bG Qzl$K{p00i_>zopr0Ok@Gp8x;= diff --git a/graphics/pokemon/salamence/footprint.png b/graphics/pokemon/salamence/footprint.png index 2440a370fd6a5ea8af7c21ed6aecde31ffb01417..b943d076537fc11cf10035a23dc51bd57bf89570 100644 GIT binary patch delta 99 zcmYc*pCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}lmvl!2Nd=; z9;{;Lkn}Kku|HwL{{spCnHw8o{;~6%;pO4sVbE6QRs1|fXa!IogQu&X%Q~loCIFq^ BA{+n! delta 82 zcmXRgT~8Os5RRG2Kfcd@=xcXaxV}yKokGb!%fqaNZR~$|*l!4O jocOD7{=@Ql5C7LQT#6PtC}_070AzrttDnm{r-UW|7MCDM diff --git a/graphics/pokemon/sandshrew/footprint.png b/graphics/pokemon/sandshrew/footprint.png index 481de0993e992dae38bf0d34400249a41eb18bb2..030c4165d7593d6529a4591a7be5641e4063a480 100644 GIT binary patch delta 86 zcma#fnjjg-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vgr;B3<$IRpe2c{lAo->?0 nXZR&<*gFVL;C1O?f8fQ?x0UTn*R4B!K&1?xu6{1-oD!MgB~KT}5RRG2KmN~W?ECjN{fF`Vhy6B(`Rg>8HZ{JOZyUqQ XkatqzUDt=nZXjKru6{1-oD!MgMNb#U5RRG2KmN~WZ2I>${fDu9&lAbI56*%Ucpd-0Q9Q*E WWiP%WEwy7lNRy|lpUXO@geCxsof%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IN7dH;E^>k_(EG xPV76DP}}ZU#?JhoT_CBR!RZXUK*vVL4hGjYUd~?y*-b!A44$rjF6*2UngA+LAmRW3 delta 79 zcmXR(o*?PP00ib8ht2>gEl(H65RRG27U5?MN>vZv+shMdBH5>5Y*Uo};{d;t{S(I* f{kBYhSFE k&*17{7BGiVjWvy#p>Zv1&KVB5pFouip00i_>zopr06+#AS^xk5 delta 67 zcmc}{pCD<+00ib8ht2>gIZqeI5RRG2KmN~uC@=AMW&0xeZviYR%t!wpUUDFZq57g! U+5a<_b3r;hUHx3vIVCg!0905Swg3PC diff --git a/graphics/pokemon/scyther/footprint.png b/graphics/pokemon/scyther/footprint.png index c6b7730285ade3c17cba3a1d256f04ddbece8ee6..e12c46d3c8dd64bd414a140117f5fd8482cb37b8 100644 GIT binary patch delta 94 zcmYc;njjg;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Ver;B3<$IRpeh9))vA)7-A wm2HimS(yLx3rzaY>?)x5o1N_$yTeijiE5t9k0;fh25MpOboFyt=akR{0FZYdKL7v# delta 79 zcmXR)o*?PP00ib8ht2>gEl(H65RRG2KmN~uSZ~X*cXL`r+L;e$=R9P#=CDm@Q{wo} gZhu(5vhDwW#;44}{OVjsJV3fVUHx3vIVCg!0Gm%8L;wH) diff --git a/graphics/pokemon/seadra/footprint.png b/graphics/pokemon/seadra/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v)yX8gMNb#U5RRG2KmN~W?E81axaI--LiRTSEFymt`JEgzH%KwK W35a{W|I1_m(&Xvt=d#Wzp$Py#0T(v_ diff --git a/graphics/pokemon/seel/footprint.png b/graphics/pokemon/seel/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v^7>ED> delta 65 zcmYcZogit$00ib8ht2>g8BZ6-5RRG2KmN~Wl>ECo{YNstQ~md5feGEK7#KD!lDWEJ RfyhpfdQVqBmvv4FO#te}7rOue diff --git a/graphics/pokemon/seviper/footprint.png b/graphics/pokemon/seviper/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgWltB!5RRG2KmN~W?D)qJXnUByn&lU>^Z!?p|E@KQ{9#$i Z!VtDs;?@4nvyVX9JYD@<);T3K0RXd?8=e3F diff --git a/graphics/pokemon/shelgon/footprint.png b/graphics/pokemon/shelgon/footprint.png index e2d61b9bc8d6975c8e963e0dfa77c73227d899f1..5c7a6ab3f042bc140f4ff4d22c9ac8848be4c0e4 100644 GIT binary patch delta 83 zcmaz@pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpe2i7<25zopr0BtrLb^rhX delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~Wl>ECP{fEN&4~_C&btjDfY;+G}U?^BG U*|Ph4kQ+#gr>mdKI;Vst09Zm9x&QzG diff --git a/graphics/pokemon/shellder/footprint.png b/graphics/pokemon/shellder/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vBngyc@O1TaS?83{1OO9>71IC! delta 56 zcma#?nILJ*00ib8ht2>gVNVyw5RRG2KmN~W6qZeBQ{vHNSRE~6@N{}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2i6{5o-^zc lH{=aAs2UhpHtblzz!2EL9J=UNPaIGogQu&X%Q~loCICgs8jt`0 delta 69 zcmd0ZoFM7I00ib8ht2>g1y2{p5RRG2KmN~Wl>ECo{YUco56<%*KCfxp|JyMpgq30S VKbhXV$;E0QJ)W+9F6*2UngE@!8&CiM diff --git a/graphics/pokemon/shuckle/footprint.png b/graphics/pokemon/shuckle/footprint.png index e26b60bcd3520fce27686fd5c5f174cedd50163f..169bb4cf5b13c995eeea4972d680f9be0899ee32 100644 GIT binary patch delta 81 zcmWGbognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRpe2c|RZ5;x=x iKGZuXD2QuxurRENU=RFhk+&MCiow&>&t;ucLK6V=rx`y0 delta 66 zcmYcdn;>b+00ib8ht2>gSx*?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRq}goJg9Zwg>5RRG2KmN~u_^-U}^Lfd6^63?I^B(%!9_FtW_?66` i#GLy7z=iw&9rPF)mrIvdlyYqZ>GyQ?b6Mw<&;$T4V<4gc diff --git a/graphics/pokemon/skiploom/footprint.png b/graphics/pokemon/skiploom/footprint.png index efa7f5034220e4a80460ec793d8f11bacf8b73df..544ef0ea6da31e918a22c8d7f0b184006f49e482 100644 GIT binary patch delta 82 zcmWGfn;_}S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VYr;B3<$IRpe2i6{Ti5c<@ j0@ebu42sX#QYsm0l35$V(r;$~l`(j_`njxgN@xNA>UkJ^ delta 67 zcmYcbpCD<+00ib8ht2>gIZqeI5RRG2KmN~Wl>ECn{f9EYlYPSpxt4!dl(iWc8l|O@ TqBd4s0_pH{^>bP0l+XkK{52O5 diff --git a/graphics/pokemon/skitty/footprint.png b/graphics/pokemon/skitty/footprint.png index 355153dcb5062c5a4e056d70ece1951051c4cb71..2e78b5093e9eef09009d530924e33707b5034328 100644 GIT binary patch delta 98 zcmc~Qn;;p>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRpe2IgmMY|Gf# zW-_r&=3raO$F^CTCrDbNLP)|wMB)a&fdV7Lyo;>A`MVZf1ZrdOboFyt=akR{0E3+z Ai~s-t delta 86 zcmXTRnjjg-00ib8ht2>gLr)jS5RRG2KmN~W?D%)Z_|Mw(iaX~Esw@xREoz(mipT%2 nq}}=SA9eE|w%anh@JcW;#I2QlUQi7Mg% delta 95 zcmZo+ESex0$p8fA9f!^UDN9cm#}JO0$v^(jfB3w?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;W?I)-oQRqwEqw s_692d5)JB(ANbeUxUj9UkzbFWVd_-2LotVBKt?cly85}Sb4q9e09q*?Y5)KL delta 77 zcmXR&oFM7J00ib8ht2>g4Nn)x5RRG2KmN~Wl$8B*{zCG3gZ}x6a>j=x9oyvp@cf@G d`LDi3n}H$yrKEy}8egMNb#U5RRG2KmN~WY^uAT{^Q2^4~_CIavPKdT%NSsxJWXX W8i+AmG}CVYY4UXSb6Mw<&;$T$0~kI4 diff --git a/graphics/pokemon/slowking/footprint.png b/graphics/pokemon/slowking/footprint.png index 52593624a24eb306eeb6717e27eee91b4b336af4..e85d1307c4d880d4cf663fab4839de730a987eab 100644 GIT binary patch delta 80 zcmWGZnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2c|Q;Ja5<~ ie#kFSSim8~z%c6u+uq%)-+l%vV(@hJb6Mw<&;$VX>KeoV delta 64 zcmYcZnILJ+00ib8ht2>gX-^l&5RRG2KmN~W?E81c_|Jy)9}4|V4N4wa3`xr*RfRrD QxPg>=y85}Sb4q9e0Mz3ae*gdg diff --git a/graphics/pokemon/slowpoke/footprint.png b/graphics/pokemon/slowpoke/footprint.png index a66ebbc32e0fb18886e94ab7122c9a429372db80..f3330b57f658a339e1ab9419174e26ed6bacf5d5 100644 GIT binary patch delta 80 zcmWGdnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2c|Q;Ja5g8BZ6-5RRG2KmN~W?E81c_|FFRh5Vm5Se_`YWMoL^lk`>8 RnRg$g-qY33Wt~$(69Ca^761SM diff --git a/graphics/pokemon/slugma/footprint.png b/graphics/pokemon/slugma/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vFVdQ&MBb@04($#*8l(j delta 74 zcmd0cn;_}R00ib8ht2>gRZkbk5RRG2KmN~W?D%)pxaL!O#Q{Di`5%ri+HH7lI$xY$ awZMyk<-EwN7J&miAdQ}`elF{r5}E)A{TufH diff --git a/graphics/pokemon/smoochum/footprint.png b/graphics/pokemon/smoochum/footprint.png index e901d9334cf4cf715531d83a799193ea9c7f786b..15461e49a3b7f92463839103d8d3962f5cf31b15 100644 GIT binary patch delta 78 zcmWGenjq=P%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Vcr;B3<$IRpe2i7yZJa5=1 f1TZrjciAu`-e=MBk!`XCDq-++^>bP0l+XkKkfj$9 delta 63 zcmYcao*-$(00ib8ht2>gDNh&25RRG2KmN~Wl>ECg{YPSd%PYx$3p5xQX3v-2v8VrL PFi5qhtDnm{r-UW|$-Ebi diff --git a/graphics/pokemon/sneasel/footprint.png b/graphics/pokemon/sneasel/footprint.png index 2159ef3dcfaa686e7f55fbf6c453c0939e80c18e..c3472d32a684560cdd00b9ea9f570a04d7150a20 100644 GIT binary patch delta 88 zcma#enIIX=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VGr;B3<$IRq}2F5-%wt377 qN4_^S%Jg6;Bt(5RRG2KmN~WY}$9-xMmys!v0S@@&{h93*2nJFu#gz Zh7p6)e(}G~_7UPBeV(p%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VKr;B3<$IRpe24*)lwuhWN ym!u`0*c;sV&!9M)i;bIGfXS$#=?%LA7vtG`oZJh#&sqUBF?hQAxvXgT~8Os5RRG2KmN~W?D+RLy<+nD4@c%dWVAobSSDa~=Ul-b j3l2s}hlBFpcoL>E=r0hvzWlGnGmrtEu6{1-oD!M< p{>VFc{A1^Eyy4)uK!k^Z;qqFJ-}jVwZv)jbc)I$ztaD0e0sy=39CH8w delta 71 zcmd0fo*?PO00ib8ht2>gB~KT}5RRG2KmN~WZ2EWA_|Js&9|!oI_-{CJ9Ae{QTAFZ* XLGz;6b067sd5|toS3j3^P6g1y2{p5RRG2KmN~W?E81s_)k~*j|2S<_D>}L-7r>I$;goS VMpD#K?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vqCb(4;|-gMp!F2^$Ch42F83Y6eeNKbLh*2~7al+#4_e delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~WY^vMOzOete;|q3sj=vMrf28v}{eOLs aV+jvK*Dc9gg@R1lAdQ}`elF{r5}E+)KN}qY diff --git a/graphics/pokemon/spheal/footprint.png b/graphics/pokemon/spheal/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/spinda/footprint.png b/graphics/pokemon/spinda/footprint.png index 7be943a892aaef2f4d8336f73fb21149e4666eae..688e1ec1e3defbefbc114cd427deab9cbc9d9953 100644 GIT binary patch delta 89 zcma#cogf*)%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V0r;B3<$IRpe2i7+{JT|;M qGJFb0J~cG{WMqEK%+|(SP|4tbl%?nYjZd;b)eN4lelF{r5}E+zs~s-@ delta 74 zcmd0en;_}R00ib8ht2>gRZkbk5RRG2KmN~Wl>GbS{D+?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vg1y2{p5RRG2KmN~W?ECjO{fE%`4~}w;bvKOvtW0+ZVrHoI Vk?0 hXZQmI9y6w>GBjARUd@|u-wddT!PC{xWt~$(69CL-7@zb+00ib8ht2>gSx*NQ0-VpUXO@geCwWSQthC diff --git a/graphics/pokemon/starmie/footprint.png b/graphics/pokemon/starmie/footprint.png index c1c0058e74e9c2354f9bf9ca74251c564bcb95d1..2a1c1f3dd159502c8024d197d965920376b79bfa 100644 GIT binary patch delta 76 zcmWGcm>}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MU9JZIP) dI8Gd3V6fi8)cJ|OLm8-m!PC{xWt~$(699Oc7o`9I delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1ORFT6$t}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MU9JZIP) dI8Gd3V6fi8)cJ|OLm8-m!PC{xWt~$(699Oc7o`9I delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1ORFT6$t?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vgIZqeI5RRG2KmN~W?D%)n_|HUl*KZ03>%S(jgfY7@s6Ud> TnpxqK2-4x{>gTe~DWM4fA`=(E diff --git a/graphics/pokemon/suicune/footprint.png b/graphics/pokemon/suicune/footprint.png index 946c35dd0efade8dde45842ecdd7a8c04aba0df6..57258fb0c3286fd336ffd2f9c5715929850eba05 100644 GIT binary patch delta 80 zcmWGZnIP%S%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VIr;B3<$IRpe2i7xuJa70H hbV&9{@GG2VW+-{j+Q9wYxE!d6!PC{xWt~$(69C|@86p4x delta 64 zcmYcZnILJ+00ib8ht2>gX-^l&5RRG2KmN~Wl>B@1{0C>bu73>|?W_a>8_)m% delta 69 zcmd0doFM7I00ib8ht2>g1y2{p5RRG2KmN~uxZd`#f2GE+#+H8$6KqBPu1^2)U!LKi Vl8B?nt?9}jJ)W+9F6*2UngEcW8omGk diff --git a/graphics/pokemon/sunkern/footprint.png b/graphics/pokemon/sunkern/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vxaY5)KL delta 67 zcmYcepCD<+00ib8ht2>gIZqeI5RRG2KmN~Wl>ECg{m0(<53kn=aHcFi`R_kJ!}$er Ue82ard;#h3boFyt=akR{0A0}<&Hw-a diff --git a/graphics/pokemon/swablu/footprint.png b/graphics/pokemon/swablu/footprint.png index 7e71113c3aff9a09dddd9672bc7f1200f7cb7a74..747e2caaa8b887af4f7768dcc27c7c05fb82fa25 100644 GIT binary patch delta 77 zcmWGaoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}MTU2_+4U e8yR~7R2cO?GP%Fcs(cGn!QkoY=d#Wzp$P!6Oc{j$ delta 62 zcmYccnjmS(00ib8ht2>gNlzEY5RRG2KmN~W?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vQZxRm6O}nyfI1mGUHx3vIVCg! E0DZwGJOBUy delta 83 zcmbgJx>?M5RRG2Khn>CI63d(1dGFtiEZsoJp3$@b_PZ@0VzKY k@HpAuNbHbr`FDbup~FLf_urq5lR+kUy85}Sb4q9e00Jc+G5`Po diff --git a/graphics/pokemon/swellow/footprint.png b/graphics/pokemon/swellow/footprint.png index f44a71c29b41d0ffb0ac72b219a2c65355b3333d..9757114c026160cd03c61285ed722a36817dde6d 100644 GIT binary patch delta 104 zcmd0Rfq~)FI*xmbP0 Hl+XkKkC-PU delta 87 zcmb=)o*)^-00ib8ht2>gBTpB{5RRG2Kfcd@7;k&{cU4>ZeaU-Ejcd5le>^$=p>h7h ocALZU3Y*wZ{#&2kpz%ANpTX#YIEz5(Cn1n2p00i_>zopr06i@u^8f$< diff --git a/graphics/pokemon/swinub/footprint.png b/graphics/pokemon/swinub/footprint.png index fb56709ec6e920dd60f932e9b39bc68d95d5e68e..c1573fe84acdc67df9e8397d07bc8cfbadabd9f0 100644 GIT binary patch delta 77 zcmWGcoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}MXg5;No- e1Rpb+crrwEvG87qT|O76g2B_(&t;ucLK6Uf$QO11 delta 61 zcmYccoFHkz00ib8ht2>g2~QWt5RRG2KmN~W%Q~loCIF?~7xVxC diff --git a/graphics/pokemon/taillow/footprint.png b/graphics/pokemon/taillow/footprint.png index dbf5c5c6b4e858137c77fb6a8148065b0b7c4973..a54a5c93fe451858e7dcd7b1986b1c4fdbd9fd3c 100644 GIT binary patch delta 92 zcmYc+m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bcIW;V8CY;1gt tZ1;E-*e0aZA2?9MaD+{1f{q6-Lu(w{p~rb)8-N-ZJYD@<);T3K0RSpc9V`F< delta 77 zcmXR&oFM7J00ib8ht2>g4Nn)x5RRG2KmN~W?0O~n@2YW4{rL|k<&Q8-vVS7^??&?t e2bM{!D;XIo6eJZs_-sE3((CE!=d#Wzp$Pziy&drY diff --git a/graphics/pokemon/tangela/footprint.png b/graphics/pokemon/tangela/footprint.png index c05d3b4375c5773f50d3640439fee5368b504d10..2b0c03fa5fe89e546219a981b5cc27b41c9fccde 100644 GIT binary patch delta 91 zcmYeypCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRpe2IgbzJa6PB te$+cmv|*`bQ2fWv^M_sHhTg4Nn)x5RRG2KmN~W?D%)m_|Jp%9|!nc`4u|kTkK94*KA1t e!5H@KzdggtV3EfmlZBE&dOcnJT-G@yGywp5VIA%O diff --git a/graphics/pokemon/tauros/footprint.png b/graphics/pokemon/tauros/footprint.png index 602011c6d6c3f92cd76342e390afa3255fc7070c..3ae3a980d1f495ec05038d23eb154098bb4aa9c9 100644 GIT binary patch delta 85 zcma#foFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpe2c{l&i5vC} m0`pm!`&l>`C3Toicrm21FwdwzQ&kOA$>8bg=d#Wzp$PyrLm3bN delta 71 zcmd0do*?PO00ib8ht2>gB~KT}5RRG2KmN~W?E81q_|F6Oh5g4R?d;hV6&`=DW>Ya` Xm{BF;WgIR!1EkB-)z4*}Q$iB}ebX3) diff --git a/graphics/pokemon/teddiursa/footprint.png b/graphics/pokemon/teddiursa/footprint.png index def88c323394ced33e406b8f31b5ebe787f4a580..6e0bdfd171875a477214a48472893b163fd59233 100644 GIT binary patch delta 85 zcma#foFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpe2c{lAo->?0 mXZR&<*gFVLI9tIG$;r@~$0nHl_GB7RC4;A{pUXO@geCx5?iz>y delta 71 zcmd0do*?PO00ib8ht2>gB~KT}5RRG2KmN~W?ECjN{fF`Vhy6B(`Rg>8HvPY8tgw=i Xp+Z3NVr<4tBakjnS3j3^P6?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe2c{lAo->?0 lXZRO%crvy~@GEFDGNfK*3BG-N<5i$S22WQ%mvv4FO#nJY8eRYZ delta 70 zcmd0Znjq=O00ib8ht2>gMNb#U5RRG2KmN~W?ECjN{fF`Vhy6ApfA{h`{eL4l;R*x8 W^p(>6e%V3FAWfdGelF{r5}E+1AR4~_ diff --git a/graphics/pokemon/togetic/footprint.png b/graphics/pokemon/togetic/footprint.png index b15913fa81c98af152bc727accfd91c152c53e5a..239f42d98d43b960de934402d6eaf302f4dfc79d 100644 GIT binary patch delta 84 zcma#bm>}uT%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VQr;B3<$IRpe24**Qwr4B? lN&g%AX2>@PJZ9{0VmQ8sGxE}B23DX#22WQ%mvv4FO#o9>8v6hM delta 70 zcmd0Znjq=O00ib8ht2>gMNb#U5RRG2KmN~W?D+RK{fDu9OWlXXi|s!td^talag7jz W=^?SsQi0?fAWfdGelF{r5}E*}uNv(D diff --git a/graphics/pokemon/torchic/footprint.png b/graphics/pokemon/torchic/footprint.png index 955afa82accd31a048e4e2cdc2d3a1d5b8801017..4149f9bb1fe1c54e23f6786d5c7376331b04b77d 100644 GIT binary patch delta 98 zcmYc%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*Var;B3<$IRq}h6XmagUUQY zHatD-5*7IdAO0sK{6BEu55o~wB?X3wybe+fM^ibDY+Up`5U7p8)78&qol`;+06Zcg Ar2qf` delta 83 zcmXR*pCIYS00ib8ht2>gJx>?M5RRG2KmN~WY+p>FVdQ&MBb@04kgw;{X5v diff --git a/graphics/pokemon/torkoal/footprint.png b/graphics/pokemon/torkoal/footprint.png index 208f3bb7755de13b144695c6197394554a441766..35facf20e46c5128a2d2c2d060de7e2f5bac5508 100644 GIT binary patch delta 99 zcmc~OpCB2>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U{r;B3<$IRq}21YkFwuhWN zm!us${xLWII3Ry@O1TaS?83{1OQy7 BAol}uT00ib8ht2>geNPw15RRG2KmN~WZ2I>%y<+nD4@cx%c diff --git a/graphics/pokemon/totodile/footprint.png b/graphics/pokemon/totodile/footprint.png index 2102602737d5574af23d1089362943af251f17fa..dd3fd2e209149832ae647594a139e3a338e59068 100644 GIT binary patch delta 83 zcmaz@pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRq}2F7D-Y~NUU l-tY%pWE4osYgo<1uyr&0-d+3HgMjK7JYD@<);T3K0RTxm8x#Nl delta 68 zcmYd~m>_A-00ib8ht2>gc~2L|5RRG2KmN~WZ2EWA_)kar55@kjH;ym-ZJB)}8Qf1x UsQ%P>ngP<{>FVdQ&MBb@08?BUG5`Po diff --git a/graphics/pokemon/trapinch/footprint.png b/graphics/pokemon/trapinch/footprint.png index c3e6e785b207d755a4943cae52529ca052a7aa14..be4eeb90ef76655a1cc5dcccf905f7444c9603e3 100644 GIT binary patch delta 87 zcma#go*)^-%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U*r;B3<$IRpe2c|RZ5)twS p1vLo|Dh?cwK5$?kgGv(@Lq{}gK<gHBT4E5RRG2KmN~W?E81a_|K&DALq`0h@JQFa#frBM+LzY c*8l&R8A_FFVdQ&MBb@0DiU}wg3PC diff --git a/graphics/pokemon/treecko/footprint.png b/graphics/pokemon/treecko/footprint.png index ed3854702ecf72061fa555e585493190561e8a88..695c6a891d250a24c6fd9bdf5c8a27111efe6d73 100644 GIT binary patch delta 92 zcmYc&m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;W?h$Vr&6?_k1z r_Lh`#gAMi!iqDt>Sf;QlNiZ;otmnMBSdOC%sDZ)L)z4*}Q$iB}a_b$c delta 76 zcmXR&m>}uS00ib8ht2>gbx#+^5RRG2KmN~u7;k%6xU`M=jKY@_b04g6Hgb%5RRG2KmN~uc)q?({VUJ;H_A-00ib8ht2>gc~2L|5RRG2KmN~WZ2EW2_|KN~AB--aR&eP2ST47ShrwP& U+-|D5eGN#9r>mdKI;Vst077gS7ytkO diff --git a/graphics/pokemon/tyranitar/footprint.png b/graphics/pokemon/tyranitar/footprint.png index ea12c75b08769cb2d340cd813324996649517447..c5e6dfdd7ff1dd84036ce7d091deb7021776b4a5 100644 GIT binary patch delta 92 zcmYc+m>?O>%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM3981i(?4K%;bay26nbKW*!-J siHdxK5C0pKzVRn~VQ87b?{I~Y;n@@}FT3`r`9KW}p00i_>zopr07O3?0RR91 delta 77 zcmXR&oFM7J00ib8ht2>g4Nn)x5RRG2KmN~WZ24yVXM6gOymKEs=RRb%7Ww;tUAa== eS2BOtH+crJSE4iAPAxtU((CE!=d#Wzp$Pzuh#r9e diff --git a/graphics/pokemon/tyrogue/footprint.png b/graphics/pokemon/tyrogue/footprint.png index 0ef849eb894a9c7217d53a5cb226786240cf94d7..66cbd808060fedd4b44a6fa31eaf42201488c169 100644 GIT binary patch delta 77 zcmWGcoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}MUv5;No% eC@kRMVPGg!Vf|#5*t!R(g2B_(&t;ucLK6UjEf;hE delta 61 zcmYccoFHkz00ib8ht2>g2~QWt5RRG2KmN~W e1U@sTcrxUyV@+zlQ(y>G!QkoY=d#Wzp$PzxG#C^B delta 61 zcmYccoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1OSY971jU% diff --git a/graphics/pokemon/unown/footprint.png b/graphics/pokemon/unown/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vGI8pDQpdhZn&Bk!@1!u;TXs&fY9SokXelF{r5}E)dWE>s< delta 79 zcmXR+o*?PP00ib8ht2>gEl(H65RRG2KmN~W?D+RL{YUWm3zN?j{IfjFTinL~iHHA( gAjb*TQ%#{v493&Msu(sXZwBf1boFyt=akR{0LjiC4FCWD diff --git a/graphics/pokemon/vaporeon/footprint.png b/graphics/pokemon/vaporeon/footprint.png index 2b44d4b2491b80132b81ff783599d8c301e6c490..7e40d8198eac8658f1d646567daefc0e55ec2b5e 100644 GIT binary patch delta 90 zcma#cn;;p=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VWr;B3<$IRpe2c{lgo;}hM rKkN-o{BKZFknXr4Z(tzbpuxzn{W+($?lIFEpmGLJS3j3^P6gRZkbk5RRG2KmN~W?E81sxaL#(j|1mFG{|-}bP0l+XkKN_`!` diff --git a/graphics/pokemon/venomoth/footprint.png b/graphics/pokemon/venomoth/footprint.png index 6965dbe60faf9d737d166f33082414b9cfb07195..a9b0e33c2899262a2f3194da12bb624ee577b2c4 100644 GIT binary patch delta 72 zcmeZ?nIP%R%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VEr;B3<$IRq}18fq~4jj@9 Z4B`(NnP+Dl_XbKbc)I$ztaD0e0s!$#6w?3z delta 56 zcma#?nILJ*00ib8ht2>gVNVyw5RRG2KmN~W6#l!KT`?z!;ptqt`@1t0zkrl^y85}S Ib4q9e0QbTY?EnA( diff --git a/graphics/pokemon/venonat/footprint.png b/graphics/pokemon/venonat/footprint.png index 3675945c9241a95407d89551b26a714a3978acdf..f1f332f81d8b5444a0f095f2c25ae0a81d6c5cdf 100644 GIT binary patch delta 83 zcmaz{pCIYS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U_r;B3<$IRpe2Ig(dJT?3d k9rDZ@C8r>mdKI;Vst01g1y2{p5RRG2KmN~W?5MkCTr-7zA-}|nc3Y0WE7KWPvoJ7i V6P@yZ^X8KvJ)W+9F6*2UngBRb7`Ffb diff --git a/graphics/pokemon/venusaur/footprint.png b/graphics/pokemon/venusaur/footprint.png index bdef2c818ebc7cbff4ccb99329e3fa895ed23e22..188dd9608141b87c15dd72c935d10ce620203a94 100644 GIT binary patch delta 91 zcmYeupCB2=%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U@r;B3<$IRq}h6XmabHY4( t%q5=uZ}uS00ib8ht2>gbx#+^5RRG2KmN~WYDigPrD51jkp dF1O~5J;T!`;hJrxm3u*2Jzf1=);T3K0RSA49DM)) diff --git a/graphics/pokemon/vibrava/footprint.png b/graphics/pokemon/vibrava/footprint.png index fdf76f9f2289646d9f7e61d48684a2838409a4b4..b935f853a3f30d9f00052f8545d5d4695550ef53 100644 GIT binary patch delta 79 zcmWGbo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRq}0}O1uJgoK- gTCXH^vJ6xiqw1KC9L&4H4^+e8>FVdQ&MBb@0G+HCjsO4v delta 66 zcmYcen;>b+00ib8ht2>gSx*?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v{ z_B1zMY-;?;#{8R`?HfN&4J(fgo5GRl2M+viX#C5-T+GaHq?h9>$G^GUK-~gQ%@Ji5RRG2KmN~uSZ{lHe~rMe$LBu0w>T_c+9v;q$Nq<; s-8bVJJANnm=f*V?(tjkL|FB$+!Q!LXTkZpKY#@U?UHx3vIVCg!0G{Jf;l-#>^}X4D7m`P2rZ?xq&JfJYD@<);T3K0RVN%8SnrA delta 69 zcmd0doFM7I00ib8ht2>g1y2{p5RRG2KmN~uIN$cLd?m{-M#pakA^cAD|BU~zD>8fw V6ifIOrh6Qu$J5o%Wt~$(697x97{34j diff --git a/graphics/pokemon/volbeat/footprint.png b/graphics/pokemon/volbeat/footprint.png index 916c59f606a931938f0d6263b3ff6780db0277a3..f5df06fdc3cedb955dcda52a28806fcae32c6d58 100644 GIT binary patch delta 79 zcmWGZo*?PP%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*U-r;B3<$IRpe2c{l}D+dnn gxUdUwXf&}fBuBAKmQ5484OGM6>FVdQ&MBb@0JXOl$^ZZW delta 64 zcmYcenILJ+00ib8ht2>gX-^l&5RRG2KmN~W?EA+UXnR;*VUxSU0**;i46{_E{d0Wg Q=YW)Zy85}Sb4q9e0EfU7C;$Ke diff --git a/graphics/pokemon/voltorb/footprint.png b/graphics/pokemon/voltorb/footprint.png index c7ccf57f373ce23b1fe41fe7de4a616bbf5c2cc2..2449369fd6b8d8076c846240a518fe6bbd7fedee 100644 GIT binary patch delta 67 zcmZ<{pCD<+%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4$+dr;B3<$IRpe1zsS}fPv9@ S%Jy_1i^0>?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v;u)EvnK%sP6B05SPB1eR&t^S!BSY~#P&tFAtDnm{r-UW|+2I@K delta 75 zcmd0cpCIYR00ib8ht2>gHBT4E5RRG2KmN~Wl>ECo{l}B@9~$Lb?7kWQnZxf?|3>oP cb!QO?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vzD+v5%7f7l*aG-)=5eLI*9nKlqVt2!Usu?_8{an^LB{Ts5@N68$ delta 73 zcmd0eognGL00ib8ht2>g6;Bt(5RRG2KmN~W?0O|x_uTl;rSu;M`W)k*B<59@lh6**=jrO_vd$@?2>|^A8_xg$ diff --git a/graphics/pokemon/weedle/footprint.png b/graphics/pokemon/weedle/footprint.png index c1c0058e74e9c2354f9bf9ca74251c564bcb95d1..2a1c1f3dd159502c8024d197d965920376b79bfa 100644 GIT binary patch delta 76 zcmWGcm>}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRq}0}MU9JZIP) dI8Gd3V6fi8)cJ|OLm8-m!PC{xWt~$(699Oc7o`9I delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~Wp=fS?83{1ORFT6$t?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!vjjfjg5cVne7GsCO)V?e4wtaac*m4B_H!+KDIV~hph}ZyEva)Oyn>Hn!w=c L>gTe~DWM4fpxY?( delta 95 zcmZo|jb&wps1`;b|{ x(6~k*?MLF750A|c&rfNqf5-Fxr{ur?>g1y2{p5RRG2Khn>CaF=VTJ8(hXVpIDf`L7CJp4%V(|DWN= WY>`F3qO>o8^mw}ZxvXuh@ diff --git a/graphics/pokemon/wingull/footprint.png b/graphics/pokemon/wingull/footprint.png index 057b2cefad6c44ce191fee72f5a3f3cf1505419f..26b410ad371603abe10f5c1954334e610946beb1 100644 GIT binary patch delta 85 zcma#aoFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpe24*pKwr$J` mNB%RgZj@(Ge8$Em!N72-iK91EcEwhpN(N6?KbLh*2~7Ylei;`4 delta 72 zcmd0dnIP%R00ib8ht2>gWltB!5RRG2KmN~W?5KO6{v(s$N&ZRT1^#M*U%}@Y0>AyY YXVCg19vZx4|2L2}Pgg&ebxsLQ0KBvtd;kCd diff --git a/graphics/pokemon/wobbuffet/footprint.png b/graphics/pokemon/wobbuffet/footprint.png index 49fa6818d129fc3a0be1917dc361834456f06769..b7d2324d23b3a903e3d0dbc5d0db76a5e4673c6a 100644 GIT binary patch delta 77 zcmWGcoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}0}MUv5;No- e1Rpb-crwJkW%0Q;*>5&b1%s!npUXO@geCxydKg3i delta 61 zcmYccoFHkz00ib8ht2>g2~QWt5RRG2KmN~W;ESgQyAw@l%CdTrlt*2 N>*?y}vd$@?2>^Zp6+Hj| diff --git a/graphics/pokemon/wooper/footprint.png b/graphics/pokemon/wooper/footprint.png index 5e1ba56e61e3e0899204630a37d9ad49eb98530b..22911aa46c4f23723982114d589ecbd7230edc5d 100644 GIT binary patch delta 76 zcmWGcm>}uS%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VMr;B3<$IRpe2R3#I3Hb#I d3plhG7$#3*eKuR<;u@d=22WQ%mvv4FO#oFz7U2K@ delta 61 zcmYcYoFHkz00ib8ht2>g2~QWt5RRG2KmN~WY*?y}vd$@?2>_U~7QFxf diff --git a/graphics/pokemon/wurmple/footprint.png b/graphics/pokemon/wurmple/footprint.png index 3ac4abd9f7a1a2a8d1ae64d938998b423cd51001..bbb7102f669553bb34301c80ba1653f8bb820906 100644 GIT binary patch delta 77 zcmWGcoFM7J%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V6r;B3<$IRq}18frf1_t&F eiVDo43=GaS%$`+!-=_jqFnGH9xvXg2~QWt5RRG2KmN~W6#lz8{f9EYlLOl-5r$n%GBbJZGVcPZ N^>p=fS?83{1OQAT6IlQN diff --git a/graphics/pokemon/wynaut/footprint.png b/graphics/pokemon/wynaut/footprint.png index 4fe4832c08b40644a12d1572d6047dc7cda5e97d..6b0daca37ada476dd182ebce8e1e8d4726c8c17f 100644 GIT binary patch delta 81 zcmaz@ognGM%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*V2r;B3<$IRq}2F7E|JZJbP iTwt8Q!C`8kz{s$zhF!!XY}yl`Dh5wiKbLh*2~7a%z!<6k delta 68 zcmYd|m>_A-00ib8ht2>gc~2L|5RRG2KmN~WZ2EW8_|HUlr*8^^0;|#+R{#7j&*07^ UagMQ;GZdu7)78&qol`;+065kc_y7O^ diff --git a/graphics/pokemon/xatu/footprint.png b/graphics/pokemon/xatu/footprint.png index 44fcad1e3ed9a90d7a426104e849b53c176eb5e3..52be0000848a3680ff39cdb9c760f77760fe7534 100644 GIT binary patch delta 85 zcma#ZoFEy%%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VAr;B3<$IRpeAZSs1#ujqq kzyToQbMr|!a)5!svz2L8)#9g@fhrk1UHx3vIVCg!0NrjL`2YX_ delta 68 zcmd0dm>_A-00ib8ht2>gc~2L|5RRG2KmN~uD9`hErMv5Y$$$USe=xe$AAIq@o?-J( US&Q_Z%v_KbPgg&ebxsLQ0D%GbuApIg2B_(&t;ucLK6Ur@E7I) delta 64 zcmYccnILJ+00ib8ht2>gX-^l&5RRG2KmN~W*%=$w RXB-46_jL7hS?83{1OOh$8a@C3 diff --git a/graphics/pokemon/zangoose/footprint.png b/graphics/pokemon/zangoose/footprint.png index e07e58ceecbe4f320a940c538d4b2223aa8fd346..cc43fe9176b418ab67931029beb78c6036c9a7d1 100644 GIT binary patch delta 97 zcmYcje zNB%W7?rmr^ZD{<;)NwG4VNz1vfddr`iv$>^ShE!suzmIh>SFM8^>bP0l+XkKD7qm) delta 83 zcmXR-pCIYS00ib8ht2>gJx>?M5RRG2KmN~W?D%&t{f9Kall>3Lx-Z6mqRxNtmOt{N kQcmTo`@DzqZJ8rf88V$E3tlzc-v=_m)78&qol`;+09^zjYXATM diff --git a/graphics/pokemon/zapdos/footprint.png b/graphics/pokemon/zapdos/footprint.png index 480063a88b754bf8889b0d48e7eb984ee208bd42..80b07a5b0a3f9a6de91c78f175c20f9308412041 100644 GIT binary patch delta 100 zcmd0(m>?O?%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*VSr;B3<$IRpeh9))vp^QWW zn_~%;eU6`an%~H>{gdZ;BQG&S-oQYvL1}^!8w2A8Zqe#CwM9UU44$rjF6*2UngBS` BA2}uT00ib8ht2>geNPw15RRG2KmN~uSZ~X*cYT^g`pJSb6CTbqJgl7B#{Y)L m{)gnh6UKiww<}H9^q=APIgzs*2NGU^jPP{zb6Mw<&;$Uh(<9FS diff --git a/graphics/pokemon/zigzagoon/footprint.png b/graphics/pokemon/zigzagoon/footprint.png index d7373e064189cfb22854231695714a414b75a53a..421b25991e343b89921d2d77dd5b617e0a87b2a3 100644 GIT binary patch delta 95 zcmYc(o*)^;%)r2)YMZMBq}T#{LR|m<|DTkU^y=BsM4*UJg7c!;1z=qOVL3FhAcVOy|dVhdVqQuJYD@<);T3K0RWD69xwm^ delta 80 zcmXR;nIP%S00ib8ht2>gZBG}+5RRG2KmN~W?ECjO{fE%`4=d(B{9W57|BXlfiKN{r h<3G3fg;?&t;ucLK6UY8xo}e delta 51 zcmWG{pCGBn00ib8ht2>gK2I0N5RRG2KmN~e6k%cb>nH!v Date: Wed, 10 May 2023 00:33:43 -0400 Subject: [PATCH 183/229] Colorize bag select button --- graphics/bag/select_button.png | Bin 135 -> 195 bytes src/item_menu.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/bag/select_button.png b/graphics/bag/select_button.png index bded587fd1d071464de8d5b9032433a760c183cf..52cdc1ed5acb5ca9c9164e0db127cee7509eaa83 100644 GIT binary patch delta 162 zcmZo?Jj^&j(uJ9Uf#Dz5qGdqJAiyWYH7ThW$o&8R|JAE!_s)s>&%m%{%NC#r5WG9v z{Qv*iD2D2*S^vF&OrWwUTV54^+dENFIJk*j|L0V8xf8R(r!6z#np!2Sp19#G^J^gu zH?BPgwk+Uy>cPuBJy`F+_LMg7cU!~f{P9S=W@>l+*8F=9_P;pDYIxTptX1s_E65&C LS3j3^P6dXGLHcW-t6b~08)OQE{-7_GfVpn`3@LxF#k*mlRNPsKK0`R^C` Date: Thu, 11 May 2023 00:16:57 +0200 Subject: [PATCH 184/229] Remove duplicate CanBePoisoned condition (#2988) --- src/battle_util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index cd65d58093..e8c9b8d8cd 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6413,7 +6413,6 @@ bool32 CanBePoisoned(u8 battlerAttacker, u8 battlerTarget) || ability == ABILITY_IMMUNITY || ability == ABILITY_COMATOSE || IsAbilityOnSide(battlerTarget, ABILITY_PASTEL_VEIL) - || gBattleMons[battlerTarget].status1 & STATUS1_ANY || IsAbilityStatusProtected(battlerTarget) || IsBattlerTerrainAffected(battlerTarget, STATUS_FIELD_MISTY_TERRAIN)) return FALSE; From 6fdf75bd8cf5f4e6e5fb54417e45b3ca32b0af90 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 10 May 2023 13:37:48 -0400 Subject: [PATCH 185/229] Support plain pixel conversion, convert spinda spots to .png --- graphics/spinda_spots/spot_0.bin | Bin 32 -> 0 bytes graphics/spinda_spots/spot_0.png | Bin 0 -> 111 bytes graphics/spinda_spots/spot_1.bin | Bin 32 -> 0 bytes graphics/spinda_spots/spot_1.png | Bin 0 -> 112 bytes graphics/spinda_spots/spot_2.bin | Bin 32 -> 0 bytes graphics/spinda_spots/spot_2.png | Bin 0 -> 99 bytes graphics/spinda_spots/spot_3.bin | Bin 32 -> 0 bytes graphics/spinda_spots/spot_3.png | Bin 0 -> 99 bytes graphics_file_rules.mk | 13 +++++ src/pokemon.c | 8 +-- tools/gbagfx/convert_png.c | 1 - tools/gbagfx/gfx.c | 90 ++++++++++++++++++++++++++----- tools/gbagfx/gfx.h | 6 ++- tools/gbagfx/main.c | 72 ++++++++++++++++++++----- tools/gbagfx/options.h | 4 ++ 15 files changed, 159 insertions(+), 35 deletions(-) delete mode 100644 graphics/spinda_spots/spot_0.bin create mode 100644 graphics/spinda_spots/spot_0.png delete mode 100644 graphics/spinda_spots/spot_1.bin create mode 100644 graphics/spinda_spots/spot_1.png delete mode 100644 graphics/spinda_spots/spot_2.bin create mode 100644 graphics/spinda_spots/spot_2.png delete mode 100644 graphics/spinda_spots/spot_3.bin create mode 100644 graphics/spinda_spots/spot_3.png diff --git a/graphics/spinda_spots/spot_0.bin b/graphics/spinda_spots/spot_0.bin deleted file mode 100644 index 938d1d592394b24026aeaa0666b0d46ad670d876..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32 gcmXS5_`~>*`5*g#_W%4K_>cV``yb{9j0{i!0PQ~ujsO4v diff --git a/graphics/spinda_spots/spot_0.png b/graphics/spinda_spots/spot_0.png new file mode 100644 index 0000000000000000000000000000000000000000..e0a515d77dff8653bd8c130dfcb49b40a83082cc GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>;M1%fy~fDm+OF(il>WX z2*=Fi1dW7*KZg(e>2H+n_-Fj#uz+<$%TIph$INUh3=F>Wxcdrb=RF3hXYh3Ob6Mw< G&;$VAS|CjT literal 0 HcmV?d00001 diff --git a/graphics/spinda_spots/spot_1.bin b/graphics/spinda_spots/spot_1.bin deleted file mode 100644 index db46b5de4d91fafcc99795bc418398a0ea77236e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32 fcmaFB_=EWm`#=7F{Qu=a5XAb!{)7Di0|Wp735^X< diff --git a/graphics/spinda_spots/spot_1.png b/graphics/spinda_spots/spot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0e7fbd399a98f7556fb0f33100e0634433941665 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>;M1%fy~fDm+L?ho-U3d z95a&>Y7QLu)7;M1%fy~fDm+OF(gr|#R t2*=Figb9fW8 literal 0 HcmV?d00001 diff --git a/graphics/spinda_spots/spot_3.bin b/graphics/spinda_spots/spot_3.bin deleted file mode 100644 index 10c73f9bad7062d5e75a881e8e1f1211fbc803ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32 TcmcCvsAKpKhjk1#45$DAnurE) diff --git a/graphics/spinda_spots/spot_3.png b/graphics/spinda_spots/spot_3.png new file mode 100644 index 0000000000000000000000000000000000000000..cf4a96f7d3c27760d2b11f062ca3286b2fabd995 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>;M1%fy~fDm+OF(gr|#R t2*=Figbj%aE0Pm_^mjEVITY$JFx+~_Rxop=%TAyg22WQ%mvv4FO#nrJ8w>yd literal 0 HcmV?d00001 diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 69fc398d8c..97a7794b30 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -21,6 +21,7 @@ JPCONTESTGFXDIR := graphics/contest/japanese POKEDEXGFXDIR := graphics/pokedex STARTERGFXDIR := graphics/starter_choose NAMINGGFXDIR := graphics/naming_screen +SPINDAGFXDIR := graphics/spinda_spots types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -680,3 +681,15 @@ $(NAMINGGFXDIR)/cursor_squished.4bpp: %.4bpp: %.png $(NAMINGGFXDIR)/cursor_filled.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 5 -Wnum_tiles + +$(SPINDAGFXDIR)/spot_0.1bpp: %.1bpp: %.png + $(GFX) $< $@ -plain -data_width 2 + +$(SPINDAGFXDIR)/spot_1.1bpp: %.1bpp: %.png + $(GFX) $< $@ -plain -data_width 2 + +$(SPINDAGFXDIR)/spot_2.1bpp: %.1bpp: %.png + $(GFX) $< $@ -plain -data_width 2 + +$(SPINDAGFXDIR)/spot_3.1bpp: %.1bpp: %.png + $(GFX) $< $@ -plain -data_width 2 diff --git a/src/pokemon.c b/src/pokemon.c index bebed465bf..fa2eee42c0 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1346,10 +1346,10 @@ static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = const struct SpindaSpot gSpindaSpotGraphics[] = { - {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, - {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, - {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, - {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.bin")} + {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.1bpp")}, + {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.1bpp")}, + {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.1bpp")}, + {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.1bpp")} }; #include "data/pokemon/item_effects.h" diff --git a/tools/gbagfx/convert_png.c b/tools/gbagfx/convert_png.c index a5fefbd8b6..c9c240efbb 100644 --- a/tools/gbagfx/convert_png.c +++ b/tools/gbagfx/convert_png.c @@ -130,7 +130,6 @@ void ReadPng(char *path, struct Image *image) FATAL_ERROR("Bit depth of image must be 1, 2, 4, or 8.\n"); image->pixels = ConvertBitDepth(image->pixels, bit_depth, image->bitDepth, image->width * image->height); free(src); - image->bitDepth = bit_depth; } } diff --git a/tools/gbagfx/gfx.c b/tools/gbagfx/gfx.c index 832e9bb397..1dfc38e2d0 100644 --- a/tools/gbagfx/gfx.c +++ b/tools/gbagfx/gfx.c @@ -204,6 +204,18 @@ static void ConvertToTiles8Bpp(unsigned char *src, unsigned char *dest, int numT } } +// For untiled, plain images +static void CopyPlainPixels(unsigned char *src, unsigned char *dest, int size, int dataWidth, bool invertColors) +{ + if (dataWidth == 0) return; + for (int i = 0; i < size; i += dataWidth) { + for (int j = dataWidth; j > 0; j--) { + unsigned char pixels = src[i + j - 1]; + *dest++ = invertColors ? ~pixels : pixels; + } + } +} + static void DecodeAffineTilemap(unsigned char *input, unsigned char *output, unsigned char *tilemap, int tileSize, int numTiles) { for (int i = 0; i < numTiles; i++) @@ -345,9 +357,9 @@ static unsigned char *DecodeTilemap(unsigned char *tiles, struct Tilemap *tilema return decoded; } -void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) +void ReadTileImage(char *path, int tilesWidth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) { - int tileSize = bitDepth * 8; + int tileSize = image->bitDepth * 8; int fileSize; unsigned char *buffer = ReadWholeFile(path, &fileSize); @@ -355,26 +367,25 @@ void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int int numTiles = fileSize / tileSize; if (image->tilemap.data.affine != NULL) { - int outTileSize = (bitDepth == 4 && image->palette.numColors > 16) ? 64 : tileSize; - buffer = DecodeTilemap(buffer, &image->tilemap, &numTiles, image->isAffine, tileSize, outTileSize, bitDepth); + int outTileSize = (image->bitDepth == 4 && image->palette.numColors > 16) ? 64 : tileSize; + buffer = DecodeTilemap(buffer, &image->tilemap, &numTiles, image->isAffine, tileSize, outTileSize, image->bitDepth); if (outTileSize == 64) { tileSize = 64; - image->bitDepth = bitDepth = 8; + image->bitDepth = 8; } } int tilesHeight = (numTiles + tilesWidth - 1) / tilesWidth; if (tilesWidth % metatileWidth != 0) - FATAL_ERROR("The width in tiles (%d) isn't a multiple of the specified metatile width (%d)", tilesWidth, metatileWidth); + FATAL_ERROR("The width in tiles (%d) isn't a multiple of the specified metatile width (%d)\n", tilesWidth, metatileWidth); if (tilesHeight % metatileHeight != 0) - FATAL_ERROR("The height in tiles (%d) isn't a multiple of the specified metatile height (%d)", tilesHeight, metatileHeight); + FATAL_ERROR("The height in tiles (%d) isn't a multiple of the specified metatile height (%d)\n", tilesHeight, metatileHeight); image->width = tilesWidth * 8; image->height = tilesHeight * 8; - image->bitDepth = bitDepth; image->pixels = calloc(tilesWidth * tilesHeight, tileSize); if (image->pixels == NULL) @@ -382,7 +393,7 @@ void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int int metatilesWide = tilesWidth / metatileWidth; - switch (bitDepth) { + switch (image->bitDepth) { case 1: ConvertFromTiles1Bpp(buffer, image->pixels, numTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); break; @@ -397,9 +408,9 @@ void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int free(buffer); } -void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) +void WriteTileImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) { - int tileSize = bitDepth * 8; + int tileSize = image->bitDepth * 8; if (image->width % 8 != 0) FATAL_ERROR("The width in pixels (%d) isn't a multiple of 8.\n", image->width); @@ -411,10 +422,10 @@ void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bi int tilesHeight = image->height / 8; if (tilesWidth % metatileWidth != 0) - FATAL_ERROR("The width in tiles (%d) isn't a multiple of the specified metatile width (%d)", tilesWidth, metatileWidth); + FATAL_ERROR("The width in tiles (%d) isn't a multiple of the specified metatile width (%d)\n", tilesWidth, metatileWidth); if (tilesHeight % metatileHeight != 0) - FATAL_ERROR("The height in tiles (%d) isn't a multiple of the specified metatile height (%d)", tilesHeight, metatileHeight); + FATAL_ERROR("The height in tiles (%d) isn't a multiple of the specified metatile height (%d)\n", tilesHeight, metatileHeight); int maxNumTiles = tilesWidth * tilesHeight; @@ -432,7 +443,7 @@ void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bi int metatilesWide = tilesWidth / metatileWidth; - switch (bitDepth) { + switch (image->bitDepth) { case 1: ConvertToTiles1Bpp(image->pixels, buffer, maxNumTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); break; @@ -468,6 +479,57 @@ void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bi free(buffer); } +void ReadPlainImage(char *path, int dataWidth, struct Image *image, bool invertColors) +{ + int fileSize; + unsigned char *buffer = ReadWholeFile(path, &fileSize); + + if (fileSize % dataWidth != 0) + FATAL_ERROR("The image data size (%d) isn't a multiple of the specified data width %d.\n", fileSize, dataWidth); + + // png scanlines have wasted bits if they do not align to byte boundaries. + // pngs misaligned in this way are not currently handled. + int pixelsPerByte = 8 / image->bitDepth; + if (image->width % pixelsPerByte != 0) + FATAL_ERROR("The width in pixels (%d) isn't a multiple of %d.\n", image->width, pixelsPerByte); + + int numPixels = fileSize * pixelsPerByte; + image->height = (numPixels + image->width - 1) / image->width; + image->pixels = calloc(image->width * image->height * image->bitDepth / 8, 1); + + if (image->pixels == NULL) + FATAL_ERROR("Failed to allocate memory for pixels.\n"); + + CopyPlainPixels(buffer, image->pixels, fileSize, dataWidth, invertColors); + + free(buffer); +} + +void WritePlainImage(char *path, int dataWidth, struct Image *image, bool invertColors) +{ + int bufferSize = image->width * image->height * image->bitDepth / 8; + + if (bufferSize % dataWidth != 0) + FATAL_ERROR("The image data size (%d) isn't a multiple of the specified data width %d.\n", bufferSize, dataWidth); + + // png scanlines have wasted bits if they do not align to byte boundaries. + // pngs misaligned in this way are not currently handled. + int pixelsPerByte = 8 / image->bitDepth; + if (image->width % pixelsPerByte != 0) + FATAL_ERROR("The width in pixels (%d) isn't a multiple of %d.\n", image->width, pixelsPerByte); + + unsigned char *buffer = malloc(bufferSize); + + if (buffer == NULL) + FATAL_ERROR("Failed to allocate memory for pixels.\n"); + + CopyPlainPixels(image->pixels, buffer, bufferSize, dataWidth, invertColors); + + WriteWholeFile(path, buffer, bufferSize); + + free(buffer); +} + void FreeImage(struct Image *image) { if (image->tilemap.data.affine != NULL) diff --git a/tools/gbagfx/gfx.h b/tools/gbagfx/gfx.h index f1dbfcf4f7..1797d84dfd 100644 --- a/tools/gbagfx/gfx.h +++ b/tools/gbagfx/gfx.h @@ -50,8 +50,10 @@ enum NumTilesMode { NUM_TILES_ERROR, }; -void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); -void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); +void ReadTileImage(char *path, int tilesWidth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); +void WriteTileImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); +void ReadPlainImage(char *path, int dataWidth, struct Image *image, bool invertColors); +void WritePlainImage(char *path, int dataWidth, struct Image *image, bool invertColors); void FreeImage(struct Image *image); void ReadGbaPalette(char *path, struct Palette *palette); void WriteGbaPalette(char *path, struct Palette *palette); diff --git a/tools/gbagfx/main.c b/tools/gbagfx/main.c index 5d4faacab0..98a1a1edf9 100644 --- a/tools/gbagfx/main.c +++ b/tools/gbagfx/main.c @@ -25,6 +25,9 @@ void ConvertGbaToPng(char *inputPath, char *outputPath, struct GbaToPngOptions * { struct Image image; + image.bitDepth = options->bitDepth; + image.tilemap.data.affine = NULL; + if (options->paletteFilePath != NULL) { char *paletteFileExtension = GetFileExtensionAfterDot(options->paletteFilePath); @@ -45,22 +48,25 @@ void ConvertGbaToPng(char *inputPath, char *outputPath, struct GbaToPngOptions * image.hasPalette = false; } - if (options->tilemapFilePath != NULL) + if (options->isTiled) { - int fileSize; - image.tilemap.data.affine = ReadWholeFile(options->tilemapFilePath, &fileSize); - if (options->isAffineMap && options->bitDepth != 8) - FATAL_ERROR("affine maps are necessarily 8bpp\n"); - image.isAffine = options->isAffineMap; - image.tilemap.size = fileSize; + if (options->tilemapFilePath != NULL) + { + int fileSize; + image.tilemap.data.affine = ReadWholeFile(options->tilemapFilePath, &fileSize); + if (options->isAffineMap && options->bitDepth != 8) + FATAL_ERROR("affine maps are necessarily 8bpp\n"); + image.isAffine = options->isAffineMap; + image.tilemap.size = fileSize; + } + ReadTileImage(inputPath, options->width, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); } else { - image.tilemap.data.affine = NULL; + image.width = options->width; + ReadPlainImage(inputPath, options->dataWidth, &image, !image.hasPalette); } - ReadImage(inputPath, options->width, options->bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); - image.hasTransparency = options->hasTransparency; WritePng(outputPath, &image); @@ -77,7 +83,10 @@ void ConvertPngToGba(char *inputPath, char *outputPath, struct PngToGbaOptions * ReadPng(inputPath, &image); - WriteImage(outputPath, options->numTilesMode, options->numTiles, options->bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); + if (options->isTiled) + WriteTileImage(outputPath, options->numTilesMode, options->numTiles, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); + else + WritePlainImage(outputPath, options->dataWidth, &image, !image.hasPalette); FreeImage(&image); } @@ -94,6 +103,8 @@ void HandleGbaToPngCommand(char *inputPath, char *outputPath, int argc, char **a options.metatileHeight = 1; options.tilemapFilePath = NULL; options.isAffineMap = false; + options.isTiled = true; + options.dataWidth = 1; for (int i = 3; i < argc; i++) { @@ -162,6 +173,22 @@ void HandleGbaToPngCommand(char *inputPath, char *outputPath, int argc, char **a { options.isAffineMap = true; } + else if (strcmp(option, "-plain") == 0) + { + options.isTiled = false; + } + else if (strcmp(option, "-data_width") == 0) + { + if (i + 1 >= argc) + FATAL_ERROR("No data width value following \"-data_width\".\n"); + i++; + + if (!ParseNumber(argv[i], NULL, 10, &options.dataWidth)) + FATAL_ERROR("Failed to parse data width.\n"); + + if (options.dataWidth < 1) + FATAL_ERROR("Data width must be positive.\n"); + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -177,15 +204,16 @@ void HandleGbaToPngCommand(char *inputPath, char *outputPath, int argc, char **a void HandlePngToGbaCommand(char *inputPath, char *outputPath, int argc, char **argv) { char *outputFileExtension = GetFileExtensionAfterDot(outputPath); - int bitDepth = outputFileExtension[0] - '0'; struct PngToGbaOptions options; options.numTilesMode = NUM_TILES_IGNORE; options.numTiles = 0; - options.bitDepth = bitDepth; + options.bitDepth = outputFileExtension[0] - '0'; options.metatileWidth = 1; options.metatileHeight = 1; options.tilemapFilePath = NULL; options.isAffineMap = false; + options.isTiled = true; + options.dataWidth = 1; for (int i = 3; i < argc; i++) { @@ -236,6 +264,22 @@ void HandlePngToGbaCommand(char *inputPath, char *outputPath, int argc, char **a if (options.metatileHeight < 1) FATAL_ERROR("metatile height must be positive.\n"); } + else if (strcmp(option, "-plain") == 0) + { + options.isTiled = false; + } + else if (strcmp(option, "-data_width") == 0) + { + if (i + 1 >= argc) + FATAL_ERROR("No data width value following \"-data_width\".\n"); + i++; + + if (!ParseNumber(argv[i], NULL, 10, &options.dataWidth)) + FATAL_ERROR("Failed to parse data width.\n"); + + if (options.dataWidth < 1) + FATAL_ERROR("Data width must be positive.\n"); + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -403,7 +447,7 @@ void HandleLZCompressCommand(char *inputPath, char *outputPath, int argc, char * else if (strcmp(option, "-search") == 0) { if (i + 1 >= argc) - FATAL_ERROR("No size following \"-overflow\".\n"); + FATAL_ERROR("No size following \"-search\".\n"); i++; diff --git a/tools/gbagfx/options.h b/tools/gbagfx/options.h index 250b723450..830158b52e 100644 --- a/tools/gbagfx/options.h +++ b/tools/gbagfx/options.h @@ -15,6 +15,8 @@ struct GbaToPngOptions { int metatileHeight; char *tilemapFilePath; bool isAffineMap; + bool isTiled; + int dataWidth; }; struct PngToGbaOptions { @@ -25,6 +27,8 @@ struct PngToGbaOptions { int metatileHeight; char *tilemapFilePath; bool isAffineMap; + bool isTiled; + int dataWidth; }; #endif // OPTIONS_H From 292d460810f6a40550f6f3521374eb334243db12 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Fri, 12 May 2023 14:02:14 +0200 Subject: [PATCH 186/229] Fix ability select in debug givemon --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index 3fb79d2e86..8fff84d57d 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2327,7 +2327,7 @@ static void DebugAction_Give_Pokemon_SelectNature(u8 taskId) } static void DebugAction_Give_Pokemon_SelectAbility(u8 taskId) { - u8 abilityId; + u16 abilityId; u8 abilityCount = NUM_ABILITY_SLOTS - 1; //-1 for proper iteration u8 i = 0; From a89288e30e958add69295c910eb8b8f041add5c5 Mon Sep 17 00:00:00 2001 From: AaghatIsLive <109757010+AaghatIsLive@users.noreply.github.com> Date: Fri, 12 May 2023 17:54:47 +0530 Subject: [PATCH 187/229] Fix Illumise pallete (#2995) --- graphics/pokemon/illumise/normal.pal | 242 +-------------------------- 1 file changed, 1 insertion(+), 241 deletions(-) diff --git a/graphics/pokemon/illumise/normal.pal b/graphics/pokemon/illumise/normal.pal index b1f415775a..71e5ab84d8 100644 --- a/graphics/pokemon/illumise/normal.pal +++ b/graphics/pokemon/illumise/normal.pal @@ -1,6 +1,6 @@ JASC-PAL 0100 -256 +16 152 208 160 152 128 80 224 176 72 @@ -17,243 +17,3 @@ JASC-PAL 0 88 208 56 56 56 120 120 120 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 From d09072fd0dc8da040956bf28cc94793100e56727 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Sun, 14 May 2023 12:55:08 -0400 Subject: [PATCH 188/229] Updated Esper Wing's accuracy if B_UPDATED_MOVE_DATA is Gen9 (#3004) --- src/data/battle_moves.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index b30f62a684..ef6ad52a1c 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -12699,12 +12699,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_9 .power = 80, + .accuracy = 100, #else .power = 75, + .accuracy = 90, #endif .effect = EFFECT_SPEED_UP_HIT, .type = TYPE_PSYCHIC, - .accuracy = 90, .pp = 10, .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, From f6f0e5fa33dfe3154195619da940642b2b3cb06c Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 15 May 2023 01:03:14 +0200 Subject: [PATCH 189/229] Fix for wrong mon position for scripted wild doubles (#2996) --- src/script_pokemon_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 34f75ef8e5..bfe2e7581a 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -172,12 +172,12 @@ void CreateScriptedDoubleWildMon(u16 species1, u8 level1, u16 item1, u16 species SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, heldItem1); } - CreateMon(&gEnemyParty[3], species2, level2, 32, 0, 0, OT_ID_PLAYER_ID, 0); + CreateMon(&gEnemyParty[1], species2, level2, 32, 0, 0, OT_ID_PLAYER_ID, 0); if (item2) { heldItem2[0] = item2; heldItem2[1] = item2 >> 8; - SetMonData(&gEnemyParty[3], MON_DATA_HELD_ITEM, heldItem2); + SetMonData(&gEnemyParty[1], MON_DATA_HELD_ITEM, heldItem2); } } From 2420134e4532d87f44768a919229fe908a685c63 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Sun, 14 May 2023 19:30:30 -0400 Subject: [PATCH 190/229] Updated Ability Patch for Gen 9 functionality (#2989) --- src/party_menu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index aa37b1c691..27f4e0da42 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4663,7 +4663,6 @@ void Task_AbilityPatch(u8 taskId) // Can't use. if (gSpeciesInfo[tSpecies].abilities[tAbilityNum] == 0 || !tSpecies - || GetMonData(&gPlayerParty[tMonId], MON_DATA_ABILITY_NUM, NULL) > 1 ) { gPartyMenuUseExitCallback = FALSE; @@ -4734,7 +4733,10 @@ void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task) tState = 0; tMonId = gPartyMenu.slotId; tSpecies = GetMonData(&gPlayerParty[tMonId], MON_DATA_SPECIES, NULL); - tAbilityNum = 2; + if (GetMonData(&gPlayerParty[tMonId], MON_DATA_ABILITY_NUM, NULL) == 2) + tAbilityNum = 0; + else + tAbilityNum = 2; SetWordTaskArg(taskId, tOldFunc, (uintptr_t)(gTasks[taskId].func)); gTasks[taskId].func = Task_AbilityPatch; } From 76379661d05525b3fef87f6a640f003744475515 Mon Sep 17 00:00:00 2001 From: Eclipse <115349505+SubzeroEclipse@users.noreply.github.com> Date: Mon, 15 May 2023 04:09:45 +0200 Subject: [PATCH 191/229] Fixed mons mot disobeying with Gen8 mechanics disabled (#2990) --- src/battle_util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index e8c9b8d8cd..5aa2fc153f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8114,8 +8114,6 @@ u8 IsMonDisobedient(void) if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName)) levelReferenced = gBattleMons[gBattlerAttacker].metLevel; else -#else - if (gBattleMons[gBattlerAttacker].level <= obedienceLevel) #endif levelReferenced = gBattleMons[gBattlerAttacker].level; From 6458cab70a2533263518a877013a230512dacd39 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 15 May 2023 15:07:09 -0400 Subject: [PATCH 192/229] use NATIVE_ARGS in various to callnative conversions --- src/battle_script_commands.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index eddf6d6e19..896b57ffcc 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8805,7 +8805,7 @@ static bool32 CanTeleport(u8 battlerId) { struct Pokemon *party = GetBattlerParty(battlerId); u32 species, count, i; - + for (i = 0; i < PARTY_SIZE; i++) { species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); @@ -16317,33 +16317,33 @@ static bool8 IsFinalStrikeEffect(u16 move) // 10 bytes long (callnative(5) + counter(1) + ptr(4)) void BS_CheckParentalBondCounter(void) { + NATIVE_ARGS(u8 counter, const u8 *jumpInstr); // Some effects should only happen on the first or second strike of Parental Bond, // so a way to check this in battle scripts is useful - u8 counter = T1_READ_8(gBattlescriptCurrInstr + 5); - if (gSpecialStatuses[gBattlerAttacker].parentalBondState == counter && gBattleMons[gBattlerTarget].hp != 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 6); + if (gSpecialStatuses[gBattlerAttacker].parentalBondState == cmd->counter && gBattleMons[gBattlerTarget].hp != 0) + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } // 6 bytes long (callnative(5) + battler(1)) void BS_GetBattlerSide(void) { - gBattleCommunication[0] = GetBattlerSide(gBattlescriptCurrInstr[5]); - gBattlescriptCurrInstr += 6; + NATIVE_ARGS(u8 battler); + gBattleCommunication[0] = GetBattlerSide(cmd->battler); + gBattlescriptCurrInstr = cmd->nextInstr; } -// 6 bytes long (callnative(5) + battler(1)) void BS_CanTeleport(void) { - u8 battler = gBattlescriptCurrInstr[5]; - gBattleCommunication[0] = CanTeleport(battler); - gBattlescriptCurrInstr += 6; + NATIVE_ARGS(u8 battler); + gBattleCommunication[0] = CanTeleport(cmd->battler); + gBattlescriptCurrInstr = cmd->nextInstr; } -// 5 bytes long void BS_TrySymbiosis(void) { + NATIVE_ARGS(); //called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem. gActiveBattler = gBattlerAttacker; if (SYMBIOSIS_CHECK(gBattlerAttacker, BATTLE_PARTNER(gActiveBattler))) @@ -16357,7 +16357,7 @@ void BS_TrySymbiosis(void) return; } - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } void BS_SetZEffect(void) From eaa44cc8b5c62d70792868d8982ed1920f31f49e Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 15 May 2023 15:20:44 -0400 Subject: [PATCH 193/229] fix syntax --- src/battle_script_commands.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 896b57ffcc..88a76adff1 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8805,7 +8805,7 @@ static bool32 CanTeleport(u8 battlerId) { struct Pokemon *party = GetBattlerParty(battlerId); u32 species, count, i; - + for (i = 0; i < PARTY_SIZE; i++) { species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); @@ -16314,7 +16314,6 @@ static bool8 IsFinalStrikeEffect(u16 move) return FALSE; } -// 10 bytes long (callnative(5) + counter(1) + ptr(4)) void BS_CheckParentalBondCounter(void) { NATIVE_ARGS(u8 counter, const u8 *jumpInstr); @@ -16326,7 +16325,6 @@ void BS_CheckParentalBondCounter(void) gBattlescriptCurrInstr = cmd->nextInstr; } -// 6 bytes long (callnative(5) + battler(1)) void BS_GetBattlerSide(void) { NATIVE_ARGS(u8 battler); From 49a9210e9dfafeb1e984a000c73cdd063e0db948 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 15 May 2023 16:45:30 -0300 Subject: [PATCH 194/229] Fixed typo in include/config/battle.h --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index 6475f6664c..4a1bbdc2f9 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -191,7 +191,7 @@ // Other settings #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. -#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. +#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. #define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // 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_LATEST // 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) From 37874fe5c167602960811919fc1ffcfffb6133c2 Mon Sep 17 00:00:00 2001 From: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Date: Tue, 16 May 2023 16:21:05 -0700 Subject: [PATCH 195/229] fixed revival blessing failure still showing anim (#3010) --- data/battle_scripts_1.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index bcb1275e20..2fe9c74ee6 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -435,9 +435,9 @@ BattleScript_EffectRevivalBlessing:: attackcanceler attackstring ppreduce + tryrevivalblessing BattleScript_ButItFailed attackanimation waitanimation - tryrevivalblessing BattleScript_ButItFailed printstring STRINGID_PKMNREVIVEDREADYTOFIGHT waitmessage B_WAIT_TIME_LONG jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_EffectRevivalBlessingSendOut From 0c182345bf015aa7e659e68b6598955d992aece0 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 16 May 2023 16:24:25 -0700 Subject: [PATCH 196/229] reworked weather form reversion + added more tests --- asm/macros/battle_script.inc | 2 +- data/battle_scripts_1.s | 39 +++++++----------- include/battle_scripts.h | 2 +- include/constants/form_change_types.h | 1 + src/battle_script_commands.c | 7 ++-- src/battle_util.c | 27 ++++++++++-- src/data/pokemon/form_change_tables.h | 16 ++++---- test/ability_flower_gift.c | 48 +++++++++++++++++++--- test/ability_forecast.c | 59 +++++++++++++++++++++++++-- 9 files changed, 150 insertions(+), 51 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index dec096e6e1..4b0b341ddf 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1346,7 +1346,7 @@ callnative BS_ItemRestorePP .endm - .macro trytorevertweatherform + .macro tryrevertweatherform callnative BS_TryRevertWeatherForm .endm diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 26f30ef3f5..89e69b50ca 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1580,7 +1580,7 @@ BattleScript_MoveEffectCoreEnforcer:: printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG trytoclearprimalweather - trytorevertweatherform + tryrevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 BattleScript_CoreEnforcerRet: @@ -2729,7 +2729,7 @@ BattleScript_EffectSimpleBeam: printstring STRINGID_PKMNACQUIREDSIMPLE waitmessage B_WAIT_TIME_LONG trytoclearprimalweather - trytorevertweatherform + tryrevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 tryendneutralizinggas BS_TARGET @@ -2829,7 +2829,7 @@ BattleScript_EffectWorrySeed: printstring STRINGID_PKMNACQUIREDABILITY waitmessage B_WAIT_TIME_LONG trytoclearprimalweather - trytorevertweatherform + tryrevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 goto BattleScript_MoveEnd @@ -2961,7 +2961,7 @@ BattleScript_EffectGastroAcid: printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG trytoclearprimalweather - trytorevertweatherform + tryrevertweatherform printstring STRINGID_EMPTYSTRING3 waitmessage 1 tryendneutralizinggas BS_TARGET @@ -8003,9 +8003,7 @@ BattleScript_CudChewActivates:: setbyte sBERRY_OVERRIDE, 0 end3 -BattleScript_TargetFormChange:: - pause 5 - call BattleScript_AbilityPopUpTarget +BattleScript_TargetFormChangeNoPopup: printstring STRINGID_EMPTYSTRING3 waitmessage 1 handleformchange BS_TARGET, 0 @@ -8015,32 +8013,25 @@ BattleScript_TargetFormChange:: handleformchange BS_TARGET, 2 return +BattleScript_TargetFormChange:: + pause 5 + call BattleScript_AbilityPopUpTarget + call BattleScript_TargetFormChangeNoPopup + return + BattleScript_TargetFormChangeWithString:: pause 5 call BattleScript_AbilityPopUpTarget - printstring STRINGID_EMPTYSTRING3 - waitmessage 1 - handleformchange BS_TARGET, 0 - handleformchange BS_TARGET, 1 - playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL - waitanimation - handleformchange BS_TARGET, 2 + call BattleScript_TargetFormChangeNoPopup printstring STRINGID_PKMNTRANSFORMED waitmessage B_WAIT_TIME_LONG return -BattleScript_TargetFormChangeWithStringNoPopupEnd3:: - pause 5 - printstring STRINGID_EMPTYSTRING3 - waitmessage 1 - handleformchange BS_TARGET, 0 - handleformchange BS_TARGET, 1 - playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL - waitanimation - handleformchange BS_TARGET, 2 +BattleScript_TargetFormChangeWithStringNoPopup:: + call BattleScript_TargetFormChangeNoPopup printstring STRINGID_PKMNTRANSFORMED waitmessage B_WAIT_TIME_LONG - end3 + return BattleScript_BattlerFormChangeWithStringEnd3:: pause 5 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 4a00572753..c5b844b99d 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -465,7 +465,7 @@ extern const u8 BattleScript_MoveEffectStockpileWoreOff[]; extern const u8 BattleScript_StealthRockActivates[]; extern const u8 BattleScript_SpikesActivates[]; extern const u8 BattleScript_BerserkGeneRet[]; -extern const u8 BattleScript_TargetFormChangeWithStringNoPopupEnd3[]; +extern const u8 BattleScript_TargetFormChangeWithStringNoPopup[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/form_change_types.h b/include/constants/form_change_types.h index 651bcf7888..81d1b045b0 100644 --- a/include/constants/form_change_types.h +++ b/include/constants/form_change_types.h @@ -89,6 +89,7 @@ // Form change that activates when a specific weather is set during battle. // param1: weather to check +// param2: (optional) revert if specified ability is lost #define FORM_CHANGE_BATTLE_WEATHER 14 // Form change that activates automatically when the turn ends. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b21197a679..dd198f5121 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16567,13 +16567,12 @@ void BS_ItemRestorePP(void) void BS_TryRevertWeatherForm(void) { NATIVE_ARGS(); - u16 ability = gBattleMons[gBattlerTarget].ability; if (B_WEATHER_FORM_SUPPRESS >= GEN_5 - && (ability == ABILITY_FORECAST || ability == ABILITY_FLOWER_GIFT) - && TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_SWITCH)) // revert form + && TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER)) { gBattleScripting.battler = gBattlerTarget; - BattleScriptPushCursorAndCallback(BattleScript_TargetFormChangeWithStringNoPopupEnd3); + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = BattleScript_TargetFormChangeWithStringNoPopup; return; } gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index 67270469ea..602dd5c74b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6013,8 +6013,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move #else TRY_WEATHER_FORM: #endif - if ((IsBattlerWeatherAffected(battler, gBattleWeather) || gBattleWeather == B_WEATHER_NONE) - && TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER)) + if ((IsBattlerWeatherAffected(battler, gBattleWeather) + || gBattleWeather == B_WEATHER_NONE + || !WEATHER_HAS_EFFECT) // Air Lock active + && TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER)) { BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); effect++; @@ -10101,9 +10103,26 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) } break; case FORM_CHANGE_BATTLE_WEATHER: - if (gBattleWeather & formChanges[i].param1 - || (gBattleWeather == B_WEATHER_NONE && formChanges[i].param1 == B_WEATHER_NONE)) + // Check if there is a required ability and if the battler's ability does not match it + // or is suppressed. If so, revert to the no weather form. + if (formChanges[i].param2 + && (gBattleMons[battlerId].ability != formChanges[i].param2 + || (gStatuses3[gBattlerTarget] & STATUS3_GASTRO_ACID)) + && formChanges[i].param1 == B_WEATHER_NONE) + { targetSpecies = formChanges[i].targetSpecies; + } + // We need to revert the weather form if the field is under Air Lock, too. + if (!WEATHER_HAS_EFFECT && formChanges[i].param1 == B_WEATHER_NONE) + { + targetSpecies = formChanges[i].targetSpecies; + } + // Otherwise, just check for a match between the weather and the form change table. + else if (gBattleWeather & formChanges[i].param1 + || (gBattleWeather == B_WEATHER_NONE && formChanges[i].param1 == B_WEATHER_NONE)) + { + targetSpecies = formChanges[i].targetSpecies; + } break; case FORM_CHANGE_BATTLE_TURN_END: if (formChanges[i].param1 == GetBattlerAbility(battlerId)) diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index c4ade7b9a8..4137c9ba35 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -156,11 +156,11 @@ static const struct FormChange sAbsolFormChangeTable[] = { }; static const struct FormChange sCastformFormChangeTable[] = { - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, ~(B_WEATHER_SUN | B_WEATHER_RAIN | B_WEATHER_HAIL)}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, B_WEATHER_NONE}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN, ABILITY_FORECAST}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN, ABILITY_FORECAST}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL, ABILITY_FORECAST}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, ~(B_WEATHER_SUN | B_WEATHER_RAIN | B_WEATHER_HAIL), ABILITY_FORECAST}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, B_WEATHER_NONE, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CASTFORM}, {FORM_CHANGE_FAINT, SPECIES_CASTFORM}, {FORM_CHANGE_END_BATTLE, SPECIES_CASTFORM}, @@ -231,9 +231,9 @@ static const struct FormChange sBurmyFormChangeTable[] = { }; static const struct FormChange sCherrimFormChangeTable[] = { - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN}, - {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN, ABILITY_FLOWER_GIFT}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN, ABILITY_FLOWER_GIFT}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE, ABILITY_FLOWER_GIFT}, {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CHERRIM}, {FORM_CHANGE_FAINT, SPECIES_CHERRIM}, {FORM_CHANGE_END_BATTLE, SPECIES_CHERRIM}, diff --git a/test/ability_flower_gift.c b/test/ability_flower_gift.c index 2f2b98d1ef..1967b874d6 100644 --- a/test/ability_flower_gift.c +++ b/test/ability_flower_gift.c @@ -54,7 +54,7 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when its abili } } -DOUBLE_BATTLE_TEST("Flower Gift increases the attack of Cherrim's ally by 1.5x", s16 damage) +DOUBLE_BATTLE_TEST("Flower Gift increases the attack of Cherrim and its allies by 1.5x", s16 damageL, s16 damageR) { bool32 sunny; PARAMETRIZE { sunny = FALSE; } @@ -67,19 +67,55 @@ DOUBLE_BATTLE_TEST("Flower Gift increases the attack of Cherrim's ally by 1.5x", } WHEN { if (sunny) TURN { MOVE(playerLeft, MOVE_SUNNY_DAY); } - TURN { MOVE(playerRight, MOVE_TACKLE, target: opponentLeft); } + TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentLeft); + MOVE(playerRight, MOVE_TACKLE, target: opponentLeft); } } SCENE { - // Sun activates + // sun activates if (sunny) { ABILITY_POPUP(playerLeft, ABILITY_FLOWER_GIFT); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerLeft); MESSAGE("Cherrim transformed!"); } - // Partner uses Tackle + // player uses Tackle + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft); + HP_BAR(opponentLeft, captureDamage: &results[i].damageL); + // partner uses Tackle ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerRight); - HP_BAR(opponentLeft, captureDamage: &results[i].damage); + HP_BAR(opponentLeft, captureDamage: &results[i].damageR); } FINALLY { - EXPECT_MUL_EQ(results[0].damage, UQ_4_12(1.5), results[1].damage); + EXPECT_MUL_EQ(results[0].damageL, UQ_4_12(1.5), results[1].damageL); + EXPECT_MUL_EQ(results[0].damageR, UQ_4_12(1.5), results[1].damageR); + } +} + +DOUBLE_BATTLE_TEST("Flower Gift increases the Sp. Def of Cherrim and its allies by 1.5x", s16 damageL, s16 damageR) +{ + bool32 sunny; + PARAMETRIZE { sunny = FALSE; } + PARAMETRIZE { sunny = TRUE; } + GIVEN { + PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (sunny) + TURN { MOVE(playerLeft, MOVE_SUNNY_DAY); } + TURN { MOVE(opponentLeft, MOVE_HYPER_VOICE, target: playerLeft); } + } SCENE { + // sun activates + if (sunny) { + ABILITY_POPUP(playerLeft, ABILITY_FLOWER_GIFT); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, playerLeft); + MESSAGE("Cherrim transformed!"); + } + // opponentLeft uses Hyper Voice + ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPER_VOICE, opponentLeft); + HP_BAR(playerLeft, captureDamage: &results[i].damageL); + HP_BAR(playerRight, captureDamage: &results[i].damageR); + } FINALLY { + EXPECT_MUL_EQ(results[1].damageL, UQ_4_12(1.5), results[0].damageL); + EXPECT_MUL_EQ(results[1].damageR, UQ_4_12(1.5), results[0].damageR); } } diff --git a/test/ability_forecast.c b/test/ability_forecast.c index dba09992d7..826ba0e99b 100644 --- a/test/ability_forecast.c +++ b/test/ability_forecast.c @@ -7,6 +7,7 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an opponent's m PARAMETRIZE { move = MOVE_SUNNY_DAY; } PARAMETRIZE { move = MOVE_RAIN_DANCE; } PARAMETRIZE { move = MOVE_HAIL; } + PARAMETRIZE { move = MOVE_SNOWSCAPE; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; OPPONENT(SPECIES_WOBBUFFET); @@ -25,6 +26,7 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from its own move") PARAMETRIZE { move = MOVE_SUNNY_DAY; } PARAMETRIZE { move = MOVE_RAIN_DANCE; } PARAMETRIZE { move = MOVE_HAIL; } + PARAMETRIZE { move = MOVE_SNOWSCAPE; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; OPPONENT(SPECIES_WOBBUFFET); @@ -43,6 +45,7 @@ DOUBLE_BATTLE_TEST("Forecast transforms Castform in weather from a partner's mov PARAMETRIZE { move = MOVE_SUNNY_DAY; } PARAMETRIZE { move = MOVE_RAIN_DANCE; } PARAMETRIZE { move = MOVE_HAIL; } + PARAMETRIZE { move = MOVE_SNOWSCAPE; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; PLAYER(SPECIES_WOBBUFFET); @@ -63,6 +66,7 @@ DOUBLE_BATTLE_TEST("Forecast transforms all Castforms present in weather") PARAMETRIZE { move = MOVE_SUNNY_DAY; } PARAMETRIZE { move = MOVE_RAIN_DANCE; } PARAMETRIZE { move = MOVE_HAIL; } + PARAMETRIZE { move = MOVE_SNOWSCAPE; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; @@ -88,10 +92,14 @@ DOUBLE_BATTLE_TEST("Forecast transforms all Castforms present in weather") SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an ability") { + u32 species, ability; + PARAMETRIZE { species = SPECIES_KYOGRE; ability = ABILITY_DRIZZLE; } + PARAMETRIZE { species = SPECIES_GROUDON; ability = ABILITY_DROUGHT; } + PARAMETRIZE { species = SPECIES_ABOMASNOW; ability = ABILITY_SNOW_WARNING; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; OPPONENT(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_KYOGRE) { Ability(ABILITY_DRIZZLE); }; + OPPONENT(species) { Ability(ability); }; } WHEN { TURN { SWITCH(opponent, 1); } } SCENE { @@ -103,14 +111,17 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an ability") SINGLE_BATTLE_TEST("Forecast transforms Castform in primal weather") { + u32 species, item, ability; + PARAMETRIZE { species = SPECIES_KYOGRE; ability = ABILITY_PRIMORDIAL_SEA; item = ITEM_BLUE_ORB; } + PARAMETRIZE { species = SPECIES_GROUDON; ability = ABILITY_DESOLATE_LAND; item = ITEM_RED_ORB; } GIVEN { PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; OPPONENT(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_KYOGRE) { Ability(ABILITY_DRIZZLE); Item(ITEM_BLUE_ORB); }; + OPPONENT(species) { Item(item); }; } WHEN { TURN { SWITCH(opponent, 1); } } SCENE { - ABILITY_POPUP(opponent, ABILITY_PRIMORDIAL_SEA); + ABILITY_POPUP(opponent, ability); ABILITY_POPUP(player, ABILITY_FORECAST); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); MESSAGE("Castform transformed!"); @@ -161,6 +172,29 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when Sandstorm i } } +SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Air Lock") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_RAYQUAZA); + } WHEN { + TURN { MOVE(player, MOVE_RAIN_DANCE); } + TURN { SWITCH(opponent, 1); } + TURN { MOVE(opponent, MOVE_CELEBRATE, megaEvolve: TRUE); } + } SCENE { + // transforms + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + // back to normal + ABILITY_POPUP(opponent, ABILITY_AIR_LOCK); + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} + SINGLE_BATTLE_TEST("Forecast transforms Castform on switch-in") { GIVEN { @@ -199,3 +233,22 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform when weather changes") MESSAGE("Castform transformed!"); } } + +SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when its ability is suppressed") +{ + GIVEN { + PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SUNNY_DAY); } + TURN { MOVE(opponent, MOVE_GASTRO_ACID); } + } SCENE { + // transforms in sun + ABILITY_POPUP(player, ABILITY_FORECAST); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + // back to normal + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Castform transformed!"); + } +} From b269cc69060afda3e027eed2265f3fb5967232fc Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 16 May 2023 16:37:18 -0700 Subject: [PATCH 197/229] changed gastro acid check to properly use GetBattlerAbility --- src/battle_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 5fa5a27595..3f0e101f08 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10161,8 +10161,7 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) // Check if there is a required ability and if the battler's ability does not match it // or is suppressed. If so, revert to the no weather form. if (formChanges[i].param2 - && (gBattleMons[battlerId].ability != formChanges[i].param2 - || (gStatuses3[gBattlerTarget] & STATUS3_GASTRO_ACID)) + && GetBattlerAbility(battlerId) != formChanges[i].param2 && formChanges[i].param1 == B_WEATHER_NONE) { targetSpecies = formChanges[i].targetSpecies; From 7b087137072c220e06a5f11ffe59b3f3c6bfe5fd Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 16 May 2023 20:34:16 -0700 Subject: [PATCH 198/229] changed B_WEATHER_FORM_SUPPRESS config to preproc --- src/battle_script_commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cfb8c59651..c85446a343 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16605,14 +16605,15 @@ void BS_ItemRestorePP(void) void BS_TryRevertWeatherForm(void) { NATIVE_ARGS(); - if (B_WEATHER_FORM_SUPPRESS >= GEN_5 - && TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER)) +#if B_WEATHER_FORM_SUPPRESS >= GEN_5 + if (TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER)) { gBattleScripting.battler = gBattlerTarget; BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_TargetFormChangeWithStringNoPopup; return; } +#endif gBattlescriptCurrInstr = cmd->nextInstr; } From d22efc9a68efafd54debd153849f08169d86f581 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 16 May 2023 23:14:54 -0700 Subject: [PATCH 199/229] fixed UB with unassigned variable --- test/test_runner_battle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index cfe5db9d6e..d69f2125b4 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -402,7 +402,7 @@ const void *RandomElementArray(enum RandomTag tag, const void *array, size_t siz if (turn && turn->rng.tag == tag) { - u32 element; + u32 element = 0; for (index = 0; index < count; index++) { memcpy(&element, (const u8 *)array + size * index, size); From 487415e56bb7e0b552433d9b9cbdad49b02af41a Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Wed, 17 May 2023 11:22:23 -0400 Subject: [PATCH 200/229] Move direct statStage boosts to use statbuffchange (#3000) * fix double counting stat boosts for download, moxie beast boost etc * speed boost use statbuffchange * BattleScript_MoveStatDrain use statbuffchange * statbuffchange for rage --------- Co-authored-by: ghoulslash --- data/battle_scripts_1.s | 10 +++++++++- src/battle_script_commands.c | 6 +----- src/battle_util.c | 6 +----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2fe9c74ee6..54dce3448d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7173,8 +7173,10 @@ BattleScript_MistProtected:: return BattleScript_RageIsBuilding:: + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_RageIsBuildingEnd printstring STRINGID_PKMNRAGEBUILDING waitmessage B_WAIT_TIME_LONG +BattleScript_RageIsBuildingEnd: return BattleScript_MoveUsedIsDisabled:: @@ -8507,10 +8509,12 @@ BattleScript_AbilityPopUp: return BattleScript_SpeedBoostActivates:: + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SpeedBoostActivatesEnd call BattleScript_AbilityPopUp playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNRAISEDSPEED waitmessage B_WAIT_TIME_LONG +BattleScript_SpeedBoostActivatesEnd: end3 @ Can't compare directly to a value, have to compare to value at pointer @@ -9022,8 +9026,8 @@ BattleScript_MoveStatDrain:: setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 waitanimation -.if B_ABSORBING_ABILITY_STRING >= GEN_5 statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MoveStatDrain_Cont +.if B_ABSORBING_ABILITY_STRING >= GEN_5 printfromtable gStatUpStringIds waitmessage B_WAIT_TIME_LONG .else @@ -9303,6 +9307,7 @@ BattleScript_WeakArmorActivatesEnd: return BattleScript_RaiseStatOnFaintingTarget:: + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_RaiseStatOnFaintingTarget_End copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp setgraphicalstatchangevalues @@ -9310,9 +9315,11 @@ BattleScript_RaiseStatOnFaintingTarget:: waitanimation printstring STRINGID_LASTABILITYRAISEDSTAT waitmessage B_WAIT_TIME_LONG +BattleScript_RaiseStatOnFaintingTarget_End: return BattleScript_AttackerAbilityStatRaise:: + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackerAbilityStatRaise_End copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp setgraphicalstatchangevalues @@ -9320,6 +9327,7 @@ BattleScript_AttackerAbilityStatRaise:: waitanimation printstring STRINGID_ATTACKERABILITYSTATRAISE waitmessage B_WAIT_TIME_LONG +BattleScript_AttackerAbilityStatRaise_End: return BattleScript_FellStingerRaisesStat:: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 88a76adff1..2450e5079a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5582,7 +5582,7 @@ static void Cmd_moveend(void) && gBattleMoves[gCurrentMove].power != 0 && CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[gBattlerTarget].statStages[STAT_ATK]++; + SET_STATCHANGER(STAT_ATK, 1, FALSE); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_RageIsBuilding; effect = TRUE; @@ -9494,7 +9494,6 @@ static void Cmd_various(void) && !NoAliveMonsForEitherParty() && CompareStat(gBattlerAttacker, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[gBattlerAttacker].statStages[STAT_ATK]++; SET_STATCHANGER(STAT_ATK, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); BattleScriptPush(cmd->nextInstr); @@ -9518,7 +9517,6 @@ static void Cmd_various(void) && !NoAliveMonsForEitherParty() && CompareStat(gBattlerAttacker, STAT_SPATK, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[gBattlerAttacker].statStages[STAT_SPATK]++; SET_STATCHANGER(STAT_SPATK, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); BattleScriptPush(cmd->nextInstr); @@ -9570,7 +9568,6 @@ static void Cmd_various(void) && !NoAliveMonsForEitherParty() && CompareStat(gBattlerAttacker, i, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[gBattlerAttacker].statStages[i]++; SET_STATCHANGER(i, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, i); BattleScriptPush(cmd->nextInstr); @@ -9590,7 +9587,6 @@ static void Cmd_various(void) && !NoAliveMonsForEitherParty() && CompareStat(gBattleScripting.battler, STAT_SPATK, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[gBattleScripting.battler].statStages[STAT_SPATK]++; SET_STATCHANGER(STAT_SPATK, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); BattleScriptPushCursor(); diff --git a/src/battle_util.c b/src/battle_util.c index e089361a20..8678054bb9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4552,7 +4552,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (CompareStat(battler, statId, MAX_STAT_STAGE, CMP_LESS_THAN)) { - gBattleMons[battler].statStages[statId]++; SET_STATCHANGER(statId, 1, FALSE); gBattlerAttacker = battler; PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); @@ -4925,9 +4924,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_SPEED_BOOST: if (CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN) && gDisableStructs[battler].isFirstTurn != 2) { - gBattleMons[battler].statStages[STAT_SPEED]++; - gBattleScripting.animArg1 = 14 + STAT_SPEED; - gBattleScripting.animArg2 = 0; + SET_STATCHANGER(STAT_SPEED, 1, FALSE); BattleScriptPushCursorAndCallback(BattleScript_SpeedBoostActivates); gBattleScripting.battler = battler; effect++; @@ -5222,7 +5219,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move SET_STATCHANGER(statId, statAmount, FALSE); #if B_ABSORBING_ABILITY_STRING < GEN_5 - gBattleMons[battler].statStages[statId]++; PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); #endif } From 29d2d4202e5ab8af6d2ddb9ad840d11643320390 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 18 May 2023 07:39:14 -0300 Subject: [PATCH 201/229] Evolution updates (#3009) * Add Hisuian Sneasel's evolution to gEvolutionTable * Updates -Added EVO_ITEM_NIGHT, (it's like EVO_ITEM_DAY but nighttime specific) -Added EVO_ITEM_HOLD (it's like the day based variations, but day agnostic) -Turned the trade evo items into regular evolution items -Ditched the config for the Razor Claw by request -Updated every entry in gEvolutionTable for species that could only evolve via EVO_TRADE_ITEM to LA's standard * Review corrections (extrapolations) * Post Cherrypick corrections * Corrected the description of EVO_ITEM_NIGHT * Added a config for the new items' field-evolving functionality --- include/config/item.h | 1 + include/constants/pokemon.h | 4 +- src/data/items.h | 72 ++++++++++++++++++--------------- src/data/pokemon/evolution.h | 57 +++++++++++++++++--------- src/data/pokemon/item_effects.h | 16 ++++++++ src/pokemon.c | 13 ++++++ 6 files changed, 112 insertions(+), 51 deletions(-) diff --git a/include/config/item.h b/include/config/item.h index 88cfeeb7ce..1e174b5ff4 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -10,6 +10,7 @@ #define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8+, the Vitamins no longer have a cap of 100 EV per stat. #define I_BERRY_EV_JUMP GEN_LATEST // In Gen4 only, EV-lowering Berries lower a stat's EV to 100 if it is above 100. #define I_GRISEOUS_ORB_FORM_CHANGE GEN_LATEST // In Gen9+, the Griseous Orb no longer changes Giratina's form when held. +#define I_USE_EVO_HELD_ITEMS_FROM_BAG FALSE // If TRUE, items such as Razor Claw or Electirizer will be usable from the bag to evolve a Pokémon just like in LA. // TM config #define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1. diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 504a94ea3d..7c395b4964 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -312,7 +312,9 @@ #define EVO_SCRIPT_TRIGGER_DMG 36 // Pokémon has specified HP below max, then player interacts trigger #define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness #define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters -#define EVO_ITEM_NIGHT 39 // specified item is used on Pokémon at night +#define EVO_ITEM_NIGHT 39 // specified item is used on Pokémon, is night +#define EVO_ITEM_DAY 40 // specified item is used on Pokémon, is day +#define EVO_ITEM_HOLD 41 // Pokémon levels up, holds specified item #define EVOS_PER_MON 10 diff --git a/src/data/items.h b/src/data/items.h index ae6e35d654..a309925aad 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1,3 +1,11 @@ +#if I_USE_EVO_HELD_ITEMS_FROM_BAG == TRUE + #define EVO_HELD_ITEM_TYPE ITEM_USE_PARTY_MENU + #define EVO_HELD_ITEM_FIELD_FUNC ItemUseOutOfBattle_EvolutionStone +#else + #define EVO_HELD_ITEM_TYPE ITEM_USE_BAG_MENU + #define EVO_HELD_ITEM_FIELD_FUNC ItemUseOutOfBattle_CannotUse +#endif + const struct Item gItems[] = { [ITEM_NONE] = @@ -2890,8 +2898,8 @@ const struct Item gItems[] = .holdEffectParam = 10, .description = sDragonScaleDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -2903,8 +2911,8 @@ const struct Item gItems[] = .holdEffect = HOLD_EFFECT_UPGRADE, .description = sUpgradeDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -2915,8 +2923,8 @@ const struct Item gItems[] = .price = 2000, .description = sProtectorDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -2927,8 +2935,8 @@ const struct Item gItems[] = .price = 2000, .description = sElectirizerDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -2939,8 +2947,8 @@ const struct Item gItems[] = .price = 2000, .description = sMagmarizerDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -2951,8 +2959,8 @@ const struct Item gItems[] = .price = 2000, .description = sDubiousDiscDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 50, }, @@ -2963,8 +2971,8 @@ const struct Item gItems[] = .price = 2000, .description = sReaperClothDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 10, }, @@ -2975,8 +2983,8 @@ const struct Item gItems[] = .price = 2000, .description = sPrismScaleDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -2987,8 +2995,8 @@ const struct Item gItems[] = .price = 2000, .description = sWhippedDreamDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -2999,8 +3007,8 @@ const struct Item gItems[] = .price = 2000, .description = sSachetDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -3011,8 +3019,8 @@ const struct Item gItems[] = .price = 2000, .description = sOvalStoneDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, @@ -5199,8 +5207,8 @@ const struct Item gItems[] = .holdEffect = HOLD_EFFECT_DEEP_SEA_SCALE, .description = sDeepSeaScaleDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -5212,8 +5220,8 @@ const struct Item gItems[] = .holdEffect = HOLD_EFFECT_DEEP_SEA_TOOTH, .description = sDeepSeaToothDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 90, }, @@ -5806,8 +5814,8 @@ const struct Item gItems[] = .holdEffectParam = 20, .description = sMetalCoatDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -6141,8 +6149,8 @@ const struct Item gItems[] = .holdEffectParam = 10, .description = sKingsRockDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 30, }, @@ -6503,8 +6511,8 @@ const struct Item gItems[] = .holdEffect = HOLD_EFFECT_SCOPE_LENS, .description = sRazorClawDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .type = EVO_HELD_ITEM_TYPE, + .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, .flingPower = 80, }, diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 86ef6dbe50..b9a00d6ed6 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -39,7 +39,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_GROWLITHE] = {{EVO_ITEM, ITEM_FIRE_STONE, SPECIES_ARCANINE}}, [SPECIES_POLIWAG] = {{EVO_LEVEL, 25, SPECIES_POLIWHIRL}}, [SPECIES_POLIWHIRL] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_POLIWRATH}, - {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_POLITOED}}, + {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_POLITOED}, + {EVO_ITEM, ITEM_KINGS_ROCK, SPECIES_POLITOED}}, [SPECIES_ABRA] = {{EVO_LEVEL, 16, SPECIES_KADABRA}}, [SPECIES_KADABRA] = {{EVO_TRADE, 0, SPECIES_ALAKAZAM}, {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_ALAKAZAM}}, @@ -54,7 +55,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOLEM}}, [SPECIES_PONYTA] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH}}, [SPECIES_SLOWPOKE] = {{EVO_LEVEL, 37, SPECIES_SLOWBRO}, - {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_SLOWKING}}, + {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_SLOWKING}, + {EVO_ITEM, ITEM_KINGS_ROCK, SPECIES_SLOWKING}}, [SPECIES_MAGNEMITE] = {{EVO_LEVEL, 30, SPECIES_MAGNETON}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_MAGNETON] = {{EVO_MAPSEC, MAPSEC_NEW_MAUVILLE, SPECIES_MAGNEZONE}, @@ -67,7 +69,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_GASTLY] = {{EVO_LEVEL, 25, SPECIES_HAUNTER}}, [SPECIES_HAUNTER] = {{EVO_TRADE, 0, SPECIES_GENGAR}, {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GENGAR}}, - [SPECIES_ONIX] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_STEELIX}}, + [SPECIES_ONIX] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_STEELIX}, + {EVO_ITEM, ITEM_METAL_COAT, SPECIES_STEELIX}}, [SPECIES_DROWZEE] = {{EVO_LEVEL, 26, SPECIES_HYPNO}}, [SPECIES_KRABBY] = {{EVO_LEVEL, 28, SPECIES_KINGLER}}, [SPECIES_VOLTORB] = {{EVO_LEVEL, 30, SPECIES_ELECTRODE}}, @@ -81,21 +84,26 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_KOFFING] = {{EVO_LEVEL, 35, SPECIES_WEEZING}}, [SPECIES_RHYHORN] = {{EVO_LEVEL, 42, SPECIES_RHYDON}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_RHYDON] = {{EVO_TRADE_ITEM, ITEM_PROTECTOR, SPECIES_RHYPERIOR}}, + [SPECIES_RHYDON] = {{EVO_TRADE_ITEM, ITEM_PROTECTOR, SPECIES_RHYPERIOR}, + {EVO_ITEM, ITEM_PROTECTOR, SPECIES_RHYPERIOR}}, #endif [SPECIES_CHANSEY] = {{EVO_FRIENDSHIP, 0, SPECIES_BLISSEY}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_TANGELA] = {{EVO_MOVE, MOVE_ANCIENT_POWER, SPECIES_TANGROWTH}}, #endif [SPECIES_HORSEA] = {{EVO_LEVEL, 32, SPECIES_SEADRA}}, - [SPECIES_SEADRA] = {{EVO_TRADE_ITEM, ITEM_DRAGON_SCALE, SPECIES_KINGDRA}}, + [SPECIES_SEADRA] = {{EVO_TRADE_ITEM, ITEM_DRAGON_SCALE, SPECIES_KINGDRA}, + {EVO_ITEM, ITEM_DRAGON_SCALE, SPECIES_KINGDRA}}, [SPECIES_GOLDEEN] = {{EVO_LEVEL, 33, SPECIES_SEAKING}}, [SPECIES_STARYU] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_STARMIE}}, [SPECIES_SCYTHER] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_SCIZOR}, - {EVO_ITEM, ITEM_BLACK_AUGURITE, SPECIES_KLEAVOR}}, + {EVO_ITEM, ITEM_BLACK_AUGURITE, SPECIES_KLEAVOR}, + {EVO_ITEM, ITEM_METAL_COAT, SPECIES_SCIZOR}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_ELECTABUZZ] = {{EVO_TRADE_ITEM, ITEM_ELECTIRIZER, SPECIES_ELECTIVIRE}}, - [SPECIES_MAGMAR] = {{EVO_TRADE_ITEM, ITEM_MAGMARIZER, SPECIES_MAGMORTAR}}, + [SPECIES_ELECTABUZZ] = {{EVO_TRADE_ITEM, ITEM_ELECTIRIZER, SPECIES_ELECTIVIRE}, + {EVO_ITEM, ITEM_ELECTIRIZER, SPECIES_ELECTIVIRE}}, + [SPECIES_MAGMAR] = {{EVO_TRADE_ITEM, ITEM_MAGMARIZER, SPECIES_MAGMORTAR}, + {EVO_ITEM, ITEM_MAGMARIZER, SPECIES_MAGMORTAR}}, #endif [SPECIES_MAGIKARP] = {{EVO_LEVEL, 20, SPECIES_GYARADOS}}, [SPECIES_EEVEE] = {{EVO_ITEM, ITEM_THUNDER_STONE, SPECIES_JOLTEON}, @@ -113,7 +121,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_MOVE_TYPE, TYPE_FAIRY, SPECIES_SYLVEON} #endif }, - [SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2}}, + [SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2}, + {EVO_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2}}, [SPECIES_OMANYTE] = {{EVO_LEVEL, 40, SPECIES_OMASTAR}}, [SPECIES_KABUTO] = {{EVO_LEVEL, 40, SPECIES_KABUTOPS}}, [SPECIES_DRATINI] = {{EVO_LEVEL, 30, SPECIES_DRAGONAIR}}, @@ -154,11 +163,13 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #endif [SPECIES_PINECO] = {{EVO_LEVEL, 31, SPECIES_FORRETRESS}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_GLIGAR] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_FANG, SPECIES_GLISCOR}}, + [SPECIES_GLIGAR] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_FANG, SPECIES_GLISCOR}, + {EVO_ITEM_NIGHT, ITEM_RAZOR_FANG, SPECIES_GLISCOR}}, #endif [SPECIES_SNUBBULL] = {{EVO_LEVEL, 23, SPECIES_GRANBULL}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_SNEASEL] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_CLAW, SPECIES_WEAVILE}}, + [SPECIES_SNEASEL] = {{EVO_ITEM_HOLD_NIGHT, ITEM_RAZOR_CLAW, SPECIES_WEAVILE}, + {EVO_ITEM_NIGHT, ITEM_RAZOR_CLAW, SPECIES_WEAVILE}}, #endif [SPECIES_TEDDIURSA] = {{EVO_LEVEL, 30, SPECIES_URSARING}}, [SPECIES_SLUGMA] = {{EVO_LEVEL, 38, SPECIES_MAGCARGO}}, @@ -170,7 +181,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_HOUNDOUR] = {{EVO_LEVEL, 24, SPECIES_HOUNDOOM}}, [SPECIES_PHANPY] = {{EVO_LEVEL, 25, SPECIES_DONPHAN}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_PORYGON2] = {{EVO_TRADE_ITEM, ITEM_DUBIOUS_DISC, SPECIES_PORYGON_Z}}, + [SPECIES_PORYGON2] = {{EVO_TRADE_ITEM, ITEM_DUBIOUS_DISC, SPECIES_PORYGON_Z}, + {EVO_ITEM, ITEM_DUBIOUS_DISC, SPECIES_PORYGON_Z}}, #endif [SPECIES_TYROGUE] = {{EVO_LEVEL_ATK_LT_DEF, 20, SPECIES_HITMONCHAN}, {EVO_LEVEL_ATK_GT_DEF, 20, SPECIES_HITMONLEE}, @@ -211,7 +223,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_BARBOACH] = {{EVO_LEVEL, 30, SPECIES_WHISCASH}}, [SPECIES_CORPHISH] = {{EVO_LEVEL, 30, SPECIES_CRAWDAUNT}}, [SPECIES_FEEBAS] = {{EVO_BEAUTY, 170, SPECIES_MILOTIC}, - {EVO_TRADE_ITEM, ITEM_PRISM_SCALE, SPECIES_MILOTIC}}, + {EVO_TRADE_ITEM, ITEM_PRISM_SCALE, SPECIES_MILOTIC}, + {EVO_ITEM, ITEM_PRISM_SCALE, SPECIES_MILOTIC}}, [SPECIES_CARVANHA] = {{EVO_LEVEL, 30, SPECIES_SHARPEDO}}, [SPECIES_TRAPINCH] = {{EVO_LEVEL, 35, SPECIES_VIBRAVA}}, [SPECIES_VIBRAVA] = {{EVO_LEVEL, 45, SPECIES_FLYGON}}, @@ -233,7 +246,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_WYNAUT] = {{EVO_LEVEL, 15, SPECIES_WOBBUFFET}}, [SPECIES_DUSKULL] = {{EVO_LEVEL, 37, SPECIES_DUSCLOPS}}, #if P_GEN_4_POKEMON == TRUE - [SPECIES_DUSCLOPS] = {{EVO_TRADE_ITEM, ITEM_REAPER_CLOTH, SPECIES_DUSKNOIR}}, + [SPECIES_DUSCLOPS] = {{EVO_TRADE_ITEM, ITEM_REAPER_CLOTH, SPECIES_DUSKNOIR}, + {EVO_ITEM, ITEM_REAPER_CLOTH, SPECIES_DUSKNOIR}}, [SPECIES_ROSELIA] = {{EVO_ITEM, ITEM_SHINY_STONE, SPECIES_ROSERADE}}, #endif [SPECIES_SLAKOTH] = {{EVO_LEVEL, 18, SPECIES_VIGOROTH}}, @@ -242,7 +256,9 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_WHISMUR] = {{EVO_LEVEL, 20, SPECIES_LOUDRED}}, [SPECIES_LOUDRED] = {{EVO_LEVEL, 40, SPECIES_EXPLOUD}}, [SPECIES_CLAMPERL] = {{EVO_TRADE_ITEM, ITEM_DEEP_SEA_TOOTH, SPECIES_HUNTAIL}, - {EVO_TRADE_ITEM, ITEM_DEEP_SEA_SCALE, SPECIES_GOREBYSS}}, + {EVO_TRADE_ITEM, ITEM_DEEP_SEA_SCALE, SPECIES_GOREBYSS}, + {EVO_ITEM, ITEM_DEEP_SEA_TOOTH, SPECIES_HUNTAIL}, + {EVO_ITEM, ITEM_DEEP_SEA_SCALE, SPECIES_GOREBYSS}}, [SPECIES_SHUPPET] = {{EVO_LEVEL, 37, SPECIES_BANETTE}}, [SPECIES_ARON] = {{EVO_LEVEL, 32, SPECIES_LAIRON}}, [SPECIES_LAIRON] = {{EVO_LEVEL, 42, SPECIES_AGGRON}}, @@ -289,7 +305,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_BRONZOR] = {{EVO_LEVEL, 33, SPECIES_BRONZONG}}, [SPECIES_BONSLY] = {{EVO_MOVE, MOVE_MIMIC, SPECIES_SUDOWOODO}}, [SPECIES_MIME_JR] = {{EVO_MOVE, MOVE_MIMIC, SPECIES_MR_MIME}}, - [SPECIES_HAPPINY] = {{EVO_ITEM_HOLD_DAY, ITEM_OVAL_STONE, SPECIES_CHANSEY}}, + [SPECIES_HAPPINY] = {{EVO_ITEM_HOLD_DAY, ITEM_OVAL_STONE, SPECIES_CHANSEY}, + {EVO_ITEM_DAY, ITEM_OVAL_STONE, SPECIES_CHANSEY}}, [SPECIES_GIBLE] = {{EVO_LEVEL, 24, SPECIES_GABITE}}, [SPECIES_GABITE] = {{EVO_LEVEL, 48, SPECIES_GARCHOMP}}, [SPECIES_MUNCHLAX] = {{EVO_FRIENDSHIP, 0, SPECIES_SNORLAX}}, @@ -400,8 +417,10 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_LEVEL_FEMALE, 25, SPECIES_MEOWSTIC_FEMALE}}, [SPECIES_HONEDGE] = {{EVO_LEVEL, 35, SPECIES_DOUBLADE}}, [SPECIES_DOUBLADE] = {{EVO_ITEM, ITEM_DUSK_STONE, SPECIES_AEGISLASH}}, - [SPECIES_SPRITZEE] = {{EVO_TRADE_ITEM, ITEM_SACHET, SPECIES_AROMATISSE}}, - [SPECIES_SWIRLIX] = {{EVO_TRADE_ITEM, ITEM_WHIPPED_DREAM, SPECIES_SLURPUFF}}, + [SPECIES_SPRITZEE] = {{EVO_TRADE_ITEM, ITEM_SACHET, SPECIES_AROMATISSE}, + {EVO_ITEM, ITEM_SACHET, SPECIES_AROMATISSE}}, + [SPECIES_SWIRLIX] = {{EVO_TRADE_ITEM, ITEM_WHIPPED_DREAM, SPECIES_SLURPUFF}, + {EVO_ITEM, ITEM_WHIPPED_DREAM, SPECIES_SLURPUFF}}, [SPECIES_INKAY] = {{EVO_LEVEL, 30, SPECIES_MALAMAR}}, [SPECIES_BINACLE] = {{EVO_LEVEL, 39, SPECIES_BARBARACLE}}, [SPECIES_SKRELP] = {{EVO_LEVEL, 48, SPECIES_DRAGALGE}}, @@ -565,5 +584,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = #if P_GEN_8_POKEMON == TRUE [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_CHIPPED_POT, SPECIES_POLTEAGEIST_ANTIQUE}}, [SPECIES_URSARING] = {{EVO_ITEM_NIGHT, ITEM_PEAT_BLOCK, SPECIES_URSALUNA}}, + [SPECIES_SNEASEL_HISUIAN] = {{EVO_ITEM_DAY, ITEM_RAZOR_CLAW, SPECIES_SNEASLER}, + {EVO_ITEM_HOLD_DAY, ITEM_RAZOR_CLAW, SPECIES_SNEASLER}}, #endif }; diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 087c6db0c2..d7482d5043 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -550,6 +550,22 @@ const u8 *const gItemEffectTable[ITEMS_COUNT] = [ITEM_CHIPPED_POT] = gItemEffect_EvoItem, [ITEM_GALARICA_CUFF] = gItemEffect_EvoItem, [ITEM_GALARICA_WREATH] = gItemEffect_EvoItem, + [ITEM_DRAGON_SCALE] = gItemEffect_EvoItem, + [ITEM_UPGRADE] = gItemEffect_EvoItem, + [ITEM_PROTECTOR] = gItemEffect_EvoItem, + [ITEM_ELECTIRIZER] = gItemEffect_EvoItem, + [ITEM_MAGMARIZER] = gItemEffect_EvoItem, + [ITEM_DUBIOUS_DISC] = gItemEffect_EvoItem, + [ITEM_REAPER_CLOTH] = gItemEffect_EvoItem, + [ITEM_PRISM_SCALE] = gItemEffect_EvoItem, + [ITEM_WHIPPED_DREAM] = gItemEffect_EvoItem, + [ITEM_SACHET] = gItemEffect_EvoItem, + [ITEM_OVAL_STONE] = gItemEffect_EvoItem, + [ITEM_DEEP_SEA_SCALE] = gItemEffect_EvoItem, + [ITEM_DEEP_SEA_TOOTH] = gItemEffect_EvoItem, + [ITEM_METAL_COAT] = gItemEffect_EvoItem, + [ITEM_KINGS_ROCK] = gItemEffect_EvoItem, + [ITEM_RAZOR_CLAW] = gItemEffect_EvoItem, [ITEM_AUSPICIOUS_ARMOR] = gItemEffect_EvoItem, [ITEM_MALICIOUS_ARMOR] = gItemEffect_EvoItem, [ITEM_SCROLL_OF_DARKNESS] = gItemEffect_EvoItem, diff --git a/src/pokemon.c b/src/pokemon.c index cfcbcce532..7bd4e19b39 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6598,6 +6598,14 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s } } break; + case EVO_ITEM_HOLD: + if (heldItem == gEvolutionTable[species][i].param) + { + heldItem = 0; + SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); + targetSpecies = gEvolutionTable[species][i].targetSpecies; + } + break; } } break; @@ -6647,6 +6655,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param == evolutionItem) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; + case EVO_ITEM_DAY: + RtcCalcLocalTime(); + if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && gEvolutionTable[species][i].param == evolutionItem) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; } } break; From 9506b205e6194b9417c8bbbb02cdbbed2c70c99b Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Sat, 20 May 2023 05:25:59 -0700 Subject: [PATCH 202/229] Changed 999999 in MaxMoney to MAX_MONEY constant (#3015) --- include/money.h | 2 ++ src/debug.c | 2 +- src/money.c | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/money.h b/include/money.h index e7a8379787..211f9caa2e 100644 --- a/include/money.h +++ b/include/money.h @@ -1,6 +1,8 @@ #ifndef GUARD_MONEY_H #define GUARD_MONEY_H +#define MAX_MONEY 999999 + u32 GetMoney(u32 *moneyPtr); void SetMoney(u32 *moneyPtr, u32 newValue); bool8 IsEnoughMoney(u32 *moneyPtr, u32 cost); diff --git a/src/debug.c b/src/debug.c index 8fff84d57d..cd7f58e6d2 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2758,7 +2758,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu static void DebugAction_Give_MaxMoney(u8 taskId) { - SetMoney(&gSaveBlock1Ptr->money, 999999); + SetMoney(&gSaveBlock1Ptr->money, MAX_MONEY); } static void DebugAction_Give_MaxCoins(u8 taskId) diff --git a/src/money.c b/src/money.c index 88e1fea640..321f882ff6 100644 --- a/src/money.c +++ b/src/money.c @@ -10,8 +10,6 @@ #include "strings.h" #include "decompress.h" -#define MAX_MONEY 999999 - EWRAM_DATA static u8 sMoneyBoxWindowId = 0; EWRAM_DATA static u8 sMoneyLabelSpriteId = 0; From a0881b8e8d38a9e0cd4cfb2bb7f56b50f0c07077 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sat, 20 May 2023 17:10:45 +0200 Subject: [PATCH 203/229] Terrains freeze the game after player mon faints (#3016) --- src/battle_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 8678054bb9..2856eece7c 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2056,6 +2056,8 @@ static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId) { if (gFieldStatuses & terrainFlag) { + if (terrainFlag & STATUS_FIELD_GRASSY_TERRAIN) + BattleScriptExecute(BattleScript_GrassyTerrainHeals); if (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0) { gFieldStatuses &= ~terrainFlag; @@ -2065,10 +2067,8 @@ static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId) gBattleCommunication[MULTISTRING_CHOOSER] = stringTableId; BattleScriptExecute(BattleScript_TerrainEnds); } + return TRUE; } - if (terrainFlag & STATUS_FIELD_GRASSY_TERRAIN) - BattleScriptExecute(BattleScript_GrassyTerrainHeals); - return TRUE; } return FALSE; } @@ -6807,7 +6807,7 @@ static bool32 GetMentalHerbEffect(u8 battlerId) static u8 TryConsumeMirrorHerb(u8 battlerId, bool32 execute) { u8 effect = 0; - + if (gProtectStructs[battlerId].eatMirrorHerb) { gLastUsedItem = gBattleMons[battlerId].item; gBattleScripting.savedBattler = gBattlerAttacker; From 580a09e3674a649a228430996b20b00edc69240e Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 20 May 2023 15:27:55 -0300 Subject: [PATCH 204/229] Updated DebugAction_Util_CheckSaveBlock --- data/scripts/debug.inc | 19 +++++++++++++++++++ src/debug.c | 35 +++++++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 92e9062a39..f86de38f5b 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -90,3 +90,22 @@ Debug_Script_7:: Debug_Script_8:: end + +Debug_CheckSaveBlock:: + callnative CheckSaveBlock1Size + msgbox Debug_SaveBlock1Size, MSGBOX_DEFAULT + callnative CheckSaveBlock2Size + msgbox Debug_SaveBlock2Size, MSGBOX_DEFAULT + callnative CheckPokemonStorageSize + msgbox Debug_PokemonStorageSize, MSGBOX_DEFAULT + release + end + +Debug_SaveBlock1Size:: + .string "SaveBlock1 size: {STR_VAR_1}/{STR_VAR_2}.$" + +Debug_SaveBlock2Size:: + .string "SaveBlock2 size: {STR_VAR_1}/{STR_VAR_2}.$" + +Debug_PokemonStorageSize:: + .string "{PKMN}Storage size: {STR_VAR_1}/{STR_VAR_2}.$" diff --git a/src/debug.c b/src/debug.c index cd7f58e6d2..7eda7d973e 100644 --- a/src/debug.c +++ b/src/debug.c @@ -57,6 +57,7 @@ #include "constants/songs.h" #include "constants/species.h" #include "constants/weather.h" +#include "save.h" #if DEBUG_OVERWORLD_MENU == TRUE // ******************************* @@ -292,6 +293,7 @@ extern u8 Debug_ShowFieldMessageStringVar4[]; extern u8 Debug_CheatStart[]; extern u8 PlayersHouse_2F_EventScript_SetWallClock[]; extern u8 PlayersHouse_2F_EventScript_CheckWallClock[]; +extern u8 Debug_CheckSaveBlock[]; #include "data/map_group_count.h" @@ -1165,18 +1167,35 @@ static void DebugAction_Util_PoisonMons(u8 taskId) PlaySE(SE_FIELD_POISON); } +void CheckSaveBlock1Size(void) +{ + u32 currSb1Size = sizeof(struct SaveBlock1); + u32 maxSb1Size = SECTOR_DATA_SIZE * (SECTOR_ID_SAVEBLOCK1_END - SECTOR_ID_SAVEBLOCK1_START + 1); + ConvertIntToDecimalStringN(gStringVar1, currSb1Size, STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar2, maxSb1Size, STR_CONV_MODE_LEFT_ALIGN, 6); +} + +void CheckSaveBlock2Size(void) +{ + u32 currSb2Size = (sizeof(struct SaveBlock2)); + u32 maxSb2Size = SECTOR_DATA_SIZE; + ConvertIntToDecimalStringN(gStringVar1, currSb2Size, STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar2, maxSb2Size, STR_CONV_MODE_LEFT_ALIGN, 6); +} + +void CheckPokemonStorageSize(void) +{ + u32 currPkmnStorageSize = sizeof(struct PokemonStorage); + u32 maxPkmnStorageSize = SECTOR_DATA_SIZE * (SECTOR_ID_PKMN_STORAGE_END - SECTOR_ID_PKMN_STORAGE_START + 1); + ConvertIntToDecimalStringN(gStringVar1, currPkmnStorageSize, STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar2, maxPkmnStorageSize, STR_CONV_MODE_LEFT_ALIGN, 6); +} + static void DebugAction_Util_CheckSaveBlock(u8 taskId) { - static const u8 sDebugText_SaveBlockSize[] = _("SaveBlock1 is {STR_VAR_1} bytes long.\nMax size is 15872 bytes.\pSaveBlock2 is {STR_VAR_2} bytes long.\nMax size is 3968 bytes.\pPokemonStorage is {STR_VAR_3} bytes long.\nMax size is 35712 bytes."); - - ConvertIntToDecimalStringN(gStringVar1, sizeof(struct SaveBlock1), STR_CONV_MODE_LEFT_ALIGN, 6); - ConvertIntToDecimalStringN(gStringVar2, sizeof(struct SaveBlock2), STR_CONV_MODE_LEFT_ALIGN, 6); - ConvertIntToDecimalStringN(gStringVar3, sizeof(struct PokemonStorage), STR_CONV_MODE_LEFT_ALIGN, 6); - StringExpandPlaceholders(gStringVar4, sDebugText_SaveBlockSize); - Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_ShowFieldMessageStringVar4); + ScriptContext_SetupScript(Debug_CheckSaveBlock); } static const u8 sWeatherNames[22][24] = { From 109b4c4f6ce8c1c1e9e7687957a67c119145874b Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sat, 20 May 2023 21:58:55 +0200 Subject: [PATCH 205/229] Small clean up: EndTurnTerrain, BattleScript_GrassyTerrainHeals (#3018) remove leftover --- data/battle_scripts_1.s | 3 --- src/battle_util.c | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 54dce3448d..8c8e1ff0d8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6975,8 +6975,6 @@ BattleScript_TerrainEnds_Ret:: playanimation BS_ATTACKER, B_ANIM_RESTORE_BG return -BattleScript_GrassyTerrainEnds: - setbyte cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_GRASS BattleScript_TerrainEnds:: call BattleScript_TerrainEnds_Ret end2 @@ -9166,7 +9164,6 @@ BattleScript_GrassyTerrainLoopIncrement:: BattleScript_GrassyTerrainLoopEnd:: bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE jumpifword CMP_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_PERMANENT, BattleScript_GrassyTerrainHealEnd - jumpifbyte CMP_EQUAL, gFieldTimers + 5, 0, BattleScript_GrassyTerrainEnds BattleScript_GrassyTerrainHealEnd: end2 diff --git a/src/battle_util.c b/src/battle_util.c index 2856eece7c..975921c969 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2062,11 +2062,8 @@ static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId) { gFieldStatuses &= ~terrainFlag; TryToRevertMimicry(); - if (!(terrainFlag & STATUS_FIELD_GRASSY_TERRAIN)) - { - gBattleCommunication[MULTISTRING_CHOOSER] = stringTableId; - BattleScriptExecute(BattleScript_TerrainEnds); - } + gBattleCommunication[MULTISTRING_CHOOSER] = stringTableId; + BattleScriptExecute(BattleScript_TerrainEnds); return TRUE; } } From 12022fa0f61f820fd0a1a2d507c287f857d4a387 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sat, 20 May 2023 15:56:23 -0700 Subject: [PATCH 206/229] Gen 4-6 Pokemon Back anims (#2954) --- src/pokemon_animation.c | 1280 +++++++++++++++++++++++++++------------ 1 file changed, 894 insertions(+), 386 deletions(-) diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index c7518ba23e..e0847233e5 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -215,392 +215,900 @@ static bool32 sIsSummaryAnim; static const u8 sSpeciesToBackAnimSet[NUM_SPECIES] = { - [SPECIES_BULBASAUR] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_IVYSAUR] = BACK_ANIM_H_SLIDE, - [SPECIES_VENUSAUR] = BACK_ANIM_H_SHAKE, - [SPECIES_CHARMANDER] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_CHARMELEON] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_CHARIZARD] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_SQUIRTLE] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_WARTORTLE] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_BLASTOISE] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_CATERPIE] = BACK_ANIM_H_SLIDE, - [SPECIES_METAPOD] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_BUTTERFREE] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_WEEDLE] = BACK_ANIM_H_SLIDE, - [SPECIES_KAKUNA] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_BEEDRILL] = BACK_ANIM_H_VIBRATE, - [SPECIES_PIDGEY] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_PIDGEOTTO] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_PIDGEOT] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_RATTATA] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_RATICATE] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_SPEAROW] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_FEAROW] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_EKANS] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_ARBOK] = BACK_ANIM_V_SHAKE, - [SPECIES_PIKACHU] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_RAICHU] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_SANDSHREW] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_SANDSLASH] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_NIDORAN_F] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_NIDORINA] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_NIDOQUEEN] = BACK_ANIM_V_SHAKE, - [SPECIES_NIDORAN_M] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_NIDORINO] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_NIDOKING] = BACK_ANIM_V_SHAKE, - [SPECIES_CLEFAIRY] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_CLEFABLE] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_VULPIX] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_NINETALES] = BACK_ANIM_H_VIBRATE, - [SPECIES_JIGGLYPUFF] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_WIGGLYTUFF] = BACK_ANIM_GROW, - [SPECIES_ZUBAT] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_GOLBAT] = BACK_ANIM_V_SHAKE, - [SPECIES_ODDISH] = BACK_ANIM_H_SLIDE, - [SPECIES_GLOOM] = BACK_ANIM_H_SLIDE, - [SPECIES_VILEPLUME] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_PARAS] = BACK_ANIM_H_SLIDE, - [SPECIES_PARASECT] = BACK_ANIM_H_SHAKE, - [SPECIES_VENONAT] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_VENOMOTH] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_DIGLETT] = BACK_ANIM_V_SHAKE, - [SPECIES_DUGTRIO] = BACK_ANIM_V_SHAKE, - [SPECIES_MEOWTH] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_PERSIAN] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_PSYDUCK] = BACK_ANIM_H_SLIDE, - [SPECIES_GOLDUCK] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_MANKEY] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_PRIMEAPE] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_GROWLITHE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_ARCANINE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_POLIWAG] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_POLIWHIRL] = BACK_ANIM_V_SHAKE, - [SPECIES_POLIWRATH] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_ABRA] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_KADABRA] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_ALAKAZAM] = BACK_ANIM_GROW_STUTTER, - [SPECIES_MACHOP] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_MACHOKE] = BACK_ANIM_V_SHAKE, - [SPECIES_MACHAMP] = BACK_ANIM_V_SHAKE, - [SPECIES_BELLSPROUT] = BACK_ANIM_V_STRETCH, - [SPECIES_WEEPINBELL] = BACK_ANIM_V_STRETCH, - [SPECIES_VICTREEBEL] = BACK_ANIM_V_STRETCH, - [SPECIES_TENTACOOL] = BACK_ANIM_H_SLIDE, - [SPECIES_TENTACRUEL] = BACK_ANIM_H_SLIDE, - [SPECIES_GEODUDE] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_GRAVELER] = BACK_ANIM_H_SHAKE, - [SPECIES_GOLEM] = BACK_ANIM_H_SHAKE, - [SPECIES_PONYTA] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_RAPIDASH] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SLOWPOKE] = BACK_ANIM_H_SLIDE, - [SPECIES_SLOWBRO] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_MAGNEMITE] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_MAGNETON] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_FARFETCHD] = BACK_ANIM_H_SLIDE, - [SPECIES_DODUO] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_DODRIO] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SEEL] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_DEWGONG] = BACK_ANIM_H_SLIDE, - [SPECIES_GRIMER] = BACK_ANIM_V_STRETCH, - [SPECIES_MUK] = BACK_ANIM_H_STRETCH, - [SPECIES_SHELLDER] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_CLOYSTER] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_GASTLY] = BACK_ANIM_H_VIBRATE, - [SPECIES_HAUNTER] = BACK_ANIM_H_VIBRATE, - [SPECIES_GENGAR] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_ONIX] = BACK_ANIM_V_SHAKE, - [SPECIES_DROWZEE] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_HYPNO] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_KRABBY] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_KINGLER] = BACK_ANIM_V_SHAKE, - [SPECIES_VOLTORB] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_ELECTRODE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_EXEGGCUTE] = BACK_ANIM_H_SLIDE, - [SPECIES_EXEGGUTOR] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_CUBONE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_MAROWAK] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_HITMONLEE] = BACK_ANIM_H_SLIDE, - [SPECIES_HITMONCHAN] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_LICKITUNG] = BACK_ANIM_H_SLIDE, - [SPECIES_KOFFING] = BACK_ANIM_GROW, - [SPECIES_WEEZING] = BACK_ANIM_GROW, - [SPECIES_RHYHORN] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_RHYDON] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_CHANSEY] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_TANGELA] = BACK_ANIM_V_STRETCH, - [SPECIES_KANGASKHAN] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_HORSEA] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SEADRA] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_GOLDEEN] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_SEAKING] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_STARYU] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_STARMIE] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_MR_MIME] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_SCYTHER] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_JYNX] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_ELECTABUZZ] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_MAGMAR] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_PINSIR] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_TAUROS] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_MAGIKARP] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_GYARADOS] = BACK_ANIM_V_SHAKE, - [SPECIES_LAPRAS] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_DITTO] = BACK_ANIM_SHRINK_GROW, - [SPECIES_EEVEE] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_VAPOREON] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_JOLTEON] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_FLAREON] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_PORYGON] = BACK_ANIM_H_VIBRATE, - [SPECIES_OMANYTE] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_OMASTAR] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_KABUTO] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_KABUTOPS] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_AERODACTYL] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SNORLAX] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_ARTICUNO] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_ZAPDOS] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_MOLTRES] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_DRATINI] = BACK_ANIM_H_SLIDE, - [SPECIES_DRAGONAIR] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_DRAGONITE] = BACK_ANIM_V_SHAKE, - [SPECIES_MEWTWO] = BACK_ANIM_GROW_STUTTER, - [SPECIES_MEW] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_CHIKORITA] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_BAYLEEF] = BACK_ANIM_H_SLIDE, - [SPECIES_MEGANIUM] = BACK_ANIM_V_SHAKE, - [SPECIES_CYNDAQUIL] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_QUILAVA] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_TYPHLOSION] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_TOTODILE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_CROCONAW] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_FERALIGATR] = BACK_ANIM_V_SHAKE, - [SPECIES_SENTRET] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_FURRET] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_HOOTHOOT] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_NOCTOWL] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_LEDYBA] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_LEDIAN] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_SPINARAK] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_ARIADOS] = BACK_ANIM_H_SLIDE, - [SPECIES_CROBAT] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_CHINCHOU] = BACK_ANIM_V_STRETCH, - [SPECIES_LANTURN] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_PICHU] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_CLEFFA] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_IGGLYBUFF] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_TOGEPI] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_TOGETIC] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_NATU] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_XATU] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_MAREEP] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_FLAAFFY] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_AMPHAROS] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_BELLOSSOM] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_MARILL] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_AZUMARILL] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SUDOWOODO] = BACK_ANIM_H_SLIDE, - [SPECIES_POLITOED] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_HOPPIP] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_SKIPLOOM] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_JUMPLUFF] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_AIPOM] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_SUNKERN] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SUNFLORA] = BACK_ANIM_H_SLIDE, - [SPECIES_YANMA] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_WOOPER] = BACK_ANIM_V_STRETCH, - [SPECIES_QUAGSIRE] = BACK_ANIM_H_SLIDE, - [SPECIES_ESPEON] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_UMBREON] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_MURKROW] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_SLOWKING] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_MISDREAVUS] = BACK_ANIM_H_VIBRATE, - [SPECIES_UNOWN] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_WOBBUFFET] = BACK_ANIM_V_STRETCH, - [SPECIES_GIRAFARIG] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_PINECO] = BACK_ANIM_H_SHAKE, - [SPECIES_FORRETRESS] = BACK_ANIM_V_SHAKE, - [SPECIES_DUNSPARCE] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_GLIGAR] = BACK_ANIM_SHRINK_GROW, - [SPECIES_STEELIX] = BACK_ANIM_V_SHAKE, - [SPECIES_SNUBBULL] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_GRANBULL] = BACK_ANIM_V_SHAKE, - [SPECIES_QWILFISH] = BACK_ANIM_GROW_STUTTER, - [SPECIES_SCIZOR] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SHUCKLE] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_HERACROSS] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SNEASEL] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_TEDDIURSA] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_URSARING] = BACK_ANIM_V_SHAKE, - [SPECIES_SLUGMA] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_MAGCARGO] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_SWINUB] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_PILOSWINE] = BACK_ANIM_H_SHAKE, - [SPECIES_CORSOLA] = BACK_ANIM_H_SLIDE, - [SPECIES_REMORAID] = BACK_ANIM_H_SLIDE, - [SPECIES_OCTILLERY] = BACK_ANIM_SHRINK_GROW, - [SPECIES_DELIBIRD] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_MANTINE] = BACK_ANIM_H_SLIDE, - [SPECIES_SKARMORY] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_HOUNDOUR] = BACK_ANIM_V_SHAKE, - [SPECIES_HOUNDOOM] = BACK_ANIM_V_SHAKE, - [SPECIES_KINGDRA] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_PHANPY] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_DONPHAN] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_PORYGON2] = BACK_ANIM_H_VIBRATE, - [SPECIES_STANTLER] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SMEARGLE] = BACK_ANIM_H_SLIDE, - [SPECIES_TYROGUE] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_HITMONTOP] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, - [SPECIES_SMOOCHUM] = BACK_ANIM_H_SLIDE, - [SPECIES_ELEKID] = BACK_ANIM_H_SHAKE, - [SPECIES_MAGBY] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_MILTANK] = BACK_ANIM_H_SLIDE, - [SPECIES_BLISSEY] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_RAIKOU] = BACK_ANIM_SHAKE_FLASH_YELLOW, - [SPECIES_ENTEI] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_SUICUNE] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_LARVITAR] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_PUPITAR] = BACK_ANIM_V_SHAKE, - [SPECIES_TYRANITAR] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_LUGIA] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_HO_OH] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_CELEBI] = BACK_ANIM_SHAKE_GLOW_GREEN, - [SPECIES_TREECKO] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_GROVYLE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SCEPTILE] = BACK_ANIM_V_SHAKE, - [SPECIES_TORCHIC] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_COMBUSKEN] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_BLAZIKEN] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_MUDKIP] = BACK_ANIM_H_SLIDE, - [SPECIES_MARSHTOMP] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_SWAMPERT] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_POOCHYENA] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_MIGHTYENA] = BACK_ANIM_H_SHAKE, - [SPECIES_ZIGZAGOON] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_LINOONE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_WURMPLE] = BACK_ANIM_V_STRETCH, - [SPECIES_SILCOON] = BACK_ANIM_H_SHAKE, - [SPECIES_BEAUTIFLY] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_CASCOON] = BACK_ANIM_H_SHAKE, - [SPECIES_DUSTOX] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_LOTAD] = BACK_ANIM_H_SLIDE, - [SPECIES_LOMBRE] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_LUDICOLO] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_SEEDOT] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_NUZLEAF] = BACK_ANIM_V_SHAKE, - [SPECIES_SHIFTRY] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_NINCADA] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_NINJASK] = BACK_ANIM_H_VIBRATE, - [SPECIES_SHEDINJA] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_TAILLOW] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_SWELLOW] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SHROOMISH] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_BRELOOM] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_SPINDA] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, - [SPECIES_WINGULL] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_PELIPPER] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_SURSKIT] = BACK_ANIM_H_SPRING, - [SPECIES_MASQUERAIN] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_WAILMER] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_WAILORD] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_SKITTY] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_DELCATTY] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_KECLEON] = BACK_ANIM_H_VIBRATE, - [SPECIES_BALTOY] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_CLAYDOL] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_NOSEPASS] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_TORKOAL] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_SABLEYE] = BACK_ANIM_H_VIBRATE, - [SPECIES_BARBOACH] = BACK_ANIM_V_STRETCH, - [SPECIES_WHISCASH] = BACK_ANIM_V_SHAKE, - [SPECIES_LUVDISC] = BACK_ANIM_H_SPRING_REPEATED, - [SPECIES_CORPHISH] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_CRAWDAUNT] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_FEEBAS] = BACK_ANIM_H_SPRING, - [SPECIES_MILOTIC] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_CARVANHA] = BACK_ANIM_H_SPRING_REPEATED, - [SPECIES_SHARPEDO] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_TRAPINCH] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_VIBRAVA] = BACK_ANIM_H_VIBRATE, - [SPECIES_FLYGON] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_MAKUHITA] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_HARIYAMA] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_ELECTRIKE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_MANECTRIC] = BACK_ANIM_V_SHAKE, - [SPECIES_NUMEL] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_CAMERUPT] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_SPHEAL] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SEALEO] = BACK_ANIM_V_SHAKE, - [SPECIES_WALREIN] = BACK_ANIM_V_SHAKE, - [SPECIES_CACNEA] = BACK_ANIM_V_SHAKE_H_SLIDE, - [SPECIES_CACTURNE] = BACK_ANIM_H_SHAKE, - [SPECIES_SNORUNT] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_GLALIE] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_LUNATONE] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_SOLROCK] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_AZURILL] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_SPOINK] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_GRUMPIG] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_PLUSLE] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_MINUN] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_MAWILE] = BACK_ANIM_V_SHAKE, - [SPECIES_MEDITITE] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_MEDICHAM] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_SWABLU] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_ALTARIA] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_WYNAUT] = BACK_ANIM_CONCAVE_ARC_SMALL, - [SPECIES_DUSKULL] = BACK_ANIM_H_VIBRATE, - [SPECIES_DUSCLOPS] = BACK_ANIM_H_VIBRATE, - [SPECIES_ROSELIA] = BACK_ANIM_SHAKE_GLOW_GREEN, - [SPECIES_SLAKOTH] = BACK_ANIM_H_SLIDE, - [SPECIES_VIGOROTH] = BACK_ANIM_CONCAVE_ARC_LARGE, - [SPECIES_SLAKING] = BACK_ANIM_H_SHAKE, - [SPECIES_GULPIN] = BACK_ANIM_V_STRETCH, - [SPECIES_SWALOT] = BACK_ANIM_V_STRETCH, - [SPECIES_TROPIUS] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_WHISMUR] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_LOUDRED] = BACK_ANIM_V_SHAKE, - [SPECIES_EXPLOUD] = BACK_ANIM_GROW_STUTTER, - [SPECIES_CLAMPERL] = BACK_ANIM_DIP_RIGHT_SIDE, - [SPECIES_HUNTAIL] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_GOREBYSS] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_ABSOL] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_SHUPPET] = BACK_ANIM_H_VIBRATE, - [SPECIES_BANETTE] = BACK_ANIM_H_VIBRATE, - [SPECIES_SEVIPER] = BACK_ANIM_V_STRETCH, - [SPECIES_ZANGOOSE] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_RELICANTH] = BACK_ANIM_H_SLIDE, - [SPECIES_ARON] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_LAIRON] = BACK_ANIM_V_SHAKE, - [SPECIES_AGGRON] = BACK_ANIM_V_SHAKE_LOW, - [SPECIES_CASTFORM] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_VOLBEAT] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_ILLUMISE] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_LILEEP] = BACK_ANIM_H_STRETCH, - [SPECIES_CRADILY] = BACK_ANIM_V_STRETCH, - [SPECIES_ANORITH] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_ARMALDO] = BACK_ANIM_V_SHAKE, - [SPECIES_RALTS] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_KIRLIA] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_GARDEVOIR] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_BAGON] = BACK_ANIM_V_SHAKE, - [SPECIES_SHELGON] = BACK_ANIM_V_SHAKE, - [SPECIES_SALAMENCE] = BACK_ANIM_H_SHAKE, - [SPECIES_BELDUM] = BACK_ANIM_TRIANGLE_DOWN, - [SPECIES_METANG] = BACK_ANIM_JOLT_RIGHT, - [SPECIES_METAGROSS] = BACK_ANIM_V_SHAKE, - [SPECIES_REGIROCK] = BACK_ANIM_V_SHAKE, - [SPECIES_REGICE] = BACK_ANIM_V_SHAKE, - [SPECIES_REGISTEEL] = BACK_ANIM_V_SHAKE, - [SPECIES_KYOGRE] = BACK_ANIM_SHAKE_GLOW_BLUE, - [SPECIES_GROUDON] = BACK_ANIM_SHAKE_GLOW_RED, - [SPECIES_RAYQUAZA] = BACK_ANIM_GROW_STUTTER, - [SPECIES_LATIAS] = BACK_ANIM_H_VIBRATE, - [SPECIES_LATIOS] = BACK_ANIM_H_VIBRATE, - [SPECIES_JIRACHI] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_DEOXYS] = BACK_ANIM_SHRINK_GROW_VIBRATE, - [SPECIES_CHIMECHO] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_BULBASAUR] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_IVYSAUR] = BACK_ANIM_H_SLIDE, + [SPECIES_VENUSAUR] = BACK_ANIM_H_SHAKE, + [SPECIES_CHARMANDER] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CHARMELEON] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_CHARIZARD] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SQUIRTLE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_WARTORTLE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_BLASTOISE] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_CATERPIE] = BACK_ANIM_H_SLIDE, + [SPECIES_METAPOD] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_BUTTERFREE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_WEEDLE] = BACK_ANIM_H_SLIDE, + [SPECIES_KAKUNA] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_BEEDRILL] = BACK_ANIM_H_VIBRATE, + [SPECIES_PIDGEY] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_PIDGEOTTO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_PIDGEOT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_RATTATA] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_RATICATE] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_SPEAROW] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_FEAROW] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_EKANS] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_ARBOK] = BACK_ANIM_V_SHAKE, + [SPECIES_PIKACHU] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_RAICHU] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_SANDSHREW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SANDSLASH] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_NIDORAN_F] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_NIDORINA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_NIDOQUEEN] = BACK_ANIM_V_SHAKE, + [SPECIES_NIDORAN_M] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_NIDORINO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_NIDOKING] = BACK_ANIM_V_SHAKE, + [SPECIES_CLEFAIRY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_CLEFABLE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_VULPIX] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_NINETALES] = BACK_ANIM_H_VIBRATE, + [SPECIES_JIGGLYPUFF] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_WIGGLYTUFF] = BACK_ANIM_GROW, + [SPECIES_ZUBAT] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_GOLBAT] = BACK_ANIM_V_SHAKE, + [SPECIES_ODDISH] = BACK_ANIM_H_SLIDE, + [SPECIES_GLOOM] = BACK_ANIM_H_SLIDE, + [SPECIES_VILEPLUME] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_PARAS] = BACK_ANIM_H_SLIDE, + [SPECIES_PARASECT] = BACK_ANIM_H_SHAKE, + [SPECIES_VENONAT] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_VENOMOTH] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_DIGLETT] = BACK_ANIM_V_SHAKE, + [SPECIES_DUGTRIO] = BACK_ANIM_V_SHAKE, + [SPECIES_MEOWTH] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_PERSIAN] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_PSYDUCK] = BACK_ANIM_H_SLIDE, + [SPECIES_GOLDUCK] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MANKEY] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_PRIMEAPE] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GROWLITHE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_ARCANINE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_POLIWAG] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_POLIWHIRL] = BACK_ANIM_V_SHAKE, + [SPECIES_POLIWRATH] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_ABRA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_KADABRA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_ALAKAZAM] = BACK_ANIM_GROW_STUTTER, + [SPECIES_MACHOP] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MACHOKE] = BACK_ANIM_V_SHAKE, + [SPECIES_MACHAMP] = BACK_ANIM_V_SHAKE, + [SPECIES_BELLSPROUT] = BACK_ANIM_V_STRETCH, + [SPECIES_WEEPINBELL] = BACK_ANIM_V_STRETCH, + [SPECIES_VICTREEBEL] = BACK_ANIM_V_STRETCH, + [SPECIES_TENTACOOL] = BACK_ANIM_H_SLIDE, + [SPECIES_TENTACRUEL] = BACK_ANIM_H_SLIDE, + [SPECIES_GEODUDE] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_GRAVELER] = BACK_ANIM_H_SHAKE, + [SPECIES_GOLEM] = BACK_ANIM_H_SHAKE, + [SPECIES_PONYTA] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_RAPIDASH] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SLOWPOKE] = BACK_ANIM_H_SLIDE, + [SPECIES_SLOWBRO] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_MAGNEMITE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_MAGNETON] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_FARFETCHD] = BACK_ANIM_H_SLIDE, + [SPECIES_DODUO] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_DODRIO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SEEL] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_DEWGONG] = BACK_ANIM_H_SLIDE, + [SPECIES_GRIMER] = BACK_ANIM_V_STRETCH, + [SPECIES_MUK] = BACK_ANIM_H_STRETCH, + [SPECIES_SHELLDER] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_CLOYSTER] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GASTLY] = BACK_ANIM_H_VIBRATE, + [SPECIES_HAUNTER] = BACK_ANIM_H_VIBRATE, + [SPECIES_GENGAR] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_ONIX] = BACK_ANIM_V_SHAKE, + [SPECIES_DROWZEE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_HYPNO] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_KRABBY] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_KINGLER] = BACK_ANIM_V_SHAKE, + [SPECIES_VOLTORB] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_ELECTRODE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_EXEGGCUTE] = BACK_ANIM_H_SLIDE, + [SPECIES_EXEGGUTOR] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_CUBONE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MAROWAK] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_HITMONLEE] = BACK_ANIM_H_SLIDE, + [SPECIES_HITMONCHAN] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LICKITUNG] = BACK_ANIM_H_SLIDE, + [SPECIES_KOFFING] = BACK_ANIM_GROW, + [SPECIES_WEEZING] = BACK_ANIM_GROW, + [SPECIES_RHYHORN] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_RHYDON] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_CHANSEY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_TANGELA] = BACK_ANIM_V_STRETCH, + [SPECIES_KANGASKHAN] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_HORSEA] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SEADRA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_GOLDEEN] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SEAKING] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_STARYU] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_STARMIE] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_MR_MIME] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SCYTHER] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_JYNX] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_ELECTABUZZ] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_MAGMAR] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_PINSIR] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_TAUROS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_MAGIKARP] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GYARADOS] = BACK_ANIM_V_SHAKE, + [SPECIES_LAPRAS] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_DITTO] = BACK_ANIM_SHRINK_GROW, + [SPECIES_EEVEE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_VAPOREON] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_JOLTEON] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_FLAREON] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_PORYGON] = BACK_ANIM_H_VIBRATE, + [SPECIES_OMANYTE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_OMASTAR] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_KABUTO] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_KABUTOPS] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_AERODACTYL] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SNORLAX] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_ARTICUNO] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_ZAPDOS] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_MOLTRES] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_DRATINI] = BACK_ANIM_H_SLIDE, + [SPECIES_DRAGONAIR] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_DRAGONITE] = BACK_ANIM_V_SHAKE, + [SPECIES_MEWTWO] = BACK_ANIM_GROW_STUTTER, + [SPECIES_MEW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CHIKORITA] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_BAYLEEF] = BACK_ANIM_H_SLIDE, + [SPECIES_MEGANIUM] = BACK_ANIM_V_SHAKE, + [SPECIES_CYNDAQUIL] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_QUILAVA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_TYPHLOSION] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_TOTODILE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_CROCONAW] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_FERALIGATR] = BACK_ANIM_V_SHAKE, + [SPECIES_SENTRET] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FURRET] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_HOOTHOOT] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_NOCTOWL] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LEDYBA] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_LEDIAN] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SPINARAK] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_ARIADOS] = BACK_ANIM_H_SLIDE, + [SPECIES_CROBAT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_CHINCHOU] = BACK_ANIM_V_STRETCH, + [SPECIES_LANTURN] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_PICHU] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CLEFFA] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_IGGLYBUFF] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_TOGEPI] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_TOGETIC] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_NATU] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_XATU] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MAREEP] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLAAFFY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_AMPHAROS] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_BELLOSSOM] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_MARILL] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_AZUMARILL] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SUDOWOODO] = BACK_ANIM_H_SLIDE, + [SPECIES_POLITOED] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_HOPPIP] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SKIPLOOM] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_JUMPLUFF] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_AIPOM] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SUNKERN] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SUNFLORA] = BACK_ANIM_H_SLIDE, + [SPECIES_YANMA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_WOOPER] = BACK_ANIM_V_STRETCH, + [SPECIES_QUAGSIRE] = BACK_ANIM_H_SLIDE, + [SPECIES_ESPEON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_UMBREON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MURKROW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SLOWKING] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_MISDREAVUS] = BACK_ANIM_H_VIBRATE, + [SPECIES_UNOWN] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_WOBBUFFET] = BACK_ANIM_V_STRETCH, + [SPECIES_GIRAFARIG] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_PINECO] = BACK_ANIM_H_SHAKE, + [SPECIES_FORRETRESS] = BACK_ANIM_V_SHAKE, + [SPECIES_DUNSPARCE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GLIGAR] = BACK_ANIM_SHRINK_GROW, + [SPECIES_STEELIX] = BACK_ANIM_V_SHAKE, + [SPECIES_SNUBBULL] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_GRANBULL] = BACK_ANIM_V_SHAKE, + [SPECIES_QWILFISH] = BACK_ANIM_GROW_STUTTER, + [SPECIES_SCIZOR] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SHUCKLE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_HERACROSS] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SNEASEL] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_TEDDIURSA] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_URSARING] = BACK_ANIM_V_SHAKE, + [SPECIES_SLUGMA] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_MAGCARGO] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SWINUB] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_PILOSWINE] = BACK_ANIM_H_SHAKE, + [SPECIES_CORSOLA] = BACK_ANIM_H_SLIDE, + [SPECIES_REMORAID] = BACK_ANIM_H_SLIDE, + [SPECIES_OCTILLERY] = BACK_ANIM_SHRINK_GROW, + [SPECIES_DELIBIRD] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_MANTINE] = BACK_ANIM_H_SLIDE, + [SPECIES_SKARMORY] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_HOUNDOUR] = BACK_ANIM_V_SHAKE, + [SPECIES_HOUNDOOM] = BACK_ANIM_V_SHAKE, + [SPECIES_KINGDRA] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_PHANPY] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_DONPHAN] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_PORYGON2] = BACK_ANIM_H_VIBRATE, + [SPECIES_STANTLER] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SMEARGLE] = BACK_ANIM_H_SLIDE, + [SPECIES_TYROGUE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_HITMONTOP] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_SMOOCHUM] = BACK_ANIM_H_SLIDE, + [SPECIES_ELEKID] = BACK_ANIM_H_SHAKE, + [SPECIES_MAGBY] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_MILTANK] = BACK_ANIM_H_SLIDE, + [SPECIES_BLISSEY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_RAIKOU] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_ENTEI] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SUICUNE] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_LARVITAR] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_PUPITAR] = BACK_ANIM_V_SHAKE, + [SPECIES_TYRANITAR] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_LUGIA] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_HO_OH] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_CELEBI] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_TREECKO] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GROVYLE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SCEPTILE] = BACK_ANIM_V_SHAKE, + [SPECIES_TORCHIC] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_COMBUSKEN] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_BLAZIKEN] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_MUDKIP] = BACK_ANIM_H_SLIDE, + [SPECIES_MARSHTOMP] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SWAMPERT] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_POOCHYENA] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_MIGHTYENA] = BACK_ANIM_H_SHAKE, + [SPECIES_ZIGZAGOON] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LINOONE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_WURMPLE] = BACK_ANIM_V_STRETCH, + [SPECIES_SILCOON] = BACK_ANIM_H_SHAKE, + [SPECIES_BEAUTIFLY] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_CASCOON] = BACK_ANIM_H_SHAKE, + [SPECIES_DUSTOX] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LOTAD] = BACK_ANIM_H_SLIDE, + [SPECIES_LOMBRE] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_LUDICOLO] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SEEDOT] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_NUZLEAF] = BACK_ANIM_V_SHAKE, + [SPECIES_SHIFTRY] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_NINCADA] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_NINJASK] = BACK_ANIM_H_VIBRATE, + [SPECIES_SHEDINJA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_TAILLOW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SWELLOW] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SHROOMISH] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_BRELOOM] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SPINDA] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_WINGULL] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_PELIPPER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SURSKIT] = BACK_ANIM_H_SPRING, + [SPECIES_MASQUERAIN] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_WAILMER] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_WAILORD] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_SKITTY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_DELCATTY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_KECLEON] = BACK_ANIM_H_VIBRATE, + [SPECIES_BALTOY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_CLAYDOL] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_NOSEPASS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_TORKOAL] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SABLEYE] = BACK_ANIM_H_VIBRATE, + [SPECIES_BARBOACH] = BACK_ANIM_V_STRETCH, + [SPECIES_WHISCASH] = BACK_ANIM_V_SHAKE, + [SPECIES_LUVDISC] = BACK_ANIM_H_SPRING_REPEATED, + [SPECIES_CORPHISH] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_CRAWDAUNT] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_FEEBAS] = BACK_ANIM_H_SPRING, + [SPECIES_MILOTIC] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_CARVANHA] = BACK_ANIM_H_SPRING_REPEATED, + [SPECIES_SHARPEDO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_TRAPINCH] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_VIBRAVA] = BACK_ANIM_H_VIBRATE, + [SPECIES_FLYGON] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_MAKUHITA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_HARIYAMA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_ELECTRIKE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MANECTRIC] = BACK_ANIM_V_SHAKE, + [SPECIES_NUMEL] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_CAMERUPT] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SPHEAL] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SEALEO] = BACK_ANIM_V_SHAKE, + [SPECIES_WALREIN] = BACK_ANIM_V_SHAKE, + [SPECIES_CACNEA] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_CACTURNE] = BACK_ANIM_H_SHAKE, + [SPECIES_SNORUNT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GLALIE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LUNATONE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SOLROCK] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_AZURILL] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SPOINK] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GRUMPIG] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_PLUSLE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_MINUN] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_MAWILE] = BACK_ANIM_V_SHAKE, + [SPECIES_MEDITITE] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MEDICHAM] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SWABLU] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_ALTARIA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_WYNAUT] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_DUSKULL] = BACK_ANIM_H_VIBRATE, + [SPECIES_DUSCLOPS] = BACK_ANIM_H_VIBRATE, + [SPECIES_ROSELIA] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_SLAKOTH] = BACK_ANIM_H_SLIDE, + [SPECIES_VIGOROTH] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SLAKING] = BACK_ANIM_H_SHAKE, + [SPECIES_GULPIN] = BACK_ANIM_V_STRETCH, + [SPECIES_SWALOT] = BACK_ANIM_V_STRETCH, + [SPECIES_TROPIUS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_WHISMUR] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_LOUDRED] = BACK_ANIM_V_SHAKE, + [SPECIES_EXPLOUD] = BACK_ANIM_GROW_STUTTER, + [SPECIES_CLAMPERL] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_HUNTAIL] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_GOREBYSS] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_ABSOL] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SHUPPET] = BACK_ANIM_H_VIBRATE, + [SPECIES_BANETTE] = BACK_ANIM_H_VIBRATE, + [SPECIES_SEVIPER] = BACK_ANIM_V_STRETCH, + [SPECIES_ZANGOOSE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_RELICANTH] = BACK_ANIM_H_SLIDE, + [SPECIES_ARON] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_LAIRON] = BACK_ANIM_V_SHAKE, + [SPECIES_AGGRON] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_CASTFORM] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_VOLBEAT] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_ILLUMISE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_LILEEP] = BACK_ANIM_H_STRETCH, + [SPECIES_CRADILY] = BACK_ANIM_V_STRETCH, + [SPECIES_ANORITH] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_ARMALDO] = BACK_ANIM_V_SHAKE, + [SPECIES_RALTS] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_KIRLIA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_GARDEVOIR] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_BAGON] = BACK_ANIM_V_SHAKE, + [SPECIES_SHELGON] = BACK_ANIM_V_SHAKE, + [SPECIES_SALAMENCE] = BACK_ANIM_H_SHAKE, + [SPECIES_BELDUM] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_METANG] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_METAGROSS] = BACK_ANIM_V_SHAKE, + [SPECIES_REGIROCK] = BACK_ANIM_V_SHAKE, + [SPECIES_REGICE] = BACK_ANIM_V_SHAKE, + [SPECIES_REGISTEEL] = BACK_ANIM_V_SHAKE, + [SPECIES_KYOGRE] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_GROUDON] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_RAYQUAZA] = BACK_ANIM_GROW_STUTTER, + [SPECIES_LATIAS] = BACK_ANIM_H_VIBRATE, + [SPECIES_LATIOS] = BACK_ANIM_H_VIBRATE, + [SPECIES_JIRACHI] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_DEOXYS] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_CHIMECHO] = BACK_ANIM_CONVEX_DOUBLE_ARC, + + // Gen 4 + [SPECIES_TURTWIG] = BACK_ANIM_H_SLIDE, + [SPECIES_GROTLE] = BACK_ANIM_H_SLIDE, + [SPECIES_TORTERRA] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_CHIMCHAR] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_MONFERNO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_INFERNAPE] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_PIPLUP] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_PRINPLUP] = BACK_ANIM_V_STRETCH, + [SPECIES_EMPOLEON] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_STARLY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_STARAVIA] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_STARAPTOR] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_BIDOOF] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_BIBAREL] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_KRICKETOT] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_KRICKETUNE] = BACK_ANIM_H_VIBRATE, + [SPECIES_SHINX] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_LUXIO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_LUXRAY] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_BUDEW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_ROSERADE] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_CRANIDOS] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_RAMPARDOS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_SHIELDON] = BACK_ANIM_V_SHAKE, + [SPECIES_BASTIODON] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_BURMY] = BACK_ANIM_H_SHAKE, + [SPECIES_WORMADAM] = BACK_ANIM_V_SHAKE, + [SPECIES_MOTHIM] = BACK_ANIM_H_SHAKE, + [SPECIES_COMBEE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_VESPIQUEN] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_PACHIRISU] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_BUIZEL] = BACK_ANIM_H_SLIDE, + [SPECIES_FLOATZEL] = BACK_ANIM_V_STRETCH, + [SPECIES_CHERUBI] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CHERRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_SHELLOS] = BACK_ANIM_H_SPRING, + [SPECIES_GASTRODON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_AMBIPOM] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_DRIFLOON] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_DRIFBLIM] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_BUNEARY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_LOPUNNY] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MISMAGIUS] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_HONCHKROW] = BACK_ANIM_H_STRETCH, + [SPECIES_GLAMEOW] = BACK_ANIM_SHRINK_GROW, + [SPECIES_PURUGLY] = BACK_ANIM_GROW_STUTTER, + [SPECIES_CHINGLING] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_STUNKY] = BACK_ANIM_H_SLIDE, + [SPECIES_SKUNTANK] = BACK_ANIM_H_STRETCH, + [SPECIES_BRONZOR] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_BRONZONG] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_BONSLY] = BACK_ANIM_H_VIBRATE, + [SPECIES_MIME_JR] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_HAPPINY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CHATOT] = BACK_ANIM_V_STRETCH, + [SPECIES_SPIRITOMB] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_GIBLE] = BACK_ANIM_H_SHAKE, + [SPECIES_GABITE] = BACK_ANIM_V_SHAKE, + [SPECIES_GARCHOMP] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_MUNCHLAX] = BACK_ANIM_GROW, + [SPECIES_RIOLU] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_LUCARIO] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_HIPPOPOTAS] = BACK_ANIM_H_SLIDE, + [SPECIES_HIPPOWDON] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_SKORUPI] = BACK_ANIM_H_SLIDE, + [SPECIES_DRAPION] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_CROAGUNK] = BACK_ANIM_GROW, + [SPECIES_TOXICROAK] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_CARNIVINE] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FINNEON] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_LUMINEON] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_MANTYKE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SNOVER] = BACK_ANIM_V_STRETCH, + [SPECIES_ABOMASNOW] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_WEAVILE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MAGNEZONE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_LICKILICKY] = BACK_ANIM_V_SHAKE, + [SPECIES_RHYPERIOR] = BACK_ANIM_V_SHAKE, + [SPECIES_TANGROWTH] = BACK_ANIM_GROW, + [SPECIES_ELECTIVIRE] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_MAGMORTAR] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_TOGEKISS] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_YANMEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_LEAFEON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_GLACEON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_GLISCOR] = BACK_ANIM_V_STRETCH, + [SPECIES_MAMOSWINE] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_PORYGON_Z] = BACK_ANIM_H_VIBRATE, + [SPECIES_GALLADE] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_PROBOPASS] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_DUSKNOIR] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FROSLASS] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_ROTOM] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_UXIE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_MESPRIT] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_AZELF] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_DIALGA] = BACK_ANIM_V_SHAKE, + [SPECIES_PALKIA] = BACK_ANIM_H_SHAKE, + [SPECIES_HEATRAN] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_REGIGIGAS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_GIRATINA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_CRESSELIA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_PHIONE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_MANAPHY] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_DARKRAI] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SHAYMIN] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_ARCEUS] = BACK_ANIM_GROW, + + //Gen 4 Forms + [SPECIES_DEOXYS_ATTACK] = BACK_ANIM_GROW_STUTTER, + [SPECIES_DEOXYS_DEFENSE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_DEOXYS_SPEED] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_BURMY_SANDY_CLOAK] = BACK_ANIM_H_SHAKE, + [SPECIES_BURMY_TRASH_CLOAK] = BACK_ANIM_H_SHAKE, + [SPECIES_WORMADAM_SANDY_CLOAK] = BACK_ANIM_V_SHAKE, + [SPECIES_WORMADAM_TRASH_CLOAK] = BACK_ANIM_V_SHAKE, + [SPECIES_CHERRIM_SUNSHINE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SHELLOS_EAST_SEA] = BACK_ANIM_H_SPRING, + [SPECIES_GASTRODON_EAST_SEA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_ROTOM_HEAT] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_ROTOM_WASH] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_ROTOM_FROST] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_ROTOM_FAN] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_ROTOM_MOW] = BACK_ANIM_H_SLIDE, + [SPECIES_GIRATINA_ORIGIN] = BACK_ANIM_GROW_STUTTER, + [SPECIES_SHAYMIN_SKY] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_ARCEUS_FIGHTING] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_FLYING] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_POISON] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_GROUND] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_ROCK] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_BUG] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_GHOST] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_STEEL] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_FIRE] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_WATER] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_GRASS] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_ELECTRIC] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_PSYCHIC] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_ICE] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_DRAGON] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_DARK] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ARCEUS_FAIRY] = BACK_ANIM_GROW_STUTTER, + + // Gen 5 + [SPECIES_VICTINI] = BACK_ANIM_H_SHAKE, + [SPECIES_SNIVY] = BACK_ANIM_H_SLIDE, + [SPECIES_SERVINE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_SERPERIOR] = BACK_ANIM_V_STRETCH, + [SPECIES_TEPIG] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_PIGNITE] = BACK_ANIM_GROW_STUTTER, + [SPECIES_EMBOAR] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_OSHAWOTT] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_DEWOTT] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SAMUROTT] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_PATRAT] = BACK_ANIM_H_SLIDE, + [SPECIES_WATCHOG] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_LILLIPUP] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_HERDIER] = BACK_ANIM_H_SHAKE, + [SPECIES_STOUTLAND] = BACK_ANIM_V_STRETCH, + [SPECIES_PURRLOIN] = BACK_ANIM_V_STRETCH, + [SPECIES_LIEPARD] = BACK_ANIM_H_STRETCH, + [SPECIES_PANSAGE] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SIMISAGE] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_PANSEAR] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SIMISEAR] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_PANPOUR] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SIMIPOUR] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_MUNNA] = BACK_ANIM_SHRINK_GROW, + [SPECIES_MUSHARNA] = BACK_ANIM_GROW, + [SPECIES_PIDOVE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_TRANQUILL] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_UNFEZANT] = BACK_ANIM_V_STRETCH, + [SPECIES_BLITZLE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_ZEBSTRIKA] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_ROGGENROLA] = BACK_ANIM_V_SHAKE, + [SPECIES_BOLDORE] = BACK_ANIM_H_SHAKE, + [SPECIES_GIGALITH] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_WOOBAT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_SWOOBAT] = BACK_ANIM_V_STRETCH, + [SPECIES_DRILBUR] = BACK_ANIM_V_SHAKE, + [SPECIES_EXCADRILL] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_AUDINO] = BACK_ANIM_SHRINK_GROW, + [SPECIES_TIMBURR] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_GURDURR] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_CONKELDURR] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_TYMPOLE] = BACK_ANIM_H_SPRING, + [SPECIES_PALPITOAD] = BACK_ANIM_H_VIBRATE, + [SPECIES_SEISMITOAD] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_THROH] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_SAWK] = BACK_ANIM_H_STRETCH, + [SPECIES_SEWADDLE] = BACK_ANIM_H_SLIDE, + [SPECIES_SWADLOON] = BACK_ANIM_H_VIBRATE, + [SPECIES_LEAVANNY] = BACK_ANIM_GROW_STUTTER, + [SPECIES_VENIPEDE] = BACK_ANIM_H_VIBRATE, + [SPECIES_WHIRLIPEDE] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SCOLIPEDE] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_COTTONEE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_WHIMSICOTT] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_PETILIL] = BACK_ANIM_V_STRETCH, + [SPECIES_LILLIGANT] = BACK_ANIM_SHRINK_GROW, + [SPECIES_BASCULIN] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_SANDILE] = BACK_ANIM_H_SLIDE, + [SPECIES_KROKOROK] = BACK_ANIM_V_STRETCH, + [SPECIES_KROOKODILE] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_DARUMAKA] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_DARMANITAN] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_MARACTUS] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_DWEBBLE] = BACK_ANIM_H_SLIDE, + [SPECIES_CRUSTLE] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_SCRAGGY] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_SCRAFTY] = BACK_ANIM_GROW, + [SPECIES_SIGILYPH] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_YAMASK] = BACK_ANIM_V_SHAKE, + [SPECIES_COFAGRIGUS] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_TIRTOUGA] = BACK_ANIM_H_SLIDE, + [SPECIES_CARRACOSTA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_ARCHEN] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_ARCHEOPS] = BACK_ANIM_V_STRETCH, + [SPECIES_TRUBBISH] = BACK_ANIM_SHRINK_GROW, + [SPECIES_GARBODOR] = BACK_ANIM_H_STRETCH, + [SPECIES_ZORUA] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_ZOROARK] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MINCCINO] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CINCCINO] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GOTHITA] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_GOTHORITA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_GOTHITELLE] = BACK_ANIM_H_STRETCH, + [SPECIES_SOLOSIS] = BACK_ANIM_SHRINK_GROW, + [SPECIES_DUOSION] = BACK_ANIM_GROW, + [SPECIES_REUNICLUS] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_DUCKLETT] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_SWANNA] = BACK_ANIM_H_STRETCH, + [SPECIES_VANILLITE] = BACK_ANIM_H_SLIDE, + [SPECIES_VANILLISH] = BACK_ANIM_H_SLIDE, + [SPECIES_VANILLUXE] = BACK_ANIM_H_SHAKE, + [SPECIES_DEERLING] = BACK_ANIM_H_SLIDE, + [SPECIES_SAWSBUCK] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_EMOLGA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_KARRABLAST] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_ESCAVALIER] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_FOONGUS] = BACK_ANIM_SHRINK_GROW, + [SPECIES_AMOONGUSS] = BACK_ANIM_GROW_STUTTER, + [SPECIES_FRILLISH] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_JELLICENT] = BACK_ANIM_GROW_STUTTER, + [SPECIES_ALOMOMOLA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_JOLTIK] = BACK_ANIM_H_SLIDE, + [SPECIES_GALVANTULA] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_FERROSEED] = BACK_ANIM_H_SHAKE, + [SPECIES_FERROTHORN] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_KLINK] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_KLANG] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_KLINKLANG] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_TYNAMO] = BACK_ANIM_H_SLIDE, + [SPECIES_EELEKTRIK] = BACK_ANIM_SHRINK_GROW, + [SPECIES_EELEKTROSS] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_ELGYEM] = BACK_ANIM_SHRINK_GROW, + [SPECIES_BEHEEYEM] = BACK_ANIM_H_SHAKE, + [SPECIES_LITWICK] = BACK_ANIM_SHRINK_GROW, + [SPECIES_LAMPENT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_CHANDELURE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_AXEW] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FRAXURE] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_HAXORUS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_CUBCHOO] = BACK_ANIM_H_SLIDE, + [SPECIES_BEARTIC] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_CRYOGONAL] = BACK_ANIM_H_VIBRATE, + [SPECIES_SHELMET] = BACK_ANIM_V_SHAKE, + [SPECIES_ACCELGOR] = BACK_ANIM_H_SPRING_REPEATED, + [SPECIES_STUNFISK] = BACK_ANIM_H_STRETCH, + [SPECIES_MIENFOO] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_MIENSHAO] = BACK_ANIM_V_STRETCH, + [SPECIES_DRUDDIGON] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_GOLETT] = BACK_ANIM_H_SLIDE, + [SPECIES_GOLURK] = BACK_ANIM_V_SHAKE, + [SPECIES_PAWNIARD] = BACK_ANIM_H_SLIDE, + [SPECIES_BISHARP] = BACK_ANIM_GROW_STUTTER, + [SPECIES_BOUFFALANT] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_RUFFLET] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_BRAVIARY] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_VULLABY] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_MANDIBUZZ] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_HEATMOR] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_DURANT] = BACK_ANIM_H_VIBRATE, + [SPECIES_DEINO] = BACK_ANIM_H_SLIDE, + [SPECIES_ZWEILOUS] = BACK_ANIM_H_SHAKE, + [SPECIES_HYDREIGON] = BACK_ANIM_GROW_STUTTER, + [SPECIES_LARVESTA] = BACK_ANIM_H_SLIDE, + [SPECIES_VOLCARONA] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_COBALION] = BACK_ANIM_V_STRETCH, + [SPECIES_TERRAKION] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_VIRIZION] = BACK_ANIM_H_SHAKE, + [SPECIES_TORNADUS] = BACK_ANIM_V_SHAKE, + [SPECIES_THUNDURUS] = BACK_ANIM_V_SHAKE, + [SPECIES_RESHIRAM] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_ZEKROM] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_LANDORUS] = BACK_ANIM_V_SHAKE, + [SPECIES_KYUREM] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_KELDEO] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MELOETTA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_GENESECT] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + + //Gen 5 Forms + [SPECIES_BASCULIN_BLUE_STRIPED] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_DARMANITAN_ZEN_MODE] = BACK_ANIM_H_SHAKE, + [SPECIES_DEERLING_SUMMER] = BACK_ANIM_H_SLIDE, + [SPECIES_DEERLING_AUTUMN] = BACK_ANIM_H_SLIDE, + [SPECIES_DEERLING_WINTER] = BACK_ANIM_H_SLIDE, + [SPECIES_SAWSBUCK_SUMMER] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SAWSBUCK_AUTUMN] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_SAWSBUCK_WINTER] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_TORNADUS_THERIAN] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_THUNDURUS_THERIAN] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_LANDORUS_THERIAN] = BACK_ANIM_GROW_STUTTER, + [SPECIES_KYUREM_WHITE] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_KYUREM_BLACK] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_KELDEO_RESOLUTE] = BACK_ANIM_GROW_STUTTER, + [SPECIES_MELOETTA_PIROUETTE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GENESECT_DOUSE_DRIVE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_GENESECT_SHOCK_DRIVE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_GENESECT_BURN_DRIVE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_GENESECT_CHILL_DRIVE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + + //Gen 6 + [SPECIES_CHESPIN] = BACK_ANIM_H_SLIDE, + [SPECIES_QUILLADIN] = BACK_ANIM_GROW, + [SPECIES_CHESNAUGHT] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_FENNEKIN] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_BRAIXEN] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_DELPHOX] = BACK_ANIM_GROW_STUTTER, + [SPECIES_FROAKIE] = BACK_ANIM_SHRINK_GROW, + [SPECIES_FROGADIER] = BACK_ANIM_GROW_STUTTER, + [SPECIES_GRENINJA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_BUNNELBY] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_DIGGERSBY] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_FLETCHLING] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLETCHINDER] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_TALONFLAME] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SCATTERBUG] = BACK_ANIM_H_SLIDE, + [SPECIES_SPEWPA] = BACK_ANIM_H_VIBRATE, + [SPECIES_VIVILLON] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_LITLEO] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_PYROAR] = BACK_ANIM_H_STRETCH, + [SPECIES_FLABEBE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLOETTE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLORGES] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SKIDDO] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_GOGOAT] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_PANCHAM] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_PANGORO] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_FURFROU] = BACK_ANIM_V_STRETCH, + [SPECIES_ESPURR] = BACK_ANIM_H_SLIDE, + [SPECIES_MEOWSTIC] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_HONEDGE] = BACK_ANIM_V_SHAKE, + [SPECIES_DOUBLADE] = BACK_ANIM_H_SHAKE, + [SPECIES_AEGISLASH] = BACK_ANIM_H_VIBRATE, + [SPECIES_SPRITZEE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_AROMATISSE] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_SWIRLIX] = BACK_ANIM_H_SPRING, + [SPECIES_SLURPUFF] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_INKAY] = BACK_ANIM_SHRINK_GROW, + [SPECIES_MALAMAR] = BACK_ANIM_V_STRETCH, + [SPECIES_BINACLE] = BACK_ANIM_H_SLIDE, + [SPECIES_BARBARACLE] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_SKRELP] = BACK_ANIM_V_STRETCH, + [SPECIES_DRAGALGE] = BACK_ANIM_H_STRETCH, + [SPECIES_CLAUNCHER] = BACK_ANIM_H_SLIDE, + [SPECIES_CLAWITZER] = BACK_ANIM_V_SHAKE, + [SPECIES_HELIOPTILE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_HELIOLISK] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_TYRUNT] = BACK_ANIM_H_SHAKE, + [SPECIES_TYRANTRUM] = BACK_ANIM_V_SHAKE_H_SLIDE, + [SPECIES_AMAURA] = BACK_ANIM_H_SLIDE, + [SPECIES_AURORUS] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_SYLVEON] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_HAWLUCHA] = BACK_ANIM_GROW_STUTTER, + [SPECIES_DEDENNE] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_CARBINK] = BACK_ANIM_H_VIBRATE, + [SPECIES_GOOMY] = BACK_ANIM_H_SPRING, + [SPECIES_SLIGGOO] = BACK_ANIM_SHRINK_GROW, + [SPECIES_GOODRA] = BACK_ANIM_SHRINK_GROW, + [SPECIES_KLEFKI] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_PHANTUMP] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_TREVENANT] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_PUMPKABOO] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GOURGEIST] = BACK_ANIM_V_STRETCH, + [SPECIES_BERGMITE] = BACK_ANIM_H_SHAKE, + [SPECIES_AVALUGG] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_NOIBAT] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_NOIVERN] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_XERNEAS] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_YVELTAL] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_ZYGARDE] = BACK_ANIM_V_STRETCH, + [SPECIES_DIANCIE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_HOOPA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_VOLCANION] = BACK_ANIM_SHAKE_GLOW_RED, + + //Gen 6 Forms + [SPECIES_GRENINJA_ASH] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_GRENINJA_BATTLE_BOND] = BACK_ANIM_V_STRETCH, + [SPECIES_VIVILLON_POLAR] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_TUNDRA] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_CONTINENTAL] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_GARDEN] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_ELEGANT] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_MEADOW] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_MODERN] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_MARINE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_ARCHIPELAGO] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_HIGH_PLAINS] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_SANDSTORM] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_RIVER] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_MONSOON] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_SAVANNA] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_SUN] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_OCEAN] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_JUNGLE] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_FANCY] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_VIVILLON_POKE_BALL] = BACK_ANIM_CIRCLE_COUNTERCLOCKWISE, + [SPECIES_FLABEBE_YELLOW_FLOWER] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLABEBE_ORANGE_FLOWER] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLABEBE_BLUE_FLOWER] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLABEBE_WHITE_FLOWER] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_FLOETTE_YELLOW_FLOWER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLOETTE_ORANGE_FLOWER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLOETTE_BLUE_FLOWER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLOETTE_WHITE_FLOWER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLOETTE_ETERNAL_FLOWER] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_FLORGES_YELLOW_FLOWER] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FLORGES_ORANGE_FLOWER] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FLORGES_BLUE_FLOWER] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FLORGES_WHITE_FLOWER] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_FURFROU_HEART_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_STAR_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_DIAMOND_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_DEBUTANTE_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_MATRON_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_DANDY_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_LA_REINE_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_KABUKI_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_FURFROU_PHARAOH_TRIM] = BACK_ANIM_V_STRETCH, + [SPECIES_MEOWSTIC_FEMALE] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_AEGISLASH_BLADE] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_PUMPKABOO_SMALL] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_PUMPKABOO_LARGE] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_PUMPKABOO_SUPER] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_GOURGEIST_SMALL] = BACK_ANIM_V_STRETCH, + [SPECIES_GOURGEIST_LARGE] = BACK_ANIM_V_STRETCH, + [SPECIES_GOURGEIST_SUPER] = BACK_ANIM_V_STRETCH, + [SPECIES_XERNEAS_ACTIVE] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_ZYGARDE_10] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_ZYGARDE_10_POWER_CONSTRUCT] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_ZYGARDE_50_POWER_CONSTRUCT] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_ZYGARDE_COMPLETE] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_HOOPA_UNBOUND] = BACK_ANIM_V_SHAKE_LOW, + + //Gen 6 Megas (Thanks Furret/CyanSMP64!) + [SPECIES_VENUSAUR_MEGA] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_CHARIZARD_MEGA_X] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_CHARIZARD_MEGA_Y] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_BLASTOISE_MEGA] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_BEEDRILL_MEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_PIDGEOT_MEGA] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_ALAKAZAM_MEGA] = BACK_ANIM_GROW_STUTTER, + [SPECIES_SLOWBRO_MEGA] = BACK_ANIM_DIP_RIGHT_SIDE, + [SPECIES_GENGAR_MEGA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_KANGASKHAN_MEGA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_PINSIR_MEGA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_GYARADOS_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_AERODACTYL_MEGA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_MEWTWO_MEGA_X] = BACK_ANIM_GROW_STUTTER, + [SPECIES_MEWTWO_MEGA_Y] = BACK_ANIM_GROW_STUTTER, + [SPECIES_AMPHAROS_MEGA] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_STEELIX_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_SCIZOR_MEGA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_HERACROSS_MEGA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_HOUNDOOM_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_TYRANITAR_MEGA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_SCEPTILE_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_BLAZIKEN_MEGA] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_SWAMPERT_MEGA] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_GARDEVOIR_MEGA] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_SABLEYE_MEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_MAWILE_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_AGGRON_MEGA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_MEDICHAM_MEGA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_MANECTRIC_MEGA] = BACK_ANIM_SHAKE_FLASH_YELLOW, + [SPECIES_SHARPEDO_MEGA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_CAMERUPT_MEGA] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_ALTARIA_MEGA] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_BANETTE_MEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_ABSOL_MEGA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_GLALIE_MEGA] = BACK_ANIM_TRIANGLE_DOWN, + [SPECIES_SALAMENCE_MEGA] = BACK_ANIM_H_SHAKE, + [SPECIES_METAGROSS_MEGA] = BACK_ANIM_V_SHAKE, + [SPECIES_LATIAS_MEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_LATIOS_MEGA] = BACK_ANIM_H_VIBRATE, + [SPECIES_LOPUNNY_MEGA] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_GARCHOMP_MEGA] = BACK_ANIM_JOLT_RIGHT, + [SPECIES_LUCARIO_MEGA] = BACK_ANIM_CONCAVE_ARC_LARGE, + [SPECIES_ABOMASNOW_MEGA] = BACK_ANIM_V_SHAKE_LOW, + [SPECIES_GALLADE_MEGA] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_RAYQUAZA_MEGA] = BACK_ANIM_SHAKE_GLOW_GREEN, + [SPECIES_KYOGRE_PRIMAL] = BACK_ANIM_SHAKE_GLOW_BLUE, + [SPECIES_GROUDON_PRIMAL] = BACK_ANIM_SHAKE_GLOW_RED, + }; // Equivalent to struct YellowFlashData, but doesn't match as a struct From f979013b7e92b6cbdbed7eef240d470af055fe19 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 21 May 2023 16:57:43 -0400 Subject: [PATCH 207/229] Disable Gen8+ Obedience Mechanics by default (#2980) --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index 4a1bbdc2f9..20cb7eb81b 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -197,7 +197,7 @@ #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. #define B_TRAINER_CLASS_POKE_BALLS GEN_LATEST // In Gen7+, trainers will use certain types of Poké Balls depending on their trainer class. -#define B_OBEDIENCE_MECHANICS GEN_LATEST // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level +#define B_OBEDIENCE_MECHANICS GEN_7 // In PLA+ (here Gen8+), obedience restrictions also apply to non-outsider Pokémon, albeit based on their level met rather than actual level #define B_USE_FROSTBITE FALSE // In PLA, Frostbite replaces Freeze. Enabling this flag does the same here. Moves can still be cherry-picked to either Freeze or Frostbite. Freeze-Dry, Secret Power & Tri Attack depend on this config. // Animation Settings From 2abf1c56f91c3abba672857bbc004930a0540ded Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 12 May 2023 23:23:52 +0200 Subject: [PATCH 208/229] Use AI_PARTY->mons in SetBattlerData Use gBattlerPartyIndexes --- src/battle_ai_util.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index e187a06a98..54bbf0bd7a 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -590,7 +590,8 @@ void SetBattlerData(u8 battlerId) { if (!BattlerHasAi(battlerId)) { - u32 i, species, illusionSpecies; + u32 i, species, illusionSpecies, side; + side = GetBattlerSide(battlerId); // Simulate Illusion species = gBattleMons[battlerId].species; @@ -608,22 +609,22 @@ void SetBattlerData(u8 battlerId) } // Use the known battler's ability. - if (BATTLE_HISTORY->abilities[battlerId] != ABILITY_NONE) - gBattleMons[battlerId].ability = BATTLE_HISTORY->abilities[battlerId]; + if (AI_PARTY->mons[side][gBattlerPartyIndexes[battlerId]].ability != ABILITY_NONE) + gBattleMons[battlerId].ability = AI_PARTY->mons[side][gBattlerPartyIndexes[battlerId]].ability; // Check if mon can only have one ability. else if (gSpeciesInfo[species].abilities[1] == ABILITY_NONE - || gSpeciesInfo[species].abilities[1] == gSpeciesInfo[species].abilities[0]) + || gSpeciesInfo[species].abilities[1] == gSpeciesInfo[species].abilities[0]) gBattleMons[battlerId].ability = gSpeciesInfo[species].abilities[0]; // The ability is unknown. else gBattleMons[battlerId].ability = ABILITY_NONE; - if (BATTLE_HISTORY->itemEffects[battlerId] == 0) + if (AI_PARTY->mons[side][gBattlerPartyIndexes[battlerId]].heldEffect == 0) gBattleMons[battlerId].item = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { - if (BATTLE_HISTORY->usedMoves[battlerId][i] == 0) + if (AI_PARTY->mons[side][gBattlerPartyIndexes[battlerId]].moves[i] == 0) gBattleMons[battlerId].moves[i] = 0; } } From d4c7e5e5595d85f25f4ab078d64dd3a02dce49e1 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 23 May 2023 14:03:38 -0700 Subject: [PATCH 209/229] changed B_WEATHER_FORM preproc to affect tables instead of function --- include/config/battle.h | 1 - src/battle_script_commands.c | 2 -- src/battle_util.c | 2 +- src/data/pokemon/form_change_tables.h | 8 ++++++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/config/battle.h b/include/config/battle.h index d0b5366ecd..4a1bbdc2f9 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -101,7 +101,6 @@ #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. #define B_TRANSFORM_SHINY GEN_LATEST // In Gen4+, Transform will copy the shiny state of the opponent instead of maintaining its own shiny state. #define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. -#define B_WEATHER_FORM_SUPPRESS GEN_LATEST // In Gen5+, Cherrim and Castform revert to their normal forms upon losing their ability. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c85446a343..47a98ac9e3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16605,7 +16605,6 @@ void BS_ItemRestorePP(void) void BS_TryRevertWeatherForm(void) { NATIVE_ARGS(); -#if B_WEATHER_FORM_SUPPRESS >= GEN_5 if (TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER)) { gBattleScripting.battler = gBattlerTarget; @@ -16613,7 +16612,6 @@ void BS_TryRevertWeatherForm(void) gBattlescriptCurrInstr = BattleScript_TargetFormChangeWithStringNoPopup; return; } -#endif gBattlescriptCurrInstr = cmd->nextInstr; } diff --git a/src/battle_util.c b/src/battle_util.c index 3f0e101f08..7c0d3f8cc8 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10167,7 +10167,7 @@ u16 GetBattleFormChangeTargetSpecies(u8 battlerId, u16 method) targetSpecies = formChanges[i].targetSpecies; } // We need to revert the weather form if the field is under Air Lock, too. - if (!WEATHER_HAS_EFFECT && formChanges[i].param1 == B_WEATHER_NONE) + else if (!WEATHER_HAS_EFFECT && formChanges[i].param1 == B_WEATHER_NONE) { targetSpecies = formChanges[i].targetSpecies; } diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 6919ca05db..ca20061578 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -156,11 +156,19 @@ static const struct FormChange sAbsolFormChangeTable[] = { }; static const struct FormChange sCastformFormChangeTable[] = { +#ifdef B_WEATHER_FORMS >= GEN_5 {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL | B_WEATHER_SNOW, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, ~(B_WEATHER_SUN | B_WEATHER_RAIN | B_WEATHER_HAIL | B_WEATHER_SNOW), ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, B_WEATHER_NONE, ABILITY_FORECAST}, +#else + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL | B_WEATHER_SNOW}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, ~(B_WEATHER_SUN | B_WEATHER_RAIN | B_WEATHER_HAIL | B_WEATHER_SNOW)}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM, B_WEATHER_NONE}, +#endif {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CASTFORM}, {FORM_CHANGE_FAINT, SPECIES_CASTFORM}, {FORM_CHANGE_END_BATTLE, SPECIES_CASTFORM}, From 34382fcece5714f04bdb68489c0f76d25c89f1ab Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 23 May 2023 14:19:24 -0700 Subject: [PATCH 210/229] fixed revive in 1v2 battles --- data/battle_scripts_2.s | 4 ++-- data/scripts/debug.inc | 6 ++++++ src/battle_script_commands.c | 13 +++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index 8d08135275..0c6c133b50 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -59,9 +59,9 @@ BattleScript_ItemRestoreHP:: end BattleScript_ItemRestoreHP_SendOutRevivedBattler: - switchinanim BS_ATTACKER, FALSE + switchinanim BS_SCRIPTING, FALSE waitstate - switchineffects BS_ATTACKER + switchineffects BS_SCRIPTING end BattleScript_ItemCureStatus:: diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index f86de38f5b..f9ac3ac238 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -68,6 +68,12 @@ Debug_FlagsNotSetBattleConfigMessage_Text: .string "'include/config/battle.h'!$" Debug_Script_1:: + givemon SPECIES_TREECKO, 20, ITEM_NONE + givemon SPECIES_TORCHIC, 20, ITEM_NONE + giveitem ITEM_REVIVE, 3 + giveitem ITEM_HYPER_POTION, 3 + setwildbattle SPECIES_UNOWN, 20, 0, SPECIES_UNOWN, 20, 0 + dowildbattle end Debug_Script_2:: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 2450e5079a..9cf0eb11d5 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16444,7 +16444,8 @@ u8 GetFirstFaintedPartyIndex(u8 battlerId) return PARTY_SIZE; } -void BS_ItemRestoreHP(void) { +void BS_ItemRestoreHP(void) +{ NATIVE_ARGS(); u16 healAmount; u32 battlerId = MAX_BATTLERS_COUNT; @@ -16499,6 +16500,7 @@ void BS_ItemRestoreHP(void) { if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && battlerId != MAX_BATTLERS_COUNT) { gAbsentBattlerFlags &= ~gBitTable[battlerId]; + gBattleScripting.battler = battlerId; gBattleCommunication[MULTIUSE_STATE] = TRUE; } } @@ -16506,7 +16508,8 @@ void BS_ItemRestoreHP(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemCureStatus(void) { +void BS_ItemCureStatus(void) +{ NATIVE_ARGS(); struct Pokemon *party = GetBattlerParty(gBattlerAttacker); @@ -16534,7 +16537,8 @@ void BS_ItemCureStatus(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemIncreaseStat(void) { +void BS_ItemIncreaseStat(void) +{ NATIVE_ARGS(); u16 statId = GetItemEffect(gLastUsedItem)[1]; u16 stages = ItemId_GetHoldEffectParam(gLastUsedItem); @@ -16542,7 +16546,8 @@ void BS_ItemIncreaseStat(void) { gBattlescriptCurrInstr = cmd->nextInstr; } -void BS_ItemRestorePP(void) { +void BS_ItemRestorePP(void) +{ NATIVE_ARGS(); const u8 *effect = GetItemEffect(gLastUsedItem); u32 i, pp, maxPP, moveId, loopEnd; From a9a32651acf4d6531b5752b8a776d9affa001f59 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 23 May 2023 15:41:25 -0700 Subject: [PATCH 211/229] fixed player not being able to cancel partner action after item --- src/battle_controller_player.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index b9eb566c02..c88dbff78f 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -312,13 +312,10 @@ static void HandleInputChooseAction(void) && !(gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]) && !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) { + // Return item to bag if partner had selected one. if (gBattleResources->bufferA[gActiveBattler][1] == B_ACTION_USE_ITEM) { - // Add item to bag if it is a ball - if (itemId <= LAST_BALL) - AddBagItem(itemId, 1); - else - return; + AddBagItem(itemId, 1); } PlaySE(SE_SELECT); BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0); From bb10b0d1b053425d2fc53c29cb94179d1820ffbf Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 23 May 2023 15:50:51 -0700 Subject: [PATCH 212/229] fixed GetBattlerSide, removed debug script --- data/scripts/debug.inc | 6 ------ src/battle_script_commands.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index f9ac3ac238..f86de38f5b 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -68,12 +68,6 @@ Debug_FlagsNotSetBattleConfigMessage_Text: .string "'include/config/battle.h'!$" Debug_Script_1:: - givemon SPECIES_TREECKO, 20, ITEM_NONE - givemon SPECIES_TORCHIC, 20, ITEM_NONE - giveitem ITEM_REVIVE, 3 - giveitem ITEM_HYPER_POTION, 3 - setwildbattle SPECIES_UNOWN, 20, 0, SPECIES_UNOWN, 20, 0 - dowildbattle end Debug_Script_2:: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9cf0eb11d5..9970f1d130 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -16324,7 +16324,7 @@ void BS_CheckParentalBondCounter(void) void BS_GetBattlerSide(void) { NATIVE_ARGS(u8 battler); - gBattleCommunication[0] = GetBattlerSide(cmd->battler); + gBattleCommunication[0] = GetBattlerSide(GetBattlerForBattleScript(cmd->battler)); gBattlescriptCurrInstr = cmd->nextInstr; } From 6a92caa9fbfa3bf08c385000cb2d0187a6b7bef6 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 23 May 2023 16:10:26 -0700 Subject: [PATCH 213/229] removed old B_WEATHER_FORMS use, tests now have assumptions for config --- src/battle_util.c | 10 ---------- src/data/pokemon/form_change_tables.h | 8 +++++++- test/ability_flower_gift.c | 1 + test/ability_forecast.c | 1 + 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 7c0d3f8cc8..fec8d013d7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4759,12 +4759,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; -#if B_WEATHER_FORMS < GEN_5 - default: - if (gBattleMons[battler].species == SPECIES_CHERRIM) - goto TRY_WEATHER_FORM; - break; -#endif } break; case ABILITYEFFECT_ENDTURN: // 1 @@ -6037,11 +6031,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move switch (gLastUsedAbility) { case ABILITY_FORECAST: -#if B_WEATHER_FORMS >= GEN_5 case ABILITY_FLOWER_GIFT: -#else - TRY_WEATHER_FORM: -#endif if ((IsBattlerWeatherAffected(battler, gBattleWeather) || gBattleWeather == B_WEATHER_NONE || !WEATHER_HAS_EFFECT) // Air Lock active diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index ca20061578..1d9b0e8dc9 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -156,7 +156,7 @@ static const struct FormChange sAbsolFormChangeTable[] = { }; static const struct FormChange sCastformFormChangeTable[] = { -#ifdef B_WEATHER_FORMS >= GEN_5 +#if B_WEATHER_FORMS >= GEN_5 {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN, ABILITY_FORECAST}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL | B_WEATHER_SNOW, ABILITY_FORECAST}, @@ -239,9 +239,15 @@ static const struct FormChange sBurmyFormChangeTable[] = { }; static const struct FormChange sCherrimFormChangeTable[] = { +#if B_WEATHER_FORMS >= GEN_5 {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN, ABILITY_FLOWER_GIFT}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN, ABILITY_FLOWER_GIFT}, {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE, ABILITY_FLOWER_GIFT}, +#else + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN}, + {FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE}, +#endif {FORM_CHANGE_BATTLE_SWITCH, SPECIES_CHERRIM}, {FORM_CHANGE_FAINT, SPECIES_CHERRIM}, {FORM_CHANGE_END_BATTLE, SPECIES_CHERRIM}, diff --git a/test/ability_flower_gift.c b/test/ability_flower_gift.c index 1967b874d6..dd01736a24 100644 --- a/test/ability_flower_gift.c +++ b/test/ability_flower_gift.c @@ -38,6 +38,7 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when weather c SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when its ability is suppressed") { GIVEN { + ASSUME(B_WEATHER_FORMS >= GEN_5); PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/ability_forecast.c b/test/ability_forecast.c index 826ba0e99b..96559706ac 100644 --- a/test/ability_forecast.c +++ b/test/ability_forecast.c @@ -237,6 +237,7 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform when weather changes") SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when its ability is suppressed") { GIVEN { + ASSUME(B_WEATHER_FORMS >= GEN_5); PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { From 84d9cd03964641c11d908bc854cd4543c18ecc53 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 24 May 2023 08:24:44 -0400 Subject: [PATCH 214/229] Fixed compile issue when disabling overworld debug menu (#3024) --- data/scripts/debug.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index f86de38f5b..f9ec4eeffd 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -1,3 +1,5 @@ +.if DEBUG_OVERWORLD_MENU == TRUE + Debug_ShowFieldMessageStringVar4:: special ShowFieldMessageStringVar4 waitmessage @@ -109,3 +111,5 @@ Debug_SaveBlock2Size:: Debug_PokemonStorageSize:: .string "{PKMN}Storage size: {STR_VAR_1}/{STR_VAR_2}.$" + +.endif From de2d86408fa92d4cc9b73935935135c3c75ead0d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 24 May 2023 09:08:05 -0400 Subject: [PATCH 215/229] Fixed Mimikyu's Disguise not breaking --- src/battle_script_commands.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index dd27429ec9..c9d6ff988b 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2513,6 +2513,7 @@ static void Cmd_datahpupdate(void) gBattleMons[gActiveBattler].species = SPECIES_MIMIKYU_BUSTED; BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_TargetFormChange; + return; } else { From 14f7e49099b18fd6c5aa185781ba84925f3254a2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 23 May 2023 13:16:18 -0400 Subject: [PATCH 216/229] Add some missing palette macro use --- gflib/sprite.c | 2 +- include/gba/defines.h | 12 +++--- include/palette.h | 3 +- src/battle_anim.c | 16 +------ src/battle_anim_effects_1.c | 6 +-- src/battle_anim_effects_2.c | 2 +- src/battle_anim_effects_3.c | 18 ++++---- src/battle_anim_flying.c | 8 ++-- src/battle_anim_ghost.c | 2 +- src/battle_anim_mons.c | 9 ++-- src/battle_anim_psychic.c | 2 +- src/battle_anim_status_effects.c | 8 ++-- src/battle_anim_utility_funcs.c | 8 ++-- src/battle_anim_water.c | 8 ++-- src/battle_bg.c | 3 +- src/battle_factory_screen.c | 18 ++++---- src/battle_gfx_sfx_util.c | 8 ++-- src/battle_interface.c | 2 +- src/battle_message.c | 8 ++-- src/battle_pyramid.c | 2 +- src/battle_records.c | 2 +- src/battle_script_commands.c | 2 +- src/battle_transition.c | 4 +- src/berry_blender.c | 5 ++- src/berry_tag_screen.c | 2 +- src/contest.c | 34 +++++++-------- src/contest_util.c | 2 +- src/decoration.c | 4 +- src/diploma.c | 2 +- src/easy_chat.c | 12 +++--- src/evolution_graphics.c | 8 ++-- src/evolution_scene.c | 6 +-- src/field_effect.c | 25 ++++++----- src/field_special_scene.c | 2 +- src/field_weather.c | 24 +++++------ src/fieldmap.c | 2 +- src/fldeff_flash.c | 2 +- src/fldeff_sweetscent.c | 6 +-- src/hall_of_fame.c | 6 +-- src/intro.c | 50 +++++++++++----------- src/intro_credits_graphics.c | 8 ++-- src/link.c | 2 +- src/list_menu.c | 6 +-- src/mail.c | 21 ++++----- src/main_menu.c | 4 +- src/mirage_tower.c | 3 +- src/naming_screen.c | 10 ++--- src/palette.c | 10 ++--- src/party_menu.c | 44 +++++++++---------- src/pokedex.c | 2 +- src/pokedex_area_region_map.c | 2 +- src/pokedex_area_screen.c | 2 +- src/pokemon_icon.c | 12 ++---- src/pokemon_storage_system.c | 11 +++-- src/pokenav_conditions_search_results.c | 4 +- src/pokenav_main_menu.c | 4 +- src/pokenav_match_call_gfx.c | 10 ++--- src/pokenav_menu_handler_gfx.c | 4 +- src/pokenav_region_map.c | 2 +- src/pokenav_ribbons_list.c | 4 +- src/pokenav_ribbons_summary.c | 2 +- src/region_map.c | 2 +- src/roulette.c | 36 ++++++++-------- src/scrcmd.c | 4 +- src/slot_machine.c | 4 +- src/tileset_anims.c | 4 +- src/wireless_communication_status_screen.c | 2 +- 67 files changed, 270 insertions(+), 294 deletions(-) diff --git a/gflib/sprite.c b/gflib/sprite.c index c489eb6a4c..80fba81fe3 100644 --- a/gflib/sprite.c +++ b/gflib/sprite.c @@ -1600,7 +1600,7 @@ u8 LoadSpritePalette(const struct SpritePalette *palette) else { sSpritePaletteTags[index] = palette->tag; - DoLoadSpritePalette(palette->data, index * 16); + DoLoadSpritePalette(palette->data, PLTT_ID(index)); return index; } } diff --git a/include/gba/defines.h b/include/gba/defines.h index 82caf56e68..10e84b8b1a 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -27,14 +27,12 @@ #define IWRAM_START 0x03000000 #define IWRAM_END (IWRAM_START + 0x8000) -#define PLTT 0x5000000 -#define PLTT_SIZE 0x400 - -#define BG_PLTT PLTT -#define BG_PLTT_SIZE 0x200 - -#define OBJ_PLTT (PLTT + 0x200) +#define PLTT 0x5000000 +#define BG_PLTT PLTT +#define BG_PLTT_SIZE 0x200 +#define OBJ_PLTT (PLTT + BG_PLTT_SIZE) #define OBJ_PLTT_SIZE 0x200 +#define PLTT_SIZE (BG_PLTT_SIZE + OBJ_PLTT_SIZE) #define VRAM 0x6000000 #define VRAM_SIZE 0x18000 diff --git a/include/palette.h b/include/palette.h index 29723ef6c8..d23a658b4a 100644 --- a/include/palette.h +++ b/include/palette.h @@ -6,8 +6,7 @@ #define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade #define gPaletteFade_submode (gPaletteFade.multipurpose2) // fast fade -#define PLTT_BUFFER_SIZE 0x200 -#define PLTT_DECOMP_BUFFER_SIZE (PLTT_BUFFER_SIZE * 2) +#define PLTT_BUFFER_SIZE (PLTT_SIZE / sizeof(u16)) #define PALETTE_FADE_STATUS_DELAY 2 #define PALETTE_FADE_STATUS_ACTIVE 1 diff --git a/src/battle_anim.c b/src/battle_anim.c index 2f5d515c02..e6e049c370 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -824,27 +824,15 @@ static void Task_UpdateMonBg(u8 taskId) if (!gTasks[taskId].t2_InBg2) { - u16 *src; - u16 *dst; - gBattle_BG1_X = x + gTasks[taskId].t2_BgX; gBattle_BG1_Y = y + gTasks[taskId].t2_BgY; - - src = &gPlttBufferFaded[0x100 + battlerId * 16]; - dst = &gPlttBufferFaded[0x100 + animBg.paletteId * 16 - 256]; - CpuCopy32(src, dst, 32); + CpuCopy32(&gPlttBufferFaded[OBJ_PLTT_ID(battlerId)], &gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId)], PLTT_SIZE_4BPP); } else { - u16 *src; - u16 *dst; - gBattle_BG2_X = x + gTasks[taskId].t2_BgX; gBattle_BG2_Y = y + gTasks[taskId].t2_BgY; - - src = &gPlttBufferFaded[0x100 + battlerId * 16]; - dst = &gPlttBufferFaded[0x100 - 112]; - CpuCopy32(src, dst, 32); + CpuCopy32(&gPlttBufferFaded[OBJ_PLTT_ID(battlerId)], &gPlttBufferFaded[BG_PLTT_ID(9)], PLTT_SIZE_4BPP); } } diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 0ee894085e..1d9a12cafb 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -3963,7 +3963,7 @@ static void AnimProtect(struct Sprite *sprite) sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker); sprite->data[0] = gBattleAnimArgs[2]; - sprite->data[2] = (IndexOfSpritePaletteTag(ANIM_TAG_PROTECT) << 4) + 0x100; + sprite->data[2] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(ANIM_TAG_PROTECT)); sprite->data[7] = 16; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - sprite->data[7], sprite->data[7])); @@ -5251,7 +5251,7 @@ void AnimTask_MusicNotesRainbowBlend(u8 taskId) index = IndexOfSpritePaletteTag(gParticlesColorBlendTable[0][0]); if (index != 0xFF) { - index = (index << 4) + 0x100; + index = OBJ_PLTT_ID(index); for (i = 1; i < ARRAY_COUNT(gParticlesColorBlendTable[0]); i++) gPlttBufferFaded[index + i] = gParticlesColorBlendTable[0][i]; } @@ -5261,7 +5261,7 @@ void AnimTask_MusicNotesRainbowBlend(u8 taskId) index = AllocSpritePalette(gParticlesColorBlendTable[j][0]); if (index != 0xFF) { - index = (index << 4) + 0x100; + index = OBJ_PLTT_ID(index); for (i = 1; i < ARRAY_COUNT(gParticlesColorBlendTable[0]); i++) gPlttBufferFaded[index + i] = gParticlesColorBlendTable[j][i]; } diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 13cfc1b4ea..89696d7dd3 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -1751,7 +1751,7 @@ void AnimTask_AirCutterProjectile(u8 taskId) static void AnimVoidLines(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); - sprite->data[0] = 0x100 + (IndexOfSpritePaletteTag(sVoidLinesSpriteTemplate.paletteTag) << 4); + sprite->data[0] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(sVoidLinesSpriteTemplate.paletteTag)); sprite->callback = AnimVoidLines_Step; } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index ca0beabd32..75a6ee22d9 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1383,11 +1383,11 @@ static void SetPsychicBackground_Step(u8 taskId) if (++gTasks[taskId].data[5] == 4) { - lastColor = gPlttBufferFaded[paletteIndex * 16 + 11]; + lastColor = gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + 11]; for (i = 10; i > 0; i--) - gPlttBufferFaded[paletteIndex * 16 + i + 1] = gPlttBufferFaded[paletteIndex * 16 + i]; + gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + i + 1] = gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + i]; - gPlttBufferFaded[paletteIndex * 16 + 1] = lastColor; + gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + 1] = lastColor; gTasks[taskId].data[5] = 0; } @@ -1409,15 +1409,15 @@ static void FadeScreenToWhite_Step(u8 taskId) if (++gTasks[taskId].data[5] == 4) { - lastColor = gPlttBufferFaded[paletteIndex * 16 + 11]; + lastColor = gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + 11]; for (i = 10; i > 0; i--) - gPlttBufferFaded[paletteIndex * 16 + i + 1] = gPlttBufferFaded[paletteIndex * 16 + i]; - gPlttBufferFaded[paletteIndex * 16 + 1] = lastColor; + gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + i + 1] = gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + i]; + gPlttBufferFaded[BG_PLTT_ID(paletteIndex) + 1] = lastColor; - lastColor = gPlttBufferUnfaded[paletteIndex * 16 + 11]; + lastColor = gPlttBufferUnfaded[BG_PLTT_ID(paletteIndex) + 11]; for (i = 10; i > 0; i--) - gPlttBufferUnfaded[paletteIndex * 16 + i + 1] = gPlttBufferUnfaded[paletteIndex * 16 + i]; - gPlttBufferUnfaded[paletteIndex * 16 + 1] = lastColor; + gPlttBufferUnfaded[BG_PLTT_ID(paletteIndex) + i + 1] = gPlttBufferUnfaded[BG_PLTT_ID(paletteIndex) + i]; + gPlttBufferUnfaded[BG_PLTT_ID(paletteIndex) + 1] = lastColor; gTasks[taskId].data[5] = 0; } diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 746e3bdd73..7e5c5e9393 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -388,17 +388,17 @@ static void AnimTask_AnimateGustTornadoPalette_Step(u8 taskId) { gTasks[taskId].data[10] = 0; data2 = gTasks[taskId].data[2]; - temp = gPlttBufferFaded[16 * data2 + 0x108]; + temp = gPlttBufferFaded[OBJ_PLTT_ID(data2) + 8]; i = 7; - base = data2 * 16; + base = PLTT_ID(data2); do { - gPlttBufferFaded[base + 0x101 + i] = gPlttBufferFaded[base + 0x100 + i]; + gPlttBufferFaded[base + OBJ_PLTT_OFFSET + 1 + i] = gPlttBufferFaded[base + OBJ_PLTT_OFFSET + i]; i--; } while (i > 0); - gPlttBufferFaded[base + 0x101] = temp; + gPlttBufferFaded[base + OBJ_PLTT_OFFSET + 1] = temp; } if (--gTasks[taskId].data[0] == 0) diff --git a/src/battle_anim_ghost.c b/src/battle_anim_ghost.c index 9b74fdada3..228ba12cee 100644 --- a/src/battle_anim_ghost.c +++ b/src/battle_anim_ghost.c @@ -627,7 +627,7 @@ static void AnimTask_SpiteTargetShadow_Step1(u8 taskId) task->data[2] = 0; task->data[3] = 16; task->data[13] = GetAnimBattlerSpriteId(ANIM_TARGET); - task->data[4] = (gSprites[task->data[13]].oam.paletteNum + 16) * 16; + task->data[4] = OBJ_PLTT_ID2(gSprites[task->data[13]].oam.paletteNum); if (position == 1) { u16 mask = DISPCNT_BG1_ON; mask2 = mask; diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index ac38c5e474..d9fd652311 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1382,18 +1382,17 @@ void SetGrayscaleOrOriginalPalette(u16 paletteNum, bool8 restoreOriginalColor) struct PlttData *originalColor; struct PlttData *destColor; u16 average; - - paletteNum *= 16; + u16 paletteOffset = PLTT_ID(paletteNum); if (!restoreOriginalColor) { for (i = 0; i < 16; i++) { - originalColor = (struct PlttData *)&gPlttBufferUnfaded[paletteNum + i]; + originalColor = (struct PlttData *)&gPlttBufferUnfaded[paletteOffset + i]; average = originalColor->r + originalColor->g + originalColor->b; average /= 3; - destColor = (struct PlttData *)&gPlttBufferFaded[paletteNum + i]; + destColor = (struct PlttData *)&gPlttBufferFaded[paletteOffset + i]; destColor->r = average; destColor->g = average; destColor->b = average; @@ -1401,7 +1400,7 @@ void SetGrayscaleOrOriginalPalette(u16 paletteNum, bool8 restoreOriginalColor) } else { - CpuCopy32(&gPlttBufferUnfaded[paletteNum], &gPlttBufferFaded[paletteNum], 32); + CpuCopy32(&gPlttBufferUnfaded[paletteOffset], &gPlttBufferFaded[paletteOffset], PLTT_SIZE_4BPP); } } diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index 978d14c4cd..f7bc6e31ae 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -468,7 +468,7 @@ static void AnimDefensiveWall(struct Sprite *sprite) sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; } - sprite->data[0] = 256 + IndexOfSpritePaletteTag(gBattleAnimArgs[2]) * 16; + sprite->data[0] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(gBattleAnimArgs[2])); if (isContest) { diff --git a/src/battle_anim_status_effects.c b/src/battle_anim_status_effects.c index 4e6b3a3402..5000e11096 100644 --- a/src/battle_anim_status_effects.c +++ b/src/battle_anim_status_effects.c @@ -424,10 +424,10 @@ static void AnimTask_FrozenIceCube_Step2(u8 taskId) { u16 temp; - temp = gPlttBufferFaded[0x100 + palIndex * 16 + 13]; - gPlttBufferFaded[0x100 + palIndex * 16 + 13] = gPlttBufferFaded[0x100 + palIndex * 16 + 14]; - gPlttBufferFaded[0x100 + palIndex * 16 + 14] = gPlttBufferFaded[0x100 + palIndex * 16 + 15]; - gPlttBufferFaded[0x100 + palIndex * 16 + 15] = temp; + temp = gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 13]; + gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 13] = gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 14]; + gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 14] = gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 15]; + gPlttBufferFaded[OBJ_PLTT_ID(palIndex) + 15] = temp; gTasks[taskId].data[2] = 0; gTasks[taskId].data[3]++; diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index d8e1e7baa3..b399bd5b5c 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -663,7 +663,7 @@ static void SetPalettesToColor(u32 selectedPalettes, u16 color) { if (selectedPalettes & 1) { - u16 curOffset = i * 16; + u16 curOffset = PLTT_ID(i); u16 paletteOffset = curOffset; while (curOffset < paletteOffset + 16) { @@ -932,7 +932,7 @@ void AnimTask_CopyPalUnfadedToBackup(u8 taskId) paletteIndex = gBattleAnimTarget + 16; } - memcpy(&gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], &gPlttBufferUnfaded[paletteIndex * 16], 32); + memcpy(&gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], &gPlttBufferUnfaded[PLTT_ID(paletteIndex)], PLTT_SIZE_4BPP); DestroyAnimVisualTask(taskId); } @@ -959,7 +959,7 @@ void AnimTask_CopyPalUnfadedFromBackup(u8 taskId) paletteIndex = gBattleAnimTarget + 16; } - memcpy(&gPlttBufferUnfaded[paletteIndex * 16], &gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], 32); + memcpy(&gPlttBufferUnfaded[PLTT_ID(paletteIndex)], &gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], PLTT_SIZE_4BPP); DestroyAnimVisualTask(taskId); } @@ -986,7 +986,7 @@ void AnimTask_CopyPalFadedToUnfaded(u8 taskId) paletteIndex = gBattleAnimTarget + 16; } - memcpy(&gPlttBufferUnfaded[paletteIndex * 16], &gPlttBufferFaded[paletteIndex * 16], 32); + memcpy(&gPlttBufferUnfaded[PLTT_ID(paletteIndex)], &gPlttBufferFaded[PLTT_ID(paletteIndex)], PLTT_SIZE_4BPP); DestroyAnimVisualTask(taskId); } diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 117dd3b88c..dc793f70a5 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -619,7 +619,7 @@ static void AnimAuroraBeamRings_Step(struct Sprite *sprite) void AnimTask_RotateAuroraRingColors(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gTasks[taskId].data[2] = IndexOfSpritePaletteTag(ANIM_TAG_RAINBOW_RINGS) * 16 + 256; + gTasks[taskId].data[2] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(ANIM_TAG_RAINBOW_RINGS)); gTasks[taskId].func = AnimTask_RotateAuroraRingColors_Step; } @@ -887,12 +887,12 @@ static void AnimTask_CreateSurfWave_Step1(u8 taskId) gTasks[taskId].data[2] += gTasks[taskId].data[1]; if (++gTasks[taskId].data[5] == 4) { - rgbBuffer = gPlttBufferFaded[animBg.paletteId * 16 + 7]; + rgbBuffer = gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId) + 7]; for (i = 6; i != 0; i--) { - gPlttBufferFaded[animBg.paletteId * 16 + 1 + i] = gPlttBufferFaded[animBg.paletteId * 16 + 1 + i - 1]; // 1 + i - 1 is needed to match for some bizarre reason + gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId) + 1 + i] = gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId) + 1 + i - 1]; // 1 + i - 1 is needed to match for some bizarre reason } - gPlttBufferFaded[animBg.paletteId * 16 + 1] = rgbBuffer; + gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId) + 1] = rgbBuffer; gTasks[taskId].data[5] = 0; } if (++gTasks[taskId].data[6] > 1) diff --git a/src/battle_bg.c b/src/battle_bg.c index b7c2b1494c..b3091d965e 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -21,6 +21,7 @@ #include "trig.h" #include "window.h" #include "constants/map_types.h" +#include "constants/rgb.h" #include "constants/songs.h" #include "constants/trainers.h" @@ -1071,7 +1072,7 @@ void InitLinkBattleVsScreen(u8 taskId) break; case 1: palId = AllocSpritePalette(TAG_VS_LETTERS); - gPlttBufferUnfaded[palId * 16 + 0x10F] = gPlttBufferFaded[palId * 16 + 0x10F] = 0x7FFF; + gPlttBufferUnfaded[OBJ_PLTT_ID(palId) + 15] = gPlttBufferFaded[OBJ_PLTT_ID(palId) + 15] = RGB_WHITE; gBattleStruct->linkBattleVsSpriteId_V = CreateSprite(&sVsLetter_V_SpriteTemplate, 111, 80, 0); gBattleStruct->linkBattleVsSpriteId_S = CreateSprite(&sVsLetter_S_SpriteTemplate, 129, 80, 0); gSprites[gBattleStruct->linkBattleVsSpriteId_V].invisible = TRUE; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 16f702c72c..0812953235 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1183,7 +1183,7 @@ static void CB2_InitSelectScreen(void) #else if (sFactorySelectScreen->fromSummaryScreen == TRUE) #endif - gPlttBufferUnfaded[228] = sFactorySelectScreen->speciesNameColorBackup; + gPlttBufferUnfaded[BG_PLTT_ID(14) + 4] = sFactorySelectScreen->speciesNameColorBackup; LoadPalette(sMonPicBg_Pal, BG_PLTT_ID(2), PLTT_SIZEOF(2)); gMain.state++; break; @@ -1449,7 +1449,7 @@ static void Select_Task_OpenSummaryScreen(u8 taskId) switch (gTasks[taskId].tState) { case STATE_SUMMARY_FADE: - gPlttBufferUnfaded[228] = gPlttBufferFaded[228]; + gPlttBufferUnfaded[BG_PLTT_ID(14) + 4] = gPlttBufferFaded[BG_PLTT_ID(14) + 4]; BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); gTasks[taskId].tState = STATE_SUMMARY_CLEAN; break; @@ -1468,7 +1468,7 @@ static void Select_Task_OpenSummaryScreen(u8 taskId) } break; case STATE_SUMMARY_SHOW: - sFactorySelectScreen->speciesNameColorBackup = gPlttBufferUnfaded[228]; + sFactorySelectScreen->speciesNameColorBackup = gPlttBufferUnfaded[BG_PLTT_ID(14) + 4]; DestroyTask(taskId); sFactorySelectScreen->fromSummaryScreen = TRUE; currMonId = sFactorySelectScreen->cursorPos; @@ -1641,8 +1641,8 @@ static void Select_Task_HandleMenu(u8 taskId) { if (sFactorySelectScreen->fromSummaryScreen == TRUE) { - gPlttBufferFaded[228] = sFactorySelectScreen->speciesNameColorBackup; - gPlttBufferUnfaded[228] = gPlttBufferUnfaded[244]; + gPlttBufferFaded[BG_PLTT_ID(14) + 4] = sFactorySelectScreen->speciesNameColorBackup; + gPlttBufferUnfaded[BG_PLTT_ID(14) + 4] = gPlttBufferUnfaded[BG_PLTT_ID(15) + 4]; } sFactorySelectScreen->fromSummaryScreen = FALSE; gTasks[taskId].tState = STATE_MENU_HANDLE_INPUT; @@ -2388,7 +2388,7 @@ static void Swap_Task_OpenSummaryScreen(u8 taskId) case STATE_SUMMARY_SHOW: DestroyTask(taskId); sFactorySwapScreen->fromSummaryScreen = TRUE; - sFactorySwapScreen->speciesNameColorBackup = gPlttBufferUnfaded[244]; + sFactorySwapScreen->speciesNameColorBackup = gPlttBufferUnfaded[BG_PLTT_ID(15) + 4]; ShowPokemonSummaryScreen(SUMMARY_MODE_NORMAL, gPlayerParty, sFactorySwapScreen->cursorPos, FRONTIER_PARTY_SIZE - 1, CB2_InitSwapScreen); break; } @@ -2761,7 +2761,7 @@ static void Swap_Task_FadeOutSpeciesName(u8 taskId) if (sFactorySwapScreen->fadeSpeciesNameCoeffDelay > 3) { sFactorySwapScreen->fadeSpeciesNameCoeffDelay = 0; - gPlttBufferUnfaded[244] = gPlttBufferFaded[228]; + gPlttBufferUnfaded[BG_PLTT_ID(15) + 4] = gPlttBufferFaded[BG_PLTT_ID(14) + 4]; sFactorySwapScreen->fadeSpeciesNameCoeff++; } BlendPalettes(0x4000, sFactorySwapScreen->fadeSpeciesNameCoeff, 0); @@ -3125,7 +3125,7 @@ static void Swap_Task_ScreenInfoTransitionIn(u8 taskId) if (gTasks[taskId].tSlideFinishedPkmn == TRUE && gTasks[taskId].tSlideFinishedCancel == TRUE) { - gPlttBufferFaded[226] = sPokeballGray_Pal[37]; + gPlttBufferFaded[BG_PLTT_ID(14) + 2] = sPokeballGray_Pal[37]; Swap_PrintActionStrings(); PutWindowTilemap(SWAP_WIN_ACTION_FADE); gTasks[taskId].tState++; @@ -3864,7 +3864,7 @@ static void Swap_PrintMonSpeciesAtFade(void) CpuCopy16(sSwapText_Pal, pal, 8); if (!sFactorySwapScreen->fromSummaryScreen) - pal[4] = gPlttBufferFaded[228]; + pal[4] = gPlttBufferFaded[BG_PLTT_ID(14) + 4]; else pal[4] = sFactorySwapScreen->speciesNameColorBackup; LoadPalette(pal, BG_PLTT_ID(15), sizeof(sSwapText_Pal)); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 0b5796487c..55ed328b89 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -598,7 +598,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != SPECIES_NONE) { BlendPalette(paletteOffset, 16, 6, RGB_WHITE); - CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, PLTT_SIZEOF(16)); + CpuCopy32(&gPlttBufferFaded[paletteOffset], &gPlttBufferUnfaded[paletteOffset], PLTT_SIZEOF(16)); } } @@ -661,7 +661,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != SPECIES_NONE) { BlendPalette(paletteOffset, 16, 6, RGB_WHITE); - CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, PLTT_SIZEOF(16)); + CpuCopy32(&gPlttBufferFaded[paletteOffset], &gPlttBufferUnfaded[paletteOffset], PLTT_SIZEOF(16)); } } @@ -909,7 +909,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform) if (gBattleSpritesDataPtr->battlerData[battlerAtk].transformSpecies != SPECIES_NONE) { BlendPalette(paletteOffset, 16, 6, RGB_WHITE); - CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, PLTT_SIZEOF(16)); + CpuCopy32(&gPlttBufferFaded[paletteOffset], &gPlttBufferUnfaded[paletteOffset], PLTT_SIZEOF(16)); } gSprites[gBattlerSpriteIds[battlerAtk]].y = GetBattlerSpriteDefault_Y(battlerAtk); } @@ -978,7 +978,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform) } BlendPalette(paletteOffset, 16, 6, RGB_WHITE); - CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, PLTT_SIZEOF(16)); + CpuCopy32(&gPlttBufferFaded[paletteOffset], &gPlttBufferUnfaded[paletteOffset], PLTT_SIZEOF(16)); if (!IsContest()) { diff --git a/src/battle_interface.c b/src/battle_interface.c index bc86ede4ac..f9a7be58ea 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2059,7 +2059,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) pltAdder += battlerId + 12; FillPalette(sStatusIconColors[statusPalId], OBJ_PLTT_OFFSET + pltAdder, PLTT_SIZEOF(1)); - CpuCopy16(gPlttBufferUnfaded + OBJ_PLTT_OFFSET + pltAdder, (u16 *)OBJ_PLTT + pltAdder, PLTT_SIZEOF(1)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_OFFSET + pltAdder], (u16 *)OBJ_PLTT + pltAdder, PLTT_SIZEOF(1)); CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96); if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT) { diff --git a/src/battle_message.c b/src/battle_message.c index f02e38f134..b02e9e445c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3025,11 +3025,11 @@ void SetPpNumbersPaletteInMoveSelection(void) u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]], chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]); - gPlttBufferUnfaded[92] = palPtr[(var * 2) + 0]; - gPlttBufferUnfaded[91] = palPtr[(var * 2) + 1]; + gPlttBufferUnfaded[BG_PLTT_ID(5) + 12] = palPtr[(var * 2) + 0]; + gPlttBufferUnfaded[BG_PLTT_ID(5) + 11] = palPtr[(var * 2) + 1]; - CpuCopy16(&gPlttBufferUnfaded[92], &gPlttBufferFaded[92], sizeof(u16)); - CpuCopy16(&gPlttBufferUnfaded[91], &gPlttBufferFaded[91], sizeof(u16)); + CpuCopy16(&gPlttBufferUnfaded[BG_PLTT_ID(5) + 12], &gPlttBufferFaded[BG_PLTT_ID(5) + 12], PLTT_SIZEOF(1)); + CpuCopy16(&gPlttBufferUnfaded[BG_PLTT_ID(5) + 11], &gPlttBufferFaded[BG_PLTT_ID(5) + 11], PLTT_SIZEOF(1)); } u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp) diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 84a439037d..07d7772f42 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1185,7 +1185,7 @@ static void Task_SetPyramidFloorPalette(u8 taskId) { if (gPaletteFade.active) { - CpuCopy16(gBattlePyramidFloor_Pal[gSaveBlock2Ptr->frontier.curChallengeBattleNum], &gPlttBufferUnfaded[96], 32); + CpuCopy16(gBattlePyramidFloor_Pal[gSaveBlock2Ptr->frontier.curChallengeBattleNum], &gPlttBufferUnfaded[BG_PLTT_ID(6)], PLTT_SIZE_4BPP); DestroyTask(taskId); } } diff --git a/src/battle_records.c b/src/battle_records.c index 4463a9ebfc..edc48d8202 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -444,7 +444,7 @@ static void LoadTrainerHillRecordsWindowGfx(u8 bgId) { LoadBgTiles(bgId, sTrainerHillWindowTileset, sizeof(sTrainerHillWindowTileset), 0); CopyToBgTilemapBufferRect(bgId, sTrainerHillWindowTilemap, 0, 0, 0x20, 0x20); - LoadPalette(sTrainerHillWindowPalette, BG_PLTT_ID(0), PLTT_SIZE_4BPP); + LoadPalette(sTrainerHillWindowPalette, BG_PLTT_ID(0), sizeof(sTrainerHillWindowPalette)); } static void VblankCB_TrainerHillRecords(void) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d12477bea8..bf9197a0e8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6013,7 +6013,7 @@ static void InitLevelUpBanner(void) gBattle_BG2_Y = 0; gBattle_BG2_X = LEVEL_UP_BANNER_START; - LoadPalette(sLevelUpBanner_Pal, BG_PLTT_ID(6), PLTT_SIZE_4BPP); + LoadPalette(sLevelUpBanner_Pal, BG_PLTT_ID(6), sizeof(sLevelUpBanner_Pal)); CopyToWindowPixelBuffer(B_WIN_LEVEL_UP_BANNER, sLevelUpBanner_Gfx, 0, 0); PutWindowTilemap(B_WIN_LEVEL_UP_BANNER); CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_FULL); diff --git a/src/battle_transition.c b/src/battle_transition.c index 4066f72e58..2e87b9c1d7 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -1069,7 +1069,7 @@ static void Task_BattleTransition(u8 taskId) static bool8 Transition_StartIntro(struct Task *task) { SetWeatherScreenFadeOut(); - CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, sizeof(gPlttBufferUnfaded)); + CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_SIZE); if (sTasks_Intro[task->tTransitionId] != NULL) { CreateTask(sTasks_Intro[task->tTransitionId], 4); @@ -4498,7 +4498,7 @@ static bool8 FrontierSquares_Shrink(struct Task *task) switch (task->tShrinkState) { case 0: - for (i = 250; i < 255; i++) + for (i = BG_PLTT_ID(15) + 10; i < BG_PLTT_ID(15) + 15; i++) { gPlttBufferUnfaded[i] = RGB_BLACK; gPlttBufferFaded[i] = RGB_BLACK; diff --git a/src/berry_blender.c b/src/berry_blender.c index cf0de017fa..10b02c86b7 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1033,11 +1033,12 @@ static void InitBerryBlenderWindows(void) s32 i; DeactivateAllTextPrinters(); - for (i = 0; i < 5; i++) + // Initialize only the main text windows (player names and message box; excludes results screen) + for (i = 0; i < WIN_RESULTS; i++) FillWindowPixelBuffer(i, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, DISPLAY_TILE_WIDTH, DISPLAY_TILE_HEIGHT); - Menu_LoadStdPalAt(0xE0); + Menu_LoadStdPalAt(BG_PLTT_ID(14)); } } diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index e43d686001..448ee33848 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -367,7 +367,7 @@ static void HandleInitWindows(void) InitWindows(sWindowTemplates); DeactivateAllTextPrinters(); - LoadPalette(sFontPalette, BG_PLTT_ID(15), PLTT_SIZE_4BPP); + LoadPalette(sFontPalette, BG_PLTT_ID(15), sizeof(sFontPalette)); for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++) PutWindowTilemap(i); ScheduleBgCopyTilemapToVram(0); diff --git a/src/contest.c b/src/contest.c index 8a1847f111..84d295f132 100644 --- a/src/contest.c +++ b/src/contest.c @@ -1076,10 +1076,10 @@ static void LoadContestPalettes(void) { s32 i; - LoadPalette(sText_Pal, BG_PLTT_ID(15), PLTT_SIZE_4BPP); + LoadPalette(sText_Pal, BG_PLTT_ID(15), sizeof(sText_Pal)); SetBackdropFromColor(RGB_BLACK); for (i = 10; i < 14; i++) - LoadPalette(gPlttBufferUnfaded + BG_PLTT_ID(15) + 1, BG_PLTT_ID(15) + i, PLTT_SIZEOF(1)); + LoadPalette(&gPlttBufferUnfaded[BG_PLTT_ID(15) + 1], BG_PLTT_ID(15) + i, PLTT_SIZEOF(1)); FillPalette(RGB(31, 17, 31), BG_PLTT_ID(15) + 3, PLTT_SIZEOF(1)); } @@ -1331,10 +1331,10 @@ static bool8 SetupContestGraphics(u8 *stateVar) break; case 5: LoadCompressedPalette(gContestInterfaceAudiencePalette, BG_PLTT_OFFSET, BG_PLTT_SIZE); - CpuCopy32(gPlttBufferUnfaded + BG_PLTT_ID(8), tempPalette1, PLTT_SIZE_4BPP); - CpuCopy32(gPlttBufferUnfaded + BG_PLTT_ID(5 + gContestPlayerMonIndex), tempPalette2, PLTT_SIZE_4BPP); - CpuCopy32(tempPalette2, gPlttBufferUnfaded + BG_PLTT_ID(8), PLTT_SIZE_4BPP); - CpuCopy32(tempPalette1, gPlttBufferUnfaded + BG_PLTT_ID(5 + gContestPlayerMonIndex), PLTT_SIZE_4BPP); + CpuCopy32(&gPlttBufferUnfaded[BG_PLTT_ID(8)], tempPalette1, PLTT_SIZE_4BPP); + CpuCopy32(&gPlttBufferUnfaded[BG_PLTT_ID(5 + gContestPlayerMonIndex)], tempPalette2, PLTT_SIZE_4BPP); + CpuCopy32(tempPalette2, &gPlttBufferUnfaded[BG_PLTT_ID(8)], PLTT_SIZE_4BPP); + CpuCopy32(tempPalette1, &gPlttBufferUnfaded[BG_PLTT_ID(5 + gContestPlayerMonIndex)], PLTT_SIZE_4BPP); DmaCopy32Defvars(3, gPlttBufferUnfaded, eContestTempSave.cachedWindowPalettes, sizeof(eContestTempSave.cachedWindowPalettes)); LoadContestPalettes(); break; @@ -1475,7 +1475,7 @@ static void Task_DisplayAppealNumberText(u8 taskId) gBattle_BG0_Y = 0; gBattle_BG2_Y = 0; ContestDebugDoPrint(); - DmaCopy32Defvars(3, gPlttBufferUnfaded, eContestTempSave.cachedPlttBufferUnfaded, PLTT_BUFFER_SIZE * 2); + DmaCopy32Defvars(3, gPlttBufferUnfaded, eContestTempSave.cachedPlttBufferUnfaded, PLTT_SIZE); ConvertIntToDecimalStringN(gStringVar1, eContest.appealNumber + 1, STR_CONV_MODE_LEFT_ALIGN, 1); if (!Contest_IsMonsTurnDisabled(gContestPlayerMonIndex)) StringCopy(gDisplayedStringBattle, gText_AppealNumWhichMoveWillBePlayed); @@ -1674,8 +1674,8 @@ static void Task_HideMoveSelectScreen(u8 taskId) } Contest_SetBgCopyFlags(0); // This seems to be a bug; it should have just copied PLTT_BUFFER_SIZE. - DmaCopy32Defvars(3, gPlttBufferFaded, eContestTempSave.cachedPlttBufferFaded, PLTT_BUFFER_SIZE * 2); - LoadPalette(eContestTempSave.cachedPlttBufferUnfaded, 0, PLTT_BUFFER_SIZE * 2); + DmaCopy32Defvars(3, gPlttBufferFaded, eContestTempSave.cachedPlttBufferFaded, PLTT_SIZE); + LoadPalette(eContestTempSave.cachedPlttBufferUnfaded, 0, PLTT_SIZE); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; gTasks[taskId].func = Task_HideApplauseMeterForAppealStart; @@ -2561,7 +2561,7 @@ static void Task_WaitForHeartSliders(u8 taskId) static void Task_RestorePlttBufferUnfaded(u8 taskId) { - DmaCopy32Defvars(3, eContestTempSave.cachedPlttBufferUnfaded, gPlttBufferUnfaded, PLTT_BUFFER_SIZE * 2); + DmaCopy32Defvars(3, eContestTempSave.cachedPlttBufferUnfaded, gPlttBufferUnfaded, PLTT_SIZE); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 2; gTasks[taskId].func = Task_WaitPrintRoundResult; @@ -4068,14 +4068,14 @@ static void UpdateBlendTaskContestantData(u8 contestant) palOffset1 = contestant + 5; DmaCopy16Defvars(3, - gPlttBufferUnfaded + palOffset1 * 16 + 10, - gPlttBufferFaded + palOffset1 * 16 + 10, - 2); - palOffset2 = (contestant + 5) * 16 + 12 + contestant; + &gPlttBufferUnfaded[PLTT_ID(palOffset1) + 10], + &gPlttBufferFaded[PLTT_ID(palOffset1) + 10], + PLTT_SIZEOF(1)); + palOffset2 = PLTT_ID(contestant + 5) + 12 + contestant; DmaCopy16Defvars(3, - gPlttBufferUnfaded + palOffset2, - gPlttBufferFaded + palOffset2, - 2); + &gPlttBufferUnfaded[palOffset2], + &gPlttBufferFaded[palOffset2], + PLTT_SIZEOF(1)); } // See comments on CreateUnusedBlendTask diff --git a/src/contest_util.c b/src/contest_util.c index 4c9e63c0b8..ec999be924 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -456,7 +456,7 @@ static void LoadContestResultsBgGfx(void) CopyToBgTilemapBuffer(2, gContestResults_Interface_Tilemap, 0, 0); CopyToBgTilemapBuffer(0, gContestResults_WinnerBanner_Tilemap, 0, 0); LoadContestResultsTitleBarTilemaps(); - LoadCompressedPalette(gContestResults_Pal, BG_PLTT_ID(0), 16 * PLTT_SIZE_4BPP); + LoadCompressedPalette(gContestResults_Pal, BG_PLTT_OFFSET, BG_PLTT_SIZE); LoadPalette(sResultsTextWindow_Pal, BG_PLTT_ID(15), sizeof(sResultsTextWindow_Pal)); for (i = 0; i < CONTESTANT_COUNT; i++) diff --git a/src/decoration.c b/src/decoration.c index 6d95cfbdc3..27ef85de9e 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -688,7 +688,7 @@ static void ReturnToDecorationActionsAfterInvalidSelection(u8 taskId) static void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId) { - LoadPalette(sDecorationMenuPalette, BG_PLTT_ID(13), PLTT_SIZE_4BPP); + LoadPalette(sDecorationMenuPalette, BG_PLTT_ID(13), sizeof(sDecorationMenuPalette)); ClearDialogWindowAndFrame(0, FALSE); RemoveDecorationWindow(WINDOW_MAIN_MENU); InitDecorationCategoriesWindow(taskId); @@ -834,7 +834,7 @@ static void ReturnToActionsMenuFromCategories(u8 taskId) void ShowDecorationCategoriesWindow(u8 taskId) { - LoadPalette(sDecorationMenuPalette, BG_PLTT_ID(13), PLTT_SIZE_4BPP); + LoadPalette(sDecorationMenuPalette, BG_PLTT_ID(13), sizeof(sDecorationMenuPalette)); ClearDialogWindowAndFrame(0, FALSE); gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_TRADE; sCurDecorationCategory = DECORCAT_DESK; diff --git a/src/diploma.c b/src/diploma.c index 4f62644924..2a18867450 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -72,7 +72,7 @@ void CB2_ShowDiploma(void) ResetSpriteData(); ResetPaletteFade(); FreeAllSpritePalettes(); - LoadPalette(sDiplomaPalettes, BG_PLTT_ID(0), 2 * PLTT_SIZE_4BPP); + LoadPalette(sDiplomaPalettes, BG_PLTT_ID(0), sizeof(sDiplomaPalettes)); sDiplomaTilemapPtr = Alloc(0x1000); InitDiplomaBg(); InitDiplomaWindow(); diff --git a/src/easy_chat.c b/src/easy_chat.c index 35ba633cf4..5c910dced1 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3930,12 +3930,12 @@ static void LoadEasyChatPalettes(void) { ResetPaletteFade(); LoadPalette(gEasyChatMode_Pal, BG_PLTT_ID(0), PLTT_SIZE_4BPP); - LoadPalette(sTextInputFrameOrange_Pal, BG_PLTT_ID(1), PLTT_SIZE_4BPP); - LoadPalette(sTextInputFrameGreen_Pal, BG_PLTT_ID(4), PLTT_SIZE_4BPP); - LoadPalette(sTitleText_Pal, BG_PLTT_ID(10), PLTT_SIZEOF(4)); - LoadPalette(sText_Pal, BG_PLTT_ID(11), PLTT_SIZEOF(6)); - LoadPalette(sText_Pal, BG_PLTT_ID(15), PLTT_SIZEOF(6)); - LoadPalette(sText_Pal, BG_PLTT_ID(3), PLTT_SIZEOF(6)); + LoadPalette(sTextInputFrameOrange_Pal, BG_PLTT_ID(1), sizeof(sTextInputFrameOrange_Pal)); + LoadPalette(sTextInputFrameGreen_Pal, BG_PLTT_ID(4), sizeof(sTextInputFrameGreen_Pal)); + LoadPalette(sTitleText_Pal, BG_PLTT_ID(10), sizeof(sTitleText_Pal)); + LoadPalette(sText_Pal, BG_PLTT_ID(11), sizeof(sText_Pal)); + LoadPalette(sText_Pal, BG_PLTT_ID(15), sizeof(sText_Pal)); + LoadPalette(sText_Pal, BG_PLTT_ID(3), sizeof(sText_Pal)); } static void PrintTitle(void) diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index a86f16201f..96ff1b52df 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -409,7 +409,7 @@ static void Task_Sparkles_SprayAndFlash_Init(u8 taskId) { SetEvoSparklesMatrices(); gTasks[taskId].tTimer = 0; - CpuSet(&gPlttBufferFaded[0x20], &gPlttBufferUnfaded[0x20], 0x30); + CpuCopy16(&gPlttBufferFaded[BG_PLTT_ID(2)], &gPlttBufferUnfaded[BG_PLTT_ID(2)], 3 * PLTT_SIZE_4BPP); BeginNormalPaletteFade(0xFFF9041C, 0, 0, 0x10, RGB_WHITE); // was 0xFFF9001C in R/S gTasks[taskId].func = Task_Sparkles_SprayAndFlash; PlaySE(SE_M_PETAL_DANCE); @@ -458,7 +458,7 @@ static void Task_Sparkles_SprayAndFlashTrade_Init(u8 taskId) { SetEvoSparklesMatrices(); gTasks[taskId].tTimer = 0; - CpuSet(&gPlttBufferFaded[0x20], &gPlttBufferUnfaded[0x20], 0x30); + CpuCopy16(&gPlttBufferFaded[BG_PLTT_ID(2)], &gPlttBufferUnfaded[BG_PLTT_ID(2)], 3 * PLTT_SIZE_4BPP); BeginNormalPaletteFade(0xFFF90400, 0, 0, 0x10, RGB_WHITE); // was 0xFFFF0001 in R/S gTasks[taskId].func = Task_Sparkles_SprayAndFlashTrade; PlaySE(SE_M_PETAL_DANCE); @@ -536,13 +536,13 @@ u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId) gSprites[preEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[preEvoSpriteId].oam.matrixNum = MATRIX_PRE_EVO; gSprites[preEvoSpriteId].invisible = FALSE; - CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[OBJ_PLTT_ID(gSprites[preEvoSpriteId].oam.paletteNum)], 16); gSprites[postEvoSpriteId].callback = SpriteCB_EvolutionMonSprite; gSprites[postEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[postEvoSpriteId].oam.matrixNum = MATRIX_POST_EVO; gSprites[postEvoSpriteId].invisible = FALSE; - CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[OBJ_PLTT_ID(gSprites[postEvoSpriteId].oam.paletteNum)], 16); gTasks[taskId].tEvoStopped = FALSE; return taskId; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index eeb22edd24..3b92a0c435 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -298,7 +298,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u gTasks[id].tEvoWasStopped = FALSE; gTasks[id].tPartyId = partyId; - memcpy(&sEvoStructPtr->savedPalette, &gPlttBufferUnfaded[0x20], sizeof(sEvoStructPtr->savedPalette)); + memcpy(&sEvoStructPtr->savedPalette, &gPlttBufferUnfaded[BG_PLTT_ID(2)], sizeof(sEvoStructPtr->savedPalette)); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_1D_MAP); @@ -741,7 +741,7 @@ static void Task_EvolutionScene(u8 taskId) if (IsSEPlaying()) { m4aMPlayAllStop(); - memcpy(&gPlttBufferUnfaded[0x20], sEvoStructPtr->savedPalette, sizeof(sEvoStructPtr->savedPalette)); + memcpy(&gPlttBufferUnfaded[BG_PLTT_ID(2)], sEvoStructPtr->savedPalette, sizeof(sEvoStructPtr->savedPalette)); RestoreBgAfterAnim(); BeginNormalPaletteFade(0x1C, 0, 0x10, 0, RGB_BLACK); gTasks[taskId].tState++; @@ -1170,7 +1170,7 @@ static void Task_TradeEvolutionScene(u8 taskId) // Restore bg, do mon anim/cry Free(sBgAnimPal); EvoScene_DoMonAnimAndCry(sEvoStructPtr->postEvoSpriteId, gTasks[taskId].tPostEvoSpecies); - memcpy(&gPlttBufferUnfaded[0x20], sEvoStructPtr->savedPalette, sizeof(sEvoStructPtr->savedPalette)); + memcpy(&gPlttBufferUnfaded[BG_PLTT_ID(2)], sEvoStructPtr->savedPalette, sizeof(sEvoStructPtr->savedPalette)); gTasks[taskId].tState++; } break; diff --git a/src/field_effect.c b/src/field_effect.c index 7cae89d22f..d51c6ab88a 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -900,7 +900,8 @@ u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buf return CreateSprite(&spriteTemplate, x, y, subpriority); } -void LoadTrainerGfx_TrainerCard(u8 gender, u16 palOffset, u8 *dest) +// Unused +static void LoadTrainerGfx_TrainerCard(u8 gender, u16 palOffset, u8 *dest) { LZDecompressVram(gTrainerFrontPicTable[gender].data, dest); LoadCompressedPalette(gTrainerFrontPicPaletteTable[gender].data, palOffset, PLTT_SIZE_4BPP); @@ -1190,14 +1191,14 @@ static void PokeballGlowEffect_Flash1(struct Sprite *sprite) sprite->data[3]++; } phase = (sprite->sCounter + 3) & 3; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 8, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); phase = (sprite->sCounter + 2) & 3; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 6, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); phase = (sprite->sCounter + 1) & 3; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 2, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); phase = sprite->sCounter; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 5, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 3, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); if (sprite->data[3] > 2) { sprite->sState++; @@ -1221,19 +1222,17 @@ static void PokeballGlowEffect_Flash2(struct Sprite *sprite) } } phase = sprite->sCounter; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x108, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x106, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x102, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x105, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW) << 4) + 0x103, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 8, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 6, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 2, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 5, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 3, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]); } static void PokeballGlowEffect_WaitAfterFlash(struct Sprite *sprite) { if ((--sprite->sTimer) == 0) - { sprite->sState++; - } } static void PokeballGlowEffect_Dummy(struct Sprite *sprite) diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 7c98703c6b..a2b3d6366f 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -264,7 +264,7 @@ void ExecuteTruckSequence(void) MapGridSetMetatileIdAt(4 + MAP_OFFSET, 3 + MAP_OFFSET, METATILE_InsideOfTruck_DoorClosedFloor_Bottom); DrawWholeMapView(); LockPlayerFieldControls(); - CpuFastFill(0, gPlttBufferFaded, 0x400); + CpuFastFill(0, gPlttBufferFaded, PLTT_SIZE); CreateTask(Task_HandleTruckSequence, 0xA); } diff --git a/src/field_weather.c b/src/field_weather.c index 92863dee5f..73aef3746d 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -156,7 +156,7 @@ void StartWeather(void) if (!FuncIsActiveTask(Task_WeatherMain)) { u8 index = AllocSpritePalette(PALTAG_WEATHER); - CpuCopy32(gFogPalette, &gPlttBufferUnfaded[0x100 + index * 16], 32); + CpuCopy32(gFogPalette, &gPlttBufferUnfaded[OBJ_PLTT_ID(index)], PLTT_SIZE_4BPP); BuildColorMaps(); gWeatherPtr->contrastColorMapSpritePalIndex = index; gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(PALTAG_WEATHER_2); @@ -471,7 +471,7 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex) if (colorMapIndex > 0) { colorMapIndex--; - palOffset = startPalIndex * 16; + palOffset = PLTT_ID(startPalIndex); numPalettes += startPalIndex; curPalIndex = startPalIndex; @@ -481,7 +481,7 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex) if (sPaletteColorMapTypes[curPalIndex] == COLOR_MAP_NONE) { // No palette change. - CpuFastCopy(gPlttBufferUnfaded + palOffset, gPlttBufferFaded + palOffset, 16 * sizeof(u16)); + CpuFastCopy(&gPlttBufferUnfaded[palOffset], &gPlttBufferFaded[palOffset], PLTT_SIZE_4BPP); palOffset += 16; } else @@ -511,7 +511,7 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex) { // A negative gammIndex value means that the blending will come from the special Drought weather's palette tables. colorMapIndex = -colorMapIndex - 1; - palOffset = startPalIndex * 16; + palOffset = PLTT_ID(startPalIndex); numPalettes += startPalIndex; curPalIndex = startPalIndex; @@ -520,7 +520,7 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex) if (sPaletteColorMapTypes[curPalIndex] == COLOR_MAP_NONE) { // No palette change. - CpuFastCopy(gPlttBufferUnfaded + palOffset, gPlttBufferFaded + palOffset, 16 * sizeof(u16)); + CpuFastCopy(&gPlttBufferUnfaded[palOffset], &gPlttBufferFaded[palOffset], PLTT_SIZE_4BPP); palOffset += 16; } else @@ -538,7 +538,7 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex) else { // No palette blending. - CpuFastCopy(gPlttBufferUnfaded + startPalIndex * 16, gPlttBufferFaded + startPalIndex * 16, numPalettes * 16 * sizeof(u16)); + CpuFastCopy(&gPlttBufferUnfaded[PLTT_ID(startPalIndex)], &gPlttBufferFaded[PLTT_ID(startPalIndex)], numPalettes * PLTT_SIZE_4BPP); } } @@ -552,7 +552,7 @@ static void ApplyColorMapWithBlend(u8 startPalIndex, u8 numPalettes, s8 colorMap u8 gBlend = color.g; u8 bBlend = color.b; - palOffset = BG_PLTT_ID(startPalIndex); + palOffset = PLTT_ID(startPalIndex); numPalettes += startPalIndex; colorMapIndex--; curPalIndex = startPalIndex; @@ -666,8 +666,8 @@ static void ApplyFogBlend(u8 blendCoeff, u16 blendColor) { if (LightenSpritePaletteInFog(curPalIndex)) { - u16 palEnd = (curPalIndex + 1) * 16; - u16 palOffset = curPalIndex * 16; + u16 palEnd = PLTT_ID(curPalIndex + 1); + u16 palOffset = PLTT_ID(curPalIndex); while (palOffset < palEnd) { @@ -786,7 +786,7 @@ void FadeScreen(u8 mode, s8 delay) if (fadeOut) { if (useWeatherPal) - CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_BUFFER_SIZE * 2); + CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_SIZE); BeginNormalPaletteFade(PALETTES_ALL, delay, 0, 16, fadeColor); gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_OUT; @@ -824,14 +824,14 @@ void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex) { if (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL) MarkFogSpritePalToLighten(paletteIndex); - paletteIndex *= 16; + paletteIndex = PLTT_ID(paletteIndex); for (i = 0; i < 16; i++) gPlttBufferFaded[paletteIndex + i] = gWeatherPtr->fadeDestColor; } break; case WEATHER_PAL_STATE_SCREEN_FADING_OUT: paletteIndex = PLTT_ID(paletteIndex); - CpuFastCopy(gPlttBufferFaded + paletteIndex, gPlttBufferUnfaded + paletteIndex, PLTT_SIZE_4BPP); + CpuFastCopy(&gPlttBufferFaded[paletteIndex], &gPlttBufferUnfaded[paletteIndex], PLTT_SIZE_4BPP); BlendPalette(paletteIndex, 16, gPaletteFade.y, gPaletteFade.blendColor); break; // WEATHER_PAL_STATE_CHANGING_WEATHER diff --git a/src/fieldmap.c b/src/fieldmap.c index df4db47b53..bdacf7ab25 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -871,7 +871,7 @@ static void ApplyGlobalTintToPaletteSlot(u8 slot, u8 count) } -void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u16 size) +static void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u16 size) { u16 black = RGB_BLACK; diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index 87d0117410..5c7d23b5ac 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -270,7 +270,7 @@ static void Task_ExitCaveTransition4(u8 taskId) if (count < 8) { gTasks[taskId].data[2]++; - LoadPalette(&sCaveTransitionPalette_Exit[count], BG_PLTT_ID(14), PLTT_SIZEOF(8) - PLTT_SIZEOF(count)); + LoadPalette(&sCaveTransitionPalette_Exit[count], BG_PLTT_ID(14), sizeof(sCaveTransitionPalette_Exit) - PLTT_SIZEOF(count)); } else { diff --git a/src/fldeff_sweetscent.c b/src/fldeff_sweetscent.c index 7e93526094..dd979c77a8 100644 --- a/src/fldeff_sweetscent.c +++ b/src/fldeff_sweetscent.c @@ -52,8 +52,8 @@ static void StartSweetScentFieldEffect(void) u8 taskId; PlaySE(SE_M_SWEET_SCENT); - CpuFastSet(gPlttBufferUnfaded, gPaletteDecompressionBuffer, 0x100); - CpuFastSet(gPlttBufferFaded, gPlttBufferUnfaded, 0x100); + CpuFastCopy(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_SIZE); + CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_SIZE); BeginNormalPaletteFade(~(1 << (gSprites[GetPlayerAvatarSpriteId()].oam.paletteNum + 16)), 4, 0, 8, RGB_RED); taskId = CreateTask(TrySweetScentEncounter, 0); gTasks[taskId].data[0] = 0; @@ -91,7 +91,7 @@ static void FailSweetScentEncounter(u8 taskId) { if (!gPaletteFade.active) { - CpuFastSet(gPaletteDecompressionBuffer, gPlttBufferUnfaded, 0x100); + CpuFastCopy(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_SIZE); SetWeatherPalStateIdle(); ScriptContext_SetupScript(EventScript_FailSweetScent); DestroyTask(taskId); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index f4a4c96d71..2e79a1f6b6 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -740,7 +740,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId) static void Task_Hof_HandlePaletteOnExit(u8 taskId) { - CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); + CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_SIZE); BeginNormalPaletteFade(PALETTES_ALL, 8, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Task_Hof_HandleExit; } @@ -1044,7 +1044,7 @@ static void Task_HofPC_HandlePaletteOnExit(u8 taskId) { struct HallofFameTeam *fameTeam; - CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); + CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_SIZE); fameTeam = (struct HallofFameTeam *)(gDecompressionBuffer); fameTeam->mon[0] = sDummyFameMon; ComputerScreenCloseEffect(0, 0, 0); @@ -1269,7 +1269,7 @@ static void ClearVramOamPltt_LoadHofPal(void) DmaFill16(3, 0, plttOffset, plttSize); ResetPaletteFade(); - LoadPalette(sHallOfFame_Pal, BG_PLTT_ID(0), PLTT_SIZE_4BPP); + LoadPalette(sHallOfFame_Pal, BG_PLTT_ID(0), sizeof(sHallOfFame_Pal)); } static void LoadHofGfx(void) diff --git a/src/intro.c b/src/intro.c index fd9c124670..ed50208e7d 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1188,13 +1188,13 @@ static void Task_Scene1_Load(u8 taskId) LoadSpritePalettes(sSpritePalettes_Intro1); LoadCompressedSpriteSheet(sSpriteSheet_Sparkle); LoadSpritePalettes(sSpritePalette_Sparkle); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1F0], 0x20); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1E1], 0x1E); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1D2], 0x1C); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1C3], 0x1A); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1B4], 0x18); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x1A5], 0x16); - CpuCopy16(&gPlttBufferUnfaded[0x100], &gPlttBufferUnfaded[0x196], 0x14); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(15) + 0], PLTT_SIZEOF(16 - 0)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(14) + 1], PLTT_SIZEOF(16 - 1) + 1); // Copying an extra half color? + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(13) + 2], PLTT_SIZEOF(16 - 2)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(12) + 3], PLTT_SIZEOF(16 - 3)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(11) + 4], PLTT_SIZEOF(16 - 4)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(10) + 5], PLTT_SIZEOF(16 - 5)); + CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID( 9) + 6], PLTT_SIZEOF(16 - 6)); CreateGameFreakLogoSprites(120, 80, 0); gTasks[taskId].sBigDropSpriteId = CreateWaterDrop(236, -14, 0x200, 1, 0x78, FALSE); gTasks[taskId].func = Task_Scene1_FadeIn; @@ -1884,7 +1884,7 @@ static void Task_Scene3_Groudon(u8 taskId) if (--tDelay == 0) { tDelay = 2; - CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[31], sizeof(u16)); + CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[BG_PLTT_ID(1) + 15], PLTT_SIZEOF(1)); tPalIdx += 2; if (tPalIdx == 0x1EC) tState++; @@ -1901,7 +1901,7 @@ static void Task_Scene3_Groudon(u8 taskId) if (--tDelay == 0) { tDelay = 2; - CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[31], sizeof(u16)); + CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[BG_PLTT_ID(1) + 15], PLTT_SIZEOF(1)); tPalIdx -= 2; if (tPalIdx == 0x1E0) { @@ -2143,7 +2143,7 @@ static void Task_Scene3_Kyogre(u8 taskId) if (--tDelay == 0) { tDelay = 4; - CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[47], sizeof(u16)); + CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[BG_PLTT_ID(2) + 15], PLTT_SIZEOF(1)); tPalIdx -= 2; if (tPalIdx == 0x1E0) tState++; @@ -2161,7 +2161,7 @@ static void Task_Scene3_Kyogre(u8 taskId) if (--tDelay == 0) { tDelay = 4; - CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[47], sizeof(u16)); + CpuCopy16(&gIntro3Bg_Pal[tPalIdx], &gPlttBufferFaded[BG_PLTT_ID(2) + 15], PLTT_SIZEOF(1)); tPalIdx += 2; if (tPalIdx == 0x1EE) { @@ -2492,7 +2492,7 @@ static void SpriteCB_Lightning(struct Sprite *sprite) sprite->sPalIdx = 0x1C2; sprite->sState++; case 1: - CpuCopy16(&gIntro3Bg_Pal[sprite->sPalIdx], &gPlttBufferFaded[93], 2); + CpuCopy16(&gIntro3Bg_Pal[sprite->sPalIdx], &gPlttBufferFaded[BG_PLTT_ID(5) + 13], PLTT_SIZEOF(1)); sprite->sPalIdx += 2; if (sprite->sPalIdx != 0x1CE) break; @@ -2503,7 +2503,7 @@ static void SpriteCB_Lightning(struct Sprite *sprite) if (--sprite->sDelay == 0) { sprite->sDelay = 4; - CpuCopy16(&gIntro3Bg_Pal[sprite->sPalIdx], &gPlttBufferFaded[93], 2); + CpuCopy16(&gIntro3Bg_Pal[sprite->sPalIdx], &gPlttBufferFaded[BG_PLTT_ID(5) + 13], PLTT_SIZEOF(1)); sprite->sPalIdx -= 2; if (sprite->sPalIdx == 0x1C0) DestroySprite(sprite); @@ -2606,7 +2606,7 @@ static void Task_RayquazaAttack(u8 taskId) case 0: if ((data[2] & 1) != 0) { - CpuCopy16(&gIntro3Bg_Pal[0x1A2 + data[1] * 2], &gPlttBufferFaded[94], 2); + CpuCopy16(&gIntro3Bg_Pal[0x1A2 + data[1] * 2], &gPlttBufferFaded[BG_PLTT_ID(5) + 14], PLTT_SIZEOF(1)); data[1]++; } if (data[1] == 6) @@ -2621,7 +2621,7 @@ static void Task_RayquazaAttack(u8 taskId) { if ((data[2] & 1) != 0) { - CpuCopy16(&gIntro3Bg_Pal[0x1A2 + data[1] * 2], &gPlttBufferFaded[88], 2); + CpuCopy16(&gIntro3Bg_Pal[0x1A2 + data[1] * 2], &gPlttBufferFaded[BG_PLTT_ID(5) + 8], PLTT_SIZEOF(1)); data[1]++; } if (data[1] == 6) @@ -2640,7 +2640,7 @@ static void Task_RayquazaAttack(u8 taskId) { if ((data[2] & 1) != 0) { - CpuCopy16(&gIntro3Bg_Pal[0x182 + data[1] * 2], &gPlttBufferFaded[92], 2); + CpuCopy16(&gIntro3Bg_Pal[0x182 + data[1] * 2], &gPlttBufferFaded[BG_PLTT_ID(5) + 12], PLTT_SIZEOF(1)); data[1]++; } if (data[1] == 6) @@ -3197,16 +3197,16 @@ static void SpriteCB_LogoLetter(struct Sprite *sprite) sprite->sColorDelay = 2; if (sprite->sTimer != 0) { - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[0x11F], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[0x114], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[0x11A], 2); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 15], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 4], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 10], PLTT_SIZEOF(1)); sprite->sTimer--; } else { - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[0x11F], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[0x114], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[0x11A], 2); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 15], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 4], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 10], PLTT_SIZEOF(1)); sprite->sState++; } } @@ -3226,9 +3226,9 @@ static void SpriteCB_LogoLetter(struct Sprite *sprite) sprite->sColorDelay = 2; if (sprite->sTimer <= COLOR_CHANGES) { - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[0x11F], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[0x114], 2); - CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[0x11A], 2); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 15], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 16], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 4], PLTT_SIZEOF(1)); + CpuCopy16(&gIntroGameFreakTextFade_Pal[sprite->sTimer + 32], &gPlttBufferFaded[OBJ_PLTT_ID(1) + 10], PLTT_SIZEOF(1)); sprite->sTimer++; } else diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c index 7593a296e8..05b5a3a050 100644 --- a/src/intro_credits_graphics.c +++ b/src/intro_credits_graphics.c @@ -998,13 +998,13 @@ void CycleSceneryPalette(u8 mode) break; if (gMain.vblankCounter1 & 4) { - x = gPlttBufferUnfaded[9]; - y = gPlttBufferUnfaded[10]; + x = gPlttBufferUnfaded[BG_PLTT_ID(0) + 9]; + y = gPlttBufferUnfaded[BG_PLTT_ID(0) + 10]; } else { - x = gPlttBufferUnfaded[10]; - y = gPlttBufferUnfaded[9]; + x = gPlttBufferUnfaded[BG_PLTT_ID(0) + 10]; + y = gPlttBufferUnfaded[BG_PLTT_ID(0) + 9]; } LoadPalette(&x, BG_PLTT_ID(0) + 9, sizeof(x)); LoadPalette(&y, BG_PLTT_ID(0) + 10, sizeof(y)); diff --git a/src/link.c b/src/link.c index 06bde1e38f..0894021b56 100644 --- a/src/link.c +++ b/src/link.c @@ -1650,7 +1650,7 @@ static void ErrorMsg_MoveCloserToPartner(void) DecompressAndLoadBgGfxUsingHeap(1, sWirelessLinkDisplayGfx, FALSE, 0, 0); CopyToBgTilemapBuffer(1, sWirelessLinkDisplayTilemap, 0, 0); CopyBgTilemapBufferToVram(1); - LoadPalette(sWirelessLinkDisplayPal, 0, 0x20); + LoadPalette(sWirelessLinkDisplayPal, BG_PLTT_ID(0), sizeof(sWirelessLinkDisplayPal)); FillWindowPixelBuffer(WIN_LINK_ERROR_TOP, PIXEL_FILL(0)); FillWindowPixelBuffer(WIN_LINK_ERROR_BOTTOM, PIXEL_FILL(0)); AddTextPrinterParameterized3(WIN_LINK_ERROR_TOP, FONT_SHORT_COPY_1, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); diff --git a/src/list_menu.c b/src/list_menu.c index 546ec6f6cd..e24442ca02 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -316,7 +316,7 @@ static void ListMenuDummyTask(u8 taskId) } -s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 drawMode, u16 tileNum, u16 palNum) +s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 drawMode, u16 tileNum, u16 palOffset) { switch (sMysteryGiftLinkMenu.state) { @@ -326,9 +326,9 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str switch (drawMode) { case 2: - LoadUserWindowBorderGfx(sMysteryGiftLinkMenu.windowId, tileNum, palNum); + LoadUserWindowBorderGfx(sMysteryGiftLinkMenu.windowId, tileNum, palOffset); case 1: - DrawTextBorderOuter(sMysteryGiftLinkMenu.windowId, tileNum, palNum / 16); + DrawTextBorderOuter(sMysteryGiftLinkMenu.windowId, tileNum, palOffset / 16); break; } gMultiuseListMenuTemplate = *listMenuTemplate; diff --git a/src/mail.c b/src/mail.c index a6f3bc0ffd..424a286f3f 100644 --- a/src/mail.c +++ b/src/mail.c @@ -551,9 +551,7 @@ static bool8 MailReadBuildGraphics(void) break; case 9: if (FreeTempTileDataBuffersIfPossible()) - { return FALSE; - } break; case 10: FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, DISPLAY_TILE_WIDTH, DISPLAY_TILE_HEIGHT); @@ -567,23 +565,20 @@ static bool8 MailReadBuildGraphics(void) break; case 12: LoadPalette(GetOverworldTextboxPalettePtr(), BG_PLTT_ID(15), PLTT_SIZE_4BPP); + gPlttBufferUnfaded[BG_PLTT_ID(15) + 10] = sMailGraphics[sMailRead->mailType].textColor; + gPlttBufferFaded[BG_PLTT_ID(15) + 10] = sMailGraphics[sMailRead->mailType].textColor; + gPlttBufferUnfaded[BG_PLTT_ID(15) + 11] = sMailGraphics[sMailRead->mailType].textShadow; + gPlttBufferFaded[BG_PLTT_ID(15) + 11] = sMailGraphics[sMailRead->mailType].textShadow; - gPlttBufferUnfaded[250] = sMailGraphics[sMailRead->mailType].textColor; - gPlttBufferFaded[250] = sMailGraphics[sMailRead->mailType].textColor; - gPlttBufferUnfaded[251] = sMailGraphics[sMailRead->mailType].textShadow; - gPlttBufferFaded[251] = sMailGraphics[sMailRead->mailType].textShadow; LoadPalette(sMailGraphics[sMailRead->mailType].palette, BG_PLTT_ID(0), PLTT_SIZE_4BPP); - - gPlttBufferUnfaded[10] = sBgColors[gSaveBlock2Ptr->playerGender][0]; - gPlttBufferFaded[10] = sBgColors[gSaveBlock2Ptr->playerGender][0]; - gPlttBufferUnfaded[11] = sBgColors[gSaveBlock2Ptr->playerGender][1]; - gPlttBufferFaded[11] = sBgColors[gSaveBlock2Ptr->playerGender][1]; + gPlttBufferUnfaded[BG_PLTT_ID(0) + 10] = sBgColors[gSaveBlock2Ptr->playerGender][0]; + gPlttBufferFaded[BG_PLTT_ID(0) + 10] = sBgColors[gSaveBlock2Ptr->playerGender][0]; + gPlttBufferUnfaded[BG_PLTT_ID(0) + 11] = sBgColors[gSaveBlock2Ptr->playerGender][1]; + gPlttBufferFaded[BG_PLTT_ID(0) + 11] = sBgColors[gSaveBlock2Ptr->playerGender][1]; break; case 13: if (sMailRead->hasText) - { BufferMailText(); - } break; case 14: if (sMailRead->hasText) diff --git a/src/main_menu.c b/src/main_menu.c index 6808a8f11a..ef4bbd636d 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1086,8 +1086,8 @@ static void Task_HandleMainMenuAPressed(u8 taskId) case ACTION_INVALID: gTasks[taskId].tCurrItem = 0; gTasks[taskId].func = Task_DisplayMainMenuInvalidActionError; - gPlttBufferUnfaded[0xF1] = RGB_WHITE; - gPlttBufferFaded[0xF1] = RGB_WHITE; + gPlttBufferUnfaded[BG_PLTT_ID(15) + 1] = RGB_WHITE; + gPlttBufferFaded[BG_PLTT_ID(15) + 1] = RGB_WHITE; SetGpuReg(REG_OFFSET_BG2HOFS, 0); SetGpuReg(REG_OFFSET_BG2VOFS, 0); SetGpuReg(REG_OFFSET_BG1HOFS, 0); diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 01b87393ae..f9806e7768 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -8,6 +8,7 @@ #include "gpu_regs.h" #include "menu.h" #include "random.h" +#include "palette.h" #include "palette_util.h" #include "script.h" #include "sound.h" @@ -163,7 +164,7 @@ static const struct SpriteTemplate sSpriteTemplate_FallingFossil = const struct PulseBlendSettings gMirageTowerPulseBlendSettings = { .blendColor = RGB(27, 25, 16), - .paletteOffset = 0x61, + .paletteOffset = BG_PLTT_ID(6) + 1, .numColors = 15, .delay = 5, .numFadeCycles = -1, diff --git a/src/naming_screen.c b/src/naming_screen.c index 58c9f0f369..6dd45aa7e1 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -978,10 +978,10 @@ static u16 GetButtonPalOffset(u8 button) { const u16 palOffsets[BUTTON_COUNT + 1] = { - [BUTTON_PAGE] = IndexOfSpritePaletteTag(PALTAG_PAGE_SWAP) * 16 + 0x10E, - [BUTTON_BACK] = IndexOfSpritePaletteTag(PALTAG_BACK_BUTTON) * 16 + 0x10E, - [BUTTON_OK] = IndexOfSpritePaletteTag(PALTAG_OK_BUTTON) * 16 + 0x10E, - [BUTTON_COUNT] = IndexOfSpritePaletteTag(PALTAG_OK_BUTTON) * 16 + 0x101, + [BUTTON_PAGE] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_PAGE_SWAP)) + 14, + [BUTTON_BACK] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_BACK_BUTTON)) + 14, + [BUTTON_OK] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_OK_BUTTON)) + 14, + [BUTTON_COUNT] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_OK_BUTTON)) + 1, }; return palOffsets[button]; @@ -1051,7 +1051,7 @@ static void SpriteCB_Cursor(struct Sprite *sprite) { s8 gb = sprite->sColor; s8 r = sprite->sColor >> 1; - u16 index = IndexOfSpritePaletteTag(PALTAG_CURSOR) * 16 + 0x0101; + u16 index = OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_CURSOR)) + 1; MultiplyInvertedPaletteRGBComponents(index, r, gb, gb); } diff --git a/src/palette.c b/src/palette.c index 577257eff3..6ce47a4933 100644 --- a/src/palette.c +++ b/src/palette.c @@ -64,7 +64,7 @@ static EWRAM_DATA struct PaletteStruct sPaletteStructs[NUM_PALETTE_STRUCTS] = {0 EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; static EWRAM_DATA u32 sFiller = 0; static EWRAM_DATA u32 sPlttBufferTransferPending = 0; -EWRAM_DATA u8 gPaletteDecompressionBuffer[PLTT_DECOMP_BUFFER_SIZE] = {0}; +EWRAM_DATA u8 gPaletteDecompressionBuffer[PLTT_SIZE] = {0}; static const struct PaletteStructTemplate sDummyPaletteStructTemplate = { .id = 0xFFFF, @@ -148,7 +148,7 @@ static void ReadPlttIntoBuffers(void) u16 i; u16 *pltt = (u16 *)PLTT; - for (i = 0; i < PLTT_SIZE / 2; i++) + for (i = 0; i < PLTT_BUFFER_SIZE; i++) { gPlttBufferUnfaded[i] = pltt[i]; gPlttBufferFaded[i] = pltt[i]; @@ -592,13 +592,13 @@ static u8 UpdateFastPaletteFade(void) if (gPaletteFade.objPaletteToggle) { - paletteOffsetStart = 256; - paletteOffsetEnd = 512; + paletteOffsetStart = OBJ_PLTT_OFFSET; + paletteOffsetEnd = PLTT_BUFFER_SIZE; } else { paletteOffsetStart = 0; - paletteOffsetEnd = 256; + paletteOffsetEnd = OBJ_PLTT_OFFSET; } switch (gPaletteFade_submode) diff --git a/src/party_menu.c b/src/party_menu.c index 61b694753c..02c742dc90 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -776,11 +776,11 @@ static bool8 AllocPartyMenuBgGfx(void) return FALSE; } -static void PartyPaletteBufferCopy(u8 offset) +static void PartyPaletteBufferCopy(u8 palNum) { - offset *= 16; - CpuCopy16(&gPlttBufferUnfaded[0x30], &gPlttBufferUnfaded[offset], 32); - CpuCopy16(&gPlttBufferUnfaded[0x30], &gPlttBufferFaded[offset], 32); + u8 offset = PLTT_ID(palNum); + CpuCopy16(&gPlttBufferUnfaded[BG_PLTT_ID(3)], &gPlttBufferUnfaded[offset], PLTT_SIZE_4BPP); + CpuCopy16(&gPlttBufferUnfaded[BG_PLTT_ID(3)], &gPlttBufferFaded[offset], PLTT_SIZE_4BPP); } static void FreePartyPointers(void) @@ -2195,16 +2195,16 @@ static void DrawEmptySlot(u8 windowId) BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3); } -#define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ -{ \ - LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[0]), paletteOffsets[0] + palNum, PLTT_SIZEOF(1)); \ - LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[1]), paletteOffsets[1] + palNum, PLTT_SIZEOF(1)); \ - LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[2]), paletteOffsets[2] + palNum, PLTT_SIZEOF(1)); \ +#define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ +{ \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[0]), paletteOffsets[0] + palOffset, PLTT_SIZEOF(1)); \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[1]), paletteOffsets[1] + palOffset, PLTT_SIZEOF(1)); \ + LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[2]), paletteOffsets[2] + palOffset, PLTT_SIZEOF(1)); \ } static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags) { - u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; + u8 palOffset = BG_PLTT_ID(GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM)); if (palFlags & PARTY_PAL_NO_MON) { @@ -2332,7 +2332,7 @@ static void DisplayPartyPokemonGenderNidoranCheck(struct Pokemon *mon, struct Pa static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, struct PartyMenuBox *menuBox) { - u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; + u8 palOffset = BG_PLTT_ID(GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM)); if (species == SPECIES_NONE) return; @@ -2341,13 +2341,13 @@ static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, stru switch (gender) { case MON_MALE: - LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[0]), sGenderPalOffsets[0] + palNum, PLTT_SIZEOF(1)); - LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[1]), sGenderPalOffsets[1] + palNum, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[0]), sGenderPalOffsets[0] + palOffset, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderMalePalIds[1]), sGenderPalOffsets[1] + palOffset, PLTT_SIZEOF(1)); DisplayPartyPokemonBarDetail(menuBox->windowId, gText_MaleSymbol, 2, &menuBox->infoRects->dimensions[8]); break; case MON_FEMALE: - LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[0]), sGenderPalOffsets[0] + palNum, PLTT_SIZEOF(1)); - LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[1]), sGenderPalOffsets[1] + palNum, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[0]), sGenderPalOffsets[0] + palOffset, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sGenderFemalePalIds[1]), sGenderPalOffsets[1] + palOffset, PLTT_SIZEOF(1)); DisplayPartyPokemonBarDetail(menuBox->windowId, gText_FemaleSymbol, 2, &menuBox->infoRects->dimensions[8]); break; } @@ -2401,23 +2401,23 @@ static void DisplayPartyPokemonHPBarCheck(struct Pokemon *mon, struct PartyMenuB static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct PartyMenuBox *menuBox) { - u8 palNum = GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM) * 16; + u8 palOffset = BG_PLTT_ID(GetWindowAttribute(menuBox->windowId, WINDOW_PALETTE_NUM)); u8 hpFraction; switch (GetHPBarLevel(hp, maxhp)) { case HP_BAR_GREEN: case HP_BAR_FULL: - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[0]), sHPBarPalOffsets[0] + palNum, PLTT_SIZEOF(1)); - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[1]), sHPBarPalOffsets[1] + palNum, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[0]), sHPBarPalOffsets[0] + palOffset, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarGreenPalIds[1]), sHPBarPalOffsets[1] + palOffset, PLTT_SIZEOF(1)); break; case HP_BAR_YELLOW: - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[0]), sHPBarPalOffsets[0] + palNum, PLTT_SIZEOF(1)); - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[1]), sHPBarPalOffsets[1] + palNum, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[0]), sHPBarPalOffsets[0] + palOffset, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarYellowPalIds[1]), sHPBarPalOffsets[1] + palOffset, PLTT_SIZEOF(1)); break; default: - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[0]), sHPBarPalOffsets[0] + palNum, PLTT_SIZEOF(1)); - LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[1]), sHPBarPalOffsets[1] + palNum, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[0]), sHPBarPalOffsets[0] + palOffset, PLTT_SIZEOF(1)); + LoadPalette(GetPartyMenuPalBufferPtr(sHPBarRedPalIds[1]), sHPBarPalOffsets[1] + palOffset, PLTT_SIZEOF(1)); break; } diff --git a/src/pokedex.c b/src/pokedex.c index 88558d6f2c..5a2667759e 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3264,7 +3264,7 @@ static void Task_LoadInfoScreen(u8 taskId) case 4: PrintMonInfo(sPokedexListItem->dexNum, sPokedexView->dexMode == DEX_MODE_HOENN ? FALSE : TRUE, sPokedexListItem->owned, 0); if (!sPokedexListItem->owned) - LoadPalette(gPlttBufferUnfaded + 1, BG_PLTT_ID(3) + 1, PLTT_SIZEOF(16 - 1)); + LoadPalette(&gPlttBufferUnfaded[BG_PLTT_ID(0) + 1], BG_PLTT_ID(3) + 1, PLTT_SIZEOF(16 - 1)); CopyWindowToVram(WIN_INFO, COPYWIN_FULL); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c index ff32f8eef1..da50f8c688 100644 --- a/src/pokedex_area_region_map.c +++ b/src/pokedex_area_region_map.c @@ -41,7 +41,7 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) ChangeBgX(template->bg, 0, BG_COORD_SET); ChangeBgY(template->bg, 0, BG_COORD_SET); SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); - CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[0x70], sizeof(sPokedexAreaMap_Pal)); + CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[BG_PLTT_ID(7)], sizeof(sPokedexAreaMap_Pal)); *sPokedexAreaMapBgNum = template->bg; } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 01cbacb447..f9181a985b 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -224,7 +224,7 @@ static bool8 DrawAreaGlow(void) case 3: if (!FreeTempTileDataBuffersIfPossible()) { - CpuCopy32(sAreaGlow_Pal, &gPlttBufferUnfaded[GLOW_PALETTE * 16], sizeof(sAreaGlow_Pal)); + CpuCopy32(sAreaGlow_Pal, &gPlttBufferUnfaded[BG_PLTT_ID(GLOW_PALETTE)], sizeof(sAreaGlow_Pal)); sPokedexAreaScreen->drawAreaGlowState++; } return TRUE; diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 237f728381..8e37018cba 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1199,16 +1199,12 @@ const u8 *GetMonIconTiles(u16 species, bool32 handleDeoxys) void TryLoadAllMonIconPalettesAtOffset(u16 offset) { s32 i; - const struct SpritePalette* monIconPalettePtr; - - if (offset <= BG_PLTT_ID(10)) + if (offset <= BG_PLTT_ID(16 - ARRAY_COUNT(gMonIconPaletteTable))) { - monIconPalettePtr = gMonIconPaletteTable; - for (i = ARRAY_COUNT(gMonIconPaletteTable) - 1; i >= 0; i--) + for (i = 0; i < (int)ARRAY_COUNT(gMonIconPaletteTable); i++) { - LoadPalette(monIconPalettePtr->data, offset, PLTT_SIZE_4BPP); - offset += 0x10; - monIconPalettePtr++; + LoadPalette(gMonIconPaletteTable[i].data, offset, PLTT_SIZE_4BPP); + offset += 16; } } } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 8649e3ce79..99b0dae0e7 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5490,7 +5490,7 @@ static void InitBoxTitle(u8 boxId) tagIndex = IndexOfSpritePaletteTag(PALTAG_BOX_TITLE); sStorage->boxTitlePalOffset = OBJ_PLTT_ID(tagIndex) + 14; - sStorage->wallpaperPalBits |= 0x10000 << tagIndex; + sStorage->wallpaperPalBits |= (1 << 16) << tagIndex; // The below seems intended to have separately tracked // the incoming wallpaper title's palette, but as they now @@ -5498,7 +5498,7 @@ static void InitBoxTitle(u8 boxId) // this is redundant along with the use of boxTitleAltPalOffset tagIndex = IndexOfSpritePaletteTag(PALTAG_BOX_TITLE); sStorage->boxTitleAltPalOffset = OBJ_PLTT_ID(tagIndex) + 14; - sStorage->wallpaperPalBits |= 0x10000 << tagIndex; + sStorage->wallpaperPalBits |= (1 << 16) << tagIndex; StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, BOX_NAME_LENGTH); DrawTextWindowAndBufferTiles(sStorage->boxTitleText, sStorage->boxTitleTiles, 0, 0, 2); @@ -5616,9 +5616,9 @@ static void CycleBoxTitleColor(void) u8 boxId = StorageGetCurrentBox(); u8 wallpaperId = GetBoxWallpaper(boxId); if (sStorage->boxTitleCycleId == 0) - CpuCopy16(sBoxTitleColors[wallpaperId], gPlttBufferUnfaded + sStorage->boxTitlePalOffset, 4); + CpuCopy16(sBoxTitleColors[wallpaperId], &gPlttBufferUnfaded[sStorage->boxTitlePalOffset], PLTT_SIZEOF(2)); else - CpuCopy16(sBoxTitleColors[wallpaperId], gPlttBufferUnfaded + sStorage->boxTitleAltPalOffset, 4); + CpuCopy16(sBoxTitleColors[wallpaperId], &gPlttBufferUnfaded[sStorage->boxTitleAltPalOffset], PLTT_SIZEOF(2)); } static s16 GetBoxTitleBaseX(const u8 *string) @@ -8746,8 +8746,7 @@ static void CreateItemIconSprites(void) LoadCompressedSpriteSheet(&spriteSheet); sStorage->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * TILE_SIZE_4BPP + (void *)(OBJ_VRAM0); sStorage->itemIcons[i].palIndex = AllocSpritePalette(PALTAG_ITEM_ICON_0 + i); - sStorage->itemIcons[i].palIndex *= 16; - sStorage->itemIcons[i].palIndex += 0x100; + sStorage->itemIcons[i].palIndex = OBJ_PLTT_ID(sStorage->itemIcons[i].palIndex); spriteTemplate.tileTag = GFXTAG_ITEM_ICON_0 + i; spriteTemplate.paletteTag = PALTAG_ITEM_ICON_0 + i; spriteId = CreateSprite(&spriteTemplate, 0, 0, 11); diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index d3764cb802..1817398020 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -432,7 +432,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) SetBgTilemapBuffer(1, gfx->buff); CopyToBgTilemapBuffer(1, sConditionSearchResultTilemap, 0, 0); CopyBgTilemapBufferToVram(1); - CopyPaletteIntoBufferUnfaded(sConditionSearchResultFramePal, BG_PLTT_ID(1), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sConditionSearchResultFramePal, BG_PLTT_ID(1), sizeof(sConditionSearchResultFramePal)); CopyBgTilemapBufferToVram(1); return LT_INC_AND_PAUSE; case 1: @@ -444,7 +444,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - CopyPaletteIntoBufferUnfaded(sListBg_Pal, BG_PLTT_ID(2), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sListBg_Pal, BG_PLTT_ID(2), sizeof(sListBg_Pal)); CreateSearchResultsList(); return LT_INC_AND_PAUSE; case 3: diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index bfc5ba0cb4..761f572d6b 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -443,7 +443,7 @@ static u32 LoopedTask_SlideMenuHeaderDown(s32 state) void CopyPaletteIntoBufferUnfaded(const u16 *palette, u32 bufferOffset, u32 size) { - CpuCopy16(palette, gPlttBufferUnfaded + bufferOffset, size); + CpuCopy16(palette, &gPlttBufferUnfaded[bufferOffset], size); } void Pokenav_AllocAndLoadPalettes(const struct SpritePalette *palettes) @@ -468,7 +468,7 @@ void Pokenav_AllocAndLoadPalettes(const struct SpritePalette *palettes) void PokenavFillPalette(u32 palIndex, u16 fillValue) { - CpuFill16(fillValue, gPlttBufferFaded + 0x100 + (palIndex * 16), 16 * sizeof(u16)); + CpuFill16(fillValue, &gPlttBufferFaded[OBJ_PLTT_ID(palIndex)], PLTT_SIZE_4BPP); } void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a4, u16 *palette) diff --git a/src/pokenav_match_call_gfx.c b/src/pokenav_match_call_gfx.c index 1747d3ef0b..4271e2ff23 100755 --- a/src/pokenav_match_call_gfx.c +++ b/src/pokenav_match_call_gfx.c @@ -333,7 +333,7 @@ static u32 LoopedTask_OpenMatchCall(s32 state) SetBgTilemapBuffer(2, gfx->bgTilemapBuffer2); CopyToBgTilemapBuffer(2, sMatchCallUI_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); - CopyPaletteIntoBufferUnfaded(sMatchCallUI_Pal, BG_PLTT_ID(2), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sMatchCallUI_Pal, BG_PLTT_ID(2), sizeof(sMatchCallUI_Pal)); CopyBgTilemapBufferToVram(2); return LT_INC_AND_PAUSE; case 1: @@ -343,7 +343,7 @@ static u32 LoopedTask_OpenMatchCall(s32 state) BgDmaFill(1, 0, 0, 1); SetBgTilemapBuffer(1, gfx->bgTilemapBuffer1); FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); - CopyPaletteIntoBufferUnfaded(sCallWindow_Pal, BG_PLTT_ID(1), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sCallWindow_Pal, BG_PLTT_ID(1), sizeof(sCallWindow_Pal)); CopyBgTilemapBufferToVram(1); return LT_INC_AND_PAUSE; case 2: @@ -352,7 +352,7 @@ static u32 LoopedTask_OpenMatchCall(s32 state) LoadCallWindowAndFade(gfx); DecompressAndCopyTileDataToVram(3, sPokeball_Gfx, 0, 0, 0); - CopyPaletteIntoBufferUnfaded(sListWindow_Pal, BG_PLTT_ID(3), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sListWindow_Pal, BG_PLTT_ID(3), sizeof(sListWindow_Pal)); CopyPaletteIntoBufferUnfaded(sPokeball_Pal, BG_PLTT_ID(5), PLTT_SIZE_4BPP); return LT_INC_AND_PAUSE; case 3: @@ -913,9 +913,9 @@ static void Task_FlashPokeballIcons(u8 taskId) tSinIdx += 4; tSinIdx &= 0x7F; tSinVal = gSineTable[tSinIdx] >> 4; - PokenavCopyPalette(sPokeball_Pal, &sPokeball_Pal[0x10], 0x10, 0x10, tSinVal, &gPlttBufferUnfaded[0x50]); + PokenavCopyPalette(sPokeball_Pal, &sPokeball_Pal[0x10], 0x10, 0x10, tSinVal, &gPlttBufferUnfaded[BG_PLTT_ID(5)]); if (!gPaletteFade.active) - CpuCopy32(&gPlttBufferUnfaded[0x50], &gPlttBufferFaded[0x50], 0x20); + CpuCopy32(&gPlttBufferUnfaded[BG_PLTT_ID(5)], &gPlttBufferFaded[BG_PLTT_ID(5)], PLTT_SIZE_4BPP); } } diff --git a/src/pokenav_menu_handler_gfx.c b/src/pokenav_menu_handler_gfx.c index 3367442362..ede88affdb 100644 --- a/src/pokenav_menu_handler_gfx.c +++ b/src/pokenav_menu_handler_gfx.c @@ -470,14 +470,14 @@ static u32 LoopedTask_OpenMenu(s32 state) return LT_PAUSE; DecompressAndCopyTileDataToVram(2, sPokenavDeviceBgTiles, 0, 0, 0); DecompressAndCopyTileDataToVram(2, sPokenavDeviceBgTilemap, 0, 0, 1); - CopyPaletteIntoBufferUnfaded(sPokenavDeviceBgPal, BG_PLTT_ID(2), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sPokenavDeviceBgPal, BG_PLTT_ID(2), sizeof(sPokenavDeviceBgPal)); return LT_INC_AND_PAUSE; case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; DecompressAndCopyTileDataToVram(3, sPokenavBgDotsTiles, 0, 0, 0); DecompressAndCopyTileDataToVram(3, sPokenavBgDotsTilemap, 0, 0, 1); - CopyPaletteIntoBufferUnfaded(sPokenavBgDotsPal, BG_PLTT_ID(3), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sPokenavBgDotsPal, BG_PLTT_ID(3), sizeof(sPokenavBgDotsPal)); if (GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION || GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION_SEARCH) ChangeBgDotsColorToPurple(); return LT_INC_AND_PAUSE; diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 50f01345c8..e589e28187 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -515,7 +515,7 @@ static void LoadPokenavRegionMapGfx(struct Pokenav_RegionMapGfx *state) FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->infoWindowId); CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); - CopyPaletteIntoBufferUnfaded(sMapSecInfoWindow_Pal, BG_PLTT_ID(1), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sMapSecInfoWindow_Pal, BG_PLTT_ID(1), sizeof(sMapSecInfoWindow_Pal)); CopyPaletteIntoBufferUnfaded(gRegionMapCityZoomTiles_Pal, BG_PLTT_ID(3), PLTT_SIZE_4BPP); if (!IsRegionMapZoomed()) ChangeBgY(1, -0x6000, BG_COORD_SET); diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index c1ca7f9d92..344b44f009 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -432,7 +432,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) DecompressAndCopyTileDataToVram(1, sMonRibbonListFrameTiles, 0, 0, 0); SetBgTilemapBuffer(1, menu->buff); CopyToBgTilemapBuffer(1, sMonRibbonListFrameTilemap, 0, 0); - CopyPaletteIntoBufferUnfaded(sMonRibbonListFramePal, BG_PLTT_ID(1), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sMonRibbonListFramePal, BG_PLTT_ID(1), sizeof(sMonRibbonListFramePal)); CopyBgTilemapBufferToVram(1); return LT_INC_AND_PAUSE; case 1: @@ -447,7 +447,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - CopyPaletteIntoBufferUnfaded(sMonRibbonListUi_Pal, BG_PLTT_ID(2), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sMonRibbonListUi_Pal, BG_PLTT_ID(2), sizeof(sMonRibbonListUi_Pal)); CreateRibbonMonsList(); return LT_INC_AND_PAUSE; case 3: diff --git a/src/pokenav_ribbons_summary.c b/src/pokenav_ribbons_summary.c index 4861b8e0ea..e77f839a80 100644 --- a/src/pokenav_ribbons_summary.c +++ b/src/pokenav_ribbons_summary.c @@ -584,7 +584,7 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) SetBgTilemapBuffer(1, menu->tilemapBuffers[1]); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); CopyPaletteIntoBufferUnfaded(sRibbonIcons1_Pal, BG_PLTT_ID(2), 5 * PLTT_SIZE_4BPP); - CopyPaletteIntoBufferUnfaded(sMonInfo_Pal, BG_PLTT_ID(10), PLTT_SIZE_4BPP); + CopyPaletteIntoBufferUnfaded(sMonInfo_Pal, BG_PLTT_ID(10), sizeof(sMonInfo_Pal)); CopyBgTilemapBufferToVram(1); return LT_INC_AND_PAUSE; } diff --git a/src/region_map.c b/src/region_map.c index ebe3afb8e9..f6123359be 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -621,7 +621,7 @@ bool8 LoadRegionMapGfx(void) void BlendRegionMap(u16 color, u32 coeff) { BlendPalettes(0x380, coeff, color); - CpuCopy16(gPlttBufferFaded + 0x70, gPlttBufferUnfaded + 0x70, 0x60); + CpuCopy16(&gPlttBufferFaded[BG_PLTT_ID(7)], &gPlttBufferUnfaded[BG_PLTT_ID(7)], 3 * PLTT_SIZE_4BPP); } void FreeRegionMapIconResources(void) diff --git a/src/roulette.c b/src/roulette.c index 06561f7988..d311ad0940 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -860,7 +860,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + { { // F_FLASH_COLOR_O_WYNAUT .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x5, + .paletteOffset = BG_PLTT_ID(0) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -870,7 +870,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_G_AZURILL .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0xA, + .paletteOffset = BG_PLTT_ID(0) + 10, .numColors = 1, .delay = 1, .unk6 = -1, @@ -880,7 +880,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_P_SKITTY .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x15, + .paletteOffset = BG_PLTT_ID(1) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -890,7 +890,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_O_MAKUHITA .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x55, + .paletteOffset = BG_PLTT_ID(5) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -900,7 +900,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_G_WYNAUT .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x5A, + .paletteOffset = BG_PLTT_ID(5) + 10, .numColors = 1, .delay = 1, .unk6 = -1, @@ -910,7 +910,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_P_AZURILL .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x65, + .paletteOffset = BG_PLTT_ID(6) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -920,7 +920,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_O_SKITTY .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x75, + .paletteOffset = BG_PLTT_ID(7) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -930,7 +930,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_G_MAKUHITA .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x7A, + .paletteOffset = BG_PLTT_ID(7) + 10, .numColors = 1, .delay = 1, .unk6 = -1, @@ -940,7 +940,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_P_WYNAUT .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x85, + .paletteOffset = BG_PLTT_ID(8) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -950,7 +950,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_O_AZURILL .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x95, + .paletteOffset = BG_PLTT_ID(9) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -960,7 +960,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_G_SKITTY .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0x9A, + .paletteOffset = BG_PLTT_ID(9) + 10, .numColors = 1, .delay = 1, .unk6 = -1, @@ -970,7 +970,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_COLOR_P_MAKUHITA .color = FLASHUTIL_USE_EXISTING_COLOR, - .paletteOffset = 0xA5, + .paletteOffset = BG_PLTT_ID(10) + 5, .numColors = 1, .delay = 1, .unk6 = -1, @@ -980,7 +980,7 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, { // F_FLASH_OUTER_EDGES .color = RGB(22, 30, 29), - .paletteOffset = 0x28, + .paletteOffset = BG_PLTT_ID(2) + 8, .numColors = 2, .delay = 10, .unk6 = -1, @@ -996,7 +996,7 @@ static const struct RouletteFlashSettings sFlashData_PokeIcons[NUM_BOARD_COLORS] { [GET_ROW_IDX(ROW_ORANGE)] = { .color = RGB(31, 31, 20), - .paletteOffset = 0x101, + .paletteOffset = OBJ_PLTT_ID(0) + 1, .numColors = 5, .delay = 30, .unk6 = -1, @@ -1006,7 +1006,7 @@ static const struct RouletteFlashSettings sFlashData_PokeIcons[NUM_BOARD_COLORS] }, [GET_ROW_IDX(ROW_GREEN)] = { .color = RGB(27, 31, 31), - .paletteOffset = 0x106, + .paletteOffset = OBJ_PLTT_ID(0) + 6, .numColors = 5, .delay = 30, .unk6 = -1, @@ -1016,7 +1016,7 @@ static const struct RouletteFlashSettings sFlashData_PokeIcons[NUM_BOARD_COLORS] }, [GET_ROW_IDX(ROW_PURPLE)] = { .color = RGB(31, 27, 31), - .paletteOffset = 0x10B, + .paletteOffset = OBJ_PLTT_ID(0) + 11, .numColors = 5, .delay = 30, .unk6 = -1, @@ -1129,9 +1129,9 @@ static void InitRouletteTableData(void) // Left table (with min bet of 1) has red background, other table has green if (sRoulette->minBet == 1) - gPlttBufferUnfaded[0] = gPlttBufferUnfaded[0x51] = gPlttBufferFaded[0] = gPlttBufferFaded[0x51] = bgColors[0]; + gPlttBufferUnfaded[BG_PLTT_ID(0)] = gPlttBufferUnfaded[BG_PLTT_ID(5) + 1] = gPlttBufferFaded[BG_PLTT_ID(0)] = gPlttBufferFaded[BG_PLTT_ID(5) + 1] = bgColors[0]; else - gPlttBufferUnfaded[0] = gPlttBufferUnfaded[0x51] = gPlttBufferFaded[0] = gPlttBufferFaded[0x51] = bgColors[1]; + gPlttBufferUnfaded[BG_PLTT_ID(0)] = gPlttBufferUnfaded[BG_PLTT_ID(5) + 1] = gPlttBufferFaded[BG_PLTT_ID(0)] = gPlttBufferFaded[BG_PLTT_ID(5) + 1] = bgColors[1]; RouletteFlash_Reset(&sRoulette->flashUtil); diff --git a/src/scrcmd.c b/src/scrcmd.c index 18a56631d3..bf4ec38f44 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -649,12 +649,12 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx) case FADE_TO_BLACK: case FADE_TO_WHITE: default: - CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE); + CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_SIZE); FadeScreen(mode, 0); break; case FADE_FROM_BLACK: case FADE_FROM_WHITE: - CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE); + CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_SIZE); FadeScreen(mode, 0); break; } diff --git a/src/slot_machine.c b/src/slot_machine.c index 2fc0e2c035..581e5c78e0 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -4427,7 +4427,7 @@ static void SpriteCB_ReelTimePikachuAura(struct Sprite *sprite) u8 colors[] = {16, 0}; if (sprite->sFlashPal && --sprite->sDelayTimer <= 0) { - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(PALTAG_PIKA_AURA) << 4) + 0x103, colors[sprite->sColorIdx], colors[sprite->sColorIdx], colors[sprite->sColorIdx]); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_PIKA_AURA)) + 3, colors[sprite->sColorIdx], colors[sprite->sColorIdx], colors[sprite->sColorIdx]); ++sprite->sColorIdx; sprite->sColorIdx &= 1; sprite->sDelayTimer = sprite->sDelay; @@ -4442,7 +4442,7 @@ static void SetReelTimePikachuAuraFlashDelay(s16 delay) static void DestroyReelTimePikachuAuraSprites(void) { u8 i; - MultiplyInvertedPaletteRGBComponents((IndexOfSpritePaletteTag(PALTAG_PIKA_AURA) << 4) + 0x103, 0, 0, 0); + MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(PALTAG_PIKA_AURA)) + 3, 0, 0, 0); for (i = 0; i < ARRAY_COUNT(sSlotMachine->reelTimePikachuAuraSpriteIds); i++) DestroySprite(&gSprites[sSlotMachine->reelTimePikachuAuraSpriteIds[i]]); } diff --git a/src/tileset_anims.c b/src/tileset_anims.c index 12701fb5f0..595ba08a6f 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -1167,7 +1167,7 @@ static void QueueAnimTiles_BattlePyramid_StatueShadow(u16 timer) static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) { - CpuCopy16(sTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(sTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[0x80], 32); + CpuCopy16(sTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(sTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[BG_PLTT_ID(8)], PLTT_SIZE_4BPP); BlendPalette(BG_PLTT_ID(8), 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) != TASK_NONE) { @@ -1178,7 +1178,7 @@ static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) static void BlendAnimPalette_BattleDome_FloorLightsNoBlend(u16 timer) { - CpuCopy16(sTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(sTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[0x80], 32); + CpuCopy16(sTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(sTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[BG_PLTT_ID(8)], PLTT_SIZE_4BPP); if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) == TASK_NONE) { BlendPalette(BG_PLTT_ID(8), 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index d10c39c7df..9a562cf7f7 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -222,7 +222,7 @@ static void CB2_InitWirelessCommunicationScreen(void) ChangeBgX(1, 0, BG_COORD_SET); ChangeBgY(1, 0, BG_COORD_SET); LoadPalette(sPalettes, BG_PLTT_ID(0), PLTT_SIZE_4BPP); - Menu_LoadStdPalAt(0xF0); + Menu_LoadStdPalAt(BG_PLTT_ID(15)); DynamicPlaceholderTextUtil_Reset(); FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 15); CopyBgTilemapBufferToVram(1); From 05895c5308a7453dcd4c64f02ff28c61e34d954d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 20 May 2023 23:56:55 -0400 Subject: [PATCH 217/229] Fixed Frostbite icon appearing in AI Pary menu for mon without ailment --- src/battle_debug.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/battle_debug.c b/src/battle_debug.c index 0549cf91ed..5712c98819 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -1015,11 +1015,13 @@ static void Task_ShowAiParty(u8 taskId) gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].oam.priority = 0; if (aiMons[i].isFainted) ailment = AILMENT_FNT; - else if (aiMons[i].status) - ailment = GetAilmentFromStatus(aiMons[i].status); else - ailment = AILMENT_FNT + 1; // blank - StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1); + ailment = GetAilmentFromStatus(aiMons[i].status); + + if (ailment != AILMENT_NONE) + StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1); + else + gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].invisible = TRUE; } for (; i < PARTY_SIZE; i++) data->spriteIds.aiPartyIcons[i] = 0xFF; From c3527dc01ec6219cc16542a702a63ad28e73ed39 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 26 May 2023 09:24:23 -0400 Subject: [PATCH 218/229] Fixed Throat Spray's description --- src/data/text/item_descriptions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index dddf8552f5..ecca3ef301 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -2649,8 +2649,8 @@ static const u8 sProtectivePadsDesc[] = _( static const u8 sThroatSprayDesc[] = _( "Raises Sp. Atk. if\n" - "a Pokémon is hit by\n" - "a sound-based move."); + "the holder uses a\n" + "sound-based move."); static const u8 sEjectPackDesc[] = _( "Forces the user to\n" From d0e6ea76124c57ec72f11b90b8b763a457ffcd40 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 27 May 2023 17:23:02 -0400 Subject: [PATCH 219/229] Optimized battle gender checks (#3020) * Optimized battle gender checks * Apply suggestions from code review Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> --------- Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> --- include/battle_ai_util.h | 2 +- include/battle_util.h | 2 ++ src/battle_ai_main.c | 14 ++++--------- src/battle_ai_util.c | 6 ++---- src/battle_script_commands.c | 31 +++------------------------- src/battle_util.c | 40 +++++++++++++++++++----------------- 6 files changed, 33 insertions(+), 62 deletions(-) diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 37c9e9c19c..67ff6968e2 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -143,7 +143,7 @@ bool32 AI_CanConfuse(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtk bool32 ShouldBurnSelf(u8 battler, u16 ability); bool32 AI_CanBurn(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove); bool32 AI_CanGiveFrostbite(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 battlerAtkPartner, u16 move, u16 partnerMove); -bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 atkGender, u8 defGender); +bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility); bool32 AnyPartyMemberStatused(u8 battlerId, bool32 checkSoundproof); u32 ShouldTryToFlinch(u8 battlerAtk, u8 battlerDef, u16 atkAbility, u16 defAbility, u16 move); bool32 ShouldTrap(u8 battlerAtk, u8 battlerDef, u16 move); diff --git a/include/battle_util.h b/include/battle_util.h index 9036ce4a99..96ffc2fa16 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -234,5 +234,7 @@ u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc); bool32 IsMyceliumMightOnField(void); bool8 ChangeTypeBasedOnTerrain(u8 battlerId); void RemoveConfusionStatus(u8 battlerId); +u8 GetBattlerGender(u8 battlerId); +bool8 AreBattlersOfOppositeGender(u8 battler1, u8 battler2); #endif // GUARD_BATTLE_UTIL_H diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 76bf2261e6..97ae1f35cc 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -248,7 +248,7 @@ static void CopyBattlerDataToAIParty(u32 bPosition, u32 side) aiMon->species = bMon->species; aiMon->level = bMon->level; aiMon->status = bMon->status1; - aiMon->gender = GetGenderFromSpeciesAndPersonality(bMon->species, bMon->personality); + aiMon->gender = GetBattlerGender(battler); aiMon->isFainted = FALSE; aiMon->wasSentInBattle = TRUE; aiMon->switchInCount++; @@ -1287,12 +1287,8 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 8; break; case EFFECT_CAPTIVATE: - { - u8 atkGender = GetGenderFromSpeciesAndPersonality(gBattleMons[battlerAtk].species, gBattleMons[battlerAtk].personality); - u8 defGender = GetGenderFromSpeciesAndPersonality(gBattleMons[battlerDef].species, gBattleMons[battlerDef].personality); - if (atkGender == MON_GENDERLESS || defGender == MON_GENDERLESS || atkGender == defGender) - score -= 10; - } + if (!AreBattlersOfOppositeGender(battlerAtk, battlerDef)) + score -= 10; break; // other case EFFECT_HAZE: @@ -1592,9 +1588,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 2; // mainly to prevent looping between hail and snow break; case EFFECT_ATTRACT: - if (!AI_CanBeInfatuated(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], - GetGenderFromSpeciesAndPersonality(gBattleMons[battlerAtk].species, gBattleMons[battlerAtk].personality), - GetGenderFromSpeciesAndPersonality(gBattleMons[battlerDef].species, gBattleMons[battlerDef].personality))) + if (!AI_CanBeInfatuated(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef])) score -= 10; break; case EFFECT_SAFEGUARD: diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index ced2e18412..33aeda1042 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2967,14 +2967,12 @@ bool32 AI_CanGiveFrostbite(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 batt return TRUE; } -bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 atkGender, u8 defGender) +bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility) { if ((gBattleMons[battlerDef].status2 & STATUS2_INFATUATION) || AI_GetMoveEffectiveness(AI_THINKING_STRUCT->moveConsidered, battlerAtk, battlerDef) == AI_EFFECTIVENESS_x0 || defAbility == ABILITY_OBLIVIOUS - || atkGender == defGender - || atkGender == MON_GENDERLESS - || defGender == MON_GENDERLESS + || !AreBattlersOfOppositeGender(battlerAtk, battlerDef) || AI_IsAbilityOnSide(battlerDef, ABILITY_AROMA_VEIL)) return FALSE; return TRUE; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c9d6ff988b..d7ac1ef807 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12758,26 +12758,6 @@ static void Cmd_tryinfatuating(void) { CMD_ARGS(const u8 *failInstr); - struct Pokemon *monAttacker, *monTarget; - u16 speciesAttacker, speciesTarget; - u32 personalityAttacker, personalityTarget; - - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - monAttacker = &gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]; - else - monAttacker = &gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker]]; - - if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER) - monTarget = &gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]; - else - monTarget = &gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]; - - speciesAttacker = GetMonData(monAttacker, MON_DATA_SPECIES); - personalityAttacker = GetMonData(monAttacker, MON_DATA_PERSONALITY); - - speciesTarget = GetMonData(monTarget, MON_DATA_SPECIES); - personalityTarget = GetMonData(monTarget, MON_DATA_PERSONALITY); - if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS) { gBattlescriptCurrInstr = BattleScript_NotAffectedAbilityPopUp; @@ -12786,10 +12766,8 @@ static void Cmd_tryinfatuating(void) } else { - if (GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) - || gBattleMons[gBattlerTarget].status2 & STATUS2_INFATUATION - || GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == MON_GENDERLESS - || GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) == MON_GENDERLESS) + if (gBattleMons[gBattlerTarget].status2 & STATUS2_INFATUATION + || !AreBattlersOfOppositeGender(gBattlerAttacker, gBattlerTarget)) { gBattlescriptCurrInstr = cmd->failInstr; } @@ -16103,10 +16081,7 @@ static void Cmd_jumpifoppositegenders(void) { CMD_ARGS(const u8 *jumpInstr); - u32 atkGender = GetGenderFromSpeciesAndPersonality(gBattleMons[gBattlerAttacker].species, gBattleMons[gBattlerAttacker].personality); - u32 defGender = GetGenderFromSpeciesAndPersonality(gBattleMons[gBattlerTarget].species, gBattleMons[gBattlerTarget].personality); - - if ((atkGender == MON_MALE && defGender == MON_FEMALE) || (atkGender == MON_FEMALE && defGender == MON_MALE)) + if (AreBattlersOfOppositeGender(gBattlerAttacker, gBattlerTarget)) gBattlescriptCurrInstr = cmd->jumpInstr; else gBattlescriptCurrInstr = cmd->nextInstr; diff --git a/src/battle_util.c b/src/battle_util.c index f0c41bf9d6..e8f4ffdcad 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4183,7 +4183,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move { u8 effect = 0; u32 speciesAtk, speciesDef; - u32 pidAtk, pidDef; u32 moveType, move; u32 i, j; @@ -4194,10 +4193,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlerAttacker = battler; speciesAtk = gBattleMons[gBattlerAttacker].species; - pidAtk = gBattleMons[gBattlerAttacker].personality; - speciesDef = gBattleMons[gBattlerTarget].species; - pidDef = gBattleMons[gBattlerTarget].personality; if (special) gLastUsedAbility = special; @@ -5515,16 +5511,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && gBattleMons[gBattlerAttacker].hp != 0 && !gProtectStructs[gBattlerAttacker].confusionSelfDmg - && (IsMoveMakingContact(move, gBattlerAttacker)) && TARGET_TURN_DAMAGED && gBattleMons[gBattlerTarget].hp != 0 && RandomWeighted(RNG_CUTE_CHARM, 2, 1) - && GetBattlerAbility(gBattlerAttacker) != ABILITY_OBLIVIOUS - && !IsAbilityOnSide(gBattlerAttacker, ABILITY_AROMA_VEIL) - && GetGenderFromSpeciesAndPersonality(speciesAtk, pidAtk) != GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) && !(gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION) - && GetGenderFromSpeciesAndPersonality(speciesAtk, pidAtk) != MON_GENDERLESS - && GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) != MON_GENDERLESS) + && AreBattlersOfOppositeGender(gBattlerAttacker, gBattlerTarget) + && GetBattlerAbility(gBattlerAttacker) != ABILITY_OBLIVIOUS + && IsMoveMakingContact(move, gBattlerAttacker) + && !IsAbilityOnSide(gBattlerAttacker, ABILITY_AROMA_VEIL)) { gBattleMons[gBattlerAttacker].status2 |= STATUS2_INFATUATED_WITH(gBattlerTarget); BattleScriptPushCursor(); @@ -8753,15 +8747,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(1.3)); break; case ABILITY_RIVALRY: - if (GetGenderFromSpeciesAndPersonality(gBattleMons[battlerAtk].species, gBattleMons[battlerAtk].personality) != MON_GENDERLESS - && GetGenderFromSpeciesAndPersonality(gBattleMons[battlerDef].species, gBattleMons[battlerDef].personality) != MON_GENDERLESS) - { - if (GetGenderFromSpeciesAndPersonality(gBattleMons[battlerAtk].species, gBattleMons[battlerAtk].personality) - == GetGenderFromSpeciesAndPersonality(gBattleMons[battlerDef].species, gBattleMons[battlerDef].personality)) - MulModifier(&modifier, UQ_4_12(1.25)); - else - MulModifier(&modifier, UQ_4_12(0.75)); - } + if (AreBattlersOfOppositeGender(battlerAtk, battlerDef)) + MulModifier(&modifier, UQ_4_12(1.25)); + else + MulModifier(&modifier, UQ_4_12(0.75)); break; case ABILITY_ANALYTIC: if (GetBattlerTurnOrderNum(battlerAtk) == gBattlersCount - 1 && move != MOVE_FUTURE_SIGHT && move != MOVE_DOOM_DESIRE) @@ -10923,3 +10912,16 @@ static bool8 CanBeInfinitelyConfused(u8 battlerId) return TRUE; } +u8 GetBattlerGender(u8 battlerId) +{ + return GetGenderFromSpeciesAndPersonality(gBattleMons[battlerId].species, + gBattleMons[battlerId].personality); +} + +bool8 AreBattlersOfOppositeGender(u8 battler1, u8 battler2) +{ + u8 gender1 = GetBattlerGender(battler1); + u8 gender2 = GetBattlerGender(battler2); + + return (gender1 != MON_GENDERLESS && gender2 != MON_GENDERLESS && gender1 != gender2); +} From a929ae8b4876318fa1a75c24b5d51db7800117a4 Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Sat, 27 May 2023 17:32:53 -0400 Subject: [PATCH 220/229] Replace launchtemplate and launchtask in battle anims (#2640) * replace launchtemplate with createsprite using fix_launchtemplate.py * tidy up script * fix comment handing in fix_launchtemplate.py * fix double comma after sprite template * remove py script * convert launchtask -> createvisualtask * fix launchtask->createvisualtask issue * fix ANIM_PAL ORs * remove launchtemplate, launchtask macros * fix pal macros in z moves * fix bloom doom * add F_PAL_ALL_BUT_DEF * remove all ANIM_PAL_ usages * devestating drake fix * convert launchsoundtask and setblends * Reworked CFRU macro PR --------- Co-authored-by: ghoulslash Co-authored-by: Eduardo Quezada --- asm/macros/battle_anim_script.inc | 54 - data/battle_anim_scripts.s | 9438 ++++++++++++++--------------- include/constants/battle_anim.h | 42 +- 3 files changed, 4731 insertions(+), 4803 deletions(-) diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index 85320bd3b8..742cdb2f26 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -332,57 +332,3 @@ createvisualtask AnimTask_IsDoubleBattle, 0 jumprettrue \ptr .endm - -@ keep CFRU macros cause I'm lazy. todo: update to createsprite and createvisualtask, respectively -.macro launchtemplate launchtemplatePtr launchtemplatePriority launchtemplateArgsNo launchtemplatearg0 launchtemplatearg1 launchtemplatearg2 launchtemplatearg3 launchtemplatearg4 launchtemplatearg5 launchtemplatearg6 launchtemplatearg7 launchtemplatearg8 - .byte 0x2 - .word \launchtemplatePtr - .byte \launchtemplatePriority - .byte \launchtemplateArgsNo - .hword \launchtemplatearg0 - .hword \launchtemplatearg1 - .hword \launchtemplatearg2 - .hword \launchtemplatearg3 - .hword \launchtemplatearg4 - .hword \launchtemplatearg5 - .hword \launchtemplatearg6 - .hword \launchtemplatearg7 - .hword \launchtemplatearg8 - .endm - -.macro launchtask launchtaskPtr launchtaskPriority launchtaskArgsNo launchtaskarg0 launchtaskarg1 launchtaskarg2 launchtaskarg3 launchtaskarg4 launchtaskarg5 launchtaskarg6 launchtaskarg7 launchtaskarg8 - .byte 0x3 - .word \launchtaskPtr - .byte \launchtaskPriority - .byte \launchtaskArgsNo - .hword \launchtaskarg0 - .hword \launchtaskarg1 - .hword \launchtaskarg2 - .hword \launchtaskarg3 - .hword \launchtaskarg4 - .hword \launchtaskarg5 - .hword \launchtaskarg6 - .hword \launchtaskarg7 - .hword \launchtaskarg8 - .endm - -.macro setblends setblends_value - .byte 0xC - .hword \setblends_value - .endm - -.macro launchsoundtask launchsoundtaskPtr launchsoundtaskArgsNo launchsoundtaskarg0 launchsoundtaskarg1 launchsoundtaskarg2 launchsoundtaskarg3 launchsoundtaskarg4 launchsoundtaskarg5 launchsoundtaskarg6 launchsoundtaskarg7 launchsoundtaskarg8 - .byte 0x1F - .word \launchsoundtaskPtr - .byte \launchsoundtaskArgsNo - .hword \launchsoundtaskarg0 - .hword \launchsoundtaskarg1 - .hword \launchsoundtaskarg2 - .hword \launchsoundtaskarg3 - .hword \launchsoundtaskarg4 - .hword \launchsoundtaskarg5 - .hword \launchsoundtaskarg6 - .hword \launchsoundtaskarg7 - .hword \launchsoundtaskarg8 - .endm - diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index a0b035704d..2faa39dec2 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1561,7 +1561,7 @@ Move_GASTRO_ACID: playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 15 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 10, 1 - createvisualtask AnimTask_BlendColorCycle, 2, ANIM_PAL_DEF, 2, 2, 0, 12, RGB(30, 0, 31) + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 2, 2, 0, 12, RGB(30, 0, 31) createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 0, -22, 0, 15, 55, FALSE playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 10 @@ -1862,7 +1862,7 @@ General_AquaRingHeal: playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER createsprite gSmallBubblePairSpriteTemplate, 2, 4, 12, 0, 25, 0 setalpha 8, 8 - playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER, + playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER createsprite gGuardRingSpriteTemplate, 2, 0 delay 4 createsprite gGuardRingSpriteTemplate, 2, 0 @@ -2674,7 +2674,7 @@ Move_NASTY_PLOT: waitbgfadein delay 8 createsprite gQuestionMarkSpriteTemplate, 20, 0 - playsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER, + playsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER delay 54 loopsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER, 16, 3 waitforvisualfinish @@ -2836,7 +2836,7 @@ Move_SHADOW_CLAW: createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0 createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, 10, 0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - delay 12, + delay 12 createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, -10, 1 createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, 10, 1 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET @@ -2955,18 +2955,18 @@ Move_SHADOW_SNEAK: loadspritegfx ANIM_TAG_POISON_BUBBLE @Poison loadspritegfx ANIM_TAG_HANDS_AND_FEET monbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x7 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x7, 0x0000 waitforvisualfinish playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x12 0x6 0x1 0x3 - launchtask AnimTask_AttackerFadeToInvisible 0x2 0x1 0x1 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x12, 0x6, 0x1, 0x3 + createvisualtask AnimTask_AttackerFadeToInvisible, 0x2, 0x1 waitforvisualfinish clearmonbg ANIM_ATTACKER invisible ANIM_ATTACKER delay 0x1 - launchtask AnimTask_DestinyBondWhiteShadow 0x5 0x2 0x0 0x30 + createvisualtask AnimTask_DestinyBondWhiteShadow, 0x5, 0x0, 0x30 delay 0x30 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0xF 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0xF, 0x0 createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 call ShadowSneakMovement createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 @@ -2977,12 +2977,12 @@ Move_SHADOW_SNEAK: call ShadowSneakMovement waitforvisualfinish visible ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x7 0x0 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x7, 0x0, 0x0000 waitforvisualfinish end ShadowSneakMovement: playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 delay 0x4 return @@ -3053,7 +3053,7 @@ Move_PSYCHO_CUT: monbg ANIM_TARGET splitbgprio ANIM_TARGET setalpha 12, 8 - playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER, + playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER createsprite gPsychoCutSpriteTemplate, ANIM_TARGET, 2, 20, 0, -8, 0, 20 waitforvisualfinish createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 7, 0, 9, 1 @@ -3073,10 +3073,10 @@ Move_ZEN_HEADBUTT: createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 2, 0, 4, 0 waitforvisualfinish createsprite gZenHeadbuttSpriteTemplate, 66, 1, 0 - delay 18, + delay 18 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER waitforvisualfinish - delay 2, + delay 2 playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER loadspritegfx ANIM_TAG_IMPACT createsprite gBowMonSpriteTemplate, 2, 1, 0 @@ -3234,7 +3234,7 @@ Move_TRICK_ROOM:: InitRoomAnimation: setalpha 8, 8 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET - launchtask AnimTask_ScaleMonAndRestore 5 5 0xfffa 0xfffa 15, 1 1 + createvisualtask AnimTask_ScaleMonAndRestore, 5, 0xfffa, 0xfffa, 15, 1, 1 return Move_DRACO_METEOR: @@ -3787,7 +3787,7 @@ Move_CAPTIVATE: playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER delay 15 createsprite gMagentaHeartSpriteTemplate, 3, 2, 20, 20 - playsewithpan 228, SOUND_PAN_ATTACKER, + playsewithpan 228, SOUND_PAN_ATTACKER call GrantingStarsEffect waitforvisualfinish end @@ -4621,7 +4621,7 @@ ShadowForceWaitEnd: end ShadowForcePrep: monbg ANIM_ATTACKER - playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER, + playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_BLACK createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_TARGET, FALSE createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, FALSE @@ -4739,7 +4739,7 @@ Move_WIDE_GUARD: Move_GUARD_SPLIT:: loadspritegfx ANIM_TAG_BLUEGREEN_ORB - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0x0, 0xC, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 loopsewithpan SE_M_LOCK_ON, SOUND_PAN_ATTACKER, 0x18, 0x3 call GuardSplitLaunch call GuardSplitLaunch @@ -4752,7 +4752,7 @@ Move_GUARD_SPLIT:: call GuardSplitLaunch call GuardSplitLaunch waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0xC, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish end GuardSplitLaunch: @@ -4764,7 +4764,7 @@ GuardSplitLaunch: Move_POWER_SPLIT:: loadspritegfx ANIM_TAG_RED_HEART loadspritegfx ANIM_TAG_BLUEGREEN_ORB - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0x0, 0xC, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 loopsewithpan SE_M_LOCK_ON, SOUND_PAN_ATTACKER, 0x18, 0x3 call PowerSplitLaunch call PowerSplitLaunch @@ -4777,7 +4777,7 @@ Move_POWER_SPLIT:: call PowerSplitLaunch call PowerSplitLaunch waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0xC, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish end PowerSplitLaunch: @@ -4872,7 +4872,7 @@ Move_RAGE_POWDER:: call RagePowderSprinkle call RagePowderSprinkle call RagePowderSprinkle - createvisualtask AnimTask_BlendColorCycle, ANIM_ATTACKER, 0x2, ANIM_PAL_ATK, 0x2, 0x2, 0x0, 0xb, 0x1f + createvisualtask AnimTask_BlendColorCycle, ANIM_ATTACKER, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x1f waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -4887,9 +4887,9 @@ RagePowderSprinkle: Move_TELEKINESIS:: loadspritegfx ANIM_TAG_SPARKLE_4 @detect - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0x0, 0x9, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0x0, 0x9, 0x0 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_ATK, 0x1, 0x0, 0x9, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 0x1, 0x0, 0x9, 0x7fff delay 0x12 playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 0xd, 0x14, 0xffec @@ -4898,8 +4898,8 @@ Move_TELEKINESIS:: createvisualtask AnimTask_SwayMon, 0x5, 0x1, 0x18, 0xD0, 0x1, ANIM_TARGET waitforvisualfinish delay 0xA - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0x9, 0x0, 0x0 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_ATK, 0x2, 0x9, 0x0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0x9, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x7fff waitforvisualfinish end @@ -5047,7 +5047,7 @@ Move_SYCHRONOISE: loadspritegfx ANIM_TAG_AIR_WAVE_2 @aero particles monbg ANIM_DEF_PARTNER splitbgprio_foes ANIM_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0x0, 0xC, 0x0 @Darken + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 @Darken waitforvisualfinish panse SE_M_SCREECH, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 createsprite gSynchronoiseVioletRingTemplate, ANIM_ATTACKER, 0x0, 0x2d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1 @@ -5072,7 +5072,7 @@ Move_SYCHRONOISE: createsprite gSynchronoiseAeroWheelTemplate, ANIM_TARGET, 1, 0x0, 0xffef, 0xff20, 0xffe0, 0x28 createsprite gSynchronoiseAeroWheelTemplate, ANIM_TARGET, 1, 0x0, 0xffef, 0x70, 0xff80, 0x28 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x1, 0xC, 0x0, 0x0 @Darken + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 @Darken waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -5155,37 +5155,37 @@ Move_FLAME_CHARGE: delay 0x9 call FlameChargeSwirl waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x18 0x0 0x0 0x5 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x18, 0x0, 0x0, 0x5 delay 0x3 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0 createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x6, 0x0, 0x8, 0x1 call FireSpreadEffect playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x8 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x7 waitforvisualfinish clearmonbg ANIM_TARGET end FlameChargeSwirl: - launchtemplate gFlameChargeEmberTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gFlameChargeEmberTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c return Move_COIL: loadspritegfx ANIM_TAG_TENDRILS loopsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET, 0x6, 0x4 - launchtemplate gConstrictBindingSpriteTemplate 0x84, 0x4, 0x0 0x10 0x0 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x10, 0x0, 0x2 delay 0x7 - launchtemplate gConstrictBindingSpriteTemplate 0x83 0x4 0x0 0x0 0x0 0x2 - launchtemplate gConstrictBindingSpriteTemplate 0x82, 0x4, 0x0 0x8 0x1 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x0, 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x8, 0x1, 0x2 delay 0x7 - launchtemplate gConstrictBindingSpriteTemplate 0x83 0x4 0x0 0xfff8 0x1 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfff8, 0x1, 0x2 delay 0x8 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x3 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x3, 0x0, 0x6, 0x1 delay 0x14 - launchtask AnimTask_ShakeMon2 0x83 0x5 0x1 0x4 0x0 0x5 0x1 - launchtask AnimTask_StretchTargetUp 0x3 0x0 + createvisualtask AnimTask_ShakeMon2, 0x83, 0x1, 0x4, 0x0, 0x5, 0x1 + createvisualtask AnimTask_StretchTargetUp, 0x3 playsewithpan SE_M_BIND, SOUND_PAN_TARGET setarg 0x7 0xffff waitforvisualfinish @@ -5236,17 +5236,17 @@ Move_FOUL_PLAY: loadspritegfx ANIM_TAG_HANDS_AND_FEET @Black colour monbg ANIM_TARGET setalpha 12, 8 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 delay 0x6 - launchtemplate gFoulPlayImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0x6 0x1 + createsprite gFoulPlayImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0x6, 0x1 playsewithpan SE_M_VITAL_THROW SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, (ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS), 0x3, 0xa, 0x0, 0x0 - launchtemplate gFoulPlayRingTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0xa, 0x0, 0x0 + createsprite gFoulPlayRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 delay 0x8 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, (ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS), 0x3, 0xa, 0x0, 0x0 - launchtemplate gFoulPlayRingTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0xa, 0x0, 0x0 + createsprite gFoulPlayRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -5259,42 +5259,42 @@ Move_SIMPLE_BEAM: loadspritegfx ANIM_TAG_THIN_RING @ring setalpha 8, 8 monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_BUBBLE_BEAM, SOUND_PAN_ATTACKER call SimpleBeamsRegular call SimpleBeamsRegular - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x7FFF - launchtask AnimTask_SwayMon 0x5 0x5 0x0 0x6 0x800 0x4 ANIM_TARGET + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x7FFF + createvisualtask AnimTask_SwayMon, 0x5, 0x0, 0x6, 0x800, 0x4, ANIM_TARGET call SimpleBeamWithRings call SimpleBeamWithRings call SimpleBeamWithRings call SimpleBeamWithRings call SimpleBeamWithRings - launchtemplate gSimpleBeamBrownRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1F 0x8 + createsprite gSimpleBeamBrownRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8 delay 0x2 - launchtemplate gSimpleBeamPinkRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1F 0x8 + createsprite gSimpleBeamPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8 delay 0x2 stopsound waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7FFF - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end SimpleBeamsRegular: - launchtemplate gSimpleBeamBrownTemplate 0x82 0x6 0x10 0x0 0x0 0x0 0xd 0x0 + createsprite gSimpleBeamBrownTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xd, 0x0 delay 0x2 - launchtemplate gSimpleBeamPinkTemplate 0x82 0x6 0x10 0x0 0x0 0x0 0xd 0x0 + createsprite gSimpleBeamPinkTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xd, 0x0 delay 0x2 return SimpleBeamWithRings: - launchtemplate gSimpleBeamBrownTemplate 0x82 0x6 0x10 0x0 0x0 0x0 0xd 0x0 - launchtemplate gSimpleBeamBrownRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1F 0x8 + createsprite gSimpleBeamBrownTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xd, 0x0 + createsprite gSimpleBeamBrownRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8 delay 0x2 - launchtemplate gSimpleBeamPinkTemplate 0x82 0x6 0x10 0x0 0x0 0x0 0xd 0x0 - launchtemplate gSimpleBeamPinkRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1F 0x8 + createsprite gSimpleBeamPinkTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xd, 0x0 + createsprite gSimpleBeamPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8 delay 0x2 return @@ -5309,21 +5309,21 @@ Move_ENTRAINMENT: playsewithpan SE_M_TEETER_DANCE, SOUND_PAN_ATTACKER delay 0x18 playsewithpan SE_M_TEETER_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x1f 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x1f, 0x1 waitforvisualfinish end Move_AFTER_YOU: loadspritegfx ANIM_TAG_ANGER @rage loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @green color - launchtask AnimTask_SwayMon 0x5 0x5 0x1 0xF 0x600 0x2 ANIM_ATTACKER + createvisualtask AnimTask_SwayMon, 0x5, 0x1, 0xF, 0x600, 0x2, ANIM_ATTACKER delay 0x1 - launchtemplate gAfterYouGreenRageTemplate 0x2 0x3 0x0 0xffec 0xffe0 - launchtemplate gAfterYouGreenRageTemplate 0x2 0x3 0x0 0xfffb 0xffe5 + createsprite gAfterYouGreenRageTemplate, ANIM_ATTACKER, 2, 0x0, 0xffec, 0xffe0 + createsprite gAfterYouGreenRageTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xffe5 playsewithpan SE_M_SWAGGER2, SOUND_PAN_ATTACKER delay 0x14 - launchtemplate gAfterYouGreenRageTemplate 0x2 0x3 0x0 0x14 0xffe0 - launchtemplate gAfterYouGreenRageTemplate 0x2 0x3 0x0 0x23 0xffe5 + createsprite gAfterYouGreenRageTemplate, ANIM_ATTACKER, 2, 0x0, 0x14, 0xffe0 + createsprite gAfterYouGreenRageTemplate, ANIM_ATTACKER, 2, 0x0, 0x23, 0xffe5 playsewithpan SE_M_SWAGGER2, SOUND_PAN_ATTACKER waitforvisualfinish end @@ -5354,7 +5354,7 @@ Move_ECHOED_VOICE: loadspritegfx ANIM_TAG_METAL_SOUND_WAVES monbg ANIM_DEF_PARTNER splitbgprio_foes ANIM_TARGET - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x2 0x0 0x8 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x2, 0x0, 0x8, 0x1 call MetalSoundPlayNote call MetalSoundPlayNote call MetalSoundPlayNote @@ -5366,24 +5366,24 @@ Move_ECHOED_VOICE: end MetalSoundPlayNote: panse SE_M_UPROAR, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 - launchtemplate gMetalSoundSpriteTemplate 0x82 0x6 0x10 0x0 0x0 0x0 0x1e 0x0 + createsprite gMetalSoundSpriteTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0x1e, 0x0 delay 0x2 return Move_CHIP_AWAY: loadspritegfx ANIM_TAG_IMPACT - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x7FFF waitforvisualfinish monbg ANIM_ATK_PARTNER setalpha 12, 8 - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x18 0x6 0x1 0x5 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x18, 0x6, 0x1, 0x5 delay 0x4 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x5 0x0 0x6 0x1 - launchtemplate gBasicHitSplatSpriteTemplate 0x84, 0x4, 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x5, 0x0, 0x6, 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_VITAL_THROW2 SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_ATK_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x7FFF waitforvisualfinish blendoff end @@ -5450,27 +5450,27 @@ Move_QUICK_GUARD: loadspritegfx ANIM_TAG_QUICK_GUARD_HAND @hand loadspritegfx ANIM_TAG_SPARKLE_4 @sparkles setalpha 12, 8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x0 0x2 0x0 0xa 0x7FFF + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x0, 0x2, 0x0, 0xa, 0x7FFF delay 0x10 monbg ANIM_ATTACKER - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xE 0x0 0x8 0x0 0x0 - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xfff2 0x0 0x8 0x0 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xE, 0x0, 0x8, 0x0, 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xfff2, 0x0, 0x8, 0x0, 0x0 delay 0x1 - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xE 0x0 0x8 0x0 0x0 - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xfff2 0x0 0x8 0x0 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xE, 0x0, 0x8, 0x0, 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xfff2, 0x0, 0x8, 0x0, 0x0 delay 0x1 - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xE 0x0 0x8 0x0 0x0 - launchtemplate gQuickGuardArmImpactTemplate 0x83 0x5 0xfff2 0x0 0x8 0x0 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xE, 0x0, 0x8, 0x0, 0x0 + createsprite gQuickGuardArmImpactTemplate, ANIM_TARGET, 3, 0xfff2, 0x0, 0x8, 0x0, 0x0 waitforvisualfinish playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0x0 0xffe3 @up - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0x16 0xffec @upper right - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0x1D 0x0 @right - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0xffe9 0xffec @upper left - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0xffe2 0x0 @left - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0x0 0x1c @down - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0x16 0x13 @lower left - launchtemplate gSpinningSparkleSpriteTemplate 0xd 0x2 0xffea 0x13 @lower right + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0x0, 0xffe3 @up + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0x16, 0xffec @upper right + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0x1D, 0x0 @right + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0xffe9, 0xffec @upper left + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0xffe2, 0x0 @left + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0x0, 0x1c @down + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0x16, 0x13 @lower left + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 0xffea, 0x13 @lower right waitforvisualfinish blendoff clearmonbg ANIM_ATTACKER @@ -5587,21 +5587,21 @@ Move_HEAL_PULSE: Move_HEX: loadspritegfx ANIM_TAG_PURPLE_FLAME loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x10 0x4C4A @;Deep purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x10, 0x4C4A @;Deep purple waitforvisualfinish monbg ANIM_TARGET splitbgprio_all playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER waitbgfadein - launchtask AnimTask_PurpleFlamesOnTarget 0x3 0x0 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x2 0x0 0x25 0x1 + createvisualtask AnimTask_PurpleFlamesOnTarget, 0x3 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x2, 0x0, 0x25, 0x1 playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET delay 0x20 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0xc 0x4C4A @;Deep purple - launchtemplate gCurseGhostSpriteTemplate 0x84, 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0xc, 0x4C4A @;Deep purple + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 4 waitforvisualfinish clearmonbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x10 0x0 0x4C4A @;Deep purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x10, 0x0, 0x4C4A @;Deep purple waitforvisualfinish end @@ -5617,22 +5617,22 @@ SkyDropSetup: loadspritegfx ANIM_TAG_ROUND_SHADOW @fly delay 0x0 playsewithpan SE_M_STRING_SHOT, SOUND_PAN_ATTACKER - launchtemplate gSkyDropFlyBallTemplate 0x80 0x6 0x0 0x0 0x0 0x0 0x1e 0x0 + createsprite gSkyDropFlyBallTemplate, ANIM_TARGET, 0, 0x0, 0x0, 0x0, 0x0, 0x1e, 0x0 waitforvisualfinish invisible ANIM_TARGET playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gSkyDropTargetFlyingTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gSkyDropTargetFlyingTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 end SkyDropUnleash: visible ANIM_TARGET monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - launchtemplate gBounceBallLandSpriteTemplate 0x83 0x0 + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 delay 0x7 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x82, 0x4, 0x0 0x0 0x1 0x0 - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x5 0xb 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1, 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x5, 0xb, 0x1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -5642,8 +5642,8 @@ Move_SHIFT_GEAR: loadspritegfx ANIM_TAG_GEAR @Gear monbg ANIM_ATTACKER playsewithpan SE_ESCALATOR, SOUND_PAN_ATTACKER - launchtemplate gShiftGearGearsTemplate 0x2 0x5 ANIM_ATTACKER 0xFFF3 0x8 0x65 0xa - launchtemplate gShiftGearGearsTemplate 0x2 0x5 ANIM_ATTACKER 0xE 0xFFF8 0x65 0xa + createsprite gShiftGearGearsTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xFFF3, 0x8, 0x65, 0xa + createsprite gShiftGearGearsTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xE, 0xFFF8, 0x65, 0xa waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -5655,21 +5655,21 @@ Move_CIRCLE_THROW: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0xc 0x4 0x1 0x2 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0xc, 0x4, 0x1, 0x2 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x14 0x0 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x14, 0x0, 0x0, 0x4 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x1 - launchtemplate gCircleThrowRingTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 + createsprite gCircleThrowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET delay 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe8 0x0 0x0 0x4 - launchtemplate gCircleThrowRingTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe8, 0x0, 0x0, 0x4 + createsprite gCircleThrowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 waitforvisualfinish delay 0x3 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x7 delay 0xb - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0xa + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0xa waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -5721,10 +5721,10 @@ Move_QUASH: waitbgfadein setalpha 12, 8 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gQuashArmHitTemplate 0x83, 0x3 0x0 0xffe0 0xf + createsprite gQuashArmHitTemplate, ANIM_TARGET, 3, 0x0, 0xffe0, 0xf delay 0x13 playsewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER - launchtask AnimTask_SquishTarget 0x2 0x0 + createvisualtask AnimTask_SquishTarget, 0x2 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -5759,31 +5759,31 @@ Move_REFLECT_TYPE: monbg ANIM_TARGET setalpha 8, 8 playsewithpan SE_M_STRING_SHOT2, SOUND_PAN_TARGET - launchtemplate gReflectTypeBlueStringTemplate 0x82 0x2 0x0 0xa + createsprite gReflectTypeBlueStringTemplate, ANIM_TARGET, 2, 0x0, 0xa delay 0x4 - launchtemplate gReflectTypeVioletStringTemplate 0x82 0x2 0x0 0xfffe + createsprite gReflectTypeVioletStringTemplate, ANIM_TARGET, 2, 0x0, 0xfffe delay 0x4 - launchtemplate gReflectTypeWhiteStringTemplate 0x82 0x2 0x0 0x16 + createsprite gReflectTypeWhiteStringTemplate, ANIM_TARGET, 2, 0x0, 0x16 waitforvisualfinish clearmonbg ANIM_TARGET delay 0x1F monbg ANIM_ATTACKER playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER - launchtemplate gReflectTypeWhiteRingTemplate 0x2 0x0 + createsprite gReflectTypeWhiteRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypePinkRingTemplate 0x2 0x0 + createsprite gReflectTypePinkRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypeVioletRingTemplate 0x2 0x0 + createsprite gReflectTypeVioletRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypeBlueRingTemplate 0x2 0x0 + createsprite gReflectTypeBlueRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypeWhiteRingTemplate 0x2 0x0 + createsprite gReflectTypeWhiteRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypePinkRingTemplate 0x2 0x0 + createsprite gReflectTypePinkRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypeVioletRingTemplate 0x2 0x0 + createsprite gReflectTypeVioletRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gReflectTypeBlueRingTemplate 0x2 0x0 + createsprite gReflectTypeBlueRingTemplate, ANIM_ATTACKER, 2 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff @@ -5793,18 +5793,18 @@ Move_RETALIATE: loadspritegfx ANIM_TAG_CUT @Cut monbg ANIM_DEF_PARTNER setalpha 9, 8 - launchtask AnimTask_AttackerPunchWithTrace 0x2 0x2 0x7128 0xa - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_AttackerPunchWithTrace, 0x2, 0x7128, 0xa + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 waitforvisualfinish playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gGuillotineSpriteTemplate 0x2 0x1 0x0 - launchtemplate gGuillotineSpriteTemplate 0x2 0x1 0x1 + createsprite gGuillotineSpriteTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gGuillotineSpriteTemplate, ANIM_ATTACKER, 2, 0x1 delay 0x38 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x10 0x43D + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x10, 0x43D waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x043D + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x043D waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -5814,26 +5814,26 @@ Move_FINAL_GAMBIT: loadspritegfx ANIM_TAG_PINK_CLOUD @yawn animation loadspritegfx ANIM_TAG_WATER_IMPACT @blue colour loadspritegfx ANIM_TAG_EXPLOSION @explosion animation - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 @Darken + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 @Darken waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0xa 0x1 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x0 0x2 0x0 0x8 0x7fff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0xa, 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x0, 0x2, 0x0, 0x8, 0x7fff waitforvisualfinish playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_ATTACKER - launchtemplate gFinalGambitBlueYawnTemplate 0x2 0x3 0x0 0x0 0x25 + createsprite gFinalGambitBlueYawnTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x25 delay 0x4 waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0xf 0x1 - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffc 0xfffc 0xf 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0xf, 0x1 + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffc, 0xfffc, 0xf, 0x1, 0x1 waitforvisualfinish monbg ANIM_TARGET delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gFinalGambitExplosionTemplate 0x3 0x4 0x0 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 + createsprite gFinalGambitExplosionTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 waitforvisualfinish clearmonbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish end @@ -5841,7 +5841,7 @@ Move_BESTOW: monbg ANIM_TARGET splitbgprio ANIM_TARGET panse SE_M_METRONOME, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtask AnimTask_CreateBestowItem 0x2 0x6 0x14 0x0 0x0 0x0 0x28 0xffe7 + createvisualtask AnimTask_CreateBestowItem, 0x2, 0x14, 0x0, 0x0, 0x0, 0x28, 0xffe7 waitforvisualfinish unloadspritegfx ANIM_TAG_ITEM_BAG @;The generated item sprite uses this tag clearmonbg ANIM_TARGET @@ -6257,7 +6257,7 @@ Move_STRUGGLE_BUG: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_ATK, 2, 0, 9, 0x0a1f + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 0, 9, 0x0a1f waitforvisualfinish createvisualtask AnimTask_FlailMovement, 2, 0 createsprite gMovementWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 @@ -6268,7 +6268,7 @@ Move_STRUGGLE_BUG: createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 0x1e, 1, 0 createvisualtask AnimTask_ShakeTargetPartnerBasedOnMovePowerOrDmg, 2, FALSE, 1, 0x1e, 1, 0 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_ATK, 2, 9, 0, 0x0a1f + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 9, 0, 0x0a1f delay 5 createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 1 delay 5 @@ -6279,7 +6279,7 @@ Move_STRUGGLE_BUG: end Move_BULLDOZE: - launchtask AnimTask_Splash 0x2 0x2 0x0 0x3 + createvisualtask AnimTask_Splash, 0x2, 0x0, 0x3 delay 0x8 goto Move_EARTHQUAKE @@ -6289,34 +6289,34 @@ Move_FROST_BREATH: loadspritegfx ANIM_TAG_FIRE_PLUME fadetobg BG_ICE waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x300 0x0 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x300, 0x0, 0x0, 0xffff waitbgfadein playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x5 0x5 0x0 0x0 0x2 0x28 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x0, 0x0, 0x2, 0x28, 0x1 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x82 0x5 0x0 0xf 0x0 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xf, 0x0, 0x0, 0x4 waitforvisualfinish - launchtemplate gFrostBreathBlueBreathTemplate 0x82 0x5 0x1e 0xf 0x0 0xa 0xa + createsprite gFrostBreathBlueBreathTemplate, ANIM_TARGET, 2, 0x1e, 0xf, 0x0, 0xa, 0xa waitforvisualfinish loopsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET, 0xb, 0x3 - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x3 0x19 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0xc2 0x3 0x1 0x5 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x3, 0x19, 0x1 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 66, 0x1, 0x5, 0x0 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0xc2 0x3 0x1 0xfff6 0xfff1 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 66, 0x1, 0xfff6, 0xfff1 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0x82, 0x3, 0x1 0x0 0x19 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x19 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0xc2 0x3 0x1 0xf 0x5 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 66, 0x1, 0xf, 0x5 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0xc2 0x3 0x1 0xffe7 0x0 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 66, 0x1, 0xffe7, 0x0 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0x82, 0x3, 0x1 0x1e 0x1e + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 2, 0x1, 0x1e, 0x1e delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0x82, 0x3, 0x1 0xffe5 0x19 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 2, 0x1, 0xffe5, 0x19 delay 0x1 - launchtemplate gFrostBreathBlueRageTemplate 0xc2 0x3 0x1 0x0 0x8 + createsprite gFrostBreathBlueRageTemplate, ANIM_TARGET, 66, 0x1, 0x0, 0x8 waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0xc2 0x3 0x0 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 66, 0x0, 0x0, 0x4 waitforvisualfinish call UnsetPsychicBg end @@ -6330,31 +6330,31 @@ Move_DRAGON_TAIL: waitforvisualfinish setalpha 12, 8 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_ATTACKER - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x14 0x3 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x14, 0x3, 0x0, 0x4 delay 0x1 - launchtemplate gSlamHitSpriteTemplate 0x2 0x2 0x0 0x0 + createsprite gSlamHitSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 delay 0x3 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xfff4 0xa 0x0 0x3 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xfff4, 0xa, 0x0, 0x3 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 call TailWhackDown delay 0x3 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x0 0x3 0x6 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x0, 0x3, 0x6, 0x1 waitforvisualfinish delay 0x5 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x6 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end TailWhackDown: - launchtemplate gBasicHitSplatSpriteTemplate 0x83 4 0xfff6 0xfff8 1 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xfff6, 0xfff8, 1, 1 playsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET - launchtemplate gRockScatterSpriteTemplate, 0x82, 4, -12, 0x1b, 2, 3 - launchtemplate gRockScatterSpriteTemplate, 0x82, 4, 8, 28, 3, 4 - launchtemplate gRockScatterSpriteTemplate, 0x82, 4, -4, 30, 2, 3 - launchtemplate gRockScatterSpriteTemplate, 0x82, 4, 12, 25, 4, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -12, 0x1b, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 8, 28, 3, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -4, 30, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 12, 25, 4, 4 return Move_WORK_UP: @@ -6420,7 +6420,7 @@ Move_WILD_CHARGE: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gGrowingShockWaveOrbSpriteTemplate 0x2 0x0 @electric circle + createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 2 @electric circle delay 0x1e waitforvisualfinish loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 0x1c, 0x2 @@ -6429,23 +6429,23 @@ Move_WILD_CHARGE: call ScreenFlash waitforvisualfinish playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtemplate gVerticalDipSpriteTemplate 0x2 0x3 0x6 0x1 0x0 + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 0x6, 0x1, 0x0 waitforvisualfinish delay 0xb - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x1a 0x0 0x0 0x5 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x1a, 0x0, 0x0, 0x5 delay 0x6 - launchtemplate gBasicHitSplatSpriteTemplate 0x4 0x4 0xfff6 0x0 0x1 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x10 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0, 0x1, 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x10, 0x1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET call ElectricityEffect waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end ScreenFlash: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x07FE + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x07FE return Move_DRILL_RUN: @@ -6454,51 +6454,51 @@ Move_DRILL_RUN: setalpha 12, 8 fadetobg BG_FISSURE waitbgfadeout - launchtask AnimTask_PositionFissureBgOnBattler 0x5 0x3 0x1 0x5 0xffff - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x0 + createvisualtask AnimTask_PositionFissureBgOnBattler, 0x5, 0x1, 0x5, 0xffff + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x2 - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x1 - launchtemplate gHornHitSpriteTemplate 0x84 0x3 0x0 0x0 0xc + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x1 + createsprite gHornHitSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0xc waitforvisualfinish playse 0x14 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x0 0x2 0x0 0x28 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0xa 0x0 0x28 0x1 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x3 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x0, 0x2, 0x0, 0x28, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0xa, 0x0, 0x28, 0x1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x0 0x2 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x2, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0xfffc 0x3 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xfffc, 0x3, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0xfff8 0xfffb 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xfff8, 0xfffb, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x4 0xfff4 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x4, 0xfff4, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x10 0x0 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x0, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x5 0x12 0x1 0x3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x5, 0x12, 0x1, 0x3 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0xffef 0xc 0x1 0x2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffef, 0xc, 0x1, 0x2 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0xffeb 0xfff1 0x1 0x2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffeb, 0xfff1, 0x1, 0x2 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x8 0xffe5 0x1 0x2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x8, 0xffe5, 0x1, 0x2 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x20 0x0 0x1 0x2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x0, 0x1, 0x2 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x2 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x2 waitforvisualfinish call UnsetPsychicBg end @@ -6511,15 +6511,15 @@ Move_DUAL_CHOP: splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 delay 0x6 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x5 0x0 0x6 0x1 - launchtemplate gKarateChopSpriteTemplate 0x2 0x8 0xffe0 0x0 0x0 0x0 0xa 0x1 0x3 0x0 @left - launchtemplate gKarateChopSpriteTemplate 0x2 0x8 0x0515 0x0 0x0 0x0 0xa 0x1 0x3 0x0 @right + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x5, 0x0, 0x6, 0x1 + createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x0, 0x0, 0xa, 0x1, 0x3, 0x0 @left + createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, 0x0515, 0x0, 0x0, 0x0, 0xa, 0x1, 0x3, 0x0 @right waitforvisualfinish playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gDualChopImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x4 0x0 0x6 0x1 + createsprite gDualChopImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x4, 0x0, 0x6, 0x1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -6529,12 +6529,12 @@ Move_HEART_STAMP: loadspritegfx ANIM_TAG_HEART_STAMP monbg ANIM_TARGET loopsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER, 0xc, 0x3 - launchtemplate gHeartStampSpinningHeartTemplate, 0x80, 0x4 0x0 0x0 0x1 0x1e + createsprite gHeartStampSpinningHeartTemplate, ANIM_TARGET, 0, 0x0, 0x0, 0x1, 0x1e delay 0x1E clearmonbg ANIM_TARGET playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon2 0x83 0x5 0x1 0x4 0x0 0x5 0x1 - launchtask AnimTask_StretchTargetUp 0x3 0x0 + createvisualtask AnimTask_ShakeMon2, 0x83, 0x1, 0x4, 0x0, 0x5, 0x1 + createvisualtask AnimTask_StretchTargetUp, 0x3 waitforvisualfinish end @@ -6544,10 +6544,10 @@ Move_HORN_LEECH: loadspritegfx ANIM_TAG_ORBS loadspritegfx ANIM_TAG_BLUE_STAR playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER - launchtemplate gHornLeechHornTemplate 0x82, 0x3, 0x0 0x0 0x25 + createsprite gHornLeechHornTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x25 waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x5 0x0 0x6 0x1 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x5, 0x0, 0x6, 0x1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET call GigaDrainAbsorbEffect waitforvisualfinish @@ -6563,18 +6563,18 @@ Move_SACRED_SWORD: monbg ANIM_ATTACKER setalpha 12, 8 playsewithpan SE_M_SWORDS_DANCE, SOUND_PAN_ATTACKER - launchtemplate gSwordsDanceBladeSpriteTemplate 0x2 0x2 0x0 0x0 + createsprite gSwordsDanceBladeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 delay 0x16 - launchtask AnimTask_FlashAnimTagWithColor 0x2 0x7 0x2715 0x2 0x2 0x7ff2 0x10 0x0 0x0 + createvisualtask AnimTask_FlashAnimTagWithColor, 0x2, 0x2715, 0x2, 0x2, 0x7ff2, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER delay 0x1 monbg ANIM_TARGET playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - launchtemplate gSacredSwordBladesTemplate 0x81 0x5 0x0 0xa 0x0 0xFF00 0xA - launchtemplate gSacredSwordCutTemplate 0x2 0x3 0x28 0xffe0 0x0 + createsprite gSacredSwordBladesTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xFF00, 0xA + createsprite gSacredSwordCutTemplate, ANIM_ATTACKER, 2, 0x28, 0xffe0, 0x0 delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x0 0x3 0xa 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x0, 0x3, 0xa, 0x1 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -6585,11 +6585,11 @@ Move_RAZOR_SHELL: loadspritegfx ANIM_TAG_RAZOR_SHELL loadspritegfx ANIM_TAG_CUT monbg ANIM_TARGET - launchtemplate gRazorShellTemplate 0x2 0x5 ANIM_TARGET 0x0 0x0 25 0 + createsprite gRazorShellTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x0, 25, 0 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gCuttingSliceSpriteTemplate 0x1 0x3 0x28 0xffe0 0x0 + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 1, 0x28, 0xffe0, 0x0 delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xa 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xa, 0x1 waitforvisualfinish clearmonbg ANIM_TARGET waitforvisualfinish @@ -6602,19 +6602,19 @@ Move_HEAT_CRASH: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_SUCCESS, SOUND_PAN_TARGET - launchtemplate gHeatCrashEruptionRockTemplate 0x3 0x3 0x0 0xffe0 0xf + createsprite gHeatCrashEruptionRockTemplate, ANIM_ATTACKER, 3, 0x0, 0xffe0, 0xf delay 0x13 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0xfff8 0x1 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x4 0x9 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff8, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x4, 0x9, 0x1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET delay 0x5 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xa 0xfff8 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xa, 0xfff8, 0x1, 0x1 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x5 0x1 - launchtemplate gRockScatterSpriteTemplate 0x82, 0x4, 0xfff4 0x20 0x3 0x4 - launchtemplate gRockScatterSpriteTemplate 0x82, 0x4, 0x8 0x1f 0x2 0x2 - launchtemplate gRockScatterSpriteTemplate 0x82, 0x4, 0xfffc 0x1c 0x2 0x3 - launchtemplate gRockScatterSpriteTemplate 0x82, 0x4, 0xc 0x1e 0x4 0x3 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x5, 0x1 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 0xfff4, 0x20, 0x3, 0x4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 0x8, 0x1f, 0x2, 0x2 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 0xfffc, 0x1c, 0x2, 0x3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 0xc, 0x1e, 0x4, 0x3 clearmonbg ANIM_TARGET blendoff end @@ -6625,9 +6625,9 @@ Move_LEAF_TORNADO: monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET playsewithpan SE_M_GUST, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x2 0x2f 0x1 - launchtemplate gEllipticalGustSpriteTemplate 0x2 0x2 0x0 0xfff0 - launchtask AnimTask_AnimateGustTornadoPalette 0x5 0x2 0x1 0x46 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x2, 0x2f, 0x1 + createsprite gEllipticalGustSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 + createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46 call LeafTornadoVortex call LeafTornadoVortex call LeafTornadoVortex @@ -6636,17 +6636,17 @@ Move_LEAF_TORNADO: clearmonbg ANIM_TARGET end LeafTornadoVortex: - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, 0x1 delay 0x2 - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, 0x1 delay 0x2 - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, 0x1 delay 0x2 - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, 0x1 delay 0x2 - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, 0x1 delay 0x2 - launchtemplate gLeafTornadoVortexTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce 0x1 + createsprite gLeafTornadoVortexTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, 0x1 delay 0x2 return @@ -6690,19 +6690,19 @@ Move_COTTON_GUARD: blendoff end CottonSporesSpiralInward: - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0x28 0xfff6 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0x28, 0xfff6, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0xffdd 0xfff6 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0xffdd, 0xfff6, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0xf 0xffd8 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0xf, 0xffd8, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0xfff6 0xffe0 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xffe0, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0x19 0xffec 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0x19, 0xffec, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0xffd8 0xffec 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0xd delay 0x3 - launchtemplate gCottonGuardSporeTemplate 0x2 0x3 0x5 0xffd8 0xd + createsprite gCottonGuardSporeTemplate, ANIM_ATTACKER, 2, 0x5, 0xffd8, 0xd delay 0x3 return @@ -6710,37 +6710,37 @@ Move_NIGHT_DAZE: loadspritegfx ANIM_TAG_THIN_RING @uproar loadspritegfx ANIM_TAG_PURPLE_FLAME @dark violet color loadspritegfx ANIM_TAG_RED_ORB @circles - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_ORB, SOUND_PAN_ATTACKER - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x0 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x20 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x40 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x60 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x80 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0xa0 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0x0 - launchtemplate gNightDazeVioletCirclesTemplate 0x82 0x1 0xe0 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x0 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x20 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x40 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x60 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x80 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0xa0 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0x0 + createsprite gNightDazeVioletCirclesTemplate, ANIM_TARGET, 2, 0xe0 delay 0x1 - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0x1 - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0xF - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0x1 - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0x1 - launchtemplate gNightDazeVioletRingsTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gNightDazeVioletRingsTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x1f 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x2002 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x1f, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x2002 delay 0x6 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x2002 + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x2002 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish end @@ -6769,17 +6769,17 @@ Move_TAIL_SLAP: setalpha 12, 8 choosetwoturnanim TailSlapRight TailSlapLeft TailSlapContinue: - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET blendoff end TailSlapRight: - launchtemplate gTailSlapTemplate 0x2 0x4 0xfff8 0x0 0x1 0x0 + createsprite gTailSlapTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x0, 0x1, 0x0 goto TailSlapContinue TailSlapLeft: - launchtemplate gTailSlapTemplate 0x2 0x4 0x8 0x0 0x1 0x0 + createsprite gTailSlapTemplate, ANIM_ATTACKER, 2, 0x8, 0x0, 0x1, 0x0 goto TailSlapContinue Move_HURRICANE: @@ -6789,10 +6789,10 @@ Move_HURRICANE: setalpha 12, 8 fadetobg BG_HURRICANE waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x1000 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x1000, 0x0, 0x1, 0xffff waitbgfadein playsewithpan SE_M_GUST, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x40 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x40, 0x1 call HurricaneGust delay 0xA call HurricaneGust @@ -6819,16 +6819,16 @@ Move_HEAD_CHARGE: loadspritegfx ANIM_TAG_IMPACT fadetobgfromset BG_GIGA_IMPACT_OPPONENT, BG_GIGA_IMPACT_PLAYER, BG_GIGA_IMPACT_OPPONENT waitbgfadein - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x0 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x2 - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x1 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x1 waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 0x0 0x2 0x0 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x5 0x0 0x6 0x1 - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x2 - launchtemplate gFlashingHitSplatSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x0, 0x2, 0x0, 0x4, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x5, 0x0, 0x6, 0x1 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish restorebg @@ -6841,17 +6841,17 @@ Move_GEAR_GRIND: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_ESCALATOR, SOUND_PAN_ATTACKER - launchtemplate gGearGrindTemplate 0x2 0x6 0xffe0 0xffe0 0x0 0x333 0x333 0xa - launchtemplate gGearGrindTemplate 0x2 0x6 0x20 0x20 0x0 0xfccd 0xfccd 0xa + createsprite gGearGrindTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe0, 0x0, 0x333, 0x333, 0xa + createsprite gGearGrindTemplate, ANIM_ATTACKER, 2, 0x20, 0x20, 0x0, 0xfccd, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x7 0x5 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x7, 0x5, 0x2 waitforvisualfinish - launchtemplate gGearGrindTemplate 0x2 0x6 0x20 0xffe0 0x0 0xfccd 0x333 0xa - launchtemplate gGearGrindTemplate 0x2 0x6 0xffe0 0x20 0x0 0x333 0xfccd 0xa + createsprite gGearGrindTemplate, ANIM_ATTACKER, 2, 0x20, 0xffe0, 0x0, 0xfccd, 0x333, 0xa + createsprite gGearGrindTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x20, 0x0, 0x333, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x8 0x4 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x8, 0x4, 0x2 waitforvisualfinish stopsound clearmonbg ANIM_TARGET @@ -6868,16 +6868,16 @@ Move_SEARING_SHOT: createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_WARM_ROCK, 0x0, 0xB, 0xB, 0x01BE @Orange monbg ANIM_ATTACKER setalpha 8, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 waitforvisualfinish - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x3c 0x2 0xc - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x1F + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x3c, 0x2, 0xc + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x1F playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0x1e playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0x1e playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gSearingShotRedChargeTemplate 0x2 0x1 0x0 + createsprite gSearingShotRedChargeTemplate, ANIM_ATTACKER, 2, 0x0 delay 0x19 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0x14 @@ -6886,66 +6886,66 @@ Move_SEARING_SHOT: playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x0 0x1e 0x19 0xffec - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x20 0x1e 0x19 0xffec - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x40 0x1e 0x19 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0x1e, 0x19, 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x20, 0x1e, 0x19, 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x40, 0x1e, 0x19, 0xffec delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x60 0x1e 0x19 0xffec - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x80 0x1e 0x19 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x60, 0x1e, 0x19, 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x80, 0x1e, 0x19, 0xffec delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xa0 0x1e 0x19 0xffec - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xa0 0x1e 0x19 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xa0, 0x1e, 0x19, 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xa0, 0x1e, 0x19, 0xffec delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xe0 0x1e 0x19 0xffec + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xe0, 0x1e, 0x19, 0xffec delay 0xF playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x0 0x1e 0x19 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0x1e, 0x19, 0x0 delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x20 0x1e 0x19 0x0 - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x40 0x1e 0x19 0x0 - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x60 0x1e 0x19 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x20, 0x1e, 0x19, 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x40, 0x1e, 0x19, 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x60, 0x1e, 0x19, 0x0 delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x2 0x5 0x1 0x80 0x1e 0x19 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 2, 0x1, 0x80, 0x1e, 0x19, 0x0 delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xa0 0x1e 0x19 0x0 - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xa0 0x1e 0x19 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xa0, 0x1e, 0x19, 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xa0, 0x1e, 0x19, 0x0 delay 0x2 - launchtemplate gSearingShotEruptionRockTemplate 0x42 0x5 0x1 0xe0 0x1e 0x19 0x0 + createsprite gSearingShotEruptionRockTemplate, ANIM_ATTACKER, 66, 0x1, 0xe0, 0x1e, 0x19, 0x0 delay 0x15 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x1F clearmonbg ANIM_ATTACKER fadetobg BG_FIRE waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xA00 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xA00, 0x0, 0x1, 0xffff waitbgfadein delay 0x1E monbg ANIM_ATK_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK_PARTNER | ANIM_PAL_DEF | ANIM_PAL_DEF_PARTNER 0x2 0x0 0x9 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ADJACENT, 0x2, 0x0, 0x9, 0x1F playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x1B 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x1B 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATK_PARTNER 0x3 0x0 0x1B 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x1B, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x1B, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATK_PARTNER, 0x3, 0x0, 0x1B, 0x1 playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_TARGET - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, -5, -5, 0x1 0x1E ANIM_TARGET - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, 5, 10, 0x1 0x1E ANIM_TARGET - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, -5, -5, 0x1 0x1E ANIM_DEF_PARTNER - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, 5, 10, 0x1 0x1E ANIM_DEF_PARTNER - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, -5, -5, 0x1 0x1E ANIM_ATK_PARTNER - launchtemplate gSearingShotEruptionImpactTemplate 0x83 0x5, 5, 10, 0x1 0x1E ANIM_ATK_PARTNER + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, -5, -5, 0x1, 0x1E, ANIM_TARGET + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, 5, 10, 0x1, 0x1E, ANIM_TARGET + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, -5, -5, 0x1, 0x1E, ANIM_DEF_PARTNER + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, 5, 10, 0x1, 0x1E, ANIM_DEF_PARTNER + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, -5, -5, 0x1, 0x1E, ANIM_ATK_PARTNER + createsprite gSearingShotEruptionImpactTemplate, ANIM_TARGET, 3, 5, 10, 0x1, 0x1E, ANIM_ATK_PARTNER delay 0x1E playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK_PARTNER | ANIM_PAL_DEF | ANIM_PAL_DEF_PARTNER 0x2 0x9 0x0 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ADJACENT, 0x2, 0x9, 0x0, 0x1F delay 0x1E call UnsetPsychicBg - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0x0 clearmonbg ANIM_ATK_PARTNER blendoff end Move_TECHNO_BLAST: - launchtask AnimTask_TechnoBlast 0x5 0x0 + createvisualtask AnimTask_TechnoBlast, 0x5 jumpargeq 0x0, TYPE_FIRE, TechnoBlastFire jumpargeq 0x0, TYPE_WATER, TechnoBlastWater jumpargeq 0x0, TYPE_ELECTRIC, TechnoBlastElectric @@ -6958,96 +6958,96 @@ TechnoBlastNormal: loadspritegfx ANIM_TAG_SPARK_2 @blast particles loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER, 0xE, 0x8 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0xffec, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x14 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x14, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteChargeTemplate 0x2 0x1 0x0 + createsprite gTechnoBlastWhiteChargeTemplate, ANIM_ATTACKER, 2, 0x0 call TechnoBlastWhiteCircles call TechnoBlastWhiteCircles - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0xffec, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x14 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x14, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0x10 delay 0x2 waitforvisualfinish playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastWhiteBlastTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gTechnoBlastWhiteSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gTechnoBlastWhiteBlastTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gTechnoBlastWhiteSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtemplate gTechnoBlastWhiteSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createsprite gTechnoBlastWhiteSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x1, 0x0 delay 0x2 - launchtemplate gTechnoBlastWhiteSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 + createsprite gTechnoBlastWhiteSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gTechnoBlastWhiteSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 + createsprite gTechnoBlastWhiteSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gTechnoBlastWhiteSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 + createsprite gTechnoBlastWhiteSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff clearmonbg ANIM_ATTACKER end TechnoBlastWhiteCircles: - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0x14 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffec 0x1e 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x1e, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x14 0xffe2 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x14, 0xffe2, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffec 0xffe2 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffec, 0xffe2, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x14 0x1e 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x14, 0x1e, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0x0 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x0, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x0 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x0, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0x28 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0x28, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x0 0xffd8 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd8, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0xffec, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0x28 0x14 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0x28, 0x14, 0x10 delay 0x2 - launchtemplate gTechnoBlastWhiteCircleTemplate 0x2 0x3 0xffd8 0xffec 0x10 + createsprite gTechnoBlastWhiteCircleTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0x10 delay 0x2 return @@ -7058,11 +7058,11 @@ TechnoBlastElectric: loadspritegfx ANIM_TAG_SPARK_2 @blast particles loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER, 0xE, 0x8 - launchtemplate gGrowingChargeOrbSpriteTemplate 0x2 0x1 0x0 + createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x0 call TechnoBlastCharging1 delay 0xF call TechnoBlastCharging2 @@ -7081,52 +7081,52 @@ TechnoBlastElectric: delay 0xF waitforvisualfinish playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastYellowBlastTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gTechnoBlastYellowBlastTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gTechnoBlastYellowSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createsprite gTechnoBlastYellowSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x1, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x5, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x5, 0x1 delay 0x2 - launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0 + createsprite gTechnoBlastYellowSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xf, 0x14, 0x5, 0x2 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xfff6, 0x5, 0x0 delay 0x2 - launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2 + createsprite gTechnoBlastYellowSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x19, 0x0, 0x5, 0x1 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x5, 0x2 delay 0x2 - launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1 + createsprite gTechnoBlastYellowSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x2, 0xfff8, 0x5, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xf, 0x5, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff clearmonbg ANIM_ATTACKER end TechnoBlastCharging1: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 return TechnoBlastCharging2: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 return TechnoBlastWater: @@ -7137,113 +7137,113 @@ TechnoBlastWater: loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal loadspritegfx ANIM_TAG_BUBBLE @bubbles monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x1 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x1 waitforvisualfinish - launchtemplate gTechnoBlastBlueChargeTemplate 0x2 0x1 0x0 + createsprite gTechnoBlastBlueChargeTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 waitforvisualfinish playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastBlueBlastTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gTechnoBlastBlueBlastTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gTechnoBlastBlueSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtemplate gTechnoBlastBlueSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xa 0xa 0x19 0x1 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff1 0x0 0x19 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createsprite gTechnoBlastBlueSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x1, 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x1 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x1 delay 0x2 - launchtemplate gTechnoBlastBlueSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x14 0xa 0x19 0x1 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x0 0xfff6 0x19 0x1 + createsprite gTechnoBlastBlueSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x1 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x1 delay 0x2 - launchtemplate gTechnoBlastBlueSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xfff6 0xf 0x19 0x1 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0x19 0x14 0x19 0x1 + createsprite gTechnoBlastBlueSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x1 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x1 delay 0x2 - launchtemplate gTechnoBlastBlueSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xffec 0x14 0x19 0x1 - launchtemplate gTechnoBlastBlueBubbleTemplate 0x2 0x4 0xc 0x0 0x19 0x1 + createsprite gTechnoBlastBlueSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x1 + createsprite gTechnoBlastBlueBubbleTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff clearmonbg ANIM_ATTACKER @@ -7258,29 +7258,29 @@ TechnoBlastFire: loadspritegfx ANIM_TAG_SPARK_2 @blast particles loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish - launchtemplate gTechnoBlastRedChargeTemplate 0x2 0x1 0x0 + createsprite gTechnoBlastRedChargeTemplate, ANIM_ATTACKER, 2, 0x0 delay 0x5 call TechnoBlastFireSpiral call TechnoBlastFireSpiral call TechnoBlastFireSpiral waitforvisualfinish playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastRedBlastTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gTechnoBlastRedBlastTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gTechnoBlastRedSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createsprite gTechnoBlastRedSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x1, 0x0 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, 176, 40 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, 240, 40 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, -160, 40 @@ -7289,37 +7289,37 @@ TechnoBlastFire: createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -224, -32, 40 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 112, -128, 40 delay 0x2 - launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 + createsprite gTechnoBlastRedSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 + createsprite gTechnoBlastRedSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 + createsprite gTechnoBlastRedSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff clearmonbg ANIM_ATTACKER end TechnoBlastFireSpiral: - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x4 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x8 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0xc + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x10 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x14 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x14 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x18 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x18 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 return @@ -7332,77 +7332,77 @@ TechnoBlastIce: loadspritegfx ANIM_TAG_SPARK_2 @blast particles loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal monbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish - launchtemplate gTechnoBlastIceChargeTemplate 0x2 0x1 0x0 + createsprite gTechnoBlastIceChargeTemplate, ANIM_ATTACKER, 2, 0x0 delay 0x5 call TechnoBlastIceChargeParticles call TechnoBlastIceChargeParticles call TechnoBlastIceChargeParticles - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xfff6 0xfff6 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xfff6, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xa 0x14 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xa, 0x14, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xfffb 0xa 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xfffb, 0xa, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0x11 0xfff4 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0x11, 0xfff4, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gTechnoBlastIceBlastTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gTechnoBlastIceBlastTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gTechnoBlastIceSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtemplate gTechnoBlastIceSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createsprite gTechnoBlastIceSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x1, 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 delay 0x2 - launchtemplate gTechnoBlastIceSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xa 0x14 0x0 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfffb 0xa 0x0 + createsprite gTechnoBlastIceSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0 delay 0x2 - launchtemplate gTechnoBlastIceSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x11 0xfff4 0x0 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xfff1 0xf 0x0 + createsprite gTechnoBlastIceSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xf, 0x0 delay 0x2 - launchtemplate gTechnoBlastIceSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x0 0x0 0x0 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0x14 0x2 0x0 + createsprite gTechnoBlastIceSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0x14, 0x2, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER end TechnoBlastIceChargeParticles: - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xfff6 0xfff6 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xfff6, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xa 0x14 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xa, 0x14, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xfffb 0xa 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xfffb, 0xa, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0x11 0xfff4 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0x11, 0xfff4, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0xfff1 0xf 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xf, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gTechnoBlastIceCrystalsTemplate 0x2 0x4 0x14 0x2 0x0 0x2 + createsprite gTechnoBlastIceCrystalsTemplate, ANIM_ATTACKER, 2, 0x14, 0x2, 0x0, 0x2 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 return @@ -7413,78 +7413,78 @@ Move_RELIC_SONG: loadspritegfx ANIM_TAG_MUSIC_NOTES loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - launchtask AnimTask_MusicNotesRainbowBlend 0x2 0x0 + createvisualtask AnimTask_MusicNotesRainbowBlend, 0x2 waitforvisualfinish createvisualtask SoundTask_PlayCryWithEcho, 2, ANIM_ATTACKER, 2 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x1d 0xfff4 0x0 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xfff4 0xffe3 0x1 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x7 0x0 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1d, 0xfff4, 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0xffe3, 0x1 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x7, 0x0, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x6 0x1 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x6, 0x1, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xc 0xffe3 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe3 0xfff4 0x0 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x1 0x2 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xc, 0xffe3, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe3, 0xfff4, 0x0 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x2, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x2 0x3 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x2, 0x3, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x18 0xffe8 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe8 0xffe8 0x0 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x3 0x0 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x18, 0xffe8, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0xffe8, 0x0 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x3, 0x0, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x2 0x1 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x2, 0x1, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x1d 0xfff4 0x0 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xfff4 0xffe3 0x1 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x5 0x2 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1d, 0xfff4, 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0xffe3, 0x1 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x5, 0x2, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x6 0x3 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x6, 0x3, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xc 0xffe3 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe3 0xfff4 0x0 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x2 0x0 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xc, 0xffe3, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe3, 0xfff4, 0x0 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x2, 0x0, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x2 0x1 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x2, 0x1, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x18 0xffe8 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe8 0xffe8 0x0 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x1 0x2 0xc + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x18, 0xffe8, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0xffe8, 0x0 + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x2, 0xc delay 0x5 - launchtemplate gWavyMusicNotesSpriteTemplate 0x82, 0x3, 0x5 0x3 0xc + createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 0x5, 0x3, 0xc delay 0x5 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x1d 0xfff4 0x0 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xfff4 0xffe3 0x1 + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1d, 0xfff4, 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0xffe3, 0x1 waitforvisualfinish - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x3 0x0 0xc 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x3 0x3 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x3, 0x0, 0xc, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x3, 0x3, 0x0, 0xc, 0x1 delay 0x5 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x5 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x5 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x20 0x14 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER - launchtask AnimTask_MusicNotesClearRainbowBlend 0x2 0x0 + createvisualtask AnimTask_MusicNotesClearRainbowBlend, 0x2 waitforvisualfinish end @@ -7496,21 +7496,21 @@ Move_SECRET_SWORD: monbg ANIM_ATTACKER setalpha 12, 8 playsewithpan SE_M_SWORDS_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x10 0x0 - launchtemplate gSwordsDanceBladeSpriteTemplate 0x2 0x2 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x10, 0x0 + createsprite gSwordsDanceBladeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 delay 0x16 - launchtask AnimTask_FlashAnimTagWithColor 0x2 0x7 0x2715 0x2 0x2 0x7ff2 0x10 0x0 0x0 + createvisualtask AnimTask_FlashAnimTagWithColor, 0x2, 0x2715, 0x2, 0x2, 0x7ff2, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER delay 0x1 monbg ANIM_TARGET playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - launchtemplate gSecretSwordBladesTemplate 0x81 0x5 0x0 0xa 0x0 0xFF00 0xA - launchtemplate gCuttingSliceSpriteTemplate 0x2 0x3 0x28 0xffe0 0x0 + createsprite gSecretSwordBladesTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xFF00, 0xA + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0xffe0, 0x0 delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x0 0x3 0xa 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x0, 0x3, 0xa, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -7526,22 +7526,22 @@ Move_GLACIATE: fadetobg BG_ICE waitbgfadeout playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xfff4 0x68 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xfff4 0x48 0x1 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xfffa 0x38 0x1 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xfffa 0x58 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x0 0x38 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x0 0x58 0x1 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x6 0x48 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x6 0x68 0x1 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xc 0x48 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0xc 0x38 0x1 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x12 0x50 0x0 0x4b - launchtemplate gGlaciateSmokeTemplate 0x84 0x5 0x0 0x12 0x48 0x1 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x68, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x48, 0x1, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x38, 0x1, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x58, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x38, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x58, 0x1, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x48, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x68, 0x1, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x48, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x38, 0x1, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x50, 0x0, 0x4b + createsprite gGlaciateSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x48, 0x1, 0x4b waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_DEF | ANIM_PAL_DEF_PARTNER), 0x2, 0x0, 0xA, 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_DEF_SIDE, 0x2, 0x0, 0xA, 0x7FFF call IceCrystalEffectLong - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_DEF | ANIM_PAL_DEF_PARTNER), 0x2, 0xA, 0x0, 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_DEF_SIDE, 0x2, 0xA, 0x0, 0x7FFF waitforvisualfinish blendoff clearmonbg ANIM_DEF_PARTNER @@ -7555,38 +7555,38 @@ Move_BOLT_STRIKE:: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @Electric Circle monbg ANIM_ATTACKER setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x07FE - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x40 0x0 0x2 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x07FE + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x40, 0x0, 0x2 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0xc - launchtemplate gGrowingShockWaveOrbSpriteTemplate 0x2 0x0 + createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 2 waitforvisualfinish clearmonbg ANIM_ATTACKER playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER waitplaysewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER, 0x8 - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x12 0x6 0x2 0x4 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x12, 0x6, 0x2, 0x4 delay 0xA fadetobg BG_BOLT_STRIKE waitbgfadeout waitforvisualfinish monbg ANIM_TARGET - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x1a 0x0 0x0 0x5 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x1a, 0x0, 0x0, 0x5 delay 0x6 - launchtemplate gBasicHitSplatSpriteTemplate 0x4 0x4 0xfff6 0x0 0x1 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x07FE - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x2 0x0 0x20 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0, 0x1, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x07FE + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x2, 0x0, 0x20, 0x1 playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET call ElectricityEffect - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x07FE + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x07FE playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET call ElectricityEffect waitforvisualfinish clearmonbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x07FE + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x07FE call UnsetPsychicBg - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0x0 blendoff waitforvisualfinish end @@ -7594,32 +7594,32 @@ Move_BOLT_STRIKE:: Move_BLUE_FLARE:: loadspritegfx ANIM_TAG_SMALL_EMBER @Fire loadspritegfx ANIM_TAG_METAL_BITS @Blue Flare Colour - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x10, 0x0 loopsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER, 0x7, 0x9 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x0 0xffe0 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe0, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x16 0xffea 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x16, 0xffea, 0x10 delay 0x2 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x1 0x0 0x9 0x1F - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x1e 0x0 0x10 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x1, 0x0, 0x9, 0x1F + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1e, 0x0, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x14 0x14 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x14, 0x14, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x0 0x1c 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x1c, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0xffed 0x13 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffed, 0x13, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0xffe5 0x0 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffe5, 0x0, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0xffee 0xffee 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffee, 0xffee, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x0 0xffe7 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe7, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x11 0xffef 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x11, 0xffef, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x17 0x0 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x17, 0x0, 0x10 delay 0x2 - launchtemplate gBlueFlareFlameJabTemplate 0x82 0x5 0x1 0x0 0x10 0x10 0x10 + createsprite gBlueFlareFlameJabTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0x10, 0x10 waitforvisualfinish playsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET call BlueFlareFireSpin @@ -7627,47 +7627,47 @@ Move_BLUE_FLARE:: call BlueFlareFireSpin fadetobg BG_FIRE_2 waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x1000 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x1000, 0x0, 0x0, 0xFFFF waitbgfadein playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER call BlueFlareFlameSpreadEffect waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x0 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x1 0x9 0x0 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x1, 0x9, 0x0, 0x1f call UnsetPsychicBg waitforvisualfinish end BlueFlareFireSpin: - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, 0x1 delay 0x2 - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, 0x1 delay 0x2 - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, 0x1 delay 0x2 - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, 0x1 delay 0x2 - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, 0x1 delay 0x2 - launchtemplate gBlueFlareFlameSwirlTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce 0x1 + createsprite gBlueFlareFlameSwirlTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, 0x1 delay 0x2 return BlueFlareFlameSpreadEffect: - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0x0 0xb0 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0xff40 0xf0 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0x0 0xff60 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0xff40 0xff90 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0xa0 0x30 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0xff20 0xffe0 0x28 - launchtemplate gBlueFlareBurnTemplate 0x81 0x5 0x0 0xa 0x70 0xff80 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xb0, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff40, 0xf0, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xff60, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff40, 0xff90, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xa0, 0x30, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff20, 0xffe0, 0x28 + createsprite gBlueFlareBurnTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x70, 0xff80, 0x28 return Move_FIERY_DANCE:: loadspritegfx ANIM_TAG_SMALL_EMBER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xc 0x14be + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xc, 0x14be waitforvisualfinish playsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x2 0x40 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x0 0x9 0x1f + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x2, 0x40, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x0, 0x9, 0x1f call FireSpinEffect call FireSpinEffect call FireSpinEffect @@ -7676,8 +7676,8 @@ Move_FIERY_DANCE:: call FireSpinEffect call FireSpinEffect waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x9 0x0 0x1f - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xc 0x0 0x14be + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x9, 0x0, 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xc, 0x0, 0x14be waitforvisualfinish end @@ -7688,37 +7688,37 @@ Move_FREEZE_SHOCK:: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @Electric Circle choosetwoturnanim FreezeShockCharge FreezeShockAttack FreezeShockCharge: - launchtask AnimTask_HorizontalShake 0x5 0x3 0x0 0x2 0x10 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x0, 0x2, 0x10 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0x0 0xf 0x7fff - launchtemplate gFreezeShockCircleTemplate 0x2 0x0 @electric circle + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0x0, 0xf, 0x7fff + createsprite gFreezeShockCircleTemplate, ANIM_ATTACKER, 2 @electric circle delay 0x14 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0xf 0x0 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0xf, 0x0, 0x7fff waitforvisualfinish end FreezeShockAttack: loopsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET, 0x5, 0x5 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 monbg ANIM_TARGET waitforvisualfinish playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_ATTACKER - launchtemplate gFreezeShockIceBallTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gFreezeShockIceBallTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 delay 0xf waitplaysewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET, 0x13 call ElectricityEffect waitforvisualfinish clearmonbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x0 waitforvisualfinish end @@ -7731,58 +7731,58 @@ Move_ICE_BURN:: waitforvisualfinish end IceBurnCharge: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish loopsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET, 0x4, 0x3 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0x8 0x0 0x0 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x0 0x2 0x10 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0x0 0xf 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0x8, 0x0, 0x0 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x0, 0x2, 0x10 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0x0, 0xf, 0x7fff delay 0x14 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0xf 0x0 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0xf, 0x0, 0x7fff waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish end IceBurnUnleash: monbg ANIM_TARGET fadetobg BG_ICE waitbgfadeout - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x7fff - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x7fff + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xfff4 0x68 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xfff4 0x48 0x1 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xfffa 0x38 0x1 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xfffa 0x58 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x0 0x38 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x0 0x58 0x1 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x6 0x48 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x6 0x68 0x1 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xc 0x48 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0xc 0x38 0x1 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x12 0x50 0x0 0x4b - launchtemplate gIceBurnSmokeTemplate 0x84 0x5 0x0 0x12 0x48 0x1 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x68, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x48, 0x1, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x38, 0x1, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x58, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x38, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x58, 0x1, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x48, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x68, 0x1, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x48, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x38, 0x1, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x50, 0x0, 0x4b + createsprite gIceBurnSmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x48, 0x1, 0x4b call FireSpreadEffect playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xa 0x14 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfffb 0xa 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x11 0xfff4 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xfff1 0xf 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xf, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x0 0x0 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0x14 0x2 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0x14, 0x2, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x7fff waitforvisualfinish restorebg clearmonbg ANIM_TARGET @@ -7795,36 +7795,36 @@ Move_SNARL:: monbg ANIM_DEF_PARTNER fadetobg BG_DARK waitbgfadeout - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x1d 0xfff4 0x0 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xfff4 0xffe3 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1d, 0xfff4, 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0xffe3, 0x1 delay 0x10 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xc 0xffe3 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe3 0xfff4 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xc, 0xffe3, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe3, 0xfff4, 0x0 delay 0x10 - launchtask AnimTask_UproarDistortion 0x2 0x1 0x0 - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 + createvisualtask AnimTask_UproarDistortion, 0x2, 0x0 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0x18 0xffe8 0x1 - launchtemplate gJaggedMusicNoteSpriteTemplate 0x2 0x4 0x0 0xffe8 0xffe8 0x0 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x18, 0xffe8, 0x1 + createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0xffe8, 0x0 waitforvisualfinish - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x3 0x0 0xc 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x3 0x3 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x3, 0x0, 0xc, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x3, 0x3, 0x0, 0xc, 0x1 delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x20 0x14 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitforvisualfinish call UnsetPsychicBg @@ -7837,18 +7837,18 @@ Move_ICICLE_CRASH:: fadetobg BG_ICE waitbgfadein monbg ANIM_DEF_PARTNER - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xfffb 0x0 0xfffb 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0x5 0x0 0x6 0x1 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x1 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0x13 0x0 0xa 0x01 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x01 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xffe9 0x0 0xfff6 0x1 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x1 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x5 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x5, 0x32, 0x1 delay 0x2 call LaunchIcicleCrashSpear call LaunchIcicleCrashSpear @@ -7858,28 +7858,28 @@ Move_ICICLE_CRASH:: waitbgfadeout end LaunchIcicleCrashSpear: - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0x1c 0x0 0xa 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0x1c, 0x0, 0xa, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xfff6 0x0 0xfffb 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xfff6, 0x0, 0xfffb, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xa 0x0 0x6 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x6, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0x18 0x0 0xa 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0x18, 0x0, 0xa, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xffe0 0x0 0xfff6 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xffe0, 0x0, 0xfff6, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 - launchtemplate gIcicleCrashSpearTemplate 0x82, 0x4, 0x1e 0x0 0xa 0x0 + createsprite gIcicleCrashSpearTemplate, ANIM_TARGET, 2, 0x1e, 0x0, 0xa, 0x0 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x2 return @@ -7890,13 +7890,13 @@ Move_V_CREATE:: loadspritegfx ANIM_TAG_JAGGED_MUSIC_NOTE @red color loadspritegfx ANIM_TAG_ECLIPSING_ORB @defense curl animation monbg ANIM_ATK_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 @Darken - launchtemplate gVCreateRedOrbTemplate 0x2 0x4 0x0 0x11 0x0 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 @Darken + createsprite gVCreateRedOrbTemplate, ANIM_ATTACKER, 2, 0x0, 0x11, 0x0, 0x1 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gVCreateRedRingTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gVCreateRedRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x1f playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET call VCreateFlames call VCreateFlames @@ -7918,47 +7918,47 @@ Move_V_CREATE:: clearmonbg ANIM_ATK_PARTNER fadetobg BG_FIRE @Mr. DS Fire waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xA00 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xA00, 0x0, 0x1, 0xffff waitbgfadein playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtask AnimTask_WindUpLunge 0x5 0x7 0x0 0xffe8 0x8 0x17 0xa 0x28 0xa + createvisualtask AnimTask_WindUpLunge, 0x5, 0x0, 0xffe8, 0x8, 0x17, 0xa, 0x28, 0xa delay 0x23 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x5 0x32 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x1f + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x5, 0x32, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x1f playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, 0x1, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, 0x1, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, 0x1, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, 0x1, 0x1 waitforvisualfinish - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 - launchtemplate gClawSlashSpriteTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 - launchtemplate gClawSlashSpriteTemplate 0x82, 0x3, 0xa 0xfff6 0x1 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 0xa, 0xfff6, 0x1 waitforvisualfinish - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x4 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x4, 0x0, 0xc, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x1f - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x1f delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER call UnsetPsychicBg - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x0 0xffff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0xffff waitforvisualfinish end VCreateFlames: - launchtemplate gVCreateFlameTemplate 0x82 0x5 0x0 0x1 0x16 0xFFEA 0x10 @upperright - launchtemplate gVCreateFlameTemplate 0x82 0x5 0x0 0x1 0xFFEE 0xFFEE 0x10 @upperleft + createsprite gVCreateFlameTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x16, 0xFFEA, 0x10 @upperright + createsprite gVCreateFlameTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFEE, 0xFFEE, 0x10 @upperleft delay 0x3 return @@ -7972,52 +7972,52 @@ Move_FUSION_FLARE:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SMALL_BUBBLES, 0x0, 0xD, 0xD, 0x015B @Reddish Orange monbg ANIM_TARGET setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER call FusionFlareBuff delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x2 0x2 0x0 0xb 0x1F - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 - launchtemplate gVerticalDipSpriteTemplate 0x2 0x3 0x8 0x1 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x1F + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 0x8, 0x1, 0x0 delay 0x8 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gFusionFlareRedBallUpTemplate 0x2 0x0 + createsprite gFusionFlareRedBallUpTemplate, ANIM_ATTACKER, 2 delay 0x20 - launchtemplate gFusionFlareRedBallTemplate 0x3 0x3 0x0 0xffA0 0x2F - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x64 0x64 0x8 0x1 0x14 0x28 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x14 0x64 0x10 0x2 0xa 0x23 0x1 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0xc8 0x50 0x8 0x1 0x28 0x14 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x50 0x3c 0xa 0x3 0x14 0x32 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x8c 0x64 0x10 0x1 0x14 0x1e 0x1 + createsprite gFusionFlareRedBallTemplate, ANIM_ATTACKER, 3, 0x0, 0xffA0, 0x2F + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x64, 0x64, 0x8, 0x1, 0x14, 0x28, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x14, 0x64, 0x10, 0x2, 0xa, 0x23, 0x1 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0xc8, 0x50, 0x8, 0x1, 0x28, 0x14, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x50, 0x3c, 0xa, 0x3, 0x14, 0x32, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x8c, 0x64, 0x10, 0x1, 0x14, 0x1e, 0x1 delay 0x29 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0xb 0x1F + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0xb, 0x1F delay 0x5 - launchtemplate gFusionFlareRedRingTemplate 0x3 0x6 0x1 0x1 0x1 0x1 0x1F 0x8 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x64 0x64 0x8 0x1 0x14 0x28 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x14 0x64 0x10 0x2 0xa 0x23 0x1 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0xc8 0x50 0x8 0x1 0x28 0x14 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x50 0x3c 0xa 0x3 0x14 0x32 0x0 - launchtemplate gFusionFlareRedBubblesTemplate 0x42 0x7 0x8c 0x64 0x10 0x1 0x14 0x1e 0x1 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x1 0x2 0x10 + createsprite gFusionFlareRedRingTemplate, ANIM_ATTACKER, 3, 0x1, 0x1, 0x1, 0x1, 0x1F, 0x8 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x64, 0x64, 0x8, 0x1, 0x14, 0x28, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x14, 0x64, 0x10, 0x2, 0xa, 0x23, 0x1 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0xc8, 0x50, 0x8, 0x1, 0x28, 0x14, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x50, 0x3c, 0xa, 0x3, 0x14, 0x32, 0x0 + createsprite gFusionFlareRedBubblesTemplate, ANIM_ATTACKER, 66, 0x8c, 0x64, 0x10, 0x1, 0x14, 0x1e, 0x1 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x1, 0x2, 0x10 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end FusionFlareBuff: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return Move_FUSION_BOLT:: @@ -8027,42 +8027,42 @@ Move_FUSION_BOLT:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SPARK, 0x0, 0xC, 0xC, 0x7960 @Blue Electricity createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_CIRCLE_OF_LIGHT, 0x0, 0xC, 0xC, 0x7960 @Blue Electricity createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ELECTRICITY, 0x0, 0xC, 0xC, 0x7960 @Blue Electricity - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 0x0, 0x0, 0xE, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0x0, 0x0, 0xE, 0x0 waitforvisualfinish - launchtemplate gVoltTackleOrbSlideSpriteTemplate 0x1 0x0 + createsprite gVoltTackleOrbSlideSpriteTemplate, ANIM_ATTACKER, 1 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER invisible ANIM_ATTACKER waitforvisualfinish delay 0x8 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x0 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x0 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x1 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x1 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x2 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x2 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x3 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x3 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET waitforvisualfinish - launchtemplate gFusionBoltBallTemplate 0x82 0x1 0x10 + createsprite gFusionBoltBallTemplate, ANIM_TARGET, 2, 0x10 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_ATTACKER delay 0x8 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0xa 0x0 0x12 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0xa, 0x0, 0x12, 0x1 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x1 0x10 0x10 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x10, 0x10 delay 0x2 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x1 0xfff0 0xfff0 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0xfff0, 0xfff0 delay 0x8 - launchtask AnimTask_VoltTackleAttackerReappear 0x5 0x0 + createvisualtask AnimTask_VoltTackleAttackerReappear, 0x5 waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x3 0x0 0x9 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x3, 0x0, 0x9, 0x1 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0x10 0x10 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x10 delay 0x2 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0xfff0 0xfff0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0xE 0x0 0x0 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0, 0xfff0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0xE, 0x0, 0x0 waitforvisualfinish end @@ -8070,32 +8070,32 @@ Move_FUSION_BOLT:: Move_FLYING_PRESS:: loadspritegfx ANIM_TAG_ROUND_SHADOW @fly/bounce loadspritegfx ANIM_TAG_GRAY_SMOKE @smoke - setblends 0xF + setalpha 15, 0 playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish delay 0xF playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - launchtemplate gBounceBallLandSpriteTemplate 0x83 0x0 + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 delay 0x2 - launchtask AnimTask_SquishTarget 0x2 0x0 + createvisualtask AnimTask_SquishTarget, 0x2 delay 0x5 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0x8 0x8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0x8, 0x8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0xfff8 0xfff8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0xfff8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0x8 0xfff8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0x8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0xfff8 0x8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0xfff8, 0x8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0x8 0x8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0x8, 0x8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0xfff8 0xfff8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0xfff8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0x8 0xfff8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0x8, 0xfff8, 0x1, 0x0 delay 0x2 - launchtemplate gOctazookaSmokeSpriteTemplate 0x80 0x4 0xfff8 0x8 0x1 0x0 + createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 0, 0xfff8, 0x8, 0x1, 0x0 waitforvisualfinish blendoff end @@ -8105,25 +8105,25 @@ Move_MAT_BLOCK:: loadspritegfx ANIM_TAG_GREEN_LIGHT_WALL @green color monbg ANIM_ATK_PARTNER splitbgprio ANIM_ATTACKER - setblends 0x10 + setalpha 16, 0 delay 0x0 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0xfff8 0x18 - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0x8 0x18 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x18 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0x18 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0xfff8 0x8 - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0x8 0x8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0x8 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0xfff8 0xfff8 - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0x8 0xfff8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0xfff8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0xfff8 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0xfff8 0xffe8 - launchtemplate gMatBlockGreenConversionTemplate 0x2 0x2 0x8 0xffe8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0xffe8 + createsprite gMatBlockGreenConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0xffe8 delay 0x14 - launchtask AnimTask_ConversionAlphaBlend 0x5 0x0 + createvisualtask AnimTask_ConversionAlphaBlend, 0x5 waitforvisualfinish delay 0x1 clearmonbg ANIM_ATK_PARTNER @@ -8137,26 +8137,26 @@ Move_BELCH:: splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_SUCCESS, SOUND_PAN_ATTACKER - launchtemplate gBelchBerryTemplate 0x2 0x6 0x14 0xfff8 0xfff8 0xfff8 0x14 0xffe0 + createsprite gBelchBerryTemplate, ANIM_ATTACKER, 2, 0x14, 0xfff8, 0xfff8, 0xfff8, 0x14, 0xffe0 delay 0x13 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0xa 0x0 0x14 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0xa, 0x0, 0x14, 0x1 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, 0x1, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, 0x1, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, 0x1, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, 0x1, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xffe8 0x18 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0x18, 0x1, 0x1 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -8166,18 +8166,18 @@ Move_ROTOTILLER:: loadspritegfx ANIM_TAG_MUD_SAND loadspritegfx ANIM_TAG_DIRT_MOUND loadspritegfx ANIM_TAG_GREEN_SPARKLE - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x112C + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x112C waitforvisualfinish - launchtemplate gDirtMoundSpriteTemplate 0x1 0x3 0x0 0x0 0xb4 - launchtemplate gDirtMoundSpriteTemplate 0x1 0x3 0x0 0x1 0xb4 - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x6 0x4 0x2 0x4 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0x0, 0x0, 0xb4 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0x0, 0x1, 0xb4 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x6, 0x4, 0x2, 0x4 call DigThrowDirt call DigThrowDirt - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x6 0x4 0x2 0x4 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x6, 0x4, 0x2, 0x4 call DigThrowDirt call DigThrowDirt waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x112C + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x112C waitforvisualfinish end @@ -8337,36 +8337,36 @@ Move_FORESTS_CURSE: loadspritegfx ANIM_TAG_ROOTS @frenzy plant loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT @curse monbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 waitforvisualfinish playsewithpan SE_M_SCRATCH, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x8 0x02E3 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x64 0x64 0x8 0x1 0x14 0x28 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x14 0x64 0x10 0x2 0xa 0x23 0x1 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0xc8 0x50 0x8 0x1 0x28 0x14 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x50 0x3c 0xa 0x3 0x14 0x32 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x8c 0x64 0x10 0x1 0x14 0x1e 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x8, 0x02E3 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x64, 0x64, 0x8, 0x1, 0x14, 0x28, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x14, 0x64, 0x10, 0x2, 0xa, 0x23, 0x1 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0xc8, 0x50, 0x8, 0x1, 0x28, 0x14, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x50, 0x3c, 0xa, 0x3, 0x14, 0x32, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x8c, 0x64, 0x10, 0x1, 0x14, 0x1e, 0x1 waitforvisualfinish playsewithpan SE_M_SCRATCH, SOUND_PAN_ATTACKER - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x64 0x64 0x8 0x1 0x14 0x28 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x14 0x64 0x10 0x2 0xa 0x23 0x1 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0xc8 0x50 0x8 0x1 0x28 0x14 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x50 0x3c 0xa 0x3 0x14 0x32 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x8c 0x64 0x10 0x1 0x14 0x1e 0x1 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x64, 0x64, 0x8, 0x1, 0x14, 0x28, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x14, 0x64, 0x10, 0x2, 0xa, 0x23, 0x1 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0xc8, 0x50, 0x8, 0x1, 0x28, 0x14, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x50, 0x3c, 0xa, 0x3, 0x14, 0x32, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x8c, 0x64, 0x10, 0x1, 0x14, 0x1e, 0x1 waitforvisualfinish playsewithpan SE_M_SCRATCH, SOUND_PAN_ATTACKER - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x64 0x64 0x8 0x1 0x14 0x28 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x14 0x64 0x10 0x2 0xa 0x23 0x1 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0xc8 0x50 0x8 0x1 0x28 0x14 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x50 0x3c 0xa 0x3 0x14 0x32 0x0 - launchtemplate gForestsCurseIngrainTemplate 0x42 0x7 0x8c 0x64 0x10 0x1 0x14 0x1e 0x1 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x64, 0x64, 0x8, 0x1, 0x14, 0x28, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x14, 0x64, 0x10, 0x2, 0xa, 0x23, 0x1 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0xc8, 0x50, 0x8, 0x1, 0x28, 0x14, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x50, 0x3c, 0xa, 0x3, 0x14, 0x32, 0x0 + createsprite gForestsCurseIngrainTemplate, ANIM_ATTACKER, 66, 0x8c, 0x64, 0x10, 0x1, 0x14, 0x1e, 0x1 waitforvisualfinish - launchtemplate gCurseGhostSpriteTemplate 0x82 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x2 0x0 0xe 0x1 + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x2, 0x0, 0xe, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x8 0x0 0x02E3 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x8, 0x0, 0x02E3 delay 0x3 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -8383,35 +8383,35 @@ Move_PETAL_BLIZZARD:: createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 0x73, 0x37, 0x6, 0x3c, 0x19 delay 0x1 createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 0x73, 0x3c, 0x7, 0x3c, 0x1e - launchtemplate gPetalBlizzardTwister1Template 0x82 0x5 0x73 0x37 0xA 0x3c 0x1e + createsprite gPetalBlizzardTwister1Template, ANIM_TARGET, 2, 0x73, 0x37, 0xA, 0x3c, 0x1e delay 0x3 - launchtemplate gPetalBlizzardTwister1Template 0x82 0x5 0x64 0x32 0x4 0x32 0x1A + createsprite gPetalBlizzardTwister1Template, ANIM_TARGET, 2, 0x64, 0x32, 0x4, 0x32, 0x1A delay 0x1 - launchtemplate gPetalBlizzardTwister1Template 0x82 0x5 0x69 0x19 0x8 0x3c 0x14 + createsprite gPetalBlizzardTwister1Template, ANIM_TARGET, 2, 0x69, 0x19, 0x8, 0x3c, 0x14 delay 0x1 - launchtemplate gPetalBlizzardTwister1Template 0x82 0x5 0x73 0x28 0xA 0x30 0x1E + createsprite gPetalBlizzardTwister1Template, ANIM_TARGET, 2, 0x73, 0x28, 0xA, 0x30, 0x1E delay 0x3 - launchtemplate gPetalBlizzardTwister1Template 0x82 0x5 0x78 0x1E 0x6 0x2d 0x19 + createsprite gPetalBlizzardTwister1Template, ANIM_TARGET, 2, 0x78, 0x1E, 0x6, 0x2d, 0x19 createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 0x73, 0x23, 0xA, 0x3c, 0x1e delay 0x3 - launchtemplate gPetalBlizzardTwister2Template 0x82 0x5 0x69 0x14 0x8 0x28 0x0 + createsprite gPetalBlizzardTwister2Template, ANIM_TARGET, 2, 0x69, 0x14, 0x8, 0x28, 0x0 delay 0x3 createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 0x14, 0xff, 0xf, 0x20, 0x0 createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 0x6e, 0xA, 0x8, 0x20, 0x14 waitforvisualfinish - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 ANIM_TARGET 0x3 0x0 0xC 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0xC 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 ANIM_ATK_PARTNER 0x3 0x0 0xC 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, ANIM_TARGET, 0x3, 0x0, 0xC, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0xC, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, ANIM_ATK_PARTNER, 0x3, 0x0, 0xC, 0x1 delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x20 0x14 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -8456,17 +8456,17 @@ Move_FREEZE_DRY:: Move_DISARMING_VOICE:: loadspritegfx ANIM_TAG_NOISE_LINE - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6e7d waitforvisualfinish - launchtask SoundTask_PlayDoubleCry 0x2 0x2 0x0 0xff + createvisualtask SoundTask_PlayDoubleCry, 0x2, 0x0, 0xff call RoarEffect delay 0xA - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x1 0x0 0x1A 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x3 0x1 0x0 0x1A 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x1, 0x0, 0x1A, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x3, 0x1, 0x0, 0x1A, 0x1 waitforvisualfinish - launchtask SoundTask_WaitForCry 0x5 0x0 + createvisualtask SoundTask_WaitForCry, 0x5 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6e7d waitforvisualfinish end @@ -8539,51 +8539,51 @@ Move_CRAFTY_SHIELD:: loadspritegfx ANIM_TAG_CRAFTY_SHIELD monbg ANIM_ATK_PARTNER splitbgprio ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x5 0x4DBF - setblends 0x10 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x5, 0x4DBF + setalpha 16, 0 delay 0x0 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xffe8 0xffe8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xffe8, 0xffe8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xfff8 0xffe8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0xffe8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x8 0xffe8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0xffe8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x18 0xffe8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x18, 0xffe8 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xffe8 0xfff8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xffe8, 0xfff8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xfff8 0xfff8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0xfff8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x8 0xfff8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0xfff8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x18 0xfff8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x18, 0xfff8 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xffe8 0x8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xffe8, 0x8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xfff8 0x8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x8 0x8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0x8 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x18 0x8 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x18, 0x8 delay 0x3 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xffe8 0x18 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xffe8, 0x18 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0xfff8 0x18 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x18 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x8 0x18 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x8, 0x18 delay 0x3 - launchtemplate gCraftyShieldPinkConversionTemplate 0x2 0x2 0x18 0x18 + createsprite gCraftyShieldPinkConversionTemplate, ANIM_ATTACKER, 2, 0x18, 0x18 delay 0x14 playsewithpan SE_M_BARRIER, SOUND_PAN_ATTACKER - launchtask AnimTask_FlashAnimTagWithColor 0x2 0x7 0x2722 0x1 0x1 0x37ff 0xc 0x0 0x0 + createvisualtask AnimTask_FlashAnimTagWithColor, 0x2, 0x2722, 0x1, 0x1, 0x37ff, 0xc, 0x0, 0x0 delay 0x6 - launchtask AnimTask_ConversionAlphaBlend 0x5 0x0 + createvisualtask AnimTask_ConversionAlphaBlend, 0x5 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x5 0x0 0x4DBF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x5, 0x0, 0x4DBF waitforvisualfinish delay 0x1 clearmonbg ANIM_ATK_PARTNER @@ -8594,28 +8594,28 @@ Move_FLOWER_SHIELD:: loadspritegfx ANIM_TAG_FLOWER loadspritegfx ANIM_TAG_IMPACT setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6e7d waitforvisualfinish playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtemplate gPetalDanceBigFlowerSpriteTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0x10 0xffe8 0x8 0x64 - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0xfff0 0xffe8 0x8 0x64 + createsprite gPetalDanceBigFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0xffe8, 0x8, 0x64 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xffe8, 0x8, 0x64 delay 0xf - launchtemplate gPetalDanceBigFlowerSpriteTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0x20 0xffe8 0x8 0x64 - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0xffe0 0xffe8 0x8 0x64 + createsprite gPetalDanceBigFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xffe8, 0x8, 0x64 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe8, 0x8, 0x64 delay 0xf - launchtemplate gPetalDanceBigFlowerSpriteTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0x18 0xffe8 0x8 0x64 - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0xffe8 0xffe8 0x8 0x64 + createsprite gPetalDanceBigFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0xffe8, 0x8, 0x64 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0xffe8, 0xffe8, 0x8, 0x64 delay 0x1e - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0x10 0xffe8 0x0 0x64 - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0xfff0 0xffe8 0x0 0x64 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0xffe8, 0x0, 0x64 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xffe8, 0x0, 0x64 delay 0x1e - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0x14 0xfff0 0xe 0x50 - launchtemplate gPetalDanceSmallFlowerSpriteTemplate 0x2 0x4 0xffec 0xfff2 0x10 0x50 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0x14, 0xfff0, 0xe, 0x50 + createsprite gPetalDanceSmallFlowerSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff2, 0x10, 0x50 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6e7d waitforvisualfinish blendoff end @@ -8637,7 +8637,7 @@ Move_GRASSY_TERRAIN:: createsprite gGrassyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 126 createsprite gGrassyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 168 createsprite gGrassyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 210 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 0, 4, RGB(11, 26, 11) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 4, RGB(11, 26, 11) delay 52 setarg 7, 0xFFFF playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER @@ -8653,7 +8653,7 @@ Move_GRASSY_TERRAIN:: panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0x0 waitforvisualfinish delay 4 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(31, 24, 31) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 4, 0, RGB(31, 24, 31) waitforvisualfinish end @@ -8675,7 +8675,7 @@ Move_MISTY_TERRAIN:: createsprite gMistyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 126 createsprite gMistyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 168 createsprite gMistyTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 210 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 0, 7, RGB(31, 24, 31) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 7, RGB(31, 24, 31) delay 52 setarg 7, 0xFFFF playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER @@ -8691,7 +8691,7 @@ Move_MISTY_TERRAIN:: createsprite gMistyTerrainStarTemplate, ANIM_TARGET, 2, 224 waitforvisualfinish delay 4 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 7, 0, RGB(31, 24, 31) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 7, 0, RGB(31, 24, 31) waitforvisualfinish end @@ -8703,57 +8703,57 @@ Move_ELECTRIFY:: loadspritegfx ANIM_TAG_THIN_RING @ring monbg ANIM_ATTACKER loopsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET 0xa 0x4 - launchtemplate gElectrifyRingTemplate 0x2 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gElectrifyRingTemplate, ANIM_ATTACKER, 2 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x4 - launchtemplate gElectrifyRingTemplate 0x2 0x0 + createsprite gElectrifyRingTemplate, ANIM_ATTACKER, 2 delay 0x4 - launchtemplate gElectrifyRingTemplate 0x2 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gElectrifyRingTemplate, ANIM_ATTACKER, 2 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 waitforvisualfinish playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_ATTACKER - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0 0x28 0x2 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gZapCannonSparkSpriteTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0, 0x28, 0x2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 delay 0xA - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x0 0xB 0x039B - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x3 0x039B + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x0, 0xB, 0x039B + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x3, 0x039B delay 0x4 clearmonbg ANIM_ATTACKER delay 0x1 monbg ANIM_DEF_PARTNER playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET - launchtemplate gElectrifyYellowRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x4 0x0 0x6 0x1 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0 + createsprite gElectrifyYellowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x4, 0x0, 0x6, 0x1 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x5, 0x0 delay 0x1 - launchtemplate gElectrifyYellowRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 + createsprite gElectrifyYellowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 delay 0x1 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1 - launchtemplate gElectrifyYellowRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x5, 0x1 + createsprite gElectrifyYellowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 delay 0x1 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xf, 0x14, 0x5, 0x2 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xfff6, 0x5, 0x0 delay 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x19, 0x0, 0x5, 0x1 delay 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x5, 0x2 delay 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x2, 0xfff8, 0x5, 0x0 delay 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xf, 0x5, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0xB 0x0 0x039B - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x3 0x0 0x039B + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0xB, 0x0, 0x039B + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x3, 0x0, 0x039B waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -8774,36 +8774,36 @@ Move_PLAY_ROUGH:: waitplaysewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET, 0x46 waitplaysewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER, 0x50 waitplaysewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET, 0x5a - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x0 0xffee 0x6 0x6 0x4 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x1 0x12 0x6 0x6 0x4 - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0xff00 0xffd6 - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0x80 0xfff2 - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0x1a0 0xffda - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0xff80 0xffea + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x0, 0xffee, 0x6, 0x6, 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x1, 0x12, 0x6, 0x6, 0x4 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0xff00, 0xffd6 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0x80, 0xfff2 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0x1a0, 0xffda + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0xff80, 0xffea delay 0x0 call SubmissionHit playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xa0 0xffe0 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xff00 0xffd8 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0x80 0xfff0 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0x1a0 0xffda - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xff80 0xffea - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xfe80 0xffe1 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xa0, 0xffe0 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff00, 0xffd8 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x80, 0xfff0 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x1a0, 0xffda + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff80, 0xffea + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xfe80, 0xffe1 delay 0x0 call SubmissionHit playsewithpan SE_M_DIVE, SOUND_PAN_TARGET - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0xff00 0xffd6 - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0x80 0xfff2 - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0x1a0 0xffda - launchtemplate gPinkHeartSpriteTemplate 0x83 0x2 0xff80 0xffea + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0xff00, 0xffd6 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0x80, 0xfff2 + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0x1a0, 0xffda + createsprite gPinkHeartSpriteTemplate, ANIM_TARGET, 3, 0xff80, 0xffea delay 0x0 playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xa0 0xffe0 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xff00 0xffd8 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0x80 0xfff0 - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0x1a0 0xffda - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xff80 0xffea - launchtemplate gDizzyPunchDuckSpriteTemplate 0x83 0x4 0x10 0x8 0xfe80 0xffe1 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xa0, 0xffe0 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff00, 0xffd8 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x80, 0xfff0 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x1a0, 0xffda + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff80, 0xffea + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xfe80, 0xffe1 delay 0x0 call SubmissionHit waitforvisualfinish @@ -8818,24 +8818,24 @@ Move_FAIRY_WIND:: loadspritegfx ANIM_TAG_PINK_CLOUD monbg ANIM_DEF_PARTNER setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6e7d waitforvisualfinish playsewithpan SE_M_GUST, SOUND_PAN_TARGET - launchtemplate gFairyWindCloudTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0x14 0x1 + createsprite gFairyWindCloudTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0x14, 0x1 delay 0x5 - launchtemplate gFairyWindCloudTemplate 0x83 0x7 0x14 0xfff6 0x14 0x5 0x16 0xffee 0x1 + createsprite gFairyWindCloudTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x5, 0x16, 0xffee, 0x1 delay 0x5 - launchtemplate gFairyWindCloudTemplate 0x83 0x7 0x14 0xfff6 0x14 0xfff6 0x16 0xf 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x2 0x0 0x12 0x1 + createsprite gFairyWindCloudTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0xfff6, 0x16, 0xf, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x2, 0x0, 0x12, 0x1 delay 0x5 - launchtemplate gFairyWindCloudTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0xffec 0x1 + createsprite gFairyWindCloudTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0xffec, 0x1 delay 0x5 - launchtemplate gFairyWindCloudTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0xc 0x1 + createsprite gFairyWindCloudTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0xc, 0x1 delay 0x5 waitforvisualfinish stopsound playsewithpan SE_M_GUST2, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x6e7d + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6e7d waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -8920,18 +8920,18 @@ Move_FAIRY_LOCK:: loadspritegfx ANIM_TAG_FAIRY_LOCK_CHAINS @Fairy Lock Chain setalpha 8, 8 monbg ANIM_ATK_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x6B1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6B1F waitforvisualfinish loopsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET, 0x6, 0x4 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x7 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x33 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x2 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x7 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x33 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x2 waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x32 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x6 - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x35 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x32 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x6 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x35 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x6B1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6B1F waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -8945,15 +8945,15 @@ Move_KINGS_SHIELD:: Move_PLAY_NICE:: loadspritegfx ANIM_TAG_RED_HEART loopsewithpan SE_M_SANDSTORM, SOUND_PAN_ATTACKER, 0xc, 0x3 - launchtask AnimTask_SwayMon 0x5 0x5 0x0 0xc 0x1000 0x4 0x0 + createvisualtask AnimTask_SwayMon, 0x5, 0x0, 0xc, 0x1000, 0x4, 0x0 delay 0xF - launchtemplate gRedHeartProjectileSpriteTemplate 0x83 0x2 0x14 0xfff8 + createsprite gRedHeartProjectileSpriteTemplate, ANIM_TARGET, 3, 0x14, 0xfff8 end Move_CONFIDE:: loadspritegfx ANIM_TAG_CONFIDE @Confide Bubble - launchtask AnimTask_Splash 0x2 0x2 ANIM_ATTACKER 0x3 - launchtemplate gConfideBubbleTemplate 0xb 0x2 0x0 0x64 + createvisualtask AnimTask_Splash, 0x2, ANIM_ATTACKER, 0x3 + createsprite gConfideBubbleTemplate, ANIM_ATTACKER, 11, 0x0, 0x64 playsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER waitforvisualfinish end @@ -8963,69 +8963,69 @@ Move_DIAMOND_STORM:: loadspritegfx ANIM_TAG_ICE_CRYSTALS monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xF 0x1888 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xF, 0x1888 createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ICE_CRYSTALS, 0, 0xD, 0xD, 0x7DDE @Pink waitforvisualfinish panse SE_M_BLIZZARD, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xfff6 0x0 0xfff6 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0x0 0x0 0x0 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xfff1 0x0 0xfff1 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0xfff6 0x0 0xfff6 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff1, 0x0, 0xfff1, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xfffb 0x0 0xfffb 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0xa 0x0 0xa 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xfffb, 0x0, 0xfffb, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0xa, 0x0, 0xa, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xfff6 0x0 0xfff6 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xffec 0x0 0xffec 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0xf 0x0 0xf 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0xf, 0x0, 0xf, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xfff1 0x0 0xfff1 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff1, 0x0, 0xfff1, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x50, 0x0, 0x0, 0x1 delay 0x3 - launchtemplate gSwirlingSnowballSpriteTemplate 0x28 0x6 0x0 0xffe7 0x0 0xffe7 0x48 0x1 - launchtemplate gDiamondStormBlizzardTemplate 0x28 0x8 0x0 0x14 0x0 0x14 0x50 0x0 0x0 0x1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xffe7, 0x0, 0xffe7, 0x48, 0x1 + createsprite gDiamondStormBlizzardTemplate, ANIM_ATTACKER, 40, 0x0, 0x14, 0x0, 0x14, 0x50, 0x0, 0x0, 0x1 delay 0x3 playsewithpan SE_M_TWISTER, SOUND_PAN_TARGET - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x78 0x46 0x5 0x46 0x1e + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x78, 0x46, 0x5, 0x46, 0x1e delay 0x1 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x73 0x37 0x6 0x3c 0x19 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x73, 0x37, 0x6, 0x3c, 0x19 delay 0x1 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x73 0x3c 0x7 0x3c 0x1e - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x73 0x37 0xa 0x3c 0x1e + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x73, 0x3c, 0x7, 0x3c, 0x1e + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x73, 0x37, 0xa, 0x3c, 0x1e delay 0x3 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x64 0x32 0x4 0x32 0x1a + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x64, 0x32, 0x4, 0x32, 0x1a delay 0x1 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x69 0x19 0x8 0x3c 0x14 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x69, 0x19, 0x8, 0x3c, 0x14 delay 0x1 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x73 0x28 0xa 0x30 0x1e + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x73, 0x28, 0xa, 0x30, 0x1e delay 0x3 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x78 0x1e 0x6 0x2d 0x19 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x73 0x23 0xa 0x3c 0x1e + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x78, 0x1e, 0x6, 0x2d, 0x19 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x73, 0x23, 0xa, 0x3c, 0x1e delay 0x3 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x69 0x14 0x8 0x28 0x0 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x69, 0x14, 0x8, 0x28, 0x0 delay 0x3 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x14 0xff 0xf 0x20 0x0 - launchtemplate gDiamondStormDiamondsTemplate 0x82 0x5 0x6e 0xa 0x8 0x20 0x14 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x14, 0xff, 0xf, 0x20, 0x0 + createsprite gDiamondStormDiamondsTemplate, ANIM_TARGET, 2, 0x6e, 0xa, 0x8, 0x20, 0x14 waitforvisualfinish @this is the buffet part - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x3 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x3 0x0 0xc 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x3 0x3 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x3, 0x0, 0xc, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x3, 0x3, 0x0, 0xc, 0x1 delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x3 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x20 0x14 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x3 playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xF 0x0 0x1888 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xF, 0x0, 0x1888 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -9033,17 +9033,17 @@ Move_DIAMOND_STORM:: Move_STEAM_ERUPTION:: loadspritegfx ANIM_TAG_STEAM_ERUPTION @Steam Eruption Particle - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x7 0x043D + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x7, 0x043D delay 0x20 monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET panse SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 call SteamEruptionBreath call SteamEruptionBreath - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x0 0x9 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x0, 0x9, 0x1f call SteamEruptionBreath delay 0x2 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x2 0x0 0x15 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x2, 0x0, 0x15, 0x1 call SteamEruptionBreath call SteamEruptionBreath call SteamEruptionBreath @@ -9060,14 +9060,14 @@ Move_STEAM_ERUPTION:: call SteamEruptionBreath call SteamEruptionBreath call SteamEruptionBreath - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x9 0x0 0x1f + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x9, 0x0, 0x1f waitforvisualfinish clearmonbg ANIM_DEF_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x7 0x0 0x043D + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x7, 0x0, 0x043D waitforvisualfinish end SteamEruptionBreath: - launchtemplate gSteamEruptionBreathTemplate 0x82 0x5 0x0 0x5 0x0 0x5 0x14 + createsprite gSteamEruptionBreathTemplate, ANIM_TARGET, 2, 0x0, 0x5, 0x0, 0x5, 0x14 delay 0x1 return @@ -9076,7 +9076,7 @@ Move_HYPERSPACE_HOLE:: loadspritegfx ANIM_TAG_WHITE_SHADOW @Destiny Bond loadspritegfx ANIM_TAG_QUICK_GUARD_HAND @Black Colour loadspritegfx ANIM_TAG_POISON_BUBBLE @Poison Colour - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x7FFF waitforvisualfinish playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER invisible ANIM_ATTACKER @@ -9089,21 +9089,21 @@ Move_HYPERSPACE_HOLE:: delay 0x1 invisible ANIM_ATTACKER waitsound - launchtask AnimTask_DestinyBondWhiteShadow 0x5 0x2 0x0 0x30 + createvisualtask AnimTask_DestinyBondWhiteShadow, 0x5, 0x0, 0x30 delay 0x17 - launchtask AnimTask_IsTargetSameSide 0x2 0x0 - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 + createvisualtask AnimTask_IsTargetSameSide, 0x2 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 delay 0x19 visible ANIM_ATTACKER invisible ANIM_ATTACKER delay 0x5 - launchtemplate gHyperspaceHoleImpactTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createsprite gHyperspaceHoleImpactTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 call HyperspaceHoleMovement - launchtemplate gHyperspaceHoleImpactTemplate 0x82, 0x3, 0xa 0x14 0x0 + createsprite gHyperspaceHoleImpactTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 call HyperspaceHoleMovement - launchtemplate gHyperspaceHoleImpactTemplate 0x82, 0x3, 0xfffb 0xa 0x0 + createsprite gHyperspaceHoleImpactTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0 call HyperspaceHoleMovement - launchtemplate gHyperspaceHoleImpactTemplate 0x82, 0x3, 0x11 0xfff4 0x0 + createsprite gHyperspaceHoleImpactTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 call HyperspaceHoleMovement waitforvisualfinish visible ANIM_ATTACKER @@ -9115,12 +9115,12 @@ Move_HYPERSPACE_HOLE:: invisible ANIM_ATTACKER delay 0x1 visible ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x7FFF waitforvisualfinish end HyperspaceHoleMovement: playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x3 0x0 0xf 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x3, 0x0, 0xf, 0x1 delay 0x4 return @@ -9133,16 +9133,16 @@ Move_WATER_SHURIKEN:: monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET createsoundtask SoundTask_LoopSEAdjustPanning, 0x7, 0x87, 0xffc0, SOUND_PAN_TARGET, 0x5, 0x5, 0x0, 0x5 - launchtemplate gWaterShurikenStarTemplate 0x82, 0x3, 0x0 0x0 0x27 + createsprite gWaterShurikenStarTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x27 delay 0x8 - launchtemplate gWaterShurikenRingTemplate 0x82, 0x4, 0x0 0x0 0x28 0xf + createsprite gWaterShurikenRingTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x28, 0xf delay 0x5 - launchtemplate gWaterShurikenRingTemplate 0x82, 0x4, 0x0 0x0 0x28 0xf + createsprite gWaterShurikenRingTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x28, 0xf delay 0x5 - launchtemplate gWaterShurikenRingTemplate 0x82, 0x4, 0x0 0x0 0x28 0xf + createsprite gWaterShurikenRingTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x28, 0xf delay 0xC playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET - launchtemplate gWaterShurikenImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x2 + createsprite gWaterShurikenImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -9152,26 +9152,26 @@ Move_MYSTICAL_FIRE:: loadspritegfx ANIM_TAG_FIRE setalpha 8, 8 playse 0xb1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0xa 0x1 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x0 0x2 0x0 0x8 0x7fff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0xa, 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x0, 0x2, 0x0, 0x8, 0x7fff waitforvisualfinish waitsound blendoff - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0xffff 0x0 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0xffff, 0x0 delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0x0 0x1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0x0, 0x1 delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0xffff 0xffff + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0xffff, 0xffff delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0x2 0x1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0x2, 0x1 delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0x1 0xffff + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0x1, 0xffff delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0xffff 0x1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0xffff, 0x1 delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0x1 0xfffe + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0x1, 0xfffe delay 0x1 - launchtemplate gLargeFlameScatterSpriteTemplate 0x82 0x6 0x0 0x0 0x1e 0x1e 0x3 0x1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1e, 0x1e, 0x3, 0x1 playse 0x8c waitforvisualfinish call UnsetPsychicBg @@ -9183,31 +9183,31 @@ Move_SPIKY_SHIELD:: monbg ANIM_ATK_PARTNER splitbgprio ANIM_ATTACKER waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 - launchtemplate gProtectSpriteTemplate 0x2 0x3 0x18 0x0 0x5a + createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0x0, 0x5a delay 0xF - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x0 0xFFE0 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x0, 0xFFE0, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x16 0xFFEA 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x16, 0xFFEA, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x1E 0x0 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x1E, 0x0, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x14 0x14 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x14, 0x14, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x0 0x1C 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x0, 0x1C, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0xFFED 0x13 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFED, 0x13, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0xFFE5 0x0 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFE5, 0x0, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0xFFEE 0xFFEE 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFEE, 0xFFEE, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x0 0xFFE7 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x0, 0xFFE7, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x11 0xFFEF 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x11, 0xFFEF, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x17 0x0 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x17, 0x0, 0x10 delay 0x2 - launchtemplate gNeedleArmSpikeSpriteTemplate 0x82 0x5 0x0 0x1 0x10 0x10 0x10 + createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x10, 0x10, 0x10 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER end @@ -9215,17 +9215,17 @@ Move_SPIKY_SHIELD:: Move_AROMATIC_MIST:: loadspritegfx ANIM_TAG_PINK_PETAL playsewithpan SE_M_SWEET_SCENT, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x6E7D - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x64 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6E7D + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x64 delay 0x19 setpan 0x0 call SweetScentEffect - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x2 0x37 0x0 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x37, 0x0 setpan SOUND_PAN_TARGET - createvisualtask AnimTask_BlendColorCycle, 2, (ANIM_PAL_DEF | ANIM_PAL_DEF_PARTNER), 1, 5, 5, 13, 0x56bf + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_DEF_SIDE, 1, 5, 5, 13, 0x56bf call SweetScentEffect waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x6E7D + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6E7D waitforvisualfinish end @@ -9239,37 +9239,37 @@ Move_EERIE_IMPULSE:: monbg ANIM_DEF_PARTNER waitplaysewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET 0x13 delay 0x4 - launchtemplate gEerieImpulseRingTemplate 0x0 0x7 0x2d 0x0 0x0 0x0 0x0 0x0 0x1 + createsprite gEerieImpulseRingTemplate, ANIM_ATTACKER, 0, 0x2d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1 delay 0xB - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 16, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 16, 30, 0, 40, 1 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 16, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 16, 30, 0, 40, 2 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 32, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 32, 30, 0, 40, 1 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 32, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 32, 30, 0, 40, 2 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 48, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 48, 30, 0, 40, 1 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 48, 30, 0, 40, 0 - launchtemplate gZapCannonSparkSpriteTemplate, ANIM_TARGET, 7, 10, 0, 48, 30, 0, 40, 2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 32, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 32, 30, 0, 40, 1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 32, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 32, 30, 0, 40, 2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 48, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 48, 30, 0, 40, 1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 48, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 48, 30, 0, 40, 2 waitforvisualfinish playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gEerieImpulseImpactTemplate 0x2 0x6 0x0 0xfffb 0x1 0x0 0x20 0x10 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1 + createsprite gEerieImpulseImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0x1, 0x0, 0x20, 0x10 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x5, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x5, 0x1 delay 0x7 - launchtemplate gEerieImpulseImpactTemplate 0x2 0x6 0xfff1 0xa 0x1 0x0 0x20 0x10 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0 + createsprite gEerieImpulseImpactTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xa, 0x1, 0x0, 0x20, 0x10 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xf, 0x14, 0x5, 0x2 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xfff6, 0x5, 0x0 delay 0x7 - launchtemplate gEerieImpulseImpactTemplate 0x2 0x6 0xfff1 0xfff1 0x1 0x0 0x20 0x10 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2 + createsprite gEerieImpulseImpactTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xfff1, 0x1, 0x0, 0x20, 0x10 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x19, 0x0, 0x5, 0x1 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x5, 0x2 delay 0x7 - launchtemplate gEerieImpulseImpactTemplate 0x2 0x6 0xa 0xfffb 0x1 0x0 0x20 0x10 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0 - launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1 + createsprite gEerieImpulseImpactTemplate, ANIM_ATTACKER, 2, 0xa, 0xfffb, 0x1, 0x0, 0x20, 0x10 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0x2, 0xfff8, 0x5, 0x0 + createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xf, 0x5, 0x1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -9277,16 +9277,16 @@ Move_EERIE_IMPULSE:: Move_VENOM_DRENCH:: loadspritegfx ANIM_TAG_POISON_BUBBLE monbg ANIM_DEF_PARTNER - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfffb 0x1 0xfffb 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xfffb, 0x1, 0xfffb, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x5 0x0 0x6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x13 0x1 0xa 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0x13, 0x1, 0xa, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe9 0x2 0xfff6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xffe9, 0x2, 0xfff6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 call AcidDrench @@ -9295,28 +9295,28 @@ Move_VENOM_DRENCH:: clearmonbg ANIM_DEF_PARTNER end AcidDrench: - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1c 0x1 0xa 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0x1c, 0x1, 0xa, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfff6 0x1 0xfffb 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xfff6, 0x1, 0xfffb, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xa 0x0 0x6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x18 0x1 0xa 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0x18, 0x1, 0xa, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe0 0x2 0xfff6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xffe0, 0x2, 0xfff6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1e 0x2 0xa 1 + createsprite gVenomDrenchAcidTemplate, ANIM_TARGET, 2, 0x1e, 0x2, 0xa, 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 return @@ -9334,11 +9334,11 @@ Move_POWDER:: clearmonbg ANIM_DEF_PARTNER end POWDER_SPORE: - launchtemplate gPowderBlackSporeTemplate 0x2 0x5 0x0 0xffec 0x55 0x50 0x0 + createsprite gPowderBlackSporeTemplate, ANIM_ATTACKER, 2, 0x0, 0xffec, 0x55, 0x50, 0x0 delay 0xc - launchtemplate gPowderBlackSporeTemplate 0x2 0x5 0x0 0xfff6 0xaa 0x50 0x0 + createsprite gPowderBlackSporeTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0xaa, 0x50, 0x0 delay 0xc - launchtemplate gPowderBlackSporeTemplate 0x2 0x5 0x0 0xfff1 0x0 0x50 0x0 + createsprite gPowderBlackSporeTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff1, 0x0, 0x50, 0x0 delay 0xc return @@ -9354,121 +9354,121 @@ Move_GEOMANCY:: choosetwoturnanim GeomancyChargeUp GeomancyUnleash GeomancyChargeUp: loadspritegfx ANIM_TAG_FOCUS_ENERGY @endure buff effect - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_COSMIC_POWER, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x5f 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x5 0x1F + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x5f, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x5, 0x1F call GeomancyRingBuff - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x5 0x2C0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x5, 0x2C0 call GeomancyRingBuff - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x5 0x7C60 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x5, 0x7C60 call GeomancyRingBuff waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x5 0x0 0x7C60 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x5, 0x0, 0x7C60 waitforvisualfinish blendoff clearmonbg ANIM_ATK_PARTNER end GeomancyRingBuff: - launchtemplate gGeomancyRedCellVortexTemplate 0x2 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 0x0 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRedCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, 0x0 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyGreenCellVortexTemplate 0x2 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 0x0 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyGreenCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyBlueCellVortexTemplate 0x2 0x7 0x0 0x21 0x240 0x14 0x8 0x2a 0x0 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gGeomancyBlueCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, 0x0 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x2 - launchtemplate gGeomancyRedCellVortexTemplate 0x2 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 0x0 + createsprite gGeomancyRedCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, 0x0 delay 0x2 - launchtemplate gGeomancyGreenCellVortexTemplate 0x2 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e 0x0 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyGreenCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, 0x0 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyBlueCellVortexTemplate 0x2 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce 0x0 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyBlueCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRedCellVortexTemplate 0x2 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 0x0 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gGeomancyRedCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, 0x0 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x2 - launchtemplate gGeomancyGreenCellVortexTemplate 0x2 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 0x0 + createsprite gGeomancyGreenCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, 0x0 delay 0x2 - launchtemplate gGeomancyBlueCellVortexTemplate 0x2 0x7 0x0 0x21 0x240 0x14 0x8 0x2a 0x0 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyBlueCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, 0x0 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRedCellVortexTemplate 0x2 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 0x0 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRedCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyGreenCellVortexTemplate 0x2 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e 0x0 + createsprite gGeomancyGreenCellVortexTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, 0x0 delay 0x2 return GeomancyUnleash: loadspritegfx ANIM_TAG_FIRE_PLUME @dragon rage - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x24CF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x24CF playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 delay 0x1 - launchtemplate gGeomancyRingTemplate 0x2 0x0 + createsprite gGeomancyRingTemplate, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x10 0x4D01 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x25 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0x5 0x1F - launchtemplate gGeomancyRedCellRaiseTemplate 0x2 0x5 0x14 0x20 0xffd0 0x32 0x1 - launchtemplate gGeomancyGreenCellRaiseTemplate 0x2 0x5 0x0 0x20 0xffda 0x19 0x1 - launchtemplate gGeomancyBlueCellRaiseTemplate 0x2 0x5 0x20 0x20 0xffe4 0x28 0x1 - launchtemplate gGeomancyRedCellRaiseTemplate 0x2 0x5 0xffec 0x20 0xffd0 0x32 0x1 - launchtemplate gGeomancyGreenCellRaiseTemplate 0x2 0x5 0x14 0x20 0xffe4 0x3c 0x1 - launchtemplate gGeomancyBlueCellRaiseTemplate 0x2 0x5 0x0 0x20 0xffe4 0x1e 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x10, 0x4D01 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x25, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0x5, 0x1F + createsprite gGeomancyRedCellRaiseTemplate, ANIM_ATTACKER, 2, 0x14, 0x20, 0xffd0, 0x32, 0x1 + createsprite gGeomancyGreenCellRaiseTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0xffda, 0x19, 0x1 + createsprite gGeomancyBlueCellRaiseTemplate, ANIM_ATTACKER, 2, 0x20, 0x20, 0xffe4, 0x28, 0x1 + createsprite gGeomancyRedCellRaiseTemplate, ANIM_ATTACKER, 2, 0xffec, 0x20, 0xffd0, 0x32, 0x1 + createsprite gGeomancyGreenCellRaiseTemplate, ANIM_ATTACKER, 2, 0x14, 0x20, 0xffe4, 0x3c, 0x1 + createsprite gGeomancyBlueCellRaiseTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0xffe4, 0x1e, 0x1 call GeomancyRageBuff call GeomancyRageBuff waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x4D01 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x5 0x0 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x4D01 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x5, 0x0, 0x1F waitforvisualfinish blendoff clearmonbg ANIM_ATK_PARTNER end GeomancyRageBuff: - launchtemplate gGeomancyYellowRageTemplate 0xc2 0x3 0x0 0x5 0x0 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 66, 0x0, 0x5, 0x0 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0xc2 0x3 0x0 0xfff6 0xfff1 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 66, 0x0, 0xfff6, 0xfff1 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0x82, 0x3, 0x0 0x0 0x19 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x19 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0xc2 0x3 0x0 0xf 0x5 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 66, 0x0, 0xf, 0x5 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0xc2 0x3 0x0 0xffe7 0x0 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 66, 0x0, 0xffe7, 0x0 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0x82, 0x3, 0x0 0x1e 0x1e + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 2, 0x0, 0x1e, 0x1e delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0x82, 0x3, 0x0 0xffe5 0x19 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 2, 0x0, 0xffe5, 0x19 delay 0x1 - launchtemplate gGeomancyYellowRageTemplate 0xc2 0x3 0x0 0x0 0x8 + createsprite gGeomancyYellowRageTemplate, ANIM_TARGET, 66, 0x0, 0x0, 0x8 delay 0x1 return @@ -9476,47 +9476,45 @@ Move_MAGNETIC_FLUX:: loadspritegfx ANIM_TAG_THIN_RING @uproar loadspritegfx ANIM_TAG_SPARK_2 @ElectricityEffect loadspritegfx ANIM_TAG_SMALL_EMBER @yellow color - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_DEF | ANIM_PAL_ATK), 2, 0, 9, 0x243B - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_DEF | ANIM_PAL_ATK_PARTNER), 2, 0, 9, 0x243B + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_TARGET | F_PAL_ATK_SIDE), 2, 0, 9, 0x243B loopsewithpan SE_M_TRI_ATTACK, SOUND_PAN_ATTACKER, 0x12, 0x3 - launchtask AnimTask_DefenseCurlDeformMon 0x5 0x0 + createvisualtask AnimTask_DefenseCurlDeformMon, 0x5 call MagneticFluxSparks1 delay 0xA call MagneticFluxSparks2 delay 0xA call MagneticFluxSparks1 delay 0xA - launchtemplate gMagneticFluxUproarTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 + createsprite gMagneticFluxUproarTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 call MagneticFluxSparks2 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_DEF | ANIM_PAL_ATK), 2, 9, 0, 0x243B - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_DEF | ANIM_PAL_ATK_PARTNER), 2, 9, 0, 0x243B + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_TARGET | F_PAL_ATK_SIDE), 2, 9, 0, 0x243B waitforvisualfinish end MagneticFluxSparks1: - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 return MagneticFluxSparks2: - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 return Move_HAPPY_HOUR:: loadspritegfx ANIM_TAG_COIN monbg ANIM_ATTACKER loopsewithpan SE_M_PAY_DAY, SOUND_PAN_TARGET, 0x8, 10 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xfffb 0x0 0xfffb 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0x5 0x0 0x6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0x13 0x0 0xa 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xffe9 0x0 0xfff6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x1 delay 0x2 call CoinShower call CoinShower @@ -9524,21 +9522,21 @@ Move_HAPPY_HOUR:: clearmonbg ANIM_ATTACKER end CoinShower: - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0x1c 0x0 0xa 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1c, 0x0, 0xa, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xfff6 0x0 0xfffb 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfff6, 0x0, 0xfffb, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xa 0x0 0x6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0x18 0x0 0xa 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x18, 0x0, 0xa, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xffe0 0x0 0xfff6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe0, 0x0, 0xfff6, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x1 delay 0x2 - launchtemplate gHappyHourCoinShowerTemplate 0x82, 0x4, 0x1e 0x0 0xa 0x1 + createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1e, 0x0, 0xa, 0x1 delay 0x2 return @@ -9558,7 +9556,7 @@ Move_ELECTRIC_TERRAIN:: createsprite gElectricTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 126 createsprite gElectricTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 168 createsprite gElectricTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 210 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 0, 4, RGB(28, 28, 0) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 4, RGB(28, 28, 0) delay 52 setarg 7, 0xFFFF playsewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER @@ -9574,24 +9572,24 @@ Move_ELECTRIC_TERRAIN:: loopsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET, 0x16, 0x3 waitforvisualfinish delay 2 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(28, 28, 0) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 4, 0, RGB(28, 28, 0) waitforvisualfinish end Move_DAZZLING_GLEAM:: loadspritegfx ANIM_TAG_SPARKLE_2 loadspritegfx ANIM_TAG_BLUE_STAR - launchtemplate gSimplePaletteBlendSpriteTemplate 0x2 0x5 0x1 0x2 0x0 0xd 0x7fff + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2, 0x0, 0xd, 0x7fff playsewithpan SE_M_TWISTER, SOUND_PAN_ATTACKER @call 0x081D56B3 -> middle of GrantingStarsEffect createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 12, -5, 0, 0, 32, 60 delay 8 waitforvisualfinish - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x0 0x3 0x0 0x10 0x7fff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x0, 0x3, 0x0, 0x10, 0x7fff delay 0x4 playsewithpan SE_M_GIGA_DRAIN, SOUND_PAN_ATTACKER waitforvisualfinish - launchtemplate gSimplePaletteBlendSpriteTemplate 0x2 0x5 0x1 0x0 0xd 0x0 0x7fff + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0xd, 0x0, 0x7fff waitforvisualfinish clearmonbg 0x0 blendoff @@ -9599,7 +9597,7 @@ Move_DAZZLING_GLEAM:: Move_CELEBRATE:: loadspritegfx ANIM_TAG_ITEM_BAG - launchtemplate gCelebrateBagTemplate 0x2 0x1 0x0 + createsprite gCelebrateBagTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER delay 0x12 playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER @@ -9612,40 +9610,40 @@ Move_HOLD_HANDS:: loadspritegfx ANIM_TAG_MAGENTA_HEART @charm loadspritegfx ANIM_TAG_VERTICAL_HEX @red playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0xc 0x6 0x6 0x3 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0xc, 0x6, 0x6, 0x3 + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c delay 0x8 - launchtemplate gHoldHandsHeartTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createsprite gHoldHandsHeartTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c waitforvisualfinish - launchtask AnimTask_HelpingHandAttackerMovement 0x5 0x0 - launchtemplate gHelpingHandClapSpriteTemplate 0x28 0x1 0x0 - launchtemplate gHelpingHandClapSpriteTemplate 0x28 0x1 0x1 + createvisualtask AnimTask_HelpingHandAttackerMovement, 0x5 + createsprite gHelpingHandClapSpriteTemplate, ANIM_ATTACKER, 40, 0x0 + createsprite gHelpingHandClapSpriteTemplate, ANIM_ATTACKER, 40, 0x1 delay 0x13 playsewithpan SE_M_ENCORE, 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x2 0x2 0x0 0x5 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x2, 0x2, 0x0, 0x5, 0x1 delay 0xe playsewithpan SE_M_ENCORE, 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x2 0x2 0x0 0x5 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x2, 0x2, 0x0, 0x5, 0x1 delay 0x14 playsewithpan SE_M_ENCORE, 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x2 0x3 0x0 0xa 0x1 - launchtask AnimTask_BlendMonInAndOut 0x2 0x5 0x2 0x3ff 0xc 0x1 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x2, 0x3, 0x0, 0xa, 0x1 + createvisualtask AnimTask_BlendMonInAndOut, 0x2, 0x2, 0x3ff, 0xc, 0x1, 0x1 end Move_BABY_DOLL_EYES:: @@ -9654,17 +9652,17 @@ Move_BABY_DOLL_EYES:: loadspritegfx ANIM_TAG_OPENING_EYE @eye setalpha 8, 8 monbg ANIM_DEF_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0xA 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0xA, 0x7FFF waitforvisualfinish - launchtemplate gOpeningEyeSpriteTemplate 0x5 0x4 0x0 0x0 0x1 0x0 + createsprite gOpeningEyeSpriteTemplate, ANIM_ATTACKER, 5, 0x0, 0x0, 0x1, 0x0 delay 0x20 playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffb 0xfffb 0xa 0x0 0x1 + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffb, 0xfffb, 0xa, 0x0, 0x1 waitforvisualfinish delay 0xa - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x1 0x0 0x9 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x3 0x1 0x0 0x9 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0xA 0x0 0x7FFF + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x1, 0x0, 0x9, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x3, 0x1, 0x0, 0x9, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0xA, 0x0, 0x7FFF waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -9675,18 +9673,18 @@ Move_NUZZLE:: loadspritegfx ANIM_TAG_ITEM_BAG loadspritegfx ANIM_TAG_SPARK_2 loadspritegfx ANIM_TAG_IMPACT - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gMagentaHeartSpriteTemplate 0x3 0x2 0x0 0x14 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x14 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER delay 0xf - launchtemplate gMagentaHeartSpriteTemplate 0x3 0x2 0xffec 0x14 + createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0xffec, 0x14 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER delay 0xf - launchtemplate gMagentaHeartSpriteTemplate 0x3 0x2 0x14 0x14 + createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0x14, 0x14 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 call ElectricityEffectNoSound waitforvisualfinish end @@ -9701,17 +9699,17 @@ Move_HOLD_BACK:: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - launchtemplate gHoldBackSwipeTemplate 0x82, 0x3, 0x0 0x0 0x1 + createsprite gHoldBackSwipeTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1 waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x3 0x0 0xa 0x1 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x2 - launchtemplate gHoldBackRingTemplate 0x3 0x4 0x0 0x0 0x100 0x0 - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0xa0 0xffe0 - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0xff00 0xffd8 - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0x80 0xfff0 - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0x1a0 0xffda - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0xff80 0xffea - launchtemplate gHoldBackStarsTemplate 0x83 0x4 0xfff0 0xfff8 0xfe80 0xffe1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x3, 0x0, 0xa, 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 + createsprite gHoldBackRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xa0, 0xffe0 + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff00, 0xffd8 + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x80, 0xfff0 + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x1a0, 0xffda + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff80, 0xffea + createsprite gHoldBackStarsTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xfe80, 0xffe1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -9723,8 +9721,8 @@ Move_INFESTATION:: loadspritegfx ANIM_TAG_SMALL_BUBBLES @circle particles monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_DEF, 0x2, 0x0, 0x9, 0x7320 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x4f 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x7320 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x4f, 0x1 loopsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER, 0x0, 0x4F call InfestationVortex call InfestationVortex @@ -9732,22 +9730,22 @@ Move_INFESTATION:: call InfestationVortex call InfestationVortex waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7320 + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x7320 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end InfestationVortex: - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, 0x1 delay 0x1 - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, 0x1 delay 0x1 - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, 0x1 delay 0x1 - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, 0x1 delay 0x1 - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, 0x1 delay 0x1 - launchtemplate gInfestationBubbleTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce 0x1 + createsprite gInfestationBubbleTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, 0x1 delay 0x1 return @@ -9757,7 +9755,7 @@ Move_POWER_UP_PUNCH: loadspritegfx ANIM_TAG_BREATH monbg ANIM_TARGET setalpha 12, 8 - createvisualtask AnimTask_GrowAndShrink, 2, + createvisualtask AnimTask_GrowAndShrink, 2 playsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET @@ -9775,15 +9773,15 @@ Move_OBLIVION_WING:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_HYDRO_PUMP, 0x0, 0xC, 0xC, 0x289F @Pinkish Red createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ROUND_SHADOW, 0x0, 0xD, 0xD, 0x289F @Pinkish Red playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xE 0x0 @Black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xE, 0x0 @Black waitforvisualfinish createsoundtask SoundTask_LoopSEAdjustPanning, 0x7, 0xf0, 0xffc0, SOUND_PAN_TARGET, 0x1, 0xf, 0x0, 0x5 call OblivionWingBeam call OblivionWingBeam - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 40 0x1 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x4 0x0 0xc 0x289F @Pinkish Red + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 40, 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x4, 0x0, 0xc, 0x289F @Pinkish Red call OblivionWingBeam call OblivionWingBeam call OblivionWingBeam @@ -9798,13 +9796,13 @@ Move_OBLIVION_WING:: visible ANIM_ATTACKER call HealingEffect waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xE 0x0 0x0 @From black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xE, 0x0, 0x0 @From black waitforvisualfinish end OblivionWingBeam: - launchtemplate gOblivionWingBeamTemplate 0x82, 0x6, 0, -90, 0, 20, 0x15 0x0 + createsprite gOblivionWingBeamTemplate, ANIM_TARGET, 2, 0, -90, 0, 20, 0x15, 0x0 delay 0x2 - launchtemplate gOblivionWingBeamTemplate 0x82, 0x6, 0, -90, 0, 20, 0x15 0x0 + createsprite gOblivionWingBeamTemplate, ANIM_TARGET, 2, 0, -90, 0, 20, 0x15, 0x0 delay 0x2 return @@ -9817,10 +9815,10 @@ Move_THOUSAND_ARROWS:: loadspritegfx ANIM_TAG_VERTICAL_HEX @arrow loadspritegfx ANIM_TAG_NEEDLE @sting monbg ANIM_ATTACKER - setblends 0x80e - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish - launchtemplate gThousandArrowsGreenChargeTemplate 0x2 0x1 0x0 + createsprite gThousandArrowsGreenChargeTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0x18 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER @@ -9832,67 +9830,67 @@ Move_THOUSAND_ARROWS:: call ThousandArrowsHexes call ThousandArrowsHexes call ThousandArrowsHexes - launchtemplate gThousandArrowsGreenDischargeTemplate 0x2 0x3 0x0 0x10 0x10 + createsprite gThousandArrowsGreenDischargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x10 delay 0x2 - launchtemplate gThousandArrowsGreenDischargeTemplate 0x2 0x3 0x0 0xfff0 0xfff0 + createsprite gThousandArrowsGreenDischargeTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0, 0xfff0 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x30 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0xa 0x32 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0xa 0x32 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0xa, 0x32 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0xa, 0x32 call ThousandArrowsDown call ThousandArrowsDown call ThousandArrowsDown call ThousandArrowsDown waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0xffff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0xffff waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff end ThousandArrowsHexes: - launchtemplate gThousandArrowsGreenHexTemplate 0x82, 0x3, 0x0 0xfffc 0xfff0 + createsprite gThousandArrowsGreenHexTemplate, ANIM_TARGET, 2, 0x0, 0xfffc, 0xfff0 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenHexTemplate 0x82, 0x3, 0x0 0x100D 0xfff0 + createsprite gThousandArrowsGreenHexTemplate, ANIM_TARGET, 2, 0x0, 0x100D, 0xfff0 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenHexTemplate 0x82, 0x3, 0x0 0x4 0xfff4 + createsprite gThousandArrowsGreenHexTemplate, ANIM_TARGET, 2, 0x0, 0x4, 0xfff4 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenHexTemplate 0x82, 0x3, 0x0 0xfff0 0xfff0 + createsprite gThousandArrowsGreenHexTemplate, ANIM_TARGET, 2, 0x0, 0xfff0, 0xfff0 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 return ThousandArrowsDown: - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0xdc 0x3c + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0xdc, 0x3c playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x3c 0x64 + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x3c, 0x64 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x8c 0x37 + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x8c, 0x37 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0xb4 0x32 + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0xb4, 0x32 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x14 0x5a + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x14, 0x5a playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x5a 0x5a + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x5a, 0x5a playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0xa0 0x3c + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0xa0, 0x3c playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x1e 0x5a + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x1e, 0x5a playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0x78 0x3c + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0x78, 0x3c playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gThousandArrowsGreenArrowTemplate 0x82, 0x3, 0x1 0xc8 0x28 + createsprite gThousandArrowsGreenArrowTemplate, ANIM_TARGET, 2, 0x1, 0xc8, 0x28 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER return @@ -9903,133 +9901,133 @@ Move_THOUSAND_WAVES:: loadspritegfx ANIM_TAG_IMPACT @pound hits monbg ANIM_ATK_PARTNER setalpha 8, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0x0 - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0x2b - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0x55 - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0x80 - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0xaa - launchtemplate gThousandWavesGreenWheelTemplate 0x2 0x1 0xd5 + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0x2b + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0x55 + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0x80 + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0xaa + createsprite gThousandWavesGreenWheelTemplate, ANIM_ATTACKER, 2, 0xd5 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @I placed this one here, because it ruins the teleport animation loopsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET, 0x3, 0x15 call ThousandWavesRecover - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0xfff6 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0xfff6, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffdd 0x8 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffdd, 0x8, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffdd 0xfff6 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffdd, 0xfff6, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0x8 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0x8, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xf 0xffd8 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xf, 0xffd8, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xfff6 0xffe0 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xffe0, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x5 0x27 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x5, 0x27, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x19 0xffec 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x19, 0xffec, 0xd delay 0x3 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffd8 0xffec 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0xd delay 0x3 - launchtask AnimTask_AttackerStretchAndDisappear 0x2 0x0 + createvisualtask AnimTask_AttackerStretchAndDisappear, 0x2 playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x5 0xffd8 0xd + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x5, 0xffd8, 0xd waitforvisualfinish panse SE_M_HYPER_BEAM2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 delay 0x4 - launchtask AnimTask_MoveHeatWaveTargets 0x5 0x0 + createvisualtask AnimTask_MoveHeatWaveTargets, 0x5 delay 0xc monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0xa 0x900 0x60 0x1 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0xa, 0x900, 0x60, 0x1 delay 0x2 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x5a 0x800 0x60 0x1 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x5a, 0x800, 0x60, 0x1 delay 0x2 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x32 0xa00 0x60 0x1 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x32, 0xa00, 0x60, 0x1 delay 0x2 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x14 0x900 0x60 0x1 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x14, 0x900, 0x60, 0x1 delay 0x2 call ThousandWavesRotatingImpact call ThousandWavesRotatingImpact waitforvisualfinish - launchtask AnimTask_ExtremeSpeedMonReappear 0x2 0x0 + createvisualtask AnimTask_ExtremeSpeedMonReappear, 0x2 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0xffff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0xffff waitforvisualfinish blendoff clearmonbg ANIM_DEF_PARTNER end ThousandWavesRecover: - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0x28 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0x28, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffd8 0xffd8 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffd8, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x0 0x28 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x0, 0x28, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x0 0xffd8 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd8, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0xffec 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0xffec, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0x14 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0x14, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffd8 0xffec 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffec, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffd8 0x14 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffec 0x1e 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffec, 0x1e, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x14 0xffe2 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x14, 0xffe2, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffec 0xffe2 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffec, 0xffe2, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x14 0x1e 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x14, 0x1e, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0xffd8 0x0 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x0, 0x10 delay 0x2 - launchtemplate gThousandWavesGreenRecoverTemplate 0x2 0x3 0x28 0x0 0x10 + createsprite gThousandWavesGreenRecoverTemplate, ANIM_ATTACKER, 2, 0x28, 0x0, 0x10 delay 0x2 return ThousandWavesRotatingImpact: - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x1c 0x180 0x32 0x8 0x32 0x1 @1 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x46 0x7c0 0x60 0x1 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x1c, 0x180, 0x32, 0x8, 0x32, 0x1 @1 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x46, 0x7c0, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0x0 0x0 0x3 - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x20 0xf0 0x28 0xb 0xffd2 0x1 @2 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x0 0xb00 0x60 0x1 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x3 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x20, 0xf0, 0x28, 0xb, 0xffd2, 0x1 @2 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x0, 0xb00, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0x5 0xfff4 0x3 - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x21 0x1a0 0x28 0x4 0x2a 0x1 @3 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x3c 0xa00 0x60 0x1 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0x5, 0xfff4, 0x3 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x21, 0x1a0, 0x28, 0x4, 0x2a, 0x1 @3 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x3c, 0xa00, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0xfffa 0x9 0x3 - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x1f 0x120 0x2d 0x6 0xffd6 0x1 @4 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0xa 0x900 0x60 0x1 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0xfffa, 0x9, 0x3 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, 0x1 @4 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0xa, 0x900, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0xfffa 0xfff4 0x3 - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x1c 0x1c0 0x2d 0xb 0x2e 0x1 @5 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x5a 0x800 0x60 0x1 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0xfffa, 0xfff4, 0x3 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, 0x1 @5 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x5a, 0x800, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0x5 0x9 0x3 - launchtemplate gThousandWavesRotatingImpactTemplate 0x82 0x7 0x23 0x21 0x1d0 0x32 0xa 0xffce 0x1 @6 - launchtemplate gThousandWavesGreenWaveTemplate 0x28 0x4 0x32 0xa00 0x60 0x1 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0x5, 0x9, 0x3 + createsprite gThousandWavesRotatingImpactTemplate, ANIM_TARGET, 2, 0x23, 0x21, 0x1d0, 0x32, 0xa, 0xffce, 0x1 @6 + createsprite gThousandWavesGreenWaveTemplate, ANIM_ATTACKER, 40, 0x32, 0xa00, 0x60, 0x1 delay 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gThousandWavesPoundImpactTemplate 0x82, 0x4, 0x1 0xfffa 0x0 0x3 + createsprite gThousandWavesPoundImpactTemplate, ANIM_TARGET, 2, 0x1, 0xfffa, 0x0, 0x3 return Move_LANDS_WRATH:: loadspritegfx ANIM_TAG_WATER_ORB @whirl motion loadspritegfx ANIM_TAG_SPARK_2 @yellow color monbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xE 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xE, 0x0 waitforvisualfinish call LandsWrathVortex call LandsWrathVortex @@ -10039,51 +10037,51 @@ Move_LANDS_WRATH:: fadetobg BG_FISSURE waitbgfadeout playsewithpan SE_M_EARTHQUAKE, 0x0 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0xa 0x32 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0xa 0x32 - launchtask AnimTask_PositionFissureBgOnBattler 0x5 0x3 0x1 0x5 0xffff + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0xa, 0x32 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0xa, 0x32 + createvisualtask AnimTask_PositionFissureBgOnBattler, 0x5, 0x1, 0x5, 0xffff waitbgfadein waitforvisualfinish call UnsetPsychicBg - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0x0 clearmonbg ANIM_ATTACKER end LandsWrathVortex: playsewithpan SE_M_SACRED_FIRE2 SOUND_PAN_TARGET - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, 0x0 delay 0x2 - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, 0x0 delay 0x2 - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, 0x0 delay 0x2 - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, 0x0 delay 0x2 - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, 0x0 delay 0x2 - launchtemplate gLandsWrathVortexTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce 0x0 + createsprite gLandsWrathVortexTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, 0x0 delay 0x2 return Move_LIGHT_OF_RUIN:: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge - loadspritegfx ANIM_TAG_ELECTRIC_ORBS @launchtask particles + loadspritegfx ANIM_TAG_ELECTRIC_ORBS @createvisualtask particles loadspritegfx ANIM_TAG_ORBS @beam particles loadspritegfx ANIM_TAG_ELECTRICITY @discharge loadspritegfx ANIM_TAG_PINK_PETAL @pink color loadspritegfx ANIM_TAG_EXPLOSION @explosion createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ELECTRIC_ORBS, 0, 0xC, 0xC, 0x6DDE @Pink waitforvisualfinish - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x14 0x0 0x2 + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x14, 0x0, 0x2 panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xF 0x6B1F - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 0x32 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xF, 0x6B1F + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x0, 0x4, 0x32, 0x1 createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB_RED, 16, 0, 0 call LightOfRuinBeam call LightOfRuinBeam call LightOfRuinBeam call LightOfRuinBeam call LightOfRuinBeam - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x32 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x32, 0x1 call LightOfRuinBeam call LightOfRuinBeam call LightOfRuinBeam @@ -10107,21 +10105,21 @@ Move_LIGHT_OF_RUIN:: call LightOfRuinBeam delay 0x20 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gLightOfRuinPinkDischargeTemplate 0x2 0x3 0x1 0x10 0x10 + createsprite gLightOfRuinPinkDischargeTemplate, ANIM_ATTACKER, 2, 0x1, 0x10, 0x10 delay 0x2 - launchtemplate gLightOfRuinPinkDischargeTemplate 0x2 0x3 0x1 0xfff0 0xfff0 + createsprite gLightOfRuinPinkDischargeTemplate, ANIM_ATTACKER, 2, 0x1, 0xfff0, 0xfff0 delay 0x5 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x5 0xb 0x1 - launchtemplate gLightOfRuinPinkExplosionTemplate 0x3 0x4 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x5, 0xb, 0x1 + createsprite gLightOfRuinPinkExplosionTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x1 delay 0x10 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x7FFF waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL_BATTLERS 0x1 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x1, 0x0, 0x0, 0x0 waitforvisualfinish end LightOfRuinBeam: - launchtemplate gLightOfRuinPinkOrbsTemplate 0x82 0x0 - launchtemplate gLightOfRuinPinkOrbsTemplate 0x82 0x0 + createsprite gLightOfRuinPinkOrbsTemplate, ANIM_TARGET, 2 + createsprite gLightOfRuinPinkOrbsTemplate, ANIM_TARGET, 2 delay 0x1 return @@ -10134,63 +10132,63 @@ Move_ORIGIN_PULSE:: setalpha 8, 8 fadetobg BG_WATER waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x400 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x400, 0x0, 0x1, 0xffff waitbgfadein - launchtemplate gOriginPulseRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gOriginPulseRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER delay 0x10 - launchtemplate gOriginPulseRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gOriginPulseRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0x10 - launchtemplate gOriginPulseRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gOriginPulseRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 playsewithpan SE_INTRO_BLAST, SOUND_PAN_ATTACKER waitforvisualfinish - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0x0 - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0x2b - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0x55 - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0x80 - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0xaa - launchtemplate gOriginPulseOrbTemplate 0x2 0x1 0xd5 + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0x2b + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0x55 + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0x80 + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0xaa + createsprite gOriginPulseOrbTemplate, ANIM_ATTACKER, 2, 0xd5 delay 0x35 - launchtemplate gOriginPulseRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gOriginPulseRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 delay 0x10 - launchtemplate gOriginPulseRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 + createsprite gOriginPulseRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 waitforvisualfinish delay 0x2F - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x0 0xFF90 0x10 @up - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x5F 0xFF9D 0x10 @upper right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x73 0x0 0x10 @right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x4F 0x37 0x10 @lower right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x0 0x53 0x10 @down - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFFB0 0x43 0x10 @lower left - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFF60 0x0 0x10 @left - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFFAA 0xFF94 0x10 @upper left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xFF90, 0x10 @up + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x5F, 0xFF9D, 0x10 @upper right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x73, 0x0, 0x10 @right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x4F, 0x37, 0x10 @lower right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x53, 0x10 @down + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFB0, 0x43, 0x10 @lower left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFF60, 0x0, 0x10 @left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFAA, 0xFF94, 0x10 @upper left delay 0x5 - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x2D 0xFF9D 0x10 @between up and upper right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xDF 0xFF9D 0x10 @between right and upper right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x9F 0x37 0x10 @between right and lower right - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0x1F 0x37 0x10 @between lower right and down - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFFE0 0x43 0x10 @between lower left and down - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFF60 0x43 0x10 @between left and lower left - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFF2A 0xFFAA 0x10 @between left and upper left - launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFFDA 0xFF94 0x10 @between up and upper left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x2D, 0xFF9D, 0x10 @between up and upper right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xDF, 0xFF9D, 0x10 @between right and upper right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x9F, 0x37, 0x10 @between right and lower right + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1F, 0x37, 0x10 @between lower right and down + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFE0, 0x43, 0x10 @between lower left and down + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFF60, 0x43, 0x10 @between left and lower left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFF2A, 0xFFAA, 0x10 @between left and upper left + createsprite gOriginPulseOrbInwardTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFDA, 0xFF94, 0x10 @between up and upper left waitforvisualfinish createvisualtaskontargets AnimTask_ShakeMon2, 5, 0, ANIM_TARGET, 2, 0, 18, 1 monbg ANIM_DEF_PARTNER - launchtemplate gOriginPulseBasicSplatTemplate 0x83 0x4 0xffb0 0xfff0 0x1 0x1 + createsprite gOriginPulseBasicSplatTemplate, ANIM_TARGET, 3, 0xffb0, 0xfff0, 0x1, 0x1 stopsound playsewithpan SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER delay 0x5 - launchtemplate gOriginPulseBlueImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gOriginPulseBlueImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 delay 0x5 - launchtemplate gOriginPulseBasicSplatTemplate 0x83 0x4 0x0 0x0 0x1 0x1 + createsprite gOriginPulseBasicSplatTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gOriginPulseBlueImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gOriginPulseBlueImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 delay 0x5 - launchtemplate gOriginPulseBasicSplatTemplate 0x83 0x4 0xffc0 0x14 0x1 0x1 + createsprite gOriginPulseBasicSplatTemplate, ANIM_TARGET, 3, 0xffc0, 0x14, 0x1, 0x1 delay 0x5 - launchtemplate gOriginPulseBlueImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gOriginPulseBlueImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 delay 0x5 - launchtemplate gOriginPulseBasicSplatTemplate 0x83 0x4 0xffe0 0x5 0x1 0x1 + createsprite gOriginPulseBasicSplatTemplate, ANIM_TARGET, 3, 0xffe0, 0x5, 0x1, 0x1 waitsound call UnsetPsychicBg clearmonbg ANIM_DEF_PARTNER @@ -10206,51 +10204,51 @@ Move_PRECIPICE_BLADES:: setalpha 12, 8 fadetobg 0x15 waitbgfadeout - launchtask AnimTask_PositionFissureBgOnBattler 0x5 0x3 0x1 0x5 0xffff - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0xa 0x5 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0xa 0x5 + createvisualtask AnimTask_PositionFissureBgOnBattler, 0x5, 0x1, 0x5, 0xffff + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0xa, 0x5 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0xa, 0x5 playsewithpan SE_M_EARTHQUAKE, 0x0 - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7, ANIM_TARGET, PrecipiceBladesOpponent PrecipiceBladesPlayer: - launchtemplate gPrecipiceBladesSpikeTemplate 3, 0x5, ANIM_ATTACKER, -45, 5, 145 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 3, ANIM_ATTACKER, -45, 5, 145, 0x0 delay 10 - launchtemplate gPrecipiceBladesSpikeTemplate 3, 0x5, ANIM_ATTACKER, 10, 7, 135 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 3, ANIM_ATTACKER, 10, 7, 135, 0x0 delay 10 - launchtemplate gPrecipiceBladesSpikeTemplate 4, 0x5, ANIM_ATTACKER, -30, 15, 125 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 4, ANIM_ATTACKER, -30, 15, 125, 0x0 delay 5 - launchtemplate gPrecipiceBladesSpikeTemplate 5, 0x5, ANIM_ATTACKER, -10, 17, 120 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 5, ANIM_ATTACKER, -10, 17, 120, 0x0 PrecipiceBladesContinue: delay 0x10 - launchtemplate gPrecipiceBladesPlumeTemplate 0x82, 0x3, -15, 18, ANIM_TARGET - launchtemplate gPrecipiceBladesPlumeTemplate 0x82, 0x3, -15, 18, ANIM_DEF_PARTNER + createsprite gPrecipiceBladesPlumeTemplate, ANIM_TARGET, 2, -15, 18, ANIM_TARGET + createsprite gPrecipiceBladesPlumeTemplate, ANIM_TARGET, 2, -15, 18, ANIM_DEF_PARTNER delay 0x20 - launchtemplate gPrecipiceBladesPlumeTemplate 0x82, 0x3, 15, 18, ANIM_TARGET - launchtemplate gPrecipiceBladesPlumeTemplate 0x82, 0x3, 15, 18, ANIM_DEF_PARTNER + createsprite gPrecipiceBladesPlumeTemplate, ANIM_TARGET, 2, 15, 18, ANIM_TARGET + createsprite gPrecipiceBladesPlumeTemplate, ANIM_TARGET, 2, 15, 18, ANIM_DEF_PARTNER delay 0x20 stopsound playsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET - launchtemplate gPrecipiceBladesLargeSpikeTemplate 0x82, 0x5, ANIM_TARGET, 0, -25, 40, 0x0 - launchtemplate gPrecipiceBladesLargeSpikeTemplate 0x82, 0x5, ANIM_DEF_PARTNER, 0, -25, 40, 0x0 + createsprite gPrecipiceBladesLargeSpikeTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, -25, 40, 0x0 + createsprite gPrecipiceBladesLargeSpikeTemplate, ANIM_TARGET, 2, ANIM_DEF_PARTNER, 0, -25, 40, 0x0 delay 0x6 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x82, 0x5, ANIM_TARGET, -20 0 0x6 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x82, 0x5, ANIM_DEF_PARTNER, -20 0 0x6 0x1 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, -20, 0, 0x6, 0x1 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, ANIM_DEF_PARTNER, -20, 0, 0x6, 0x1 delay 0x22 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x82, 0x3 ANIM_TARGET 0x0 0x6 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x82, 0x3 ANIM_DEF_PARTNER 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 2, ANIM_DEF_PARTNER, 0x0, 0x6 waitforvisualfinish call UnsetPsychicBg clearmonbg ANIM_DEF_PARTNER blendoff end PrecipiceBladesOpponent: - launchtemplate gPrecipiceBladesSpikeTemplate 0x43, 0x5, ANIM_ATTACKER, 35, -5, 145 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 67, ANIM_ATTACKER, 35, -5, 145, 0x0 delay 10 - launchtemplate gPrecipiceBladesSpikeTemplate 0x43, 0x5, ANIM_ATTACKER, -20, -7, 135 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 67, ANIM_ATTACKER, -20, -7, 135, 0x0 delay 10 - launchtemplate gPrecipiceBladesSpikeTemplate 0x44, 0x5, ANIM_ATTACKER, 20, -15, 125 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 68, ANIM_ATTACKER, 20, -15, 125, 0x0 delay 5 - launchtemplate gPrecipiceBladesSpikeTemplate 0x45, 0x5, ANIM_ATTACKER, 0, -17, 120 0x0 + createsprite gPrecipiceBladesSpikeTemplate, ANIM_ATTACKER, 69, ANIM_ATTACKER, 0, -17, 120, 0x0 goto PrecipiceBladesContinue Move_DRAGON_ASCENT:: @@ -10259,34 +10257,34 @@ Move_DRAGON_ASCENT:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 11, 11, RGB(16, 31, 16) fadetobg BG_COSMIC waitbgfadeout - launchtask AnimTask_StartSlidingBg, 0x2 0x4, 0, 128, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 0x2, 0, 128, 0, -1 waitbgfadein playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER invisible ANIM_ATTACKER - launchtemplate gDragonAscentFlyUpTemplate 0x2 0x7 0x0 0x0 0x400 0x24 0x15 0x1 ANIM_ATTACKER + createsprite gDragonAscentFlyUpTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x400, 0x24, 0x15, 0x1, ANIM_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa 0x5, (ANIM_PAL_ATK | ANIM_PAL_BG | ANIM_PAL_BG_4 | ANIM_PAL_BG_5), 4, 0, 14, RGB(21, 31, 27) + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_ATTACKER | F_PAL_BG | F_PAL_ANIM_1 | F_PAL_ANIM_2), 4, 0, 14, RGB(21, 31, 27) playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtask AnimTask_StartSlidingBg, 0x5 0x4, -7304, -784, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 0x5, -7304, -784, 1, -1 delay 2 - launchtask AnimTask_BlendBattleAnimPal, 0xa 0x5, (ANIM_PAL_ATK | ANIM_PAL_BG | ANIM_PAL_BG_4 | ANIM_PAL_BG_5), 0, 14, 0, RGB(21, 31, 27) + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_ATTACKER | F_PAL_BG | F_PAL_ANIM_1 | F_PAL_ANIM_2), 0, 14, 0, RGB(21, 31, 27) waitforvisualfinish delay 1 monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER - launchtemplate gDragonAscentDrakeTemplate, 2, 0x1 5 + createsprite gDragonAscentDrakeTemplate, ANIM_ATTACKER, 2, 5 delay 1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate, 0x84, 0x4, -10, 0, 1, 0 - launchtemplate gSlideMonToOffsetSpriteTemplate, 2, 0x5, 0x1, -32, 0, 0, 3 - launchtask AnimTask_ShakeMonInPlace, 0x2 0x5, ANIM_TARGET, 6, 0, 12, 1 - launchtask AnimTask_BlendBattleAnimPal, 0xa 0x5, (ANIM_PAL_ATK | ANIM_PAL_BG | ANIM_PAL_BG_4 | ANIM_PAL_BG_5), 2, 16, 0, RGB(26, 31, 0) + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, 1, 0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0x1, -32, 0, 0, 3 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, ANIM_TARGET, 6, 0, 12, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_ATTACKER | F_PAL_BG | F_PAL_ANIM_1 | F_PAL_ANIM_2), 2, 16, 0, RGB(26, 31, 0) waitforvisualfinish delay 3 - launchtemplate gSlideMonToOriginalPosSpriteTemplate, 2, 0x3, 1, 0, 7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 7 waitforvisualfinish blendoff clearmonbg ANIM_DEF_PARTNER @@ -10298,68 +10296,68 @@ Move_HYPERSPACE_FURY:: loadspritegfx ANIM_TAG_HOOPA_RING @Hoopa Ring loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_POISON_BUBBLE - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xA 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xA, 0x0 waitforvisualfinish playsewithpan SE_M_NIGHTMARE, SOUND_PAN_ATTACKER - launchtemplate gHyperspaceFuryRingTemplate 0x3 0x4 0x0 0x0 0x38 0x0 + createsprite gHyperspaceFuryRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 delay 0x5 - launchtemplate gHyperspaceFuryRingTemplate 0x3 0x4 0x0 0x0 0x38 0x4 + createsprite gHyperspaceFuryRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 delay 0x5 - launchtemplate gHyperspaceFuryRingTemplate 0x3 0x4 0x0 0x0 0x38 0x8 + createsprite gHyperspaceFuryRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 delay 0x5 - launchtemplate gHyperspaceFuryRingTemplate 0x3 0x4 0x0 0x0 0x38 0xc + createsprite gHyperspaceFuryRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc delay 0x5 - launchtemplate gHyperspaceFuryRingTemplate 0x3 0x4 0x0 0x0 0x38 0x10 + createsprite gHyperspaceFuryRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 delay 0x15 invisible ANIM_ATTACKER waitforvisualfinish fadetobg BG_HYPERSPACE_FURY waitbgfadeout - launchtask AnimTask_SetPsychicBackground 0x5 0x0 + createvisualtask AnimTask_SetPsychicBackground, 0x5 waitbgfadein loopsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET, 0x2, 0x10 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x20 0x1 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x0 0xffe0 0x10 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x20, 0x1 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe0, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x16 0xffea 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x16, 0xffea, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x1e 0x0 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1e, 0x0, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtask AnimTask_IsTargetSameSide 0x2 0x0 - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x14 0x14 0x10 + createvisualtask AnimTask_IsTargetSameSide, 0x2 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x14, 0x14, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x0 0x1c 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x1c, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0xffed 0x13 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffed, 0x13, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0xffe5 0x0 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffe5, 0x0, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0xffee 0xffee 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffee, 0xffee, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x0 0xffe7 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe7, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x11 0xffef 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x11, 0xffef, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x17 0x0 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x17, 0x0, 0x10 call HyperspaceFuryRandomImpact delay 0x2 - launchtemplate gHyperspaceFuryHandTemplate 0x82 0x5 0x1 0x0 0x10 0x10 0x10 + createsprite gHyperspaceFuryHandTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0x10, 0x10 call HyperspaceFuryRandomImpact delay 0x7 - launchtask SoundTask_PlayDoubleCry 0x2 0x2 ANIM_ATTACKER 0xff + createvisualtask SoundTask_PlayDoubleCry, 0x2, ANIM_ATTACKER, 0xff visible ANIM_ATTACKER - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x0 0x3 0x20 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x0, 0x3, 0x20, 0x1 playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_TARGET invisible ANIM_ATTACKER call UnsetPsychicBg @@ -10373,10 +10371,10 @@ Move_HYPERSPACE_FURY:: invisible ANIM_ATTACKER delay 0x1 visible ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0x0 end HyperspaceFuryRandomImpact: - launchtemplate gHyperspaceFuryImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gHyperspaceFuryImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 return @@@@@@@@@@@@@@@@@@@@@@@ GEN 7 @@@@@@@@@@@@@@@@@@@@@@@ @@ -10384,21 +10382,21 @@ Move_SHORE_UP:: loadspritegfx ANIM_TAG_FLYING_DIRT @sandstorm loadspritegfx ANIM_TAG_BLUE_STAR @heal2 playsewithpan SE_M_SANDSTORM, 0x0 - launchtask AnimTask_LoadSandstormBackground 0x5 0x1 0x0 + createvisualtask AnimTask_LoadSandstormBackground, 0x5, 0x0 delay 0x10 - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0xa 0x900 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0xa, 0x900, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x5a 0x800 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x5a, 0x800, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x32 0xa00 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x32, 0xa00, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x14 0x900 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x14, 0x900, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x46 0x7c0 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x46, 0x7c0, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x0 0xb00 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0xb00, 0x60, 0x0 delay 0xa - launchtemplate gFlyingSandCrescentSpriteTemplate 0x28 0x4 0x3c 0xa00 0x60 0x0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0x3c, 0xa00, 0x60, 0x0 call HealingEffect waitforvisualfinish end @@ -10407,28 +10405,28 @@ Move_FIRST_IMPRESSION:: loadspritegfx ANIM_TAG_SWEAT_BEAD @astonish loadspritegfx ANIM_TAG_IMPACT @pound hit loadspritegfx ANIM_TAG_RAZOR_LEAF @green - launchtemplate gSprayWaterDropletSpriteTemplate 0x85 0x2 0x0 0x1 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 0x0, 0x1 playsewithpan SE_M_SKETCH, SOUND_PAN_TARGET - launchtemplate gSprayWaterDropletSpriteTemplate 0x85 0x2 0x1 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 - launchtask AnimTask_StretchTargetUp 0x3 0x0 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 + createvisualtask AnimTask_StretchTargetUp, 0x3 waitforvisualfinish delay 0x19 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x6 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x6 waitforvisualfinish monbg ANIM_TARGET @This is placed here on purpose (to not ruin astonishs animation) delay 0x1 - launchtemplate gFirstImpressionPoundTemplate 0x4 0x4 0xfff6 0x0 0x1 0x0 + createsprite gFirstImpressionPoundTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0, 0x1, 0x0 loopsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET 0xA 0x2 delay 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe4 0x0 0x0 0x3 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe4, 0x0, 0x0, 0x3 waitforvisualfinish - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x4 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x4, 0x0, 0xc, 0x1 waitforvisualfinish delay 0xa - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x6 delay 0x5 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x6 waitforvisualfinish clearmonbg ANIM_TARGET end @@ -10439,22 +10437,22 @@ Move_BANEFUL_BUNKER:: monbg ANIM_ATK_PARTNER splitbgprio ANIM_ATTACKER waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER 0x10 - launchtemplate gProtectSpriteTemplate 0x2 0x3 0x18 0x0 0x5a - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0x0, 0x5a + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 - launchtemplate gBanefulBunkerPoisonBubbleTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gBanefulBunkerPoisonBubbleTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER end @@ -10465,21 +10463,21 @@ Move_SPIRIT_SHACKLE:: monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 waitforvisualfinish playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER - launchtemplate gSpiritShackleArrowTemplate 0x82 0x5 0x10 0x0 0x0 0x0 0xf + createsprite gSpiritShackleArrowTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xf delay 0x8 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0xa 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0xa, 0x1 waitforvisualfinish loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 0x1c, 0x2 - launchtemplate gSpiritShackleChainTemplate 0x82 0x2 0xfff0 0xfff0 + createsprite gSpiritShackleChainTemplate, ANIM_TARGET, 2, 0xfff0, 0xfff0 delay 0x4 - launchtemplate gSpiritShackleChainTemplate 0x82 0x2 0xfff0 0x0 + createsprite gSpiritShackleChainTemplate, ANIM_TARGET, 2, 0xfff0, 0x0 delay 0x4 - launchtemplate gSpiritShackleChainTemplate 0x82 0x2 0xfff0 0x10 + createsprite gSpiritShackleChainTemplate, ANIM_TARGET, 2, 0xfff0, 0x10 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -10488,7 +10486,7 @@ Move_SPIRIT_SHACKLE:: Move_DARKEST_LARIAT:: fadetobg BG_DARK waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x0 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x0, 0x0, 0xffff waitbgfadein loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_POISON_BUBBLE @purple color @@ -10504,8 +10502,8 @@ Move_DARKEST_LARIAT:: waitplaysewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET, 0x46 waitplaysewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER, 0x50 waitplaysewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET, 0x5a - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x0 0xffee 0x6 0x6 0x4 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x1 0x12 0x6 0x6 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x0, 0xffee, 0x6, 0x6, 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x1, 0x12, 0x6, 0x6, 0x4 call DarkestLariatImpact call DarkestLariatImpact call DarkestLariatImpact @@ -10515,11 +10513,11 @@ Move_DARKEST_LARIAT:: call UnsetPsychicBg end DarkestLariatImpact: - launchtemplate gDarkestLariatImpactTemplate 0x3 0x4 0x0 0xfff4 0x1 0x1 + createsprite gDarkestLariatImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0xfff4, 0x1, 0x1 delay 0x8 - launchtemplate gDarkestLariatImpactTemplate 0x3 0x4 0xfff4 0x8 0x1 0x1 + createsprite gDarkestLariatImpactTemplate, ANIM_ATTACKER, 3, 0xfff4, 0x8, 0x1, 0x1 delay 0x8 - launchtemplate gDarkestLariatImpactTemplate 0x3 0x4 0xc 0x0 0x1 0x1 + createsprite gDarkestLariatImpactTemplate, ANIM_ATTACKER, 3, 0xc, 0x0, 0x1, 0x1 delay 0x8 return @@ -10528,10 +10526,10 @@ Move_SPARKLING_ARIA:: loadspritegfx ANIM_TAG_BUBBLE @circles loadspritegfx ANIM_TAG_HYDRO_PUMP @hydro pump monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xE 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xE, 0x0 waitforvisualfinish - launchtemplate gSparklingAriaBlueChargeTemplate 0x2 0x1 0x0 + createsprite gSparklingAriaBlueChargeTemplate, ANIM_ATTACKER, 2, 0x0 call SparklingAriaCharge call SparklingAriaCharge call SparklingAriaCharge @@ -10541,77 +10539,77 @@ Move_SPARKLING_ARIA:: call SparklingAriaRain call SparklingAriaRain waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xE 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xE, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff end SparklingAriaRain: - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0xdc 0x3c - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0xdc, 0x3c + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaBubbleRainTemplate 0x82, 0x3, 0x1 0x3c 0x64 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaBubbleRainTemplate, ANIM_TARGET, 2, 0x1, 0x3c, 0x64 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0x8c 0x37 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0x8c, 0x37 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0xb4 0x32 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0xb4, 0x32 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0x14 0x5a - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0x14, 0x5a + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaBubbleRainTemplate 0x82, 0x3, 0x1 0x5a 0x5a - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaBubbleRainTemplate, ANIM_TARGET, 2, 0x1, 0x5a, 0x5a + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0xa0 0x3c - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0xa0, 0x3c + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0x1e 0x5a - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0x1e, 0x5a + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaRainTemplate 0x82, 0x3, 0x1 0x78 0x3c - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaRainTemplate, ANIM_TARGET, 2, 0x1, 0x78, 0x3c + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 - launchtemplate gSparklingAriaBubbleRainTemplate 0x82, 0x3, 0x1 0xc8 0x28 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x3 0x0 0x6 0x1 + createsprite gSparklingAriaBubbleRainTemplate, ANIM_TARGET, 2, 0x1, 0xc8, 0x28 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x3, 0x0, 0x6, 0x1 delay 0x2 return SparklingAriaCharge: playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_ATTACKER - launchtemplate gSparklingAriaBubblesTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gSparklingAriaBubblesTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 delay 0x4 return @@ -10621,27 +10619,27 @@ Move_ICE_HAMMER:: loadspritegfx ANIM_TAG_ECLIPSING_ORB @gray color loadspritegfx ANIM_TAG_BLACK_SMOKE @smoke setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gIceHammerPunchStompTemplate 0x83, 0x3 0x0 0xffe0 0xf + createsprite gIceHammerPunchStompTemplate, ANIM_TARGET, 3, 0x0, 0xffe0, 0xf delay 0x13 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtask AnimTask_SquishTarget 0x2 0x0 - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xfff4 0x68 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xfff4 0x48 0x1 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xfffa 0x38 0x1 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xfffa 0x58 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x0 0x38 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x0 0x58 0x1 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x6 0x48 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x6 0x68 0x1 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xc 0x48 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0xc 0x38 0x1 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x12 0x50 0x0 0x4b - launchtemplate gIceHammerSmokesTemplate 0x84, 0x5 0x0 0x12 0x48 0x1 0x4b + createvisualtask AnimTask_SquishTarget, 0x2 + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x68, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x48, 0x1, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x38, 0x1, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x58, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x38, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x58, 0x1, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x48, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x68, 0x1, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x48, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x38, 0x1, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x50, 0x0, 0x4b + createsprite gIceHammerSmokesTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x48, 0x1, 0x4b call IceCrystalEffectShort - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff end @@ -10660,27 +10658,27 @@ Move_FLORAL_HEALING:: waitforvisualfinish panse SE_M_COMET_PUNCH, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 playsewithpan SE_M_TWISTER, 0x0 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x46 0x1 0x40 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x46, 0x1, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3c 0x0 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3c, 0x0, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x50 0x1 0x40 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0x1, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3a 0x0 0x78 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3a, 0x0, 0x78 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x5a 0x0 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x5a, 0x0, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x30 0x0 0x40 @2 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0x0, 0x40 @2 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x5f 0x1 0x50 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x5f, 0x1, 0x50 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x4b 0x1 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x4b, 0x1, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x55 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x55, 0x0, 0x78 delay 0x2 loopsewithpan SE_M_POISON_POWDER, SOUND_PAN_TARGET, 0x12, 0xa call FloralHealingSpores @@ -10688,66 +10686,66 @@ Move_FLORAL_HEALING:: call FloralHealingSpores waitforvisualfinish playsewithpan SE_M_ABSORB_2, SOUND_PAN_ATTACKER - launchtemplate gGrantingStarsSpriteTemplate 0x10 0x7 0xfff1 0x0 0x1 0x0 0x20 0x3c 0x1 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 16, 0xfff1, 0x0, 0x1, 0x0, 0x20, 0x3c, 0x1 delay 0x8 - launchtemplate gGrantingStarsSpriteTemplate 0x10 0x7 0xc 0xfffb 0x1 0x0 0x20 0x3c 0x1 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 16, 0xc, 0xfffb, 0x1, 0x0, 0x20, 0x3c, 0x1 waitforvisualfinish clearmonbg ANIM_TARGET clearmonbg ANIM_ATTACKER end FloralHealingSpores: - launchtemplate gFloralHealingFlowerTemplate 0x2 0x5 0x0 0xffec 0x55 0x50 0x0 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x46 0x1 0x40 + createsprite gFloralHealingFlowerTemplate, ANIM_ATTACKER, 2, 0x0, 0xffec, 0x55, 0x50, 0x0 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x46, 0x1, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3c 0x0 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3c, 0x0, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x50 0x1 0x40 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0x1, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3a 0x0 0x78 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3a, 0x0, 0x78 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x5a 0x0 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x5a, 0x0, 0x40 delay 0x3 - launchtemplate gFloralHealingFlowerTemplate 0x2 0x5 0x0 0xfff6 0xaa 0x50 0x0 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x30 0x0 0x40 + createsprite gFloralHealingFlowerTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0xaa, 0x50, 0x0 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0x0, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x5f 0x1 0x50 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x5f, 0x1, 0x50 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x4b 0x1 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x4b, 0x1, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x55 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x55, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x46 0x1 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x46, 0x1, 0x40 delay 0x3 - launchtemplate gFloralHealingFlowerTemplate 0x2 0x5 0x0 0xfff1 0x0 0x50 0x0 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3c 0x0 0x40 + createsprite gFloralHealingFlowerTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff1, 0x0, 0x50, 0x0 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3c, 0x0, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x50 0x1 0x40 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0x1, 0x40 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x3a 0x0 0x78 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x3a, 0x0, 0x78 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x64 0x0 0x78 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x64, 0x0, 0x78 delay 0x2 - launchtemplate gFloralHealingWindLeavesTemplate 0x2 0x3 0x5a 0x0 0x40 + createsprite gFloralHealingWindLeavesTemplate, ANIM_ATTACKER, 2, 0x5a, 0x0, 0x40 delay 0x2 - launchtemplate gSweetScentPetalSpriteTemplate 0x2 0x3 0x30 0x0 0x40 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0x0, 0x40 delay 0x3 return CIRCLES_LEAVES: - launchtemplate gFloralHealingOrbsTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 0x0 + createsprite gFloralHealingOrbsTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, 0x0 delay 0x2 - launchtemplate gFloralHealingLeavesTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 0x0 + createsprite gFloralHealingLeavesTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, 0x0 delay 0x2 - launchtemplate gFloralHealingOrbsTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a 0x0 + createsprite gFloralHealingOrbsTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, 0x0 delay 0x2 - launchtemplate gFloralHealingLeavesTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 0x0 + createsprite gFloralHealingLeavesTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, 0x0 delay 0x2 - launchtemplate gFloralHealingOrbsTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e 0x0 + createsprite gFloralHealingOrbsTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, 0x0 delay 0x2 - launchtemplate gFloralHealingLeavesTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce 0x0 + createsprite gFloralHealingLeavesTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, 0x0 delay 0x2 return @@ -10756,18 +10754,18 @@ Move_HIGH_HORSEPOWER:: loadspritegfx ANIM_TAG_HORSESHOE_SIDE_FIST @horseshoe monbg ANIM_TARGET delay 0x2 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x10, 0x0 setalpha 12, 8 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_TARGET - launchtemplate gHighHorsepowerHorseshoeTemplate 0x3 0x4 0x0 0x0 0x1 0x32 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x7 0x7fff + createsprite gHighHorsepowerHorseshoeTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x32 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x7, 0x7fff delay 0x32 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET call SetImpactBackground - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x16 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x0 0x7fff - launchtemplate gComplexPaletteBlendSpriteTemplate 0x2 0x7 0x1f 0x3 0x1 0x0 0x8 0x0 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x16, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x0, 0x7fff + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x1f, 0x3, 0x1, 0x0, 0x8, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -10785,59 +10783,59 @@ Move_STRENGTH_SAP:: loadspritegfx ANIM_TAG_SPARKLE_2 @stars monbg ANIM_DEF_PARTNER playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gStrengthSapRedSmokeTemplate 0x82, 0x4, 0x8 0x3 0x1 0x0 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x46 0x0 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x28 0x28 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xa 0xffc4 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffce 0xffd8 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffd8 0x28 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x32 0xffce 0x6 + createsprite gStrengthSapRedSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x3, 0x1, 0x0 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x46, 0x0, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x28, 0x28, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xa, 0xffc4, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffce, 0xffd8, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffd8, 0x28, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x32, 0xffce, 0x6 delay 0x2 - launchtemplate gStrengthSapRedSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x32 0xffe2 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x3c 0xa 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x0 0x3c 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x0 0xffd8 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffc4 0x14 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffc4 0xffe2 0x6 + createsprite gStrengthSapRedSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x1, 0x0 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x32, 0xffe2, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x3c, 0xa, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x0, 0x3c, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x0, 0xffd8, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffc4, 0x14, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffc4, 0xffe2, 0x6 delay 0x2 - launchtemplate gStrengthSapRedSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffce 0x32 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffc4 0x14 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0xffd8 0xffd8 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x14 0xffc4 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x32 0xffce 0x6 - launchtemplate gStrengthSapRedInwardTemplate 0x4 0x3 0x23 0x28 0x6 + createsprite gStrengthSapRedSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x1, 0x0 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffce, 0x32, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffc4, 0x14, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0xffd8, 0xffd8, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x14, 0xffc4, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x32, 0xffce, 0x6 + createsprite gStrengthSapRedInwardTemplate, ANIM_ATTACKER, 4, 0x23, 0x28, 0x6 delay 0x2 - launchtemplate gStrengthSapRedSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 + createsprite gStrengthSapRedSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x1, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x3 0x07FD + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x3, 0x07FD delay 0x5 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0x0 0x5 0x8 0x1a + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0x0, 0x5, 0x8, 0x1a delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0xa 0xfffb 0xfff8 0x1a + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0xa, 0xfffb, 0xfff8, 0x1a delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0xfffb 0xf 0x10 0x21 + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0xfffb, 0xf, 0x10, 0x21 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0x0 0xfff1 0xfff0 0x24 + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0x0, 0xfff1, 0xfff0, 0x24 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0x0 0x5 0x8 0x1a + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0x0, 0x5, 0x8, 0x1a delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0xa 0xfffb 0xfff8 0x1a + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0xa, 0xfffb, 0xfff8, 0x1a delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0xfff6 0x14 0x14 0x27 + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0xfff6, 0x14, 0x14, 0x27 delay 0x4 playsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET - launchtemplate gStrengthSapAbsorbTemplate 0x3 0x4 0x5 0xffee 0xffec 0x23 + createsprite gStrengthSapAbsorbTemplate, ANIM_ATTACKER, 3, 0x5, 0xffee, 0xffec, 0x23 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x3 0x0 0x07FD + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x3, 0x0, 0x07FD loopsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER, 0x10, 0x3 call GrantingStarsEffect waitforvisualfinish @@ -10853,32 +10851,32 @@ SolarBladeUnleash: loadspritegfx ANIM_TAG_SPARK_2 @yellow color loadspritegfx ANIM_TAG_SUNLIGHT @sun rays monbg ANIM_ATTACKER - setblends 0x30d - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS), 1, 0, 6, 0x7fff + setalpha 13, 3 + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 0, 6, 0x7fff waitforvisualfinish playsewithpan SE_M_SWORDS_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x10 0x6 0x1 0x4 - launchtemplate gSwordsDanceBladeSpriteTemplate 0x2 0x2 0x0 0x0 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x10, 0x6, 0x1, 0x4 + createsprite gSwordsDanceBladeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 call SolarBladeSunRays call SolarBladeSunRays call SolarBladeSunRays call SolarBladeSunRays - launchtask AnimTask_FlashAnimTagWithColor 0x2 0x7 0x2715 0x2 0x2 0x7ff2 0x10 0x0 0x0 + createvisualtask AnimTask_FlashAnimTagWithColor, 0x2, 0x2715, 0x2, 0x2, 0x7ff2, 0x10, 0x0, 0x0 waitforvisualfinish call SetSolarBeamBg playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - launchtemplate gSolarBladeImpactTemplate 0x82, 0x3, 0x0 0x0 0x1 + createsprite gSolarBladeImpactTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1 delay 0x2 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x2 0x0 0xC 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x2, 0x0, 0xC, 0x1 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal 10, (ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS), 1, 6, 0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 6, 0, 0x7fff waitforvisualfinish call UnsetPsychicBg clearmonbg ANIM_ATTACKER blendoff end SolarBladeSunRays: - launchtemplate gSunlightRaySpriteTemplate 0x28 0x0 + createsprite gSunlightRaySpriteTemplate, ANIM_ATTACKER, 40 delay 0x6 return @@ -10887,12 +10885,12 @@ Move_LEAFAGE:: loadspritegfx ANIM_TAG_IMPACT @hit monbg ANIM_DEF_PARTNER playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER - launchtemplate gRazorLeafCutterSpriteTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0x14 0x1 - launchtemplate gRazorLeafCutterSpriteTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0xffec 0x1 - launchtemplate gRazorLeafCutterSpriteTemplate 0x83 0x7 0x14 0xfff6 0x14 0x0 0x16 0x0 0x1 + createsprite gRazorLeafCutterSpriteTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0x14, 0x1 + createsprite gRazorLeafCutterSpriteTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0xffec, 0x1 + createsprite gRazorLeafCutterSpriteTemplate, ANIM_TARGET, 3, 0x14, 0xfff6, 0x14, 0x0, 0x16, 0x0, 0x1 delay 0x14 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - launchtemplate gLeafageImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x2 + createsprite gLeafageImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -10900,15 +10898,15 @@ Move_LEAFAGE:: Move_SPOTLIGHT:: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_TAG_HAND - launchtask AnimTask_CreateSpotlight 0x2 0x0 - launchtask AnimTask_HardwarePaletteFade 0x2 0x5 0xf8 0x3 0x0 0xa 0x0 + createvisualtask AnimTask_CreateSpotlight, 0x2 + createvisualtask AnimTask_HardwarePaletteFade, 0x2, 0xf8, 0x3, 0x0, 0xa, 0x0 waitforvisualfinish playsewithpan SE_CONTEST_ICON_CHANGE, SOUND_PAN_ATTACKER - launchtemplate gSpotlightSpriteTemplate 0x82 0x2 0x0 0xfff8 + createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff8 delay 0x40 - launchtask AnimTask_HardwarePaletteFade 0x2 0x5 0xf8 0x3 0xa 0x0 0x1 + createvisualtask AnimTask_HardwarePaletteFade, 0x2, 0xf8, 0x3, 0xa, 0x0, 0x1 waitforvisualfinish - launchtask AnimTask_RemoveSpotlight 0x2 0x0 + createvisualtask AnimTask_RemoveSpotlight, 0x2 end Move_TOXIC_THREAD:: @@ -10918,7 +10916,7 @@ Move_TOXIC_THREAD:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WEB_THREAD, 0x0, 0xA, 0xA, 0x6038 @Purple monbg ANIM_DEF_PARTNER delay 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x9 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x9, 0x0 waitforvisualfinish loopsewithpan SE_M_STRING_SHOT, SOUND_PAN_ATTACKER, 0x9, 0x6 call SpiderWebThread @@ -10941,16 +10939,16 @@ Move_TOXIC_THREAD:: call SpiderWebThread waitforvisualfinish playsewithpan SE_M_STRING_SHOT2, SOUND_PAN_TARGET - launchtemplate gToxicThreadString 0x82 0x2 0x0 0xa + createsprite gToxicThreadString, ANIM_TARGET, 2, 0x0, 0xa delay 0x4 - launchtemplate gToxicThreadString 0x82 0x2 0x0 0xfffe + createsprite gToxicThreadString, ANIM_TARGET, 2, 0x0, 0xfffe delay 0x4 - launchtemplate gToxicThreadString 0x82 0x2 0x0 0x16 + createsprite gToxicThreadString, ANIM_TARGET, 2, 0x0, 0x16 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x9 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x9, 0x0, 0x0 end Move_LASER_FOCUS:: @@ -10958,14 +10956,14 @@ Move_LASER_FOCUS:: loadspritegfx ANIM_TAG_OPENING_EYE @eyes loadspritegfx ANIM_TAG_LEER @leer monbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish - launchtemplate gLaserFocusRedEyesTemplate 0x5 0x4 0x0 0x0 0x0 0x0 + createsprite gLaserFocusRedEyesTemplate, ANIM_ATTACKER, 5, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x18 0xfff4 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0xfff4 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER end @@ -10973,53 +10971,53 @@ Move_LASER_FOCUS:: Move_GEAR_UP:: loadspritegfx ANIM_TAG_GEAR loadspritegfx ANIM_TAG_SPARK_2 @sparks - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x039B - launchtemplate gGearUpGearsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x039B + createsprite gGearUpGearsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0xF playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gGearUpGearsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gGearUpGearsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0xF playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gGearUpGearsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gGearUpGearsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0xF playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER call GearUpSparks call GearUpSparks call GearUpSparks playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x039B + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x039B waitforvisualfinish end GearUpSparks: playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0xF playsewithpan SE_ROULETTE_BALL2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0xF return @@ -11031,35 +11029,35 @@ Move_THROAT_CHOP:: splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gKarateChopSpriteTemplate 0x2 0x8 0xfff0 0x0 0x0 0x0 0xa 0x1 0x3 0x0 + createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0x0, 0x0, 0x0, 0xa, 0x1, 0x3, 0x0 waitforvisualfinish - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 delay 0x3 - launchtemplate gThroatChopRedImpactTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createsprite gThroatChopRedImpactTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x4 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x4, 0x0, 0x6, 0x1 waitforvisualfinish - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end Move_POLLEN_PUFF:: - launchtask AnimTask_IsTargetSameSide 0x5 0x0 + createvisualtask AnimTask_IsTargetSameSide, 0x5 jumpargeq 0x0, 0x1, PollenPuffAlly PollenPuffOpponent: loadspritegfx ANIM_TAG_SPARKLE_2 @stars @@ -11071,50 +11069,50 @@ PollenPuffOpponent: loadspritegfx ANIM_TAG_ORBS @hit monbg ANIM_ATTACKER setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x0 waitforvisualfinish - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER clearmonbg ANIM_ATTACKER waitforvisualfinish stopsound monbg ANIM_TARGET - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0xA0 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x110 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xB0 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x100 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x90 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x110 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xB0 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x100 0x28 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0xA0, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x110, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xB0, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x100, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x90, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x110, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xB0, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x100, 0x28, 0x0 delay 0x1 playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET - launchtemplate gPollenPuffSporeTemplate 0x82 0x6 0xa 0x0 0x0 0x0 0x19 0xffe0 + createsprite gPollenPuffSporeTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x0, 0x0, 0x19, 0xffe0 waitforvisualfinish playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0x0 0xFFE0 0x10 @up - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0xFFEE 0xFFEE 0x10 @upperleft - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0x0 0x1C 0x10 @down + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0xFFE0, 0x10 @up + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0xFFEE, 0xFFEE, 0x10 @upperleft + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0x1C, 0x10 @down delay 0x4 - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0xFFE5 0x0 0x10 @left - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0x14 0x14 0x10 @lowerright - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0xFFED 0x13 0x10 @lowerleft + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0xFFE5, 0x0, 0x10 @left + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0x14, 0x14, 0x10 @lowerright + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0xFFED, 0x13, 0x10 @lowerleft delay 0x4 - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0x1E 0x0 0x10 @right - launchtemplate gPollenPuffImpactTemplates 0x82 0x5 0x1 0x1 0x16 0xFFEA 0x10 @upperright + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0x1E, 0x0, 0x10 @right + createsprite gPollenPuffImpactTemplates, ANIM_TARGET, 2, 0x1, 0x1, 0x16, 0xFFEA, 0x10 @upperright waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -11127,48 +11125,48 @@ PollenPuffAlly: loadspritegfx ANIM_TAG_SPORE @ball monbg ANIM_ATTACKER setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x8 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x0 waitforvisualfinish - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0xD - launchtemplate gPollenPuffPinkStarTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gPollenPuffPinkStarTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 playsewithpan SE_M_ABSORB_2, SOUND_PAN_ATTACKER clearmonbg ANIM_ATTACKER waitforvisualfinish stopsound playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_ATTACKER monbg ANIM_TARGET - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0xa0 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x120 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x90 0x28 0x0 - launchtemplate gPollenPuffPinkSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x110 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0xa0 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x120 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x90 0x28 0x0 - launchtemplate gPollenPuffYellowSparkleTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x110 0x28 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0xa0, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x120, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x90, 0x28, 0x0 + createsprite gPollenPuffPinkSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x110, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0xa0, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x120, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x90, 0x28, 0x0 + createsprite gPollenPuffYellowSparkleTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x110, 0x28, 0x0 delay 0x1 - launchtemplate gPollenPuffSporeTemplate 0x82 0x6 0xa 0x0 0x0 0x0 0x19 0xffe0 + createsprite gPollenPuffSporeTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x0, 0x0, 0x19, 0xffe0 waitforvisualfinish unloadspritegfx ANIM_TAG_SPARKLE_2 @stars loadspritegfx ANIM_TAG_BLUE_STAR @heal playsewithpan SE_M_ABSORB_2, SOUND_PAN_ATTACKER - launchtemplate gPollenPuffHealTemplate 0x2 0x4 0x0 0xfffb 0x1 0x0 + createsprite gPollenPuffHealTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0x1, 0x0 delay 0x7 - launchtemplate gPollenPuffHealTemplate 0x2 0x4 0xfff1 0xa 0x1 0x0 + createsprite gPollenPuffHealTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xa, 0x1, 0x0 delay 0x7 - launchtemplate gPollenPuffHealTemplate 0x2 0x4 0xfff1 0xfff1 0x1 0x0 + createsprite gPollenPuffHealTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xfff1, 0x1, 0x0 delay 0x7 - launchtemplate gPollenPuffHealTemplate 0x2 0x4 0xa 0xfffb 0x1 0x0 + createsprite gPollenPuffHealTemplate, ANIM_ATTACKER, 2, 0xa, 0xfffb, 0x1, 0x0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x8 0x1 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x1, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -11179,19 +11177,19 @@ Move_ANCHOR_SHOT:: loadspritegfx ANIM_TAG_ANCHOR playsewithpan SE_FALL SOUND_PAN_TARGET monbg ANIM_TARGET - launchtemplate gAnchorShotAngledAnchorTemplate 0x2 0x3 0x0 0x0 0x35 + createsprite gAnchorShotAngledAnchorTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x35 waitforvisualfinish - launchtemplate gAnchorShotAnchorTemplate 0x3 0x3 0x0 0xffe0 0xf - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 + createsprite gAnchorShotAnchorTemplate, ANIM_ATTACKER, 3, 0x0, 0xffe0, 0xf + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 delay 0x25 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 waitforvisualfinish loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER 0x1c 0x2 - launchtemplate gAnchorShotChainTemplate 0x82 0x2 0xfff0 0xfff0 + createsprite gAnchorShotChainTemplate, ANIM_TARGET, 2, 0xfff0, 0xfff0 delay 0x4 - launchtemplate gAnchorShotChainTemplate 0x82 0x2 0xfff0 0x0 + createsprite gAnchorShotChainTemplate, ANIM_TARGET, 2, 0xfff0, 0x0 delay 0x4 - launchtemplate gAnchorShotChainTemplate 0x82 0x2 0xfff0 0x10 + createsprite gAnchorShotChainTemplate, ANIM_TARGET, 2, 0xfff0, 0x10 waitforvisualfinish clearmonbg ANIM_TARGET end @@ -11214,7 +11212,7 @@ Move_PSYCHIC_TERRAIN:: createsprite gPsychicTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 126 createsprite gPsychicTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 168 createsprite gPsychicTerrainOrbsTemplate, ANIM_ATTACKER, 2, 26, 210 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 0, 4, RGB(27, 0, 13) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 4, RGB(27, 0, 13) delay 52 setarg 7, 0xFFFF playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER @@ -11230,7 +11228,7 @@ Move_PSYCHIC_TERRAIN:: loopsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET, 0xa, 0x3 waitforvisualfinish delay 4 - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(27, 0, 13) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 4, 0, RGB(27, 0, 13) waitforvisualfinish end @@ -11242,9 +11240,9 @@ Move_LUNGE:: loadspritegfx ANIM_TAG_RAZOR_LEAF @green loadspritegfx ANIM_TAG_SMALL_BUBBLES @ball monbg ANIM_ATK_PARTNER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x3 0x0 0xf0 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x3, 0x0, 0xf0, 0x0 loopsewithpan SE_M_PSYBEAM2, SOUND_PAN_ATTACKER, 0xe, 0xa - launchtemplate gLungeGreenChargeTemplate 0x2 0x0 + createsprite gLungeGreenChargeTemplate, ANIM_ATTACKER, 2 delay 0x6e delay 0x3e playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER @@ -11253,34 +11251,34 @@ Move_LUNGE:: invisible ANIM_ATTACKER waitforvisualfinish playsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER - launchtemplate gLungeGreenBubbleTemplate 0x82 0x6 0xa 0x0 0x0 0x0 0x19 0xffe0 + createsprite gLungeGreenBubbleTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x0, 0x0, 0x19, 0xffe0 delay 0xF monbg ANIM_DEF_PARTNER delay 0x1 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x46 0x0 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x28 0x28 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xa 0xffc4 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffce 0xffd8 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffd8 0x28 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x32 0xffce 0x6 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x5 0xb 0x1 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x46, 0x0, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x28, 0x28, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xa, 0xffc4, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffce, 0xffd8, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffd8, 0x28, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x32, 0xffce, 0x6 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x5, 0xb, 0x1 delay 0x2 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x32 0xffe2 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x3c 0xa 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x0 0x3c 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x0 0xffd8 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffc4 0x14 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffc4 0xffe2 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x32, 0xffe2, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x3c, 0xa, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x3c, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0xffd8, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffc4, 0x14, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffc4, 0xffe2, 0x6 delay 0x2 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffce 0x32 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffc4 0x14 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0xffd8 0xffd8 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x14 0xffc4 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x32 0xffce 0x6 - launchtemplate gTealAlertSpriteTemplate 0x4 0x3 0x23 0x28 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffce, 0x32, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffc4, 0x14, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0xffd8, 0xffd8, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x14, 0xffc4, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x32, 0xffce, 0x6 + createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 0x23, 0x28, 0x6 waitforvisualfinish playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gLungeGreenImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x2 + createsprite gLungeGreenImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 waitforvisualfinish visible ANIM_ATTACKER clearmonbg ANIM_DEF_PARTNER @@ -11290,41 +11288,41 @@ Move_FIRE_LASH:: loadspritegfx ANIM_TAG_SMALL_EMBER monbg ANIM_DEF_PARTNER splitbgprio_foes ANIM_TARGET - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x4 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x8 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0xc + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x10 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x14 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x14 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x18 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x18 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x18 0x0 0x0 0x6 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x18, 0x0, 0x0, 0x6 delay 0x4 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x5 0x0 0x8 0x1 - launchtask AnimTask_BlendMonInAndOut 0x3 0x5 0x1 0x1f 0xc 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x5, 0x0, 0x8, 0x1 + createvisualtask AnimTask_BlendMonInAndOut, 0x3, 0x1, 0x1f, 0xc, 0x1, 0x1 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET loadspritegfx ANIM_TAG_SLASH - launchtemplate gSlashSliceSpriteTemplate 0x82, 0x3, 0x1 0xfff8 0x0 + createsprite gSlashSliceSpriteTemplate, ANIM_TARGET, 2, 0x1, 0xfff8, 0x0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET delay 0x4 - launchtemplate gSlashSliceSpriteTemplate 0x82, 0x3, 0x1 0x8 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x12 0x1 + createsprite gSlashSliceSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x8, 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x12, 0x1 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET delay 0x7 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x9 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x9 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -11338,36 +11336,36 @@ Move_POWER_TRIP:: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call PowerTripBuffUp delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x2 0x2 0x0 0xb 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call PowerTripBuffUp delay 0x8 call PowerTripBuffUp waitforvisualfinish playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gPowerTripImpactTemplate 0x2 0x4 0xFFF5 0xA 0x1 0x2 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gPowerTripImpactTemplate, ANIM_ATTACKER, 2, 0xFFF5, 0xA, 0x1, 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x5 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gPowerTripImpactTemplate 0x2 0x4 0x0 0xFFF5 0x1 0x2 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gPowerTripImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0xFFF5, 0x1, 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x5 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gPowerTripImpactTemplate 0x2 0x4 0xA 0x0 0x1 0x2 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gPowerTripImpactTemplate, ANIM_ATTACKER, 2, 0xA, 0x0, 0x1, 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end PowerTripBuffUp: - launchtemplate gPowerTripFocusEnergyTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gPowerTripFocusEnergyTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gPowerTripFocusEnergyTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gPowerTripFocusEnergyTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gPowerTripFocusEnergyTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gPowerTripFocusEnergyTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gPowerTripFocusEnergyTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gPowerTripFocusEnergyTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gPowerTripFocusEnergyTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gPowerTripFocusEnergyTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return Move_BURN_UP:: @@ -11376,54 +11374,54 @@ Move_BURN_UP:: loadspritegfx ANIM_TAG_PINK_CLOUD @yawn loadspritegfx ANIM_TAG_SMALL_EMBER @fire monbg ANIM_DEF_PARTNER - setblends 0x120C + setalpha 12, 18 fadetobg BG_FIRE waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xA00 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xA00, 0x0, 0x1, 0xffff waitbgfadein - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x5 0x1c + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x5, 0x1c waitforvisualfinish - launchtask AnimTask_AllocBackupPalBuffer 0x5 0x0 + createvisualtask AnimTask_AllocBackupPalBuffer, 0x5 waitforvisualfinish - launchtask AnimTask_CopyPalUnfadedToBackup 0x5 0x2 0x0 0x1 + createvisualtask AnimTask_CopyPalUnfadedToBackup, 0x5, 0x0, 0x1 delay 0x1 - launchtask AnimTask_CopyPalFadedToUnfaded 0x5 0x1 0x0 + createvisualtask AnimTask_CopyPalFadedToUnfaded, 0x5, 0x0 delay 0x1 loopsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER 0x9 0x2 - launchtask AnimTask_CopyPalUnfadedToBackup 0x5 0x2 0x1 0x0 + createvisualtask AnimTask_CopyPalUnfadedToBackup, 0x5, 0x1, 0x0 delay 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0x0 0xd 0x1c - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x2 0x0 0xf 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0x0, 0xd, 0x1c + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x2, 0x0, 0xf, 0x1 waitforvisualfinish delay 0x1E - launchtemplate gUproarRingSpriteTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 + createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 waitforvisualfinish playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtemplate gBurnUpRedYawnTemplate 0x80, 0x6 0x0 0x0 0x0 0x0 0x1e 0x0 + createsprite gBurnUpRedYawnTemplate, ANIM_TARGET, 0, 0x0, 0x0, 0x0, 0x0, 0x1e, 0x0 delay 0x1 - launchtask AnimTask_CopyPalFadedToUnfaded 0x5 0x1 0x1 + createvisualtask AnimTask_CopyPalFadedToUnfaded, 0x5, 0x1 delay 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0x0 0xd 0x4a52 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x3 0x0 0xf 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0x0, 0xd, 0x4a52 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x3, 0x0, 0xf, 0x1 delay 0xF - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x0 0xC 0x1C + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x0, 0xC, 0x1C delay 0x1 - launchtask AnimTask_CopyPalUnfadedFromBackup 0x5 0x2 0x0 0x1 + createvisualtask AnimTask_CopyPalUnfadedFromBackup, 0x5, 0x0, 0x1 delay 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x5 0x0 0x1c + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x5, 0x0, 0x1c delay 0x1 - launchtask AnimTask_CopyPalUnfadedFromBackup 0x5 0x2 0x1 0x0 + createvisualtask AnimTask_CopyPalUnfadedFromBackup, 0x5, 0x1, 0x0 delay 0x1 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x2 0x0 0xf 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x2, 0x0, 0xf, 0x1 call FireSpreadEffect waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0xd 0x0 0x4a52 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0xd, 0x0, 0x4a52 delay 0x1 - launchtask AnimTask_FreeBackupPalBuffer 0x5 0x0 + createvisualtask AnimTask_FreeBackupPalBuffer, 0x5 delay 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0xC 0x0 0x1C + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0xC, 0x0, 0x1C waitforvisualfinish call UnsetPsychicBg clearmonbg ANIM_DEF_PARTNER @@ -11437,29 +11435,29 @@ Move_SPEED_SWAP:: monbg ANIM_TARGET panse SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, 0xfd, 0x0 delay 0xf - launchtemplate gSpeedSwapCircleTemplate 0x82 0x2 0xfff4 0x18 + createsprite gSpeedSwapCircleTemplate, ANIM_TARGET, 2, 0xfff4, 0x18 delay 0x5 - launchtemplate gSpeedSwapRingTemplate 0x28 0x4 0x0 0x0 0x1 0x0 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0x0 0xFFE0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0x16 0xFFEA 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0x1E 0x0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0x14 0x14 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0x0 0x1C 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0xFFED 0x13 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0xFFE5 0x0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x1 0x0 0xFFEE 0xFFEE 0x10 + createsprite gSpeedSwapRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xFFE0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x16, 0xFFEA, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1E, 0x0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x14, 0x14, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x1C, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFED, 0x13, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFE5, 0x0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xFFEE, 0xFFEE, 0x10 waitforvisualfinish panse SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, 0xfd, 0x0 - launchtemplate gSpeedSwapOrbMissileTemplate 0x80 0x6 0x0 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gSpeedSwapRingTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0x0 0xFFE0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0x16 0xFFEA 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0x1E 0x0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0x14 0x14 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0x0 0x1C 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0xFFED 0x13 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0xFFE5 0x0 0x10 - launchtemplate gSpeedSwapOrbTemplate 0x82 0x5 0x0 0x0 0xFFEE 0xFFEE 0x10 + createsprite gSpeedSwapOrbMissileTemplate, ANIM_TARGET, 0, 0x0, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gSpeedSwapRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0, 0xFFE0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x16, 0xFFEA, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1E, 0x0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x14, 0x14, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0, 0x1C, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFED, 0x13, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFE5, 0x0, 0x10 + createsprite gSpeedSwapOrbTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFEE, 0xFFEE, 0x10 waitforvisualfinish clearmonbg ANIM_TARGET end @@ -11470,11 +11468,11 @@ Move_SMART_STRIKE:: loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_FLASH_CANNON_BALL @ball loadspritegfx ANIM_TAG_LOCK_ON - launchtemplate gLockOnTargetSpriteTemplate 0x28 0x0 - launchtemplate gLockOnMoveTargetSpriteTemplate 0x28 0x1 0x1 - launchtemplate gLockOnMoveTargetSpriteTemplate 0x28 0x1 0x2 - launchtemplate gLockOnMoveTargetSpriteTemplate 0x28 0x1 0x3 - launchtemplate gLockOnMoveTargetSpriteTemplate 0x28 0x1 0x4 + createsprite gLockOnTargetSpriteTemplate, ANIM_ATTACKER, 40 + createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 0x1 + createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 0x2 + createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 0x3 + createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 0x4 delay 0x78 setarg 0x7 0xffff waitforvisualfinish @@ -11482,18 +11480,18 @@ Move_SMART_STRIKE:: splitbgprio ANIM_TARGET setalpha 12, 8 call SonicBoomProjectile - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0xa 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0xa, 0x1 loadspritegfx ANIM_TAG_FLASH_CANNON_BALL - launchtemplate gSmartStrikeImpactTemplate 0x84 0x5 0x0 0x0 0x8 0x1 0x0 + createsprite gSmartStrikeImpactTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x8, 0x1, 0x0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0x0 0xffe8 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0x11 0xffef 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0x18 0x0 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0x11 0x11 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0x0 0x18 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0xffef 0x11 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0xffe8 0x0 0xa - launchtemplate gSmartStrikeGemTemplate 0x82 0x5 0x1 0x1 0xffef 0xffef 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0xffe8, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x11, 0xffef, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x18, 0x0, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x11, 0x11, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0x18, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xffef, 0x11, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xffe8, 0x0, 0xa + createsprite gSmartStrikeGemTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xffef, 0xffef, 0xa waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -11511,21 +11509,21 @@ Move_PURIFY:: splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER - launchtemplate gPurifyWhiteBallTemplate 0x2 0x6 0x14 0xfff8 0xfff8 0xfff8 0x14 0xffe0 + createsprite gPurifyWhiteBallTemplate, ANIM_ATTACKER, 2, 0x14, 0xfff8, 0xfff8, 0xfff8, 0x14, 0xffe0 delay 0x13 playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xfff4 0x68 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xfff4 0x48 0x1 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xfffa 0x38 0x1 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xfffa 0x58 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x0 0x38 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x0 0x58 0x1 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x6 0x48 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x6 0x68 0x1 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xc 0x48 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0xc 0x38 0x1 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x12 0x50 0x0 0x4b - launchtemplate gPurifySmokeTemplate 0x84 0x5 0x0 0x12 0x48 0x1 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x68, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfff4, 0x48, 0x1, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x38, 0x1, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xfffa, 0x58, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x38, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x58, 0x1, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x48, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x6, 0x68, 0x1, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x48, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0xc, 0x38, 0x1, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x50, 0x0, 0x4b + createsprite gPurifySmokeTemplate, ANIM_TARGET, 4, 0x0, 0x12, 0x48, 0x1, 0x4b waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -11538,50 +11536,50 @@ Move_REVELATION_DANCE:: loadspritegfx ANIM_TAG_AIR_WAVE @sonicboom loadspritegfx ANIM_TAG_THIN_RING @ring monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xF 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xF, 0x0 waitforvisualfinish playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gRevelationDanceYellowOrbsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0x10 0xffe8 0x8 0x64 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0xfff0 0xffe8 0x8 0x64 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gRevelationDanceYellowOrbsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0x10, 0xffe8, 0x8, 0x64 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xffe8, 0x8, 0x64 delay 0xf - launchtemplate gRevelationDanceYellowOrbsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0x20 0xffe8 0x8 0x64 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0xffe0 0xffe8 0x8 0x64 + createsprite gRevelationDanceYellowOrbsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0x20, 0xffe8, 0x8, 0x64 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe8, 0x8, 0x64 delay 0xf - launchtemplate gRevelationDanceYellowOrbsTemplate 0x2 0x4 0x0 0xffe8 0x8 0x8c - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0x18 0xffe8 0x8 0x64 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0xffe8 0xffe8 0x8 0x64 + createsprite gRevelationDanceYellowOrbsTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x8, 0x8c + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0x18, 0xffe8, 0x8, 0x64 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0xffe8, 0xffe8, 0x8, 0x64 delay 0x1e - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0x10 0xffe8 0x0 0x64 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0xfff0 0xffe8 0x0 0x64 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0x10, 0xffe8, 0x0, 0x64 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xffe8, 0x0, 0x64 delay 0x1e - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0x14 0xfff0 0xe 0x50 - launchtemplate gRevelationDanceYellowFlowerTemplate 0x2 0x4 0xffec 0xfff2 0x10 0x50 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0x14, 0xfff0, 0xe, 0x50 + createsprite gRevelationDanceYellowFlowerTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff2, 0x10, 0x50 waitforvisualfinish unloadspritegfx ANIM_TAG_FLOWER @particles loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_SMALL_EMBER @light yellow playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER - launchtemplate gRevelationDanceYellowAirWaveTemplate 0x82 0x5 0x10 0x0 0x0 0x0 0xf + createsprite gRevelationDanceYellowAirWaveTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0xf waitforvisualfinish playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtemplate gRevelationDanceYellowImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x2 - launchtemplate gRevelationDanceYellowRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0x0 0xb0 0x28 + createsprite gRevelationDanceYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 + createsprite gRevelationDanceYellowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xb0, 0x28 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_ATTACKER - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0xff40 0xf0 0x28 - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0x0 0xff60 0x28 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff40, 0xf0, 0x28 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xff60, 0x28 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_ATTACKER - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0xff40 0xff90 0x28 - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0xa0 0x30 0x28 - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0xff20 0xffe0 0x28 - launchtemplate gRevelationDanceYellowDispersalTemplate 0x81 0x5 0x0 0xa 0x70 0xff80 0x28 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff40, 0xff90, 0x28 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xa0, 0x30, 0x28 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0xff20, 0xffe0, 0x28 + createsprite gRevelationDanceYellowDispersalTemplate, ANIM_TARGET, 1, 0x0, 0xa, 0x70, 0xff80, 0x28 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xF 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xF, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET end @@ -11597,109 +11595,109 @@ Move_CORE_ENFORCER:: setalpha 12, 8 fadetobg BG_COSMIC waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xFC00 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xFC00, 0x1, 0xffff waitbgfadein loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER 0xd 0xA - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gCoreEnforcerBlueRingTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gCoreEnforcerBlueRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 waitforvisualfinish - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 waitforvisualfinish - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gCoreEnforcerYellowRingTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gCoreEnforcerYellowRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 waitforvisualfinish - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 waitforvisualfinish - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gCoreEnforcerGreenRingTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gCoreEnforcerGreenRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 waitforvisualfinish - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerBlueSparkTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gCoreEnforcerGreenChargeTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gCoreEnforcerBlueSparkTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gCoreEnforcerGreenChargeTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gCoreEnforcerCircleChargeTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gCoreEnforcerCircleChargeTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 waitforvisualfinish unloadspritegfx ANIM_TAG_SPARK_2 @yellow color unloadspritegfx ANIM_TAG_LEAF @green color @@ -11717,87 +11715,87 @@ Move_CORE_ENFORCER:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SNORE_Z, 0, 0xA, 0xA, 0x0688 @Green delay 0x10 monbg ANIM_TARGET - launchtask AnimTask_CreateSmallSolarBeamOrbs 0x5 0x0 + createvisualtask AnimTask_CreateSmallSolarBeamOrbs, 0x5 panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtask AnimTask_ShakeMon2 0x5 0x5 ANIM_TARGET 0x2 0x0 0x41 0x1 - launchtask AnimTask_ShakeMon2 0x5 0x5 ANIM_DEF_PARTNER 0x2 0x0 0x41 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x0 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfff5 0xffe2 0x1 0x3 + createvisualtask AnimTask_ShakeMon2, 0x5, ANIM_TARGET, 0x2, 0x0, 0x41, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x5, ANIM_DEF_PARTNER, 0x2, 0x0, 0x41, 0x1 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x0 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfff5, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfffa 0xffe2 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfffa, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xffff 0xffe2 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xffff, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x5 0xffe2 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x5, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xA 0xffe2 0x1 0x3 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x1 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xA, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xF 0xffe2 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xF, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x14 0xffe2 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x14, 0xffe2, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xF 0xffe7 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xF, 0xffe7, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x2 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xC 0xffea 0x1 0x3 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x2 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xC, 0xffea, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x9 0xffed 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x9, 0xffed, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x6 0xfff0 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x6, 0xfff0, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x3 0xfff3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x3, 0xfff3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x3 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x0 0xfff6 0x1 0x3 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x0, 0xfff6, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfffc 0xfff9 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfffc, 0xfff9, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfff9 0xfffc 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfff9, 0xfffc, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfff6 0xffff 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfff6, 0xffff, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x4 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfff3 0x3 0x1 0x3 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x4 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfff3, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfff8 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfff8, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xfffd 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xfffd, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x2 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x2, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x5 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x7 0x3 0x1 0x3 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x5 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x7, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0xC 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0xC, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x11 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x11, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerImpactTemplate 0x83 0x4 0x16 0x3 0x1 0x3 + createsprite gCoreEnforcerImpactTemplate, ANIM_TARGET, 3, 0x16, 0x3, 0x1, 0x3 delay 0x1 - launchtemplate gCoreEnforcerBeamTemplate 0x83 0x4 0xf 0x0 0x14 0x6 + createsprite gCoreEnforcerBeamTemplate, ANIM_TARGET, 3, 0xf, 0x0, 0x14, 0x6 delay 0x7 - launchtemplate gCoreEnforcerSnoreTemplate 0x2 0x2 0x0 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x2 0x0 0x1e 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_DEF_PARTNER 0x2 0x0 0x1e 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_ATK_PARTNER 0x2 0x0 0x1e 0x1 + createsprite gCoreEnforcerSnoreTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x2, 0x0, 0x1e, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_DEF_PARTNER, 0x2, 0x0, 0x1e, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_ATK_PARTNER, 0x2, 0x0, 0x1e, 0x1 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gCoreEnforcerExplosionTemplate 0x3 0x4 0xffe8 0x18 ANIM_TARGET 0x1 + createsprite gCoreEnforcerExplosionTemplate, ANIM_ATTACKER, 3, 0xffe8, 0x18, ANIM_TARGET, 0x1 waitforvisualfinish call UnsetPsychicBg clearmonbg ANIM_TARGET @@ -11809,18 +11807,18 @@ Move_TROP_KICK:: loadspritegfx ANIM_TAG_LEAF @leaves loadspritegfx ANIM_TAG_FLOWER @flowers monbg ANIM_DEF_PARTNER - launchtemplate gTropKickGreenFootTemplate 0x2 0x8 0xfff0 0x8 0x0 0x0 0xa 0x1 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x4 0x0 0x6 0x1 + createsprite gTropKickGreenFootTemplate, ANIM_ATTACKER, 2, 0xfff0, 0x8, 0x0, 0x0, 0xa, 0x1, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x4, 0x0, 0x6, 0x1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET delay 0xA playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER - launchtemplate gTropKickLeavesTemplate, ANIM_TARGET, 5, 0, 10, 192, 176, 40 - launchtemplate gTropKickLeavesTemplate, ANIM_TARGET, 5, 0, 10, -192, 240, 40 - launchtemplate gTropKickFlowerTemplate, ANIM_TARGET, 5, 0, 10, 192, -160, 40 - launchtemplate gTropKickFlowerTemplate, ANIM_TARGET, 5, 0, 10, -192, -112, 40 - launchtemplate gTropKickFlowerTemplate, ANIM_TARGET, 5, 0, 10, 160, 48, 40 - launchtemplate gTropKickLeavesTemplate, ANIM_TARGET, 5, 0, 10, -224, -32, 40 - launchtemplate gTropKickLeavesTemplate, ANIM_TARGET, 5, 0, 10, 112, -128, 40 + createsprite gTropKickLeavesTemplate, ANIM_TARGET, 1, 0, 10, 192, 176, 40 + createsprite gTropKickLeavesTemplate, ANIM_TARGET, 1, 0, 10, -192, 240, 40 + createsprite gTropKickFlowerTemplate, ANIM_TARGET, 1, 0, 10, 192, -160, 40 + createsprite gTropKickFlowerTemplate, ANIM_TARGET, 1, 0, 10, -192, -112, 40 + createsprite gTropKickFlowerTemplate, ANIM_TARGET, 1, 0, 10, 160, 48, 40 + createsprite gTropKickLeavesTemplate, ANIM_TARGET, 1, 0, 10, -224, -32, 40 + createsprite gTropKickLeavesTemplate, ANIM_TARGET, 1, 0, 10, 112, -128, 40 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -11829,27 +11827,27 @@ Move_INSTRUCT:: loadspritegfx ANIM_TAG_FINGER @finger loadspritegfx ANIM_TAG_SPOTLIGHT @spotlight setalpha 12, 8 - launchtemplate gMetronomeFingerSpriteTemplate 0xc 0x1 0x0 + createsprite gMetronomeFingerSpriteTemplate, ANIM_ATTACKER, 12, 0x0 delay 0x18 loopsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER, 0x16, 0x3 waitforvisualfinish - launchtask AnimTask_HardwarePaletteFade 0x2 0x5 0xf8 0x3 0x0 0xa 0x0 + createvisualtask AnimTask_HardwarePaletteFade, 0x2, 0xf8, 0x3, 0x0, 0xa, 0x0 waitforvisualfinish - launchtemplate gSpotlightSpriteTemplate 0x82 0x2 0x0 0xfff8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x8 0x7DB9 + createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x8, 0x7DB9 delay 0x4 monbg ANIM_TARGET - launchtask AnimTask_BlendMonInAndOut 0x5 0x5 0x0 0x37b 0xc 0x1 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x29 0x1 + createvisualtask AnimTask_BlendMonInAndOut, 0x5, 0x0, 0x37b, 0xc, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x29, 0x1 playsewithpan SE_M_BIND, SOUND_PAN_TARGET delay 0x1A - launchtask AnimTask_BlendMonInAndOut 0x5 0x5 0x0 0x37b 0xc 0x1 0x1 + createvisualtask AnimTask_BlendMonInAndOut, 0x5, 0x0, 0x37b, 0xc, 0x1, 0x1 playsewithpan SE_M_BIND, SOUND_PAN_TARGET delay 0x1A - launchtask AnimTask_BlendMonInAndOut 0x5 0x5 0x0 0x37b 0xc 0x1 0x1 + createvisualtask AnimTask_BlendMonInAndOut, 0x5, 0x0, 0x37b, 0xc, 0x1, 0x1 playsewithpan SE_M_BIND, SOUND_PAN_TARGET delay 0x1D - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x8 0x0 0x7DB9 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x8, 0x0, 0x7DB9 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -11859,29 +11857,29 @@ General_BeakBlastSetUp: loadspritegfx ANIM_TAG_SMALL_EMBER @Fire playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER delay 0x3 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x2 0x2 0x0 0xb 0x1f - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x1f + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 waitforvisualfinish end Move_BEAK_BLAST:: loadspritegfx ANIM_TAG_IMPACT - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x0, 0x9, 0x1F waitforvisualfinish - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x0 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x0 playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x2 - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x1 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x1 delay 0x2 loopsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET 0x4 0x8 - launchtask AnimTask_DrillPeckHitSplats 0x5 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x12 0x1 + createvisualtask AnimTask_DrillPeckHitSplats, 0x5 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x12, 0x1 waitforvisualfinish - launchtemplate gBowMonSpriteTemplate 0x2 0x1 0x2 + createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0x2 waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x6 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x9 0x0 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_ATTACKER, 0x2, 0x9, 0x0, 0x1F waitforvisualfinish end @@ -11890,27 +11888,27 @@ Move_CLANGING_SCALES:: loadspritegfx ANIM_TAG_POISON_BUBBLE @purple color monbg ANIM_DEF_PARTNER splitbgprio_foes ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x2002 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x2002 createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_METAL_SOUND_WAVES, 0, 10, 10, 0x642D waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x2 0x0 0x8 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x2, 0x0, 0x8, 0x1 call ClangingScalesMetalSound call ClangingScalesMetalSound call ClangingScalesMetalSound call ClangingScalesMetalSound delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x0 0x3 0xf 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x0, 0x3, 0xf, 0x1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x2002 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x2002 waitforvisualfinish end ClangingScalesMetalSound: panse SE_M_SCREECH, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtemplate gClangingScalesPurpleMetalSoundTemplate 0x82 0x7 0x10 0x0 0x0 0x0 0x1e 0x0 ANIM_TARGET - launchtemplate gClangingScalesPurpleMetalSoundTemplate 0x82 0x7 0x10 0x0 0x0 0x0 0x1e 0x0 ANIM_DEF_PARTNER + createsprite gClangingScalesPurpleMetalSoundTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0x1e, 0x0, ANIM_TARGET + createsprite gClangingScalesPurpleMetalSoundTemplate, ANIM_TARGET, 2, 0x10, 0x0, 0x0, 0x0, 0x1e, 0x0, ANIM_DEF_PARTNER delay 0x2 return @@ -11920,15 +11918,15 @@ Move_DRAGON_HAMMER:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ROUND_SHADOW, 0, 12, 12, 0x7D7F @Pinkish purple fadetobg BG_COSMIC waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0, -500, 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, -500, 0x0, 0xffff waitbgfadein - setblends 0xF - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x1a 0x0 0x0 0x5 + setalpha 15, 0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x1a, 0x0, 0x0, 0x5 delay 0x6 playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - launchtemplate gBounceBallLandSpriteTemplate 0x83 0x0 + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 delay 0x2 - launchtask AnimTask_SquishTarget 0x2 0x0 + createvisualtask AnimTask_SquishTarget, 0x2 delay 0x5 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, 8, 8, 1, 0 @@ -11947,7 +11945,7 @@ Move_DRAGON_HAMMER:: delay 2 createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 0 delay 51 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish call UnsetPsychicBg blendoff @@ -11961,27 +11959,27 @@ Move_BRUTAL_SWING:: fadetobg BG_DARK waitbgfadeout playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtemplate gVerticalDipSpriteTemplate 0x2 0x3 0x6 0x1 0x0 + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 0x6, 0x1, 0x0 waitforvisualfinish delay 0xb - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x1a 0x0 0x0 0x5 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x1a, 0x0, 0x0, 0x5 delay 0x6 - launchtemplate gBrutalSwingBasicImpactTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x1 + createsprite gBrutalSwingBasicImpactTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x1 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x15 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x0 0x3 0x15 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATK_PARTNER 0x0 0x3 0x15 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x15, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x0, 0x3, 0x15, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATK_PARTNER, 0x0, 0x3, 0x15, 0x1 delay 0x4 - launchtemplate gBrutalSwingRandomImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gBrutalSwingRandomImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBrutalSwingRandomImpactTemplate 0x83 0x2 0x1 0x1 + createsprite gBrutalSwingRandomImpactTemplate, ANIM_TARGET, 3, 0x1, 0x1 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBrutalSwingBasicImpactTemplate 0x83 0x4 0x20 0x14 0x1 0x1 + createsprite gBrutalSwingBasicImpactTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x1 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitsound - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x6 waitforvisualfinish restorebg blendoff @@ -11992,19 +11990,19 @@ Move_AURORA_VEIL:: loadspritegfx ANIM_TAG_GUARD_RING fadetobg BG_AURORA waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x400 0x0 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x400, 0x0, 0x0, 0xffff waitbgfadein monbg ANIM_ATK_PARTNER setalpha 8, 8 playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER - launchtemplate gAuroraVeilRingTemplate 0x2 0x0 + createsprite gAuroraVeilRingTemplate, ANIM_ATTACKER, 2 delay 0x4 - launchtemplate gAuroraVeilRingTemplate 0x2 0x0 + createsprite gAuroraVeilRingTemplate, ANIM_ATTACKER, 2 delay 0x4 - launchtemplate gAuroraVeilRingTemplate 0x2 0x0 + createsprite gAuroraVeilRingTemplate, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle 0x2 0x6 0xa 0x0 0x2 0x0 0xa 0x7fff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0xa, 0x0, 0x2, 0x0, 0xa, 0x7fff waitforvisualfinish call UnsetPsychicBg waitforvisualfinish @@ -12021,10 +12019,10 @@ General_ShellTrapSetUp: delay 0x4 playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_TARGET delay 0x15 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0xA 0x1 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xA 0x0 0x1 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xA 0xA 0x1 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xA, 0x1, 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xA, 0x0, 0x1, 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xA, 0xA, 0x1, 0x2 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -12212,15 +12210,15 @@ Move_FLEUR_CANNON:: loadspritegfx ANIM_TAG_PINK_HEART @pink color setalpha 12, 8 monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xF 0x7440 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xF, 0x7440 waitforvisualfinish panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x0, 0x4, 0x32, 0x1 createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB_RED, 16, 0, 0 call FleurCannonBeam call FleurCannonBeam call FleurCannonBeam - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x32 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x32, 0x1 call FleurCannonBeam call FleurCannonBeam call FleurCannonBeam @@ -12240,23 +12238,23 @@ Move_FLEUR_CANNON:: call FleurCannonBeam call FleurCannonBeam delay 0x20 - launchtemplate gFleurCannonDischargeTemplate 0x2 0x3 0x1 0x10 0x10 + createsprite gFleurCannonDischargeTemplate, ANIM_ATTACKER, 2, 0x1, 0x10, 0x10 delay 0x2 - launchtemplate gFleurCannonDischargeTemplate 0x2 0x3 0x1 0xfff0 0xfff0 + createsprite gFleurCannonDischargeTemplate, ANIM_ATTACKER, 2, 0x1, 0xfff0, 0xfff0 delay 0x5 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x5 0xb 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x5, 0xb, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x7440 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x7440 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end FleurCannonBeam: - launchtemplate gFleurCannonOrbTemplate 0x82 0x0 - launchtemplate gFleurCannonOrbTemplate 0x82 0x0 + createsprite gFleurCannonOrbTemplate, ANIM_TARGET, 2 + createsprite gFleurCannonOrbTemplate, ANIM_TARGET, 2 delay 0x1 - launchtemplate gFleurCannonOrbTemplate 0x82 0x0 - launchtemplate gFleurCannonOrbTemplate 0x82 0x0 + createsprite gFleurCannonOrbTemplate, ANIM_TARGET, 2 + createsprite gFleurCannonOrbTemplate, ANIM_TARGET, 2 delay 0x1 return @@ -12271,18 +12269,18 @@ Move_PSYCHIC_FANGS:: choosetwoturnanim PsychicFangsRegular PsychicFangsDestroyWall PsychicFangsRegular: playsewithpan SE_M_BITE, SOUND_PAN_TARGET - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0xffe0 0xffe0 0x1 0x333 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0x20 0x20 0x5 0xfccd 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe0, 0x1, 0x333, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0x20, 0x5, 0xfccd, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x7 0x5 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x7, 0x5, 0x2 delay 0x10 playsewithpan SE_M_BITE, SOUND_PAN_TARGET - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0x20 0xffe0 0x7 0xfccd 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0xffe0 0x20 0x3 0x333 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xffe0, 0x7, 0xfccd, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x20, 0x3, 0x333, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x8 0x4 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x8, 0x4, 0x2 PsychicFangsEnd: playsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET waitforvisualfinish @@ -12291,25 +12289,25 @@ PsychicFangsEnd: call UnsetPsychicBg end PsychicFangsDestroyWall: - launchtemplate gBrickBreakWallSpriteTemplate 0x3 0x5 0x1 0x0 0x0 0x21 0xa + createsprite gBrickBreakWallSpriteTemplate, ANIM_ATTACKER, 3, 0x1, 0x0, 0x0, 0x21, 0xa playsewithpan SE_M_BITE, SOUND_PAN_TARGET - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0xffe0 0xffe0 0x1 0x333 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0x20 0x20 0x5 0xfccd 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe0, 0x1, 0x333, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0x20, 0x5, 0xfccd, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x7 0x5 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x7, 0x5, 0x2 delay 0x10 playsewithpan SE_M_BITE, SOUND_PAN_TARGET - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0x20 0xffe0 0x7 0xfccd 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 0x2 0x6 0xffe0 0x20 0x3 0x333 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xffe0, 0x7, 0xfccd, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x20, 0x3, 0x333, 0xfccd, 0xa delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x8 0x0 0x1 0x1 - launchtemplate gBrickBreakWallShardSpriteTemplate 0x2 0x4 0x1 0x0 0xfff8 0xfff4 - launchtemplate gBrickBreakWallShardSpriteTemplate 0x2 0x4 0x1 0x1 0x8 0xfff4 - launchtemplate gBrickBreakWallShardSpriteTemplate 0x2 0x4 0x1 0x2 0xfff8 0xc - launchtemplate gBrickBreakWallShardSpriteTemplate 0x2 0x4 0x1 0x3 0x8 0xc + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x8, 0x0, 0x1, 0x1 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0xfff8, 0xfff4 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1, 0x8, 0xfff4 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2, 0xfff8, 0xc + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x3, 0x8, 0xc playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x8 0x4 0x2 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x8, 0x4, 0x2 delay 0x10 goto PsychicFangsEnd @@ -12319,35 +12317,35 @@ Move_STOMPING_TANTRUM:: loadspritegfx ANIM_TAG_IMPACT @pound hit loadspritegfx ANIM_TAG_SMALL_EMBER @hit color monbg ANIM_TARGET - launchtask AnimTask_Splash 0x2 0x2 ANIM_ATTACKER 0x3 + createvisualtask AnimTask_Splash, 0x2, ANIM_ATTACKER, 0x3 delay 0x5 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0xa 0x5 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0xa 0x5 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x0 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x1 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x2 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x3 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0xa, 0x5 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0xa, 0x5 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x1 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x2 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x3 call StompingTantrumImpact playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x25 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x0 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x1 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x2 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x3 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x1 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x2 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x3 call StompingTantrumImpact playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x25 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x0 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x1 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x2 - launchtemplate gStompingTantrumRockTemplate 0x2 0x2 0x0 0x3 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x1 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x2 + createsprite gStompingTantrumRockTemplate, ANIM_ATTACKER, 2, 0x0, 0x3 call StompingTantrumImpact playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET end StompingTantrumImpact: - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x1 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x1 return Move_SHADOW_BONE:: @@ -12359,15 +12357,15 @@ Move_SHADOW_BONE:: splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_BONEMERANG, SOUND_PAN_TARGET - launchtemplate gSpinningBoneSpriteTemplate 0x2 0x5 0xffd6 0xffe7 0x0 0x0 0xf + createsprite gSpinningBoneSpriteTemplate, ANIM_ATTACKER, 2, 0xffd6, 0xffe7, 0x0, 0x0, 0xf delay 0xc - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x5 0x5 0x1 - launchtemplate gComplexPaletteBlendSpriteTemplate 0x2 0x7 0x7 0x5 0x1 0x0 0xa 0x0 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x5, 0x5, 0x1 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x7, 0x5, 0x1, 0x0, 0xa, 0x0, 0x0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish - launchtask AnimTask_NightmareClone 0x2 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0x28 0x1 + createvisualtask AnimTask_NightmareClone, 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0x28, 0x1 playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET waitforvisualfinish restorebg @@ -12381,18 +12379,18 @@ Move_ACCELEROCK:: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_ATK_PARTNER setalpha 12, 8 - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x18 0x6 0x1 0x5 - launchtask AnimTask_TraceMonBlended 0x2 0x4 0x0 0x4 0x7 0x3 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x18, 0x6, 0x1, 0x5 + createvisualtask AnimTask_TraceMonBlended, 0x2, 0x0, 0x4, 0x7, 0x3 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER delay 0x4 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x5 0x0 0x6 0x1 - launchtemplate gBasicHitSplatSpriteTemplate 0x84, 0x4, 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x5, 0x0, 0x6, 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x5 0x1 0x3 0x0 0x5 0x1 - launchtemplate gRockFragmentSpriteTemplate 0x82 0x6 0x5 0x0 0xffec 0x18 0xe 0x1 - launchtemplate gRockFragmentSpriteTemplate 0x82 0x6 0x0 0x5 0x14 0xffe8 0xe 0x2 - launchtemplate gRockFragmentSpriteTemplate 0x82 0x6 0xfffb 0x0 0xffec 0xffe8 0xe 0x2 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x5 0x1 0x3 0x0 0x5 0x1 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x3, 0x0, 0x5, 0x1 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0xffec, 0x18, 0xe, 0x1 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x5, 0x14, 0xffe8, 0xe, 0x2 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xffec, 0xffe8, 0xe, 0x2 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x3, 0x0, 0x5, 0x1 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -12406,10 +12404,10 @@ Move_LIQUIDATION:: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 delay 0x6 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0x6 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0x6, 0x1 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET waitforvisualfinish call RisingWaterHitEffect @@ -12429,10 +12427,10 @@ Move_PRISMATIC_LASER:: loadspritegfx ANIM_TAG_GREEN_SPIKE @needle arm animation loadspritegfx ANIM_TAG_NEEDLE @sting monbg ANIM_ATTACKER - setblends 0x80E - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + setalpha 14, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 playsewithpan SE_ELEVATOR, SOUND_PAN_ATTACKER - launchtemplate gPrismaticLaserChargeTemplate 0x2 0x1 0x0 + createsprite gPrismaticLaserChargeTemplate, ANIM_ATTACKER, 2, 0x0 call PrismaticLaserInwardSpikes playsewithpan SE_ELEVATOR, SOUND_PAN_ATTACKER call PrismaticLaserInwardSpikes @@ -12457,87 +12455,87 @@ Move_PRISMATIC_LASER:: unloadspritegfx ANIM_TAG_ICE_CHUNK unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT delay 0x1E - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0xa 0x32 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0xa 0x32 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0xa, 0x32 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0xa, 0x32 playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER call PrismaticLaserRain call PrismaticLaserRain call PrismaticLaserRain call PrismaticLaserRain waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff end PrismaticLaserOutwardSpikes: - launchtemplate gPrismaticLaserRedOutwardTemplate 0x82 0x5 0x0 0x1 0x0 0xFF90 0x10 @up - launchtemplate gPrismaticLaserGreenOutwardTemplate 0x82 0x5 0x0 0x1 0x5F 0xFF9D 0x10 @upper right - launchtemplate gPrismaticLaserYellowOutwardTemplate 0x82 0x5 0x0 0x1 0x73 0x0 0x10 @right - launchtemplate gPrismaticLaserVioletOutwardTemplate 0x82 0x5 0x0 0x1 0x4F 0x37 0x10 @lower right - launchtemplate gPrismaticLaserRedOutwardTemplate 0x82 0x5 0x0 0x1 0x0 0x53 0x10 @down - launchtemplate gPrismaticLaserGreenOutwardTemplate 0x82 0x5 0x0 0x1 0xFFB0 0x43 0x10 @lower left - launchtemplate gPrismaticLaserYellowOutwardTemplate 0x82 0x5 0x0 0x1 0xFF60 0x0 0x10 @left - launchtemplate gPrismaticLaserVioletOutwardTemplate 0x82 0x5 0x0 0x1 0xFFAA 0xFF94 0x10 @upper left + createsprite gPrismaticLaserRedOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x0, 0xFF90, 0x10 @up + createsprite gPrismaticLaserGreenOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x5F, 0xFF9D, 0x10 @upper right + createsprite gPrismaticLaserYellowOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x73, 0x0, 0x10 @right + createsprite gPrismaticLaserVioletOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x4F, 0x37, 0x10 @lower right + createsprite gPrismaticLaserRedOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x0, 0x53, 0x10 @down + createsprite gPrismaticLaserGreenOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFB0, 0x43, 0x10 @lower left + createsprite gPrismaticLaserYellowOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFF60, 0x0, 0x10 @left + createsprite gPrismaticLaserVioletOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFAA, 0xFF94, 0x10 @upper left playsewithpan SE_M_MIST, SOUND_PAN_ATTACKER return PrismaticLaserOutwardSpikes2: - launchtemplate gPrismaticLaserVioletOutwardTemplate 0x82 0x5 0x0 0x1 0xFFE0 0x43 0x10 @between lower left and down - launchtemplate gPrismaticLaserYellowOutwardTemplate 0x82 0x5 0x0 0x1 0x1F 0x37 0x10 @between lower right and down - launchtemplate gPrismaticLaserYellowOutwardTemplate 0x82 0x5 0x0 0x1 0xFFDA 0xFF94 0x10 @between up and upper left - launchtemplate gPrismaticLaserRedOutwardTemplate 0x82 0x5 0x0 0x1 0xFF60 0x43 0x10 @between left and lower left - launchtemplate gPrismaticLaserGreenOutwardTemplate 0x82 0x5 0x0 0x1 0xFF2A 0xFFAA 0x10 @between left and upper left - launchtemplate gPrismaticLaserVioletOutwardTemplate 0x82 0x5 0x0 0x1 0x2D 0xFF9D 0x10 @between up and upper right - launchtemplate gPrismaticLaserRedOutwardTemplate 0x82 0x5 0x0 0x1 0xDF 0xFF9D 0x10 @between right and upper right - launchtemplate gPrismaticLaserGreenOutwardTemplate 0x82 0x5 0x0 0x1 0x9F 0x37 0x10 @between right and lower right + createsprite gPrismaticLaserVioletOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFE0, 0x43, 0x10 @between lower left and down + createsprite gPrismaticLaserYellowOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x1F, 0x37, 0x10 @between lower right and down + createsprite gPrismaticLaserYellowOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFFDA, 0xFF94, 0x10 @between up and upper left + createsprite gPrismaticLaserRedOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFF60, 0x43, 0x10 @between left and lower left + createsprite gPrismaticLaserGreenOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xFF2A, 0xFFAA, 0x10 @between left and upper left + createsprite gPrismaticLaserVioletOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x2D, 0xFF9D, 0x10 @between up and upper right + createsprite gPrismaticLaserRedOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0xDF, 0xFF9D, 0x10 @between right and upper right + createsprite gPrismaticLaserGreenOutwardTemplate, ANIM_TARGET, 2, 0x0, 0x1, 0x9F, 0x37, 0x10 @between right and lower right playsewithpan SE_M_MIST, SOUND_PAN_ATTACKER return PrismaticLaserInwardSpikes: - launchtemplate gPrismaticLaserRedInwardTemplate 0x82 0x5 0x0 0x0 0x0 0xFF90 0x10 @up - launchtemplate gPrismaticLaserVioletInwardTemplate 0x82 0x5 0x0 0x0 0xFFE0 0x43 0x10 @between lower left and down + createsprite gPrismaticLaserRedInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0, 0xFF90, 0x10 @up + createsprite gPrismaticLaserVioletInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFE0, 0x43, 0x10 @between lower left and down delay 0x1 - launchtemplate gPrismaticLaserGreenInwardTemplate 0x82 0x5 0x0 0x0 0x5F 0xFF9D 0x10 @upper right - launchtemplate gPrismaticLaserYellowInwardTemplate 0x82 0x5 0x0 0x0 0x1F 0x37 0x10 @between lower right and down - launchtemplate gPrismaticLaserYellowInwardTemplate 0x82 0x5 0x0 0x0 0xFFDA 0xFF94 0x10 @between up and upper left + createsprite gPrismaticLaserGreenInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x5F, 0xFF9D, 0x10 @upper right + createsprite gPrismaticLaserYellowInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1F, 0x37, 0x10 @between lower right and down + createsprite gPrismaticLaserYellowInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFDA, 0xFF94, 0x10 @between up and upper left delay 0x1 - launchtemplate gPrismaticLaserYellowInwardTemplate 0x82 0x5 0x0 0x0 0x73 0x0 0x10 @right - launchtemplate gPrismaticLaserRedInwardTemplate 0x82 0x5 0x0 0x0 0xFF60 0x43 0x10 @between left and lower left + createsprite gPrismaticLaserYellowInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x73, 0x0, 0x10 @right + createsprite gPrismaticLaserRedInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFF60, 0x43, 0x10 @between left and lower left delay 0x1 - launchtemplate gPrismaticLaserVioletInwardTemplate 0x82 0x5 0x0 0x0 0x4F 0x37 0x10 @lower right - launchtemplate gPrismaticLaserGreenInwardTemplate 0x82 0x5 0x0 0x0 0xFF2A 0xFFAA 0x10 @between left and upper left + createsprite gPrismaticLaserVioletInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x4F, 0x37, 0x10 @lower right + createsprite gPrismaticLaserGreenInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFF2A, 0xFFAA, 0x10 @between left and upper left delay 0x1 - launchtemplate gPrismaticLaserRedInwardTemplate 0x82 0x5 0x0 0x0 0x0 0x53 0x10 @down - launchtemplate gPrismaticLaserVioletInwardTemplate 0x82 0x5 0x0 0x0 0x2D 0xFF9D 0x10 @between up and upper right + createsprite gPrismaticLaserRedInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0, 0x53, 0x10 @down + createsprite gPrismaticLaserVioletInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x2D, 0xFF9D, 0x10 @between up and upper right delay 0x1 - launchtemplate gPrismaticLaserGreenInwardTemplate 0x82 0x5 0x0 0x0 0xFFB0 0x43 0x10 @lower left - launchtemplate gPrismaticLaserRedInwardTemplate 0x82 0x5 0x0 0x0 0xDF 0xFF9D 0x10 @between right and upper right + createsprite gPrismaticLaserGreenInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFB0, 0x43, 0x10 @lower left + createsprite gPrismaticLaserRedInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xDF, 0xFF9D, 0x10 @between right and upper right delay 0x1 - launchtemplate gPrismaticLaserYellowInwardTemplate 0x82 0x5 0x0 0x0 0xFF60 0x0 0x10 @left - launchtemplate gPrismaticLaserGreenInwardTemplate 0x82 0x5 0x0 0x0 0x9F 0x37 0x10 @between right and lower right + createsprite gPrismaticLaserYellowInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFF60, 0x0, 0x10 @left + createsprite gPrismaticLaserGreenInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x9F, 0x37, 0x10 @between right and lower right delay 0x1 - launchtemplate gPrismaticLaserVioletInwardTemplate 0x82 0x5 0x0 0x0 0xFFAA 0xFF94 0x10 @upper left + createsprite gPrismaticLaserVioletInwardTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xFFAA, 0xFF94, 0x10 @upper left delay 0x1 return PrismaticLaserRain: - launchtemplate gPrismaticLaserYellowRainTemplate 0x82, 0x4, 35, 0x3c, 4, ANIM_TARGET + createsprite gPrismaticLaserYellowRainTemplate, ANIM_TARGET, 2, 35, 0x3c, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserGreenRainTemplate 0x82, 0x4, -30, 0x44, 4, ANIM_TARGET + createsprite gPrismaticLaserGreenRainTemplate, ANIM_TARGET, 2, -30, 0x44, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserRedRainTemplate 0x82, 0x4, 27, 0x37, 4, ANIM_TARGET + createsprite gPrismaticLaserRedRainTemplate, ANIM_TARGET, 2, 27, 0x37, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserVioletRainTemplate 0x82, 0x4, -20, 0x32, 4, ANIM_TARGET + createsprite gPrismaticLaserVioletRainTemplate, ANIM_TARGET, 2, -20, 0x32, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserYellowRainTemplate 0x82, 0x4, 33, 0x3a, 4, ANIM_TARGET + createsprite gPrismaticLaserYellowRainTemplate, ANIM_TARGET, 2, 33, 0x3a, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserGreenRainTemplate 0x82, 0x4, -12, 0x3a, 4, ANIM_TARGET + createsprite gPrismaticLaserGreenRainTemplate, ANIM_TARGET, 2, -12, 0x3a, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserRedRainTemplate 0x82, 0x4, 19, 0x3c, 4, ANIM_TARGET + createsprite gPrismaticLaserRedRainTemplate, ANIM_TARGET, 2, 19, 0x3c, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserVioletRainTemplate 0x82, 0x4, -38, 0x3a, 4, ANIM_TARGET + createsprite gPrismaticLaserVioletRainTemplate, ANIM_TARGET, 2, -38, 0x3a, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserYellowRainTemplate 0x82, 0x4, 5, 0x3c, 4, ANIM_TARGET + createsprite gPrismaticLaserYellowRainTemplate, ANIM_TARGET, 2, 5, 0x3c, 4, ANIM_TARGET delay 0x2 - launchtemplate gPrismaticLaserGreenRainTemplate 0x82, 0x4, -23, 0x28, 4, ANIM_TARGET + createsprite gPrismaticLaserGreenRainTemplate, ANIM_TARGET, 2, -23, 0x28, 4, ANIM_TARGET return Move_SPECTRAL_THIEF:: @@ -12553,36 +12551,36 @@ SpectralThiefUnleash: waitbgfadein delay 0x5 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0x8 0x8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x0, 0x0 invisible 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0x8 0x8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0x8, 0x8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0xfff8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0x8, 0xfff8, 0x0, 0x0 delay 0x2 - launchtemplate gSpectralThiefBlackSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x0 0x0 + createsprite gSpectralThiefBlackSmokeTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x0, 0x0 waitforvisualfinish playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_DestinyBondWhiteShadow 0x5 0x2 0x0 0x30 + createvisualtask AnimTask_DestinyBondWhiteShadow, 0x5, 0x0, 0x30 delay 0x30 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x0 0x2 0x0 0x18 0x1 - launchtask AnimTask_BlendBattleAnimPalExclude 0x2 0x5 0x6 0x1 0x0 0xc 0x77bd + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x0, 0x2, 0x0, 0x18, 0x1 + createvisualtask AnimTask_BlendBattleAnimPalExclude, 0x2, 0x6, 0x1, 0x0, 0xc, 0x77bd delay 0x18 - launchtask AnimTask_BlendBattleAnimPalExclude 0x2 0x5 0x6 0x1 0xc 0x0 0x77bd + createvisualtask AnimTask_BlendBattleAnimPalExclude, 0x2, 0x6, 0x1, 0xc, 0x0, 0x77bd waitforvisualfinish - setblends 0x1000 + setalpha 0, 16 delay 0x1 monbg_static ANIM_TARGET - launchtask AnimTask_MoveTargetMementoShadow 0x5 0x0 + createvisualtask AnimTask_MoveTargetMementoShadow, 0x5 playsewithpan SE_M_PSYBEAM, SOUND_PAN_TARGET waitforvisualfinish clearmonbg_static ANIM_TARGET @@ -12592,33 +12590,33 @@ SpectralThiefUnleash: setalpha 12, 8 monbg ANIM_TARGET delay 0x1 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0xa 0x14 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0xfffb 0xa 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0x11 0xfff4 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0xfff1 0xf 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0xfff1, 0xf, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0x0 0x0 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x4 - launchtemplate gSpectralThiefThiefImpactTemplate 0x82, 0x3, 0x14 0x2 0x0 + createsprite gSpectralThiefThiefImpactTemplate, ANIM_TARGET, 2, 0x14, 0x2, 0x0 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 waitforvisualfinish visible 0x0 delay 0x2 @@ -12631,18 +12629,18 @@ SpectralThiefSteal: loadspritegfx ANIM_TAG_HANDS_AND_FEET @black color loadspritegfx ANIM_TAG_ORBS @mimic loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy - setblends 0x50b + setalpha 11, 5 splitbgprio_all panse SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, 0xfd, 0x0 delay 0xf - launchtemplate gSpectralThiefBlackOrbsTemplate 0x82 0x2 0xfff4 0x18 + createsprite gSpectralThiefBlackOrbsTemplate, ANIM_TARGET, 2, 0xfff4, 0x18 delay 0xB setarg 0x7 0xffff waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call SpectralThiefBuffUp delay 0x8 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call SpectralThiefBuffUp delay 0x8 call SpectralThiefBuffUp @@ -12650,15 +12648,15 @@ SpectralThiefSteal: blendoff end SpectralThiefBuffUp: - launchtemplate gSpectralThiefBlackBuffTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gSpectralThiefBlackBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gSpectralThiefBlackBuffTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gSpectralThiefBlackBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gSpectralThiefBlackBuffTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gSpectralThiefBlackBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gSpectralThiefBlackBuffTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gSpectralThiefBlackBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gSpectralThiefBlackBuffTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gSpectralThiefBlackBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return Move_SUNSTEEL_STRIKE:: @@ -12669,13 +12667,13 @@ Move_SUNSTEEL_STRIKE:: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gSunsteelStrikeBlackFlyBallTemplate 0x2 0x4 0x0 0x0 0xd 0x150 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0x1 0x1A + createsprite gSunsteelStrikeBlackFlyBallTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0x1, 0x1A delay 0x18 - launchtemplate gSunsteelStrikeRocksTemplate 0x2 0x2 0x0 0x0 @The rock particles mess up the fly animation - launchtemplate gSunsteelStrikeRocksTemplate 0x2 0x2 0x0 0x1 - launchtemplate gSunsteelStrikeRocksTemplate 0x2 0x2 0x0 0x2 - launchtemplate gSunsteelStrikeRocksTemplate 0x2 0x2 0x0 0x3 + createsprite gSunsteelStrikeRocksTemplate, ANIM_ATTACKER, 2, 0x0, 0x0 @The rock particles mess up the fly animation + createsprite gSunsteelStrikeRocksTemplate, ANIM_ATTACKER, 2, 0x0, 0x1 + createsprite gSunsteelStrikeRocksTemplate, ANIM_ATTACKER, 2, 0x0, 0x2 + createsprite gSunsteelStrikeRocksTemplate, ANIM_ATTACKER, 2, 0x0, 0x3 waitforvisualfinish unloadspritegfx ANIM_TAG_ROUND_SHADOW @fly unloadspritegfx ANIM_TAG_AIR_WAVE_2 @black color @@ -12684,7 +12682,7 @@ Move_SUNSTEEL_STRIKE:: loadspritegfx ANIM_TAG_SMALL_RED_EYE @red color loadspritegfx ANIM_TAG_IMPACT @hit playsewithpan SE_ORB, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_BG | ANIM_PAL_ATK), 3, 0, 15, 0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATTACKER), 3, 0, 15, 0 waitforvisualfinish call SunsteelStrikeBeam call SunsteelStrikeBeam @@ -12698,10 +12696,10 @@ Move_SUNSTEEL_STRIKE:: call SunsteelStrikeBeam stopsound playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtemplate gSunsteelStrikeSuperpowerTemplate 0x82 0x1 0x14 + createsprite gSunsteelStrikeSuperpowerTemplate, ANIM_TARGET, 2, 0x14 delay 0x14 - launchtemplate gSunsteelStrikeRedImpactTemplate 0x2 0x4 0x0 0x0 0x1 0x0 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x6 0x0 0x8 0x1 + createsprite gSunsteelStrikeRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x6, 0x0, 0x8, 0x1 waitforvisualfinish unloadspritegfx ANIM_TAG_METEOR @superpower unloadspritegfx ANIM_TAG_GOLD_RING @beam @@ -12713,15 +12711,15 @@ Move_SUNSTEEL_STRIKE:: playsewithpan SE_M_FIRE_PUNCH, SOUND_PAN_TARGET waitforvisualfinish visible ANIM_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_BG | ANIM_PAL_ATK), 3, 15, 0, 0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATTACKER), 3, 15, 0, 0 waitforvisualfinish blendoff clearmonbg ANIM_TARGET end SunsteelStrikeBeam: - launchtemplate gSunsteelStrikeYellowBeamTemplate 0x82 0x1 0x14 + createsprite gSunsteelStrikeYellowBeamTemplate, ANIM_TARGET, 2, 0x14 delay 0x1 - launchtemplate gSunsteelStrikeRedBeamTemplate 0x82 0x1 0x14 + createsprite gSunsteelStrikeRedBeamTemplate, ANIM_TARGET, 2, 0x14 delay 0x1 return @@ -12733,30 +12731,30 @@ Move_MOONGEIST_BEAM:: loadspritegfx ANIM_TAG_WATER_GUN @water gun colour loadspritegfx ANIM_TAG_ASSURANCE_HAND @purple colour setalpha 8, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ELECTRIC_ORBS, 0, 15, 15, 0x7FFF @White createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_CIRCLE_OF_LIGHT, 0, 15, 15, 0x7FFC @Light Blue waitforvisualfinish playsewithpan SE_M_MEGA_KICK, SOUND_PAN_TARGET - launchtemplate gMoonSpriteTemplate 0x80 0x2 0x20 0x15 - launchtask AnimTask_AlphaFadeIn 0x3 0x5 0x0 0x10 0x10 0x0 0x1 + createsprite gMoonSpriteTemplate, ANIM_TARGET, 0, 0x20, 0x15 + createvisualtask AnimTask_AlphaFadeIn, 0x3, 0x0, 0x10, 0x10, 0x0, 0x1 call MoongeistBeamCharge call MoongeistBeamCharge call MoongeistBeamCharge call MoongeistBeamCharge - launchtemplate gGrowingChargeOrbSpriteTemplate 0x2 0x1 0x0 @;Charge circle + createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x0 @;Charge circle call MoongeistBeamCharge delay 0x20 createsoundtask SoundTask_LoopSEAdjustPanning, 0x7, 0xCC, 0xffc0, SOUND_PAN_TARGET, 0x1, 0xf, 0x0, 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x0, 0x4, 0x32, 0x1 createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB_RED, 16, 0, 0 call MoongeistBeamOrbs call MoongeistBeamOrbs call MoongeistBeamOrbs call MoongeistBeamOrbs call MoongeistBeamOrbs - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x32 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0xb 0x6739 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x32, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0xb, 0x6739 call MoongeistBeamOrbs call MoongeistBeamOrbs call MoongeistBeamOrbs @@ -12786,23 +12784,23 @@ Move_MOONGEIST_BEAM:: call MoongeistBeamOrbs call MoongeistBeamOrbs call MoongeistBeamOrbs - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0xb 0x0 0x6739 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0xb, 0x0, 0x6739 delay 0x1A stopsound - launchtask AnimTask_MoonlightEndFade 0x2 0x0 + createvisualtask AnimTask_MoonlightEndFade, 0x2 end MoongeistBeamCharge: - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, 40, 0, 0, 0, 30, 10 @From right - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, -40, 0, 0, 0, 30, -10 @From left - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, -25, -40, 0, 0, 30, -20 @From top left - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, 25, -40, 0, 0, 30, 20 @From top right - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, 25, 20, 0, 0, 30, 20 @From bottom right - launchtemplate gMoongeistBeamChargeTemplate 0, 0x6, -25, 40, 0, 0, 30, -20 @From bottom left + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, 40, 0, 0, 0, 30, 10 @From right + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, -40, 0, 0, 0, 30, -10 @From left + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, -25, -40, 0, 0, 30, -20 @From top left + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, 25, -40, 0, 0, 30, 20 @From top right + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, 25, 20, 0, 0, 30, 20 @From bottom right + createsprite gMoongeistBeamChargeTemplate, ANIM_ATTACKER, 0, -25, 40, 0, 0, 30, -20 @From bottom left delay 0x5 return MoongeistBeamOrbs: - launchtemplate gMoongeistBeamBlueOrbsTemplate 0x82 0x0 - launchtemplate gMoongeistBeamPurpleOrbsTemplate 0x82 0x0 + createsprite gMoongeistBeamBlueOrbsTemplate, ANIM_TARGET, 2 + createsprite gMoongeistBeamPurpleOrbsTemplate, ANIM_TARGET, 2 delay 0x1 return @@ -12810,24 +12808,24 @@ Move_TEARFUL_LOOK:: loadspritegfx ANIM_TAG_SMALL_BUBBLES @tears loadspritegfx ANIM_TAG_OPENING_EYE @eye monbg ANIM_DEF_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x5 0x7DE0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x5, 0x7DE0 waitforvisualfinish playsewithpan SE_M_CONFUSE_RAY, SOUND_PAN_TARGET - launchtemplate gOpeningEyeSpriteTemplate 0x5 0x4 0x0 0x0 0x1 0x0 + createsprite gOpeningEyeSpriteTemplate, ANIM_ATTACKER, 5, 0x0, 0x0, 0x1, 0x0 delay 0x35 loopsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER, 0xC, 0x2 delay 0x8 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x0 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x1 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x2 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x3 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x3 delay 0x8 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x0 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x1 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x2 - launchtemplate gTearDropSpriteTemplate 0x2 0x2 0x1 0x3 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x3 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x5 0x0 0x7DE0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x5, 0x0, 0x7DE0 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -12840,30 +12838,30 @@ Move_ZING_ZAP:: loadspritegfx ANIM_TAG_SMALL_EMBER @yellow color monbg ANIM_TARGET call ZingZapSparks1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x4 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x4, 0x0, 0x6, 0x1 delay 0xA call ZingZapSparks2 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x4 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x4, 0x0, 0x6, 0x1 delay 0xA call ZingZapSparks1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x4 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x4, 0x0, 0x6, 0x1 delay 0xA call ZingZapSparks2 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x4 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x4, 0x0, 0x6, 0x1 delay 0xA - launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x18 0x6 0x1 0x5 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 0x2, 0x0, 0x18, 0x6, 0x1, 0x5 delay 0x4 call ZingZapSparks1 invisible 0x0 - launchtemplate gZingZapYellowBallTemplate 0x82, 0x3, 0x0 0x0 0xF + createsprite gZingZapYellowBallTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xF delay 0xA call ZingZapSparks2 delay 0x5 stopsound playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER waitforvisualfinish - launchtemplate gZingZapRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x4 0x0 0x6 0x1 + createsprite gZingZapRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x4, 0x0, 0x6, 0x1 call ElectricityEffect visible 0x0 waitforvisualfinish @@ -12871,17 +12869,17 @@ Move_ZING_ZAP:: end ZingZapSparks1: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 return ZingZapSparks2: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 return Move_NATURES_MADNESS:: @@ -12894,72 +12892,72 @@ Move_NATURES_MADNESS:: loadspritegfx ANIM_TAG_TEAL_ALERT @charge particles loadspritegfx ANIM_TAG_ECLIPSING_ORB @blue green monbg ANIM_ATTACKER - setblends 0x80E + setalpha 14, 8 delay 0x1 loopsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER, 0x10, 0x3 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xa 0xa 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xa 0xa 0x19 0x0 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xfff1 0x0 0x19 0x0 + createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x14 0xa 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x14 0xa 0x19 0x0 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x0 0xfff6 0x19 0x0 + createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xfff6 0xf 0x19 0x0 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x19 0x14 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x19 0x14 0x19 0x0 + createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xffec 0x14 0x19 0x0 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x0 delay 0x4 - launchtemplate gNaturesMadnessPinkRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1F 0x8 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xc 0x0 0x19 0x0 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xc 0x0 0x19 0x0 + createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x8 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x0 clearmonbg ANIM_ATTACKER delay 0x1 monbg ANIM_TARGET waitforvisualfinish - launchtemplate gNaturesMadnessGrayRingTemplate 0x28 0x4 0x0 0x0 0x1 0x0 + createsprite gNaturesMadnessGrayRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0 playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER delay 0xe - launchtemplate gNaturesMadnessGrayRingTemplate 0x28 0x4 0x0 0x0 0x1 0x0 + createsprite gNaturesMadnessGrayRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0 playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER delay 0xe - launchtemplate gNaturesMadnessGrayRingTemplate 0x28 0x4 0x0 0x0 0x1 0x0 + createsprite gNaturesMadnessGrayRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0 playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gNaturesMadnessPinkRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1F 0x8 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xa 0xa 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xfff1 0x0 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x14 0xa 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x0 0xfff6 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xfff6 0xf 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0x19 0x14 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xffec 0x14 0x19 0x1 - launchtemplate gNaturesMadnessPinkStarsTemplate 0x2 0x4 0xc 0x0 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xa 0xa 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xfff1 0x0 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x14 0xa 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x0 0xfff6 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xfff6 0xf 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0x19 0x14 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xffec 0x14 0x19 0x1 - launchtemplate gNaturesMadnessCrystalsTemplate 0x2 0x4 0xc 0x0 0x19 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x1 + createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x14, 0xa, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff6, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xf, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0x19, 0x14, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xffec, 0x14, 0x19, 0x1 + createsprite gNaturesMadnessCrystalsTemplate, ANIM_ATTACKER, 2, 0xc, 0x0, 0x19, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -12969,37 +12967,37 @@ Move_MULTI_ATTACK:: loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_CUT @cut monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call MultiAttackBuff delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x2 0x2 0x0 0xb 0x7fff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x7fff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call MultiAttackBuff delay 0x8 call MultiAttackBuff waitforvisualfinish delay 0xF playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - launchtemplate gCuttingSliceSpriteTemplate 0x2 0x3 0x28 0xffe0 0x0 - launchtemplate gCuttingSliceSpriteTemplate 0x2 0x3 0x28 0xffd0 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0xffe0, 0x0 + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0xffd0, 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET end MultiAttackBuff: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return Move_MIND_BLOWN:: @@ -13010,18 +13008,18 @@ Move_MIND_BLOWN:: loadspritegfx ANIM_TAG_IMPACT @hit monbg ANIM_TARGET setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xC 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0 waitforvisualfinish playsewithpan SE_FALL, SOUND_PAN_TARGET - launchtemplate gMindBlownHeadTemplate 0x82, 0x3, 0x0 0x0 0x25 + createsprite gMindBlownHeadTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x25 waitforvisualfinish - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x2 0x0 0xf 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_DEF_PARTNER 0x2 0x0 0xf 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_ATK_PARTNER 0x2 0x0 0xf 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x2, 0x0, 0xf, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_DEF_PARTNER, 0x2, 0x0, 0xf, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_ATK_PARTNER, 0x2, 0x0, 0xf, 0x1 delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMindBlownBlueImpactTemplate 0x83 0x2 0x1 0x0 - launchtemplate gMindBlownPinkImpactTemplate 0x83 0x2 0x1 0x0 + createsprite gMindBlownBlueImpactTemplate, ANIM_TARGET, 3, 0x1, 0x0 + createsprite gMindBlownPinkImpactTemplate, ANIM_TARGET, 3, 0x1, 0x0 call MindBlownBlueOrbs delay 0x1 call MindBlownPinkOrbs @@ -13033,30 +13031,30 @@ Move_MIND_BLOWN:: call MindBlownBlueOrbs delay 0x1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish blendoff clearmonbg ANIM_TARGET end MindBlownBlueOrbs: - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0x0 0xFF90 0x8 @up - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0x5F 0xFF9D 0x8 @upper right - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0x73 0x0 0x8 @right - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0x4F 0x37 0x8 @lower right - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0x0 0x53 0x8 @down - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0xFFB0 0x43 0x8 @lower left - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0xFF60 0x0 0x8 @left - launchtemplate gMindBlownBlueOrbsTemplate 0x82 0x5 0x1 0x1 0xFFAA 0xFF94 0x8 @upper left + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0xFF90, 0x8 @up + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x5F, 0xFF9D, 0x8 @upper right + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x73, 0x0, 0x8 @right + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x4F, 0x37, 0x8 @lower right + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0x53, 0x8 @down + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFFB0, 0x43, 0x8 @lower left + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFF60, 0x0, 0x8 @left + createsprite gMindBlownBlueOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFFAA, 0xFF94, 0x8 @upper left return MindBlownPinkOrbs: - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0x2D 0xFF9D 0x8 @between up and upper right - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0xDF 0xFF9D 0x8 @between right and upper right - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0x9F 0x37 0x8 @between right and lower right - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0x1F 0x37 0x8 @between lower right and down - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0xFFE0 0x43 0x8 @between lower left and down - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0xFF60 0x43 0x8 @between left and lower left - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0xFF2A 0xFFAA 0x8 @between left and upper left - launchtemplate gMindBlownPinkOrbsTemplate 0x82 0x5 0x1 0x1 0xFFDA 0xFF94 0x8 @between up and upper left + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x2D, 0xFF9D, 0x8 @between up and upper right + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xDF, 0xFF9D, 0x8 @between right and upper right + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x9F, 0x37, 0x8 @between right and lower right + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0x1F, 0x37, 0x8 @between lower right and down + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFFE0, 0x43, 0x8 @between lower left and down + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFF60, 0x43, 0x8 @between left and lower left + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFF2A, 0xFFAA, 0x8 @between left and upper left + createsprite gMindBlownPinkOrbsTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xFFDA, 0xFF94, 0x8 @between up and upper left return Move_PLASMA_FISTS:: @@ -13068,10 +13066,10 @@ Move_PLASMA_FISTS:: loadspritegfx ANIM_TAG_LIGHTNING @thunder punch monbg ANIM_ATTACKER setalpha 12, 8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x0 waitforvisualfinish - launchtemplate gPlasmaFistsChargeTemplate 0x2 0x1 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x3 0x5c 0x1 + createsprite gPlasmaFistsChargeTemplate, ANIM_ATTACKER, 2, 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x0, 0x3, 0x5c, 0x1 call PlasmaFistSpark1 delay 0xA call PlasmaFistSpark2 @@ -13097,51 +13095,51 @@ Move_PLASMA_FISTS:: call PlasmaFistSpark2 waitforvisualfinish clearmonbg ANIM_ATTACKER - launchtask AnimTask_ShockWaveProgressingBolt 0x5 0x0 + createvisualtask AnimTask_ShockWaveProgressingBolt, 0x5 waitforvisualfinish monbg ANIM_TARGET call PlasmaFistsImpact waitforvisualfinish call PlasmaFistsImpact waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end PlasmaFistSpark1: playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x0 0x2 0x0 0xb 0x5bff - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x0, 0x2, 0x0, 0xb, 0x5bff + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 return PlasmaFistSpark2: playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 return PlasmaFistsImpact: playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtemplate gFistFootSpriteTemplate 0x84 0x5 0x0 0x0 0x8 0x1 0x0 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x1 + createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x8, 0x1, 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 delay 0x1 - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0xffd0 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xffd0 delay 0x1 - launchtemplate gLightningSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gLightningSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x1 - launchtemplate gLightningSpriteTemplate 0x2 0x2 0x0 0x10 + createsprite gLightningSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10 delay 0x1 playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 delay 0x2 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 - launchtemplate gBasicHitSplatSpriteTemplate 0x3 0x4 0x0 0x0 0x1 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x2 return Move_PHOTON_GEYSER:: @@ -13153,10 +13151,10 @@ Move_PHOTON_GEYSER:: loadspritegfx ANIM_TAG_ORBS @recover monbg ANIM_ATTACKER setalpha 12, 8 - launchtemplate gPhotonGeyserChargeTemplate 0x2 0x1 0x0 + createsprite gPhotonGeyserChargeTemplate, ANIM_ATTACKER, 2, 0x0 call PhotonGeyserSparks1 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0xffd8 0xffd8 0x10 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0x0 0x28 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xffd8, 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x28, 0x10 delay 0xA call PhotonGeyserSparks2 delay 0xA @@ -13165,8 +13163,8 @@ Move_PHOTON_GEYSER:: call PhotonGeyserSparks2 delay 0xA call PhotonGeyserSparks1 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0x0 0xffd8 0x10 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0x28 0x14 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd8, 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0x14, 0x10 delay 0xA call PhotonGeyserSparks2 delay 0xA @@ -13175,8 +13173,8 @@ Move_PHOTON_GEYSER:: call PhotonGeyserSparks2 delay 0xA call PhotonGeyserSparks1 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0xffd8 0x0 0x10 - launchtemplate gPowerAbsorptionOrbSpriteTemplate 0x2 0x3 0x28 0x0 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x0, 0x10 + createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0x0, 0x10 delay 0xA call PhotonGeyserSparks2 delay 0xA @@ -13184,7 +13182,7 @@ Move_PHOTON_GEYSER:: delay 0xA call PhotonGeyserSparks2 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xF 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xF, 0x0 clearmonbg ANIM_ATTACKER playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_ATTACKER unloadspritegfx ANIM_TAG_ORBS @recover @@ -13192,66 +13190,66 @@ Move_PHOTON_GEYSER:: loadspritegfx ANIM_TAG_YELLOW_BALL @confuse ray (for zap cannon) loadspritegfx ANIM_TAG_BLACK_BALL_2 @zap cannon loadspritegfx ANIM_TAG_AIR_WAVE_2 @white/gray color - launchtemplate gPhotonGeyserWhiteRingTemplate 0x3 0x6 0x0 0x0 0x0 0x0 0x1f 0x8 - launchtemplate gPhotonGeyserZapBallTemplate 0x83 0x6 0xa 0x0 0x0 0x0 0x1e 0x0 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 - launchtemplate gPhotonGeyserZapCannonSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xe0 0x28 0x2 + createsprite gPhotonGeyserWhiteRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x8 + createsprite gPhotonGeyserZapBallTemplate, ANIM_TARGET, 3, 0xa, 0x0, 0x0, 0x0, 0x1e, 0x0 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x0 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x40, 0x28, 0x1 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x80, 0x28, 0x0 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x10, 0x1e, 0x0, 0x28, 0x2 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x20, 0x28, 0x0 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0x60, 0x28, 0x1 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xa0, 0x28, 0x0 + createsprite gPhotonGeyserZapCannonSparkTemplate, ANIM_TARGET, 4, 0xa, 0x0, 0x8, 0x1e, 0xe0, 0x28, 0x2 waitforvisualfinish monbg ANIM_TARGET - launchtemplate gPhotonGeyserYellowRingTemplate 0x3 0x6 0x0 0x0 0x1 0x0 0x1f 0x8 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 + createsprite gPhotonGeyserYellowRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1f, 0x8 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x5, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER unloadspritegfx ANIM_TAG_YELLOW_BALL @confuse ray (for zap cannon) unloadspritegfx ANIM_TAG_BLACK_BALL_2 @zap cannon unloadspritegfx ANIM_TAG_AIR_WAVE_2 @white/gray color @Shoot beam to the sky loadspritegfx ANIM_TAG_STRAIGHT_BEAM - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x6 0x0 0x10 0x43FF @Light yellow - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x4 0x0 0x60 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x6, 0x0, 0x10, 0x43FF @Light yellow + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x4, 0x0, 0x60, 0x1 panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 call PhotonGeyserBeam waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x10 0x0 0x43FF @Light yellow - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xF 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x10, 0x0, 0x43FF @Light yellow + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xF, 0x0, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end PhotonGeyserSparks1: playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gThinRingShrinkingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 + createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 delay 0x0 - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 return PhotonGeyserSparks2: playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gPhotonGeyserSparkTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gPhotonGeyserSparkTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 return PhotonGeyserBeam: - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, 19, ANIM_TARGET, 180, 2, 6 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, 19, ANIM_TARGET, 180, 2, 6 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, 3, ANIM_TARGET, 180, 2, 5 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, 3, ANIM_TARGET, 180, 2, 5 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, -13, ANIM_TARGET, 180, 2, 4 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, -13, ANIM_TARGET, 180, 2, 4 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, -29, ANIM_TARGET, 180, 2, 3 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, -29, ANIM_TARGET, 180, 2, 3 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, -45, ANIM_TARGET, 180, 2, 2 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, -45, ANIM_TARGET, 180, 2, 2 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, -61, ANIM_TARGET, 180, 2, 1 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, -61, ANIM_TARGET, 180, 2, 1 delay 0x1 - launchtemplate gPhotonGeyserBeam 0x83, 0x6, 0, -77, ANIM_TARGET, 180, 2, 0 + createsprite gPhotonGeyserBeam, ANIM_TARGET, 3, 0, -77, ANIM_TARGET, 180, 2, 0 return Move_ZIPPY_ZAP:: @@ -13297,28 +13295,28 @@ Move_DOUBLE_IRON_BASH:: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_IMPACT loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 0x1c, 0x2 - launchtask AnimTask_MetallicShine 0x5 0x3 0x0 0x0 0x0 + createvisualtask AnimTask_MetallicShine, 0x5, 0x0, 0x0, 0x0 waitforvisualfinish monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET setalpha 12, 8 loopsewithpan SE_M_WING_ATTACK, SOUND_PAN_ATTACKER, 0x14, 0x2 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x0 0xc 0x4 0x1 0x4 - launchtask AnimTask_AnimateGustTornadoPalette 0x5 0x2 0x1 0x46 - launchtemplate gGustToTargetSpriteTemplate 0x2 0x5 0xffe7 0x0 0x0 0x0 0x0 @wing attack - launchtemplate gGustToTargetSpriteTemplate 0x2 0x5 0x19 0x0 0x0 0x0 0x0 @wing attack + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x0, 0xc, 0x4, 0x1, 0x4 + createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46 + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, 0xffe7, 0x0, 0x0, 0x0, 0x0 @wing attack + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, 0x19, 0x0, 0x0, 0x0, 0x0 @wing attack delay 0x18 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x18 0x0 0x0 0x9 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x18, 0x0, 0x0, 0x9 delay 0x11 - launchtemplate gBasicHitSplatSpriteTemplate 0x84, 0x4, 0x0 0x0 0x1 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe0 0x0 0x0 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x1, 0x1 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe0, 0x0, 0x0, 0x3 waitforvisualfinish playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0xb + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0xb waitforvisualfinish delay 0x3 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x7 clearmonbg ANIM_DEF_PARTNER blendoff end @@ -13330,18 +13328,18 @@ Move_DYNAMAX_CANNON:: Move_SNIPE_SHOT:: loadspritegfx ANIM_TAG_IMPACT_2 loadspritegfx ANIM_TAG_LEER - launchtask AnimTask_BlendBattleAnimPal 10 5 ANIM_PAL_BG 0 0 16, 0 @;Black + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0, 0, 16, 0 @;Black waitforvisualfinish - launchtemplate gLeerSpriteTemplate 0x82, 2 0x18 -12 + createsprite gLeerSpriteTemplate, ANIM_TARGET, 2, 0x18, -12 playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER waitforvisualfinish delay 0x20 playsewithpan SE_M_GIGA_DRAIN, SOUND_PAN_TARGET - launchtemplate gSnipeShotBallTemplate 0x82, 3, 0 0 16, + createsprite gSnipeShotBallTemplate, ANIM_TARGET, 2, 0, 0, 16 waitforvisualfinish - launchtask AnimTask_ShakeMon2 2 5 1 4 0 8, 1 + createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 8, 1 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 10 5 ANIM_PAL_BG 0 16, 0 0 @;Black + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 0, 16, 0, 0 @;Black waitforvisualfinish end @@ -13350,16 +13348,16 @@ Move_JAW_LOCK:: loadspritegfx ANIM_TAG_IMPACT createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SHARP_TEETH, 0, 10, 10, 0x0B1D @Light orange monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x7 0x0 @Black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x7, 0x0 @Black waitforvisualfinish playsewithpan SE_M_BITE, SOUND_PAN_TARGET - launchtemplate gJawLockTeethTemplate 0x2 0x7 0xffe0 0xffe0 0x1 0x333 0x333 0xa 15 - launchtemplate gJawLockTeethTemplate 0x2 0x7 0x20 0x20 0x5 0xfccd 0xfccd 0xa 15 + createsprite gJawLockTeethTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffe0, 0x1, 0x333, 0x333, 0xa, 15 + createsprite gJawLockTeethTemplate, ANIM_ATTACKER, 2, 0x20, 0x20, 0x5, 0xfccd, 0xfccd, 0xa, 15 delay 0xa - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff8 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x7 0xA 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff8, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x7, 0xA, 0x2 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x7 0x0 0x0 @;Black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x7, 0x0, 0x0 @;Black waitforvisualfinish clearmonbg ANIM_TARGET delay 0x1 @@ -13371,9 +13369,9 @@ Move_STUFF_CHEEKS:: loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_SPARKLE_2 playsewithpan SE_M_METRONOME, 0xc0 - launchtemplate gFloatingBerryTemplate 1 0x1 0x0 + createsprite gFloatingBerryTemplate, ANIM_ATTACKER, 1, 0x0 delay 0x45 - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 0x1 BERRYEAT_ON_PLAYER BerryEatingOpponent: call BiteOpponent @@ -13388,27 +13386,27 @@ BERRYEAT_ON_PLAYER: delay 0xA POST_BERRY_EAT: playsewithpan SE_SHINY, 0xc0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x2 0x3 0x7 0x0 0x67f1 - launchtemplate gThinRingExpandingSpriteTemplate 3 0x4 0x0 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x2, 0x3, 0x7, 0x0, 0x67f1 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish end BitePlayer: playsewithpan SE_M_BITE, 0x3f - launchtemplate gSharpTeethSpriteTemplate 2 0x6 0x27 0xffD0 0x0 0x0 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 2 0x6 0x27 0x10 0x4 0x0 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x27, 0xffD0, 0x0, 0x0, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0x27, 0x10, 0x4, 0x0, 0xfccd, 0xa return BiteOpponent: playsewithpan SE_M_BITE, 0x3f - launchtemplate gSharpTeethSpriteTemplate 2 0x6 0xffDF 0xffD0 0x0 0x0 0x333 0xa - launchtemplate gSharpTeethSpriteTemplate 2 0x6 0xffDF 0x10 0x4 0x0 0xfccd 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffDF, 0xffD0, 0x0, 0x0, 0x333, 0xa + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0xffDF, 0x10, 0x4, 0x0, 0xfccd, 0xa return Move_NO_RETREAT:: loadspritegfx ANIM_TAG_SMALL_EMBER loopsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER 0x7 0x12 - launchtemplate gNoRetreatFlameTemplate 2, 0x5 ANIM_ATTACKER, 20, 10, 0xA0, 0 - launchtemplate gNoRetreatFlameTemplate 2, 0x5 ANIM_ATTACKER, -20, 10, 0xA0, 0 - launchtask AnimTask_TeeterDanceMovement 0x5 0x0 + createsprite gNoRetreatFlameTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 20, 10, 0xA0, 0 + createsprite gNoRetreatFlameTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, -20, 10, 0xA0, 0 + createvisualtask AnimTask_TeeterDanceMovement, 0x5 waitforvisualfinish end @@ -13416,21 +13414,21 @@ Move_TAR_SHOT:: loadspritegfx ANIM_TAG_POISON_BUBBLE createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_POISON_BUBBLE, 0, 15, 15, 0 @Black monbg ANIM_TARGET - launchtemplate gAppleAcidLaunchTemplate 0x82, 0x6 0x14 0x0 0x28 0x1 0x0 0x0 + createsprite gAppleAcidLaunchTemplate, ANIM_TARGET, 2, 0x14, 0x0, 0x28, 0x1, 0x0, 0x0 playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 0x5 - launchtemplate gAppleAcidLaunchTemplate 0x82, 0x6 0x14 0x0 0x28 0x1 0xffe8 0x0 + createsprite gAppleAcidLaunchTemplate, ANIM_TARGET, 2, 0x14, 0x0, 0x28, 0x1, 0xffe8, 0x0 playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 0xf - launchtask AnimTask_ShakeMon2 0x5 0x5 ANIM_TARGET 0x2 0x0 0xa 0x1 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0x10 0x0 @;Black - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xffe6 0xffe8 0x0 0xf 0x37 + createvisualtask AnimTask_ShakeMon2, 0x5, ANIM_TARGET, 0x2, 0x0, 0xa, 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0x10, 0x0 @;Black + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xffe6, 0xffe8, 0x0, 0xf, 0x37 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xf 0xffe5 0x0 0xC 0x32 + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xf, 0xffe5, 0x0, 0xC, 0x32 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xfff1 0xffef 0x0 0xa 0x2d + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xfff1, 0xffef, 0x0, 0xa, 0x2d playsewithpan SE_M_BUBBLE SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -13440,27 +13438,27 @@ Move_MAGIC_POWDER:: loadspritegfx ANIM_TAG_POISON_POWDER loadspritegfx ANIM_TAG_WATER_GUN loopsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER 0xE 0x8 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0xffe2 0xffea 0x75 0x50 0x5 0x1 - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0xa 0xffea 0x75 0x50 0xfffb 0x1 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0xffe7 0xffea 0x75 0x70 0x5 0x3 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0xffe2, 0xffea, 0x75, 0x50, 0x5, 0x1 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0xa, 0xffea, 0x75, 0x50, 0xfffb, 0x1 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0xffe7, 0xffea, 0x75, 0x70, 0x5, 0x3 delay 0xf - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0xfffb 0xffea 0x75 0x50 0xfffb 0x1 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0x5 0xffea 0x75 0x60 0x5 0x1 - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0x0 0xffea 0x75 0x45 0xfffb 0x1 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0xfff1 0xffea 0x75 0x70 0x5 0x2 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0xfffb, 0xffea, 0x75, 0x50, 0xfffb, 0x1 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0x5, 0xffea, 0x75, 0x60, 0x5, 0x1 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0x0, 0xffea, 0x75, 0x45, 0xfffb, 0x1 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xffea, 0x75, 0x70, 0x5, 0x2 delay 0x1e - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0xfff1 0xffea 0x75 0x70 0x5 0x2 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0xf 0xffea 0x75 0x50 0xfffb 0x1 - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0xfff6 0xffea 0x75 0x60 0x7 0x2 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0xfffb 0xffea 0x75 0x5a 0xfff8 0x0 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0xfff1, 0xffea, 0x75, 0x70, 0x5, 0x2 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0xf, 0xffea, 0x75, 0x50, 0xfffb, 0x1 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0xfff6, 0xffea, 0x75, 0x60, 0x7, 0x2 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xffea, 0x75, 0x5a, 0xfff8, 0x0 delay 0x14 - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0xfff6 0xffea 0x75 0x50 0xfffb 0x1 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0x0 0xffea 0x75 0x59 0x5 0x2 - launchtemplate gMagicPowderBluePowderTemplate 0x82 0x6 0x14 0xffea 0x75 0x70 0xfff8 0x2 - launchtemplate gPoisonPowderParticleSpriteTemplate 0x82 0x6 0x5 0xffea 0x75 0x50 0x5 0x1 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0xfff6, 0xffea, 0x75, 0x50, 0xfffb, 0x1 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xffea, 0x75, 0x59, 0x5, 0x2 + createsprite gMagicPowderBluePowderTemplate, ANIM_TARGET, 2, 0x14, 0xffea, 0x75, 0x70, 0xfff8, 0x2 + createsprite gPoisonPowderParticleSpriteTemplate, ANIM_TARGET, 2, 0x5, 0xffea, 0x75, 0x50, 0x5, 0x1 waitforvisualfinish playsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffa 0xfffa 0xf 0x1 0x1 + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffa, 0xfffa, 0xf, 0x1, 0x1 waitforvisualfinish end @@ -13468,11 +13466,11 @@ Move_DRAGON_DARTS:: loadspritegfx ANIM_TAG_DREEPY loadspritegfx ANIM_TAG_EXPLOSION playsewithpan SE_FALL, SOUND_PAN_ATTACKER - launchtemplate gDreepyMissileTemplate 0x82, 0x3, 0x0 0x0 0x19 + createsprite gDreepyMissileTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x19 delay 0x19 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x10 0x1 - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x10, 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 waitforvisualfinish end @@ -13494,16 +13492,16 @@ Move_OCTOLOCK:: loadspritegfx ANIM_TAG_TENDRILS createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_TENDRILS, 0, 12, 12, 0x3D98 @Pinkish Red loopsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET 0x6 0x4 - launchtemplate gConstrictBindingSpriteTemplate 0x84, 0x4, 0x0 0x10 0x0 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x10, 0x0, 0x2 delay 0x7 - launchtemplate gConstrictBindingSpriteTemplate 0x83 0x4 0x0 0x0 0x0 0x2 - launchtemplate gConstrictBindingSpriteTemplate 0x82, 0x4, 0x0 0x8 0x1 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x0, 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x8, 0x1, 0x2 delay 0x7 - launchtemplate gConstrictBindingSpriteTemplate 0x83 0x4 0x0 0xfff8 0x1 0x2 + createsprite gConstrictBindingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfff8, 0x1, 0x2 delay 0x8 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x3 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x3, 0x0, 0x6, 0x1 delay 0x14 - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0x8 0x1f + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0x8, 0x1f playsewithpan SE_M_BIND, SOUND_PAN_TARGET setarg 0x7 0xffff waitforvisualfinish @@ -13518,16 +13516,16 @@ Move_BOLT_BEAK:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_HORN_HIT, 0, 12, 12, 0x079D @Yellow call BoltBeakSparks waitforvisualfinish - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x3 0xffe1 0x1 0x0 0x0 0x5bff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x3, 0xffe1, 0x1, 0x0, 0x0, 0x5bff createsprite gHorizontalLungeSpriteTemplate, 0x2, 0x2, 0x4, 0x4 delay 0x4 createsprite gHornHitSpriteTemplate, 0x84, 0x3, 0x8, 0x8, 0xa waitforvisualfinish createsprite gFlashingHitSplatSpriteTemplate, 0x83, 0x4, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0x6 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0x6, 0x1 waitforvisualfinish - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x4 0xffe1 0x2 0x0 0x6 0x5bff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x4, 0xffe1, 0x2, 0x0, 0x6, 0x5bff call ElectricityEffect waitforvisualfinish end @@ -13538,18 +13536,18 @@ BoltBeakSparks: createsprite gBoltBeakBlueSparkTemplate, 0x0, 0x7, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 createsprite gSparkElectricitySpriteTemplate, 0x0, 0x7, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0x0 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x3 0xffe1 0x1 0x0 0x0 0x5bff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x3, 0xffe1, 0x1, 0x0, 0x0, 0x5bff delay 0xa - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x3 0xffe1 0x1 0x5 0x5 0x5bff + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x3, 0xffe1, 0x1, 0x5, 0x5, 0x5bff playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER createsprite gBoltBeakBlueSparkTemplate, 0x0, 0x7, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 createsprite gSparkElectricitySpriteTemplate, 0x0, 0x7, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 createsprite gBoltBeakBlueSparkTemplate, 0x0, 0x7, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x0 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x3 0xffe1 0x1 0x0 0x0 0x76E1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x3, 0xffe1, 0x1, 0x0, 0x0, 0x76E1 delay 0x14 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x3 0xffe1 0x1 0x4 0x4 0x76E1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x3, 0xffe1, 0x1, 0x4, 0x4, 0x76E1 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER createsprite gSparkElectricityFlashingSpriteTemplate, 0x4, 0x8, 0x0, 0x0, 0x20, 0xc, 0x0, 0x14, 0x0, 0x0 createsprite gBoltBeakBlueFlashingSparkTemplate, 0x4, 0x8, 0x0, 0x0, 0x20, 0xc, 0x40, 0x14, 0x1, 0x0 @@ -13567,53 +13565,53 @@ Move_FISHIOUS_REND:: loadspritegfx ANIM_TAG_SMALL_BUBBLES createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SHARP_TEETH, 0, 10, 10, 0x726A @Blue Teeth playsewithpan SE_M_WATERFALL, SOUND_PAN_TARGET - launchtemplate gFishiousRendTeethTemplate, 0x80, 0x2, 50, 4 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x4 0x0 0xC 0x2 + createsprite gFishiousRendTeethTemplate, ANIM_TARGET, 0, 50, 4 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x4, 0x0, 0xC, 0x2 call FishousRendBubbles waitforvisualfinish end FishousRendBubbles: - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xF 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xF 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xF, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xF, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xA 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xA 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x5 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x5 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x0 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x0 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfffb 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfffb 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff6 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff6 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff1 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff1 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xffec 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xffec 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xffec, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xffec, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff1 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff1 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff1, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff6 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfff6 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfffb 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xfffb 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xfffb, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x0 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x0 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x5 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0x5 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0x5, 0x0 delay 0x2 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xA 0x0 - launchtemplate gSmallDriftingBubblesSpriteTemplate 0x4 0x2 0xA 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0xA, 0x0 return Move_COURT_CHANGE:: @@ -13625,7 +13623,7 @@ Move_CLANGOROUS_SOUL:: loadspritegfx ANIM_TAG_POISON_BUBBLE @purple loadspritegfx ANIM_TAG_AIR_WAVE_2 @white/grey loadspritegfx ANIM_TAG_SPARKLE_2 @stars - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 call ClangorousSoulStarBuffEffect call ClangorousSoulStarBuffEffect call ClangorousSoulStarBuffEffect @@ -13638,21 +13636,21 @@ Move_CLANGOROUS_SOUL:: waitforvisualfinish loadspritegfx ANIM_TAG_THIN_RING @ring playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - launchtemplate gClangorousSoulRedRingTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gClangorousSoulRedRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish end ClangorousSoulStarBuffEffect: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtemplate gClangorousSoulBlueBuffTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gClangorousSoulBlueBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gClangorousSoulPurpleBuffTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xfff1 0x0 0x0 0x0 0x20 0x3c + createsprite gClangorousSoulPurpleBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x0, 0x0, 0x20, 0x3c delay 0x4 - launchtemplate gClangorousSoulWhiteBuffTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gClangorousSoulWhiteBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xc 0xfffb 0x0 0x0 0x20 0x3c + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, 0x0, 0x0, 0x20, 0x3c return Move_BODY_PRESS:: @@ -13660,15 +13658,15 @@ Move_BODY_PRESS:: loadspritegfx ANIM_TAG_GRAY_SMOKE @smoke createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ROUND_SHADOW, 0, 0xD, 0xD, 0x1E5D @Orange playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtemplate gVerticalDipSpriteTemplate 0x2 0x3 0x6 0x1 0x0 + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 0x6, 0x1, 0x0 delay 0x7 - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 @Fly up + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 @Fly up waitforvisualfinish delay 0x2F - launchtemplate gBounceBallLandSpriteTemplate 0x83 0x0 @Bounce down + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 @Bounce down delay 0x2 playsewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER - launchtask AnimTask_SquishTarget 0x2 0x0 + createvisualtask AnimTask_SquishTarget, 0x2 waitforvisualfinish end @@ -13685,51 +13683,51 @@ Move_DRUM_BEATING:: splitbgprio ANIM_TARGET setalpha 12, 8 call BellyDrumRight - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER delay 0xf call BellyDrumLeft - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x1 0x1 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1, 0x1, 0x0 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER delay 0xf call BellyDrumRight - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x3 0x3 0x80 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x3, 0x3, 0x80 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER delay 0x7 call BellyDrumLeft - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x2 0x0 0x80 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2, 0x0, 0x80 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER delay 0x7 call BellyDrumRight - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x1 0x1 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0x1, 0x0 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER delay 0x7 call BellyDrumLeft - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x0 0x3 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0x3, 0x0 playsewithpan SE_M_BELLY_DRUM, SOUND_PAN_ATTACKER - launchtemplate gFrenzyPlantRootSpriteTemplate 0x2 0x6 0x55 0x10 0x6 0x0 0x3 0x50 + createsprite gFrenzyPlantRootSpriteTemplate, ANIM_ATTACKER, 2, 0x55, 0x10, 0x6, 0x0, 0x3, 0x50 playsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET delay 0x5 - launchtemplate gFrenzyPlantRootSpriteTemplate 0x2 0x6 0x55 0xfff0 0xfffa 0x0 0x2 0x4b + createsprite gFrenzyPlantRootSpriteTemplate, ANIM_ATTACKER, 2, 0x55, 0xfff0, 0xfffa, 0x0, 0x2, 0x4b playsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET delay 0x5 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff6 0xfff6 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xfff6, 0x1, 0x3 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x3 0x5 ANIM_TARGET 0x8 0x0 0x14 0x1 + createvisualtask AnimTask_ShakeMon, 0x3, ANIM_TARGET, 0x8, 0x0, 0x14, 0x1 delay 0x3 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xa 0x8 0x1 0x3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xa, 0x8, 0x1, 0x3 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET delay 0x3 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xa 0xfffd 0x1 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xa, 0xfffd, 0x1, 0x2 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET delay 0x3 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfffd 0x1 0x1 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfffd, 0x1, 0x1, 0x2 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0xfff6 0x1 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0xfff6, 0x1, 0x1, 0x1 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0xa 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xa, 0x1, 0x1 playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -13743,27 +13741,27 @@ Move_PYRO_BALL:: loadspritegfx ANIM_TAG_FLAT_ROCK loadspritegfx ANIM_TAG_SMALL_EMBER playsewithpan SE_LEDGE, SOUND_PAN_ATTACKER @;Hop - launchtemplate gPyroBallRockTemplate, 2, 0x3, 0, 0, 0 + createsprite gPyroBallRockTemplate, ANIM_ATTACKER, 2, 0, 0, 0 delay 0x19 playsewithpan SE_LEDGE, SOUND_PAN_ATTACKER @;Hop delay 0x19 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x3 0x0 0x7 0x043D - launchtemplate gPyroBallBurningRockTemplate, 2, 0x3, 0, 0, 0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x3, 0x0, 0x7, 0x043D + createsprite gPyroBallBurningRockTemplate, ANIM_ATTACKER, 2, 0, 0, 0 delay 0x19 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_TARGET delay 0x19 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_TARGET - launchtemplate gPyroBallFlamesUpTemplate, 2, 0x3, 0, 0, 1 + createsprite gPyroBallFlamesUpTemplate, ANIM_ATTACKER, 2, 0, 0, 1 delay 0x19 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET - launchtemplate gPyroBallEmberBallTemplate, 2, 0x6, 0, 10, 0, 5, 20, -20 + createsprite gPyroBallEmberBallTemplate, ANIM_ATTACKER, 2, 0, 10, 0, 5, 20, -20 waitforvisualfinish - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0xc 0x1f - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0xf 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x2, 0x0, 0xc, 0x1f + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0xf, 0x1 call FireSpreadEffect delay 0x20 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x7 0x0 0x043D + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x7, 0x0, 0x043D waitforvisualfinish end @@ -13783,39 +13781,39 @@ Move_AURA_WHEEL:: setalpha 12, 8 monbg ANIM_DEF_PARTNER splitbgprio_foes ANIM_TARGET - launchtemplate gAuraWheelBlueElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x0 + createsprite gAuraWheelBlueElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelRedElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x4 + createsprite gAuraWheelRedElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelBlueElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x8 + createsprite gAuraWheelBlueElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelRedElectricityTemplate 3, 0x4 0x0 0x0 0x38 0xc + createsprite gAuraWheelRedElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelBlueElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x10 + createsprite gAuraWheelBlueElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelRedElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x14 + createsprite gAuraWheelRedElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gAuraWheelBlueElectricityTemplate 3, 0x4 0x0 0x0 0x38 0x18 + createsprite gAuraWheelBlueElectricityTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x18 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 2, 0x5 0x0 0x18 0x0 0x0 0x6 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x18, 0x0, 0x0, 0x6 delay 0x4 playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x5 0x0 0x17 0x1 - launchtemplate gBasicHitSplatSpriteTemplate 0x4 0x4 0xfff6 0x0 0x1 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x5, 0x0, 0x17, 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0xfff6, 0x0, 0x1, 0x0 createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SPARK_2, 2, 12, 0, 0x76E1 @Revert blue Electricity - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84, 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84, 0x8 0x0 0x0 0x30 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84, 0x8 0x0 0x0 0x30 0x2c 0x80 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84, 0x8 0x0 0x0 0x30 0x2c 0xc0 0x28 0x2 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x80, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0xc0, 0x28, 0x2, 0x8003 delay 0x7 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 2, 0x3 0x0 0x0 0x9 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x9 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -13828,22 +13826,22 @@ Move_BREAKING_SWIPE:: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SPARK_2, 0, 12, 12, 0x001F @Red monbg ANIM_TARGET setalpha 12, 8 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xffe0 0xfff0 0x1 0x1 - launchtemplate gBreakingSwipeCenteredElectricity 0x82, 0x4, 0x5 0x0 0x5 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0xfff0, 0x1, 0x1 + createsprite gBreakingSwipeCenteredElectricity, ANIM_TARGET, 2, 0x5, 0x0, 0x5, 0x0 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x3 0x15 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_DEF_PARTNER 0x0 0x3 0x15 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x3, 0x15, 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_DEF_PARTNER, 0x0, 0x3, 0x15, 0x1 delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x1 - launchtemplate gBreakingSwipeCenteredElectricity 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x1 + createsprite gBreakingSwipeCenteredElectricity, ANIM_TARGET, 2, 0xfff1, 0xfff6, 0x5, 0x0 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gRandomPosHitSplatSpriteTemplate 0x83 0x2 0x1 0x1 - launchtemplate gBreakingSwipeCenteredElectricity 0x82, 0x4, 0xfff8 0x8 0x5 0x2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x1, 0x1 + createsprite gBreakingSwipeCenteredElectricity, ANIM_TARGET, 2, 0xfff8, 0x8, 0x5, 0x2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 0x4 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x20 0x14 0x1 0x1 - launchtemplate gBreakingSwipeCenteredElectricity 0x82, 0x4, 0xffec 0xf 0x5 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x14, 0x1, 0x1 + createsprite gBreakingSwipeCenteredElectricity, ANIM_TARGET, 2, 0xffec, 0xf, 0x5, 0x1 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitsound waitforvisualfinish @@ -13855,10 +13853,10 @@ Move_BRANCH_POKE:: loadspritegfx ANIM_TAG_BRANCH loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER - launchtemplate gBranchPokeBranchTemplate, 0x82, 0x3 0x0 0x0 0x25 + createsprite gBranchPokeBranchTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x25 waitforvisualfinish - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x5 0x0 0x6 0x1 - launchtemplate gFlashingHitSplatSpriteTemplate, 0x83, 0x4 0x0 0x0 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x5, 0x0, 0x6, 0x1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET waitforvisualfinish end @@ -13880,13 +13878,13 @@ Move_OVERDRIVE:: end OverdriveRings: playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET - launchtemplate gSimplePaletteBlendSpriteTemplate 0x2 0x5 0x1f 0x3 0x8 0x0 0x3ff - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffb 0xfffb 0x5 0x0 0x0 - launchtemplate gHyperVoiceRingSpriteTemplate 0x0 0x7 0x2d 0x0 0x0 0x0 0x0 0x0 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x1 0x0 0x6 0x1 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x3 0x1 0x0 0x6 0x1 - launchtask AnimTask_ShakeBattleTerrain 0x2 0x4 0x1 0x0 0x6 0x1 - launchtask SoundTask_WaitForCry 0x5 0x0 + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x1f, 0x3, 0x8, 0x0, 0x3ff + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffb, 0xfffb, 0x5, 0x0, 0x0 + createsprite gHyperVoiceRingSpriteTemplate, ANIM_ATTACKER, 0, 0x2d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x1, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x3, 0x1, 0x0, 0x6, 0x1 + createvisualtask AnimTask_ShakeBattleTerrain, 0x2, 0x1, 0x0, 0x6, 0x1 + createvisualtask SoundTask_WaitForCry, 0x5 return Move_APPLE_ACID:: @@ -13894,32 +13892,32 @@ Move_APPLE_ACID:: loadspritegfx ANIM_TAG_POISON_BUBBLE createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_POISON_BUBBLE, 0, 12, 12, 0x061D @Orange playsewithpan SE_M_METRONOME, SOUND_PAN_ATTACKER - launchtemplate gAppleAcidFloatingAppleTemplate 0xc 0x1 0x0 + createsprite gAppleAcidFloatingAppleTemplate, ANIM_ATTACKER, 12, 0x0 delay 0x30 monbg ANIM_TARGET - launchtemplate gAppleAcidLaunchTemplate 0x82, 0x6 0x14 0x0 0x28 0x1 0x0 0x0 + createsprite gAppleAcidLaunchTemplate, ANIM_TARGET, 2, 0x14, 0x0, 0x28, 0x1, 0x0, 0x0 playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 0x5 - launchtemplate gAppleAcidLaunchTemplate 0x82, 0x6 0x14 0x0 0x28 0x1 0x18 0x0 + createsprite gAppleAcidLaunchTemplate, ANIM_TARGET, 2, 0x14, 0x0, 0x28, 0x1, 0x18, 0x0 playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 0x5 - launchtemplate gAppleAcidLaunchTemplate 0x82, 0x6 0x14 0x0 0x28 0x1 0xffe8 0x0 + createsprite gAppleAcidLaunchTemplate, ANIM_TARGET, 2, 0x14, 0x0, 0x28, 0x1, 0xffe8, 0x0 playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER delay 0xf - launchtask AnimTask_ShakeMon2 0x5 0x5 ANIM_TARGET 0x2 0x0 0xa 0x1 - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0x0 0xffea 0x0 0xf 0x37 + createvisualtask AnimTask_ShakeMon2, 0x5, ANIM_TARGET, 0x2, 0x0, 0xa, 0x1 + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0x0, 0xffea, 0x0, 0xf, 0x37 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xffe6 0xffe8 0x0 0xf 0x37 + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xffe6, 0xffe8, 0x0, 0xf, 0x37 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xf 0xffe5 0x0 0xf 0x32 + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xf, 0xffe5, 0x0, 0xf, 0x32 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0xfff1 0xffef 0x0 0xa 0x2d + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0xfff1, 0xffef, 0x0, 0xa, 0x2d playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET delay 0xa - launchtemplate gAppleAcidDripTemplate 0x82, 0x5 0x1b 0xffea 0x0 0xf 0x32 + createsprite gAppleAcidDripTemplate, ANIM_TARGET, 2, 0x1b, 0xffea, 0x0, 0xf, 0x32 playsewithpan SE_M_BUBBLE, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -13929,48 +13927,48 @@ Move_GRAV_APPLE:: loadspritegfx ANIM_TAG_APPLE fadetobg BG_IN_AIR waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xf800 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xf800, 0x0, 0xffff waitbgfadein call SmallAppleShower call SmallAppleShower - launchtemplate gGravAppleLargeApple, 0x82, 0x4, 0x0, 0x3c, 4, ANIM_TARGET + createsprite gGravAppleLargeApple, ANIM_TARGET, 2, 0x0, 0x3c, 4, ANIM_TARGET delay 0x7 playsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0 0x15 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0, 0x15, 0x0, 0x4 delay 0x30 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 waitforvisualfinish call UnsetPsychicBg end SmallAppleShower: - launchtemplate gGravAppleSmallApple, 0x82, 0x4, 35, 0x3c, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, 35, 0x3c, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, -30, 0x44, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, -30, 0x44, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, 27, 0x37, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, 27, 0x37, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, -20, 0x32, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, -20, 0x32, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, 33, 0x3a, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, 33, 0x3a, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, -12, 0x3a, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, -12, 0x3a, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, 19, 0x3c, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, 19, 0x3c, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, -38, 0x3a, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, -38, 0x3a, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, 5, 0x3c, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, 5, 0x3c, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 - launchtemplate gGravAppleSmallApple, 0x82, 0x4, -23, 0x28, 4, ANIM_TARGET + createsprite gGravAppleSmallApple, ANIM_TARGET, 2, -23, 0x28, 4, ANIM_TARGET playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x2 return @@ -13989,7 +13987,7 @@ Move_STRANGE_STEAM:: call StrangeSteamCloud call StrangeSteamCloud call StrangeSteamCloud - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x2 0x0 0x2A 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x2, 0x0, 0x2A, 0x1 call StrangeSteamCloud call StrangeSteamCloud call StrangeSteamCloud @@ -14015,23 +14013,23 @@ Move_LIFE_DEW:: loadspritegfx ANIM_TAG_WATER_DROPLET loadspritegfx ANIM_TAG_BLUE_STAR monbg ANIM_ATK_PARTNER - launchtemplate gLifeDewDropletTemplate, 2, 0x3, 0, 0, ANIM_ATTACKER - launchtemplate gLifeDewDropletTemplate, 2, 0x3, 0, 0, ANIM_ATK_PARTNER + createsprite gLifeDewDropletTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_ATTACKER + createsprite gLifeDewDropletTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_ATK_PARTNER delay 0x15 playsewithpan SE_M_BUBBLE, SOUND_PAN_ATTACKER waitforvisualfinish playsewithpan SE_M_ABSORB_2, SOUND_PAN_ATTACKER - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, 0, -5, ANIM_ATTACKER, FALSE - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, 0, -5, ANIM_ATK_PARTNER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, 0, -5, ANIM_ATTACKER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, 0, -5, ANIM_ATK_PARTNER, FALSE delay 0x7 - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, -15, 10, ANIM_ATTACKER, FALSE - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, -15, 10, ANIM_ATK_PARTNER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, -15, 10, ANIM_ATTACKER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, -15, 10, ANIM_ATK_PARTNER, FALSE delay 0x7 - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, -15, -15, ANIM_ATTACKER, FALSE - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, -15, -15, ANIM_ATK_PARTNER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, -15, -15, ANIM_ATTACKER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, -15, -15, ANIM_ATK_PARTNER, FALSE delay 0x7 - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, 10, -5, ANIM_ATTACKER, FALSE - launchtemplate gLifeDewSpecialOrbsTemplate, 2, 0x4, 10, -5, ANIM_ATK_PARTNER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, 10, -5, ANIM_ATTACKER, FALSE + createsprite gLifeDewSpecialOrbsTemplate, ANIM_ATTACKER, 2, 10, -5, ANIM_ATK_PARTNER, FALSE delay 0x7 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -14043,16 +14041,16 @@ Move_OBSTRUCT:: loadspritegfx ANIM_TAG_OBSTRUCT_CROSS createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_NOISE_LINE, 0, 10, 10, 0 @Black createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_PROTECT, 0, 10, 10, 0 @Black - launchtask SoundTask_PlayDoubleCry 0x2 0x2 ANIM_ATTACKER 0xff + createvisualtask SoundTask_PlayDoubleCry, 0x2, ANIM_ATTACKER, 0xff call RoarEffect waitforvisualfinish delay 0x10 monbg ANIM_ATK_PARTNER splitbgprio ANIM_ATTACKER waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 - launchtemplate gProtectSpriteTemplate, 2, 0x3 0x18 0x0 0x5a @;Protect + createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0x0, 0x5a @;Protect waitforvisualfinish - launchtemplate gObstructCrossTemplate, 2, 0x4 0x0 0x0 0x1 0x24 + createsprite gObstructCrossTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x24 playsewithpan SE_M_LEER, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -14066,38 +14064,38 @@ Move_METEOR_ASSAULT:: loadspritegfx ANIM_TAG_METEOR loadspritegfx ANIM_TAG_EXPLOSION createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_ELECTRIC_ORBS, 0, 12, 12, 0x0B1D @Light orange - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_ATK, 1, 0, 9, 0x0B1D @Light orange - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x30 0x0 0x4 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 1, 0, 9, 0x0B1D @Light orange + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x30, 0x0, 0x4 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER waitforvisualfinish invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate, 0x83, 0x1 0x0 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER delay 0xF - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_ATK | ANIM_PAL_BG), 1, 0x10, 0x10, 0x7FFF @Screen flash white - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0 0x5 0x20 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATTACKER), 1, 0x10, 0x10, 0x7FFF @Screen flash white + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x0, 0x5, 0x20, 0x1 call BasicExplosion call BasicExplosion waitforvisualfinish visible ANIM_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (ANIM_PAL_ATK | ANIM_PAL_BG), 1, 0x10, 0, 0x7FFF @Screen revert from white + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATTACKER), 1, 0x10, 0, 0x7FFF @Screen revert from white waitforvisualfinish end BasicExplosion: playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0x0 0x0 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 delay 0x3 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0x18 0xffe8 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, 0x1, 0x1 delay 0x3 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0xfff0 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, 0x1, 0x1 delay 0x3 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0xffe8 0xfff4 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, 0x1, 0x1 delay 0x3 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate, 0x83, 0x4 0x10 0x10 0x1 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, 0x1, 0x1 return Move_ETERNA_BEAM:: @@ -14110,7 +14108,7 @@ Move_STEEL_BEAM:: delay 48 loadspritegfx ANIM_TAG_ELECTRIC_ORBS loadspritegfx ANIM_TAG_GUST - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x14 0x0 0x2 + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x14, 0x0, 0x2 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 20 loadspritegfx ANIM_TAG_STEEL_BEAM @@ -14176,7 +14174,7 @@ Move_METEOR_BEAM:: end @to do: Move_SHELL_SIDE_ARM:: - launchtask AnimTask_ShellSideArm 0x5 0x0 + createvisualtask AnimTask_ShellSideArm, 0x5 jumpargeq 0x0, TRUE, Move_SHELL_SIDE_ARM_PHYSICAL jumpargeq 0x0, FALSE, Move_SHELL_SIDE_ARM_SPECIAL Move_SHELL_SIDE_ARM_PHYSICAL: @ Modified Body Slam, placeholder @@ -14211,13 +14209,13 @@ Move_SHELL_SIDE_ARM_SPECIAL: @ Modified Snipe Shot, placeholder createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT_2, 0, 6, 6, RGB_MAGENTA createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_LEER, 0, 6, 6, RGB_MAGENTA playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x82, 2 0x18 -12 + createsprite gLeerSpriteTemplate, ANIM_TARGET, 2, 0x18, -12 waitforvisualfinish delay 0x20 playsewithpan SE_M_GIGA_DRAIN, SOUND_PAN_TARGET - launchtemplate gSnipeShotBallTemplate 0x82, 3, 0 0 24, + createsprite gSnipeShotBallTemplate, ANIM_TARGET, 2, 0, 0, 24 waitforvisualfinish - launchtask AnimTask_ShakeMon2 2 5 1 4 0 8, 1 + createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 8, 1 waitforvisualfinish end @@ -14235,7 +14233,7 @@ Move_TERRAIN_PULSE:: monbg ANIM_TARGET setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 7, RGB_BLACK - launchtask AnimTask_TerrainPulse 0x5 0x0 + createvisualtask AnimTask_TerrainPulse, 0x5 jumpargeq 0x0, TYPE_ELECTRIC, TerrainPulseElectric jumpargeq 0x0, TYPE_GRASS, TerrainPulseGrass jumpargeq 0x0, TYPE_FAIRY, TerrainPulseFairy @@ -14339,19 +14337,19 @@ Move_POLTERGEIST:: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 0, 16, 0, RGB_BLACK playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER delay 0x1 - launchtask AnimTask_DestinyBondWhiteShadow 0x5 0x2 0x0 0x24 + createvisualtask AnimTask_DestinyBondWhiteShadow, 0x5, 0x0, 0x24 delay 0x30 playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET createvisualtask AnimTask_PoltergeistItem, 2 waitforvisualfinish setalpha 12, 8 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x5 0x5 0x1 - launchtemplate gComplexPaletteBlendSpriteTemplate 0x2 0x7 0x7 0x5 0x1 0x0 0xa 0x0 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x5, 0x5, 0x1 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 0x7, 0x5, 0x1, 0x0, 0xa, 0x0, 0x0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish - launchtask AnimTask_NightmareClone 0x2 0x0 - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0x28 0x1 + createvisualtask AnimTask_NightmareClone, 0x2 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0x28, 0x1 playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET waitforvisualfinish restorebg @@ -16009,25 +16007,25 @@ Move_SPARK: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_SPARK_2 delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 5, 5, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 5, 5, RGB(31, 31, 22) playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 32, 24, 190, 12, ANIM_ATTACKER, 1, 0 delay 0 createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 80, 24, 22, 12, ANIM_ATTACKER, 1, 0 createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 156, 24, 121, 13, ANIM_ATTACKER, 1, 1 delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) delay 10 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 5, 5, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 5, 5, RGB(31, 31, 22) playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 100, 24, 60, 10, ANIM_ATTACKER, 1, 0 createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 170, 24, 42, 11, ANIM_ATTACKER, 1, 1 delay 0 createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 238, 24, 165, 10, ANIM_ATTACKER, 1, 1 delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) delay 20 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 7, 7, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 7, 7, RGB(31, 31, 22) playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 0, 20, 0, 0 createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 64, 20, 1, 0 @@ -16039,7 +16037,7 @@ Move_SPARK: createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 224, 20, 2, 0 delay 4 waitforvisualfinish - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_BG | F_PAL_ATTACKER, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 4 playsewithpan SE_M_HYPER_BEAM, SOUND_PAN_TARGET @@ -16989,7 +16987,7 @@ SkyAttackSetUp: jumpretfalse SkyAttackSetUpAgainstOpponent goto SkyAttackSetUpAgainstPartner SkyAttackSetUpAgainstOpponent: - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER, 1, 0, 12, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER), 1, 0, 12, RGB_BLACK waitforvisualfinish delay 12 createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 1, 8, 0, RGB_BLACK @@ -16999,7 +16997,7 @@ SkyAttackSetUpAgainstOpponent: delay 20 createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 1, 15, 0, RGB_WHITE waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_ATK_PARTNER | F_PAL_DEF_PARTNER, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_ATK_PARTNER | F_PAL_DEF_PARTNER), 1, 8, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -18221,7 +18219,7 @@ Move_AROMATHERAPY: createsprite gSparklingStarsSpriteTemplate, ANIM_ATTACKER, 16, 12, -5, 0, 0, 32, 60, 1 waitforvisualfinish playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_ANIM_1, 3, 10, 0, RGB(13, 31, 12) + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, (F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_ANIM_1), 3, 10, 0, RGB(13, 31, 12) createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 waitforvisualfinish end @@ -19328,14 +19326,14 @@ Move_DRAGON_RAGE: Move_RAIN_DANCE: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 delay 120 delay 30 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -20768,7 +20766,7 @@ Move_SUNNY_DAY: loadspritegfx ANIM_TAG_SUNLIGHT monbg ANIM_ATK_PARTNER setalpha 13, 3 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 1, 0, 6, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 0, 6, RGB_WHITE waitforvisualfinish panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call SunnyDayLightRay @@ -20776,7 +20774,7 @@ Move_SUNNY_DAY: call SunnyDayLightRay call SunnyDayLightRay waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 1, 6, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 6, 0, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -20992,9 +20990,9 @@ Move_HAZE: playsewithpan SE_M_HAZE, 0 createvisualtask AnimTask_HazeScrollingFog, 5 delay 30 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS_2, 2, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS, 2, 0, 16, RGB_BLACK delay 90 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS_2, 1, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS, 1, 16, 0, RGB_BLACK end Move_FIRE_PUNCH: @@ -21815,7 +21813,7 @@ Move_FAKE_OUT: Move_SCARY_FACE: loadspritegfx ANIM_TAG_EYE_SPARKLE - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER, 3, 0, 16, RGB_BLACK + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, (F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER), 3, 0, 16, RGB_BLACK playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER waitforvisualfinish delay 10 @@ -21827,7 +21825,7 @@ Move_SCARY_FACE: waitforvisualfinish createvisualtask AnimTask_ShakeTargetInPattern, 3, 20, 1, FALSE playsewithpan SE_M_STRING_SHOT2, SOUND_PAN_TARGET - createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER, 3, 16, 0, RGB_BLACK + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, (F_PAL_BG | F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER), 3, 16, 0, RGB_BLACK waitforvisualfinish end @@ -22153,7 +22151,7 @@ Move_ENCORE: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_TAG_HAND createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE + createvisualtask AnimTask_HardwarePaletteFade, 2, (BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN), 3, 0, 10, FALSE waitforvisualfinish createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8 createsprite gClappingHandSpriteTemplate, ANIM_ATTACKER, 2, -2, 0, 0, 0, 9 @@ -22164,7 +22162,7 @@ Move_ENCORE: createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET createvisualtask AnimTask_SwayMon, 5, 1, 8, 1536, 5, ANIM_TARGET waitforvisualfinish - createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE + createvisualtask AnimTask_HardwarePaletteFade, 2, (BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN), 3, 10, 0, TRUE waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -22339,7 +22337,7 @@ Move_MORNING_SUN: loadspritegfx ANIM_TAG_BLUE_STAR createvisualtask AnimTask_MorningSunLightBeam, 5 delay 8 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 8, 0, 12, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 8, 0, 12, RGB_WHITE delay 14 call MorningSunStar call MorningSunStar @@ -22356,7 +22354,7 @@ Move_MORNING_SUN: call MorningSunStar call MorningSunStar call MorningSunStar - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 3, 12, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 3, 12, 0, RGB_WHITE waitforvisualfinish waitsound call HealingEffect @@ -22459,7 +22457,7 @@ Move_FLATTER: loadspritegfx ANIM_TAG_CONFETTI createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE + createvisualtask AnimTask_HardwarePaletteFade, 2, (BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN), 3, 0, 10, FALSE waitforvisualfinish createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80 delay 0 @@ -22490,7 +22488,7 @@ Move_FLATTER: delay 5 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_FLATTER, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE + createvisualtask AnimTask_HardwarePaletteFade, 2, (BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN), 3, 10, 0, TRUE waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -24588,13 +24586,13 @@ Status_Infestation: loadspritegfx ANIM_TAG_SMALL_BUBBLES @circle particles monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_DEF, 0x2, 0x0, 0x9, 0x7320 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 30 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x7320 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 30, 0x1 loopsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER, 0x0, 30 call InfestationVortex call InfestationVortex waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7320 + createvisualtask AnimTask_BlendBattleAnimPal, 0xA, F_PAL_TARGET, 0x2, 0x9, 0x0, 0x7320 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -24673,13 +24671,13 @@ General_HangedOn: General_Rain: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 delay 50 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG | F_PAL_BATTLERS_2, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -24923,16 +24921,16 @@ General_ZMoveActivate: loadspritegfx ANIM_TAG_SWEAT_BEAD @blue color loadspritegfx ANIM_TAG_PAW_PRINT @yellow color monbg ANIM_ATTACKER - setblends 0x80c + setalpha 12, 8 fadetobg BG_ZMOVE_ACTIVATE waitbgfadein - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x0, 0x0, 0xFFFF playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle, 0x2, 0x6, ANIM_PAL_ATK, 0x0, 0x6, 0x0, 0xb, 0x76BC + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x0, 0x6, 0x0, 0xb, 0x76BC call ZMoveBuffEffect call ZMoveBuffEffect call ZMoveBuffEffect - launchtemplate gZMoveSymbolSpriteTemplate 0x29 0x4 0x0 0x0 0x0 0x0 + createsprite gZMoveSymbolSpriteTemplate, ANIM_ATTACKER, 41, 0x0, 0x0, 0x0, 0x0 call ZMoveBuffEffect call ZMoveBuffEffect waitforvisualfinish @@ -24941,13 +24939,13 @@ General_ZMoveActivate: clearmonbg ANIM_ATTACKER end ZMoveBuffEffect: - launchtemplate gBlueZMoveEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gBlueZMoveEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x3 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 @Red Buff + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 @Red Buff delay 0x3 - launchtemplate gGreenZMoveEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gGreenZMoveEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x3 - launchtemplate gYellowZMoveEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gYellowZMoveEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x3 return @@ -24957,9 +24955,9 @@ General_TotemFlare:: loadspritegfx ANIM_TAG_SWEAT_BEAD @blue color loadspritegfx ANIM_TAG_PAW_PRINT @yellow color monbg ANIM_ATTACKER - setblends 0x80c + setalpha 12, 8 playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x0 0x6 0x0 0xb 0x1f + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x0, 0x6, 0x0, 0xb, 0x1f call RainbowEndureEffect call RainbowEndureEffect call RainbowEndureEffect @@ -24971,13 +24969,13 @@ General_TotemFlare:: end RainbowEndureEffect: - launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gBlueEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x3 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 @Red Buff + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 @Red Buff delay 0x3 - launchtemplate gGreenEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gGreenEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x3 - launchtemplate gYellowEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gYellowEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x3 return @@ -25007,7 +25005,7 @@ General_StrongWinds:: end General_PrimalReversion:: - launchtask AnimTask_PrimalReversion 0x5 0x0 + createvisualtask AnimTask_PrimalReversion, 0x5 jumpargeq 0x0, ITEM_RED_ORB, General_PrimalReversion_Omega jumpargeq 0x0, ITEM_BLUE_ORB, General_PrimalReversion_Alpha General_PrimalReversion_Alpha: @@ -25070,7 +25068,7 @@ 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 + createvisualtask AnimTask_AffectionHangedOn, 0x5 jumpargeq 0x0, FRIENDSHIP_100_TO_149, General_AffectionHangedOn_3Hearts jumpargeq 0x0, FRIENDSHIP_150_TO_199, General_AffectionHangedOn_4Hearts jumpargeq 0x0, FRIENDSHIP_200_TO_254, General_AffectionHangedOn_5Hearts @@ -25187,75 +25185,75 @@ Move_BREAKNECK_BLITZ:: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT loadspritegfx ANIM_TAG_METEOR loadspritegfx ANIM_TAG_FLAT_ROCK - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0x5 0x20 @ shake screen - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0x5 0x20 @ shake banks + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0x5, 0x20 @ shake screen + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0x5, 0x20 @ shake banks playsewithpan SE_M_EARTHQUAKE, 0x0 monbg ANIM_ATTACKER splitbgprio ANIM_ATTACKER delay 0x1 - launchtask AnimTask_BlendPalInAndOutByTag, 0x5, 0x5, ANIM_TAG_HOLLOW_ORB, 0x4c00, 0xe, 0x0, 0x3 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x0 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x2b - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x55 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x80 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0xaa - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0xd5 + createvisualtask AnimTask_BlendPalInAndOutByTag, 0x5, ANIM_TAG_HOLLOW_ORB, 0x4c00, 0xe, 0x0, 0x3 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x2b + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x55 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x80 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0xaa + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0xd5 delay 0xf - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x0 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x2b - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x55 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0x80 - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0xaa - launchtemplate gBreakneckBlitzDanceSpriteTemplate 0x2 0x1 0xd5 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x2b + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x55 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0x80 + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0xaa + createsprite gBreakneckBlitzDanceSpriteTemplate, ANIM_ATTACKER, 2, 0xd5 waitforvisualfinish clearmonbg ANIM_ATTACKER - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish fadetobg BG_DRILL waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xf700 0x300 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xf700, 0x300, 0x1, 0xffff waitbgfadein - setblends 0x80c + setalpha 12, 8 delay 0x10 - launchtask AnimTask_WindUpLunge 0x5 0x7 0x0 0xffe8 0x8 0x17 0xa 0x28 0xa + createvisualtask AnimTask_WindUpLunge, 0x5, 0x0, 0xffe8, 0x8, 0x17, 0xa, 0x28, 0xa delay 0x23 invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate 0x83 0x1 0x0 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER delay 0x8 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gBreakneckBlitzHitSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x1 @ 0, 0 + createsprite gBreakneckBlitzHitSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x1 @ 0, 0 delay 0x1 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gBreakneckBlitzHitSpriteTemplate 0x83 0x4 0xa 0xfff6 0x1 0x1 @ +10, -10 + createsprite gBreakneckBlitzHitSpriteTemplate, ANIM_TARGET, 3, 0xa, 0xfff6, 0x1, 0x1 @ +10, -10 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER delay 0x1 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gBreakneckBlitzHitSpriteTemplate 0x83 0x4 0xf 0xfff1 0x1 0x1 @ +15, -15 + createsprite gBreakneckBlitzHitSpriteTemplate, ANIM_TARGET, 3, 0xf, 0xfff1, 0x1, 0x1 @ +15, -15 delay 0x1 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gBreakneckBlitzHitSpriteTemplate 0x83 0x4 0x14 0xffec 0x1 0x1 @ +20, -20 + createsprite gBreakneckBlitzHitSpriteTemplate, ANIM_TARGET, 3, 0x14, 0xffec, 0x1, 0x1 @ +20, -20 delay 0x1 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gBreakneckBlitzHitSpriteTemplate 0x83 0x4 0x19 0xffe7 0x1 0x1 @ +25, -25 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe6 0x10 0x1 0x4 + createsprite gBreakneckBlitzHitSpriteTemplate, ANIM_TARGET, 3, 0x19, 0xffe7, 0x1, 0x1 @ +25, -25 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe6, 0x10, 0x1, 0x4 waitforvisualfinish - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x8 0xfe00 0x1 0x0 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x0 0x4 0x0 0xc 0x1 - launchtask AnimTask_ShakeMonInPlace 0x2 0x5 0x1 0x4 0x0 0xc 0x1 + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x8, 0xfe00, 0x1, 0x0 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x0, 0x4, 0x0, 0xc, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x2, 0x1, 0x4, 0x0, 0xc, 0x1 waitforvisualfinish delay 0x4 - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x8 0xfe00 0x1 0x1 + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x8, 0xfe00, 0x1, 0x1 delay 0xa delay 0x19 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x6 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x6 delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish delay 0x10 blendoff clearmonbg ANIM_DEF_PARTNER - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish call UnsetPsychicBg end @@ -25267,85 +25265,85 @@ Move_ALL_OUT_PUMMELING: loadspritegfx ANIM_TAG_METEOR loadspritegfx ANIM_TAG_FLAT_ROCK loadspritegfx ANIM_TAG_FOCUS_ENERGY - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish call EndureEffect loopsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER 0x9 0x2 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x1f - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x1f + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call EndureEffect waitforvisualfinish fadetobg BG_ROCK_WRECKER waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x800 0x0 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x800, 0x0, 0x0, 0xffff waitbgfadein - setblends 0x80c + setalpha 12, 8 monbg ANIM_DEF_PARTNER - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x2 SOUND_PAN_TARGET 0x1 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffd0 0x18 0x0 0x0 0xa 0x1 ANIM_FOOT_1 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x2, SOUND_PAN_TARGET, 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0x18, 0x0, 0x0, 0xa, 0x1, ANIM_FOOT_1, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xfffa 0x12 0x0 0x0 0xa 0x1 ANIM_CHOP 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xfffa, 0x12, 0x0, 0x0, 0xa, 0x1, ANIM_CHOP, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffc0 0x10 0x0 0x0 0xa 0x1 ANIM_FIST_1 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x10, 0x0, 0x0, 0xa, 0x1, ANIM_FIST_1, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffd0 0x15 0x0 0x0 0xa 0x1 ANIM_FOOT_2 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0x15, 0x0, 0x0, 0xa, 0x1, ANIM_FOOT_2, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffd0 0x14 0x0 0x0 0xa 0x1 ANIM_FIST_1 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0x14, 0x0, 0x0, 0xa, 0x1, ANIM_FIST_1, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffe0 0x17 0x0 0x0 0xa 0x1 ANIM_CHOP 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x17, 0x0, 0x0, 0xa, 0x1, ANIM_CHOP, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffc0 0x11 0x0 0x0 0xa 0x1 ANIM_FOOT_1 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x11, 0x0, 0x0, 0xa, 0x1, ANIM_FOOT_1, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffb0 0x10 0x0 0x0 0xa 0x1 ANIM_FOOT_2 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffb0, 0x10, 0x0, 0x0, 0xa, 0x1, ANIM_FOOT_2, 0x1 delay 0x2 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x8 - launchtemplate gAllOutPummelingOnslaughtSpriteTemplate 0x2 0x8 0xffa0 0x15 0x0 0x0 0xa 0x1 ANIM_CHOP 0x1 + createsprite gAllOutPummelingOnslaughtSpriteTemplate, ANIM_ATTACKER, 2, 0xffa0, 0x15, 0x0, 0x0, 0xa, 0x1, ANIM_CHOP, 0x1 delay 0x2 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET delay 0x10 - launchtask AnimTask_WindUpLunge 0x5 0x7 0x0 0xffe8 0x8 0x17 0xa 0x28 0xa + createvisualtask AnimTask_WindUpLunge, 0x5, 0x0, 0xffe8, 0x8, 0x17, 0xa, 0x28, 0xa delay 0x23 invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate 0x83 0x1 0x0 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER delay 0xc playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffd0 0x0 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffd0, 0x0, 0x0, 0x4 waitforvisualfinish delay 0x30 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x7 delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish delay 0x10 blendoff clearmonbg ANIM_DEF_PARTNER - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish call UnsetPsychicBg end @@ -25357,13 +25355,13 @@ Move_SUPERSONIC_SKYSTRIKE: loadspritegfx ANIM_TAG_FOCUS_ENERGY @ focus energy loadspritegfx ANIM_TAG_BIRD @ sky attack bird loadspritegfx ANIM_TAG_IMPACT @ hit - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish monbg ANIM_DEF_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0x8 0x0 0x0 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x0 0x2 0x10 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0x8, 0x0, 0x0 + createvisualtask AnimTask_HorizontalShake, 0x5, 0x0, 0x2, 0x10 playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x1 0xf 0x0 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x1, 0xf, 0x0, 0x7fff clearmonbg ANIM_DEF_PARTNER call EndureEffect delay 0x8 @@ -25371,14 +25369,14 @@ Move_SUPERSONIC_SKYSTRIKE: delay 0x20 delay 0xA playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 delay 0x2 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x12 delay 0x30 - launchtask AnimTask_DoomDesireLightBeam 0x5 0x0 + createvisualtask AnimTask_DoomDesireLightBeam, 0x5 delay 0x9 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER delay 0x9 @@ -25388,37 +25386,37 @@ Move_SUPERSONIC_SKYSTRIKE: delay 0x19 fadetobg BG_SKY waitbgfadeout - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 0x1 SupersonicSkystrikeOnPlayer SupersonicSkystrikeOnOpponent: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xf800 0x800 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xf800, 0x800, 0x0, 0xffff goto FinishSupersonicSkystrike SupersonicSkystrikeOnPlayer: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x800 0xf800 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x800, 0xf800, 0x0, 0xffff FinishSupersonicSkystrike: waitbgfadein waitforvisualfinish monbg ANIM_DEF_PARTNER - setblends 0x80c + setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER - launchtemplate gSupersonicSkystrikeFlySpriteTemplate 0x2 0x1 0x14 + createsprite gSupersonicSkystrikeFlySpriteTemplate, ANIM_ATTACKER, 2, 0x14 delay 0x10 - launchtemplate gBasicHitSplatSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0x15 0x0 0x4 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0xc 0xffe8 0xfff0 0x18 @ 12, -48, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0x10 0xffda 0xfff6 0x18 @ 16, -16, -10, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xe 0xffec 0xffee 0x18 @ 14, -52, -18, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xc 0xffdc 0xfff0 0x18 @ 12, -32, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0xc 0xffd0 0xfff0 0x18 @ 12, -24, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0x10 0xfff0 0xfff6 0x18 @ 16, -38, -10, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xe 0xffcc 0xffee 0x18 @ 14, -20, -18, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xc 0xffe0 0xfff0 0x18 @ 12, -36, -16, 24 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0x15, 0x0, 0x4 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xc, 0xffe8, 0xfff0, 0x18 @ 12, -48, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x10, 0xffda, 0xfff6, 0x18 @ 16, -16, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xe, 0xffec, 0xffee, 0x18 @ 14, -52, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xc, 0xffdc, 0xfff0, 0x18 @ 12, -32, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xc, 0xffd0, 0xfff0, 0x18 @ 12, -24, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x10, 0xfff0, 0xfff6, 0x18 @ 16, -38, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xe, 0xffcc, 0xffee, 0x18 @ 14, -20, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xc, 0xffe0, 0xfff0, 0x18 @ 12, -36, -16, 24 delay 0x30 clearmonbg ANIM_DEF_PARTNER blendoff - launchtask AnimTask_AllBanksVisible 0xA 0x0 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createvisualtask AnimTask_AllBanksVisible, 0xA + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 call UnsetPsychicBg waitforvisualfinish end @@ -25430,82 +25428,82 @@ Move_ACID_DOWNPOUR: loadspritegfx ANIM_TAG_POISON_BUBBLE @ poison bubbles fadetobg BG_POISON waitbgfadeout - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 0x1 AcidDownpourOnPlayer AcidDownpourOnOpponent: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xff10 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xff10, 0x1, 0xffff goto FinishAcidDownpour AcidDownpourOnPlayer: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xf0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xf0, 0x1, 0xffff FinishAcidDownpour: waitbgfadein - setblends 0x80c + setalpha 12, 8 monbg ANIM_ATTACKER loopsewithpan SE_M_TOXIC, SOUND_PAN_TARGET, 0xd, 0x6 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x32, 0x1 call AcidDownpourFlareOnAttacker call AcidDownpourFlareOnAttacker call AcidDownpourFlareOnAttacker delay 0x5 clearmonbg ANIM_ATTACKER - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish blendoff delay 0x20 loopsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET, 0xd, 0x3 - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0x0 - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0x2a - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0x54 - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0x7e - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0xa8 - launchtemplate gAcidDownpourReversalSpriteTemplate 0x2 0x2 0x1a 0xd2 + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x0 + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x2a + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x54 + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x7e + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0xa8 + createsprite gAcidDownpourReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0xd2 delay 0x20 panse SE_M_WHIRLPOOL, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 - launchtask AnimTask_CreateSurfWave 0x2 0x1 ANIM_SURF_PAL_SLUDGE_WAVE - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0x7 0xd87c - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x2 0x32 0x1 + createvisualtask AnimTask_CreateSurfWave, 0x2, ANIM_SURF_PAL_SLUDGE_WAVE + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0x7, 0xd87c + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x2, 0x32, 0x1 call AcidDownpourFlare call AcidDownpourFlare delay 0x15 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xfd00 0x15 0x0 0x2a + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xfd00, 0x15, 0x0, 0x2a delay 0x2c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x7 0x0 0xd87c + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x7, 0x0, 0xd87c invisible ANIM_TARGET waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein waitforvisualfinish end AcidDownpourFlare: - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_TARGET delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_TARGET delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_TARGET delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_TARGET delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_TARGET delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_TARGET + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_TARGET delay 0x2 return AcidDownpourFlareOnAttacker: - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gAcidDownpourAuraSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gAcidDownpourAuraSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 return @@ -25515,36 +25513,36 @@ Move_TECTONIC_RAGE: loadspritegfx ANIM_TAG_MUD_SAND @ rollout small rocks loadspritegfx ANIM_TAG_ROCKS @ rollout loadspritegfx ANIM_TAG_IMPACT @ hit - launchtemplate gDirtMoundSpriteTemplate 0x1 0x3 0x0 0x0 0xb4 - launchtemplate gDirtMoundSpriteTemplate 0x1 0x3 0x0 0x1 0xb4 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0x0, 0x0, 0xb4 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0x0, 0x1, 0xb4 monbg_static ANIM_ATTACKER delay 0x1 - launchtask AnimTask_DigDownMovement 0x2 0x1 0x0 + createvisualtask AnimTask_DigDownMovement, 0x2, 0x0 delay 0x6 call DigThrowDirt call DigThrowDirt call DigThrowDirt call DigThrowDirt - launchtask AnimTask_TectonicRageRollout 0x2 0x0 + createvisualtask AnimTask_TectonicRageRollout, 0x2 call DigThrowDirt - setblends 0x80c + setalpha 12, 8 delay 0x20 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER monbg ANIM_TARGET - launchtemplate gBasicHitSplatSpriteTemplate 0x4 0x4 0x0 0x0 0x1 0x2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x1, 0x2 delay 0x1 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0x15 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0x15, 0x0, 0x4 delay 0xa waitforvisualfinish clearmonbg ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish invisible ANIM_TARGET delay 0x5 invisible ANIM_ATTACKER waitforvisualfinish delay 0xa - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 fadetobg BG_TECTONIC_RAGE @ brown/yellow sky uppercut unloadspritegfx ANIM_TAG_DIRT_MOUND @ dig unloadspritegfx ANIM_TAG_MUD_SAND @ rollout small rocks @@ -25555,73 +25553,73 @@ Move_TECTONIC_RAGE: loadspritegfx ANIM_TAG_EXPLOSION_2 @ explosion waitbgfadeout visible ANIM_TARGET - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xf800 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xf800, 0x0, 0xffff waitbgfadein playsewithpan SE_FALL, SOUND_PAN_ATTACKER @;Falling sound delay 0x1e - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0xc8 0xffe0 0x0 0x64 0x0 - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0x1e 0xffe0 0x10 0x5a 0x1 - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0x96 0xffe0 0x20 0x3c 0x2 - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0x5a 0xffe0 0x30 0x50 0x3 - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0x6e 0xffe0 0x40 0x32 0x0 - launchtemplate gEruptionFallingRockSpriteTemplate 0x28 0x5 0x3c 0xffe0 0x50 0x46 0x1 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0xc8, 0xffe0, 0x0, 0x64, 0x0 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0x1e, 0xffe0, 0x10, 0x5a, 0x1 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0x96, 0xffe0, 0x20, 0x3c, 0x2 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0x5a, 0xffe0, 0x30, 0x50, 0x3 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0x6e, 0xffe0, 0x40, 0x32, 0x0 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 0x3c, 0xffe0, 0x50, 0x46, 0x1 delay 0x16 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0x8 0x3c - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0x8 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0x8, 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0x8, 0x3c loopsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET, 0x10, 0xc delay 0x30 call TectonicRageExplosion playsewithpan SE_M_SACRED_FIRE, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 call TectonicRageExplosion playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffc0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x6 0x6 0xffd8 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffe0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x46 0x6 0x28 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x40 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x28 0x14 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0x0 0x20 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffd8 0x14 0x18 0x0 0x0 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffd8, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffe0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x28, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x40, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x28, 0x14, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x18, 0x0, 0x0, 0x0 call TectonicRageExplosion playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffa0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x6 0x6 0xffc4 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffd0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x46 0x6 0x3c 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x60 0x0 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x42 0x6 0x3c 0x1e 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0x0 0x30 0x18 0x0 0x0 0x0 - launchtemplate gTectonicRageBlastBurnSpriteTemplate 0x2 0x6 0xffc4 0x1e 0x18 0x0 0x0 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffa0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffc4, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffd0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x3c, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x60, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x3c, 0x1e, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x30, 0x18, 0x0, 0x0, 0x0 + createsprite gTectonicRageBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc4, 0x1e, 0x18, 0x0, 0x0, 0x0 call TectonicRageExplosion waitforvisualfinish call UnsetPsychicBg waitbgfadein - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end TectonicRageExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gTectonicRageExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gTectonicRageExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gTectonicRageExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gTectonicRageExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gTectonicRageExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gTectonicRageExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return @@ -25633,27 +25631,27 @@ Move_CONTINENTAL_CRUSH:: loadspritegfx ANIM_TAG_FOCUS_ENERGY @ focus energy loadspritegfx ANIM_TAG_IMPACT @ hit loadspritegfx ANIM_TAG_REALLY_BIG_ROCK - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call ContinentalCrashBuffEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x2dd3 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x2dd3 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call ContinentalCrashBuffEffect delay 0x8 call ContinentalCrashBuffEffect delay 0x4 delay 0xA playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 delay 0x2 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x12 delay 0x30 - launchtask AnimTask_GetTimeOfDay 0x2 0x0 + createvisualtask AnimTask_GetTimeOfDay, 0x2 jumpargeq 0x0 0x0 ContinentalCrushDay jumpargeq 0x0 0x2 ContinentalCrushAfternoon ContinentalCrushNight: @@ -25671,15 +25669,15 @@ FinishContinentalCrush: delay 0x5 visible ANIM_ATTACKER delay 0x4 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x2dd3 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x2dd3 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER call ContinentalCrushStockpileRocks playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER call ContinentalCrushStockpileRocks - launchtemplate gContinentalCrushGrowingRockSpriteTemplate 0x2 0x1 0x0 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x2dd3 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createsprite gContinentalCrushGrowingRockSpriteTemplate, ANIM_ATTACKER, 2, 0x0 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x2dd3 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER call ContinentalCrushStockpileRocks playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER @@ -25689,87 +25687,87 @@ FinishContinentalCrush: fadetobg BG_IN_AIR waitbgfadeout visible ANIM_TARGET - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xf800 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xf800, 0x0, 0xffff waitbgfadein loopsewithpan SE_FALL, SOUND_PAN_ATTACKER, 0x20, 0x4 @;Falling sound delay 0x1e - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0xc8 0xffe0 0x0 0x64 0x0 - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0x1e 0xffe0 0x10 0x5a 0x1 - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0x96 0xffe0 0x20 0x3c 0x2 - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0x5a 0xffe0 0x30 0x50 0x3 - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0x6e 0xffe0 0x40 0x32 0x0 - launchtemplate gContinentalCrushEruptionSpriteTemplate 0x28 0x5 0x3c 0xffe0 0x50 0x46 0x1 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0xc8, 0xffe0, 0x0, 0x64, 0x0 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0x1e, 0xffe0, 0x10, 0x5a, 0x1 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0x96, 0xffe0, 0x20, 0x3c, 0x2 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0x5a, 0xffe0, 0x30, 0x50, 0x3 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0x6e, 0xffe0, 0x40, 0x32, 0x0 + createsprite gContinentalCrushEruptionSpriteTemplate, ANIM_ATTACKER, 40, 0x3c, 0xffe0, 0x50, 0x46, 0x1 delay 0x16 - launchtask AnimTask_HorizontalShake 0x5 0x3 0x5 0x8 0x1c - launchtask AnimTask_HorizontalShake 0x5 0x3 0x4 0x8 0x1c + createvisualtask AnimTask_HorizontalShake, 0x5, 0x5, 0x8, 0x1c + createvisualtask AnimTask_HorizontalShake, 0x5, 0x4, 0x8, 0x1c unloadspritegfx ANIM_TAG_ROUND_SHADOW @ fly unloadspritegfx ANIM_TAG_MUD_SAND @ dig unloadspritegfx ANIM_TAG_FOCUS_ENERGY @ focus energy unloadspritegfx ANIM_TAG_IMPACT @ hit loadspritegfx ANIM_TAG_REALLY_BIG_ROCK delay 0x30 - launchtemplate gContinentalCrushBigRockStompSpriteTemplate, 0x82, 0x4, 0, 0x3c, 3, ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0x7 0x0000 + createsprite gContinentalCrushBigRockStompSpriteTemplate, ANIM_TARGET, 2, 0, 0x3c, 3, ANIM_TARGET + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0x7, 0x0000 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0x15 0x0 0x4 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0xc 0xffe8 0xfff0 0x18 @ 12, -48, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0x10 0xffda 0xfff6 0x18 @ 16, -16, -10, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xe 0xffec 0xffee 0x18 @ 14, -52, -18, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xc 0xffdc 0xfff0 0x18 @ 12, -32, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0xc 0xffd0 0xfff0 0x18 @ 12, -24, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0x10 0xfff0 0xfff6 0x18 @ 16, -38, -10, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xe 0xffcc 0xffee 0x18 @ 14, -20, -18, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xc 0xffe0 0xfff0 0x18 @ 12, -36, -16, 24 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0x15, 0x0, 0x4 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0xc, 0xffe8, 0xfff0, 0x18 @ 12, -48, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10, 0xffda, 0xfff6, 0x18 @ 16, -16, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xe, 0xffec, 0xffee, 0x18 @ 14, -52, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xc, 0xffdc, 0xfff0, 0x18 @ 12, -32, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0xc, 0xffd0, 0xfff0, 0x18 @ 12, -24, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10, 0xfff0, 0xfff6, 0x18 @ 16, -38, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xe, 0xffcc, 0xffee, 0x18 @ 14, -20, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xc, 0xffe0, 0xfff0, 0x18 @ 12, -36, -16, 24 delay 0x5 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x7 0x0 0x0000 @undo pal change on tgt + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x7, 0x0, 0x0000 @undo pal change on tgt delay 0x10 waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 waitforvisualfinish restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein delay 0x4 waitforvisualfinish end ContinentalCrashBuffEffect: - launchtemplate gContinentalCrushFocusEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gContinentalCrushFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gContinentalCrushFocusEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gContinentalCrushFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gContinentalCrushFocusEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gContinentalCrushFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gContinentalCrushFocusEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gContinentalCrushFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gContinentalCrushFocusEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gContinentalCrushFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return ContinentalCrushStockpileRocks: - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x0 0xffc0 0x20 @ 0,-32 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x0, 0xffc0, 0x20 @ 0,-32 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x2c 0xffd4 0x20 @ +44,-44 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x2c, 0xffd4, 0x20 @ +44,-44 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x3c 0x0 0x20 @ +60,0 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x3c, 0x0, 0x20 @ +60,0 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x28 0x28 0x20 @ +40,+40 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x28, 0x28, 0x20 @ +40,+40 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x0 0x38 0x20 @ +0,+56 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x0, 0x38, 0x20 @ +0,+56 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0xffda 0x26 0x20 @ -38,+38 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0xffda, 0x26, 0x20 @ -38,+38 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0xffca 0x0 0x20 @ -54, +0 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0xffca, 0x0, 0x20 @ -54, +0 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0xffdc 0xffdc 0x20 @ -36, -36 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0xffdc, 0xffdc, 0x20 @ -36, -36 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x0 0xffce 0x20 @ 0, -50 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x0, 0xffce, 0x20 @ 0, -50 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x22 0xffde 0x20 @ +34, -34 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x22, 0xffde, 0x20 @ +34, -34 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x2e 0x0 0x20 @ +46, +0 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x2e, 0x0, 0x20 @ +46, +0 delay 0x2 - launchtemplate gContinentalCrushNeedleArmSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0x0 0x20 0x20 0x20 @ +32, +32 + createsprite gContinentalCrushNeedleArmSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x20, 0x20, 0x20 @ +32, +32 delay 0x2 return @@ -25780,12 +25778,12 @@ Move_SAVAGE_SPIN_OUT:: loadspritegfx ANIM_TAG_STRING @string shot loadspritegfx ANIM_TAG_SPIDER_WEB @spider web loadspritegfx ANIM_TAG_MUD_SAND @rocks - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish monbg ANIM_ATTACKER - setblends 0x80c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x4 0x0 - launchtemplate gSavageSpinOutGreenChargeSpriteTemplate 0x2 0x1 0x0 + setalpha 12, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x4, 0x0 + createsprite gSavageSpinOutGreenChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 delay 0x19 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER delay 0x14 @@ -25793,17 +25791,17 @@ Move_SAVAGE_SPIN_OUT:: delay 0xf playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x4 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x4, 0x0, 0x0 clearmonbg ANIM_ATTACKER - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT call gSavageSpinOutStringBlastSpriteTemplateSHOT - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x5 0x0 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x5, 0x0, 0x32, 0x1 call gSavageSpinOutStringBlastSpriteTemplateSHOT call gSavageSpinOutStringBlastSpriteTemplateSHOT call gSavageSpinOutStringBlastSpriteTemplateSHOT - launchtemplate gSpiderWebSpriteTemplate 0x82 0x0 @ spider web + createsprite gSpiderWebSpriteTemplate, ANIM_TARGET, 2 @ spider web call gSavageSpinOutStringBlastSpriteTemplateSHOT delay 0xe blendoff @@ -25815,18 +25813,18 @@ Move_SAVAGE_SPIN_OUT:: delay 0x1 invisible ANIM_TARGET delay 0x0 - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 delay 0x0 jumpargeq 0x7 ANIM_TARGET SavageSpinOutOnPlayer SavageSpinOutOnOpponent: - launchtemplate gSavageSpinOutCacoonSpriteTemplate 0x82 0x6 0x0 ANIM_TARGET 0x2 0x0 0x0 0x80 + createsprite gSavageSpinOutCacoonSpriteTemplate, ANIM_TARGET, 2, 0x0, ANIM_TARGET, 0x2, 0x0, 0x0, 0x80 goto FinishSavageSpinOut SavageSpinOutOnPlayer: - launchtemplate gSavageSpinOutCacoonSpriteTemplate 0x3 0x6 0x0 ANIM_TARGET 0x2 0x0 0x0 0x80 + createsprite gSavageSpinOutCacoonSpriteTemplate, ANIM_ATTACKER, 3, 0x0, ANIM_TARGET, 0x2, 0x0, 0x0, 0x80 FinishSavageSpinOut: fadetobg BG_IN_AIR waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x1000 0x0 0xffff @+0x1000 + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x1000, 0x0, 0xffff @+0x1000 waitbgfadein delay 0x10 call SlowSavageSpinOutBackgroundSpeed @@ -25852,7 +25850,7 @@ FinishSavageSpinOut: delay 0xc call UnsetPsychicBg setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - no idea why though - something to do with the background scrolling - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 @ user fly on screen on enemy side + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 @ user fly on screen on enemy side playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER delay 0x1E unloadspritegfx ANIM_TAG_MUD_SAND @@ -25860,69 +25858,69 @@ FinishSavageSpinOut: loadspritegfx ANIM_TAG_CUT @cut loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion loadspritegfx ANIM_TAG_AIR_WAVE_2 @white/gray - launchtask AnimTask_ShakeMonInPlace 0x82 0x5 ANIM_TARGET 0x4 0x0 0xc 0x1 - launchtask AnimTask_ShakeMonInPlace 0x82 0x5 ANIM_TARGET 0x4 0x0 0xc 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x82, ANIM_TARGET, 0x4, 0x0, 0xc, 0x1 + createvisualtask AnimTask_ShakeMonInPlace, 0x82, ANIM_TARGET, 0x4, 0x0, 0xc, 0x1 createsprite gSavageSpinOutGreenCutSpriteTemplate, ANIM_TARGET, 2, 0x28, 0xffe0, 0x0 createsprite gSavageSpinOutGreenCutSpriteTemplate, ANIM_TARGET, 2, 0x28, 0xffd0, 0x0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET delay 0xc playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSavageSpinOutWhiteExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gSavageSpinOutWhiteExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSavageSpinOutWhiteExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gSavageSpinOutWhiteExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 - launchtemplate gSpiderWebSpriteTemplate 0x82 0x0 @ spider web + createsprite gSpiderWebSpriteTemplate, ANIM_TARGET, 2 @ spider web playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSavageSpinOutWhiteExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gSavageSpinOutWhiteExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSavageSpinOutWhiteExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gSavageSpinOutWhiteExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSavageSpinOutWhiteExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gSavageSpinOutWhiteExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end gSavageSpinOutStringBlastSpriteTemplateSHOT: playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0xe 0xfff4 0x0 0xfff4 0xf 0x0 0x0 - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0x1a 0x8 0xc 0x8 0xf 0x0 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0xe, 0xfff4, 0x0, 0xfff4, 0xf, 0x0, 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0x1a, 0x8, 0xc, 0x8, 0xf, 0x0, 0x0 delay 0x3 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0xe 0xfff4 0x0 0xfff4 0xf 0x1 0x0 - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0x1a 0x8 0xc 0x8 0xf 0x1 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0xe, 0xfff4, 0x0, 0xfff4, 0xf, 0x1, 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0x1a, 0x8, 0xc, 0x8, 0xf, 0x1, 0x0 delay 0x3 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0xe 0xfff4 0x0 0xfff4 0xf 0x2 0x0 - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0x1a 0x8 0xc 0x8 0xf 0x2 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0xe, 0xfff4, 0x0, 0xfff4, 0xf, 0x2, 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0x1a, 0x8, 0xc, 0x8, 0xf, 0x2, 0x0 delay 0x3 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0xe 0xfff4 0x0 0xfff4 0xf 0x3 0x0 - launchtemplate gSavageSpinOutStringBlastSpriteTemplate 0x82 0x7 0x1a 0x8 0xc 0x8 0xf 0x3 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0xe, 0xfff4, 0x0, 0xfff4, 0xf, 0x3, 0x0 + createsprite gSavageSpinOutStringBlastSpriteTemplate, ANIM_TARGET, 2, 0x1a, 0x8, 0xc, 0x8, 0xf, 0x3, 0x0 delay 0x3 return SavageSpinOutCrash_1: createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff8, 0x1, 0x1 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0xc 0xffe8 0xfff0 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0x10 0xffda 0xfff6 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xe 0xffec 0xffee 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xc 0xffdc 0xfff0 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xc, 0xffe8, 0xfff0, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0xffda, 0xfff6, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xe, 0xffec, 0xffee, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xc, 0xffdc, 0xfff0, 0x18 return SavageSpinOutCrash_2: createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0xa, 0xfff8, 0x1, 0x1 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0xc 0xffd0 0xfff0 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0x10 0xfff0 0xfff6 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xe 0xffcc 0xffee 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xc 0xffe0 0xfff0 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xc, 0xffd0, 0xfff0, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0xfff0, 0xfff6, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xe, 0xffcc, 0xffee, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xc, 0xffe0, 0xfff0, 0x18 return SlowSavageSpinOutBackgroundSpeed: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xfd56 0x0 0xffff @-0x2aa + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xfd56, 0x0, 0xffff @-0x2aa delay 0x1 return @@ -25934,13 +25932,13 @@ Move_NEVER_ENDING_NIGHTMARE:: loadspritegfx ANIM_TAG_FIRE_PLUME @blast burn loadspritegfx ANIM_TAG_POISON_BUBBLE @purple loadspritegfx ANIM_TAG_VERTICAL_HEX @hex - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call NeverendingNightmareBuffEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x40c0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x40c0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call NeverendingNightmareBuffEffect delay 0x8 call NeverendingNightmareBuffEffect @@ -25961,100 +25959,100 @@ Move_NEVER_ENDING_NIGHTMARE:: waitforvisualfinish fadetobg BG_NEVERENDING_NIGHTMARE waitbgfadein - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x4 0x78 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x4, 0x78, 0x1 playsewithpan SE_M_WHIRLPOOL, SOUND_PAN_TARGET call NeverendingNightmareHands call NeverendingNightmareHands delay 0xa - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0x10 0x40c0 @ fade to purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0x10, 0x40c0 @ fade to purple playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET loadspritegfx ANIM_TAG_EXPLOSION_2 unloadspritegfx ANIM_TAG_THIN_RING - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_VERTICAL_HEX, 0x2, 0xA, 0xA, 0x580A @;Purple + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_VERTICAL_HEX, 0x2, 0xA, 0xA, 0x580A @;Purple call NeverendingNightmareGeyser playsewithpan SE_M_SACRED_FIRE, SOUND_PAN_TARGET - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET call NeverendingNightmareGeyser playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffc0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x6 0x6 0xffd8 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffe0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x46 0x6 0x28 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x40 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x28 0x14 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0x0 0x20 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffd8 0x14 0x18 0x0 0x0 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffd8, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffe0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x28, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x40, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x28, 0x14, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET call NeverendingNightmareGeyser playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffa0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x6 0x6 0xffc4 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffd0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x46 0x6 0x3c 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x60 0x0 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x42 0x6 0x3c 0x1e 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0x0 0x30 0x18 0x0 0x0 0x0 - launchtemplate gNeverEndingNightmareBlastBurnSpriteTemplate 0x2 0x6 0xffc4 0x1e 0x18 0x0 0x0 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffa0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffc4, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffd0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x3c, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x60, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x3c, 0x1e, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x30, 0x18, 0x0, 0x0, 0x0 + createsprite gNeverEndingNightmareBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc4, 0x1e, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET call NeverendingNightmareGeyser - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x10 0x0 0x40c0 @ fade to normal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x10, 0x0, 0x40c0 @ fade to normal waitforvisualfinish restorebg waitbgfadeout - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end NeverendingNightmareBuffEffect: - launchtemplate gNeverEndingNightmareFocusEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gNeverEndingNightmareFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gNeverEndingNightmareFocusEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gNeverEndingNightmareFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gNeverEndingNightmareFocusEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gNeverEndingNightmareFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gNeverEndingNightmareFocusEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gNeverEndingNightmareFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gNeverEndingNightmareFocusEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gNeverEndingNightmareFocusEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return NeverendingNightmareTargetRings: - launchtemplate gNeverEndingNightmareRingTargetSpriteTemplate 0x83 0x4 0x0 0x0 0x100 0x0 + createsprite gNeverEndingNightmareRingTargetSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x100, 0x0 delay 0x8 return NeverendingNightmareAttackerRings: - launchtemplate gNeverEndingNightmareRingAttackerSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gNeverEndingNightmareRingAttackerSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0xe return NeverendingNightmareHands: - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x0 0xffc0 0x20 @ 0,-32 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x0, 0xffc0, 0x20 @ 0,-32 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x2c 0xffd4 0x20 @ +44,-44 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x2c, 0xffd4, 0x20 @ +44,-44 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x3c 0x0 0x20 @ +60,0 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x3c, 0x0, 0x20 @ +60,0 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x28 0x28 0x20 @ +40,+40 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x28, 0x28, 0x20 @ +40,+40 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x0 0x38 0x20 @ +0,+56 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x0, 0x38, 0x20 @ +0,+56 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0xffda 0x26 0x20 @ -38,+38 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xffda, 0x26, 0x20 @ -38,+38 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0xffca 0x0 0x20 @ -54, +0 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xffca, 0x0, 0x20 @ -54, +0 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0xffdc 0xffdc 0x20 @ -36, -36 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xffdc, 0xffdc, 0x20 @ -36, -36 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x0 0xffce 0x20 @ 0, -50 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x0, 0xffce, 0x20 @ 0, -50 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x22 0xffde 0x20 @ +34, -34 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x22, 0xffde, 0x20 @ +34, -34 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x2e 0x0 0x20 @ +46, +0 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x2e, 0x0, 0x20 @ +46, +0 delay 0x2 - launchtemplate gNeverEndingNightmareHandSpriteTemplate 0x82 0x5 ANIM_TARGET 0x0 0x20 0x20 0x20 @ +32, +32 + createsprite gNeverEndingNightmareHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x20, 0x20, 0x20 @ +32, +32 delay 0x2 return NeverendingNightmareGeyser: @@ -26119,13 +26117,13 @@ Move_CORKSCREW_CRASH:: loadspritegfx ANIM_TAG_MUD_SAND @rock monbg ANIM_ATTACKER invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0xb 0x6318 @fade atker to gray - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_SPIKES, 0x0, 0xC, 0xC, 0x6318 @;Gray + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0xb, 0x6318 @fade atker to gray + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_SPIKES, 0x0, 0xC, 0xC, 0x6318 @;Gray playsewithpan SE_ESCALATOR, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x4f 0x1 - launchtemplate gCorkscrewCrashChargeSpriteTemplate 0x2 0x1 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x4f, 0x1 + createsprite gCorkscrewCrashChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 call CorkscrewCrashMetalFlare call CorkscrewCrashMetalFlare call CorkscrewCrashMetalFlare @@ -26133,50 +26131,50 @@ Move_CORKSCREW_CRASH:: call CorkscrewCrashMetalFlare waitforvisualfinish clearmonbg ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0xb 0x0 0x6318 @fade atker back + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0xb, 0x0, 0x6318 @fade atker back waitforvisualfinish stopsound invisible ANIM_ATTACKER - launchtemplate gCorkscrewCrashCorkscrewFlyUpSpriteTemplate 0x2 0x7 0x0 0x0 0x4e0 0x24 0x15 0x1 ANIM_ATTACKER + createsprite gCorkscrewCrashCorkscrewFlyUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x4e0, 0x24, 0x15, 0x1, ANIM_ATTACKER playsewithpan SE_ESCALATOR, SOUND_PAN_ATTACKER fadetobg BG_HIGHSPEED_OPPONENT waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xf700 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xf700, 0x0, 0x1, 0xffff waitbgfadein - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET CorkscrewCrashOnPlayer CorkscrewCrashOnOpponent: - launchtemplate gCorkscrewCrashRightUpSpriteTemplate 0x32 0x5 0xfff0 0x88 0x100 0x38 0x15 + createsprite gCorkscrewCrashRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x88, 0x100, 0x38, 0x15 waitforvisualfinish delay 0xa - launchtemplate gCorkscrewCrashLeftUpSpriteTemplate 0x32 0x5 0x0120 0x38 0xfff0 0x38 0x15 + createsprite gCorkscrewCrashLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x38, 0xfff0, 0x38, 0x15 waitforvisualfinish visible ANIM_TARGET delay 0x5 goto FinishCorkscrewCrash CorkscrewCrashOnPlayer: - launchtemplate gCorkscrewCrashLeftDownSpriteTemplate 0x32 0x5 0x0120 0x08 0xfff0 0x0f 0x15 + createsprite gCorkscrewCrashLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x08, 0xfff0, 0x0f, 0x15 waitforvisualfinish delay 0xa - launchtemplate gCorkscrewCrashRightDownSpriteTemplate 0x32 0x5 0xfff0 0x38 0x100 0x38 0x15 + createsprite gCorkscrewCrashRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x38, 0x100, 0x38, 0x15 waitforvisualfinish visible ANIM_TARGET delay 0x5 FinishCorkscrewCrash: - launchtemplate gCorkscrewCrashStrikeSpriteTemplate 0x82 0x1 0x14 + createsprite gCorkscrewCrashStrikeSpriteTemplate, ANIM_TARGET, 2, 0x14 loadspritegfx ANIM_TAG_IMPACT @hit delay 0x10 stopsound playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x0 0x0 0x1 0x0 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0xf 0x0 0x4 @ shove target down a bit + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x1, 0x0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0xf, 0x0, 0x4 @ shove target down a bit waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gCorkscrewCrashCorkscrewFlyDownSpriteTemplate 0x83 0x3 0x0 0xffc0 0x0f + createsprite gCorkscrewCrashCorkscrewFlyDownSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xffc0, 0x0f delay 0xf - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x2 0x30 - launchtemplate gCorkscrewCrashCorkscrewFlyDownSpriteTemplate 0x83 0x3 0x0 0xfffe 0x03 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x2, 0x30 + createsprite gCorkscrewCrashCorkscrewFlyDownSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfffe, 0x03 call CorkscrewCrashSpinningWind call CorkscrewCrashSprayRocks delay 0x6 @@ -26186,7 +26184,7 @@ FinishCorkscrewCrash: delay 0x6 call CorkscrewCrashSprayRocks delay 0x0 - launchtemplate gCorkscrewCrashCorkscrewFlyDownSpriteTemplate 0x83 0x3 0x0 0xfffe 0x03 + createsprite gCorkscrewCrashCorkscrewFlyDownSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfffe, 0x03 delay 0x6 call CorkscrewCrashSprayRocks delay 0x6 @@ -26194,72 +26192,72 @@ FinishCorkscrewCrash: delay 0x6 call CorkscrewCrashSprayRocks delay 0x1 - launchtemplate gCorkscrewCrashCorkscrewFlyDownSpriteTemplate 0x83 0x3 0x0 0xfffe 0x03 + createsprite gCorkscrewCrashCorkscrewFlyDownSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfffe, 0x03 delay 0x4 call CorkscrewCrashSprayRocks delay 0x6 call CorkscrewCrashSprayRocks delay 0x6 call CorkscrewCrashSprayRocks - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x2, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff waitforvisualfinish delay 0x10 call ResetFromWhiteScreen waitforvisualfinish end CorkscrewCrashSpinningWind: - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0xfff8 0x1 0x2c 0x0 - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0x0 0x1 0x3c 0x1 - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0x8 0x1 0x3c 0x2 - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0x10 0x1 0x3c 0x3 - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0x18 0x1 0x3c 0x4 - launchtemplate gWhirlwindLineSpriteTemplate 0x3 0x5 0x0 0x20 0x1 0x3c 0x0 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0xfff8, 0x1, 0x2c, 0x0 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x3c, 0x1 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x8, 0x1, 0x3c, 0x2 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x10, 0x1, 0x3c, 0x3 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x18, 0x1, 0x3c, 0x4 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x20, 0x1, 0x3c, 0x0 return CorkscrewCrashMetalFlare: - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gCorkscrewCrashMetalBitSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gCorkscrewCrashMetalBitSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 return CorkscrewCrashSprayRocks: playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0xc 0xffe8 0xfff0 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x0 0x10 0xffda 0xfff6 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xe 0xffec 0xffee 0x18 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 0x1 0x1 0xc 0xffdc 0xfff0 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xc, 0xffe8, 0xfff0, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0xffda, 0xfff6, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xe, 0xffec, 0xffee, 0x18 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x1, 0xc, 0xffdc, 0xfff0, 0x18 return Move_INFERNO_OVERDRIVE:: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge loadspritegfx ANIM_TAG_SMALL_EMBER @fire - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_CIRCLE_OF_LIGHT, 0x0, 0xA, 0xA, 0x1F - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_CIRCLE_OF_LIGHT, 0x0, 0xA, 0xA, 0x1F + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish fadetobg BG_INFERNO_OVERDRIVE waitbgfadeout - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET InfernoOverdriveOnPlayer InfernoOverdriveOnOpponent: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xfb00 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xfb00, 0x0, 0x0, 0xFFFF goto FinishInfernoOverdrive InfernoOverdriveOnPlayer: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0500 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0500, 0x0, 0x0, 0xFFFF FinishInfernoOverdrive: waitbgfadein monbg ANIM_ATTACKER - setblends 0x80c + setalpha 12, 8 loopsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_ATTACKER, 0x13, 0x8 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x4f 0x1 - launchtemplate gInfernoOverdriveChargeSpriteTemplate 0x2 0x1 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x4f, 0x1 + createsprite gInfernoOverdriveChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 call InfernoOverdriveFireSpin call InfernoOverdriveFireSpin call InfernoOverdriveFireSpin @@ -26274,17 +26272,17 @@ FinishInfernoOverdrive: loadspritegfx ANIM_TAG_METEOR @superpower loadspritegfx ANIM_TAG_VERTICAL_HEX @red color clearmonbg ANIM_ATTACKER - launchtemplate gInfernoOverdriveSuperpowerSpriteTemplate 0x83 0x1 0x0 @ super power shot + createsprite gInfernoOverdriveSuperpowerSpriteTemplate, ANIM_TARGET, 3, 0x0 @ super power shot playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER delay 0x10 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x8 0x0 0x10 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x8, 0x0, 0x10, 0x1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_TARGET 0x0 0x2 0x4f 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_TARGET, 0x0, 0x2, 0x4f, 0x1 call InfernoOverdriveExplosion delay 0x6 call InfernoOverdriveExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x1, 0x0, 0x10, 0x001b @ red bg pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x001b @ red bg pal delay 0x6 call InfernoOverdriveExplosion waitforvisualfinish @@ -26292,59 +26290,59 @@ FinishInfernoOverdrive: blendoff end InfernoOverdriveFireSpin: - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 return InfernoOverdriveExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gInfernoOverdriveExplosionSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gInfernoOverdriveExplosionSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 return @@ -26355,28 +26353,28 @@ Move_HYDRO_VORTEX:: loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_METEOR @superpower loadspritegfx ANIM_TAG_WATER_ORB @whirlpool - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_CreateSurfWave 0x2 0x1 0x0 + createvisualtask AnimTask_CreateSurfWave, 0x2, 0x0 delay 0x18 panse SE_M_SURF, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 waitforvisualfinish loadspritegfx ANIM_TAG_ROUND_SHADOW playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER - launchtemplate gDiveBallSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gDiveBallSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish playsewithpan SE_M_DIVE, SOUND_PAN_ATTACKER - launchtemplate gDiveWaterSplashSpriteTemplate 0x3 0x1 0x0 + createsprite gDiveWaterSplashSpriteTemplate, ANIM_ATTACKER, 3, 0x0 call DiveSetUpWaterDroplets call DiveSetUpWaterDroplets call DiveSetUpWaterDroplets call DiveSetUpWaterDroplets call DiveSetUpWaterDroplets - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xfd00 0x15 0x0 0x1a + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xfd00, 0x15, 0x0, 0x1a delay 0x1a invisible ANIM_TARGET waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x7 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x7 delay 0x5 fadetobg BG_WATER_PULSE waitbgfadeout @@ -26387,77 +26385,77 @@ Move_HYDRO_VORTEX:: call HydroVortexBubbles loadspritegfx ANIM_TAG_FOCUS_ENERGY playsewithpan SE_M_WATERFALL, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x5da0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x5da0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 waitforvisualfinish unloadspritegfx ANIM_TAG_SPLASH unloadspritegfx ANIM_TAG_SWEAT_BEAD loadspritegfx ANIM_TAG_IMPACT - launchtemplate gHydroVortexSuperpowerSpriteTemplate 0x83 0x1 0x0 + createsprite gHydroVortexSuperpowerSpriteTemplate, ANIM_TARGET, 3, 0x0 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER invisible ANIM_ATTACKER delay 0x10 - launchtemplate gHydroVortexImpactSpriteTemplate 0x83 0x4 0xa 0xfff8 0x1 0x1 + createsprite gHydroVortexImpactSpriteTemplate, ANIM_TARGET, 3, 0xa, 0xfff8, 0x1, 0x1 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0x10 0x5da0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0x10, 0x5da0 loadspritegfx ANIM_TAG_GUST - launchtask AnimTask_HorizontalShake 0x5 0x3 0x1 0x8 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, 0x1, 0x8, 0x3c call HydroVortexWhirlpoolHurricane call HydroVortexWhirlpoolHurricane call HydroVortexWhirlpoolHurricane call HydroVortexWhirlpoolHurricane waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x10 0x0 0x5da0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x10, 0x0, 0x5da0 waitforvisualfinish restorebg waitbgfadeout - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end HydroVortexBubbles: - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0xa 0xa 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate, ANIM_TARGET, 2, 0xa, 0xa, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0x14 0xffec 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0x14, 0xffec, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate, ANIM_TARGET, 2, 0x14, 0xffec, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0xfff1 0xf 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0xf, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0xfff1, 0xf, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0x0 0x0 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0x0, 0x0, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0xfff6 0xffec 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0xfff6, 0xffec, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0xfff6, 0xffec, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0x10 0xfff8 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0xfff8, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0x10, 0xfff8, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0x5 0x8 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0x5, 0x8, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0x5, 0x8, 0x14, ANIM_TARGET delay 0x4 - launchtemplate gSmallBubblePairSpriteTemplate 0x2 0x4 0xfff0 0x0 0x14 ANIM_ATTACKER + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0x0, 0x14, ANIM_ATTACKER createsprite gSmallBubblePairSpriteTemplate ANIM_TARGET, 2, 0xfff0, 0x0, 0x14, ANIM_TARGET return HydroVortexWhirlpoolHurricane: playsewithpan SE_M_WHIRLPOOL, SOUND_PAN_TARGET - launchtemplate gHydroVortexHurricaneSpriteTemplate 0x82 0x2 0x0 0xfff0 - launchtemplate gHydroVortexImpactSpriteTemplate 0x83 0x4 0xfff6 0xfff8 0x1 0x1 - launchtask AnimTask_AnimateGustTornadoPalette 0x5 0x2 0x1 0x46 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 0x1 + createsprite gHydroVortexHurricaneSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff0 + createsprite gHydroVortexImpactSpriteTemplate, ANIM_TARGET, 3, 0xfff6, 0xfff8, 0x1, 0x1 + createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, 0x1 delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 0x1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, 0x1 delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a 0x1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, 0x1 delay 0x2 - launchtemplate gHydroVortexImpactSpriteTemplate 0x83 0x4 0xa 0xfff8 0x1 0x1 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 0x1 + createsprite gHydroVortexImpactSpriteTemplate, ANIM_TARGET, 3, 0xa, 0xfff8, 0x1, 0x1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, 0x1 delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e 0x1 - launchtemplate gHydroVortexHurricaneSpriteTemplate 0x82 0x2 0x0 0xfff0 - launchtask AnimTask_AnimateGustTornadoPalette 0x5 0x2 0x1 0x46 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, 0x1 + createsprite gHydroVortexHurricaneSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff0 + createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46 delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce 0x1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, 0x1 delay 0x2 return @@ -26469,33 +26467,33 @@ Move_BLOOM_DOOM:: loadspritegfx ANIM_TAG_GUST @hurricane loadspritegfx ANIM_TAG_VERTICAL_HEX @hex diamond monbg ANIM_ATTACKER - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - setblends 0x80c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x4 0x0 + setalpha 12, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x4, 0x0 loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 0x9, 0x3 - launchtemplate gBloomDoomGreenChargeSpriteTemplate 0x2 0x1 0x0 + createsprite gBloomDoomGreenChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 delay 0x3C blendoff - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x4 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x8 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0xc + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x10 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x14 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x14 delay 0x2 - launchtemplate gBloomDoomPetalSpinSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x18 + createsprite gBloomDoomPetalSpinSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x18 playsewithpan SE_M_ATTRACT, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x4 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x4, 0x0, 0x0 waitforvisualfinish unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT call BloomDoomHurricane @@ -26526,19 +26524,19 @@ Move_BLOOM_DOOM:: waitbgfadein loadspritegfx ANIM_TAG_ORBS delay 0x5 - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x0 0x7 0x18 0x10 0x0 0x2 0x2 0x0 0x0 - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x42 0x7 0x40 0x18 0x0 0x3 0x1 0x1 0x0 - launchtemplate gAromatherapyBigFlowerSpriteTemplate 0x0 0x7 0x10 0x18 0x0 0x2 0x1 0x0 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x18, 0x10, 0x0, 0x2, 0x2, 0x0, 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 66, 0x40, 0x18, 0x0, 0x3, 0x1, 0x1, 0x0 + createsprite gAromatherapyBigFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x10, 0x18, 0x0, 0x2, 0x1, 0x0, 0x0 delay 0x5 - launchsoundtask SoundTask_LoopSEAdjustPanning, 0x7, 0xf0, 0xffc0, SOUND_PAN_TARGET, 0x1, 0xf, 0x0, 0x5 - launchtask AnimTask_ShakeMon 0x2 0x5 0x0 0x0 0x4 0x32 0x1 @ shake attacker + createsoundtask SoundTask_LoopSEAdjustPanning, 0xf0, 0xffc0, SOUND_PAN_TARGET, 0x1, 0xf, 0x0, 0x5 + createvisualtask AnimTask_ShakeMon, 0x2, 0x0, 0x0, 0x4, 0x32, 0x1 @ shake attacker call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x72 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0xb 0x33ed + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x72, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0xb, 0x33ed call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam @@ -26550,9 +26548,9 @@ Move_BLOOM_DOOM:: call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x42 0x7 0x30 0xc 0x0 0x4 0x3 0x1 0x0 - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x0 0x7 0x64 0x10 0x0 0x3 0x2 0x0 0x0 - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x0 0x7 0x4a 0x18 0xb4 0x3 0x2 0x0 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 66, 0x30, 0xc, 0x0, 0x4, 0x3, 0x1, 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x10, 0x0, 0x3, 0x2, 0x0, 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x4a, 0x18, 0xb4, 0x3, 0x2, 0x0, 0x0 call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam @@ -26563,18 +26561,18 @@ Move_BLOOM_DOOM:: call BloomDoomHyperBeam call BloomDoomHyperBeam call BloomDoomHyperBeam - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x42 0x7 0x50 0x1e 0x0 0x4 0x1 0x1 0x0 - launchtemplate gAromatherapySmallFlowerSpriteTemplate 0x0 0x7 0x80 0xc 0x0 0x3 0x3 0x0 0x0 - launchtemplate gAromatherapyBigFlowerSpriteTemplate 0x0 0x7 0x5a 0x10 0x0 0x2 0x1 0x0 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 66, 0x50, 0x1e, 0x0, 0x4, 0x1, 0x1, 0x0 + createsprite gAromatherapySmallFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x80, 0xc, 0x0, 0x3, 0x3, 0x0, 0x0 + createsprite gAromatherapyBigFlowerSpriteTemplate, ANIM_ATTACKER, 0, 0x5a, 0x10, 0x0, 0x2, 0x1, 0x0, 0x0 delay 0x5 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0xb 0x0 0x33ed + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0xb, 0x0, 0x33ed loadspritegfx ANIM_TAG_EXPLOSION @explosion call BloomDoomPetalBlast - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_DEF, 0x1, 0x0, 0x10, 0x33ed + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x0, 0x10, 0x33ed call BloomDoomPetalBlast - launchtask AnimTask_IsTargetPartner 0x5 0x0 + createvisualtask AnimTask_IsTargetPartner, 0x5 jumpargeq 0x0 0x1 BloomDoomFadeScreenTargetPartner - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL - ANIM_PAL_DEF, 0x1, 0x0, 0x10, 0x33ed @ green bg pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x1, 0x0, 0x10, 0x33ed @ green bg pal BloomDoomEnding: call BloomDoomPetalBlast waitforvisualfinish @@ -26582,76 +26580,76 @@ BloomDoomEnding: call ResetFromGreenScreen end BloomDoomFadeScreenTargetPartner: - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ATK | ANIM_PAL_OPPONENT1 | ANIM_PAL_OPPONENT2, 0x1, 0x0, 0x10, 0x33ed @ green bg pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_ATK_PARTNER), 0x1, 0x0, 0x10, 0x33ed @ green bg pal goto BloomDoomEnding BloomDoomHurricane: - launchtemplate gBloomDoomHurricaneSpriteTemplate 0x2 0x2 0x0 0xfff0 - launchtask AnimTask_AnimateGustTornadoPalette 0x5 0x2 0x1 0x46 + createsprite gBloomDoomHurricaneSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 + createvisualtask AnimTask_AnimateGustTornadoPalette, 0x5, 0x1, 0x46 return BloomDoomFlowerGeyser: - launchtemplate gBloomDoomFlowerGeyserSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0xfffc 0x10 @ -4, -0x10 + createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xfffc, 0x10 @ -4, -0x10 delay 0x0 - launchtemplate gBloomDoomFlowerGeyserSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x100D 0x10 @ + createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x100D, 0x10 delay 0x0 - launchtemplate gBloomDoomFlowerGeyserSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x4 0x10 + createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x4, 0x10 delay 0x0 - launchtemplate gBloomDoomFlowerGeyserSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0xfff0 0x10 + createsprite gBloomDoomFlowerGeyserSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xfff0, 0x10 delay 0x0 return BloomDoomHyperBeam: - launchtemplate gBloomDoomGreenBeamSpriteTemplate 0x82 0x0 - launchtemplate gBloomDoomGreenBeamSpriteTemplate 0x82 0x0 + createsprite gBloomDoomGreenBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite gBloomDoomGreenBeamSpriteTemplate, ANIM_TARGET, 2 delay 0x1 return BloomDoomPetalBlast: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBloomDoomExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x0 0xffe0 0x10 + createsprite gBloomDoomExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe0, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x16 0xffea 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x16, 0xffea, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x1e 0x0 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x1e, 0x0, 0x10 delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBloomDoomExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x14 0x14 0x10 + createsprite gBloomDoomExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x14, 0x14, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x0 0x1c 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x1c, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0xffed 0x13 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffed, 0x13, 0x10 delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBloomDoomExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0xffe5 0x0 0x10 + createsprite gBloomDoomExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffe5, 0x0, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0xffee 0xffee 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0xffee, 0xffee, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x0 0xffe7 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0xffe7, 0x10 delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBloomDoomExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x11 0xffef 0x10 + createsprite gBloomDoomExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x11, 0xffef, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x17 0x0 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x17, 0x0, 0x10 delay 0x2 - launchtemplate gBloomDoomPetalStarSpriteTemplate 0x82 0x5 0x1 0x0 0x10 0x10 0x10 + createsprite gBloomDoomPetalStarSpriteTemplate, ANIM_TARGET, 2, 0x1, 0x0, 0x10, 0x10, 0x10 delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBloomDoomExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gBloomDoomExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x2 return ResetFromGreenScreen: - launchtask AnimTask_AllBanksInvisible 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisible, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS, 0x2, 0x0, 0x0, 0x33ED @Everything from green + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x33ED @Everything from green restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein waitforvisualfinish delay 0x5 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG, 0x1, 0x0, 0x0, 0x33ED + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x0, 0x33ED waitforvisualfinish return @@ -26664,118 +26662,118 @@ Move_GIGAVOLT_HAVOC:: loadspritegfx ANIM_TAG_SPARK_2 loadspritegfx ANIM_TAG_GRAY_SMOKE loadspritegfx ANIM_TAG_THIN_RING - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x6 0x0 0x10 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x6, 0x0, 0x10, 0x0000 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gGigavoltHavocChargingSpearSpriteTemplate 0x2 0x1 ANIM_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x20 0x18 0xbe 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x50 0x18 0x16 0xc 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x9c 0x18 0x79 0xd 0x0 0x1 0x1 + createsprite gGigavoltHavocChargingSpearSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x20, 0x18, 0xbe, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x50, 0x18, 0x16, 0xc, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x9c, 0x18, 0x79, 0xd, 0x0, 0x1, 0x1 delay 0xa playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x0 delay 0x5 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 delay 0x5 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0x20 0x14 0x0 0x0 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0x60 0x14 0x1 0x0 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0xa0 0x14 0x0 0x0 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0xe0 0x14 0x2 0x0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0x20, 0x14, 0x0, 0x0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0x60, 0x14, 0x1, 0x0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0xa0, 0x14, 0x0, 0x0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0xe0, 0x14, 0x2, 0x0 delay 0x5 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0x64 0x18 0x3c 0xa 0x0 0x1 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xaa 0x18 0x2a 0xb 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0x64, 0x18, 0x3c, 0xa, 0x0, 0x1, 0x0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xaa, 0x18, 0x2a, 0xb, 0x0, 0x1, 0x1 delay 0x0 - launchtemplate gSparkElectricitySpriteTemplate 0x0 0x7 0xee 0x18 0xa5 0xa 0x0 0x1 0x1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 0xee, 0x18, 0xa5, 0xa, 0x0, 0x1, 0x1 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER monbg ANIM_ATTACKER playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x3c 0x2 0xc @charge particles to user -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x10 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x10 0x2c 0x60 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x10 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x10 0x2c 0xe0 0x28 0x2 0x3 +@ createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x3c, 0x2, 0xc @charge particles to user +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x10, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x10, 0x2c, 0x60, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x10, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x10, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x12 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x12 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x12 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x12 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x12, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x12, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x12, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x12, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x14 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x14 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x14 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x82 0x8 0x0 0x0 0x14 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x14, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x14, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x14, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x14, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 waitforvisualfinish playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET - launchtemplate gGigavoltHavocLaunchSpearSpriteTemplate 0x83 0x1 0x0 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0x10 0x10 + createsprite gGigavoltHavocLaunchSpearSpriteTemplate, ANIM_TARGET, 3, 0x0 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x10 delay 0x2 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0xfff0 0xfff0 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0, 0xfff0 delay 0xe clearmonbg ANIM_ATTACKER - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x8 0x1c @shake target + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x8, 0x1c @shake target unloadspritegfx ANIM_TAG_HAVOC_SPEAR loadspritegfx ANIM_TAG_SHOCK_3 @thunderbolt - launchtemplate gThunderboltOrbSpriteTemplate 0x83 0x4 0x2c 0x0 0x0 0x3 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x0 0x0 0xc 0x5bff -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x20 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x20 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x20 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x20 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x10 0x2c 0x20 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x10 0x2c 0x60 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x10 0x2c 0xa0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x10 0x2c 0xe0 0x28 0x2 0x8003 + createsprite gThunderboltOrbSpriteTemplate, ANIM_TARGET, 3, 0x2c, 0x0, 0x0, 0x3 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x0, 0x0, 0xc, 0x5bff +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x20, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x20, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x20, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x20, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x10, 0x2c, 0x20, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x10, 0x2c, 0x60, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x10, 0x2c, 0xa0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x10, 0x2c, 0xe0, 0x28, 0x2, 0x8003 playsewithpan SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 0x19 loadspritegfx ANIM_TAG_VERTICAL_HEX @@ -26801,11 +26799,11 @@ Move_GIGAVOLT_HAVOC:: @ call HavocSpearSparkTarget call HavocSpearGeyser playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_DEF, 0x2, 0xc, 0x0, 0x5bff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0xc, 0x0, 0x5bff waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG, 0x1, 0x10, 0x0, 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x0000 waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xa 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xa waitforvisualfinish end HavocSpearGeyser: @@ -26819,14 +26817,14 @@ HavocSpearGeyser: delay 1 return HavocSpearSparkTarget: -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc 0x0 0x14 0x0 0x8000 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0x0 0x14 0x0 0x8000 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc 0x40 0x14 0x1 0x8000 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0x40 0x14 0x1 0x8000 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc 0x80 0x14 0x0 0x8000 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc 0x80 0x14 0x0 0x8000 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x20, 0xc, 0x0, 0x14, 0x0, 0x8000 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0x0, 0x14, 0x0, 0x8000 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x20, 0xc, 0x40, 0x14, 0x1, 0x8000 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0x40, 0x14, 0x1, 0x8000 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x20, 0xc, 0x80, 0x14, 0x0, 0x8000 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, 0x80, 0x14, 0x0, 0x8000 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x20, 0xc, SOUND_PAN_ATTACKER, 0x14, 0x2, 0x8000 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x0, 0x10, 0xc, SOUND_PAN_ATTACKER, 0x14, 0x2, 0x8000 return @@ -26837,46 +26835,46 @@ Move_SHATTERED_PSYCHE:: loadspritegfx ANIM_TAG_THIN_RING @ring loadspritegfx ANIM_TAG_PINK_PETAL @pink loadspritegfx ANIM_TAG_TORN_METAL @brick break shatter - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPalExclude 0x5 0x5 0x0 0x0 0x0 0x10 0x0 + createvisualtask AnimTask_BlendBattleAnimPalExclude, 0x5, 0x0, 0x0, 0x0, 0x10, 0x0 waitforvisualfinish - launchtask AnimTask_SetAllNonAttackersInvisiblity 0x5 0x1 0x1 + createvisualtask AnimTask_SetAllNonAttackersInvisiblity, 0x5, 0x1 waitforvisualfinish - launchtemplate gShatteredPsychePinkChargeSpriteTemplate 0x2 0x1 0x0 - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsychePinkChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0xc - launchtemplate gShatteredPsycheRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gShatteredPsycheRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER delay 0x4 fadetobg BG_SHATTERED_PSYCHE delay 0x4 - launchtask AnimTask_BlendBattleAnimPalExclude 0x5 0x5 0x0 0x0 0x10 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPalExclude, 0x5, 0x0, 0x0, 0x10, 0x0, 0x0 delay 0x7 playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 0x1 0x3 0x0 0xf 0x1 - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffc 0xfffc 0xf 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x3, 0x0, 0xf, 0x1 + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffc, 0xfffc, 0xf, 0x1, 0x1 waitforvisualfinish ShatteredPsycheCheckBattler: - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET ShatteredPsycheOnPlayer ShatteredPsycheOnOpponent: call ShatteredPsycheFlingOpponent @@ -26891,102 +26889,102 @@ ShatteredPsycheFinish: delay 0x8 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET restorebg - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0xf 0x1 - launchtask AnimTask_ScaleMonAndRestore 0x5 0x5 0xfffc 0xfffc 0xf 0x1 0x1 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0xf, 0x1 + createvisualtask AnimTask_ScaleMonAndRestore, 0x5, 0xfffc, 0xfffc, 0xf, 0x1, 0x1 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x0, 0x0, 0x0 @ -8, -12 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0x0 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x2, 0x0, 0x0 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x3, 0x0, 0x0 waitbgfadeout - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end ShatteredPsycheFlingOpponent: - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe6 0x10 0x1 0x4 @ -26, +16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe6, 0x10, 0x1, 0x4 @ -26, +16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x1a 0xfff0 0x1 0x1 @ 26, -16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x1a, 0xfff0, 0x1, 0x1 @ 26, -16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x1a 0xfff0 0x1 0x4 @ -26,-16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1a, 0xfff0, 0x1, 0x4 @ -26,-16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0xffe6 0x10 0x1 0x1 @ 26, 16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0xffe6, 0x10, 0x1, 0x1 @ 26, 16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x0 0x20 0x1 0x4 @ 0,32 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x20, 0x1, 0x4 @ 0,32 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x0 0xffe0 0x1 0x1 @ 0, -32 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xffe0, 0x1, 0x1 @ 0, -32 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x0 0xffe0 0x1 0x4 @ 0,-32 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0xffe0, 0x1, 0x4 @ 0,-32 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x0 0x20 0x1 0x1 @ 0, 32 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x20, 0x1, 0x1 @ 0, 32 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x1a 0x10 0x1 0x4 @ 26,16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1a, 0x10, 0x1, 0x4 @ 26,16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0xffe6 0xfff0 0x1 0x1 @ -26, -16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0xffe6, 0xfff0, 0x1, 0x1 @ -26, -16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe6 0xffe0 0x1 0x4 @ 26,-16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe6, 0xffe0, 0x1, 0x4 @ 26,-16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x1a 0x10 0x1 0x1 @ 0, 32 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x1a, 0x10, 0x1, 0x1 @ 0, 32 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x5 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe6 0x10 0x1 0x4 @ -26, +16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe6, 0x10, 0x1, 0x4 @ -26, +16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x1a 0xfff0 0x1 0x1 @ 26, -16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x1a, 0xfff0, 0x1, 0x1 @ 26, -16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x1a 0xfff0 0x1 0x4 @ -26,-16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1a, 0xfff0, 0x1, 0x4 @ -26,-16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0xffe6 0x10 0x1 0x1 @ 26, 16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0xffe6, 0x10, 0x1, 0x1 @ 26, 16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish return ShatteredPsycheFlingPlayer: - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe6 0x10 0x1 0x4 @ -26,-16 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe6, 0x10, 0x1, 0x4 @ -26,-16 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x1a 0xfff0 0x1 0x1 @ 26, 16 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x1a, 0xfff0, 0x1, 0x1 @ 26, 16 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x20 0x0 0x1 0x4 @ 32,0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x20, 0x0, 0x1, 0x4 @ 32,0 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0xffe0 0x0 0x1 0x1 @ + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0xffe0, 0x0, 0x1, 0x1 @ playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xffe0 0x0 0x1 0x4 @ -32,0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xffe0, 0x0, 0x1, 0x4 @ -32,0 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0x20 0x0 0x1 0x1 @ 32, 0 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x0, 0x1, 0x1 @ 32, 0 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x4 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x4 waitforvisualfinish - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xa 0x20 0x1 0x4 @ 10, -32 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xa, 0x20, 0x1, 0x4 @ 10, -32 waitforvisualfinish - launchtemplate gShatteredPsycheReflectHitSpriteTemplate 0x83 0x4 0xfff6 0x5 0x1 0x1 @ 10, -32 + createsprite gShatteredPsycheReflectHitSpriteTemplate, ANIM_TARGET, 3, 0xfff6, 0x5, 0x1, 0x1 @ 10, -32 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_TARGET delay 0x2 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x5 waitforvisualfinish return @@ -26995,64 +26993,64 @@ Move_SUBZERO_SLAMMER:: loadspritegfx ANIM_TAG_ICE_CRYSTALS @ice loadspritegfx ANIM_TAG_ICE_CUBE @glacier loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_EXPLOSION_2, 0x0, 0xC, 0xC, 0x6A23 - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_EXPLOSION_2, 0x0, 0xC, 0xC, 0x6A23 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish fadetobg BG_ICE waitbgfadeout - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET SubzeroSlammerOnPlayer SubzeroSlammerOnOpponent: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xfd00 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xfd00, 0x0, 0x0, 0xFFFF goto SubzeroSlammerFinish SubzeroSlammerOnPlayer: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0300 0x0 0x0 0xFFFF + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0300, 0x0, 0x0, 0xFFFF SubzeroSlammerFinish: waitbgfadein monbg ANIM_ATK_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0x0 0xb 0x7e80 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0x0, 0xb, 0x7e80 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x0 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x4 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x4 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x8 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x8 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0xc + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0xc playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x10 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x10 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x14 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x14 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSpinSpriteTemplate 0x83 0x4 0x0 0x0 0x38 0x18 + createsprite gSubzeroSlammerIceSpinSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x38, 0x18 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER delay 0x20 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0xb 0x0 0x7e80 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0xb, 0x0, 0x7e80 delay 0x20 - launchtask AnimTask_FrozenIceCubeAttacker 0x2 0x0 + createvisualtask AnimTask_FrozenIceCubeAttacker, 0x2 waitplaysewithpan SE_M_HAIL, SOUND_PAN_TARGET, 0x11 waitforvisualfinish call SubzeroSlammerIceSwirl - launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_ATK 0x2 0x2 0x0 0xb 0x7e80 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_ATTACKER, 0x2, 0x2, 0x0, 0xb, 0x7e80 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call SubzeroSlammerIceSwirl call SubzeroSlammerIceSwirl delay 0xa clearmonbg ANIM_ATK_PARTNER - launchsoundtask SoundTask_LoopSEAdjustPanning 0x7 0xb0 0xffc0 SOUND_PAN_TARGET 0x4 0x4 0x0 0xa - launchtemplate gIceBeamOuterCrystalSpriteTemplate 0x2 0x5 0x14 0xc 0x0 0xc 0x14 - launchtemplate gIceBeamOuterCrystalSpriteTemplate 0x2 0x5 0x14 0xfff4 0x0 0xfff4 0x14 + createsoundtask SoundTask_LoopSEAdjustPanning, 0xb0, 0xffc0, SOUND_PAN_TARGET, 0x4, 0x4, 0x0, 0xa + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 0x14, 0xc, 0x0, 0xc, 0x14 + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 0x14, 0xfff4, 0x0, 0xfff4, 0x14 delay 0x1 call IceBeamCreateCrystals call IceBeamCreateCrystals call IceBeamCreateCrystals - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x4 0x0 0x7 0x7e80 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x2 0x0 0x19 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0x7, 0x7e80 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x2, 0x0, 0x19, 0x1 call IceBeamCreateCrystals call IceBeamCreateCrystals call IceBeamCreateCrystals @@ -27068,7 +27066,7 @@ SubzeroSlammerFinish: call IceCrystalEffectShort delay 0x5 monbg ANIM_DEF_PARTNER - launchtask AnimTask_FrozenIceCube 0x82 0x0 + createvisualtask AnimTask_FrozenIceCube, 0x82 playsewithpan SE_M_HAIL, SOUND_PAN_TARGET waitforvisualfinish loadspritegfx ANIM_TAG_TORN_METAL @@ -27078,66 +27076,66 @@ SubzeroSlammerFinish: createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x1, 0x0, 0x0 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x2, 0x0, 0x0 createsprite gBrickBreakWallShardSpriteTemplate ANIM_TARGET, 2, 0x1, 0x3, 0x0, 0x0 - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x8 0x1c + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x8, 0x1c call SubzeroSlammerExplosion call SubzeroSlammerExplosion clearmonbg ANIM_DEF_PARTNER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x5 0x7 0x0 0x7e80 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x5, 0x7, 0x0, 0x7e80 waitforvisualfinish restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein waitforvisualfinish end SubzeroSlammerExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSubzeroSlammerExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createsprite gSubzeroSlammerExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 delay 0x3 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xa 0x14 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0 delay 0x3 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSubzeroSlammerExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfffb 0xa 0x0 + createsprite gSubzeroSlammerExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0 delay 0x3 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x11 0xfff4 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 delay 0x3 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSubzeroSlammerExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xfff1 0xf 0x0 + createsprite gSubzeroSlammerExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xf, 0x0 delay 0x3 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x0 0x0 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0 delay 0x3 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSubzeroSlammerExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0x14 0x2 0x0 + createsprite gSubzeroSlammerExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0x14, 0x2, 0x0 delay 0x3 - launchtemplate gIceCrystalHitLargeSpriteTemplate 0x82, 0x3, 0xfff6 0xfff6 0x0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0 delay 0x3 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gSubzeroSlammerExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0x11 0xfff4 0x0 + createsprite gSubzeroSlammerExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0 delay 0x3 - launchtemplate gIceCrystalHitSmallSpriteTemplate 0x82, 0x3, 0xfff1 0xf 0x0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xf, 0x0 delay 0x3 return SubzeroSlammerIceSwirl: playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gSubzeroSlammerIceSwirlSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gSubzeroSlammerIceSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 return @@ -27150,215 +27148,215 @@ Move_DEVASTATING_DRAKE:: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call DevastatingDrakeBuffEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x40c0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x40c0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call DevastatingDrakeBuffEffect delay 0x8 call DevastatingDrakeBuffEffect waitforvisualfinish unloadspritegfx ANIM_TAG_FOCUS_ENERGY playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeShockwaveSpriteTemplate 0x2 0x0 + createsprite gDevastatingDrakeShockwaveSpriteTemplate, ANIM_ATTACKER, 2 delay 0x2a unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT monbg ANIM_ATTACKER playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeDrakeUpSpriteTemplate 0x2 0x7 0x0 0x0 0x4e0 0x24 0x15 0x1 ANIM_ATTACKER + createsprite gDevastatingDrakeDrakeUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x4e0, 0x24, 0x15, 0x1, ANIM_ATTACKER clearmonbg ANIM_ATTACKER fadetobg BG_SKY invisible ANIM_ATTACKER invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x1000 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x1000, 0x0, 0xffff waitbgfadein - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET DevastatingDrakeOnPlayer DevastatingDrakeOnOpponent: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeRightSpriteTemplate 0x32 0x5 0xfff0 0x88 0x100 0x38 0x15 @left to right + createsprite gDevastatingDrakeRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x88, 0x100, 0x38, 0x15 @left to right waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeLeftSpriteTemplate 0x32 0x5 0x0120 0x38 0xfff0 0x38 0x15 @right to left + createsprite gDevastatingDrakeLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x38, 0xfff0, 0x38, 0x15 @right to left waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeRightSpriteTemplate 0x32 0x5 0xfff0 0x08 0x100 0x0f 0x15 @left to right + createsprite gDevastatingDrakeRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x08, 0x100, 0x0f, 0x15 @left to right goto DevastatingDrakeFinish DevastatingDrakeOnPlayer: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeLeftSpriteTemplate 0x32 0x5 0x0120 0x08 0xfff0 0x0f 0x15 @right to left + createsprite gDevastatingDrakeLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x08, 0xfff0, 0x0f, 0x15 @right to left waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeRightSpriteTemplate 0x32 0x5 0xfff0 0x38 0x100 0x38 0x15 @left to right + createsprite gDevastatingDrakeRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x38, 0x100, 0x38, 0x15 @left to right waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeLeftSpriteTemplate 0x32 0x5 0x0120 0x78 0xfff0 0x58 0x15 @right to left + createsprite gDevastatingDrakeLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x78, 0xfff0, 0x58, 0x15 @right to left DevastatingDrakeFinish: call UnsetPsychicBg waitforvisualfinish visible ANIM_TARGET delay 0xa playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeStrikeSpriteTemplate 0x82 0x1 0x14 + createsprite gDevastatingDrakeStrikeSpriteTemplate, ANIM_TARGET, 2, 0x14 delay 0x10 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER loadspritegfx ANIM_TAG_EXPLOSION - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_EXPLOSION, 0x0, 0xC, 0xC, 0x502B - launchtask AnimTask_HorizontalShake 0x5 0x3 0x1 0x5 0x35 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x10 0x40c0 @ fade to purple + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_EXPLOSION, 0x0, 0xC, 0xC, 0x502B + createvisualtask AnimTask_HorizontalShake, 0x5, 0x1, 0x5, 0x35 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x10, 0x40c0 @ fade to purple call DevastatingDrakeExplosion delay 0x6 - launchtask AnimTask_IsTargetPartner 0x5 0x0 + createvisualtask AnimTask_IsTargetPartner, 0x5 jumpargeq 0x0 0x1 DevastatingDrakeFadeTargetPartner - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL - ANIM_PAL_DEF, 0x6, 0x0, 0x10, 0x40c0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x6, 0x0, 0x10, 0x40c0 call DevastatingDrakeExplosion waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL - ANIM_PAL_DEF, 0x0, 0x10, 0x0, 0x40c0 @ fade all but target back + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x0, 0x10, 0x0, 0x40c0 @ fade all but target back DevastatingDrakeUniversalEnding: loadspritegfx ANIM_TAG_FIRE_PLUME loadspritegfx ANIM_TAG_VERTICAL_HEX loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion unloadspritegfx ANIM_TAG_PURPLE_DRAKE - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_FIRE_PLUME, 0x0, 0xC, 0xC, 0x502B - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_VERTICAL_HEX, 0x0, 0xC, 0xC, 0x502B - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_EXPLOSION_2, 0x0, 0xC, 0xC, 0x502B - launchtask AnimTask_HorizontalShake 0x5 0x3 0x1 0x5 0x20 + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_FIRE_PLUME, 0x0, 0xC, 0xC, 0x502B + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_VERTICAL_HEX, 0x0, 0xC, 0xC, 0x502B + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_EXPLOSION_2, 0x0, 0xC, 0xC, 0x502B + createvisualtask AnimTask_HorizontalShake, 0x5, 0x1, 0x5, 0x20 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER call DevastatingDrakeGeyser playsewithpan SE_M_SACRED_FIRE, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER call DevastatingDrakeGeyser playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffc0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x6 0x6 0xffd8 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x46 0x6 0x0 0xffe0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x46 0x6 0x28 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x40 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x28 0x14 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0x0 0x20 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffd8 0x14 0x18 0x0 0x0 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 6, 0xffd8, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffe0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 70, 0x28, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x40, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x28, 0x14, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER call DevastatingDrakeGeyser playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffa0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x6 0x6 0xffc4 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x46 0x6 0x0 0xffd0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x46 0x6 0x3c 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x60 0x0 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x42 0x6 0x3c 0x1e 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0x0 0x30 0x18 0x0 0x0 0x0 - launchtemplate gDevastatingDrakePurpleBlastSpriteTemplate 0x2 0x6 0xffc4 0x1e 0x18 0x0 0x0 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffa0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 6, 0xffc4, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffd0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 70, 0x3c, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x60, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 66, 0x3c, 0x1e, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x30, 0x18, 0x0, 0x0, 0x0 + createsprite gDevastatingDrakePurpleBlastSpriteTemplate, ANIM_ATTACKER, 2, 0xffc4, 0x1e, 0x18, 0x0, 0x0, 0x0 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER call DevastatingDrakeGeyser delay 0x4 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x10 0x0 0x40c0 @ fade from purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x10, 0x0, 0x40c0 @ fade from purple waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL_BATTLERS 0x2 0x0 0x0 0x0 @ reset all colours + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x0 @ reset all colours waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end DevastatingDrakeFadeTargetPartner: - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ATK | ANIM_PAL_OPPONENT1 | ANIM_PAL_OPPONENT2, 0x6, 0x0, 0x10, 0x40c0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_ATK_PARTNER), 0x6, 0x0, 0x10, 0x40c0 call DevastatingDrakeExplosion waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ATK | ANIM_PAL_OPPONENT1 | ANIM_PAL_OPPONENT2, 0x0, 0x10, 0x0, 0x40c0 @ fade all but target back + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_ATK_PARTNER), 0x0, 0x10, 0x0, 0x40c0 @ fade all but target back goto DevastatingDrakeUniversalEnding DevastatingDrakeBuffEffect: - launchtemplate gDevastatingDrakePurpleEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gDevastatingDrakePurpleEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gDevastatingDrakePurpleEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gDevastatingDrakePurpleEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gDevastatingDrakePurpleEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gDevastatingDrakePurpleEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gDevastatingDrakePurpleEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gDevastatingDrakePurpleEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gDevastatingDrakePurpleEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gDevastatingDrakePurpleEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return DevastatingDrakeGeyser: - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0003 0x0005 0x1 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfffc 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0x0005, 0x1, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfffc, 0x10 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xfff1 0x1 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x100D 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xfff1, 0x1, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x100D, 0x10 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xfffb 0x1 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x4 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xfffb, 0x1, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x4, 0x10 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0x0012 0x1 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfff0 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0x0012, 0x1, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0000 0x0005 0x1 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfffc 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0x0005, 0x1, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfffc, 0x10 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0003 0xfff5 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x100D 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0xfff5, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x100D, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xffe1 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x4 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xffe1, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x4, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xffeb ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfff0 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xffeb, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0x0002 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfffc 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0x0002, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfffc, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0000 0xfff5 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x100D 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0xfff5, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x100D, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0003 0xffe5 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x4 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0xffe5, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x4, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xffd1 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfff0 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xffd1, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xffdb ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfffc 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xffdb, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfffc, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0xfff2 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x100D 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0xfff2, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x100D, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x84, 0x4, 0x0000 0xffe5 ANIM_TARGET 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0x4 0x10 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0xffe5, ANIM_TARGET, 0x0 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x4, 0x10 delay 0x0 - launchtemplate gDevastatingDrakeHexSpriteTemplate 0x82, 0x3, ANIM_TARGET 0xfff0 0x10 + createsprite gDevastatingDrakeHexSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10 return DevastatingDrakeExplosion: - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gDevastatingDrakeExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gDevastatingDrakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 return @@ -27370,89 +27368,89 @@ Move_BLACK_HOLE_ECLIPSE:: loadspritegfx ANIM_TAG_ICE_CHUNK @blue loadspritegfx ANIM_TAG_BLACK_BALL_2 @black invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call EndureEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x0000 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x0000 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call EndureEffect delay 0x8 call EndureEffect waitforvisualfinish unloadspritegfx ANIM_TAG_FOCUS_ENERGY playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseShockwaveSpriteTemplate 0x2 0x0 + createsprite gBlackHoleEclipseShockwaveSpriteTemplate, ANIM_ATTACKER, 2 waitforvisualfinish unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT loadspritegfx ANIM_TAG_HANDS_AND_FEET @black playsewithpan SE_M_NIGHTMARE, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseHoleUserSpriteTemplate 0x2 0x4 0x0 0x0 ANIM_ATTACKER 0x0 - launchtemplate gBlackHoleEclipseBlueRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gBlackHoleEclipseHoleUserSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_ATTACKER, 0x0 + createsprite gBlackHoleEclipseBlueRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseBlackRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gBlackHoleEclipseBlackRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseBlueRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gBlackHoleEclipseBlueRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseBlackRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gBlackHoleEclipseBlackRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 delay 0x8 waitforvisualfinish stopsound - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x07 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x07, 0x0000 loadspritegfx ANIM_TAG_WISP_ORB @will o wisp invisible ANIM_ATTACKER loopsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET, 0x10, 0x5 - launchtemplate gBlackHoleEclipseWispSpriteTemplate 0x2 0x3 0x0 0x10 0x0 + createsprite gBlackHoleEclipseWispSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x0 delay 0x3 - launchtemplate gBlackHoleEclipseWispSpriteTemplate 0x3 0x3 0x0 0x10 0x1 + createsprite gBlackHoleEclipseWispSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x10, 0x1 delay 0x3 - launchtemplate gBlackHoleEclipseWispSpriteTemplate 0x4 0x3 0x0 0x10 0x2 + createsprite gBlackHoleEclipseWispSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x10, 0x2 delay 0x3 - launchtemplate gBlackHoleEclipseWispSpriteTemplate 0x4 0x3 0x0 0x10 0x3 + createsprite gBlackHoleEclipseWispSpriteTemplate, ANIM_ATTACKER, 4, 0x0, 0x10, 0x3 waitforvisualfinish fadetobg BG_BLACKHOLE_ECLIPSE playsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET loadspritegfx ANIM_TAG_VERTICAL_HEX @red - launchtemplate gBlackHoleEclipseRedRingSpriteTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createsprite gBlackHoleEclipseRedRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 delay 0x4 - launchtemplate gBlackHoleEclipseRedRingSpriteTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createsprite gBlackHoleEclipseRedRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 delay 0x4 - launchtemplate gBlackHoleEclipseRedRingSpriteTemplate 0x3 0x4 0x0 0x0 0x100 0x0 + createsprite gBlackHoleEclipseRedRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 waitbgfadeout unloadspritegfx ANIM_TAG_WISP_ORB - launchtemplate gBlackHoleEclipseHoleSpriteTemplate 0x2 0x4 0x0 0x0 ANIM_TARGET 0x0 @ eclipse at target origin + createsprite gBlackHoleEclipseHoleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0 @ eclipse at target origin delay 0x10 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x35 0xffed 0x1 0x2 @ target down and left (instantaneously (last arg)) + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x35, 0xffed, 0x1, 0x2 @ target down and left (instantaneously (last arg)) delay 0x2 visible ANIM_TARGET loopsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET, 0xa, 0x5 - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x50 0xfc00 ANIM_TARGET 0x0 @ spin target around (0x50 (time), -0x400 (rot speed)) - launchtemplate gBlackHoleEclipseBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x50, 0xfc00, ANIM_TARGET, 0x0 @ spin target around (0x50 (time), -0x400 (rot speed)) + createsprite gBlackHoleEclipseBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x30 @ target back to origin (slowly) - launchtemplate gBlackHoleEclipseBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x30 @ target back to origin (slowly) + createsprite gBlackHoleEclipseBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x15 invisible ANIM_TARGET delay 0x8 - launchtemplate gBlackHoleEclipseBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseRedRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseRedRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gBlackHoleEclipseHoleShrinkSpriteTemplate 0x2 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gBlackHoleEclipseHoleShrinkSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0 waitforvisualfinish loadspritegfx ANIM_TAG_SPARKLE_4 @detect - launchtemplate gTargetTwinkleSpriteTemplate 0xd 0x3 0x0 0x0 ANIM_TARGET @detect star + createsprite gTargetTwinkleSpriteTemplate, ANIM_ATTACKER, 13, 0x0, 0x0, ANIM_TARGET @detect star delay 0x2 unloadspritegfx ANIM_TAG_SHADOW_BALL unloadspritegfx ANIM_TAG_THIN_RING @@ -27460,12 +27458,12 @@ Move_BLACK_HOLE_ECLIPSE:: unloadspritegfx ANIM_TAG_BLACK_BALL_2 loadspritegfx ANIM_TAG_EXPLOSION_2 call BlackHoleEclipseExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x1, 0x0, 0x10, 0x7fff @ bg to white pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x7fff @ bg to white pal call BlackHoleEclipseExplosion waitforvisualfinish delay 0x18 invisible ANIM_TARGET - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x1 0x0 ANIM_TARGET 0x1 @ fix rotation + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x1, 0x0, ANIM_TARGET, 0x1 @ fix rotation invisible ANIM_TARGET delay 0x1 waitforvisualfinish @@ -27473,33 +27471,33 @@ Move_BLACK_HOLE_ECLIPSE:: end BlackHoleEclipseExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseRedExplosionSpriteTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gBlackHoleEclipseRedExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseRedExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gBlackHoleEclipseRedExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseRedExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gBlackHoleEclipseRedExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseRedExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gBlackHoleEclipseRedExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBlackHoleEclipseRedExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gBlackHoleEclipseRedExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return ResetFromWhiteScreen: - launchtask AnimTask_AllBanksInvisible 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisible, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL_BATTLERS 0x2 0x0 0x0 0x7FFF @everything from white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x7FFF @everything from white restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein waitforvisualfinish delay 0x5 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x0 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x0, 0x7fff waitforvisualfinish return @@ -27508,20 +27506,20 @@ Move_TWINKLE_TACKLE:: loadspritegfx ANIM_TAG_SPARKLE_2 @star loadspritegfx ANIM_TAG_PINK_PETAL @pink loadspritegfx ANIM_TAG_THIN_RING @ring - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER call TwinkleTacklePinkStars delay 0x8 fadetobg BG_TWINKLE_TACKLE - launchtemplate gTwinkleTacklePinkRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gTwinkleTacklePinkRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 waitbgfadeout invisible ANIM_TARGET delay 0x1 loadspritegfx ANIM_TAG_YELLOW_STAR - launchtemplate gTwinkleTackleStarGrowSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gTwinkleTackleStarGrowSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET TwinkleTackleOnPlayer TwinkleTackleOnOpponent: call PlayerTwinkling @@ -27533,132 +27531,132 @@ TwinkleTackleFinish: delay 0x5 visible ANIM_ATTACKER visible ANIM_TARGET - launchtask AnimTask_SwayMon 0x5 0x5, 0x0 0x8 2048 1 ANIM_ATTACKER + createvisualtask AnimTask_SwayMon, 0x5, 0x0, 0x8, 2048, 1, ANIM_ATTACKER call TwinkleTackleStars waitforvisualfinish - launchtask AnimTask_SwayMon 0x5 0x5, 0x0 0x8 2048 1 ANIM_ATTACKER + createvisualtask AnimTask_SwayMon, 0x5, 0x0, 0x8, 2048, 1, ANIM_ATTACKER call TwinkleTackleStars waitforvisualfinish loadspritegfx ANIM_TAG_SPARKLE_4 @detect loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_PAIN_SPLIT @pain-split delay 0x1 - launchtemplate gTwinkleTackleYellowImpactSpriteTemplate 0x2 0x4 0x0 0x0 0x1 0x0 + createsprite gTwinkleTackleYellowImpactSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x0 call TwinkleTackleStarsTarget playsewithpan SE_M_WATERFALL, SOUND_PAN_TARGET delay 0x5 - launchtask AnimTask_TwinkleTackleLaunch 0x2 0x1 89 + createvisualtask AnimTask_TwinkleTackleLaunch, 0x2, 89 delay 89 playsewithpan SE_M_DETECT, SOUND_PAN_TARGET - launchtemplate gTwinkleTackleTwinkleSpriteTemplate 0x8d, 0x3, 0x0 0x0 ANIM_TARGET @detect star + createsprite gTwinkleTackleTwinkleSpriteTemplate, ANIM_TARGET, 13, 0x0, 0x0, ANIM_TARGET @detect star waitforvisualfinish delay 0x10 restorebg delay 0x18 - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end TwinkleTacklePinkStars: - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xfff1 0x0 0x0 0x0 0x20 0x3c - launchtemplate gTwinkleTacklePinkRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x0, 0x0, 0x20, 0x3c + createsprite gTwinkleTacklePinkRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 delay 0x8 - launchtemplate gTwinkleTacklePinkRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xc 0xfffb 0x0 0x0 0x20 0x3c + createsprite gTwinkleTacklePinkRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, 0x0, 0x0, 0x20, 0x3c delay 0x8 - launchtemplate gTwinkleTacklePinkRingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gTwinkleTacklePinkRingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 return PlayerTwinkling: playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 @ user fly on screen on enemy side - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x12 0x0 0x0 0x0 0x20 0x1c + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 @ user fly on screen on enemy side + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x12, 0x0, 0x0, 0x0, 0x20, 0x1c delay 0x3 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x1f 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x1f, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x16 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x90 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x90, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x80 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x80, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x70 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x70, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x60 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x60, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x50 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_TARGET - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x40 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x40, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x30 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x20 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x10 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x0 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xfff0 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xffe0 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xffd0 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffc0, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xffc0 0xffc0 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffc0, 0x0, 0x0, 0x20, 0x1c return OpponentTwinkling: playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 @ user fly on screen on enemy side - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x10 0xfffb 0x0 0x0 0x20 0x1c + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 @ user fly on screen on enemy side + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x20 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x30 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x40 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x40, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x50 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x60 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x60, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x70 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x70, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x80 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x80, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x90 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x90, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xa0 0xfffb 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xa0, 0xfffb, 0x0, 0x0, 0x20, 0x1c delay 0x5 playsewithpan SE_M_MORNING_SUN, SOUND_PAN_TARGET - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0xa0 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0xa0, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x90 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x90, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x80 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x80, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x70 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x70, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x60 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x60, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x50 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x50, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x40 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x40, 0x2c, 0x0, 0x0, 0x20, 0x1c delay 0x1 - launchtemplate gTwinkleTacklePinkStarSpriteTemplate 0x2 0x6 0x30 0x2c 0x0 0x0 0x20 0x1c + createsprite gTwinkleTacklePinkStarSpriteTemplate, ANIM_ATTACKER, 2, 0x30, 0x2c, 0x0, 0x0, 0x20, 0x1c return TwinkleTackleStars: playsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER - launchtemplate gTwinkleTackleDigStarSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gTwinkleTackleDigStarSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gTwinkleTackleDigStarSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gTwinkleTackleDigStarSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x12 + createsprite gTwinkleTackleDigStarSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gTwinkleTackleDigStarSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gTwinkleTackleDigStarSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gTwinkleTackleDigStarSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x12 return TwinkleTackleStarsTarget: - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xa0 0xffe0 - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xff00 0xffd8 - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0x80 0xfff0 - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0x1a0 0xffda - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xff80 0xffea - launchtemplate gTwinkleTackleImpactStarsSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xfe80 0xffe1 + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xa0, 0xffe0 + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff00, 0xffd8 + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x80, 0xfff0 + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x1a0, 0xffda + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff80, 0xffea + createsprite gTwinkleTackleImpactStarsSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xfe80, 0xffe1 return @ signature z moves @@ -27666,23 +27664,23 @@ Move_CATASTROPIKA:: loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_ROUND_SHADOW @fly invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call EndureEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x5bff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x5bff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call EndureEffect delay 0x8 call EndureEffect delay 0x8 playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish unloadspritegfx ANIM_TAG_FOCUS_ENERGY unloadspritegfx ANIM_TAG_ROUND_SHADOW - launchtask AnimTask_GetTimeOfDay 0x2 0x0 + createvisualtask AnimTask_GetTimeOfDay, 0x2 jumpargeq 0x0 0x0 CatastropikaDaytime jumpargeq 0x0 0x2 CatastropikaAfternoon CatastropikaNight: @@ -27700,78 +27698,78 @@ CatastropikaFinish: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge loadspritegfx ANIM_TAG_SPARK_2 @spark playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x3c 0x2 0xc @charge particles to user - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0xe0 0x28 0x2 0x3 + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x3c, 0x2, 0xc @charge particles to user + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0xe0, 0x28, 0x2, 0x3 @ delay 0x14 @ playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x12 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x12 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x12 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x12 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x12, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x12, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x12, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x12, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 @ delay 0x14 @ playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gGrowingChargeOrbSpriteTemplate 0x2 0x1 ANIM_ATTACKER @ charge - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x16 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x16 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x16 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x16 0x2c 0xe0 0x28 0x2 0x3 + createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER @ charge + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x16, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x16, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x16, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x16, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1a 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1a 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1a 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1a 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1a, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1a, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1a, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1a, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1e 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1e, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x15, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 restorebg waitbgfadeout @@ -27781,28 +27779,28 @@ CatastropikaFinish: invisible ANIM_ATTACKER visible ANIM_TARGET playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtemplate gCatastrokpikaSuperpowerSpriteTemplate 0x83 0x1 0x0 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gCatastrokpikaSuperpowerSpriteTemplate, ANIM_TARGET, 3, 0x0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0x1 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0x1 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0xd - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0x15 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0x15, 0x0, 0x4 loadspritegfx ANIM_TAG_MUD_SAND - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0xc 0xffe8 0xfff0 0x18 @ 12, -48, -16, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x0 0x10 0xffda 0xfff6 0x18 @ 16, -16, -10, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xe 0xffec 0xffee 0x18 @ 14, -52, -18, 24 - launchtemplate gDirtPlumeSpriteTemplate 0x82 0x6 ANIM_TARGET 0x1 0xc 0xffdc 0xfff0 0x18 @ 12, -32, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0xc, 0xffe8, 0xfff0, 0x18 @ 12, -48, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0, 0x10, 0xffda, 0xfff6, 0x18 @ 16, -16, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xe, 0xffec, 0xffee, 0x18 @ 14, -52, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1, 0xc, 0xffdc, 0xfff0, 0x18 @ 12, -32, -16, 24 loadspritegfx ANIM_TAG_LIGHTNING @thunder call CatastropikaThundering invisible ANIM_TARGET @@ -27810,28 +27808,28 @@ CatastropikaFinish: call CatastropikaThundering call CatastropikaThundering call CatastropikaThundering - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x4, 0x0, 0x10, 0x7fff @ bg to white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff @ bg to white call CatastropikaThundering waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x4, 0x10, 0x0, 0x7fff @ bg to white - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 @fix tgt position + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x10, 0x0, 0x7fff @ bg to white + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 @fix tgt position waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end CatastropikaThundering: playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0xfff0 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff0 delay 2 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0x10 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x10 delay 2 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0xfff0 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff0 delay 2 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0x10 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x10 delay 2 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0xfff0 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff0 delay 2 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x0 0x10 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x10 delay 2 return @@ -27843,106 +27841,106 @@ Move_10000000_VOLT_THUNDERBOLT:: loadspritegfx ANIM_TAG_SPARK_2 @sparks loadspritegfx ANIM_TAG_LIGHTNING @lightning invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call EndureEffect waitforvisualfinish playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate g10MillionVoltBoltYellowFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0xe0 0x28 0x2 0x3 + createsprite g10MillionVoltBoltYellowFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x2 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0x20 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0x60 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0xa0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0xe0 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x2 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0xe0 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 waitforvisualfinish unloadspritegfx ANIM_TAG_ROUND_SHADOW unloadspritegfx ANIM_TAG_FOCUS_ENERGY fadetobg BG_THUNDER waitbgfadeout loadspritegfx ANIM_TAG_ELECTRIC_ORBS @charge - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xff00 0x0 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xff00, 0x0, 0x1, 0xffff waitbgfadein visible ANIM_ATTACKER playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x3c 0x2 0xc @charge particles to user - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x10 0x2c 0xe0 0x28 0x2 0x3 + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x3c, 0x2, 0xc @charge particles to user + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x14 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x14, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x10 playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 @thunder flash - launchtemplate gGrowingChargeOrbSpriteTemplate 0x2 0x1 ANIM_ATTACKER @ charge - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x40 0xffdc + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 @thunder flash + createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER @ charge + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x40, 0xffdc delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x40 0xffec + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x40, 0xffec delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0x40 0xc + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0x40, 0xc delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x18 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x18, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 @thunder flash - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffc0 0xffdc + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 @thunder flash + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0xffdc delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffc0 0xffec + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0xffec delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffc0 0xc + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0xc delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x1c 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1c, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x14 playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 @thunder flash - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xff90 0xffdc + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 @thunder flash + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xff90, 0xffdc delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xff90 0xffec + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xff90, 0xffec delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xff90 0xc + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xff90, 0xc delay 0x14 playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 delay 0x10 playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_TARGET - launchtask AnimTask_InvertScreenColor 0x2 0x3 0x101 0x101 0x101 @thunder flash - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffd0 0xffdc + createvisualtask AnimTask_InvertScreenColor, 0x2, 0x101, 0x101, 0x101 @thunder flash + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0xffdc delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffd0 0xffec + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0xffec delay 0x1 - launchtemplate gLightningSpriteTemplate 0x82 0x2 0xffd0 0xc + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0xc playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x2a 0x2c 0x0 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x2a 0x2c 0x40 0x28 0x1 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x2a 0x2c 0x80 0x28 0x0 0x3 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x2a 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x2a, 0x2c, 0x0, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x2a, 0x2c, 0x40, 0x28, 0x1, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x2a, 0x2c, 0x80, 0x28, 0x0, 0x3 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x2a, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x3 waitforvisualfinish call UnsetPsychicBg visible ANIM_TARGET @@ -27953,16 +27951,16 @@ Move_10000000_VOLT_THUNDERBOLT:: loadspritegfx ANIM_TAG_LEAF @green loadspritegfx ANIM_TAG_POISON_BUBBLE @purple loopsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER, 0x5, 0xA - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 0x32 0x1 -@ launchtask AnimTask_FlashAnimTagWithColor, 0x2, 0x7, ANIM_TAG_ORBS, 0x1, 0xc, 0x1f, 0x10, 0x0, 0x0 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_ATTACKER, 0x0, 0x4, 0x32, 0x1 +@ createvisualtask AnimTask_FlashAnimTagWithColor, 0x2, ANIM_TAG_ORBS, 0x1, 0xc, 0x1f, 0x10, 0x0, 0x0 call TenMillionVoltThunderboltBeamRed call TenMillionVoltThunderboltBeamBlue - launchtask AnimTask_ShakeMon2 0x2 0x5 ANIM_TARGET 0x4 0x0 0x32 0x1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x9 0x07FE + createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x4, 0x0, 0x32, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x9, 0x07FE call TenMillionVoltThunderboltBeamPink call TenMillionVoltThunderboltBeamYellow call TenMillionVoltThunderboltBeamGreen - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x32 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x32, 0x1 call TenMillionVoltThunderboltBeamPurple call TenMillionVoltThunderboltBeamRed call TenMillionVoltThunderboltBeamBlue @@ -27983,22 +27981,22 @@ Move_10000000_VOLT_THUNDERBOLT:: @ call TenMillionVoltThunderboltBeamGreen @ call TenMillionVoltThunderboltBeamPurple playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x25 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x25 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x25 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x25 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x25, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x25, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x25, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x25, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 @ delay 0x6 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x35 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x35 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x35 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x35 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x35, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x35, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x35, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x35, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 @ delay 0x6 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x40 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x40 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x40 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x40 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x40, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x40, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x40, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x40, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - launchtemplate g10MillionVoltBoltShockwaveSpriteTemplate 0x82 0x0 @ charge out and in + createsprite g10MillionVoltBoltShockwaveSpriteTemplate, ANIM_TARGET, 2 @ charge out and in waitforvisualfinish unloadspritegfx ANIM_TAG_ORBS @hyper beam unloadspritegfx ANIM_TAG_VERTICAL_HEX @red @@ -28007,96 +28005,96 @@ Move_10000000_VOLT_THUNDERBOLT:: unloadspritegfx ANIM_TAG_LEAF @green unloadspritegfx ANIM_TAG_POISON_BUBBLE @purple loadspritegfx ANIM_TAG_EXPLOSION @explosion - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x2 0x2c -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x00 0x30 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x2, 0x2c +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x00, 0x30, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 call TenMillionVoltThunderboltSparkGeyser -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x00 0x37 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x8003 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x2, 0x0, 0x10, 0x7fff +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x00, 0x37, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff call TenMillionVoltThunderboltSparkGeyser waitforvisualfinish delay 0x10 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x3, 0x10, 0x0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x10, 0x0, 0x7fff waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end TenMillionVoltThunderboltBeamRed: - launchtemplate g10MillionVoltBoltRedBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltRedBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltRedBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltRedBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltBeamBlue: - launchtemplate g10MillionVoltBoltBlueBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltBlueBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltBlueBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltBlueBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltBeamPink: - launchtemplate g10MillionVoltBoltPinkBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltPinkBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltPinkBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltPinkBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltBeamYellow: - launchtemplate g10MillionVoltBoltYellowBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltYellowBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltYellowBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltYellowBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltBeamGreen: - launchtemplate g10MillionVoltBoltGreenBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltGreenBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltGreenBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltGreenBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltBeamPurple: - launchtemplate g10MillionVoltBoltPurpleBeamSpriteTemplate 0x82 0x0 - launchtemplate g10MillionVoltBoltPurpleBeamSpriteTemplate 0x82 0x0 + createsprite g10MillionVoltBoltPurpleBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite g10MillionVoltBoltPurpleBeamSpriteTemplate, ANIM_TARGET, 2 delay 4 return TenMillionVoltThunderboltSparkGeyser: playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x8003 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x80 0x28 0x0 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x80 0x28 0x0 0x8003 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x80 0x28 0x0 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x8 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x8 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 return @@ -28104,27 +28102,27 @@ Move_STOKED_SPARKSURFER:: loadspritegfx ANIM_TAG_ROUND_SHADOW @fly loadspritegfx ANIM_TAG_SPARK_2 @spark invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gStokedSparksurferFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0x0 0x20 0x2c 0xe0 0x28 0x2 0x3 + createsprite gStokedSparksurferFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x2 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffe0 0x20 0x2c 0xe0 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 delay 0x2 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0x20 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0x60 0x28 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0xa0 0x28 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0x0 0xffd0 0x20 0x2c 0xe0 0x28 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0x20, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0x60, 0x28, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0xa0, 0x28, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffd0, 0x20, 0x2c, 0xe0, 0x28, 0x2, 0x3 waitforvisualfinish unloadspritegfx ANIM_TAG_ROUND_SHADOW - launchtask AnimTask_GetTimeOfDay 0x2 0x0 + createvisualtask AnimTask_GetTimeOfDay, 0x2 jumpargeq 0x0 0x0 StokedSparksurferDay jumpargeq 0x0 0x2 StokedSparksurferAfternoon StokedSparksurferNight: @@ -28141,138 +28139,138 @@ StokedSparksurferFinish: loadspritegfx ANIM_TAG_ELECTRIC_ORBS @charge loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x1c 0x2 0xc - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x3c 0x1 + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x1c, 0x2, 0xc + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x3c, 0x1 call EndureEffect delay 0x8 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x5 0x0 0x10 0x5bff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x5, 0x0, 0x10, 0x5bff call EndureEffect delay 0x8 call EndureEffect delay 0x2 loadspritegfx ANIM_TAG_SPARK loadspritegfx ANIM_TAG_ELECTRICITY - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0x10 0x0 0x5bff - launchtemplate gVoltTackleOrbSlideSpriteTemplate 0x1 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0x10, 0x0, 0x5bff + createsprite gVoltTackleOrbSlideSpriteTemplate, ANIM_ATTACKER, 1 playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x0 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x0 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x1 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x1 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x2 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x2 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_ATTACKER waitforvisualfinish - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x3 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x3 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET delay 0x1 fadetobg BG_ZMOVE_ACTIVATE waitbgfadeout visible ANIM_TARGET - launchtask AnimTask_VoltTackleBolt 0x5 0x1 0x4 + createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x4 playsewithpan SE_M_THUNDERBOLT, SOUND_PAN_TARGET waitforvisualfinish unloadspritegfx ANIM_TAG_SPARK unloadspritegfx ANIM_TAG_FOCUS_ENERGY unloadspritegfx ANIM_TAG_ELECTRIC_ORBS unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x5 0x1c - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x30 0x2c 0x80 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x00 0x30 0x2c 0xc0 0x28 0x2 0x8003 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x5, 0x1c + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x30, 0x2c, 0x80, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x00, 0x30, 0x2c, 0xc0, 0x28, 0x2, 0x8003 call StokedSparksurferSparkGeyser - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_DEF | ANIM_PAL_ATK, 0x2, 0x0, 0x10, 0x5bff - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x37 0x2c 0x80 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x00 0x37 0x2c 0xc0 0x28 0x2 0x8003 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_TARGET | F_PAL_ATTACKER), 0x2, 0x0, 0x10, 0x5bff + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x80, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x00, 0x37, 0x2c, 0xc0, 0x28, 0x2, 0x8003 call StokedSparksurferSparkGeyser - launchtask AnimTask_VoltTackleAttackerReappear 0x5 0x0 @ attacker flicker back + createvisualtask AnimTask_VoltTackleAttackerReappear, 0x5 @ attacker flicker back playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET delay 0x4 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0x10 0x10 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x10 delay 0x2 - launchtemplate gElectricPuffSpriteTemplate 0x2 0x3 0x0 0xfff0 0xfff0 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0, 0xfff0 delay 0x4 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_DEF | ANIM_PAL_ATK, 0x2, 0x10, 0x0, 0x5bff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_TARGET | F_PAL_ATTACKER), 0x2, 0x10, 0x0, 0x5bff restorebg delay 0x18 - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end StokedSparksurferSparkGeyser: playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x5 0x2c 0x80 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffea 0x5 0x2c 0x80 0x28 0x0 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffea, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x5 0x2c 0x80 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffd4 0x15 0x2c 0x80 0x28 0x0 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffd4, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x4 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x0 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x40 0x28 0x1 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x5 0x2c 0x80 0x28 0x0 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x0 0x28 0x0 0x8003 -@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x40 0x28 0x1 0x8003 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x84 0x8 0x0 0xffbe 0x15 0x2c 0x80 0x28 0x0 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x0, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x40, 0x28, 0x1, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x5, 0x2c, 0x80, 0x28, 0x0, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x8003 +@ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x8003 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0xffbe, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x8003 delay 0x1a return Move_EXTREME_EVOBOOST:: loadspritegfx ANIM_TAG_LEER @leer - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ATK | ANIM_PAL_ATK_PARTNER | ANIM_PAL_OPPONENT1 | ANIM_PAL_OPPONENT2, 0x3, 0x0, 0x10, 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x0000 waitforvisualfinish - launchtask AnimTask_AllBanksInvisible 0xA 0x0 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ATK | ANIM_PAL_ATK_PARTNER | ANIM_PAL_OPPONENT1 | ANIM_PAL_OPPONENT2, 3, 0, 0, 0 @;Remove fading on everyone + createvisualtask AnimTask_AllBanksInvisible, 0xA + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 3, 0, 0, 0 @;Remove fading on everyone waitforvisualfinish playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x18 0xfff4 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffe8 0xfff4 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0xfff4 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffe8, 0xfff4 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x28 0xfff0 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xfff8 0xfff0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x28, 0xfff0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xfff8, 0xfff0 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x8 0xfffe - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffd8 0xfffe + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x8, 0xfffe + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0xfffe delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x10 0x5 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffe0 0x5 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x5 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x5 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x20 0xfff0 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xfff0 0xfff0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x20, 0xfff0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xfff0, 0xfff0 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x5 0x0 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffd5 0x0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x5, 0x0 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffd5, 0x0 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0x1c 0x5 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffec 0x5 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x1c, 0x5 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0x5 delay 0xa playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xf 0xfff4 - launchtemplate gLeerSpriteTemplate 0x2 0x2 0xffdf 0xfff4 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xf, 0xfff4 + createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0xffdf, 0xfff4 waitforvisualfinish fadetobg BG_ZMOVE_ACTIVATE waitbgfadeout @@ -28285,90 +28283,90 @@ Move_EXTREME_EVOBOOST:: loadspritegfx ANIM_TAG_WATER_ORB @blue loadspritegfx ANIM_TAG_POISON_BUBBLE @purple loadspritegfx ANIM_TAG_LEAF @green - launchtask AnimTask_BlendParticle, 0x5, 0x5, ANIM_TAG_CIRCLE_OF_LIGHT, 0x0, 0x10, 0x10, 0x5bff + createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_CIRCLE_OF_LIGHT, 0x0, 0x10, 0x10, 0x5bff waitforvisualfinish playsewithpan SE_M_REVERSAL, SOUND_PAN_ATTACKER - launchtemplate gExtremeEvoboostRedChargeUpSpriteTemplate 0x82 0x7 0x0 0x1c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gExtremeEvoboostRedChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostPinkChargeUpSpriteTemplate 0x82 0x7 0x0 0x20 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gExtremeEvoboostPinkChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostIceChargeUpSpriteTemplate 0x82 0x7 0x0 0x21 0x540 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gExtremeEvoboostIceChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x540, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostBlackChargeUpSpriteTemplate 0x82 0x7 0x0 0x1f 0x490 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gExtremeEvoboostBlackChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x490, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostBlueChargeUpSpriteTemplate 0x82 0x7 0x0 0x1c 0x500 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gExtremeEvoboostBlueChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x500, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostPurpleChargeUpSpriteTemplate 0x82 0x7 0x0 0x21 0x4d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gExtremeEvoboostPurpleChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x4d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostYellowChargeUpSpriteTemplate 0x82 0x7 0x0 0x1c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gExtremeEvoboostYellowChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gExtremeEvoboostGreenChargeUpSpriteTemplate 0x82 0x7 0x0 0x20 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gExtremeEvoboostGreenChargeUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 waitforvisualfinish visible ANIM_ATTACKER loopsewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x15, 0xd call ExtremeEvoboostColorCircle - launchtask AnimTask_StockpileDeformMon 0x5 0x0 @stockpile movement + createvisualtask AnimTask_StockpileDeformMon, 0x5 @stockpile movement call ExtremeEvoboostColorCharge call ExtremeEvoboostColorCharge call ExtremeEvoboostColorCharge waitforvisualfinish playsewithpan SE_SHINY, SOUND_PAN_ATTACKER delay 0x5 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ATK | ANIM_PAL_BG, 0x0, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ATTACKER), 0x0, 0x0, 0x10, 0x7fff delay 0x18 call ResetFromWhiteScreen end ExtremeEvoboostColorCircle: - launchtemplate gExtremeEvoboostRedChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostRedChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostPinkChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostPinkChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostIceChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostIceChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostBlackChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostBlackChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostBlueChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostBlueChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostPurpleChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostPurpleChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostYellowChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostYellowChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostGreenChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostGreenChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 return ExtremeEvoboostColorCharge: - launchtemplate gExtremeEvoboostRedChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostRedChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostRedStockpileSpriteTemplate 0x2 0x3 0x37 0x37 0xd + createsprite gExtremeEvoboostRedStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0x37, 0x37, 0xd delay 0x2 - launchtemplate gExtremeEvoboostPinkChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostPinkChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostPinkStockpileSpriteTemplate 0x2 0x3 0xffc9 0xffc9 0xd + createsprite gExtremeEvoboostPinkStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0xffc9, 0xffc9, 0xd delay 0x2 - launchtemplate gExtremeEvoboostIceChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostIceChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostIceStockpileSpriteTemplate 0x2 0x3 0x0 0x37 0xd + createsprite gExtremeEvoboostIceStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x37, 0xd delay 0x2 - launchtemplate gExtremeEvoboostBlackChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostBlackChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostBlackStockpileSpriteTemplate 0x2 0x3 0x0 0xffc9 0xd + createsprite gExtremeEvoboostBlackStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffc9, 0xd delay 0x2 - launchtemplate gExtremeEvoboostBlueChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostBlueChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostBlueStockpileSpriteTemplate 0x2 0x3 0x37 0xffde 0xd + createsprite gExtremeEvoboostBlueStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0x37, 0xffde, 0xd delay 0x2 - launchtemplate gExtremeEvoboostPurpleChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostPurpleChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostPurpleStockpileSpriteTemplate 0x2 0x3 0x37 0x22 0xd + createsprite gExtremeEvoboostPurpleStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0x37, 0x22, 0xd delay 0x2 - launchtemplate gExtremeEvoboostYellowChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostYellowChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostYellowStockpileSpriteTemplate 0x2 0x3 0xffc9 0xffde 0xd + createsprite gExtremeEvoboostYellowStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0xffc9, 0xffde, 0xd delay 0x2 - launchtemplate gExtremeEvoboostGreenChargeCircleSpriteTemplate 0x2 0x2 0x0 0xfff0 + createsprite gExtremeEvoboostGreenChargeCircleSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff0 delay 0x2 - launchtemplate gExtremeEvoboostGreenStockpileSpriteTemplate 0x2 0x3 0xffc9 0x22 0xd + createsprite gExtremeEvoboostGreenStockpileSpriteTemplate, ANIM_ATTACKER, 2, 0xffc9, 0x22, 0xd delay 0x2 return @@ -28379,22 +28377,22 @@ Move_PULVERIZING_PANCAKE:: loadspritegfx ANIM_TAG_MUD_SAND @dig loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_QUICK_GUARD_HAND @black colour - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET PulverizingPancakeOnPlayer PulverizingPancakeOnOpponent: - launchtemplate gPulverizingPancakeRedDetectSpriteTemplate 0xd 0x2 0x14 0xffec + createsprite gPulverizingPancakeRedDetectSpriteTemplate, ANIM_ATTACKER, 13, 0x14, 0xffec goto PulverizingPancakeFinish PulverizingPancakeOnPlayer: - launchtemplate gPulverizingPancakeRedDetectSpriteTemplate 0xd 0x2 0xa 0xfff2 - launchtemplate gPulverizingPancakeRedDetectSpriteTemplate 0xd 0x2 0xfff6 0xfff2 + createsprite gPulverizingPancakeRedDetectSpriteTemplate, ANIM_ATTACKER, 13, 0xa, 0xfff2 + createsprite gPulverizingPancakeRedDetectSpriteTemplate, ANIM_ATTACKER, 13, 0xfff6, 0xfff2 PulverizingPancakeFinish: playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER waitforvisualfinish fadetobg BG_SOLAR_BEAM_OPPONENT waitbgfadeout - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x32, 0x1 call PulverizingPancakeDiggingRun call PulverizingPancakeDiggingRun call PulverizingPancakeDiggingRun @@ -28406,27 +28404,27 @@ PulverizingPancakeFinish: call PulverizingPancakeDiggingRun loadspritegfx ANIM_TAG_ROUND_SHADOW @fly playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gFlyBallUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 delay 0x2 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x22 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x22 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x22 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x22 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x22 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x22 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x22 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x22 unloadspritegfx ANIM_TAG_SPARKLE_4 unloadspritegfx ANIM_TAG_VERTICAL_HEX fadetobg BG_IN_AIR waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x1000 0x0 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x1000, 0x0, 0xffff waitbgfadein loadspritegfx ANIM_TAG_WHITE_SHADOW - launchtask AnimTask_PulverizingPancakeWhiteShadow 0x5 0x2 0x33 0x33 @first arg is duration, last arg is move speed + createvisualtask AnimTask_PulverizingPancakeWhiteShadow, 0x5, 0x33, 0x33 @first arg is duration, last arg is move speed delay 0x10 call PulverizingPancakeSlowBackground call PulverizingPancakeSlowBackground call PulverizingPancakeSlowBackground call PulverizingPancakeSlowBackground call PulverizingPancakeSlowBackground - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 0x4 0x2 0x0 0xb 0x0000 @ target darkens + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, 0x4, 0x2, 0x0, 0xb, 0x0000 @ target darkens call PulverizingPancakeSlowBackground @0 call PulverizingPancakeSlowBackground call PulverizingPancakeSlowBackground @@ -28439,50 +28437,50 @@ PulverizingPancakeFinish: loadspritegfx ANIM_TAG_THIN_RING @ring unloadspritegfx ANIM_TAG_MUD_SAND @dig loadspritegfx ANIM_TAG_ELECTRIC_ORBS @yellow - launchtemplate gBounceBallLandSpriteTemplate 0x83 0x0 + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 delay 0x7 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gBasicHitSplatSpriteTemplate 0x82, 0x4, 0x0 0x0 0x1 0x0 @big hit marker + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1, 0x0 @big hit marker delay 0x0 - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x4 0x2c - launchtemplate gPulverizingPancakeYellowRingSpriteTemplate 0x83 0x4 0x0 0x0 0x100 0x0 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x4, 0x2c + createsprite gPulverizingPancakeYellowRingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x100, 0x0 delay 0x5 loadspritegfx ANIM_TAG_EXPLOSION @explosion call PulverizingPancakeExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x2, 0x0, 0x10, 0x7fff @ everything goes white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff @ everything goes white call PulverizingPancakeExplosion waitforvisualfinish call ResetFromWhiteScreen end PulverizingPancakeDiggingRun: - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x12 playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER delay 0x5 return PulverizingPancakeSlowBackground: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xfd56 0x0 0xffff @-0x2aa + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xfd56, 0x0, 0xffff @-0x2aa delay 0x1 return PulverizingPancakeExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gPulverizingPancakeExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gPulverizingPancakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gPulverizingPancakeYellowRingSpriteTemplate 0x83 0x4 0x0 0x0 0x100 0x0 - launchtemplate gPulverizingPancakeExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gPulverizingPancakeYellowRingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x100, 0x0 + createsprite gPulverizingPancakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gPulverizingPancakeExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gPulverizingPancakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gPulverizingPancakeExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gPulverizingPancakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gPulverizingPancakeYellowRingSpriteTemplate 0x83 0x4 0x0 0x0 0x100 0x0 - launchtemplate gPulverizingPancakeExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gPulverizingPancakeYellowRingSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x100, 0x0 + createsprite gPulverizingPancakeExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return @@ -28491,24 +28489,24 @@ Move_GENESIS_SUPERNOVA:: loadspritegfx ANIM_TAG_BLUE_ORB @reversal loadspritegfx ANIM_TAG_POISON_BUBBLE @poison bubble loadspritegfx ANIM_TAG_POISON_JAB @purple - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish call SetPsychicBackground loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET GenesisSupernovaOnPlayer GenesisSupernovaOnOpponent: call GenesisSupernovaBuffEffectPlayer_1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0xb 0xd87c - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x70 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0xb, 0xd87c + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x70, 0x1 call GenesisSupernovaBuffEffectPlayer_2 call GenesisSupernovaBuffEffectPlayer_1 goto GenesisSupernovaFinish GenesisSupernovaOnPlayer: call GenesisSupernovaBuffOpponent_1 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0x0 0xb 0xd87c - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x70 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0x0, 0xb, 0xd87c + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x70, 0x1 call GenesisSupernovaBuffOpponent_2 call GenesisSupernovaBuffOpponent_1 GenesisSupernovaFinish: @@ -28520,8 +28518,8 @@ GenesisSupernovaFinish: unloadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge monbg ANIM_ATTACKER - setblends 0x80c - launchtemplate gGenesisSupernovaChargeSpriteTemplate 0x2 0x1 0x0 @charge + setalpha 12, 8 + createsprite gGenesisSupernovaChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 @charge call GenesisSupernovaFlare @delay 12 per call GenesisSupernovaFlare call GenesisSupernovaFlare @@ -28532,21 +28530,21 @@ GenesisSupernovaFinish: loadspritegfx ANIM_TAG_WISP_ORB @will-o-wisp loadspritegfx ANIM_TAG_METEOR @superpower loadspritegfx ANIM_TAG_SPARKLE_2 @sparkles - launchtemplate gGenesisSupernovaSuperpowerSpriteTemplate 0x83 0x1 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x0 0xb 0x0 0xd87c + createsprite gGenesisSupernovaSuperpowerSpriteTemplate, ANIM_TARGET, 3, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x0, 0xb, 0x0, 0xd87c playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendParticle, 0x2, 0x5, ANIM_TAG_SPARKLE_2, 0x0, 0x0, 0xc, 0x7fff + createvisualtask AnimTask_BlendParticle, 0x2, ANIM_TAG_SPARKLE_2, 0x0, 0x0, 0xc, 0x7fff delay 0x8 invisible ANIM_TARGET loadspritegfx ANIM_TAG_EXPLOSION @explosion unloadspritegfx ANIM_TAG_METEOR @superpower call GenesisSupernovaBubbleExplosion call GenesisSupernovaBubbleExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x3, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x7fff call GenesisSupernovaBubbleExplosion waitforvisualfinish delay 0x10 - launchtask AnimTask_BlendParticle, 0x2, 0x5, ANIM_TAG_SPARKLE_2, 0x0, 0xc, 0x0, 0x7fff + createvisualtask AnimTask_BlendParticle, 0x2, ANIM_TAG_SPARKLE_2, 0x0, 0xc, 0x0, 0x7fff clearmonbg ANIM_ATTACKER blendoff delay 0x0 @@ -28554,123 +28552,123 @@ GenesisSupernovaFinish: waitforvisualfinish end GenesisSupernovaBubbleExplosion: - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xfff1 0x0 ANIM_TARGET 0x0 0x20 0x3c - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0xa 0xa 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, ANIM_TARGET, 0x0, 0x20, 0x3c + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0xa, 0xa, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER delay 0x6 - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0x14 0xffec 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0x14, 0xffec, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER delay 0x6 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xc 0xfffb ANIM_TARGET 0x0 0x20 0x3c - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0xffec 0xf 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, ANIM_TARGET, 0x0, 0x20, 0x3c + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xf, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER delay 0x6 - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0x0 0x0 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER delay 0x6 - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0xffec 0xffec 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xffec, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER delay 0x6 - launchtemplate gGenesisSupernovaBubbleSpriteTemplate 0x82, 0x3, 0x10 0xfff8 0x0 - launchtemplate gGenesisSupernovaExplosionSpriteTemplate 0x3 0x4 0xffe0 0xffe8 ANIM_TARGET 0x1 + createsprite gGenesisSupernovaBubbleSpriteTemplate, ANIM_TARGET, 2, 0x10, 0xfff8, 0x0 + createsprite gGenesisSupernovaExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe0, 0xffe8, ANIM_TARGET, 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER return GenesisSupernovaBuffEffectPlayer_1: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x24 0x80 0x24 0x30 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x24, 0x80, 0x24, 0x30, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x10 0x80 0x10 0x35 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x10, 0x80, 0x10, 0x35, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x45 0x80 0x45 0x3a 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x45, 0x80, 0x45, 0x3a, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x60 0x80 0x60 0x30 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x60, 0x80, 0x60, 0x30, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x30 0x80 0x30 0x3c 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x30, 0x80, 0x30, 0x3c, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x55 0x80 0x55 0x33 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x55, 0x80, 0x55, 0x33, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return GenesisSupernovaBuffEffectPlayer_2: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x29 0x80 0x29 0x31 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x29, 0x80, 0x29, 0x31, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x73 0x80 0x73 0x32 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x73, 0x80, 0x73, 0x32, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x4a 0x80 0x4a 0x3c 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x4a, 0x80, 0x4a, 0x3c, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x64 0x80 0x64 0x33 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x64, 0x80, 0x64, 0x33, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x2c 0x80 0x2c 0x3d 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x2c, 0x80, 0x2c, 0x3d, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaOrbRiseSpriteTemplate 0x32 0x5 0x6c 0x80 0x6c 0x30 0x30 + createsprite gGenesisSupernovaOrbRiseSpriteTemplate, ANIM_ATTACKER, 50, 0x6c, 0x80, 0x6c, 0x30, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return GenesisSupernovaReversalWave: - launchtemplate gGenesisSupernovaReversalSpriteTemplate 0x2 0x2 0x1a 0x0 - launchtemplate gGenesisSupernovaReversalSpriteTemplate 0x2 0x2 0x1a 0x2a - launchtemplate gGenesisSupernovaReversalSpriteTemplate 0x2 0x2 0x1a 0x54 - launchtemplate gGenesisSupernovaReversalSpriteTemplate 0x2 0x2 0x1a 0x7e + createsprite gGenesisSupernovaReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x0 + createsprite gGenesisSupernovaReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x2a + createsprite gGenesisSupernovaReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x54 + createsprite gGenesisSupernovaReversalSpriteTemplate, ANIM_ATTACKER, 2, 0x1a, 0x7e return GenesisSupernovaFlare: - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 return GenesisSupernovaBuffOpponent_1: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0x94 0x40 0x94 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0x94, 0x40, 0x94, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0x80 0x40 0x80 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0x80, 0x40, 0x80, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xb5 0x40 0xb5 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xb5, 0x40, 0xb5, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xd0 0x40 0xd0 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xd0, 0x40, 0xd0, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xa0 0x40 0xa0 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xa0, 0x40, 0xa0, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xc5 0x40 0xc5 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xc5, 0x40, 0xc5, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return GenesisSupernovaBuffOpponent_2: - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0x99 0x40 0x99 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0x99, 0x40, 0x99, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xe3 0x40 0xe3 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xe3, 0x40, 0xe3, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xba 0x40 0xba 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xba, 0x40, 0xba, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xd4 0x40 0xd4 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xd4, 0x40, 0xd4, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0x9c 0x40 0x9c 0x0 0x30 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0x9c, 0x40, 0x9c, 0x0, 0x30 delay 0x2 - launchtemplate gGenesisSupernovaSpinUpSpriteTemplate 0x32 0x5 0xdc 0x40 0xdc 0x0 0x30 + createsprite gGenesisSupernovaSpinUpSpriteTemplate, ANIM_ATTACKER, 50, 0xdc, 0x40, 0xdc, 0x0, 0x30 delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return @@ -28679,305 +28677,305 @@ Move_SINISTER_ARROW_RAID:: loadspritegfx ANIM_TAG_SPIRIT_ARROW @arrow loadspritegfx ANIM_TAG_LEAF @green invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyUpSpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gArrowRaidFlyUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish unloadspritegfx ANIM_TAG_ROUND_SHADOW - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x10 0x388C @ bg to purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x10, 0x388C @ bg to purple waitforvisualfinish visible ANIM_ATTACKER playsewithpan SE_M_WHIRLPOOL, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gArrowRaidArrowUpSpriteTemplate 0x2 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gArrowRaidArrowUpSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 waitforvisualfinish invisible ANIM_ATTACKER loadspritegfx ANIM_TAG_BIRD @sky attack loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion loadspritegfx ANIM_TAG_POISON_BUBBLE @purple - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET SinisterArrowRaidOnPlayer SinisterArrowRaidOnOpponent: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyRightSpriteTemplate 0x32 0x5 0xfff0 0x88 0x100 0x38 0x15 @left to right + createsprite gArrowRaidFlyRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x88, 0x100, 0x38, 0x15 @left to right delay 0x5 - launchtemplate gArrowRaidRightUpSpriteTemplate 0x32 0x5 0xfff0 0x8a 0x100 0x3a 0x15 @left to right + createsprite gArrowRaidRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x8a, 0x100, 0x3a, 0x15 @left to right delay 0x1 - launchtemplate gArrowRaidRightUpSpriteTemplate 0x32 0x5 0xfff0 0x8c 0x100 0x3c 0x15 + createsprite gArrowRaidRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x8c, 0x100, 0x3c, 0x15 delay 0x1 - launchtemplate gArrowRaidRightUpSpriteTemplate 0x32 0x5 0xfff0 0x86 0x100 0x36 0x15 + createsprite gArrowRaidRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x86, 0x100, 0x36, 0x15 delay 0x1 - launchtemplate gArrowRaidRightUpSpriteTemplate 0x32 0x5 0xfff0 0x84 0x100 0x34 0x15 + createsprite gArrowRaidRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x84, 0x100, 0x34, 0x15 delay 0x1 - launchtemplate gArrowRaidRightUpSpriteTemplate 0x32 0x5 0xfff0 0x88 0x100 0x38 0x15 + createsprite gArrowRaidRightUpSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x88, 0x100, 0x38, 0x15 waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER @[x0] [y0] [xf] [yf] - launchtemplate gArrowRaidFlyLeftSpriteTemplate 0x32 0x5 0x0120 0x38 0xfff0 0x38 0x15 @right to left + createsprite gArrowRaidFlyLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x38, 0xfff0, 0x38, 0x15 @right to left delay 0x5 - launchtemplate gArrowRaidLeftUpSpriteTemplate 0x32 0x5 0x0120 0x36 0xfff0 0x36 0x15 + createsprite gArrowRaidLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x36, 0xfff0, 0x36, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftUpSpriteTemplate 0x32 0x5 0x0120 0x3a 0xfff0 0x3a 0x15 + createsprite gArrowRaidLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x3a, 0xfff0, 0x3a, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftUpSpriteTemplate 0x32 0x5 0x0120 0x37 0xfff0 0x37 0x15 + createsprite gArrowRaidLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x37, 0xfff0, 0x37, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftUpSpriteTemplate 0x32 0x5 0x0120 0x3c 0xfff0 0x3c 0x15 + createsprite gArrowRaidLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x3c, 0xfff0, 0x3c, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftUpSpriteTemplate 0x32 0x5 0x0120 0x38 0xfff0 0x38 0x15 + createsprite gArrowRaidLeftUpSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x38, 0xfff0, 0x38, 0x15 waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyRightSpriteTemplate 0x32 0x5 0xfff0 0x08 0x100 0x0f 0x15 @left to right + createsprite gArrowRaidFlyRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x08, 0x100, 0x0f, 0x15 @left to right delay 0x5 - launchtemplate gArrowRaidRightDownSpriteTemplate 0x32 0x5 0xfff0 0x0a 0x100 0x11 0x15 + createsprite gArrowRaidRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x0a, 0x100, 0x11, 0x15 delay 0x1 - launchtemplate gArrowRaidRightDownSpriteTemplate 0x32 0x5 0xfff0 0x0c 0x100 0x13 0x15 + createsprite gArrowRaidRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x0c, 0x100, 0x13, 0x15 delay 0x1 - launchtemplate gArrowRaidRightDownSpriteTemplate 0x32 0x5 0xfff0 0x06 0x100 0xd 0x15 + createsprite gArrowRaidRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x06, 0x100, 0xd, 0x15 delay 0x1 - launchtemplate gArrowRaidRightDownSpriteTemplate 0x32 0x5 0xfff0 0x04 0x100 0xb 0x15 + createsprite gArrowRaidRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x04, 0x100, 0xb, 0x15 delay 0x1 - launchtemplate gArrowRaidRightDownSpriteTemplate 0x32 0x5 0xfff0 0x08 0x100 0xf 0x15 + createsprite gArrowRaidRightDownSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x08, 0x100, 0xf, 0x15 waitforvisualfinish call SinisterArrowRaidFlyStrike - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x3 0x4b - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x4 0x0 0x10 0x40c0 @ defender to purple + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x3, 0x4b + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0x10, 0x40c0 @ defender to purple call SinisterArrowRaidStrikeOpponent call SinisterArrowRaidOpponentExplosion playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 call SinisterArrowRaidFinalExplosion goto SinisterArrowRaidFinish @on player SinisterArrowRaidOnPlayer: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyLeftSpriteTemplate 0x32 0x5 0x0120 0x08 0xfff0 0x0f 0x15 @right to left + createsprite gArrowRaidFlyLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x08, 0xfff0, 0x0f, 0x15 @right to left delay 0x5 - launchtemplate gArrowRaidFaceUpLeftSpriteTemplate 0x32 0x5 0x0120 0x0a 0xfff0 0x11 0x15 + createsprite gArrowRaidFaceUpLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x0a, 0xfff0, 0x11, 0x15 delay 0x1 - launchtemplate gArrowRaidFaceUpLeftSpriteTemplate 0x32 0x5 0x0120 0x0c 0xfff0 0x13 0x15 + createsprite gArrowRaidFaceUpLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x0c, 0xfff0, 0x13, 0x15 delay 0x1 - launchtemplate gArrowRaidFaceUpLeftSpriteTemplate 0x32 0x5 0x0120 0x06 0xfff0 0xd 0x15 + createsprite gArrowRaidFaceUpLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x06, 0xfff0, 0xd, 0x15 delay 0x1 - launchtemplate gArrowRaidFaceUpLeftSpriteTemplate 0x32 0x5 0x0120 0x04 0xfff0 0xb 0x15 + createsprite gArrowRaidFaceUpLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x04, 0xfff0, 0xb, 0x15 delay 0x1 - launchtemplate gArrowRaidFaceUpLeftSpriteTemplate 0x32 0x5 0x0120 0x08 0xfff0 0xf 0x15 + createsprite gArrowRaidFaceUpLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x08, 0xfff0, 0xf, 0x15 waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyRightSpriteTemplate 0x32 0x5 0xfff0 0x38 0x100 0x38 0x15 @left to right + createsprite gArrowRaidFlyRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x38, 0x100, 0x38, 0x15 @left to right delay 0x5 - launchtemplate gArrowRaidRightSpriteTemplate 0x32 0x5 0xfff0 0x36 0x100 0x36 0x15 + createsprite gArrowRaidRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x36, 0x100, 0x36, 0x15 delay 0x1 - launchtemplate gArrowRaidRightSpriteTemplate 0x32 0x5 0xfff0 0x3a 0x100 0x3a 0x15 + createsprite gArrowRaidRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x3a, 0x100, 0x3a, 0x15 delay 0x1 - launchtemplate gArrowRaidRightSpriteTemplate 0x32 0x5 0xfff0 0x37 0x100 0x37 0x15 + createsprite gArrowRaidRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x37, 0x100, 0x37, 0x15 delay 0x1 - launchtemplate gArrowRaidRightSpriteTemplate 0x32 0x5 0xfff0 0x3c 0x100 0x3c 0x15 + createsprite gArrowRaidRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x3c, 0x100, 0x3c, 0x15 delay 0x1 - launchtemplate gArrowRaidRightSpriteTemplate 0x32 0x5 0xfff0 0x38 0x100 0x38 0x15 + createsprite gArrowRaidRightSpriteTemplate, ANIM_ATTACKER, 50, 0xfff0, 0x38, 0x100, 0x38, 0x15 waitforvisualfinish delay 0xa playsewithpan SE_M_VITAL_THROW, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyLeftSpriteTemplate 0x32 0x5 0x0120 0x78 0xfff0 0x58 0x15 @right to left + createsprite gArrowRaidFlyLeftSpriteTemplate, ANIM_ATTACKER, 50, 0x0120, 0x78, 0xfff0, 0x58, 0x15 @right to left delay 0x5 - launchtemplate gArrowRaidLeftDownSpriteTemplate 0x32 0x5 0x100 0x8a 0xfff0 0x3a 0x15 + createsprite gArrowRaidLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x100, 0x8a, 0xfff0, 0x3a, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftDownSpriteTemplate 0x32 0x5 0x100 0x8c 0xfff0 0x3c 0x15 + createsprite gArrowRaidLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x100, 0x8c, 0xfff0, 0x3c, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftDownSpriteTemplate 0x32 0x5 0x100 0x86 0xfff0 0x36 0x15 + createsprite gArrowRaidLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x100, 0x86, 0xfff0, 0x36, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftDownSpriteTemplate 0x32 0x5 0x100 0x84 0xfff0 0x34 0x15 + createsprite gArrowRaidLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x100, 0x84, 0xfff0, 0x34, 0x15 delay 0x1 - launchtemplate gArrowRaidLeftDownSpriteTemplate 0x32 0x5 0x100 0x88 0xfff0 0x38 0x15 + createsprite gArrowRaidLeftDownSpriteTemplate, ANIM_ATTACKER, 50, 0x100, 0x88, 0xfff0, 0x38, 0x15 waitforvisualfinish call SinisterArrowRaidFlyStrike - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x3 0x4b - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x4 0x0 0x10 0x40c0 @ defender to purple + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x3, 0x4b + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0x10, 0x40c0 @ defender to purple call SinisterArrowRaidArrowsStrikePlayer call SinisterArrowRaidPlayerExplosion playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 call SinisterArrowRaidFinalExplosion @ finish SinisterArrowRaidFinish: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x4 0x10 0x0 0x40c0 @ return tgt to normal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x10, 0x0, 0x40c0 @ return tgt to normal waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x10 0x00 0x388C @ bg to nrml + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x00, 0x388C @ bg to nrml delay 0x5 - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end SinisterArrowRaidFlyStrike: visible ANIM_TARGET delay 0xa playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidFlyStrikeSpriteTemplate 0x82 0x1 0x14 + createsprite gArrowRaidFlyStrikeSpriteTemplate, ANIM_TARGET, 2, 0x14 waitforvisualfinish delay 0x5 return SinisterArrowRaidStrikeOpponent: - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x95 0xfff0 0xb5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x95, 0xfff0, 0xb5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x75 0xfff0 0x95 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x75, 0xfff0, 0x95, 0x40, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xa5 0xfff0 0xc5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xa5, 0xfff0, 0xc5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x6f 0xfff0 0x8f 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x6f, 0xfff0, 0x8f, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x7b 0xfff0 0x9b 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x7b, 0xfff0, 0x9b, 0x40, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xa2 0xfff0 0xc2 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xa2, 0xfff0, 0xc2, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x82 0xfff0 0xa2 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x82, 0xfff0, 0xa2, 0x40, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x87 0xfff0 0xa7 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x87, 0xfff0, 0xa7, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x72 0xfff0 0x92 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x72, 0xfff0, 0x92, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x8b 0xfff0 0xab 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x8b, 0xfff0, 0xab, 0x40, 0x4 delay 0x1 return SinisterArrowRaidOpponentExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x95 0xfff0 0xb5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x95, 0xfff0, 0xb5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x75 0xfff0 0x95 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x75, 0xfff0, 0x95, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xa5 0xfff0 0xc5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xa5, 0xfff0, 0xc5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x6f 0xfff0 0x8f 0x40 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x6f, 0xfff0, 0x8f, 0x40, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x7b 0xfff0 0x9b 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x7b, 0xfff0, 0x9b, 0x40, 0x4 delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xa2 0xfff0 0xc2 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xa2, 0xfff0, 0xc2, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x82 0xfff0 0xa2 0x40 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x82, 0xfff0, 0xa2, 0x40, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x87 0xfff0 0xa7 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x87, 0xfff0, 0xa7, 0x40, 0x4 delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x72 0xfff0 0x92 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x72, 0xfff0, 0x92, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x85 0xfff0 0xa5 0x40 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x85, 0xfff0, 0xa5, 0x40, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x8b 0xfff0 0xab 0x40 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x8b, 0xfff0, 0xab, 0x40, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x1 return SinisterArrowRaidArrowsStrikePlayer: - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x5 0xfff0 0x55 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x5, 0xfff0, 0x55, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffe5 0xfff0 0x35 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffe5, 0xfff0, 0x35, 0x90, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x15 0xfff0 0x65 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x15, 0xfff0, 0x65, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffdf 0xfff0 0x2f 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffdf, 0xfff0, 0x2f, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffeb 0xfff0 0x3b 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffeb, 0xfff0, 0x3b, 0x90, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x12 0xfff0 0x62 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x12, 0xfff0, 0x62, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff2 0xfff0 0x42 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff2, 0xfff0, 0x42, 0x90, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff7 0xfff0 0x47 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff7, 0xfff0, 0x47, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffe2 0xfff0 0x32 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffe2, 0xfff0, 0x32, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 delay 0x1 playsewithpan SE_M_HORN_ATTACK, SOUND_PAN_TARGET - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfffb 0xfff0 0x4b 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xfff0, 0x4b, 0x90, 0x4 delay 0x1 return SinisterArrowRaidPlayerExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x5 0xfff0 0x55 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x5, 0xfff0, 0x55, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffe5 0xfff0 0x35 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffe5, 0xfff0, 0x35, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x15 0xfff0 0x65 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x15, 0xfff0, 0x65, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffdf 0xfff0 0x2f 0x90 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffdf, 0xfff0, 0x2f, 0x90, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffeb 0xfff0 0x3b 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffeb, 0xfff0, 0x3b, 0x90, 0x4 delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0x12 0xfff0 0x62 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0x12, 0xfff0, 0x62, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff2 0xfff0 0x42 0x90 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff2, 0xfff0, 0x42, 0x90, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff7 0xfff0 0x47 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff7, 0xfff0, 0x47, 0x90, 0x4 delay 0x1 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xffe2 0xfff0 0x32 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xffe2, 0xfff0, 0x32, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfff5 0xfff0 0x45 0x90 0x4 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfff5, 0xfff0, 0x45, 0x90, 0x4 delay 0x1 - launchtemplate gArrowRaidArrowOnslaughtSpriteTemplate 0x82 0x5 0xfffb 0xfff0 0x4b 0x90 0x4 - launchtemplate gArrowRaidExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gArrowRaidArrowOnslaughtSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xfff0, 0x4b, 0x90, 0x4 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x1 return SinisterArrowRaidFinalExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gArrowRaidExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gArrowRaidExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return @@ -28991,18 +28989,18 @@ Move_MALICIOUS_MOONSAULT:: loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion fadetobg BG_MALICIOUS_MOONSAULT waitbgfadeout - setblends 0x80c + setalpha 12, 8 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gVerticalDipSpriteTemplate 0x2 0x3 0x6 0x1 0x0 + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 0x6, 0x1, 0x0 delay 0x1 - launchtemplate gFirePlumeSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x42 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gFirePlumeSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 waitforvisualfinish delay 0x0 monbg ANIM_ATTACKER @@ -29010,280 +29008,280 @@ Move_MALICIOUS_MOONSAULT:: call MaliciousMoonsaultFireSpin call MaliciousMoonsaultFireSpin clearmonbg ANIM_ATTACKER - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultRedFlySpriteTemplate 0x82, 0x4, 0x0 0x0 0xd 0x150 + createsprite gMaliciousMoonsaultRedFlySpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x150 call MaliciousMoonsaultFireSpin - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x5 0x0 0xa 0x0000 @ target darkens + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x5, 0x0, 0xa, 0x0000 @ target darkens delay 0x1a playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - launchtemplate gMaliciousMoonsaultRedBounceSpriteTemplate 0x83 0x0 + createsprite gMaliciousMoonsaultRedBounceSpriteTemplate, ANIM_TARGET, 3 delay 0x7 - launchtemplate gMaliciousMoonsaultRedImpactSpriteTemplate 0x82, 0x4, 0x0 0x0 0x1 0x0 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xff00 0x15 0x0 0x4 + createsprite gMaliciousMoonsaultRedImpactSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1, 0x0 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xff00, 0x15, 0x0, 0x4 call MaliciousMoonsaultExplosion delay 0x6 call MaliciousMoonsaultExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x1, 0x0, 0x10, 0x001b @ fade all to red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x001b @ fade all to red delay 0x6 call MaliciousMoonsaultExplosion - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 waitforvisualfinish call ResetFromRedScreen blendoff end MaliciousMoonsaultFireSpin: - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2f 0x490 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2f, 0x490, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x30 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x30, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x500 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x500, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x540 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x540, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x4d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x4d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2f 0x490 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2f, 0x490, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x500 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x500, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x30 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x30, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x4d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x4d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x540 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x540, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x1 return MaliciousMoonsaultExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gMaliciousMoonsaultExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gMaliciousMoonsaultExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gMaliciousMoonsaultExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gMaliciousMoonsaultExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMaliciousMoonsaultExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gMaliciousMoonsaultFireblastSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gMaliciousMoonsaultExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gMaliciousMoonsaultFireblastSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 return Move_OCEANIC_OPERETTA:: - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish loadspritegfx ANIM_TAG_SPOTLIGHT - launchtask AnimTask_CreateSpotlight 0x2 0x0 - launchtask AnimTask_HardwarePaletteFade 0x2 0x5 0xf8 0x3 0x0 0xa 0x0 + createvisualtask AnimTask_CreateSpotlight, 0x2 + createvisualtask AnimTask_HardwarePaletteFade, 0x2, 0xf8, 0x3, 0x0, 0xa, 0x0 waitforvisualfinish - launchtemplate gOceanOperaSpotlightSpriteTemplate 0x82, 0x3, 0x0 0xfff8 0x50 @spotlight + createsprite gOceanOperaSpotlightSpriteTemplate, ANIM_TARGET, 2, 0x0, 0xfff8, 0x50 @spotlight loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_WATER_ORB @blue playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call OceanicOperettaBuffEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x7fff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x7fff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call OceanicOperettaBuffEffect delay 0x8 call OceanicOperettaBuffEffect waitforvisualfinish unloadspritegfx ANIM_TAG_FOCUS_ENERGY unloadspritegfx ANIM_TAG_SPOTLIGHT - launchtask AnimTask_HardwarePaletteFade 0x2 0x5 0xf8 0x3 0xa 0x0 0x1 + createvisualtask AnimTask_HardwarePaletteFade, 0x2, 0xf8, 0x3, 0xa, 0x0, 0x1 waitforvisualfinish - launchtask AnimTask_RemoveSpotlight 0x2 0x0 + createvisualtask AnimTask_RemoveSpotlight, 0x2 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x6 0x5da0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x6, 0x5da0 loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT loadspritegfx ANIM_TAG_THIN_RING invisible ANIM_ATTACKER - launchtemplate gOceanOperaBlueChargeSpriteTemplate 0x2 0x1 0x0 @charge + createsprite gOceanOperaBlueChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 @charge delay 0x2 - launchtask AnimTask_ShakeMon 0x5 0x5 ANIM_ATTACKER 0x0 0x2 0x50 0x1 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createvisualtask AnimTask_ShakeMon, 0x5, ANIM_ATTACKER, 0x0, 0x2, 0x50, 0x1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_M_GRASSWHISTLE, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gOceanOperaBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 0x0 0x0 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gOceanOperaBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gWhirlpoolSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x1a visible ANIM_TARGET loopsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET, 0x14, 0x5 - launchtemplate gOceanOperaMovingOrbsSpriteTemplate 0x32 0x6 0x0 0x0 0x0 0x0 0x60 0x0 @mist ball + createsprite gOceanOperaMovingOrbsSpriteTemplate, ANIM_ATTACKER, 50, 0x0, 0x0, 0x0, 0x0, 0x60, 0x0 @mist ball delay 0x5c visible ANIM_ATTACKER delay 0x0 loopsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET, 0x14, 0x1 - launchtemplate gOceanOperaBlueOrbsSpriteTemplate 0x32 0x6 0x0 ANIM_TARGET 0x0 0x0 0x0 0x35 + createsprite gOceanOperaBlueOrbsSpriteTemplate, ANIM_ATTACKER, 50, 0x0, ANIM_TARGET, 0x0, 0x0, 0x0, 0x35 delay 0x5 playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExpandingRingSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaExpandingRingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 delay 0x4 - launchtemplate gOceanOperaExpandingRingSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaExpandingRingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 delay 0x4 - launchtemplate gOceanOperaExpandingRingSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaExpandingRingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 delay 0x4 - launchtemplate gOceanOperaExpandingRingSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaExpandingRingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 delay 0x4 - launchtemplate gOceanOperaExpandingRingSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 + createsprite gOceanOperaExpandingRingSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 delay 0x10 loadspritegfx ANIM_TAG_EXPLOSION @explosion loadspritegfx ANIM_TAG_SPARKLE_2 @sparkle loadspritegfx ANIM_TAG_RAIN_DROPS @rain - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x8 0x40 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x8, 0x40 call OceanicOperettaExplosion - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_DEF 0x2 0x0 0xb 0x5da0 - launchtask AnimTask_CreateRaindrops 0x2 0x3 0x0 0x3 0x78 + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, F_PAL_TARGET, 0x2, 0x0, 0xb, 0x5da0 + createvisualtask AnimTask_CreateRaindrops, 0x2, 0x0, 0x3, 0x78 call OceanicOperettaExplosion call OceanicOperettaExplosion playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - launchtask AnimTask_CreateRaindrops 0x2 0x3 0x0 0x3 0x78 + createvisualtask AnimTask_CreateRaindrops, 0x2, 0x0, 0x3, 0x78 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_DEF 0x2 0xb 0x0 0x5da0 + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, F_PAL_TARGET, 0x2, 0xb, 0x0, 0x5da0 waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x6 0x0 0x5da0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x6, 0x0, 0x5da0 waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end OceanicOperettaBuffEffect: - launchtemplate gOceanOperaBlueFlareSpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gOceanOperaBlueFlareSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gOceanOperaBlueFlareSpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gOceanOperaBlueFlareSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gOceanOperaBlueFlareSpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gOceanOperaBlueFlareSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gOceanOperaBlueFlareSpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gOceanOperaBlueFlareSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gOceanOperaBlueFlareSpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gOceanOperaBlueFlareSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return OceanicOperettaExplosion: - launchtemplate gOceanOperaSparkleSpriteTemplate 0x33 0x6 0xfff1 0x0 ANIM_TARGET 0x0 0x20 0x3c + createsprite gOceanOperaSparkleSpriteTemplate, ANIM_ATTACKER, 51, 0xfff1, 0x0, ANIM_TARGET, 0x0, 0x20, 0x3c playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gOceanOperaExplosionSpriteTemplate, ANIM_ATTACKER, 51, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gOceanOperaExplosionSpriteTemplate, ANIM_ATTACKER, 51, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gOceanOperaSparkleSpriteTemplate 0x33 0x6 0xc 0xfffb ANIM_TARGET 0x0 0x20 0x3c + createsprite gOceanOperaExplosionSpriteTemplate, ANIM_ATTACKER, 51, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gOceanOperaSparkleSpriteTemplate, ANIM_ATTACKER, 51, 0xc, 0xfffb, ANIM_TARGET, 0x0, 0x20, 0x3c delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gOceanOperaExplosionSpriteTemplate, ANIM_ATTACKER, 51, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gOceanOperaExplosionSpriteTemplate, ANIM_ATTACKER, 51, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return @@ -29291,20 +29289,20 @@ OceanicOperettaExplosion: Move_SPLINTERED_STORMSHARDS:: loadspritegfx ANIM_TAG_ROCKS @rock loadspritegfx ANIM_TAG_ICICLE_SPEAR @spear - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_GetLycanrocForm 0x2 0x0 + createvisualtask AnimTask_GetLycanrocForm, 0x2 jumpargeq 0x0 0x1 SplinteredStormshardsNightForme SplinteredStormshardsDayForme: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xc 0x5bff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xc, 0x5bff goto SplinteredStormshardsFinishFade SplinteredStormshardsNightForme: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0xc 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xc, 0x0000 SplinteredStormshardsFinishFade: waitforvisualfinish - setblends 0x80c + setalpha 12, 8 playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET SplinteredStormshardsByOpponent SplinteredStormshardsByPlayer: loopsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET, 0x10, 0xc @@ -29313,14 +29311,14 @@ SplinteredStormshardsByPlayer: loadspritegfx ANIM_TAG_ROUND_SHADOW @fly invisible ANIM_TARGET playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gSplinteredShardsFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 call SplinteredStormshardsPlayer_Rising1 call SplinteredStormshardsPlayer_Rising2 visible ANIM_ATTACKER delay 0x1 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x60 0x80 0x60 0x30 0x30 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x5bff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x60, 0x80, 0x60, 0x30, 0x30 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x5bff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 delay 0x2 call SplinteredStormshardsPlayer_Rising2 call SplinteredStormshardsPlayer_Rising1 @@ -29332,59 +29330,59 @@ SplinteredStormshardsByPlayer: loadspritegfx ANIM_TAG_METEOR @superpower loadspritegfx ANIM_TAG_EXPLOSION @explosion playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 @lunge forward + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 @lunge forward delay 0x2 invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate 0x83 0x1 0x0 @superpower - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x4 0x60 0x1 @shake target up and down - launchtemplate gSplinteredShardsSplinterOpponentSteepSpriteTemplate 0x2 0x8 0xffd0 0x18 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 @superpower + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x4, 0x60, 0x1 @shake target up and down + createsprite gSplinteredShardsSplinterOpponentSteepSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0x18, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x4 - launchtemplate gSplinteredShardsSplinterOpponentShallowSpriteTemplate 0x2 0x8 0xffd0 0x1 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsSplinterOpponentShallowSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0x1, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x4 call SplinteredStormshardsExplosionOpponent call SplinteredStormshardsExplosionOpponent SplinteredStormshardsEnd: - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff call SplinteredStormshardsBrownExplode waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x4, 0x10, 0x0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x10, 0x0, 0x7fff waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish waitforvisualfinish end SplinteredStormshardsExplosionOpponent: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterOpponentSteepSpriteTemplate 0x82 0x8 0xffd0 0x20 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterOpponentSteepSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x20, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterOpponentShallowSpriteTemplate 0x82 0x8 0xffd0 0x0 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterOpponentShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterOpponentShallowSpriteTemplate 0x82 0x8 0xffd0 0xfff8 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterOpponentShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0xfff8, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterOpponentSteepSpriteTemplate 0x82 0x8 0xffd0 0x20 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterOpponentSteepSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x20, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterOpponentShallowSpriteTemplate 0x82 0x8 0xffd0 0x0 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterOpponentShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 @@ -29395,14 +29393,14 @@ SplinteredStormshardsByOpponent: delay 0x2 loadspritegfx ANIM_TAG_ROUND_SHADOW @fly invisible ANIM_TARGET - launchtemplate gSplinteredShardsFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gSplinteredShardsFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 call SplinteredStormshardsOpponent_Rising1 call SplinteredStormshardsOpponent_Rising2 visible ANIM_ATTACKER delay 0x1 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xd0 0x40 0xd0 0x0 0x30 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x5bff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xd0, 0x40, 0xd0, 0x0, 0x30 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x5bff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 delay 0x2 call SplinteredStormshardsOpponent_Rising2 call SplinteredStormshardsOpponent_Rising1 @@ -29415,16 +29413,16 @@ SplinteredStormshardsByOpponent: loadspritegfx ANIM_TAG_METEOR @superpower loadspritegfx ANIM_TAG_EXPLOSION @explosion playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 @lunge forward + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 @lunge forward delay 0x2 invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate 0x83 0x1 0x0 @superpower - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x4 0x60 0x1 @shake target up and down - launchtemplate gSplinteredShardsSplinterPlayerShallowSpriteTemplate 0x82 0x8 0xffd0 0x18 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 @superpower + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x4, 0x60, 0x1 @shake target up and down + createsprite gSplinteredShardsSplinterPlayerShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x18, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x4 - launchtemplate gSplinteredShardsSplinterPlayerSteepSpriteTemplate 0x82 0x8 0xffd0 0x30 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsSplinterPlayerSteepSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x30, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 delay 0x4 call SplinteredStormshardsExplosionOnPlayer @@ -29432,117 +29430,117 @@ SplinteredStormshardsByOpponent: goto SplinteredStormshardsEnd SplinteredStormshardsExplosionOnPlayer: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterPlayerShallowSpriteTemplate 0x82 0x8 0xffd0 0x20 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterPlayerShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x20, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterPlayerSteepSpriteTemplate 0x82 0x8 0xffd0 0x35 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterPlayerSteepSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x35, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterPlayerShallowSpriteTemplate 0x82 0x8 0xffd0 0x1c 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterPlayerShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x1c, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterPlayerShallowSpriteTemplate 0x82 0x8 0xffd0 0x16 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterPlayerShallowSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x16, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 - launchtemplate gSplinteredShardsSplinterPlayerSteepSpriteTemplate 0x82 0x8 0xffd0 0x2d 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 + createsprite gSplinteredShardsSplinterPlayerSteepSpriteTemplate, ANIM_TARGET, 2, 0xffd0, 0x2d, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET delay 0x2 return SplinteredStormshardsBrownExplode: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSplinteredShardsExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gSplinteredShardsExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return SplinteredStormshardsPlayer_Rising1: - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x24 0x80 0x24 0x30 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x24, 0x80, 0x24, 0x30, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x10 0x80 0x10 0x35 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x10, 0x80, 0x10, 0x35, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x45 0x80 0x45 0x3a 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x45, 0x80, 0x45, 0x3a, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x60 0x80 0x60 0x30 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x60, 0x80, 0x60, 0x30, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x30 0x80 0x30 0x3c 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x30, 0x80, 0x30, 0x3c, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x55 0x80 0x55 0x33 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x55, 0x80, 0x55, 0x33, 0x30 delay 0x2 return SplinteredStormshardsPlayer_Rising2: - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x29 0x80 0x29 0x31 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x29, 0x80, 0x29, 0x31, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x73 0x80 0x73 0x32 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x73, 0x80, 0x73, 0x32, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x4a 0x80 0x4a 0x3c 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x4a, 0x80, 0x4a, 0x3c, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x64 0x80 0x64 0x33 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x64, 0x80, 0x64, 0x33, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x2c 0x80 0x2c 0x3d 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x2c, 0x80, 0x2c, 0x3d, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x6c 0x80 0x6c 0x30 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x6c, 0x80, 0x6c, 0x30, 0x30 delay 0x2 return SplinteredStormshardsOpponent_Rising1: - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x94 0x40 0x94 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x94, 0x40, 0x94, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x80 0x40 0x80 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x80, 0x40, 0x80, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xb5 0x40 0xb5 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xb5, 0x40, 0xb5, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xd0 0x40 0xd0 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xd0, 0x40, 0xd0, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xa0 0x40 0xa0 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xa0, 0x40, 0xa0, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xc5 0x40 0xc5 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xc5, 0x40, 0xc5, 0x0, 0x30 delay 0x2 return SplinteredStormshardsOpponent_Rising2: - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x99 0x40 0x99 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x99, 0x40, 0x99, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xe3 0x40 0xe3 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xe3, 0x40, 0xe3, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xba 0x40 0xba 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xba, 0x40, 0xba, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xd4 0x40 0xd4 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xd4, 0x40, 0xd4, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0x9c 0x40 0x9c 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0x9c, 0x40, 0x9c, 0x0, 0x30 delay 0x2 - launchtemplate gSplinteredShardsRisingSpearSpriteTemplate 0x32 0x5 0xdc 0x40 0xdc 0x0 0x30 + createsprite gSplinteredShardsRisingSpearSpriteTemplate, ANIM_ATTACKER, 50, 0xdc, 0x40, 0xdc, 0x0, 0x30 delay 0x2 return SplinteredStormshardsFixBackgroundFade: - launchtask AnimTask_GetLycanrocForm 0x2 0x0 + createvisualtask AnimTask_GetLycanrocForm, 0x2 jumpargeq 0x0 0x1 SplinteredStormshardsNightFormeReturn SplinteredStormshardsDayFormeReturn: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xc 0x0 0x5bff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xc, 0x0, 0x5bff goto SplinteredStormshardsFinishFadeReturn SplinteredStormshardsNightFormeReturn: - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xc 0x0 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xc, 0x0, 0x0000 SplinteredStormshardsFinishFadeReturn: return @@ -29552,43 +29550,43 @@ Move_LETS_SNUGGLE_FOREVER:: loadspritegfx ANIM_TAG_MUSIC_NOTES @music note loadspritegfx ANIM_TAG_SMALL_BUBBLES @fake tears loadspritegfx ANIM_TAG_VERTICAL_HEX @red - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 - launchtemplate gSnuggleForeverHeartSpriteTemplate 0x3 0x2 0x0 0x14 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 + createsprite gSnuggleForeverHeartSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x14 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x1 0x1 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1, 0x1, 0x0 delay 0x7 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x3 0x3 0x80 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x3, 0x3, 0x80 delay 0x8 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x2 0x0 0x80 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2, 0x0, 0x80 delay 0x7 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x1 0x1 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0x1, 0x0 delay 0x8 playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER delay 0x7 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x0 0x3 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0x3, 0x0 delay 0x7 fadetobg BG_SNUGGLE_FOREVER waitbgfadeout invisible ANIM_ATTACKER delay 0x1 setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 delay 0x10 playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER waitforvisualfinish setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 delay 0x10 playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER waitforvisualfinish setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 delay 0x10 playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x2 0x32 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x2, 0x32, 0x1 call LetsSnuggleForeverTears delay 0x8 call LetsSnuggleForeverTears @@ -29597,22 +29595,22 @@ Move_LETS_SNUGGLE_FOREVER:: delay 0x8 call LetsSnuggleForeverTears waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x2, 0x0, 0x10, 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x0000 waitforvisualfinish loadspritegfx ANIM_TAG_SPARKLE_4 @detect playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gSnuggleForeverEyesSpriteTemplate 0xd 0x2 0xa 0xfff2 - launchtemplate gSnuggleForeverEyesSpriteTemplate 0xd 0x2 0xfff6 0xfff2 + createsprite gSnuggleForeverEyesSpriteTemplate, ANIM_ATTACKER, 13, 0xa, 0xfff2 + createsprite gSnuggleForeverEyesSpriteTemplate, ANIM_ATTACKER, 13, 0xfff6, 0xfff2 delay 0x20 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x1 0x0 0x10 0x579D - launchtask AnimTask_GrowTarget 0x5 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0x0, 0x10, 0x579D + createvisualtask AnimTask_GrowTarget, 0x5 delay 0x5 loadspritegfx ANIM_TAG_IMPACT @hit loadspritegfx ANIM_TAG_PAIN_SPLIT @painsplit loadspritegfx ANIM_TAG_DUCK @duck loopsewithpan SE_M_CRABHAMMER, SOUND_PAN_TARGET, 0x14, 10 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x0 0xffee 0xa 0xa 0x4 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x1 0x12 0xa 0xa 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x0, 0xffee, 0xa, 0xa, 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x1, 0x12, 0xa, 0xa, 0x4 call LetsSnuggleForeverStars_1 call LetsSnuggleForeverImpacts call LetsSnuggleForeverStars_2 @@ -29621,8 +29619,8 @@ Move_LETS_SNUGGLE_FOREVER:: playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET call LetsSnuggleForeverStars_2 call LetsSnuggleForeverImpacts - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x0 0xffee 0x6 0x6 0x4 - launchtask AnimTask_TranslateMonElliptical 0x2 0x5 0x1 0x12 0x6 0x6 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x0, 0xffee, 0x6, 0x6, 0x4 + createvisualtask AnimTask_TranslateMonElliptical, 0x2, 0x1, 0x12, 0x6, 0x6, 0x4 call LetsSnuggleForeverStars_1 delay 0x0 call LetsSnuggleForeverImpacts @@ -29631,7 +29629,7 @@ Move_LETS_SNUGGLE_FOREVER:: call LetsSnuggleForeverImpacts call LetsSnuggleForeverStars_1 delay 0x0 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL-ANIM_PAL_DEF 0x2 0x0 0x10 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x2, 0x0, 0x10, 0x7fff playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET call LetsSnuggleForeverStars_2 delay 0x0 @@ -29643,35 +29641,35 @@ Move_LETS_SNUGGLE_FOREVER:: end LetsSnuggleForeverTears: playsewithpan SE_M_TAIL_WHIP, SOUND_PAN_TARGET - launchtemplate gTearDropSpriteTemplate 0x82 0x2 ANIM_TARGET 0x0 - launchtemplate gTearDropSpriteTemplate 0x82 0x2 ANIM_TARGET 0x1 + createsprite gTearDropSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x0 + createsprite gTearDropSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x1 delay 0x8 - launchtemplate gTearDropSpriteTemplate 0x82 0x2 ANIM_TARGET 0x2 - launchtemplate gTearDropSpriteTemplate 0x82 0x2 ANIM_TARGET 0x3 + createsprite gTearDropSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x2 + createsprite gTearDropSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0x3 return LetsSnuggleForeverImpacts: - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0x0 0xfff4 0x1 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xfff4, 0x1, 0x0 delay 0x8 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xfff4 0x8 0x1 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xfff4, 0x8, 0x1, 0x0 delay 0x8 - launchtemplate gBasicHitSplatSpriteTemplate 0x83 0x4 0xc 0x0 0x1 0x0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0xc, 0x0, 0x1, 0x0 delay 0x8 return LetsSnuggleForeverStars_1: - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xa0 0xffe0 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xff00 0xffd8 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0x80 0xfff0 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0x1a0 0xffda - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xff80 0xffea - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0xfff0 0xfff8 0xfe80 0xffe1 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xa0, 0xffe0 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff00, 0xffd8 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x80, 0xfff0 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0x1a0, 0xffda + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xff80, 0xffea + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0xfff8, 0xfe80, 0xffe1 return LetsSnuggleForeverStars_2: - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0xa0 0xffe0 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0xff00 0xffd8 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0x80 0xfff0 - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0x1a0 0xffda - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0xff80 0xffea - launchtemplate gSnuggleForeverStarSpriteTemplate 0x83 0x4 0x10 0x8 0xfe80 0xffe1 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xa0, 0xffe0 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff00, 0xffd8 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x80, 0xfff0 + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0x1a0, 0xffda + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xff80, 0xffea + createsprite gSnuggleForeverStarSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x8, 0xfe80, 0xffe1 return @@ -29683,40 +29681,40 @@ Move_CLANGOROUS_SOULBLAZE:: loadspritegfx ANIM_TAG_SPARKLE_2 @stars fadetobg BG_CLANGOROUS_SOULBLAZE waitbgfadein - launchtask AnimTask_RockMonBackAndForth 0x5 0x3 0x0 0x2 0x0 + createvisualtask AnimTask_RockMonBackAndForth, 0x5, 0x0, 0x2, 0x0 call ClangorousSoulblazeBuffEffect call ClangorousSoulblazeBuffEffect call ClangorousSoulblazeBuffEffect waitforvisualfinish loadspritegfx ANIM_TAG_VERTICAL_HEX @red loadspritegfx ANIM_TAG_HORSESHOE_SIDE_FIST @fist - launchtemplate gClangorousSoulRedFistTemplate 0x2 0x8 0xfff0 0x0 0x0 0x0 0xa ANIM_ATTACKER ANIM_RIGHT_FIST 0x1 - launchtemplate gClangorousSoulRedFistTemplate 0x2 0x8 0x10 0x0 0x0 0x0 0xa ANIM_ATTACKER ANIM_LEFT_FIST 0x1 + createsprite gClangorousSoulRedFistTemplate, ANIM_ATTACKER, 2, 0xfff0, 0x0, 0x0, 0x0, 0xa, ANIM_ATTACKER, ANIM_RIGHT_FIST, 0x1 + createsprite gClangorousSoulRedFistTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0xa, ANIM_ATTACKER, ANIM_LEFT_FIST, 0x1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish loadspritegfx ANIM_TAG_THIN_RING @ring playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - launchtemplate gClangorousSoulRedRingTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gClangorousSoulRedRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 waitforvisualfinish unloadspritegfx ANIM_TAG_HORSESHOE_SIDE_FIST unloadspritegfx ANIM_TAG_SPARKLE_2 @stars loadspritegfx ANIM_TAG_ROUND_SHADOW @ fly playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazeWhiteFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gClangoorousSoulblazeWhiteFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 delay 0x2 - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0xFFE0 0x1 0xffff - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0xfd00 0xa 0x0 0x2a - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_DEF_PARTNER 0xfd00 0xa 0x0 0x2a + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0xFFE0, 0x1, 0xffff + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0xfd00, 0xa, 0x0, 0x2a + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_DEF_PARTNER, 0xfd00, 0xa, 0x0, 0x2a delay 0x20 - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x0 0x20 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x0, 0x20, 0x1, 0xffff delay 0xC - setblends 0x80c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x4 0x0 + setalpha 12, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x4, 0x0 loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge visible ANIM_ATTACKER monbg ANIM_ATTACKER loopsewithpan SE_M_PSYBEAM2, SOUND_PAN_ATTACKER, 0xe, 0xa - launchtemplate gClangoorousSoulblazePurpleChargeSpriteTemplate 0x2 0x1 0x0 @charge + createsprite gClangoorousSoulblazePurpleChargeSpriteTemplate, ANIM_ATTACKER, 2, 0x0 @charge call ClangorousSoulblazeEnergySwirl call ClangorousSoulblazeEnergySwirl call ClangorousSoulblazeEnergySwirl @@ -29735,11 +29733,11 @@ Move_CLANGOROUS_SOULBLAZE:: delay 0x0 monbg ANIM_TARGET playsewithpan SE_M_GIGA_DRAIN, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x0 0x0 0x0 @music note + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x0 @music note delay 0x5 - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x2 0x3c - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_DEF_PARTNER 0x2 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x2, 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_DEF_PARTNER, 0x2, 0x3c call ClangorousSoulblazePulse_1 delay 0x5 call ClangorousSoulblazePulse_2 @@ -29748,214 +29746,214 @@ Move_CLANGOROUS_SOULBLAZE:: delay 0x5 call ClangorousSoulblazePulse_4 loadspritegfx ANIM_TAG_EXPLOSION - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET ClangorousSoulblazeOnOpponent ClangorousSoulblazeOnPlayer: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0xfff0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0xfff0, ANIM_ATTACKER, 0x1 delay 0x5 call ClangorousSoulblazePulse_5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_ATTACKER, 0x1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x20 0xffe0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x20, 0xffe0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x20 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x20, 0x0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x30 0xffe0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x30, 0xffe0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x30 0xfff0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x30, 0xfff0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x35 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x35, 0x0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x40 0x10 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x40, 0x10, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x40 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x40, 0x0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x45 0xfff0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x45, 0xfff0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x50 0x10 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x50, 0x10, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x50 0xffe0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x50, 0xffe0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x60 0xfff0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x60, 0xfff0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x60 0xffe0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x60, 0xffe0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x65 0xfff0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x65, 0xfff0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x65 0xffe0 ANIM_ATTACKER 0x1 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x65, 0xffe0, ANIM_ATTACKER, 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x3 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x10, 0x10, ANIM_TARGET, 0x1 goto FINISH_SOULBLAZE ClangorousSoulblazeOnOpponent: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x10 0x15 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x15, ANIM_ATTACKER, 0x1 delay 0x5 call ClangorousSoulblazePulse_5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x10 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x0, ANIM_ATTACKER, 0x1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x20 0x25 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x25, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x20 0x5 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x20, 0x5, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x30 0x25 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x30, 0x25, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x30 0x15 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x30, 0x15, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x35 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x35, 0x0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x40 0xa ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x40, 0xa, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x40 0x0 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x40, 0x0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x45 0x10 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x45, 0x10, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x50 0x30 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x50, 0x30, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x50 0x25 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x50, 0x25, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x60 0x40 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x60, 0x40, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x60 0x45 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x60, 0x45, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x65 0x35 ANIM_ATTACKER 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x65, 0x35, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x65 0x40 ANIM_ATTACKER 0x1 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x65, 0x40, ANIM_ATTACKER, 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_4 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_5 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_1 delay 0x5 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - launchtemplate gExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 FINISH_SOULBLAZE: waitforvisualfinish clearmonbg ANIM_TARGET delay 0x5 call ResetFromWhiteScreen blendoff - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x10 - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_DEF_PARTNER 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_DEF_PARTNER, 0x0, 0x10 waitforvisualfinish end ClangorousSoulblazeEnergySwirl: - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x1c 0x180 0x32 0x8 0x32 ANIM_ATTACKER - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x180, 0x32, 0x8, 0x32, ANIM_ATTACKER + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x2 - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x20 0xf0 0x28 0xb 0xffd2 ANIM_ATTACKER + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0xf0, 0x28, 0xb, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x21 0x1a0 0x28 0x4 0x2a ANIM_ATTACKER + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1a0, 0x28, 0x4, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x1f 0x120 0x2d 0x6 0xffd6 ANIM_ATTACKER + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x120, 0x2d, 0x6, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x1c 0x1c0 0x2d 0xb 0x2e ANIM_ATTACKER + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x1c0, 0x2d, 0xb, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gClangoorousSoulblazePurpleSwirlSpriteTemplate 0x82 0x7 0x0 0x21 0x1d0 0x32 0xa 0xffce ANIM_ATTACKER + createsprite gClangoorousSoulblazePurpleSwirlSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x32, 0xa, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 return ClangorousSoulblazeBuffEffect: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtemplate gClangorousSoulBlueBuffTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gClangorousSoulBlueBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gClangorousSoulPurpleBuffTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xfff1 0x0 0x0 0x0 0x20 0x3c + createsprite gClangorousSoulPurpleBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x0, 0x0, 0x20, 0x3c delay 0x4 - launchtemplate gClangorousSoulWhiteBuffTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gClangorousSoulWhiteBuffTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xc 0xfffb 0x0 0x0 0x20 0x3c + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, 0x0, 0x0, 0x20, 0x3c return ClangorousSoulblazePulse_1: playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x1 0x1 0x0 + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x1, 0x1, 0x0 return ClangorousSoulblazePulse_2: playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x3 0x3 0x80 + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x3, 0x3, 0x80 return ClangorousSoulblazePulse_3: playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x2 0x0 0x80 + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x2, 0x0, 0x80 return ClangorousSoulblazePulse_4: playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x0 0x1 0x1 0x0 + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0x1, 0x0 return ClangorousSoulblazePulse_5: playsewithpan SE_M_UPROAR, SOUND_PAN_ATTACKER - launchtemplate gClangoorousSoulblazePulseSpriteTemplate 0x2 0x6 0x10 0x0 0x0 0x0 0x1d 0x0 - launchtemplate gSlowFlyingMusicNotesSpriteTemplate 0x2 0x4 0x1 0x0 0x3 0x0 + createsprite gClangoorousSoulblazePulseSpriteTemplate, ANIM_ATTACKER, 2, 0x10, 0x0, 0x0, 0x0, 0x1d, 0x0 + createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0x1, 0x0, 0x3, 0x0 return @@ -29963,32 +29961,32 @@ Move_GUARDIAN_OF_ALOLA:: loadspritegfx ANIM_TAG_THIN_RING @ring loadspritegfx ANIM_TAG_MUD_SAND @dig loadspritegfx ANIM_TAG_SPEED_DUST @extremespeed - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtemplate gThinRingExpandingSpriteTemplate 0x3 0x4 0x0 0x0 0x0 0x0 + createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x0, 0x0 playsewithpan SE_SHINY, SOUND_PAN_ATTACKER waitforvisualfinish unloadspritegfx ANIM_TAG_THIN_RING playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0xff00 0xf 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xff00, 0xf, 0x0, 0x4 call GuardianOfAlolaRocksPlayer delay 0xa - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x10 call GuardianOfAlolaRocksPlayer waitforvisualfinish delay 0xa playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_ATTACKER 0xff00 0xf 0x0 0x4 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0xff00, 0xf, 0x0, 0x4 call GuardianOfAlolaRocksPlayer delay 0xa - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_ATTACKER 0x0 0x10 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x10 call GuardianOfAlolaRocksPlayer waitforvisualfinish delay 0xa delay 0x10 call GuardianOfAlolaRocksPlayer - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ATK 0x2 0xC 0xC 0x277f @;Yellow - launchtask AnimTask_NightShadeClone 0x5 0x1 0x75 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_ATTACKER, 0x2, 0xC, 0xC, 0x277f @;Yellow + createvisualtask AnimTask_NightShadeClone, 0x5, 0x75 delay 0x10 call GuardianOfAlolaRocksPlayer delay 0x10 @@ -29996,20 +29994,20 @@ Move_GUARDIAN_OF_ALOLA:: delay 0x10 loadspritegfx ANIM_TAG_HORSESHOE_SIDE_FIST call GuardianOfAlolaRocksPlayer - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x3 0x0 0xb 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x3, 0x0, 0xb, 0x0000 delay 0x1 - launchtask AnimTask_BlendParticle, 0x2, 0x5, ANIM_TAG_HORSESHOE_SIDE_FIST, 0x0, 0xC, 0xc, 0x277f + createvisualtask AnimTask_BlendParticle, 0x2, ANIM_TAG_HORSESHOE_SIDE_FIST, 0x0, 0xC, 0xc, 0x277f fadetobg BG_FISSURE waitbgfadeout call GuardianOfAlolaRocksPlayer - launchtask AnimTask_PositionFissureBgOnBattler 0x5 0x3 0x1 0x5 0xffff + createvisualtask AnimTask_PositionFissureBgOnBattler, 0x5, 0x1, 0x5, 0xffff waitbgfadein playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gGuardianOfAlolaFistSpriteTemplate 0x83 0x3 0x0 0xffd0 0x1f + createsprite gGuardianOfAlolaFistSpriteTemplate, ANIM_TARGET, 3, 0x0, 0xffd0, 0x1f delay 0x24 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x0 0xb 0x0 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x0, 0xb, 0x0, 0x0000 playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET - launchtask AnimTask_HorizontalShake 0x3 0x3 ANIM_TARGET 0xa 0x25 + createvisualtask AnimTask_HorizontalShake, 0x3, ANIM_TARGET, 0xa, 0x25 loopsewithpan SE_M_ROCK_THROW SOUND_PAN_TARGET 0x10 0x9 call GuardianOfAlolaRocksTarget call GuardianOfAlolaRockGeyser @@ -30024,7 +30022,7 @@ Move_GUARDIAN_OF_ALOLA:: call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser call GuardianOfAlolaRocksTarget - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_ALL 0x3 0x0 0x10 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x7fff call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser @@ -30034,25 +30032,25 @@ Move_GUARDIAN_OF_ALOLA:: end GuardianOfAlolaRocksPlayer: playsewithpan SE_M_DIG, SOUND_PAN_ATTACKER - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 0x0 0x1 0xc 0x4 0xfff0 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1, 0xc, 0x4, 0xfff0, 0x12 return GuardianOfAlolaRocksTarget: - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0xc 0x4 0xfff0 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x0 0x10 0x4 0xfff6 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xe 0x4 0xffee 0x12 - launchtemplate gDirtPlumeSpriteTemplate 0x2 0x6 ANIM_TARGET 0x1 0xc 0x4 0xfff0 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0xc, 0x4, 0xfff0, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10, 0x4, 0xfff6, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xe, 0x4, 0xffee, 0x12 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x1, 0xc, 0x4, 0xfff0, 0x12 return GuardianOfAlolaRockGeyser: - launchtemplate gGuardianOfAlolaDirtGeyserSpriteTemplate 0x82, 0x3, 0 0xfffc 0x10 @ -4, -0x10 + createsprite gGuardianOfAlolaDirtGeyserSpriteTemplate, ANIM_TARGET, 2, 0, 0xfffc, 0x10 @ -4, -0x10 delay 0x0 - launchtemplate gGuardianOfAlolaDirtGeyserSpriteTemplate 0x82, 0x3, 0 0x100D 0x10 @ + createsprite gGuardianOfAlolaDirtGeyserSpriteTemplate, ANIM_TARGET, 2, 0, 0x100D, 0x10 delay 0x0 - launchtemplate gGuardianOfAlolaDirtGeyserSpriteTemplate 0x82, 0x3, 0 0x4 0x10 + createsprite gGuardianOfAlolaDirtGeyserSpriteTemplate, ANIM_TARGET, 2, 0, 0x4, 0x10 delay 0x0 - launchtemplate gGuardianOfAlolaDirtGeyserSpriteTemplate 0x82, 0x3, 0 0xfff0 0x10 + createsprite gGuardianOfAlolaDirtGeyserSpriteTemplate, ANIM_TARGET, 2, 0, 0xfff0, 0x10 delay 0x0 return @@ -30061,15 +30059,15 @@ Move_SEARING_SUNRAZE_SMASH:: loadspritegfx ANIM_TAG_FOCUS_ENERGY @focus energy loadspritegfx ANIM_TAG_SPARKLE_2 @sparkles invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0xe 0x001b + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0xe, 0x001b playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call SearingSunrazeSmashFlare delay 0x8 playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x7fff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x7fff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call SearingSunrazeSmashFlare delay 0x8 call SearingSunrazeSmashFlare @@ -30081,34 +30079,34 @@ Move_SEARING_SUNRAZE_SMASH:: loadspritegfx ANIM_TAG_SHADOW_BALL @shadow ball loadspritegfx ANIM_TAG_AIR_WAVE_2 @white/grey playsewithpan SE_M_NIGHTMARE, SOUND_PAN_ATTACKER - launchtemplate gSearingSunrazeSmashGrowWormholeSpriteTemplate 0x2 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashGrowWormholeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x10 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x35 0xffed 0x1 0x2 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x35, 0xffed, 0x1, 0x2 delay 0x2 loadspritegfx ANIM_TAG_METEOR @superpower visible ANIM_TARGET - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x50 0xfc00 ANIM_TARGET 0x0 @ spin up target + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x50, 0xfc00, ANIM_TARGET, 0x0 @ spin up target call SearingSunrazeSmashRingsInward - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x30 @ target back to origin (slowly) + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x30 @ target back to origin (slowly) call SearingSunrazeSmashRingsInward delay 0xD invisible ANIM_TARGET - launchtemplate gSearingSunrazeSmashBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gSearingSunrazeSmashWhiteRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashWhiteRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x6 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 @lunge forward + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 @lunge forward playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER delay 0x2 invisible ANIM_ATTACKER - launchtemplate gGrowingSuperpowerTemplate 0x83 0x1 0x0 @superpower - launchtemplate gSearingSunrazeSmashBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gGrowingSuperpowerTemplate, ANIM_TARGET, 3, 0x0 @superpower + createsprite gSearingSunrazeSmashBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_ATTACKER fadetobg BG_COSMIC waitbgfadeout - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xf700 0x0 0x1 0xffff - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x1 0x0 ANIM_TARGET 0x1 @ fix tgt rotation + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xf700, 0x0, 0x1, 0xffff + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x1, 0x0, ANIM_TARGET, 0x1 @ fix tgt rotation invisible ANIM_TARGET waitbgfadein visible ANIM_ATTACKER @@ -30116,7 +30114,7 @@ Move_SEARING_SUNRAZE_SMASH:: loadspritegfx ANIM_TAG_VERTICAL_HEX @red loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge loadspritegfx ANIM_TAG_SMALL_EMBER @fire - launchtemplate gSearingSunrazeSmashInfernoOrbSpriteTemplate 0x2 0x1 ANIM_ATTACKER + createsprite gSearingSunrazeSmashInfernoOrbSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER loopsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER, 0x13, 0x8 call SearingSunrazeSmashCharge call SearingSunrazeSmashCharge @@ -30127,8 +30125,8 @@ Move_SEARING_SUNRAZE_SMASH:: unloadspritegfx ANIM_TAG_THIN_RING @ring loadspritegfx ANIM_TAG_ROUND_SHADOW @fly playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashRedFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG+ANIM_PAL_ATK 0x3 0x0 0xF 0x0 + createsprite gSearingSunrazeSmashRedFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ATTACKER), 0x3, 0x0, 0xF, 0x0 waitforvisualfinish playsewithpan SE_ORB, SOUND_PAN_ATTACKER unloadspritegfx ANIM_TAG_ROUND_SHADOW @fly @@ -30150,43 +30148,43 @@ Move_SEARING_SUNRAZE_SMASH:: stopsound playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET loadspritegfx ANIM_TAG_CUT @cut - launchtemplate gSunsteelStrikeSuperpowerTemplate 0x82 0x1 0x14 + createsprite gSunsteelStrikeSuperpowerTemplate, ANIM_TARGET, 2, 0x14 SearingSunrazeSmashImpact: delay 0x8 delay 0x1 unloadspritegfx ANIM_TAG_GOLD_RING @beam - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x4 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x4, 0x3c playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x20 0xffe0 0x0 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x20, 0xffe0, 0x0 delay 0x2 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x20 0xffe0 0x1 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x20, 0xffe0, 0x1 delay 0x2 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x1c 0xffe0 0x0 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x1c, 0xffe0, 0x0 delay 0x2 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x1c 0xffe0 0x1 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x1c, 0xffe0, 0x1 delay 0x2 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x2c 0xffe0 0x0 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x2c, 0xffe0, 0x0 delay 0x2 playsewithpan SE_M_CUT, SOUND_PAN_TARGET - launchtemplate gSearingSunrazeSmashWhiteCutSpriteTemplate 0x82, 0x3, 0x2c 0xffe0 0x1 + createsprite gSearingSunrazeSmashWhiteCutSpriteTemplate, ANIM_TARGET, 2, 0x2c, 0xffe0, 0x1 delay 0x2 loadspritegfx ANIM_TAG_CROSS_IMPACT @x delay 0x0 unloadspritegfx ANIM_TAG_METEOR @superpower unloadspritegfx ANIM_TAG_DRAGON_ASCENT @dragon ascent 1 unloadspritegfx ANIM_TAG_DRAGON_ASCENT_FOE @dragon ascent 2 - launchtemplate gSearingSunrazeSmashCrossImpactSpriteTemplate 0x82, 0x4, 0x0 0x0 0x1 0x24 + createsprite gSearingSunrazeSmashCrossImpactSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1, 0x24 playsewithpan SE_M_LEER, SOUND_PAN_TARGET visible ANIM_ATTACKER - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ATK, 0x3, 0xF, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ATTACKER), 0x3, 0xF, 0x0, 0x0 visible ANIM_ATTACKER playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x10 0x0000 - launchtemplate gSearingSunrazeSmashShockwaveSpriteTemplate 0x82 0x0 @ charge out and in + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x10, 0x0000 + createsprite gSearingSunrazeSmashShockwaveSpriteTemplate, ANIM_TARGET, 2 @ charge out and in delay 0x1c invisible ANIM_TARGET unloadspritegfx ANIM_TAG_CUT @cut @@ -30195,7 +30193,7 @@ SearingSunrazeSmashImpact: call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL_BATTLERS | ANIM_PAL_BG, 0x4, 0x0, 0x10, 0x001b @full red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x001b @full red call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno @@ -30204,84 +30202,84 @@ SearingSunrazeSmashImpact: call ResetFromRedScreen end SearingSunrazeSmashFlare: - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xfff1 0x0 0x0 0x0 0x20 0x3c - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x0, 0x0, 0x20, 0x3c + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gGrantingStarsSpriteTemplate 0x2 0x6 0xc 0xfffb 0x0 0x0 0x20 0x3c - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, 0x0, 0x0, 0x20, 0x3c + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gEndureEnergySpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return SearingSunrazeSmashRingsInward: - launchtemplate gSearingSunrazeSmashBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gSearingSunrazeSmashWhiteRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashWhiteRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gSearingSunrazeSmashBlueRingInwardsSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gSearingSunrazeSmashBlueRingInwardsSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 return SearingSunrazeSmashInferno: playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_ATTACKER - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x3 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x3 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xa 0x0 0xfffe - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0xfffe 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xd 0x2 0x0 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0xfffe 0x2 - launchtemplate gFireBlastCrossSpriteTemplate 0x82 0x5 0x0 0x0 0xf 0x2 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xa, 0x0, 0xfffe + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0xfffe, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x2, 0x0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0xfffe, 0x2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xf, 0x2, 0x2 delay 0x3 return SearingSunrazeSmashCharge: - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2f 0x490 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2f, 0x490, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x30 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x30, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x500 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x500, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x540 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x540, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x4d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x4d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2f 0x490 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2f, 0x490, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x510 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x510, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x2c 0x500 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x2c, 0x500, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x30 0x4e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x30, 0x4e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x4d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x4d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x1 - launchtemplate gFireSpinSpriteTemplate 0x82 0x7 0x0 0x31 0x540 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x31, 0x540, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x1 return ResetFromRedScreen: - launchtask AnimTask_AllBanksInvisible 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisible, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL_BATTLERS 0x2 0x0 0x0 0x1B @Everything from red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x1B @Everything from red restorebg waitbgfadeout setarg 0x7 0xffff - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitbgfadein - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x0 0x33ED + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0x0, 0x33ED waitforvisualfinish return @@ -30293,14 +30291,14 @@ Move_MENACING_MOONRAZE_MAELSTROM:: loadspritegfx ANIM_TAG_SHADOW_BALL @shadow ball loadspritegfx ANIM_TAG_HANDS_AND_FEET @black invisible ANIM_TARGET - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0xe 0x40c0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x0, 0x0, 0xe, 0x40c0 playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call MenacingMoonrazeMaelstromFlare delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xc 0x0000 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xc, 0x0000 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call MenacingMoonrazeMaelstromFlare playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER delay 0x8 @@ -30310,41 +30308,41 @@ Move_MENACING_MOONRAZE_MAELSTROM:: loadspritegfx ANIM_TAG_THIN_RING @ring loadspritegfx ANIM_TAG_AIR_WAVE_2 @white/grey playsewithpan SE_M_NIGHTMARE, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromWormholeSpriteTemplate 0x2 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromWormholeSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x10 - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET 0x35 0xffed 0x1 0x2 @ target down and left (instantaneously (last arg)) + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x35, 0xffed, 0x1, 0x2 @ target down and left (instantaneously (last arg)) delay 0x2 loadspritegfx ANIM_TAG_METEOR @superpower visible ANIM_TARGET - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x50 0xfc00 ANIM_TARGET 0x0 @ spin up target + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x50, 0xfc00, ANIM_TARGET, 0x0 @ spin up target call MenacingMoonrazeMaelstromRingsInward - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x30 @ target back to origin (slowly) + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x30 @ target back to origin (slowly) call MenacingMoonrazeMaelstromRingsInward delay 0xD invisible ANIM_TARGET - launchtemplate gMoonrazeMaelstromBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gMoonrazeMaelstromWhiteRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromWhiteRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x6 - launchtemplate gHorizontalLungeSpriteTemplate 0x2 0x2 0x4 0x4 @lunge forward + createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 0x4, 0x4 @lunge forward playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER delay 0x2 invisible ANIM_ATTACKER - launchtemplate gMoonrazeMaelstromSuperpowerSpriteTemplate 0x83 0x1 0x0 @superpower - launchtemplate gMoonrazeMaelstromBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromSuperpowerSpriteTemplate, ANIM_TARGET, 3, 0x0 @superpower + createsprite gMoonrazeMaelstromBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_ATTACKER fadetobg BG_COSMIC waitbgfadeout - launchtask AnimTask_IsTargetPlayerSide 0x2 0x0 + createvisualtask AnimTask_IsTargetPlayerSide, 0x2 jumpargeq 0x7 ANIM_TARGET MenacingMoonrazeMaelstromOnPlayer MenacingMoonrazeMaelstromOnOpponent: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0xfd00 0x200 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0xfd00, 0x200, 0x1, 0xffff goto MenacingMoonrazeMaelstromFinish MenacingMoonrazeMaelstromOnPlayer: - launchtask AnimTask_StartSlidingBg 0x5 0x4 0x200 0xfd00 0x1 0xffff + createvisualtask AnimTask_StartSlidingBg, 0x5, 0x200, 0xfd00, 0x1, 0xffff MenacingMoonrazeMaelstromFinish: - launchtask AnimTask_RotateMonSpriteToSide 0x2 0x4 0x1 0x0 ANIM_TARGET 0x1 @ fix tgt rotation + createvisualtask AnimTask_RotateMonSpriteToSide, 0x2, 0x1, 0x0, ANIM_TARGET, 0x1 @ fix tgt rotation invisible ANIM_TARGET waitbgfadein visible ANIM_ATTACKER @@ -30359,18 +30357,18 @@ MenacingMoonrazeMaelstromFinish: unloadspritegfx ANIM_TAG_METEOR @superpower playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER call MenacingMoonrazeMaelstromChargeUp - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xc 0x0000 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xc, 0x0000 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call MenacingMoonrazeMaelstromChargeUp call MenacingMoonrazeMaelstromChargeUp - launchsoundtask SoundTask_LoopSEAdjustPanning 0x7 0xf0 0xffc0 SOUND_PAN_TARGET 0x1 0xf 0x0 0x5 + createsoundtask SoundTask_LoopSEAdjustPanning, 0xf0, 0xffc0, SOUND_PAN_TARGET, 0x1, 0xf, 0x0, 0x5 call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x3c 0x1 - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_DEF 0x4 0x0 0xc 0x0000 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x3c, 0x1 + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, F_PAL_TARGET, 0x4, 0x0, 0xc, 0x0000 call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam @@ -30395,84 +30393,84 @@ MenacingMoonrazeMaelstromFinish: call MenacingMoonrazeMaelstromBeam call MenacingMoonrazeMaelstromBeam playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromShockwaveSpriteTemplate 0x82 0x0 + createsprite gMoonrazeMaelstromShockwaveSpriteTemplate, ANIM_TARGET, 2 call MenacingMoonrazeMaelstromBeam waitforvisualfinish unloadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @shock wave unloadspritegfx ANIM_TAG_ORBS @hyper beam unloadspritegfx ANIM_TAG_HANDS_AND_FEET @black loadspritegfx ANIM_TAG_EXPLOSION_2 @explosion - launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x4c 0x1 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x4c, 0x1 call MenacingMoonrazeMaelstromExplosion call MenacingMoonrazeMaelstromExplosion - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_ALL 0x2 0x0 0x10 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff call MenacingMoonrazeMaelstromExplosion waitforvisualfinish call ResetFromWhiteScreen end MenacingMoonrazeMaelstromExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gMoonrazeMaelstromExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gMoonrazeMaelstromExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gMoonrazeMaelstromExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gMoonrazeMaelstromExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gMoonrazeMaelstromExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gMoonrazeMaelstromExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return MenacingMoonrazeMaelstromFlare: - launchtemplate gMoonrazeMaelstromBlackSparklesSpriteTemplate 0x2 0x6 0xfff1 0x0 0x0 0x0 0x20 0x3c - launchtemplate gMoonrazeMaelstromBlueBuffSpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gMoonrazeMaelstromBlackSparklesSpriteTemplate, ANIM_ATTACKER, 2, 0xfff1, 0x0, 0x0, 0x0, 0x20, 0x3c + createsprite gMoonrazeMaelstromBlueBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gMoonrazeMaelstromBlueBuffSpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gMoonrazeMaelstromBlueBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gMoonrazeMaelstromBlackSparklesSpriteTemplate 0x2 0x6 0xc 0xfffb 0x0 0x0 0x20 0x3c - launchtemplate gMoonrazeMaelstromBlackBuffSpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gMoonrazeMaelstromBlackSparklesSpriteTemplate, ANIM_ATTACKER, 2, 0xc, 0xfffb, 0x0, 0x0, 0x20, 0x3c + createsprite gMoonrazeMaelstromBlackBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gMoonrazeMaelstromBlackBuffSpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gMoonrazeMaelstromBlackBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gMoonrazeMaelstromBlackBuffSpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gMoonrazeMaelstromBlackBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return MenacingMoonrazeMaelstromRingsInward: - launchtemplate gMoonrazeMaelstromBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gMoonrazeMaelstromWhiteRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromWhiteRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 - launchtemplate gMoonrazeMaelstromBlueRingSpriteTemplate 0x28 0x4 0x0 0x0 ANIM_TARGET 0x0 + createsprite gMoonrazeMaelstromBlueRingSpriteTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, ANIM_TARGET, 0x0 delay 0x8 return MenacingMoonrazeMaelstromChargeUp: - launchtemplate gMoonrazeMaelstromPurpleBuffSpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x1c 0x210 0x1e 0xd 0x32 ANIM_ATTACKER + createsprite gMoonrazeMaelstromPurpleBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x20 0x1e0 0x14 0x10 0xffd2 ANIM_ATTACKER + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromPurpleBuffSpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gMoonrazeMaelstromPurpleBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x1c 0x200 0x19 0x10 0x2e ANIM_ATTACKER + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x21 0x1d0 0x1e 0xf 0xffce ANIM_ATTACKER + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromPurpleBuffSpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x21 0x240 0x14 0x8 0x2a ANIM_ATTACKER + createsprite gMoonrazeMaelstromPurpleBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromBlackOrbsSpriteTemplate 0x2 0x7 0x0 0x1f 0x190 0x19 0xb 0xffd6 ANIM_ATTACKER + createsprite gMoonrazeMaelstromBlackOrbsSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_ATTACKER delay 0x2 - launchtemplate gMoonrazeMaelstromPurpleBuffSpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gMoonrazeMaelstromPurpleBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return MenacingMoonrazeMaelstromBeam: - launchtemplate gMoonrazeMaelstromBeamSpriteTemplate 0x82 0x0 - launchtemplate gMoonrazeMaelstromBeamSpriteTemplate 0x82 0x0 + createsprite gMoonrazeMaelstromBeamSpriteTemplate, ANIM_TARGET, 2 + createsprite gMoonrazeMaelstromBeamSpriteTemplate, ANIM_TARGET, 2 delay 0x1 return @@ -30488,21 +30486,21 @@ Move_LIGHT_THAT_BURNS_THE_SKY:: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call EndureEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x5bff - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x5bff + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call EndureEffect delay 0x8 call EndureEffect delay 0x8 unloadspritegfx ANIM_TAG_FOCUS_ENERGY monbg ANIM_ATTACKER - setblends 0x80c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL-ANIM_PAL_ATK 0x2 0x0 0xF 0x0000 + setalpha 12, 8 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ADJACENT), 0x2, 0x0, 0xF, 0x0000 waitforvisualfinish - launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x3c 0x2 0xc @ charge particles to attacker + createvisualtask AnimTask_ElectricChargingParticles, 0x2, 0x0, 0x3c, 0x2, 0xc @ charge particles to attacker delay 0x1e loopsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER, 0xe, 0xa - launchtemplate gSuperpowerOrbSpriteTemplate, 0x83, 0x1, 0x0 + createsprite gSuperpowerOrbSpriteTemplate, ANIM_TARGET, 3, 0x0 call LightThatBurnsTheSkyGreenSparks call LightThatBurnsTheSkyGreenSparks call LightThatBurnsTheSkyGreenSparks @@ -30513,26 +30511,26 @@ Move_LIGHT_THAT_BURNS_THE_SKY:: call LightThatBurnsTheSkyGreenSparks call LightThatBurnsTheSkyGreenSparks delay 0xe - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x2 0x0 0x4 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x0, 0x4, 0x0000 clearmonbg ANIM_ATTACKER blendoff playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffe0 0xfff0 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0xfff0, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0x1 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffd0 0xffe4 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffd0, 0xffe4, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0x1 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0x20 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0x60 0x8 0x1 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0xa0 0x8 0x0 0x3 - launchtemplate gSparkElectricityFlashingSpriteTemplate 0x2 0x8 0xffc0 0xffd8 0x25 0x2c 0xe0 0x8 0x2 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0x20, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0x60, 0x8, 0x1, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0xa0, 0x8, 0x0, 0x3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0xffd8, 0x25, 0x2c, 0xe0, 0x8, 0x2, 0x3 delay 0x6 - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x3 0x3c + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x3, 0x3c unloadspritegfx ANIM_TAG_LEAF @green unloadspritegfx ANIM_TAG_ELECTRIC_ORBS @charge loadspritegfx ANIM_TAG_FIRE_PLUME @blast burn @@ -30540,97 +30538,97 @@ Move_LIGHT_THAT_BURNS_THE_SKY:: loadspritegfx ANIM_TAG_STRAIGHT_BEAM panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 0x2, 0x0 monbg ANIM_TARGET - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x6 0x0 0x10 0x43FF @;Light yellow + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x6, 0x0, 0x10, 0x43FF @;Light yellow call PhotonGeyserBeam call LightThatBurnsTheSkyGeyser call LightThatBurnsTheSkyBlast_1 call LightThatBurnsTheSkyGeyser call LightThatBurnsTheSkyBlast_2 call LightThatBurnsTheSkyGeyser - launchtask AnimTask_BlendBattleAnimPal, 0x2, 0x5, ANIM_PAL_ALL - ANIM_PAL_DEF, 0x4, 0x0, 0x10, 0x43FF + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x4, 0x0, 0x10, 0x43FF call LightThatBurnsTheSkyBlast_3 clearmonbg ANIM_TARGET waitforvisualfinish delay 0x10 - launchtask AnimTask_BlendBattleAnimPal 0x2 0x5 ANIM_PAL_ALL 0x0 0x10 0x0 0x43FF + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x0, 0x10, 0x0, 0x43FF restorebg waitbgfadeout end LightThatBurnsTheSkyBlast_1: - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 return LightThatBurnsTheSkyBlast_2: - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffc0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x6 0x6 0xffd8 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffe0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x46 0x6 0x28 0xffec 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x40 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x28 0x14 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0x0 0x20 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffd8 0x14 0x18 0x0 0x0 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffd8, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffe0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x28, 0xffec, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x40, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x28, 0x14, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x20, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffd8, 0x14, 0x18, 0x0, 0x0, 0x0 return LightThatBurnsTheSkyBlast_3: - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffa0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x6 0x6 0xffc4 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x46 0x6 0x0 0xffd0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x46 0x6 0x3c 0xffe2 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x60 0x0 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x42 0x6 0x3c 0x1e 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0x0 0x30 0x18 0x0 0x0 0x0 - launchtemplate gLightThatBurnsTheSkyBlastBurnSpriteTemplate 0x2 0x6 0xffc4 0x1e 0x18 0x0 0x0 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffa0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 6, 0xffc4, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x0, 0xffd0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 70, 0x3c, 0xffe2, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x60, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 66, 0x3c, 0x1e, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x30, 0x18, 0x0, 0x0, 0x0 + createsprite gLightThatBurnsTheSkyBlastBurnSpriteTemplate, ANIM_ATTACKER, 2, 0xffc4, 0x1e, 0x18, 0x0, 0x0, 0x0 return LightThatBurnsTheSkyGeyser: - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0003 0x0005 0x1 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0x0005, 0x1, 0x0 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xfff1 0x1 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xfff1, 0x1, 0x0 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xfffb 0x1 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xfffb, 0x1, 0x0 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0x0012 0x1 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0x0012, 0x1, 0x0 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0000 0x0005 0x1 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0x0005, 0x1, 0x0 playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0003 0xfff5 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0xfff5, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xffe1 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xffe1, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xffeb ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xffeb, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0x0002 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0x0002, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0000 0xfff5 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0xfff5, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0003 0xffe5 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0003, 0xffe5, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfff5 0xffd1 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfff5, 0xffd1, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0008 0xffdb ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0008, 0xffdb, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0xfffa 0xfff2 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0xfffa, 0xfff2, ANIM_TARGET, 0x0 delay 0x0 - launchtemplate gLightThatBurnsTheSkyExplosionSpriteTemplate 0x84, 0x4, 0x0000 0xffe5 ANIM_TARGET 0x0 + createsprite gLightThatBurnsTheSkyExplosionSpriteTemplate, ANIM_TARGET, 4, 0x0000, 0xffe5, ANIM_TARGET, 0x0 delay 0x0 return LightThatBurnsTheSkyGreenSparks: - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x2 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3 - launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x2 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x30, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x30, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x30, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x30, 0x2c, 0x0, 0x28, 0x2, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x0, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x15, 0x2c, 0x40, 0x28, 0x1, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x15, 0x2c, 0x80, 0x28, 0x0, 0x3 + createsprite gLightThatBurnsTheSkyGreenSparkSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, 0x15, 0x2c, 0x0, 0x28, 0x2, 0x3 delay 0x10 return @@ -30641,21 +30639,21 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: loadspritegfx ANIM_TAG_WISP_FIRE @will o wisp loadspritegfx ANIM_TAG_FIRE_PLUME @blast burn loadspritegfx ANIM_TAG_HANDS_AND_FEET @fist - launchtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget 0xA 0x0 + createvisualtask AnimTask_AllBanksInvisibleExceptAttackerAndTarget, 0xA waitforvisualfinish - setblends 0x80c + setalpha 12, 8 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET - launchtemplate gSoulStealBlastburnSpriteTemplate 0x2 0x6 0xffe0 0x0 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x42 0x6 0xffec 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x42 0x6 0x0 0xfff0 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x42 0x6 0x14 0xfff6 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x42 0x6 0x20 0x0 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x42 0x6 0x14 0xa 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x2 0x6 0x0 0x10 0x18 0x0 0x0 0x0 - launchtemplate gSoulStealBlastburnSpriteTemplate 0x2 0x6 0xffec 0xa 0x18 0x0 0x0 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 2, 0xffe0, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 66, 0xffec, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 66, 0x0, 0xfff0, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xfff6, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 66, 0x20, 0x0, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 66, 0x14, 0xa, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x10, 0x18, 0x0, 0x0, 0x0 + createsprite gSoulStealBlastburnSpriteTemplate, ANIM_ATTACKER, 2, 0xffec, 0xa, 0x18, 0x0, 0x0, 0x0 delay 0x5 playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gSoulStealBlackFlySpriteTemplate 0x2 0x4 0x0 0x0 0xd 0x150 + createsprite gSoulStealBlackFlySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0xd, 0x150 waitforvisualfinish invisible ANIM_TARGET fadetobg BG_SOULSTEALING_7STAR_STRIKE @@ -30665,8 +30663,8 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER call SoulStealingSevenStarStrikeBuffEffect delay 0x8 - launchtask AnimTask_BlendColorCycle 0x2 0x6 0x2 0x2 0x2 0x0 0xb 0x0 - launchtask AnimTask_ShakeMon2 0x2 0x5 0x0 0x1 0x0 0x20 0x1 + createvisualtask AnimTask_BlendColorCycle, 0x2, 0x2, 0x2, 0x2, 0x0, 0xb, 0x0 + createvisualtask AnimTask_ShakeMon2, 0x2, 0x0, 0x1, 0x0, 0x20, 0x1 call SoulStealingSevenStarStrikeBuffEffect delay 0x8 call SoulStealingSevenStarStrikeBuffEffect @@ -30675,46 +30673,46 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: waitforvisualfinish unloadspritegfx ANIM_TAG_FIRE_PLUME loadspritegfx ANIM_TAG_PAIN_SPLIT @pain split - launchtask AnimTask_ShakeMon 0x5 0x5 0x1 0x0 0x4 0x25 0x1 - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x14 0x0 0x0 0xa 0x1 0x0 0x1 + createvisualtask AnimTask_ShakeMon, 0x5, 0x1, 0x0, 0x4, 0x25, 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x14, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0x0 ANIM_TARGET 0x2 0x0 0x0 0x30 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0x0, ANIM_TARGET, 0x2, 0x0, 0x0, 0x30 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x10 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x10, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0x0 ANIM_TARGET 0x12 0x0 0x0 0x2c + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0x0, ANIM_TARGET, 0x12, 0x0, 0x0, 0x2c playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET delay 0x4 - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x08 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x08, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0xffeb 0xfff8 0x2 0x0 0x0 0x28 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0xffeb, 0xfff8, 0x2, 0x0, 0x0, 0x28 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x12 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x12, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0xfffb 0xfff4 0x2 0x0 0x0 0x24 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0xfffb, 0xfff4, 0x2, 0x0, 0x0, 0x24 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x15 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x15, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0x5 0xfff8 0x2 0x0 0x0 0x20 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0x5, 0xfff8, 0x2, 0x0, 0x0, 0x20 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x0c 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x0c, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0xfff0 0x1 0x2 0x0 0x0 0x1c + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0xfff0, 0x1, 0x2, 0x0, 0x0, 0x1c playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x13 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x13, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0x0 0x1 0x2 0x0 0x0 0x18 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x1, 0x2, 0x0, 0x0, 0x18 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x0e 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x0e, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0xfff0 0x10 0x2 0x0 0x0 0x14 - launchtemplate gSoulStealBlueFistSpriteTemplate 0x82 0x8 0xffc0 0x12 0x0 0x0 0xa 0x1 0x0 0x1 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0xfff0, 0x10, 0x2, 0x0, 0x0, 0x14 + createsprite gSoulStealBlueFistSpriteTemplate, ANIM_TARGET, 2, 0xffc0, 0x12, 0x0, 0x0, 0xa, 0x1, 0x0, 0x1 delay 0x4 - launchtemplate gSoulStealBlueStarSpriteTemplate 0x84 0x6 0x0 0x10 0x2 0x0 0x0 0x10 + createsprite gSoulStealBlueStarSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x10, 0x2, 0x0, 0x0, 0x10 delay 0x4 playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER - launchtemplate gSoulStealBlackFlySpriteTemplate 0x82, 0x4, 0x0 0x0 0xd 0x150 + createsprite gSoulStealBlackFlySpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0xd, 0x150 delay 0x20 unloadspritegfx ANIM_TAG_PAIN_SPLIT unloadspritegfx ANIM_TAG_ROUND_SHADOW @@ -30723,18 +30721,18 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: loadspritegfx ANIM_TAG_SNORE_Z @z playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_ATTACKER setarg 0x7 0x0 @;Clear arg 7 so task works properly in Link battles - launchtask AnimTask_SnatchOpposingMonMove 0x2 0x0 + createvisualtask AnimTask_SnatchOpposingMonMove, 0x2 delay 0x1c - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_DEF 0x0 0x0 0x10 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x0, 0x0, 0x10, 0x0000 delay 0x1 - launchtemplate gSoulStealZStarSpriteTemplate 0x82, 0x4, 0x0 0x0 0x1 0x24 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1 - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0x0 - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0x2a - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0x54 - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0x7e - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0xa8 - launchtemplate gWillOWispFireSpriteTemplate 0x82 0x1 0xd2 + createsprite gSoulStealZStarSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x1, 0x24 + createvisualtask AnimTask_ShakeMon, 0x2, ANIM_TARGET, 0x3, 0x0, 0x6, 0x1 + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0x0 + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0x2a + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0x54 + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0x7e + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0xa8 + createsprite gWillOWispFireSpriteTemplate, ANIM_TARGET, 2, 0xd2 playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET call SoulStealingSevenStarStrikeBlueParalysis call SoulStealingSevenStarStrikeBlueParalysis @@ -30744,66 +30742,66 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: loadspritegfx ANIM_TAG_SPARKLE_4 @ detect loadspritegfx ANIM_TAG_EXPLOSION @ explosion playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - launchtemplate gTargetTwinkleSpriteTemplate 0x8d 0x3 0x0 0x0 ANIM_TARGET @detect star + createsprite gTargetTwinkleSpriteTemplate, ANIM_TARGET, 13, 0x0, 0x0, ANIM_TARGET @detect star delay 0xa - launchtask AnimTask_HorizontalShake 0x5 0x3 ANIM_TARGET 0x8 0x20 + createvisualtask AnimTask_HorizontalShake, 0x5, ANIM_TARGET, 0x8, 0x20 call SoulStealingSevenStarStrikeExplosion call SoulStealingSevenStarStrikeExplosion - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_ALL - ANIM_PAL_DEF, 0x2, 0x0, 0x10, 0x0 @everything to black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_ALL_BUT_DEF), 0x2, 0x0, 0x10, 0x0 @everything to black call SoulStealingSevenStarStrikeExplosion waitforvisualfinish blendoff restorebg - launchtask AnimTask_BlendBattleAnimPal, 0xa, 0x5, ANIM_PAL_BG | ANIM_PAL_ALL_BATTLERS, 0x2, 0x10, 0x0, 0x0 @everything from black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x10, 0x0, 0x0 @everything from black waitforvisualfinish - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_ALL_BATTLERS 0x2 0x0 0x0 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x0 waitforvisualfinish - launchtask AnimTask_AllBanksVisible 0xA 0x0 + createvisualtask AnimTask_AllBanksVisible, 0xA waitforvisualfinish end SoulStealingSevenStarStrikeBuffEffect: - launchtemplate gSoulStealIceBuffSpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 + createsprite gSoulStealIceBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2 delay 0x4 - launchtemplate gSoulStealIceBuffSpriteTemplate 0x2 0x4 0x0 0xe 0x1c 0x1 + createsprite gSoulStealIceBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 delay 0x4 - launchtemplate gSoulStealIceBuffSpriteTemplate 0x2 0x4 0x0 0xfffb 0xa 0x2 + createsprite gSoulStealIceBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2 delay 0x4 - launchtemplate gSoulStealIceBuffSpriteTemplate 0x2 0x4 0x0 0x1c 0x1a 0x3 + createsprite gSoulStealIceBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3 delay 0x4 - launchtemplate gSoulStealIceBuffSpriteTemplate 0x2 0x4 0x0 0xfff4 0x0 0x1 + createsprite gSoulStealIceBuffSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfff4, 0x0, 0x1 return SoulStealingSevenStarStrikeBlueParalysis: playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x5, 0x0 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x5, 0x1 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0xf, 0x14, 0x5, 0x2 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0xfff1, 0xfff6, 0x5, 0x0 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0x19, 0x0, 0x5, 0x1 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0xfff8, 0x8, 0x5, 0x2 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0x2, 0xfff8, 0x5, 0x0 delay 0x2 - launchtemplate gSoulStealBlueParalyzeSpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1 + createsprite gSoulStealBlueParalyzeSpriteTemplate, ANIM_TARGET, 2, 0xffec, 0xf, 0x5, 0x1 return SoulStealingSevenStarStrikeExplosion: playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSoulStealExplosionSpriteTemplate 0x83 0x4 0x0 0x0 ANIM_TARGET 0x1 + createsprite gSoulStealExplosionSpriteTemplate, ANIM_TARGET, 3, 0x0, 0x0, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSoulStealExplosionSpriteTemplate 0x83 0x4 0x18 0xffe8 ANIM_TARGET 0x1 + createsprite gSoulStealExplosionSpriteTemplate, ANIM_TARGET, 3, 0x18, 0xffe8, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSoulStealExplosionSpriteTemplate 0x83 0x4 0xfff0 0x10 ANIM_TARGET 0x1 + createsprite gSoulStealExplosionSpriteTemplate, ANIM_TARGET, 3, 0xfff0, 0x10, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSoulStealExplosionSpriteTemplate 0x83 0x4 0xffe8 0xfff4 ANIM_TARGET 0x1 + createsprite gSoulStealExplosionSpriteTemplate, ANIM_TARGET, 3, 0xffe8, 0xfff4, ANIM_TARGET, 0x1 delay 0x6 playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER - launchtemplate gSoulStealExplosionSpriteTemplate 0x83 0x4 0x10 0x10 ANIM_TARGET 0x1 + createsprite gSoulStealExplosionSpriteTemplate, ANIM_TARGET, 3, 0x10, 0x10, ANIM_TARGET, 0x1 delay 0x6 return diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 4b772022e5..dd91b42c8e 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -594,21 +594,6 @@ #define ANIM_WEATHER_HAIL 4 #define ANIM_WEATHER_SNOW 5 -// mon pal blend -#define ANIM_PAL_BG 0x1 -#define ANIM_PAL_ATK 0x2 -#define ANIM_PAL_DEF 0x4 -#define ANIM_PAL_ATK_PARTNER 0x8 -#define ANIM_PAL_DEF_PARTNER 0x10 -#define ANIM_PAL_ALL 0x1f -#define ANIM_PAL_BG_4 0x20 -#define ANIM_PAL_BG_5 0x40 -#define ANIM_PAL_ALL_BATTLERS 0x780 -#define ANIM_PAL_PLAYER1 0x80 -#define ANIM_PAL_PLAYER2 0x100 -#define ANIM_PAL_OPPONENT1 0x200 -#define ANIM_PAL_OPPONENT2 0x400 - // horseshoe/fist frames #define ANIM_RIGHT_FIST 0 #define ANIM_LEFT_FIST 2 @@ -626,19 +611,18 @@ // Flags given to various functions to indicate which palettes to consider. // Handled by UnpackSelectedBattlePalettes -#define F_PAL_BG (1 << 0) -#define F_PAL_ATTACKER (1 << 1) -#define F_PAL_TARGET (1 << 2) -#define F_PAL_ATK_PARTNER (1 << 3) -#define F_PAL_DEF_PARTNER (1 << 4) -#define F_PAL_ANIM_1 (1 << 5) // Palette set for GetBattleAnimBg1Data/GetBgDataForTransform. Only used (ineffectually?) by Aromatherapy. -#define F_PAL_ANIM_2 (1 << 6) // Palette set for GetBattleAnimBgData/GetBgDataForTransform. Unused. -#define F_PAL_ATK_SIDE (F_PAL_ATTACKER | F_PAL_ATK_PARTNER) -#define F_PAL_DEF_SIDE (F_PAL_TARGET | F_PAL_DEF_PARTNER) -#define F_PAL_BATTLERS (F_PAL_ATK_SIDE | F_PAL_DEF_SIDE) -// The below are only used by AnimTask_BlendBattleAnimPal to get battler sprite palettes by position rather than by role. -// It's redundant with F_PAL_BATTLERS, because they're only ever used together to refer to all the battlers at once. -#define F_PAL_BATTLERS_2 (1 << 7 | 1 << 8 | 1 << 9 | 1 << 10) - +#define F_PAL_BG (1 << 0) +#define F_PAL_ATTACKER (1 << 1) +#define F_PAL_TARGET (1 << 2) +#define F_PAL_ATK_PARTNER (1 << 3) +#define F_PAL_DEF_PARTNER (1 << 4) +#define F_PAL_ANIM_1 (1 << 5) // Palette set for GetBattleAnimBg1Data/GetBgDataForTransform. Only used (ineffectually?) by Aromatherapy. +#define F_PAL_ANIM_2 (1 << 6) // Palette set for GetBattleAnimBgData/GetBgDataForTransform. Unused. +#define F_PAL_ATK_SIDE (F_PAL_ATTACKER | F_PAL_ATK_PARTNER) +#define F_PAL_DEF_SIDE (F_PAL_TARGET | F_PAL_DEF_PARTNER) +#define F_PAL_BATTLERS (F_PAL_ATK_SIDE | F_PAL_DEF_SIDE) +#define F_PAL_ADJACENT (F_PAL_DEF_SIDE | F_PAL_ATK_PARTNER) +#define F_PAL_ALL_BUT_DEF (F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER) +#define F_PAL_ALL_BUT_ATK_PARTNER (F_PAL_ATTACKER | F_PAL_DEF_SIDE) #endif // GUARD_CONSTANTS_BATTLE_ANIM_H From 7edd1a45a4d119e3adf746850fb1be3487cd4bc7 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 28 May 2023 11:31:22 +0200 Subject: [PATCH 221/229] restore items in wild battles --- src/battle_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_main.c b/src/battle_main.c index de76cc9b74..270447a0e1 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5404,7 +5404,6 @@ static void HandleEndTurn_FinishBattle(void) BeginFastPaletteFade(3); FadeOutMapMusic(5); #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE || B_RESTORE_HELD_BATTLE_ITEMS == TRUE - if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) TryRestoreHeldItems(); #endif for (i = 0; i < PARTY_SIZE; i++) From 112636b8f3a0aa7b389d233b32d6e96d532f3bc0 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 28 May 2023 11:54:43 +0200 Subject: [PATCH 222/229] Fix Speed Boost animation --- data/battle_scripts_1.s | 1 + 1 file changed, 1 insertion(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 056a977568..53d824e7e1 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8522,6 +8522,7 @@ BattleScript_AbilityPopUp: BattleScript_SpeedBoostActivates:: statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SpeedBoostActivatesEnd call BattleScript_AbilityPopUp + setgraphicalstatchangevalues playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNRAISEDSPEED waitmessage B_WAIT_TIME_LONG From 5a384f9090d08f8de3a0c28bcea2b5842bc61608 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 7 May 2023 10:24:15 +0200 Subject: [PATCH 223/229] Fixes Triple Kick effect and Z move damage calc minor correction to the z-move fix Add comment to EFFECT_TRIPLE_KICK --- src/battle_ai_util.c | 78 ++++++++++++++++++++++---------------------- src/battle_util.c | 7 ++-- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index e187a06a98..0e3e774583 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -820,47 +820,47 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, else dmg = (critDmg + normalDmg * (critChance - 1)) / critChance; - // Handle dynamic move damage - switch (gBattleMoves[move].effect) + if (!gBattleStruct->zmove.active) { - case EFFECT_LEVEL_DAMAGE: - case EFFECT_PSYWAVE: - dmg = gBattleMons[battlerAtk].level * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); - break; - case EFFECT_DRAGON_RAGE: - dmg = 40 * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); - break; - case EFFECT_SONICBOOM: - dmg = 20 * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); - break; - case EFFECT_MULTI_HIT: - dmg *= (AI_DATA->abilities[battlerAtk] == ABILITY_SKILL_LINK ? 5 : 3); - break; - case EFFECT_TRIPLE_KICK: - dmg *= (AI_DATA->abilities[battlerAtk] == ABILITY_SKILL_LINK ? 6 : 5); - break; - case EFFECT_ENDEAVOR: - // If target has less HP than user, Endeavor does no damage - dmg = max(0, gBattleMons[battlerDef].hp - gBattleMons[battlerAtk].hp); - break; - case EFFECT_SUPER_FANG: - dmg = (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND - ? max(2, gBattleMons[battlerDef].hp * 3 / 4) - : max(1, gBattleMons[battlerDef].hp / 2)); - break; - case EFFECT_FINAL_GAMBIT: - dmg = gBattleMons[battlerAtk].hp; - break; + // Handle dynamic move damage + switch (gBattleMoves[move].effect) + { + case EFFECT_LEVEL_DAMAGE: + case EFFECT_PSYWAVE: + dmg = gBattleMons[battlerAtk].level * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); + break; + case EFFECT_DRAGON_RAGE: + dmg = 40 * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); + break; + case EFFECT_SONICBOOM: + dmg = 20 * (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND ? 2 : 1); + break; + case EFFECT_MULTI_HIT: + dmg *= (AI_DATA->abilities[battlerAtk] == ABILITY_SKILL_LINK ? 5 : 3); + break; + case EFFECT_ENDEAVOR: + // If target has less HP than user, Endeavor does no damage + dmg = max(0, gBattleMons[battlerDef].hp - gBattleMons[battlerAtk].hp); + break; + case EFFECT_SUPER_FANG: + dmg = (AI_DATA->abilities[battlerAtk] == ABILITY_PARENTAL_BOND + ? max(2, gBattleMons[battlerDef].hp * 3 / 4) + : max(1, gBattleMons[battlerDef].hp / 2)); + break; + case EFFECT_FINAL_GAMBIT: + dmg = gBattleMons[battlerAtk].hp; + break; + } + + // Handle other multi-strike moves + if (gBattleMoves[move].flags & FLAG_TWO_STRIKES) + dmg *= 2; + else if (gBattleMoves[move].flags & FLAG_THREE_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH)) + dmg *= 3; + + if (dmg == 0) + dmg = 1; } - - // Handle other multi-strike moves - if (gBattleMoves[move].flags & FLAG_TWO_STRIKES) - dmg *= 2; - else if (gBattleMoves[move].flags & FLAG_THREE_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH)) - dmg *= 3; - - if (dmg == 0) - dmg = 1; } else { diff --git a/src/battle_util.c b/src/battle_util.c index abdeed7569..b499600cec 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6783,7 +6783,7 @@ static bool32 GetMentalHerbEffect(u8 battlerId) static u8 TryConsumeMirrorHerb(u8 battlerId, bool32 execute) { u8 effect = 0; - + if (gProtectStructs[battlerId].eatMirrorHerb) { gLastUsedItem = gBattleMons[battlerId].item; gBattleScripting.savedBattler = gBattlerAttacker; @@ -8584,7 +8584,10 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower = gBattleStruct->presentBasePower; break; case EFFECT_TRIPLE_KICK: - basePower *= (4 - gMultiHitCounter); + if (gMultiHitCounter == 0) // Calc damage with max BP for move consideration + basePower *= 6; + else + basePower *= (4 - gMultiHitCounter); break; case EFFECT_SPIT_UP: basePower = 100 * gDisableStructs[battlerAtk].stockpileCounter; From 412f6f53527d306730e3218441c9072dab42ba89 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Wed, 31 May 2023 14:38:37 +0100 Subject: [PATCH 224/229] Separate build directory for tests and TESTING define (#3002) * Separate build directory for tests and TESTING define * fixup! Separate build directory for tests and TESTING define * fixup! Separate build directory for tests and TESTING define * fixup! Separate build directory for tests and TESTING define --- .github/workflows/build.yml | 2 ++ Makefile | 30 ++++++++++++++++++++++++------ gflib/malloc.h | 9 +++++++++ include/test_runner.h | 18 +++++++++++++++++- src/recorded_battle.c | 2 +- src/test_runner_stub.c | 35 ----------------------------------- test/test_runner_battle.c | 2 +- 7 files changed, 54 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5393aa155f..a2b93f23bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,8 @@ jobs: run: make -j${nproc} -O all - name: Test + env: + TEST: 1 run: | make -j${nproc} -O pokeemerald-test.elf make -j${nproc} check diff --git a/Makefile b/Makefile index 7486e41f0d..05f5d1aa4d 100644 --- a/Makefile +++ b/Makefile @@ -41,11 +41,16 @@ GAME_CODE := BPEE MAKER_CODE := 01 REVISION := 0 MODERN ?= 0 +TEST ?= 0 ifeq (modern,$(MAKECMDGOALS)) MODERN := 1 endif +ifeq (check,$(MAKECMDGOALS)) + TEST := 1 +endif + # use arm-none-eabi-cpp for macOS # as macOS's default compiler is clang # and clang's preprocessor will warn on \u @@ -79,6 +84,7 @@ ELF = $(ROM:.gba=.elf) MAP = $(ROM:.gba=.map) SYM = $(ROM:.gba=.sym) +TEST_OBJ_DIR_NAME := build/test TESTELF = $(ROM:.gba=-test.elf) HEADLESSELF = $(ROM:.gba=-test-headless.elf) @@ -119,7 +125,15 @@ LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a) LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall endif -CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) +ifeq ($(TESTELF),$(MAKECMDGOALS)) + TEST := 1 +endif + +ifeq ($(TEST),1) +OBJ_DIR := $(TEST_OBJ_DIR_NAME) +endif + +CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) -DTESTING=$(TEST) ifneq ($(MODERN),1) CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef endif @@ -168,7 +182,7 @@ infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst # Disable dependency scanning for clean/tidy/tools # Use a separate minimal makefile for speed # Since we don't need to reload most of this makefile -ifeq (,$(filter-out all rom compare modern check libagbsyscall syms,$(MAKECMDGOALS))) +ifeq (,$(filter-out all rom compare modern check libagbsyscall syms $(TESTELF),$(MAKECMDGOALS))) $(call infoshell, $(MAKE) -f make_tools.mk) else NODEP ?= 1 @@ -178,9 +192,9 @@ endif ifeq (,$(MAKECMDGOALS)) SCAN_DEPS ?= 1 else - # clean, tidy, tools, check-tools, mostlyclean, clean-tools, clean-check-tools, $(TOOLDIRS), $(CHECKTOOLDIRS), tidymodern, tidynonmodern don't even build the ROM + # clean, tidy, tools, check-tools, mostlyclean, clean-tools, clean-check-tools, $(TOOLDIRS), $(CHECKTOOLDIRS), tidymodern, tidynonmodern, tidycheck don't even build the ROM # libagbsyscall does its own thing - ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) clean-check-tools $(CHECKTOOLDIRS) tidymodern tidynonmodern libagbsyscall,$(MAKECMDGOALS))) + ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) clean-check-tools $(CHECKTOOLDIRS) tidymodern tidynonmodern tidycheck libagbsyscall,$(MAKECMDGOALS))) SCAN_DEPS ?= 0 else SCAN_DEPS ?= 1 @@ -257,7 +271,7 @@ clean-tools: clean-check-tools: @$(foreach tooldir,$(CHECKTOOLDIRS),$(MAKE) clean -C $(tooldir);) -mostlyclean: tidynonmodern tidymodern +mostlyclean: tidynonmodern tidymodern tidycheck rm -f $(SAMPLE_SUBDIR)/*.bin rm -f $(CRY_SUBDIR)/*.bin rm -f $(MID_SUBDIR)/*.s @@ -268,7 +282,7 @@ mostlyclean: tidynonmodern tidymodern rm -f $(AUTO_GEN_TARGETS) @$(MAKE) clean -C libagbsyscall -tidy: tidynonmodern tidymodern +tidy: tidynonmodern tidymodern tidycheck tidynonmodern: rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME) @@ -278,6 +292,10 @@ tidymodern: rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME) rm -rf $(MODERN_OBJ_DIR_NAME) +tidycheck: + rm -f $(TESTELF) $(HEADLESSELF) + rm -rf $(TEST_OBJ_DIR_NAME) + ifneq ($(MODERN),0) $(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member endif diff --git a/gflib/malloc.h b/gflib/malloc.h index f484b15806..d17291b3cd 100644 --- a/gflib/malloc.h +++ b/gflib/malloc.h @@ -44,9 +44,18 @@ struct MemBlock extern u8 gHeap[]; +#if TESTING || !defined(NDEBUG) + #define Alloc(size) Alloc_(size, __FILE__ ":" STR(__LINE__)) #define AllocZeroed(size) AllocZeroed_(size, __FILE__ ":" STR(__LINE__)) +#else + +#define Alloc(size) Alloc_(size, NULL) +#define AllocZeroed(size) AllocZeroed_(size, NULL) + +#endif + void *Alloc_(u32 size, const char *location); void *AllocZeroed_(u32 size, const char *location); void Free(void *pointer); diff --git a/include/test_runner.h b/include/test_runner.h index 2fc0a55e31..27b0d59777 100644 --- a/include/test_runner.h +++ b/include/test_runner.h @@ -3,6 +3,9 @@ extern const bool8 gTestRunnerEnabled; extern const bool8 gTestRunnerHeadless; + +#if TESTING + extern const bool8 gTestRunnerSkipIsFail; void TestRunner_Battle_RecordAbilityPopUp(u32 battlerId, u32 ability); @@ -12,6 +15,19 @@ void TestRunner_Battle_RecordMessage(const u8 *message); void TestRunner_Battle_RecordStatus1(u32 battlerId, u32 status1); void TestRunner_Battle_AfterLastTurn(void); -void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType); +void TestRunner_Battle_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType); + +#else + +#define TestRunner_Battle_RecordAbilityPopUp(...) (void)0 +#define TestRunner_Battle_RecordAnimation(...) (void)0 +#define TestRunner_Battle_RecordHP(...) (void)0 +#define TestRunner_Battle_RecordMessage(...) (void)0 +#define TestRunner_Battle_RecordStatus1(...) (void)0 +#define TestRunner_Battle_AfterLastTurn(...) (void)0 + +#define TestRunner_Battle_CheckBattleRecordActionType(...) (void)0 + +#endif #endif diff --git a/src/recorded_battle.c b/src/recorded_battle.c index 4cfa0e4c0c..e4b1a55440 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -176,7 +176,7 @@ void RecordedBattle_ClearBattlerAction(u8 battlerId, u8 bytesToClear) u8 RecordedBattle_GetBattlerAction(u32 actionType, u8 battlerId) { if (gTestRunnerEnabled) - BattleTest_CheckBattleRecordActionType(battlerId, sBattlerRecordSizes[battlerId], actionType); + TestRunner_Battle_CheckBattleRecordActionType(battlerId, sBattlerRecordSizes[battlerId], actionType); // Trying to read past array or invalid action byte, battle is over. if (sBattlerRecordSizes[battlerId] >= BATTLER_RECORD_SIZE || sBattleRecords[battlerId][sBattlerRecordSizes[battlerId]] == 0xFF) diff --git a/src/test_runner_stub.c b/src/test_runner_stub.c index 2c8b540204..9a9452ed21 100644 --- a/src/test_runner_stub.c +++ b/src/test_runner_stub.c @@ -9,38 +9,3 @@ const bool8 gTestRunnerEnabled = FALSE; // animations and messages play, which helps when debugging a test. const bool8 gTestRunnerHeadless = FALSE; const bool8 gTestRunnerSkipIsFail = FALSE; - -__attribute__((weak)) -void TestRunner_Battle_RecordAbilityPopUp(u32 battlerId, u32 ability) -{ -} - -__attribute__((weak)) -void TestRunner_Battle_RecordAnimation(u32 animType, u32 animId) -{ -} - -__attribute__((weak)) -void TestRunner_Battle_RecordHP(u32 battlerId, u32 oldHP, u32 newHP) -{ -} - -__attribute__((weak)) -void TestRunner_Battle_RecordMessage(const u8 *string) -{ -} - -__attribute__((weak)) -void TestRunner_Battle_RecordStatus1(u32 battlerId, u32 status1) -{ -} - -__attribute__((weak)) -void TestRunner_Battle_AfterLastTurn(void) -{ -} - -__attribute__((weak)) -void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType) -{ -} diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index d69f2125b4..d1feaee02a 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -1241,7 +1241,7 @@ static void PushBattlerAction(u32 sourceLine, s32 battlerId, u32 actionType, u32 DATA.recordedBattle.battleRecord[battlerId][recordIndex] = byte; } -void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType) +void TestRunner_Battle_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType) { // An illegal move choice will cause the battle to request a new // move slot and target. This detects the move slot. From 23b57050c29258f005d8d74553fa744e02600507 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 1 Jun 2023 15:28:20 -0400 Subject: [PATCH 225/229] Fix some compressed tilemaps --- .../frontier_logo_center.bin | Bin 428 -> 2048 bytes graphics/pokeblock/use_screen/graph_data.bin | Bin 164 -> 1280 bytes graphics/pokeblock/use_screen/mon_frame.bin | Bin 172 -> 1280 bytes src/battle_transition_frontier.c | 2 +- src/use_pokeblock.c | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics/battle_transitions/frontier_logo_center.bin b/graphics/battle_transitions/frontier_logo_center.bin index 7b9d2af284bc62e16d244945b05f653b5fad0a04..52479134604aba9f512d9ab40a3f033488e53f32 100644 GIT binary patch literal 2048 zcmeIxM-Bop5JXXvbIv)(`ycEt>Hy3P8YCp!GDvKI?u|FET22P@ew(P?*TnpjK0`*{ zeCPZuIr0=JD6gEdt`vtaQldZTg1tM-C#)1ga`e&YM; zsjH6Kwgl_^0YgTNnIwLqu|^td5bUSSm`A-}$x;i&>zSs(e#JWRu}gccRj}W%eYn(b zwF&ly9s8$*y>>S3dA|paoRW-_jyl-2#~aRExN_A+XP5SR@4HX`to8nb-ek@Af^p$>H?Gnh!p zH7aQ|Rn_WlRmUn+sRG17i&Any_sY!eHLtl?k5;yl@=$`0GNeqOC3<)|!{kyyfDo#R z8fvUE2pO<~4CX~tggP2%;&`W|$p-5@MYfkYN{j@43vG0?=}_8iF=33%w$#!^4}HV~ z47C|@z@X0_-4fRGM;PN?$pqdMQ%)F1;|Goka|ZpX&6{Y>3L%+e@nsgA!+f~0ORV10 z6;Df~Zud1d$hP`%%MI5^?eMegu*U(xfqU*;6>Kgpqn}jl-wD5{6`l*~>aK7VfAA0C JcADIt<{L}+yr2L8 diff --git a/graphics/pokeblock/use_screen/graph_data.bin b/graphics/pokeblock/use_screen/graph_data.bin index 5f8f364fc90762c2a6165d60cefc8b7f087b3430..75581f46e235c83b6f875ca1755f0f500efdfc8d 100644 GIT binary patch literal 1280 lcmZQz7zKkj1X_*IA!%+!*WGF~s-Kh)80z6iieE>jS^y?oIp_cY literal 164 zcmWe&U}dmpVEDj@fd3Ip2n$1C{sqQXqYI25l!5a0AM7FWKn8^Sfe|Et#03eUa6wu? Rijg413?zXE5LpHw0036PP#pjO diff --git a/graphics/pokeblock/use_screen/mon_frame.bin b/graphics/pokeblock/use_screen/mon_frame.bin index 4e7c2d4adc325726e191a63c1d77cec62262916b..130dcff29c7480e1a76fea3b75fb1b2b0c32e92a 100644 GIT binary patch literal 1280 ycmZR$$S?{=a0oD7M2Acyg$DCQbjUKQpM(%V4?X6KLo57PFQP*>5_~`KWe)(Jqzlym literal 172 zcmWe&U}dmpxcGq)0skYI5Eh2OKV%gKjEuV;Ffx5m{lJ*O$oznj Date: Fri, 2 Jun 2023 11:56:12 -0400 Subject: [PATCH 226/229] Missing pret improvement that was causing unmatching --- src/pokedex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index 5b04145131..13fea29795 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4552,7 +4552,9 @@ static void DrawFootprint(u8 windowId, u16 dexNum) // so we need 4 iterations to do all 8 pixels. for (j = 0; j < 4; j++) { - u8 tile = ((footprint1bpp >> (2 * j)) & 1 ? 2 : 0); + u8 tile = 0; + if (footprint1bpp & (1 << (2 * j))) + tile |= FOOTPRINT_COLOR_IDX; // Set pixel if (footprint1bpp & (2 << (2 * j))) tile |= FOOTPRINT_COLOR_IDX << 4; // Set pixel footprint4bpp[tileIdx] = tile; From 271bca6a3d5e5848fb5fb9a501ac9765b855718c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 2 Jun 2023 11:56:36 -0400 Subject: [PATCH 227/229] Fixed Staraptor using Staravia's footprint --- src/data/graphics/pokemon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 673fbb4eea..56e45283af 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -6501,7 +6501,7 @@ const u8 gMonFootprint_Prinplup[] = INCBIN_U8("graphics/pokemon/prinplup/footpri const u8 gMonFootprint_Empoleon[] = INCBIN_U8("graphics/pokemon/empoleon/footprint.1bpp"); const u8 gMonFootprint_Starly[] = INCBIN_U8("graphics/pokemon/starly/footprint.1bpp"); const u8 gMonFootprint_Staravia[] = INCBIN_U8("graphics/pokemon/staravia/footprint.1bpp"); -const u8 gMonFootprint_Staraptor[] = INCBIN_U8("graphics/pokemon/staravia/footprint.1bpp"); +const u8 gMonFootprint_Staraptor[] = INCBIN_U8("graphics/pokemon/staraptor/footprint.1bpp"); const u8 gMonFootprint_Bidoof[] = INCBIN_U8("graphics/pokemon/bidoof/footprint.1bpp"); const u8 gMonFootprint_Bibarel[] = INCBIN_U8("graphics/pokemon/bibarel/footprint.1bpp"); const u8 gMonFootprint_Kricketot[] = INCBIN_U8("graphics/pokemon/kricketot/footprint.1bpp"); From 43da48f9928d7eaf4b0f8f9b2167ce928563c5b4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 2 Jun 2023 12:22:05 -0400 Subject: [PATCH 228/229] `CpuFastFill` for initializing, thanks SBird --- src/pokedex.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index 13fea29795..c5b8105b2d 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4537,7 +4537,7 @@ static void PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top) static void DrawFootprint(u8 windowId, u16 dexNum) { - u8 footprint4bpp[TILE_SIZE_4BPP * NUM_FOOTPRINT_TILES] = {0}; + u8 footprint4bpp[TILE_SIZE_4BPP * NUM_FOOTPRINT_TILES]; const u8 *footprintGfx = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)]; u32 i, j, tileIdx = 0; @@ -4562,6 +4562,10 @@ static void DrawFootprint(u8 windowId, u16 dexNum) } } } + else + { + CpuFastFill(0, footprint4bpp, sizeof(footprint4bpp)); + } CopyToWindowPixelBuffer(windowId, footprint4bpp, sizeof(footprint4bpp), 0); } From 8efbe825dbd7a306af3ee8c8b4cdd4608375573a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 9 Jun 2023 18:20:29 -0300 Subject: [PATCH 229/229] Updated preproc config for Diamond Storm --- src/data/battle_moves.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index ef6ad52a1c..ebd64ae10b 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -9895,7 +9895,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_DIAMOND_STORM] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_7 .effect = EFFECT_DEFENSE_UP2_HIT, #else .effect = EFFECT_DEFENSE_UP_HIT,