Label some move usage functions

This commit is contained in:
AnonymousRandomPerson
2026-09-07 13:50:23 -04:00
parent bf0092d0e3
commit 6283f7c0c2
10 changed files with 12 additions and 12 deletions

View File

@@ -19,6 +19,6 @@ void HandleTalkFieldAction(Entity *entity);
void sub_806752C(ActionContainer *a0);
void sub_8067768(ActionContainer *a0);
void HandleUseMovePlayerAction(Entity *entity);
void sub_8067904(Entity *entity, u16 moveId);
void UseTemporaryMove(Entity *entity, u16 moveId);
#endif // GUARD_DUNGEON_ACTION_HANDLER_H

View File

@@ -70,7 +70,7 @@ extern const s16 gShadowTagActivateChance;
extern const s16 gMagnetPullActivateChance;
extern const s16 gStaticActivateChance;
extern const s16 gPoisonPointActivateChance;
extern const s16 gEffectSproreActivateChance;
extern const s16 gEffectSporeActivateChance;
extern const s16 gFlameBodyActivateChance;
extern const s16 gCuteCharmActivateChance;
extern const s16 gStenchActivateChance;

View File

@@ -4,7 +4,7 @@
#include "structs/str_moves.h"
#include "structs/dungeon_entity.h"
bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s32 arg_0);
bool32 TryUseMoveInMoveset(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s32 arg_0);
void TriggerTargetAbilityEffect(Entity *attacker);
bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, bool32 isLinkedMove, struct Move *move);
bool8 sub_8056468(Entity *entity, Move *move, const u8 *str, Entity **unkArray, bool32 itemId, bool8 arg_4, bool32 unused);

View File

@@ -237,10 +237,10 @@ bool8 ExecuteEntityDungeonAction_Async(Entity *entity)
HandleUseMovePlayerAction(entity);
break;
case ACTION_STRUGGLE:
sub_8067904(entity, MOVE_STRUGGLE);
UseTemporaryMove(entity, MOVE_STRUGGLE);
break;
case ACTION_REGULAR_ATTACK:
sub_8067904(entity, MOVE_REGULAR_ATTACK);
UseTemporaryMove(entity, MOVE_REGULAR_ATTACK);
break;
case ACTION_STEPPED_ON_TRAP:
TryTriggerTrap(entity,&entity->pos,0,0);

View File

@@ -745,7 +745,7 @@ void HandleUseMovePlayerAction(Entity *entity)
while (i < sub_8070828(entity, TRUE)) {
EntityInfo *info = GetEntInfo(entity);
sub_8055A00(entity, info->action.actionParameters[1].actionUseIndex, 1, 0, 0);
TryUseMoveInMoveset(entity, info->action.actionParameters[1].actionUseIndex, 1, 0, 0);
if (IsFloorOver()) {
break;
}
@@ -764,7 +764,7 @@ void HandleUseMovePlayerAction(Entity *entity)
}
}
void sub_8067904(Entity *entity, u16 moveId)
void UseTemporaryMove(Entity *entity, u16 moveId)
{
Move move;
EntityInfo *info = GetEntInfo(entity);

View File

@@ -884,7 +884,7 @@ void HandleUseMoveAIAction(Entity *target)
if (counter >= sub_8070828(target, TRUE))
break;
entityInfo = GetEntInfo(target);
sub_8055A00(target, entityInfo->action.actionParameters[0].actionUseIndex, 1, 0, 0);
TryUseMoveInMoveset(target, entityInfo->action.actionParameters[0].actionUseIndex, 1, 0, 0);
if (!EntityIsValid(target))
break;
if (IsFloorOver())

View File

@@ -82,7 +82,7 @@ const s16 gShadowTagActivateChance = 12;
const s16 gMagnetPullActivateChance = 12;
const s16 gStaticActivateChance = 12;
const s16 gPoisonPointActivateChance = 12;
const s16 gEffectSproreActivateChance = 12;
const s16 gEffectSporeActivateChance = 12;
const s16 gFlameBodyActivateChance = 12;
const s16 gCuteCharmActivateChance = 12;
const s16 gStenchActivateChance = 12;

View File

@@ -181,7 +181,7 @@ void HandleDealingDamage_Async(Entity *attacker, Entity *target, struct DamageSt
}
if (AbilityIsActive(target, ABILITY_EFFECT_SPORE)
&& isPhysical
&& DungeonRandInt(100) < gEffectSproreActivateChance)
&& DungeonRandInt(100) < gEffectSporeActivateChance)
{
s32 rnd = DungeonRandInt(3);
if (rnd < 1)

View File

@@ -781,7 +781,7 @@ static void InitEntityFromSpawnInfo(bool8 a0, Entity *entity, struct MonSpawnInf
entInfo->mobileTurnTimer = 0;
entInfo->attacking = FALSE;
entInfo->unk149 = FALSE;
entInfo->abilityEffectFlags = FALSE;
entInfo->abilityEffectFlags = 0;
entInfo->terrifiedTurns = 0;
entInfo->useHeldItem = 0;
entInfo->unk14B = 0;

View File

@@ -49,7 +49,7 @@ static EWRAM_INIT Entity *gUnknown_203B438 = NULL;
static u8 ToItemID(u32 itemID);
bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s32 arg_0)
bool32 TryUseMoveInMoveset(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s32 arg_0)
{
s32 i, j;
s32 moveId;