From 22280b47788d0e2bef9b8953cbab298c45f4256f Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:20:14 +0100 Subject: [PATCH 1/2] Fixes z-move priority (#3690) * Fixes z-move priority * consider prankster affected z moves * consider only damaging moves --- src/battle_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/battle_main.c b/src/battle_main.c index 514b69fd68..4dac65df90 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4691,6 +4691,9 @@ s8 GetMovePriority(u32 battler, u16 move) s8 priority; u16 ability = GetBattlerAbility(battler); + if (gBattleStruct->zmove.toBeUsed[battler] && gBattleMoves[move].power != 0) + move = gBattleStruct->zmove.toBeUsed[battler]; + priority = gBattleMoves[move].priority; if (ability == ABILITY_GALE_WINGS #if B_GALE_WINGS >= GEN_7 From 03e25712141b63f8a11c70d15eaf0d8c7ba2d288 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:42:54 +0100 Subject: [PATCH 2/2] wrong move power (#3697) --- src/data/battle_moves.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index fed757cdc5..64eb7cf6ae 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -6302,7 +6302,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_METAL_BURST] = { .effect = EFFECT_METAL_BURST, - .power = 0, + .power = 1, .type = TYPE_STEEL, .accuracy = 100, .pp = 10, @@ -6428,7 +6428,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_TRUMP_CARD] = { .effect = EFFECT_TRUMP_CARD, - .power = 0, + .power = 1, .type = TYPE_NORMAL, .accuracy = 0, .pp = 5, @@ -13656,7 +13656,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_COMEUPPANCE] = { .effect = EFFECT_METAL_BURST, - .power = 0, + .power = 1, .type = TYPE_DARK, .accuracy = 100, .pp = 10,