Removed some hardcoded move IDs (#3982)

* Removed EFFECT_HURRICANE in favor of using EFFECT_THUNDER

* Added EFFECT_BLIZZARD

* Helping the IDE a little

* Added EFFECT_RAIN_ALWAYS_HIT for Forces of Nature moves

* Removed MOVE_SELF_DESTRUCT and MOVE_EXPLOSION hardcoding

* Removed EFFECT_FRUSTRATION hardcoding

MOVE_SELF_DESTRUCT

* Cleaned up sPoints_MoveEffect

* Removed MOVE_AURA_WHEEL and MOVE_PRESENT hardcoding

* Fixed compile
This commit is contained in:
Eduardo Quezada D'Ottone 2024-01-12 18:41:46 -03:00 committed by GitHub
parent e5b58b04b6
commit ff0aed31b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 70 additions and 53 deletions

View file

@ -254,7 +254,6 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectPsychicTerrain @ EFFECT_PSYCHIC_TERRAIN
.4byte BattleScript_EffectAttackAccUp @ EFFECT_ATTACK_ACCURACY_UP
.4byte BattleScript_EffectAttackSpAttackUp @ EFFECT_ATTACK_SPATK_UP
.4byte BattleScript_EffectHit @ EFFECT_HURRICANE
.4byte BattleScript_EffectHit @ EFFECT_TWO_TYPED_MOVE
.4byte BattleScript_EffectMeFirst @ EFFECT_ME_FIRST
.4byte BattleScript_EffectQuiverDance @ EFFECT_QUIVER_DANCE
@ -369,6 +368,8 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectFilletAway @ EFFECT_FILLET_AWAY
.4byte BattleScript_EffectHit @ EFFECT_IVY_CUDGEL
.4byte BattleScript_EffectHit @ EFFECT_FICKLE_BEAM
.4byte BattleScript_EffectHit @ EFFECT_BLIZZARD
.4byte BattleScript_EffectHit @ EFFECT_RAIN_ALWAYS_HIT
BattleScript_EffectFilletAway:
attackcanceler

View file

@ -1,7 +1,7 @@
#ifndef GUARD_BATTLE_Z_MOVE_H
#define GUARD_BATTLE_Z_MOVE_H
#include "constants/z_move_effects.h"
#include "constants/battle_z_move_effects.h"
#define MOVE_Z_STATUS 0xFFFF

View file

@ -234,7 +234,6 @@ enum {
EFFECT_PSYCHIC_TERRAIN,
EFFECT_ATTACK_ACCURACY_UP,
EFFECT_ATTACK_SPATK_UP,
EFFECT_HURRICANE,
EFFECT_TWO_TYPED_MOVE,
EFFECT_ME_FIRST,
EFFECT_QUIVER_DANCE,
@ -349,6 +348,8 @@ enum {
EFFECT_FILLET_AWAY,
EFFECT_IVY_CUDGEL,
EFFECT_FICKLE_BEAM,
EFFECT_BLIZZARD,
EFFECT_RAIN_ALWAYS_HIT, // Unlike EFFECT_THUNDER, it doesn't get its accuracy reduced under sun.
NUM_BATTLE_MOVE_EFFECTS,
};

View file

@ -1230,18 +1230,18 @@ bool32 IsMoveEncouragedToHit(u32 battlerAtk, u32 battlerDef, u32 move)
// discouraged from hitting
weather = AI_GetWeather(AI_DATA);
if ((weather & B_WEATHER_SUN)
&& (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE))
if ((weather & B_WEATHER_SUN) && gBattleMoves[move].effect == EFFECT_THUNDER)
return FALSE;
// increased accuracy but don't always hit
if ((((weather & B_WEATHER_RAIN) && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE))
|| (((weather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD)))
|| (B_MINIMIZE_DMG_ACC >= GEN_6 && (gStatuses3[battlerDef] & STATUS3_MINIMIZED) && gBattleMoves[move].minimizeDoubleDamage)
|| (gBattleMoves[move].accuracy == 0))
{
if ((weather & B_WEATHER_RAIN) && gBattleMoves[move].effect == EFFECT_THUNDER)
return TRUE;
if ((weather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && gBattleMoves[move].effect == EFFECT_BLIZZARD)
return TRUE;
if (B_MINIMIZE_DMG_ACC >= GEN_6 && (gStatuses3[battlerDef] & STATUS3_MINIMIZED) && gBattleMoves[move].minimizeDoubleDamage)
return TRUE;
if (gBattleMoves[move].accuracy == 0)
return TRUE;
}
return FALSE;
}
@ -1315,7 +1315,7 @@ bool32 ShouldSetHail(u32 battler, u32 ability, u32 holdEffect)
|| ability == ABILITY_OVERCOAT
|| holdEffect == HOLD_EFFECT_SAFETY_GOGGLES
|| IS_BATTLER_OF_TYPE(battler, TYPE_ICE)
|| HasMove(battler, MOVE_BLIZZARD)
|| HasMoveEffect(battler, EFFECT_BLIZZARD)
|| HasMoveEffect(battler, EFFECT_AURORA_VEIL)
|| HasMoveEffect(battler, EFFECT_WEATHER_BALL))
{
@ -1337,7 +1337,6 @@ bool32 ShouldSetRain(u32 battlerAtk, u32 atkAbility, u32 holdEffect)
|| atkAbility == ABILITY_RAIN_DISH
|| atkAbility == ABILITY_DRY_SKIN
|| HasMoveEffect(battlerAtk, EFFECT_THUNDER)
|| HasMoveEffect(battlerAtk, EFFECT_HURRICANE)
|| HasMoveEffect(battlerAtk, EFFECT_WEATHER_BALL)
|| HasMoveWithType(battlerAtk, TYPE_WATER)))
{
@ -1383,7 +1382,7 @@ bool32 ShouldSetSnow(u32 battler, u32 ability, u32 holdEffect)
|| ability == ABILITY_FORECAST
|| ability == ABILITY_SLUSH_RUSH
|| IS_BATTLER_OF_TYPE(battler, TYPE_ICE)
|| HasMove(battler, MOVE_BLIZZARD)
|| HasMoveEffect(battler, EFFECT_BLIZZARD)
|| HasMoveEffect(battler, EFFECT_AURORA_VEIL)
|| HasMoveEffect(battler, EFFECT_WEATHER_BALL))
{

View file

@ -2239,7 +2239,7 @@ static void CreateDomeOpponentMon(u8 monPartyId, u16 tournamentTrainerId, u8 tou
{
SetMonMoveSlot(&gEnemyParty[monPartyId],
gFacilityTrainerMons[DOME_MONS[tournamentTrainerId][tournamentMonId]].moves[i], i);
if (gFacilityTrainerMons[DOME_MONS[tournamentTrainerId][tournamentMonId]].moves[i] == MOVE_FRUSTRATION)
if (gBattleMoves[gFacilityTrainerMons[DOME_MONS[tournamentTrainerId][tournamentMonId]].moves[i]].effect == EFFECT_FRUSTRATION)
friendship = 0;
}
@ -4108,8 +4108,7 @@ static bool32 IsDomeComboMoveEffect(u32 effect)
case EFFECT_MOONLIGHT:
case EFFECT_SHORE_UP:
case EFFECT_THUNDER:
case EFFECT_HURRICANE:
//case EFFECT_BLIZZARD: (needs a unique effect in gBattleMoves!)
case EFFECT_BLIZZARD:
case EFFECT_SOLAR_BEAM:
case EFFECT_GROWTH:
case EFFECT_AURORA_VEIL:
@ -5154,8 +5153,7 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
movePower = 40;
else if (movePower == 1)
movePower = 60;
else if (moveIds[i * MAX_MON_MOVES + j] == MOVE_SELF_DESTRUCT
|| moveIds[i * MAX_MON_MOVES + j] == MOVE_EXPLOSION)
else if (gBattleMoves[moveIds[i * MAX_MON_MOVES + j]].effect == EFFECT_EXPLOSION)
movePower /= 2;
for (k = 0; k < FRONTIER_PARTY_SIZE; k++)

View file

@ -5728,7 +5728,7 @@ void SetTypeBeforeUsingMove(u32 move, u32 battlerAtk)
{
gBattleStruct->dynamicMoveType = TYPE_WATER | F_DYNAMIC_TYPE_SET;
}
else if (move == MOVE_AURA_WHEEL && gBattleMons[battlerAtk].species == SPECIES_MORPEKO_HANGRY)
else if (gBattleMoves[move].effect == EFFECT_AURA_WHEEL && gBattleMons[battlerAtk].species == SPECIES_MORPEKO_HANGRY)
{
gBattleStruct->dynamicMoveType = TYPE_DARK | F_DYNAMIC_TYPE_SET;
}

View file

@ -1584,15 +1584,14 @@ static bool32 AccuracyCalcHelper(u16 move)
if (WEATHER_HAS_EFFECT)
{
if (IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN) &&
(gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE ||
move == MOVE_BLEAKWIND_STORM || move == MOVE_WILDBOLT_STORM || move == MOVE_SANDSEAR_STORM))
if ((gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_RAIN_ALWAYS_HIT)
&& IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN))
{
// thunder/hurricane/genie moves ignore acc checks in rain unless target is holding utility umbrella
JumpIfMoveFailed(7, move);
return TRUE;
}
else if (B_BLIZZARD_HAIL >= GEN_4 && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD)
else if ((gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && gBattleMoves[move].effect == EFFECT_BLIZZARD)
{
// Blizzard ignores acc checks in Hail in Gen4+
JumpIfMoveFailed(7, move);
@ -1649,8 +1648,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u
moveAcc = gBattleMoves[move].accuracy;
// Check Thunder and Hurricane on sunny weather.
if (IsBattlerWeatherAffected(battlerDef, B_WEATHER_SUN)
&& (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE))
if (IsBattlerWeatherAffected(battlerDef, B_WEATHER_SUN) && gBattleMoves[move].effect == EFFECT_THUNDER)
moveAcc = 50;
// Check Wonder Skin.
if (defAbility == ABILITY_WONDER_SKIN && IS_MOVE_STATUS(move) && moveAcc > 50)
@ -5926,7 +5924,7 @@ static void Cmd_moveend(void)
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
&& gMultiHitCounter
&& !(gCurrentMove == MOVE_PRESENT && gBattleStruct->presentBasePower == 0)) // Silly edge case
&& !(gBattleMoves[gCurrentMove].effect == EFFECT_PRESENT && gBattleStruct->presentBasePower == 0)) // Silly edge case
{
gBattleScripting.multihitString[4]++;
if (--gMultiHitCounter == 0)

View file

@ -28,6 +28,7 @@
#include "constants/battle_dome.h"
#include "constants/battle_frontier.h"
#include "constants/battle_frontier_mons.h"
#include "constants/battle_move_effects.h"
#include "constants/battle_tent.h"
#include "constants/battle_tent_mons.h"
#include "constants/battle_tent_trainers.h"
@ -1707,7 +1708,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount)
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].moves[j], j);
if (gFacilityTrainerMons[monId].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[gFacilityTrainerMons[monId].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0; // Frustration is more powerful the lower the pokemon's friendship is.
}
@ -1745,7 +1746,7 @@ static void UNUSED Unused_CreateApprenticeMons(u16 trainerId, u8 firstMonId)
friendship = MAX_FRIENDSHIP;
for (j = 0; j < MAX_MON_MOVES; j++)
{
if (apprentice->party[i].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[apprentice->party[i].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0;
}
SetMonData(&gEnemyParty[firstMonId + i], MON_DATA_FRIENDSHIP, &friendship);
@ -1873,7 +1874,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveAvoidReturn(&gEnemyParty[firstMonId + i], gFacilityTrainerMons[monId].moves[j], j);
if (gFacilityTrainerMons[monId].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[gFacilityTrainerMons[monId].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0;
}
@ -3068,7 +3069,7 @@ static void FillPartnerParty(u16 trainerId)
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveSlot(&gPlayerParty[MULTI_PARTY_SIZE + i], gFacilityTrainerMons[monId].moves[j], j);
if (gFacilityTrainerMons[monId].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[gFacilityTrainerMons[monId].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0;
}
SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_FRIENDSHIP, &friendship);
@ -3503,7 +3504,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount)
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].moves[j], j);
if (gFacilityTrainerMons[monId].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[gFacilityTrainerMons[monId].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0; // Frustration is more powerful the lower the pokemon's friendship is.
}

View file

@ -99,7 +99,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_SPECIAL_DEFENSE_UP] = 1,
[EFFECT_ACCURACY_UP] = 1,
[EFFECT_EVASION_UP] = 1,
// [EFFECT_ALWAYS_HIT] = 2,
[EFFECT_ATTACK_DOWN] = 1,
[EFFECT_DEFENSE_DOWN] = 1,
[EFFECT_SPEED_DOWN] = 1,
@ -117,10 +116,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_LIGHT_SCREEN] = 7,
[EFFECT_REST] = 7,
[EFFECT_OHKO] = 7,
// [EFFECT_RAZOR_WIND] = 1,
[EFFECT_SUPER_FANG] = 5,
// [EFFECT_HIGH_CRITICAL] = 1,
// [EFFECT_DOUBLE_HIT] = 1,
[EFFECT_RECOIL_IF_MISS] = 1,
[EFFECT_MIST] = 5,
[EFFECT_FOCUS_ENERGY] = 1,
@ -143,8 +139,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_REFLECT] = 7,
[EFFECT_POISON] = 4,
[EFFECT_PARALYZE] = 4,
// [EFFECT_SKY_ATTACK] = 4,
// [EFFECT_TWINEEDLE] = 1,
[EFFECT_SUBSTITUTE] = 4,
[EFFECT_RAGE] = 2,
[EFFECT_MIMIC] = 4,
@ -167,7 +161,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_SPITE] = 4,
[EFFECT_FALSE_SWIPE] = 1,
[EFFECT_HEAL_BELL] = 5,
// [EFFECT_QUICK_ATTACK] = 1,
[EFFECT_TRIPLE_KICK] = 1,
[EFFECT_MEAN_LOOK] = 5,
[EFFECT_NIGHTMARE] = 3,
@ -201,11 +194,9 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_PSYCH_UP] = 7,
[EFFECT_MIRROR_COAT] = 6,
[EFFECT_SKULL_BASH] = 3,
// [EFFECT_TWISTER] = 1,
[EFFECT_EARTHQUAKE] = 1,
[EFFECT_FUTURE_SIGHT] = 1,
[EFFECT_GUST] = 1,
// [EFFECT_FLINCH_MINIMIZE_HIT] = 1,
[EFFECT_SOLAR_BEAM] = 1,
[EFFECT_THUNDER] = 1,
[EFFECT_TELEPORT] = 1,
@ -219,7 +210,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_SPIT_UP] = 3,
[EFFECT_SWALLOW] = 3,
[EFFECT_HAIL] = 4,
[EFFECT_SNOWSCAPE] = 4,
[EFFECT_TORMENT] = 7,
[EFFECT_FLATTER] = 7,
[EFFECT_WILL_O_WISP] = 5,
@ -252,14 +242,12 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_SNATCH] = 1,
[EFFECT_LOW_KICK] = 1,
[EFFECT_TEETER_DANCE] = 6,
// [EFFECT_BLAZE_KICK] = 1,
[EFFECT_MUD_SPORT] = 4,
[EFFECT_WEATHER_BALL] = 1,
[EFFECT_TICKLE] = 1,
[EFFECT_COSMIC_POWER] = 1,
[EFFECT_SKY_UPPERCUT] = 1,
[EFFECT_BULK_UP] = 1,
// [EFFECT_POISON_TAIL] = 1,
[EFFECT_WATER_SPORT] = 4,
[EFFECT_CALM_MIND] = 1,
[EFFECT_DRAGON_DANCE] = 1,
@ -320,7 +308,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_PSYCHIC_TERRAIN] = 0, // TODO: Assign points
[EFFECT_ATTACK_ACCURACY_UP] = 0, // TODO: Assign points
[EFFECT_ATTACK_SPATK_UP] = 0, // TODO: Assign points
[EFFECT_HURRICANE] = 0, // TODO: Assign points
[EFFECT_TWO_TYPED_MOVE] = 0, // TODO: Assign points
[EFFECT_ME_FIRST] = 0, // TODO: Assign points
[EFFECT_QUIVER_DANCE] = 0, // TODO: Assign points
@ -413,6 +400,29 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
[EFFECT_HIT_SET_REMOVE_TERRAIN] = 0, // TODO: Assign points
[EFFECT_DARK_VOID] = 0, // TODO: Assign points
[EFFECT_VICTORY_DANCE] = 0, // TODO: Assign points
[EFFECT_TEATIME] = 0, // TODO: Assign points
[EFFECT_ATTACK_UP_USER_ALLY] = 0, // TODO: Assign points
[EFFECT_SHELL_TRAP] = 0, // TODO: Assign points
[EFFECT_PSYBLADE] = 0, // TODO: Assign points
[EFFECT_HYDRO_STEAM] = 0, // TODO: Assign points
[EFFECT_REVIVAL_BLESSING] = 0, // TODO: Assign points
[EFFECT_SNOWSCAPE] = 4,
[EFFECT_TAKE_HEART] = 0, // TODO: Assign points
[EFFECT_COLLISION_COURSE] = 0, // TODO: Assign points
[EFFECT_CORROSIVE_GAS] = 0, // TODO: Assign points
[EFFECT_POPULATION_BOMB] = 0, // TODO: Assign points
[EFFECT_SALT_CURE] = 0, // TODO: Assign points
[EFFECT_CHILLY_RECEPTION] = 0, // TODO: Assign points
[EFFECT_MAX_MOVE] = 0, // TODO: Assign points
[EFFECT_GLAIVE_RUSH] = 0, // TODO: Assign points
[EFFECT_RAGING_BULL] = 0, // TODO: Assign points
[EFFECT_RAGE_FIST] = 0, // TODO: Assign points
[EFFECT_DOODLE] = 0, // TODO: Assign points
[EFFECT_FILLET_AWAY] = 0, // TODO: Assign points
[EFFECT_IVY_CUDGEL] = 0, // TODO: Assign points
[EFFECT_FICKLE_BEAM] = 0, // TODO: Assign points
[EFFECT_BLIZZARD] = 0, // TODO: Assign points
[EFFECT_RAIN_ALWAYS_HIT] = 0, // TODO: Assign points
};
static const u16 sPoints_Effectiveness[] =
@ -1115,7 +1125,7 @@ void BattleTv_SetDataBasedOnMove(u16 move, u16 weatherFlags, struct DisableStruc
tvPtr->side[atkSide].wishMonId = gBattlerPartyIndexes[gBattlerAttacker] + 1;
tvPtr->side[atkSide].wishMoveSlot = moveSlot;
}
if (move == MOVE_SELF_DESTRUCT || move == MOVE_EXPLOSION)
if (gBattleMoves[move].effect == EFFECT_EXPLOSION)
{
tvPtr->side[atkSide ^ BIT_SIDE].explosionMonId = gBattlerPartyIndexes[gBattlerAttacker] + 1;
tvPtr->side[atkSide ^ BIT_SIDE].explosionMoveSlot = moveSlot;

View file

@ -1,3 +1,11 @@
#include "battle_dynamax.h"
#include "constants/battle.h"
#include "constants/battle_move_effects.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_z_move_effects.h"
#include "constants/hold_effects.h"
#include "constants/moves.h"
const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
{
[MOVE_NONE] =
@ -1002,7 +1010,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
#else
.power = 120,
#endif
.effect = EFFECT_HIT,
.effect = B_BLIZZARD_HAIL >= GEN_4 ? EFFECT_BLIZZARD : EFFECT_HIT,
.type = TYPE_ICE,
.accuracy = 70,
.pp = 5,
@ -9144,7 +9152,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
#else
.power = 120,
#endif
.effect = EFFECT_HURRICANE,
.effect = EFFECT_THUNDER,
.type = TYPE_FLYING,
.accuracy = 70,
.pp = 10,
@ -13009,7 +13017,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
.power = 95,
.pp = 5,
#endif
.effect = EFFECT_HIT,
.effect = EFFECT_RAIN_ALWAYS_HIT,
.type = TYPE_FLYING,
.accuracy = 80,
.target = MOVE_TARGET_BOTH,
@ -13032,7 +13040,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
.power = 95,
.pp = 5,
#endif
.effect = EFFECT_HIT,
.effect = EFFECT_RAIN_ALWAYS_HIT,
.type = TYPE_ELECTRIC,
.accuracy = 80,
.target = MOVE_TARGET_BOTH,
@ -13055,7 +13063,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
.power = 95,
.pp = 5,
#endif
.effect = EFFECT_HIT,
.effect = EFFECT_RAIN_ALWAYS_HIT,
.type = TYPE_GROUND,
.accuracy = 80,
.target = MOVE_TARGET_BOTH,

View file

@ -29,6 +29,7 @@
#include "load_save.h"
#include "battle_dome.h"
#include "constants/battle_frontier.h"
#include "constants/battle_move_effects.h"
#include "constants/battle_pike.h"
#include "constants/frontier_util.h"
#include "constants/trainers.h"
@ -2477,7 +2478,7 @@ void CreateFrontierBrainPokemon(void)
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveSlot(&gEnemyParty[monPartyId], sFrontierBrainsMons[facility][symbol][i].moves[j], j);
if (sFrontierBrainsMons[facility][symbol][i].moves[j] == MOVE_FRUSTRATION)
if (gBattleMoves[sFrontierBrainsMons[facility][symbol][i].moves[j]].effect == EFFECT_FRUSTRATION)
friendship = 0;
}
SetMonData(&gEnemyParty[monPartyId], MON_DATA_FRIENDSHIP, &friendship);

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_HURRICANE].effect == EFFECT_HURRICANE);
ASSUME(gBattleMoves[MOVE_HURRICANE].effect == EFFECT_THUNDER);
ASSUME(gBattleMoves[MOVE_HURRICANE].accuracy == 70);
}