Skip to content

Commit

Permalink
Merge pull request #85 from lhearachel/battle-dev
Browse files Browse the repository at this point in the history
Document ShowPartyList, WaitPartyList, Switch, and JumpIfAnySwitches commands
  • Loading branch information
lhearachel authored Oct 15, 2023
2 parents 8aadd80 + e1b2a01 commit 7dc0807
Show file tree
Hide file tree
Showing 54 changed files with 590 additions and 467 deletions.
2 changes: 1 addition & 1 deletion include/battle/btlcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ enum BattleScriptVars {
#define BTLSCR_MSG_DEFENDER 15
#define BTLSCR_ATTACKER_PARTNER 16
#define BTLSCR_DEFENDER_PARTNER 17
// 18 undefined
#define BTLSCR_FORCED_OUT 18
#define BTLSCR_ATTACKER_ENEMY 19
#define BTLSCR_DEFENDER_ENEMY 20
#define BTLSCR_MSG_BATTLER_TEMP 21
Expand Down
2 changes: 2 additions & 0 deletions include/battle/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
#define WEATHER_IS_SUN (battleCtx->fieldConditionsMask & FIELD_CONDITION_SUNNY)
#define WEATHER_IS_HAIL (battleCtx->fieldConditionsMask & FIELD_CONDITION_HAILING)

#define FLAG_NEGATE(flag) ((flag) ^ 0xFFFFFFFF)

enum {
BATTLE_STAT_HP,
BATTLE_STAT_ATTACK,
Expand Down
2 changes: 2 additions & 0 deletions include/constants/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define BATTLE_TYPE_NO_AI_ITEMS (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_SAFARI | BATTLE_TYPE_AI | BATTLE_TYPE_PAL_PARK)
#define BATTLE_TYPE_NO_MOVES (BATTLE_TYPE_SAFARI | BATTLE_TYPE_PAL_PARK)
#define BATTLE_TYPE_NO_EXPERIENCE (BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_PAL_PARK)
#define BATTLE_TYPE_NO_ABILITIES (BATTLE_TYPE_SAFARI | BATTLE_TYPE_PAL_PARK)
#define BATTLE_TYPE_2vs2_TAG (BATTLE_TYPE_2vs2 | BATTLE_TYPE_TAG)

#define MAX_LINK_BATTLERS 4
#define MAX_BATTLERS 4
Expand Down
17 changes: 17 additions & 0 deletions include/constants/battle/moves.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef POKEPLATINUM_CONSTANTS_BATTLE_MOVES_H
#define POKEPLATINUM_CONSTANTS_BATTLE_MOVES_H

#define MOVE_EFFECT_NONE 0
#define MOVE_EFFECT_LEECH_SEED_RECIPIENT ((1 << 0) | (1 << 1)) // each bit defines which opponent receives the healing effect
#define MOVE_EFFECT_LEECH_SEED (1 << 2)
#define MOVE_EFFECT_LOCK_ON ((1 << 3) | (1 << 4)) // counter for the number of Lock On turns remaining
Expand Down Expand Up @@ -34,10 +35,26 @@
| MOVE_EFFECT_UNDERGROUND \
| MOVE_EFFECT_UNDERWATER \
| MOVE_EFFECT_SHADOW_FORCE)
#define MOVE_EFFECT_BATON_PASSED (MOVE_EFFECT_LEECH_SEED_RECIPIENT \
| MOVE_EFFECT_LEECH_SEED \
| MOVE_EFFECT_LOCK_ON \
| MOVE_EFFECT_PERISH_SONG \
| MOVE_EFFECT_INGRAIN \
| MOVE_EFFECT_MUD_SPORT \
| MOVE_EFFECT_WATER_SPORT \
| MOVE_EFFECT_NO_CRITICAL \
| MOVE_EFFECT_POWER_TRICK \
| MOVE_EFFECT_AQUA_RING \
| MOVE_EFFECT_ABILITY_SUPPRESSED \
| MOVE_EFFECT_EMBARGO \
| MOVE_EFFECT_HEAL_BLOCK \
| MOVE_EFFECT_MAGNET_RISE)

#define MOVE_EFFECT_LOCK_ON_SHIFT 3
#define MOVE_EFFECT_YAWN_SHIFT 11

#define MOVE_EFFECT_LOCK_ON_INITIAL_DURATION (1 << (MOVE_EFFECT_LOCK_ON_SHIFT + 1))

#define MOVE_STATUS_MISSED (1 << 0)
#define MOVE_STATUS_SUPER_EFFECTIVE (1 << 1)
#define MOVE_STATUS_NOT_VERY_EFFECTIVE (1 << 2)
Expand Down
3 changes: 3 additions & 0 deletions include/constants/battle/system_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SYSCTL_FIRST_OF_MULTI_TURN (1 << 5) // this could be a charge-up move or Bide
#define SYSCTL_SKIP_SPRITE_BLINK (1 << 6)
#define SYSCTL_TRY_SYNCHRONIZE_STATUS (1 << 7)
#define SYSCTL_BATON_PASS (1 << 8)
#define SYSCTL_LAST_OF_MULTI_TURN (1 << 9)
#define SYSCTL_NONSTANDARD_ACC_CHECK (1 << 10) // used by Future Sight and OHKO moves
#define SYSCTL_MOVE_HIT (1 << 13) // this indicates that the move hit its target(s)
Expand All @@ -28,8 +29,10 @@
#define SYSCTL_MAGIC_COAT_REFLECTED (1 << 3)
#define SYSCTL_UTURN_ACTIVE (1 << 4)
#define SYSCTL_MOVE_SUCCEEDED (1 << 6) // this only reflects that the move is executed, not whether it hit or missed
#define SYSCTL_LINK_WAITING ((1 << 24) | (1 << 25) | (1 << 26) | (1 << 27))
#define SYSCTL_PAYOUT_EXP ((1 << 28) | (1 << 29) | (1 << 30) | (1 << 31))

#define SYSCTL_LINK_WAITING_SHIFT 24
#define SYSCTL_PAYOUT_EXP_SHIFT 28

#define SYSCTL_SKIP_OBEDIENCE_CHECK (1 << 0)
Expand Down
12 changes: 6 additions & 6 deletions include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ enum PokemonDataParam {
MON_DATA_SPATK_IV,
MON_DATA_SPDEF_IV,
MON_DATA_IS_EGG,
MON_DATA_77,
MON_DATA_HAS_NICKNAME,
MON_DATA_78,
MON_DATA_79,
MON_DATA_80,
Expand Down Expand Up @@ -179,7 +179,7 @@ enum PokemonDataParam {
MON_DATA_114,
MON_DATA_115,
MON_DATA_116,
MON_DATA_117,
MON_DATA_NICKNAME,
MON_DATA_118,
MON_DATA_119,
MON_DATA_120,
Expand All @@ -206,7 +206,7 @@ enum PokemonDataParam {
MON_DATA_141,
MON_DATA_142,
MON_DATA_143,
MON_DATA_144,
MON_DATA_OTNAME,
MON_DATA_145,
MON_DATA_146,
MON_DATA_147,
Expand All @@ -222,7 +222,7 @@ enum PokemonDataParam {
MON_DATA_OT_GENDER,
MON_DATA_158,
MON_DATA_159,
MON_DATA_160,
MON_DATA_STATUS_CONDITION,
MON_DATA_LEVEL,
MON_DATA_162,
MON_DATA_CURRENT_HP,
Expand All @@ -239,8 +239,8 @@ enum PokemonDataParam {
MON_DATA_SPECIES_EGG,
MON_DATA_COMBINED_IVS,
MON_DATA_176,
MON_DATA_177,
MON_DATA_178,
MON_DATA_TYPE_1,
MON_DATA_TYPE_2,
MON_DATA_179,
};

Expand Down
2 changes: 1 addition & 1 deletion include/overlay016/ov16_0223DF00.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void ov16_0223F4B0(BattleSystem * param0, int param1);
u16 BattleSystem_RandNext(BattleSystem * param0);
u32 ov16_0223F4E8(BattleSystem * param0);
void ov16_0223F4F4(BattleSystem * param0, u32 param1);
void ov16_0223F500(BattleSystem * param0, int param1, u8 param2);
void BattleSystem_Record(BattleSystem * param0, int param1, u8 param2);
BOOL ov16_0223F530(BattleSystem * param0, int param1, u8 * param2);
u8 ov16_0223F58C(BattleSystem * param0, u8 * param1);
void ov16_0223F638(BattleSystem * param0, u16 param1, u8 * param2);
Expand Down
58 changes: 55 additions & 3 deletions include/overlay016/ov16_0225177C.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,35 @@ enum CountAbilityMode {
COUNT_ALIVE_BATTLERS_EXCEPT_ME, //< Count all alive battlers except for me which have the ability
};

void BattleSystem_InitBattleMon(BattleSystem *battleSys, BattleContext *battleCtx, int param2, int param3);
void BattleSystem_ReloadPokemon(BattleSystem * param0, BattleContext * param1, int param2, int param3);
/**
* @brief Initialize a BattleMon from the Pokemon in the given battler's party,
* from the given party slot.
*
* @param battleSys
* @param battleCtx
* @param battler The battler whose party will be read from
* @param partySlot The slot in the party to retrieve
*/
void BattleSystem_InitBattleMon(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int partySlot);

/**
* @brief Reload a BattleMon from the given battler's party, from the given
* party slot.
*
* Specifically, this will only reload the following fields:
*
* - battle stats (attack, defense, etc.)
* - level
* - friendship
* - move known in each slot
* - total experience
*
* @param battleSys
* @param battleCtx
* @param battler The battler whose party will be read from
* @param partySlot The slot in the party to retrieve
*/
void BattleSystem_ReloadPokemon(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int partySlot);

/**
* @brief Load a script file from the specified NARC.
Expand Down Expand Up @@ -237,7 +264,22 @@ int ov16_02253F7C(BattleContext * param0, int param1);
BOOL BattleSystem_CheckTrainerMessage(BattleSystem * param0, BattleContext * param1);
void BattleContext_Init(BattleContext * param0);
void BattleContext_InitCounters(BattleSystem * param0, BattleContext * param1);
void ov16_0225433C(BattleSystem * param0, BattleContext * param1, int param2);

/**
* @brief Update relevant buffers for a battler after a switch.
*
* This handles all of the logic for what effects are zero'd out due to a
* switch, as well as what effects are transferred across a switch due to
* Baton Pass.
*
* This routine will update the battler's chosen command to be MOVE_END, which
* functionally ends their turn.
*
* @param battleSys
* @param battleCtx
* @param battler The switching battler
*/
void BattleSystem_UpdateAfterSwitch(BattleSystem *battleSys, BattleContext *battleCtx, int battler);

/**
* @brief Cleanup lingering state according to the given battler.
Expand Down Expand Up @@ -409,6 +451,16 @@ BOOL BattleSystem_TrainerIsOT(BattleSystem * param0, BattleContext * param1);
BOOL BattleSystem_PokemonIsOT(BattleSystem * param0, Pokemon * param1);
BOOL BattleSystem_UpdateWeatherForms(BattleSystem * param0, BattleContext * param1, int * param2);
void ov16_0225A1B0(BattleSystem * param0, BattleContext * param1);

/**
* @brief Switch the party order by swapping the battler in the given party slot
* with an active slot.
*
* @param battleSys
* @param battleCtx
* @param battler The battler who is switching
* @param partySlot The party slot which should be moved to an active slot
*/
void BattleSystem_SwitchSlots(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int partySlot);

/**
Expand Down
2 changes: 1 addition & 1 deletion include/overlay021/struct_ov21_021D3320.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typedef struct {
int unk_173C;
int unk_1740;
int unk_1744;
UnkStruct_02098700 * unk_1748;
HeightWeightData * unk_1748;
u32 unk_174C;
u32 unk_1750;
Strbuf* unk_1754;
Expand Down
2 changes: 1 addition & 1 deletion include/struct_decls/struct_02098700_decl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef POKEPLATINUM_STRUCT_02098700_DECL_H
#define POKEPLATINUM_STRUCT_02098700_DECL_H

typedef struct UnkStruct_02098700_t UnkStruct_02098700;
typedef struct HeightWeightData HeightWeightData;

#endif // POKEPLATINUM_STRUCT_02098700_DECL_H
2 changes: 1 addition & 1 deletion include/struct_defs/struct_0207F248.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef struct {
u8 unk_B12;
u8 unk_B13;
u16 unk_B14[6];
UnkStruct_02098700 * unk_B20;
HeightWeightData * unk_B20;
UnkStruct_ov118_021D0FDC * unk_B24;
UnkStruct_0207C690 * unk_B28;
} UnkStruct_0207F248;
Expand Down
10 changes: 5 additions & 5 deletions include/unk_0207A2A8.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include "struct_decls/struct_party_decl.h"
#include "struct_decls/struct_02098700_decl.h"

UnkStruct_02098700 * sub_0207A2A8(int param0);
void sub_0207A2C0(UnkStruct_02098700 * param0);
BOOL sub_0207A2D0(const UnkStruct_0202610C * param0, Pokemon * param1, const UnkStruct_02098700 * param2);
int sub_0207A3AC(const UnkStruct_0202610C * param0, Party * param1, const UnkStruct_02098700 * param2, u8 * param3);
int sub_0207A594(const UnkStruct_0202610C * param0, Party * param1, const UnkStruct_02098700 * param2);
HeightWeightData * sub_0207A2A8(int param0);
void sub_0207A2C0(HeightWeightData * param0);
BOOL sub_0207A2D0(const UnkStruct_0202610C * param0, Pokemon * param1, const HeightWeightData * param2);
int sub_0207A3AC(const UnkStruct_0202610C * param0, Party * param1, const HeightWeightData * param2, u8 * param3);
int sub_0207A594(const UnkStruct_0202610C * param0, Party * param1, const HeightWeightData * param2);

#endif // POKEPLATINUM_UNK_0207A2A8_H
20 changes: 10 additions & 10 deletions include/unk_02098700.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

#include "struct_decls/struct_02098700_decl.h"

UnkStruct_02098700 * sub_02098700(int param0);
void sub_02098718(UnkStruct_02098700 * param0);
void sub_0209872C(UnkStruct_02098700 * param0, int param1, int param2);
void sub_020987BC(UnkStruct_02098700 * param0);
int sub_02098808(const UnkStruct_02098700 * param0, int param1);
int sub_02098828(const UnkStruct_02098700 * param0, int param1);
short sub_02098848(const UnkStruct_02098700 * param0, int param1);
short sub_02098868(const UnkStruct_02098700 * param0, int param1);
short sub_02098888(const UnkStruct_02098700 * param0, int param1);
short sub_020988A8(const UnkStruct_02098700 * param0, int param1);
HeightWeightData * Pokedex_HeightWeightData(int param0);
void Pokedex_HeightWeightData_Free(HeightWeightData * param0);
void Pokedex_HeightWeightData_Load(HeightWeightData * param0, int param1, int param2);
void Pokedex_HeightWeightData_Release(HeightWeightData * param0);
int sub_02098808(const HeightWeightData * param0, int param1);
int Pokedex_HeightWeightData_Weight(const HeightWeightData * param0, int param1);
short sub_02098848(const HeightWeightData * param0, int param1);
short sub_02098868(const HeightWeightData * param0, int param1);
short sub_02098888(const HeightWeightData * param0, int param1);
short sub_020988A8(const HeightWeightData * param0, int param1);

#endif // POKEPLATINUM_UNK_02098700_H
2 changes: 1 addition & 1 deletion include/unk_02098988.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef POKEPLATINUM_UNK_02098988_H
#define POKEPLATINUM_UNK_02098988_H

void sub_02098988(u32 param0);
void Pokedex_SetupGiratina(u32 param0);
u32 sub_020989B8(void);
u32 sub_020989C4(void);
u32 sub_020989D0(void);
Expand Down
4 changes: 2 additions & 2 deletions src/overlay005/ov5_021E622C.c
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ static void ov5_021E62C4 (Party * param0, int param1, UnkStruct_02026218 * param
TrainerInfo * v6 = sub_02025E38(param3);

v2 = TrainerInfo_Name(v6);
Pokemon_GetValue(v1, MON_DATA_117, v3);
Pokemon_GetValue(v1, MON_DATA_NICKNAME, v3);

if (ov5_021E62B0(Pokemon_GetBoxPokemon(v1))) {
Pokemon_GetValue(v1, MON_DATA_170, sub_02026230(v4));
Expand Down Expand Up @@ -2969,7 +2969,7 @@ void ov5_021E7308 (UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 para
if (v3 != 2) {
v4 = BoxPokemon_GetValue(v1, MON_DATA_SPECIES, NULL);

if (((v4 == 29) || (v4 == 32)) && (BoxPokemon_GetValue(v1, MON_DATA_77, NULL) == 0)) {
if (((v4 == 29) || (v4 == 32)) && (BoxPokemon_GetValue(v1, MON_DATA_HAS_NICKNAME, NULL) == 0)) {
v3 = 2;
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/overlay005/ov5_021EE7D4.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ static u32 ov5_021EE8A8 (u16 param0, u16 param1)
u32 v3;
u64 v4;
u8 v5;
UnkStruct_02098700 * v6;
HeightWeightData * v6;

v6 = sub_02098700(4);
sub_0209872C(v6, 0, 4);
v6 = Pokedex_HeightWeightData(4);
Pokedex_HeightWeightData_Load(v6, 0, 4);

v3 = sub_02098808((const UnkStruct_02098700 *)v6, param0);
sub_020987BC(v6);
sub_02098718(v6);
v3 = sub_02098808((const HeightWeightData *)v6, param0);
Pokedex_HeightWeightData_Release(v6);
Pokedex_HeightWeightData_Free(v6);

v5 = ov5_021EE880(param1);
v0 = Unk_ov5_021FF508[v5].unk_00;
Expand Down
2 changes: 1 addition & 1 deletion src/overlay006/ov6_02246034.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void ov6_02246034 (UnkStruct_0203CDB0 * param0, BattleParams * param1)

if (v4 != NULL) {
v0 = (u16)(Pokemon_GetValue(v6, MON_DATA_CURRENT_HP, NULL));
v1 = (u8)(Pokemon_GetValue(v6, MON_DATA_160, NULL));
v1 = (u8)(Pokemon_GetValue(v6, MON_DATA_STATUS_CONDITION, NULL));

if (((param1->unk_14 == 0x1) && (v0 == 0))) {
sub_0202D914(&v4);
Expand Down
2 changes: 1 addition & 1 deletion src/overlay007/ov7_0224B4E8.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef struct {
Window unk_54;
UnkStruct_0200B358 * unk_64;
MessageLoader * unk_68;
UnkStruct_02098700 * unk_6C;
HeightWeightData * unk_6C;
u16 * unk_70;
int unk_74;
u16 unk_78;
Expand Down
4 changes: 2 additions & 2 deletions src/overlay013/ov13_0221FC20.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,8 @@ static void ov13_02220F98 (UnkStruct_ov13_022213F0 * param0)
param0->unk_04[v0].unk_0E = Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_SP_DEF, NULL);
param0->unk_04[v0].unk_10 = Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_CURRENT_HP, NULL);
param0->unk_04[v0].unk_12 = Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_MAX_HP, NULL);
param0->unk_04[v0].unk_14 = (u8)Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_177, NULL);
param0->unk_04[v0].unk_15 = (u8)Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_178, NULL);
param0->unk_04[v0].unk_14 = (u8)Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_TYPE_1, NULL);
param0->unk_04[v0].unk_15 = (u8)Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_TYPE_2, NULL);
param0->unk_04[v0].unk_16_0 = (u8)Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_LEVEL, NULL);

if (Pokemon_GetValue(param0->unk_04[v0].unk_00, MON_DATA_176, NULL) == 1) {
Expand Down
6 changes: 3 additions & 3 deletions src/overlay014/ov14_0221FC20.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ static void ov14_022211AC (BattleSystem * param0, BattleContext * param1)
for (v2 = 0; v2 < BattleSystem_PartyCount(param0, v3); v2++) {
v1 = Party_GetPokemonBySlotIndex(v0, v2);

if ((v2 != v4) && (v2 != v5) && (Pokemon_GetValue(v1, MON_DATA_CURRENT_HP, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 494) && (Pokemon_GetValue(v1, MON_DATA_160, NULL) & v7)) {
if ((v2 != v4) && (v2 != v5) && (Pokemon_GetValue(v1, MON_DATA_CURRENT_HP, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 494) && (Pokemon_GetValue(v1, MON_DATA_STATUS_CONDITION, NULL) & v7)) {
ov14_02222D24(param1, v8);
return;
}
Expand Down Expand Up @@ -1593,7 +1593,7 @@ static void ov14_022212A0 (BattleSystem * param0, BattleContext * param1)
for (v2 = 0; v2 < BattleSystem_PartyCount(param0, v3); v2++) {
v1 = Party_GetPokemonBySlotIndex(v0, v2);

if ((v2 != v4) && (v2 != v5) && (Pokemon_GetValue(v1, MON_DATA_CURRENT_HP, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 494) && ((Pokemon_GetValue(v1, MON_DATA_160, NULL) & v7) == 0)) {
if ((v2 != v4) && (v2 != v5) && (Pokemon_GetValue(v1, MON_DATA_CURRENT_HP, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) != 494) && ((Pokemon_GetValue(v1, MON_DATA_STATUS_CONDITION, NULL) & v7) == 0)) {
ov14_02222D24(param1, v8);
return;
}
Expand Down Expand Up @@ -3760,7 +3760,7 @@ static BOOL ov14_02223E10 (BattleSystem * param0, BattleContext * param1, int pa
v6 = 0;
v5 = ov14_0222327C(param0, param1, param1->moveHitBattler[param2], param1->moveHit[param2]);

ov16_022552D4(param1, param1->moveHit[param2], v5, Battler_Ability(param1, param1->moveHitBattler[param2]), Pokemon_GetValue(v9, MON_DATA_ABILITY, NULL), BattleSystem_GetItemData(param1, Pokemon_GetValue(v9, MON_DATA_HELD_ITEM, NULL), 1), Pokemon_GetValue(v9, MON_DATA_177, NULL), Pokemon_GetValue(v9, MON_DATA_178, NULL), &v6);
ov16_022552D4(param1, param1->moveHit[param2], v5, Battler_Ability(param1, param1->moveHitBattler[param2]), Pokemon_GetValue(v9, MON_DATA_ABILITY, NULL), BattleSystem_GetItemData(param1, Pokemon_GetValue(v9, MON_DATA_HELD_ITEM, NULL), 1), Pokemon_GetValue(v9, MON_DATA_TYPE_1, NULL), Pokemon_GetValue(v9, MON_DATA_TYPE_2, NULL), &v6);

if (v6 & param3) {
for (v1 = 0; v1 < 4; v1++) {
Expand Down
Loading

0 comments on commit 7dc0807

Please sign in to comment.