From 43310716afb32a845e28b0e7c69cb833bfffef8c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 13 Jun 2024 11:44:52 -0400 Subject: [PATCH] Fixes to master merge --- src/battle_util.c | 2 +- test/battle/ai_flag_risky.c | 2 +- test/species.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 3d724a81b8..4b66ea6ba5 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -11633,7 +11633,7 @@ bool32 TargetFullyImmuneToCurrMove(u32 BattlerAtk, u32 battlerDef) GET_MOVE_TYPE(gCurrentMove, moveType); return ((CalcTypeEffectivenessMultiplier(gCurrentMove, moveType, BattlerAtk, battlerDef, GetBattlerAbility(battlerDef), FALSE) == UQ_4_12(0.0)) - || IsBattlerProtected(battlerDef, gCurrentMove) + || IsBattlerProtected(BattlerAtk, battlerDef, gCurrentMove) || IsSemiInvulnerable(battlerDef, gCurrentMove) || DoesCurrentTargetHaveAbilityImmunity()); } diff --git a/test/battle/ai_flag_risky.c b/test/battle/ai_flag_risky.c index eeef2fbe4e..4c5d89205a 100644 --- a/test/battle/ai_flag_risky.c +++ b/test/battle/ai_flag_risky.c @@ -83,7 +83,7 @@ AI_SINGLE_BATTLE_TEST("AI_FLAG_RISKY: AI prefers high damage moves at the expens GIVEN { AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT | aiRiskyFlag); - PLAYER(SPECIES_GOLDEEN) { Level(5); Moves(MOVE_TACKLE); } + PLAYER(SPECIES_PSYDUCK) { Level(5); Moves(MOVE_TACKLE); } OPPONENT(SPECIES_CASTFORM) { Level(20); Moves(MOVE_THUNDER, MOVE_THUNDERBOLT); } } WHEN { TURN { MOVE(player, MOVE_TACKLE); EXPECT_MOVE(opponent, aiRiskyFlag ? MOVE_THUNDER : MOVE_THUNDERBOLT); } diff --git a/test/species.c b/test/species.c index 68f13c0917..d4f0b4027e 100644 --- a/test/species.c +++ b/test/species.c @@ -114,7 +114,7 @@ TEST("No species has two evolutions that use the evolution tracker") for (i = 0; evolutions[i].method != EVOLUTIONS_END; i++) { - if (evolutions[i].method == EVO_LEVEL_MOVE_TWENTY_TIMES + if (evolutions[i].method == EVO_USE_MOVE_TWENTY_TIMES #ifdef EVO_DEFEAT_WITH_ITEM || evolutions[i].method == EVO_DEFEAT_WITH_ITEM #endif //EVO_DEFEAT_WITH_ITEM @@ -124,8 +124,8 @@ TEST("No species has two evolutions that use the evolution tracker") ) evolutionTrackerEvolutions++; - if (evolutions[i].method == EVO_LEVEL_RECOIL_DAMAGE_MALE - || evolutions[i].method == EVO_LEVEL_RECOIL_DAMAGE_FEMALE) + if (evolutions[i].method == EVO_RECOIL_DAMAGE_MALE + || evolutions[i].method == EVO_RECOIL_DAMAGE_FEMALE) { // Special handling for these since they can be combined as the evolution tracker field is used for the same purpose if (!hasGenderBasedRecoil)