consolidate few files

This commit is contained in:
Seth Barberee 2026-01-09 10:20:06 -08:00
parent 2ce8be9c67
commit ed52925052
4 changed files with 37 additions and 18 deletions

View File

@ -9,6 +9,10 @@ bool8 IsThawingMove(struct move *move);
bool8 IsUsableWhileTaunted(struct move *move);
u16 GetMoveRangeId(struct move *move);
s32 GetMoveActualAccuracy(s32 move_id);
s16 GetMoveBasePowerFromId(s32 move_id);
bool32 IsMoveRangeStringUser(struct move *move);
#endif //PMDSKY_MOVES_3_H

View File

@ -56,8 +56,6 @@ Static main
Object src/moves_4.o
Object src/moves.o
Object src/moves_3.o
Object asm/main_02013B70.o
Object src/main_02013C04.o
Object asm/main_02013C30.o
Object src/main_02014CEC.o
Object asm/main_02014D18.o

View File

@ -1,16 +0,0 @@
#include "main_02013C04.h"
#include "move_data.h"
extern struct move_data_table_outer DUNGEON_MOVE_TABLES;
s16 GetMoveBasePowerFromId(s32 move_id)
{
struct move_data *move;
move = &DUNGEON_MOVE_TABLES.moves->moves[move_id];
return move->base_power;
}
bool32 IsMoveRangeStringUser(struct move *move)
{
return DUNGEON_MOVE_TABLES.moves->moves[move->id].range_string_idx == MOVE_RANGE_STRING_USER;
}

View File

@ -18,3 +18,36 @@ u16 GetMoveRangeId(struct move *move)
return DUNGEON_MOVE_TABLES.moves->moves[move->id].range_string_idx;
}
s32 GetMoveActualAccuracy(s32 move_id)
{
struct move_data *move;
u8 max_ginseng_boost;
u8 global_acc;
move = &DUNGEON_MOVE_TABLES.moves->moves[move_id];
max_ginseng_boost = move->max_ginseng_boost;
if (max_ginseng_boost == 0) {
return move->accuracy[ACCURACY_1];
}
if (max_ginseng_boost == 0x63) {
global_acc = move->accuracy[ACCURACY_1];
if (global_acc == 0x7D) {
return move->accuracy[ACCURACY_2];
}
return ((global_acc * move->accuracy[ACCURACY_2]) / 100);
}
return 0;
}
s16 GetMoveBasePowerFromId(s32 move_id)
{
struct move_data *move;
move = &DUNGEON_MOVE_TABLES.moves->moves[move_id];
return move->base_power;
}
bool32 IsMoveRangeStringUser(struct move *move)
{
return DUNGEON_MOVE_TABLES.moves->moves[move->id].range_string_idx == MOVE_RANGE_STRING_USER;
}