mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-25 07:28:17 -05:00
Created header for pokemon_3
This commit is contained in:
parent
d40d2e55a3
commit
ea10f7b7bd
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef GUARD_DUNGEON_ENTITY_H
|
||||
#define GUARD_DUNGEON_ENTITY_H
|
||||
|
||||
#include "constants/global.h"
|
||||
#include "constants/move.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "position.h"
|
||||
|
||||
|
|
|
|||
6
include/pokemon_3.h
Normal file
6
include/pokemon_3.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef GUARD_POKEMON_3_H
|
||||
#define GUARD_POKEMON_3_H
|
||||
|
||||
bool8 IsIQSkillSet(u8 *IQSkillsEnabled, u32 IQSkill);
|
||||
|
||||
#endif
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "constants/status.h"
|
||||
#include "constants/targeting.h"
|
||||
#include "dungeon_pokemon_attributes_1.h"
|
||||
|
||||
extern bool8 CanSeeInvisible(struct DungeonEntity*);
|
||||
extern bool8 gTargetingData[3][2][2][2];
|
||||
|
||||
u8 CanTarget(struct DungeonEntity *pokemon, struct DungeonEntity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "constants/move_id.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/tactic.h"
|
||||
#include "pokemon_3.h"
|
||||
|
||||
extern s16 gItemMasterMinWildLevel;
|
||||
|
||||
|
|
@ -26,9 +27,9 @@ extern s32 GetMovePower(struct PokemonMove *move);
|
|||
bool8 CanSeeInvisible(struct DungeonEntity *pokemon)
|
||||
{
|
||||
struct DungeonEntityData *pokemonData = pokemon->entityData;
|
||||
if(pokemonData->eyesightStatus != EYESIGHT_STATUS_EYEDROPS)
|
||||
if (pokemonData->eyesightStatus != EYESIGHT_STATUS_EYEDROPS)
|
||||
{
|
||||
if(!HasItem(pokemon, ITEM_ID_GOGGLE_SPECS))
|
||||
if (!HasItem(pokemon, ITEM_ID_GOGGLE_SPECS))
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
|
|
@ -63,7 +64,7 @@ void LoadIQSkills(struct DungeonEntity *pokemon)
|
|||
u8 *iVar2;
|
||||
s32 IQSkill;
|
||||
struct DungeonEntityData *pokemonData;
|
||||
|
||||
|
||||
pokemonData = pokemon->entityData;
|
||||
if (pokemonData->isEnemy) {
|
||||
iVar2 = pokemonData->IQSkillsEnabled;
|
||||
|
|
@ -82,8 +83,8 @@ void LoadIQSkills(struct DungeonEntity *pokemon)
|
|||
pokemonData->IQSkillsEnabled[2] = 0;
|
||||
for(IQSkill = IQ_SKILL_TYPE_ADVANTAGE_MASTER; IQSkill < NUM_IQ_SKILLS; IQSkill++)
|
||||
{
|
||||
if (HasIQForSkill(pokemonData->IQ,IQSkill) &&
|
||||
IsIQSkillSet(pokemonData->IQSkillsSelected, 1 << IQSkill))
|
||||
if (HasIQForSkill(pokemonData->IQ,IQSkill) &&
|
||||
IsIQSkillSet(pokemonData->IQSkillsSelected, 1 << IQSkill))
|
||||
{
|
||||
SetIQSkill(pokemonData->IQSkillsEnabled,IQSkill);
|
||||
}
|
||||
|
|
@ -95,7 +96,7 @@ bool8 CanSeeTeammate(struct DungeonEntity * pokemon)
|
|||
{
|
||||
struct DungeonEntity *teamMember;
|
||||
s32 memberIdx;
|
||||
|
||||
|
||||
if (pokemon->entityData->isEnemy) {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -132,13 +133,13 @@ s32 CalculateMovePower(struct DungeonEntity *pokemon, struct PokemonMove *pokeMo
|
|||
bool8 ToolboxEnabled(struct DungeonEntityData *pokemon)
|
||||
{
|
||||
if(!IsToolboxEnabled(pokemon->entityID))
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static inline bool8 sub_8071A8C_sub(struct DungeonEntityData *pokemonData)
|
||||
{
|
||||
if(pokemonData->joinLocation == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON ||
|
||||
if(pokemonData->joinLocation == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON ||
|
||||
pokemonData->joinLocation == DUNGEON_RESCUE_TEAM_BASE)
|
||||
return TRUE;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "pokemon_3.h"
|
||||
|
||||
#include "pokemon.h"
|
||||
#include "random.h"
|
||||
#include "constants/iq_skill.h"
|
||||
|
|
@ -45,7 +47,6 @@ extern s16 gUnknown_810AC66; // 0x8
|
|||
// 2, 4, 6, 7, 8, 9, 0xA, 0xD, 0xF, 0x11
|
||||
extern s32 gUnknown_810AC90[10];
|
||||
|
||||
extern bool8 IsIQSkillSet(u8 *, u32);
|
||||
extern void SetIQSkill(u8 *, u32);
|
||||
extern void AddSprite(u16 *, u32, u32, u32);
|
||||
|
||||
|
|
@ -613,22 +614,22 @@ void SetDefaultIQSkills(u8 *param_1, bool8 enableSelfCurer)
|
|||
SetIQSkill(param_1, IQ_SKILL_COURSE_CHECKER);
|
||||
SetIQSkill(param_1, IQ_SKILL_ITEM_MASTER);
|
||||
|
||||
// Flag is usually enabled for Boss fights..
|
||||
// Flag is usually enabled for Boss fights.
|
||||
if (enableSelfCurer) {
|
||||
SetIQSkill(param_1, IQ_SKILL_SELF_CURER);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 IsIQSkillSet(u8 *param_1, u32 param_2)
|
||||
bool8 IsIQSkillSet(u8 *IQSkillsEnabled, u32 IQSkill)
|
||||
{
|
||||
|
||||
if ((((param_1[0] & param_2) == 0) &&
|
||||
((param_1[1] & param_2 >> 8) == 0)) &&
|
||||
((param_1[2] & param_2 >> 0x10) == 0))
|
||||
if (!(IQSkillsEnabled[0] & IQSkill) &&
|
||||
!(IQSkillsEnabled[1] & IQSkill >> 8) &&
|
||||
!(IQSkillsEnabled[2] & IQSkill >> 16))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user