more clean-up

This commit is contained in:
DizzyEggg 2025-08-29 15:19:03 +02:00
parent bd7c07a698
commit 4ad34572a7
10 changed files with 46 additions and 66 deletions

View File

@ -79,5 +79,7 @@ bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern const s32 gUnknown_8106A4C[1];
extern const s32 gUnknown_8106A50[1];
#endif /* ifndef GUARD_MOVE_ORB_ACTIONS_1_H */

View File

@ -48,7 +48,6 @@ extern bool8 sub_803F428(DungeonPos *pos);
extern void sub_800EEE0(u16 a0);
extern s32 sub_800EBC8(struct UnkStruct_8040094 *a0);
extern bool8 sub_800E7D0(struct UnkStruct_8040094 *a0);
extern s32 sub_800ED20(u16 param_1);
extern u8 sub_800EC84(s32 param_1);
extern bool8 MoveMatchesBideClassStatus(Entity *pokemon, Move *move);
extern bool8 IsSleeping(Entity *pokemon);

View File

@ -36,9 +36,7 @@
#include "dungeon_move.h"
#include "dungeon_leveling.h"
#include "warp_target.h"
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
#include "move_orb_actions_1.h"
extern void sub_8078B5C(Entity *, Entity *, u32, u32, u32);
extern void sub_8051E7C(Entity *pokemon);
@ -949,8 +947,8 @@ static void GrimyFoodItemAction(Entity *pokemon, Entity * target)
ParalyzeStatusTarget(pokemon, target, TRUE);
break;
case 4:
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 3, 1, TRUE);
LowerAttackStageTarget(pokemon, target, gUnknown_8106A50, 3, 1, TRUE);
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 3, 1, TRUE);
LowerAttackStageTarget(pokemon, target, gUnknown_8106A50[0], 3, 1, TRUE);
break;
}
}

View File

@ -59,15 +59,11 @@ extern void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2);
extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *);
extern Entity *sub_80696A8(Entity *a0);
extern Entity *GetMonsterAtPos(DungeonPos *pos);
extern s32 sub_800ED20(u16 param_1);
extern void sub_8042930(Entity *r0);
extern void sub_8041B48(Entity *pokemon);
extern void sub_8041BA8(Entity *pokemon);
extern void sub_8042950(Entity *r0);
extern const s32 gUnknown_8106A50;
extern const s32 gUnknown_8106A4C;
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_);
EWRAM_DATA s32 gUnknown_202F208 = 0;
@ -496,16 +492,16 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
moveHadEffect = PoisonStingMoveAction(attacker, currTarget, move, itemId);
break;
case MOVE_PSYCHIC:
moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A50, itemId);
moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A50[0], itemId);
break;
case MOVE_ACID:
moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A4C, itemId);
moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A4C[0], itemId);
break;
case MOVE_METAL_CLAW:
moveHadEffect = MetalClawMoveAction(attacker, currTarget, move, gUnknown_8106A4C, itemId);
moveHadEffect = MetalClawMoveAction(attacker, currTarget, move, gUnknown_8106A4C[0], itemId);
break;
case MOVE_STEEL_WING:
moveHadEffect = SteelWingMoveAction(attacker, currTarget, move, gUnknown_8106A4C, itemId);
moveHadEffect = SteelWingMoveAction(attacker, currTarget, move, gUnknown_8106A4C[0], itemId);
break;
case MOVE_POISON_TAIL:
moveHadEffect = PoisonTailMoveAction(attacker, currTarget, move, itemId);
@ -1346,7 +1342,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
}
if (EntityIsValid(attacker) && GetEntInfo(attacker)->unk155 != 0) {
GetEntInfo(attacker)->unk155 = 0;
LowerAttackStageTarget(attacker, attacker, gUnknown_8106A50, 2, 0, FALSE);
LowerAttackStageTarget(attacker, attacker, gUnknown_8106A50[0], 2, 0, FALSE);
}
}
}

View File

@ -54,7 +54,6 @@ extern void sub_800EF10(u16 r0);
extern void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2);
extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *);
extern Entity *GetMonsterAtPos(DungeonPos *pos);
extern s32 sub_800ED20(u16 param_1);
static u8 ToItemID(u32 itemID);

View File

@ -33,12 +33,7 @@
#include "run_dungeon.h"
#include "effect_main.h"
extern void sub_8041888(u8 param_1);
extern void UpdateMinimap();
void sub_803EC94(void);
s32 sub_803EF90(s32 a0, u8 a1);
static void sub_803F38C(void);
static void sub_803F7BC(void);

View File

@ -23,7 +23,7 @@
#include "moves.h"
#include "number_util.h"
#include "pokemon.h"
#include "move_orb_actions_4.h"
#include "move_orb_actions_1.h"
#include "status.h"
#include "structs/dungeon_entity.h"
#include "structs/map.h"
@ -39,9 +39,6 @@
extern void EndAbilityImmuneStatus(Entity *, Entity *);
extern void nullsub_92(Entity *);
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag = FALSE;
@ -89,7 +86,7 @@ bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
if(sub_805727C(pokemon, pokemon, gMeteorMashSecondaryChance))
{
entityInfo = GetEntInfo(pokemon);
RaiseAttackStageTarget(pokemon, pokemon, gUnknown_8106A4C, 1);
RaiseAttackStageTarget(pokemon, pokemon, gUnknown_8106A4C[0], 1);
SetExpMultplier(entityInfo);
}
}
@ -163,7 +160,7 @@ bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
flag = TRUE;
if(RollSecondaryEffect(pokemon, 0))
{
LowerAttackStageTarget(pokemon, pokemon, gUnknown_8106A50, 2, 0, FALSE);
LowerAttackStageTarget(pokemon, pokemon, gUnknown_8106A50[0], 2, 0, FALSE);
}
}
return flag;
@ -541,7 +538,7 @@ bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C, TRUE);
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C[0], TRUE);
return TRUE;
}
@ -562,7 +559,7 @@ bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50[0], 1);
return TRUE;
}
@ -681,7 +678,7 @@ bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
flag = TRUE;
if(sub_805727C(pokemon, target, gMuddyWaterAccLowerChance))
{
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C, FALSE);
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C[0], FALSE);
}
}
return flag;
@ -741,7 +738,7 @@ bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50);
RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50[0]);
return TRUE;
}
@ -793,7 +790,7 @@ bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param
bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 2);
return TRUE;
}
@ -856,8 +853,8 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
TryDisplayDungeonLoggableMessage3(target, target, gUnknown_80FEB60);
}
else {
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 1);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50[0], 1);
flag = TRUE;
}
return flag;
@ -865,7 +862,7 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 2);
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C[0], 2);
return TRUE;
}

View File

@ -32,6 +32,7 @@
#include "pokemon.h"
#include "status.h"
#include "move_orb_actions_4.h"
#include "move_orb_actions_1.h"
#include "structs/dungeon_entity.h"
#include "structs/map.h"
#include "dungeon_damage.h"
@ -47,9 +48,6 @@
static void sub_805A7D4(Entity *, Entity *, Item *, DungeonPos *);
extern void sub_806A6E8(Entity *);
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag;
@ -259,7 +257,7 @@ bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
flag = TRUE;
if(sub_805727C(pokemon, target, 0))
{
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C, FALSE);
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C[0], FALSE);
}
}
return flag;
@ -272,13 +270,13 @@ bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2);
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50[0], 2);
return TRUE;
}
bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE);
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 1, 1, TRUE);
return TRUE;
}
@ -335,7 +333,7 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE);
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C[0], 1, 1, TRUE);
return TRUE;
}
@ -443,7 +441,7 @@ bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,pokemon,0) != 0) {
stat = gUnknown_8106A4C;
stat = gUnknown_8106A4C[0];
LowerAttackStageTarget(pokemon,pokemon,stat,1,0,FALSE);
LowerDefenseStageTarget(pokemon,pokemon,stat,1,0,FALSE);
}
@ -674,7 +672,7 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 para
info = GetEntInfo(pokemon);
flag = FALSE;
if (FixedPointToInt(info->belly) > 1) {
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A4C,99);
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A4C[0],99);
info->belly = IntToFixedPoint(1);
flag = TRUE;
}
@ -710,13 +708,13 @@ bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, s32 p
LowerMovementSpeedTarget(pokemon,target,1,FALSE);
break;
case 3:
LowerAttackStageTarget(pokemon,target,gUnknown_8106A4C,1,1,FALSE);
LowerAttackStageTarget(pokemon,target,gUnknown_8106A4C[0],1,1,FALSE);
break;
case 4:
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1,1,FALSE);
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A4C[0],1,1,FALSE);
break;
case 5:
LowerAccuracyStageTarget(pokemon,target,gUnknown_8106A4C,FALSE);
LowerAccuracyStageTarget(pokemon,target,gUnknown_8106A4C[0],FALSE);
break;
case 6:
ConfuseStatusTarget(pokemon,target,FALSE);
@ -750,7 +748,7 @@ bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
s32 stat = gUnknown_8106A4C;
s32 stat = gUnknown_8106A4C[0];
RaiseAttackStageTarget(pokemon, target, stat, 1);
RaiseDefenseStageTarget(pokemon, target, stat, 1);
return TRUE;
@ -764,7 +762,7 @@ bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2, 1, TRUE);
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 2, 1, TRUE);
return TRUE;
}
@ -823,7 +821,7 @@ bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gCrushClawSecondaryChance) != 0) {
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, FALSE);
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C[0], 1, 1, FALSE);
}
}
return flag;
@ -963,7 +961,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 param
bool8 TailGlowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A50, 2);
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A50[0], 2);
return TRUE;
}

View File

@ -2,6 +2,7 @@
#include "globaldata.h"
#include "move_orb_actions_4.h"
#include "move_orb_actions_2.h"
#include "move_orb_actions_1.h"
#include "dungeon_ai.h"
#include "dungeon_move_util.h"
#include "dungeon_message.h"
@ -47,9 +48,6 @@
#include "switcher_orb.h"
#include "trawl_orb.h"
extern u32 gUnknown_8106A50;
extern u32 gUnknown_8106A4C;
bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
ProtectStatusTarget(pokemon, target);
@ -58,7 +56,7 @@ bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4
bool8 DefenseCurlMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
RaiseDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1);
RaiseDefenseStageTarget(pokemon,target,gUnknown_8106A4C[0],1);
return TRUE;
}
@ -76,7 +74,7 @@ bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gMistBallSecondaryChance) != 0) {
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50,1,1,0);
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50[0],1,1,0);
}
}
return flag;
@ -101,7 +99,7 @@ bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 para
bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
u32 stat = gUnknown_8106A50;
u32 stat = gUnknown_8106A50[0];
RaiseAttackStageTarget(pokemon,target,stat,1);
RaiseDefenseStageTarget(pokemon,target,stat,1);
return TRUE;
@ -305,7 +303,7 @@ bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
bool8 DragonDanceMoveAction( Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C[0], 1);
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
return TRUE;
}
@ -334,7 +332,7 @@ bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32
flag = TRUE;
if(sub_805727C(pokemon, target, gLusterPurgeSecondaryChance))
{
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1, 1, 0);
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50[0], 1, 1, 0);
}
}
return flag;

View File

@ -34,9 +34,7 @@
#include "blow_away.h"
#include "explosion.h"
#include "dungeon_mon_spawn.h"
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
#include "move_orb_actions_1.h"
void sub_80421EC(DungeonPos *, u32);
u8 GetFloorType(void);
@ -417,16 +415,16 @@ void HandleMudTrap(Entity *pokemon, Entity *target)
rand = DungeonRandInt(100);
randDef = rand;
if (rand < 25) {
LowerAttackStageTarget(pokemon,target,gUnknown_8106A4C,1,1,1);
LowerAttackStageTarget(pokemon,target,gUnknown_8106A4C[0],1,1,1);
}
else if (rand < 50) {
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50,1,1,1);
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50[0],1,1,1);
}
else if (randDef < 75) {
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1,1,1);
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A4C[0],1,1,1);
}
else {
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A50,1,1,1);
LowerDefenseStageTarget(pokemon,target,gUnknown_8106A50[0],1,1,1);
}
}