diff --git a/include/constants/moves.h b/include/constants/moves.h index 392c8a30d..746076cb3 100644 --- a/include/constants/moves.h +++ b/include/constants/moves.h @@ -784,48 +784,49 @@ #define MOVES_COUNT_GEN8 755 +#define MOVES_COUNT MOVES_COUNT_GEN8 + // Z Moves -#define MOVE_BREAKNECK_BLITZ (MOVES_COUNT_GEN8 + 0) -#define MOVE_ALL_OUT_PUMMELING (MOVES_COUNT_GEN8 + 1) -#define MOVE_SUPERSONIC_SKYSTRIKE (MOVES_COUNT_GEN8 + 2) -#define MOVE_ACID_DOWNPOUR (MOVES_COUNT_GEN8 + 3) -#define MOVE_TECTONIC_RAGE (MOVES_COUNT_GEN8 + 4) -#define MOVE_CONTINENTAL_CRUSH (MOVES_COUNT_GEN8 + 5) -#define MOVE_SAVAGE_SPIN_OUT (MOVES_COUNT_GEN8 + 6) -#define MOVE_NEVER_ENDING_NIGHTMARE (MOVES_COUNT_GEN8 + 7) -#define MOVE_CORKSCREW_CRASH (MOVES_COUNT_GEN8 + 8) -#define MOVE_INFERNO_OVERDRIVE (MOVES_COUNT_GEN8 + 9) -#define MOVE_HYDRO_VORTEX (MOVES_COUNT_GEN8 + 10) -#define MOVE_BLOOM_DOOM (MOVES_COUNT_GEN8 + 11) -#define MOVE_GIGAVOLT_HAVOC (MOVES_COUNT_GEN8 + 12) -#define MOVE_SHATTERED_PSYCHE (MOVES_COUNT_GEN8 + 13) -#define MOVE_SUBZERO_SLAMMER (MOVES_COUNT_GEN8 + 14) -#define MOVE_DEVASTATING_DRAKE (MOVES_COUNT_GEN8 + 15) -#define MOVE_BLACK_HOLE_ECLIPSE (MOVES_COUNT_GEN8 + 16) -#define MOVE_TWINKLE_TACKLE (MOVES_COUNT_GEN8 + 17) -//signature z moves -#define MOVE_CATASTROPIKA (MOVES_COUNT_GEN8 + 18) -#define MOVE_10000000_VOLT_THUNDERBOLT (MOVES_COUNT_GEN8 + 19) -#define MOVE_STOKED_SPARKSURFER (MOVES_COUNT_GEN8 + 20) -#define MOVE_EXTREME_EVOBOOST (MOVES_COUNT_GEN8 + 21) -#define MOVE_PULVERIZING_PANCAKE (MOVES_COUNT_GEN8 + 22) -#define MOVE_GENESIS_SUPERNOVA (MOVES_COUNT_GEN8 + 23) -#define MOVE_SINISTER_ARROW_RAID (MOVES_COUNT_GEN8 + 24) -#define MOVE_MALICIOUS_MOONSAULT (MOVES_COUNT_GEN8 + 25) -#define MOVE_OCEANIC_OPERETTA (MOVES_COUNT_GEN8 + 26) -#define MOVE_SPLINTERED_STORMSHARDS (MOVES_COUNT_GEN8 + 27) -#define MOVE_LETS_SNUGGLE_FOREVER (MOVES_COUNT_GEN8 + 28) -#define MOVE_CLANGOROUS_SOULBLAZE (MOVES_COUNT_GEN8 + 29) -#define MOVE_GUARDIAN_OF_ALOLA (MOVES_COUNT_GEN8 + 30) -#define MOVE_SEARING_SUNRAZE_SMASH (MOVES_COUNT_GEN8 + 31) -#define MOVE_MENACING_MOONRAZE_MAELSTROM (MOVES_COUNT_GEN8 + 32) -#define MOVE_LIGHT_THAT_BURNS_THE_SKY (MOVES_COUNT_GEN8 + 33) -#define MOVE_SOUL_STEALING_7_STAR_STRIKE (MOVES_COUNT_GEN8 + 34) +#define MOVE_BREAKNECK_BLITZ (MOVES_COUNT + 0) +#define MOVE_ALL_OUT_PUMMELING (MOVES_COUNT + 1) +#define MOVE_SUPERSONIC_SKYSTRIKE (MOVES_COUNT + 2) +#define MOVE_ACID_DOWNPOUR (MOVES_COUNT + 3) +#define MOVE_TECTONIC_RAGE (MOVES_COUNT + 4) +#define MOVE_CONTINENTAL_CRUSH (MOVES_COUNT + 5) +#define MOVE_SAVAGE_SPIN_OUT (MOVES_COUNT + 6) +#define MOVE_NEVER_ENDING_NIGHTMARE (MOVES_COUNT + 7) +#define MOVE_CORKSCREW_CRASH (MOVES_COUNT + 8) +#define MOVE_INFERNO_OVERDRIVE (MOVES_COUNT + 9) +#define MOVE_HYDRO_VORTEX (MOVES_COUNT + 10) +#define MOVE_BLOOM_DOOM (MOVES_COUNT + 11) +#define MOVE_GIGAVOLT_HAVOC (MOVES_COUNT + 12) +#define MOVE_SHATTERED_PSYCHE (MOVES_COUNT + 13) +#define MOVE_SUBZERO_SLAMMER (MOVES_COUNT + 14) +#define MOVE_DEVASTATING_DRAKE (MOVES_COUNT + 15) +#define MOVE_BLACK_HOLE_ECLIPSE (MOVES_COUNT + 16) +#define MOVE_TWINKLE_TACKLE (MOVES_COUNT + 17) +// Signature Z Moves +#define MOVE_CATASTROPIKA (MOVES_COUNT + 18) +#define MOVE_10000000_VOLT_THUNDERBOLT (MOVES_COUNT + 19) +#define MOVE_STOKED_SPARKSURFER (MOVES_COUNT + 20) +#define MOVE_EXTREME_EVOBOOST (MOVES_COUNT + 21) +#define MOVE_PULVERIZING_PANCAKE (MOVES_COUNT + 22) +#define MOVE_GENESIS_SUPERNOVA (MOVES_COUNT + 23) +#define MOVE_SINISTER_ARROW_RAID (MOVES_COUNT + 24) +#define MOVE_MALICIOUS_MOONSAULT (MOVES_COUNT + 25) +#define MOVE_OCEANIC_OPERETTA (MOVES_COUNT + 26) +#define MOVE_SPLINTERED_STORMSHARDS (MOVES_COUNT + 27) +#define MOVE_LETS_SNUGGLE_FOREVER (MOVES_COUNT + 28) +#define MOVE_CLANGOROUS_SOULBLAZE (MOVES_COUNT + 29) +#define MOVE_GUARDIAN_OF_ALOLA (MOVES_COUNT + 30) +#define MOVE_SEARING_SUNRAZE_SMASH (MOVES_COUNT + 31) +#define MOVE_MENACING_MOONRAZE_MAELSTROM (MOVES_COUNT + 32) +#define MOVE_LIGHT_THAT_BURNS_THE_SKY (MOVES_COUNT + 33) +#define MOVE_SOUL_STEALING_7_STAR_STRIKE (MOVES_COUNT + 34) #define FIRST_Z_MOVE MOVE_BREAKNECK_BLITZ #define LAST_Z_MOVE MOVE_SOUL_STEALING_7_STAR_STRIKE -#define MOVES_COUNT MOVES_COUNT_GEN8 -#define MOVES_COUNT_Z (MOVE_SOUL_STEALING_7_STAR_STRIKE + 1) +#define MOVES_COUNT_Z (LAST_Z_MOVE + 1) #endif // GUARD_CONSTANTS_MOVES_H diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 794065bec..f2b48af61 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -2385,9 +2385,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || IsInstructBannedMove(instructedMove) || MoveRequiresRecharging(instructedMove) || MoveCallsOtherMove(instructedMove) - #ifdef ITEM_Z_POWER_RING - //|| (IsZMove(instructedMove)) - #endif + || IsZMove(instructedMove) || (gLockedMoves[battlerDef] != 0 && gLockedMoves[battlerDef] != 0xFFFF) || gBattleMons[battlerDef].status2 & STATUS2_MULTIPLETURNS || PartnerMoveIsSameAsAttacker(BATTLE_PARTNER(battlerAtk), battlerDef, move, AI_DATA->partnerMove)) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index de22866ad..7896a9b12 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -375,15 +375,9 @@ static const u16 sIgnoreMoldBreakerMoves[] = MOVE_MOONGEIST_BEAM, MOVE_SUNSTEEL_STRIKE, MOVE_PHOTON_GEYSER, - #ifdef MOVE_LIGHT_THAT_BURNS_THE_SKY MOVE_LIGHT_THAT_BURNS_THE_SKY, - #endif - #ifdef MOVE_MENACING_MOONRAZE_MAELSTROM MOVE_MENACING_MOONRAZE_MAELSTROM, - #endif - #ifdef MOVE_SEARING_SUNRAZE_SMASH MOVE_SEARING_SUNRAZE_SMASH, - #endif }; static const u16 sInstructBannedMoves[] = diff --git a/src/battle_z_move.c b/src/battle_z_move.c index a91c9ec5f..db00d8d7c 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -154,7 +154,8 @@ void QueueZMove(u8 battlerId, u16 baseMove) gBattleStruct->zmove.baseMoves[battlerId] = baseMove; if (gBattleStruct->zmove.chosenZMove == MOVE_LIGHT_THAT_BURNS_THE_SKY) gBattleStruct->zmove.splits[battlerId] = GetSplitBasedOnStats(battlerId); - gBattleStruct->zmove.splits[battlerId] = gBattleMoves[baseMove].split; + else + gBattleStruct->zmove.splits[battlerId] = gBattleMoves[baseMove].split; } bool32 IsViableZMove(u8 battlerId, u16 move) @@ -562,7 +563,7 @@ static void ZMoveSelectionDisplayPpNumber(void) const u8* GetZMoveName(u16 move) { if (IsZMove(move)) - return gZMoveNames[move - MOVE_BREAKNECK_BLITZ]; + return gZMoveNames[move - FIRST_Z_MOVE]; else return gZMoveNames[0]; // Failsafe } diff --git a/src/data/text/move_names.h b/src/data/text/move_names.h index 6299244bb..08703b201 100644 --- a/src/data/text/move_names.h +++ b/src/data/text/move_names.h @@ -796,39 +796,39 @@ static const u8 sText_Soul_Stealing_7_Star_Strike[] = _("Soul Stealing 7 Star St const u8 *const gZMoveNames[] = { - [MOVE_BREAKNECK_BLITZ - MOVE_BREAKNECK_BLITZ] = sText_Breakneck_Blitz, - [MOVE_ALL_OUT_PUMMELING - MOVE_BREAKNECK_BLITZ] = sText_All_Out_Pummeling, - [MOVE_SUPERSONIC_SKYSTRIKE - MOVE_BREAKNECK_BLITZ] = sText_Supersonic_Skystrike, - [MOVE_ACID_DOWNPOUR - MOVE_BREAKNECK_BLITZ] = sText_Acid_Downpour, - [MOVE_TECTONIC_RAGE - MOVE_BREAKNECK_BLITZ] = sText_Tectonic_Rage, - [MOVE_CONTINENTAL_CRUSH - MOVE_BREAKNECK_BLITZ] = sText_Continental_Crush, - [MOVE_SAVAGE_SPIN_OUT - MOVE_BREAKNECK_BLITZ] = sText_Savage_Spin_Out, - [MOVE_NEVER_ENDING_NIGHTMARE - MOVE_BREAKNECK_BLITZ] = sText_Never_Ending_Nightmare, - [MOVE_CORKSCREW_CRASH - MOVE_BREAKNECK_BLITZ] = sText_Corkscrew_Crash, - [MOVE_INFERNO_OVERDRIVE - MOVE_BREAKNECK_BLITZ] = sText_Inferno_Overdrive, - [MOVE_HYDRO_VORTEX - MOVE_BREAKNECK_BLITZ] = sText_Hydro_Vortex, - [MOVE_BLOOM_DOOM - MOVE_BREAKNECK_BLITZ] = sText_Bloom_Doom, - [MOVE_GIGAVOLT_HAVOC - MOVE_BREAKNECK_BLITZ] = sText_Gigavolt_Havoc, - [MOVE_SHATTERED_PSYCHE - MOVE_BREAKNECK_BLITZ] = sText_Shattered_Psyche, - [MOVE_SUBZERO_SLAMMER - MOVE_BREAKNECK_BLITZ] = sText_Subzero_Slammer, - [MOVE_DEVASTATING_DRAKE - MOVE_BREAKNECK_BLITZ] = sText_Devastating_Drake, - [MOVE_BLACK_HOLE_ECLIPSE - MOVE_BREAKNECK_BLITZ] = sText_Black_Hole_Eclipse, - [MOVE_TWINKLE_TACKLE - MOVE_BREAKNECK_BLITZ] = sText_Twinkle_Tackle, - [MOVE_CATASTROPIKA - MOVE_BREAKNECK_BLITZ] = sText_Catastropika, - [MOVE_10000000_VOLT_THUNDERBOLT - MOVE_BREAKNECK_BLITZ] = sText_10000000_Volt_Thunderbolt, - [MOVE_STOKED_SPARKSURFER - MOVE_BREAKNECK_BLITZ] = sText_Stoked_Sparksurfer, - [MOVE_EXTREME_EVOBOOST - MOVE_BREAKNECK_BLITZ] = sText_Extreme_Evoboost, - [MOVE_PULVERIZING_PANCAKE - MOVE_BREAKNECK_BLITZ] = sText_Pulverizing_Pancake, - [MOVE_GENESIS_SUPERNOVA - MOVE_BREAKNECK_BLITZ] = sText_Genesis_Supernova, - [MOVE_SINISTER_ARROW_RAID - MOVE_BREAKNECK_BLITZ] = sText_Sinister_Arrow_Raid, - [MOVE_MALICIOUS_MOONSAULT - MOVE_BREAKNECK_BLITZ] = sText_Malicious_Moonsault, - [MOVE_OCEANIC_OPERETTA - MOVE_BREAKNECK_BLITZ] = sText_Oceanic_Operetta, - [MOVE_SPLINTERED_STORMSHARDS - MOVE_BREAKNECK_BLITZ] = sText_Splintered_Stormshards, - [MOVE_LETS_SNUGGLE_FOREVER - MOVE_BREAKNECK_BLITZ] = sText_Lets_Snuggle_Forever, - [MOVE_CLANGOROUS_SOULBLAZE - MOVE_BREAKNECK_BLITZ] = sText_Clangorous_Soulblaze, - [MOVE_GUARDIAN_OF_ALOLA - MOVE_BREAKNECK_BLITZ] = sText_Guardian_Of_Alola, - [MOVE_SEARING_SUNRAZE_SMASH - MOVE_BREAKNECK_BLITZ] = sText_Searing_Sunraze_Smash, - [MOVE_MENACING_MOONRAZE_MAELSTROM - MOVE_BREAKNECK_BLITZ] = sText_Menacing_Moonraze_Maelstrom, - [MOVE_LIGHT_THAT_BURNS_THE_SKY - MOVE_BREAKNECK_BLITZ] = sText_Light_That_Burns_The_Sky, - [MOVE_SOUL_STEALING_7_STAR_STRIKE - MOVE_BREAKNECK_BLITZ] = sText_Soul_Stealing_7_Star_Strike, + [MOVE_BREAKNECK_BLITZ - FIRST_Z_MOVE] = sText_Breakneck_Blitz, + [MOVE_ALL_OUT_PUMMELING - FIRST_Z_MOVE] = sText_All_Out_Pummeling, + [MOVE_SUPERSONIC_SKYSTRIKE - FIRST_Z_MOVE] = sText_Supersonic_Skystrike, + [MOVE_ACID_DOWNPOUR - FIRST_Z_MOVE] = sText_Acid_Downpour, + [MOVE_TECTONIC_RAGE - FIRST_Z_MOVE] = sText_Tectonic_Rage, + [MOVE_CONTINENTAL_CRUSH - FIRST_Z_MOVE] = sText_Continental_Crush, + [MOVE_SAVAGE_SPIN_OUT - FIRST_Z_MOVE] = sText_Savage_Spin_Out, + [MOVE_NEVER_ENDING_NIGHTMARE - FIRST_Z_MOVE] = sText_Never_Ending_Nightmare, + [MOVE_CORKSCREW_CRASH - FIRST_Z_MOVE] = sText_Corkscrew_Crash, + [MOVE_INFERNO_OVERDRIVE - FIRST_Z_MOVE] = sText_Inferno_Overdrive, + [MOVE_HYDRO_VORTEX - FIRST_Z_MOVE] = sText_Hydro_Vortex, + [MOVE_BLOOM_DOOM - FIRST_Z_MOVE] = sText_Bloom_Doom, + [MOVE_GIGAVOLT_HAVOC - FIRST_Z_MOVE] = sText_Gigavolt_Havoc, + [MOVE_SHATTERED_PSYCHE - FIRST_Z_MOVE] = sText_Shattered_Psyche, + [MOVE_SUBZERO_SLAMMER - FIRST_Z_MOVE] = sText_Subzero_Slammer, + [MOVE_DEVASTATING_DRAKE - FIRST_Z_MOVE] = sText_Devastating_Drake, + [MOVE_BLACK_HOLE_ECLIPSE - FIRST_Z_MOVE] = sText_Black_Hole_Eclipse, + [MOVE_TWINKLE_TACKLE - FIRST_Z_MOVE] = sText_Twinkle_Tackle, + [MOVE_CATASTROPIKA - FIRST_Z_MOVE] = sText_Catastropika, + [MOVE_10000000_VOLT_THUNDERBOLT - FIRST_Z_MOVE] = sText_10000000_Volt_Thunderbolt, + [MOVE_STOKED_SPARKSURFER - FIRST_Z_MOVE] = sText_Stoked_Sparksurfer, + [MOVE_EXTREME_EVOBOOST - FIRST_Z_MOVE] = sText_Extreme_Evoboost, + [MOVE_PULVERIZING_PANCAKE - FIRST_Z_MOVE] = sText_Pulverizing_Pancake, + [MOVE_GENESIS_SUPERNOVA - FIRST_Z_MOVE] = sText_Genesis_Supernova, + [MOVE_SINISTER_ARROW_RAID - FIRST_Z_MOVE] = sText_Sinister_Arrow_Raid, + [MOVE_MALICIOUS_MOONSAULT - FIRST_Z_MOVE] = sText_Malicious_Moonsault, + [MOVE_OCEANIC_OPERETTA - FIRST_Z_MOVE] = sText_Oceanic_Operetta, + [MOVE_SPLINTERED_STORMSHARDS - FIRST_Z_MOVE] = sText_Splintered_Stormshards, + [MOVE_LETS_SNUGGLE_FOREVER - FIRST_Z_MOVE] = sText_Lets_Snuggle_Forever, + [MOVE_CLANGOROUS_SOULBLAZE - FIRST_Z_MOVE] = sText_Clangorous_Soulblaze, + [MOVE_GUARDIAN_OF_ALOLA - FIRST_Z_MOVE] = sText_Guardian_Of_Alola, + [MOVE_SEARING_SUNRAZE_SMASH - FIRST_Z_MOVE] = sText_Searing_Sunraze_Smash, + [MOVE_MENACING_MOONRAZE_MAELSTROM - FIRST_Z_MOVE] = sText_Menacing_Moonraze_Maelstrom, + [MOVE_LIGHT_THAT_BURNS_THE_SKY - FIRST_Z_MOVE] = sText_Light_That_Burns_The_Sky, + [MOVE_SOUL_STEALING_7_STAR_STRIKE - FIRST_Z_MOVE] = sText_Soul_Stealing_7_Star_Strike, };