mirror of
https://github.com/pret/pmd-sky.git
synced 2026-08-05 10:46:00 -05:00
59 lines
1.8 KiB
C
59 lines
1.8 KiB
C
#include "inflict_status.h"
|
|
#include "dg_random.h"
|
|
#include "dungeon_parameters_1.h"
|
|
#include "dungeon_util_static.h"
|
|
#include "exclusive_item.h"
|
|
#include "move_effects.h"
|
|
#include "overlay_29_02318E4C.h"
|
|
|
|
u8 MirrorMoveIsActive(struct entity *entity)
|
|
{
|
|
if (EntityIsValid__02318E4C(entity))
|
|
{
|
|
if (GetEntInfo(entity)->reflect_class_status.reflect == STATUS_REFLECT_MIRROR_MOVE)
|
|
return EFFECT_ACTIVE_FROM_STATUS;
|
|
|
|
if (ExclusiveItemEffectIsActive__023197A8(entity, EXCLUSIVE_EFF_MAY_BOUNCE_MOVES) && DungeonRandOutcome__022EAB20(CHATOT_SCARF_BOUNCE_CHANCE))
|
|
return EFFECT_ACTIVE_FROM_EXCLUSIVE_ITEM;
|
|
}
|
|
|
|
return EFFECT_INACTIVE;
|
|
}
|
|
|
|
bool8 ExclusiveItemEffectIsActive__023197A8(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
|
{
|
|
struct monster *monster = GetEntInfo(entity);
|
|
if (!monster->is_not_team_member)
|
|
return ExclusiveItemEffectFlagTest(monster->exclusive_item_effect_flags, effect_id);
|
|
|
|
return FALSE;
|
|
}
|
|
|
|
u8 MistIsActive(struct entity *entity)
|
|
{
|
|
if (EntityIsValid__02318E4C(entity))
|
|
{
|
|
if (GetEntInfo(entity)->reflect_class_status.reflect == STATUS_REFLECT_MIST)
|
|
return EFFECT_ACTIVE_FROM_STATUS;
|
|
|
|
if (ExclusiveItemEffectIsActive__023197A8(entity, EXCLUSIVE_EFF_NO_STAT_DROPS))
|
|
return EFFECT_ACTIVE_FROM_EXCLUSIVE_ITEM;
|
|
}
|
|
|
|
return EFFECT_INACTIVE;
|
|
}
|
|
|
|
u8 Conversion2IsActive(struct entity *entity)
|
|
{
|
|
if (EntityIsValid__02318E4C(entity))
|
|
{
|
|
if (GetEntInfo(entity)->reflect_class_status.reflect == STATUS_REFLECT_CONVERSION2)
|
|
return EFFECT_ACTIVE_FROM_STATUS;
|
|
|
|
if (ExclusiveItemEffectIsActive__023197A8(entity, EXCLUSIVE_EFF_CONVERSION_2_WHEN_HIT))
|
|
return EFFECT_ACTIVE_FROM_EXCLUSIVE_ITEM;
|
|
}
|
|
|
|
return EFFECT_INACTIVE;
|
|
}
|