monster.md functions batch 3

That should be the rest of the functions that have the simple logic.
This commit is contained in:
Chesyon
2025-08-12 21:22:01 -06:00
parent 91fc06a840
commit f686cb3aba
6 changed files with 110 additions and 167 deletions

View File

@@ -50,3 +50,43 @@ bool8 CanThrowItems(s16 monster_id)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].flags & 0b00100000 ? TRUE : FALSE;
}
bool8 CanEvolve(s16 monster_id)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].flags & 0b01000000 ? TRUE : FALSE;
}
s16 GetMonsterPreEvolution(s16 monster_id)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].pre_evolution_idx;
}
u8 GetBaseOffensiveStat(s16 monster_id, u8 stat_idx)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].base_atk[stat_idx];
}
u8 GetBaseDefensiveStat(s16 monster_id, u8 stat_idx)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].base_def[stat_idx];
}
u8 GetType(s16 monster_id, u8 type_idx)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].types[type_idx];
}
u8 GetAbility(s16 monster_id, u8 ability_idx)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].abilities[ability_idx];
}
s16 GetRecruitRate2(s16 monster_id)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].recruit_rate_2;
}
s16 GetRecruitRate1(s16 monster_id)
{
return MONSTER_DATA_TABLE_PTR->entries[monster_id].recruit_rate_1;
}