Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npc-enemy-flags #1212

Merged
merged 11 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ typedef struct Npc {
/* 0x01C */ f32 jumpVel;
/* 0x020 */ union {
void* any;
NpcMotionBlur* motion; ///< Null unless flag 0x100000 is set.
NpcMotionBlur* motion; ///< Null unless flag NPC_FLAG_MOTION_BLUR is set.
NpcChompBlur* chomp;
NpcQuizmoBlur* quizmo;
NpcFollowData* followData;
Expand Down
154 changes: 65 additions & 89 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ enum EncounterOutcomes {
OUTCOME_PLAYER_LOST = 1,
OUTCOME_PLAYER_FLED = 2,
OUTCOME_ENEMY_FLED = 3,
OUTCOME_4 = 4,
OUTCOME_SKIP = 4,
};

enum MerleeSpellType {
Expand Down Expand Up @@ -2992,11 +2992,11 @@ enum NpcPalSwapState {
NPC_PALSWAP_HOLDING_A = 0,
NPC_PALSWAP_FROM_A_TO_B = 1,
NPC_PALSWAP_HOLDING_B = 2,
NPC_PALSWAP_FROM_B_TO_A = 3
NPC_PALSWAP_FROM_B_TO_A = 3,
};

enum NpcFlags {
NPC_FLAG_ENABLED = 0x00000001, // Does nothing aside from making npc->flags !=
NPC_FLAG_ENABLED = 0x00000001, // Does nothing aside from making npc->flags != 0
NPC_FLAG_INVISIBLE = 0x00000002, // NPC will not be drawn or cause surface effects while moving
NPC_FLAG_INACTIVE = 0x00000004, // NPC will not render, move, or have collisions with other NPCs. They may still be interacted with.
NPC_FLAG_FLYING = 0x00000008,
Expand All @@ -3017,15 +3017,15 @@ enum NpcFlags {
NPC_FLAG_IGNORE_CAMERA_FOR_YAW = 0x00040000, // Do not adjust renderYaw to face the camera
NPC_FLAG_REFLECT_FLOOR = 0x00080000, // Mirror rendering across y=0
NPC_FLAG_MOTION_BLUR = 0x00100000, // Gives motion blur effect as NPC moves. Set by enable_npc_blur
NPC_FLAG_200000 = 0x00200000,
NPC_FLAG_FLIP_INSTANTLY = 0x00200000, // Flip instantly when changing facing direction
NPC_FLAG_TOUCHES_GROUND = 0x00400000, // Can cause effects to play when touching special surface types
NPC_FLAG_HIDING = 0x00800000,
NPC_FLAG_HAS_NO_SPRITE = 0x01000000,
NPC_FLAG_COLLIDING_WITH_NPC = 0x02000000,
NPC_FLAG_PARTNER = 0x04000000,
NPC_FLAG_WORLD_COLLISION_DIRTY = 0x08000000,
NPC_FLAG_10000000 = 0x10000000,
NPC_FLAG_20000000 = 0x20000000,
NPC_FLAG_USE_INSPECT_ICON = 0x10000000, // Approaching this NPC will cause a red ! to appear.
NPC_FLAG_RAYCAST_TO_INTERACT = 0x20000000, // Intended to require a line of sight raycast before conversations can be triggered. Seems bugged.
NPC_FLAG_NO_ANIMS_LOADED = 0x40000000, // Npc has no animations loaded
NPC_FLAG_SUSPENDED = 0x80000000,
};
Expand Down Expand Up @@ -3455,7 +3455,7 @@ enum AnyEnemyAnims {
ENEMY_ANIM_F = 0x210,
};

enum FirstStrikes {
enum FirstStrikeType {
FIRST_STRIKE_NONE = 0,
FIRST_STRIKE_PLAYER = 1,
FIRST_STRIKE_ENEMY = 2,
Expand Down Expand Up @@ -4520,8 +4520,8 @@ enum MapRoomNotifications {

enum EnemyFlags {
ENEMY_FLAG_PASSIVE = 0x00000001, // Not hostile; collision does not trigger battle
ENEMY_FLAG_2 = 0x00000002, // Unused
ENEMY_FLAG_4 = 0x00000004,
ENEMY_FLAG_UNUSED_2 = 0x00000002, // Unused
ENEMY_FLAG_DO_NOT_KILL = 0x00000004, // Enemy will not be killed after being defeated in battle
ENEMY_FLAG_ENABLE_HIT_SCRIPT = 0x00000008,
ENEMY_FLAG_FLED = 0x00000010,
ENEMY_FLAG_DISABLE_AI = 0x00000020, // Disable movement AI and collision (idle animation plays)
Expand All @@ -4534,14 +4534,14 @@ enum EnemyFlags {
ENEMY_FLAG_GRAVITY = 0x00001000,
ENEMY_FLAG_NO_SHADOW_RAYCAST = 0x00002000,
ENEMY_FLAG_HAS_NO_SPRITE = 0x00004000,
ENEMY_FLAG_8000 = 0x00008000, // Corresponds with NPC_FLAG_10000000
ENEMY_FLAG_10000 = 0x00010000, // Corresponds with NPC_FLAG_20000000
ENEMY_FLAG_USE_INSPECT_ICON = 0x00008000, // Corresponds with NPC_FLAG_USE_INSPECT_ICON
ENEMY_FLAG_RAYCAST_TO_INTERACT = 0x00010000, // Intended to require a line of sight raycast before conversations can be triggered. Seems bugged. Corresponds with NPC_FLAG_RAYCAST_TO_INTERACT
ENEMY_FLAG_USE_PLAYER_SPRITE = 0x00020000, // Used for Peach NPCs
ENEMY_FLAG_40000 = 0x00040000,
ENEMY_FLAG_80000 = 0x00080000,
ENEMY_FLAG_100000 = 0x00100000,
ENEMY_FLAG_NO_DELAY_AFTER_FLEE = 0x00040000,
ENEMY_FLAG_DONT_SUSPEND_SCRIPTS = 0x00080000, // Do not suspend ai/aux scripts when aiSuspendTime != 0
ENEMY_FLAG_SKIP_BATTLE = 0x00100000,
ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN = 0x00200000,
ENEMY_FLAG_400000 = 0x00400000,
ENEMY_FLAG_DO_NOT_AUTO_FACE_PLAYER = 0x00400000,
ENEMY_FLAG_NO_DROPS = 0x00800000, // Do not drop hearts, flowers, or coins on defeat
ENEMY_FLAG_IGNORE_TOUCH = 0x01000000,
ENEMY_FLAG_IGNORE_JUMP = 0x02000000,
Expand All @@ -4553,12 +4553,17 @@ enum EnemyFlags {
ENEMY_FLAG_SUSPENDED = 0x80000000,
};

#define COMMON_PASSIVE_FLAGS \
ENEMY_FLAG_PASSIVE \
| ENEMY_FLAG_ENABLE_HIT_SCRIPT \
#define BASE_PASSIVE_FLAGS \
( ENEMY_FLAG_PASSIVE \
| ENEMY_FLAG_IGNORE_WORLD_COLLISION \
| ENEMY_FLAG_IGNORE_ENTITY_COLLISION \
| ENEMY_FLAG_FLYING
| ENEMY_FLAG_FLYING \
)

#define COMMON_PASSIVE_FLAGS \
( BASE_PASSIVE_FLAGS \
| ENEMY_FLAG_ENABLE_HIT_SCRIPT \
)

// used with enemy->aiFlags
enum EnemyAIFlags {
Expand Down Expand Up @@ -4708,7 +4713,7 @@ enum PlayerCollisionTests {
PLAYER_COLLISION_0 = 0,
PLAYER_COLLISION_1 = 1,
PLAYER_COLLISION_2 = 2,
PLAYER_COLLISION_3 = 3,
PLAYER_COLLISION_HAMMER = 3,
PLAYER_COLLISION_4 = 4,
};

Expand Down Expand Up @@ -4978,50 +4983,21 @@ enum {
SHOP_BUY_RESULT_NOT_ENOUGH_ROOM = 5,
};

enum EncounterStatusFlags {
ENCOUNTER_STATUS_FLAG_0 = 0x00000000,
ENCOUNTER_STATUS_FLAG_1 = 0x00000001,
ENCOUNTER_STATUS_FLAG_2 = 0x00000002,
ENCOUNTER_STATUS_FLAG_4 = 0x00000004,
ENCOUNTER_STATUS_FLAG_8 = 0x00000008,
ENCOUNTER_STATUS_FLAG_10 = 0x00000010,
ENCOUNTER_STATUS_FLAG_20 = 0x00000020,
ENCOUNTER_STATUS_FLAG_40 = 0x00000040,
ENCOUNTER_STATUS_FLAG_80 = 0x00000080,
ENCOUNTER_STATUS_FLAG_100 = 0x00000100,
ENCOUNTER_STATUS_FLAG_200 = 0x00000200,
ENCOUNTER_STATUS_FLAG_400 = 0x00000400,
ENCOUNTER_STATUS_FLAG_800 = 0x00000800,
ENCOUNTER_STATUS_FLAG_1000 = 0x00001000,
ENCOUNTER_STATUS_FLAG_2000 = 0x00002000,
ENCOUNTER_STATUS_FLAG_4000 = 0x00004000,
ENCOUNTER_STATUS_FLAG_8000 = 0x00008000,
ENCOUNTER_STATUS_FLAG_10000 = 0x00010000,
ENCOUNTER_STATUS_FLAG_20000 = 0x00020000,
ENCOUNTER_STATUS_FLAG_40000 = 0x00040000,
ENCOUNTER_STATUS_FLAG_80000 = 0x00080000,
ENCOUNTER_STATUS_FLAG_100000 = 0x00100000,
ENCOUNTER_STATUS_FLAG_200000 = 0x00200000,
ENCOUNTER_STATUS_FLAG_400000 = 0x00400000,
ENCOUNTER_STATUS_FLAG_800000 = 0x00800000,
ENCOUNTER_STATUS_FLAG_1000000 = 0x01000000,
ENCOUNTER_STATUS_FLAG_2000000 = 0x02000000,
ENCOUNTER_STATUS_FLAG_4000000 = 0x04000000,
ENCOUNTER_STATUS_FLAG_8000000 = 0x08000000,
ENCOUNTER_STATUS_FLAG_10000000 = 0x10000000,
ENCOUNTER_STATUS_FLAG_20000000 = 0x20000000,
ENCOUNTER_STATUS_FLAG_40000000 = 0x40000000,
ENCOUNTER_STATUS_FLAG_80000000 = 0x80000000,
enum EncounterFlags {
ENCOUNTER_FLAG_NONE = 0x00000000,
ENCOUNTER_FLAG_THUMBS_UP = 0x00000001, ///< Mario will do a 'thumbs up' animation after winning
ENCOUNTER_FLAG_CANT_SKIP_WIN_DELAY = 0x00000002,
ENCOUNTER_FLAG_SKIP_FLEE_DROPS = 0x00000004,
};

enum WindowFlags {
WINDOW_FLAG_INITIALIZED = 0x00000001,
WINDOW_FLAG_FPUPDATE_CHANGED = 0x00000002,
WINDOW_FLAG_HIDDEN = 0x00000004, ///< Updated but not rendered
WINDOW_FLAG_INITIAL_ANIMATION = 0x00000008,
WINDOW_FLAG_HAS_CHILDREN = 0x00000010,
WINDOW_FLAG_DISABLED = 0x00000020, ///< Not updated or rendered
WINDOW_FLAG_40 = 0x00000040,
WINDOW_FLAG_INITIALIZED = 0x00000001,
WINDOW_FLAG_FPUPDATE_CHANGED = 0x00000002,
WINDOW_FLAG_HIDDEN = 0x00000004, ///< Updated but not rendered
WINDOW_FLAG_INITIAL_ANIMATION = 0x00000008,
WINDOW_FLAG_HAS_CHILDREN = 0x00000010,
WINDOW_FLAG_DISABLED = 0x00000020, ///< Not updated or rendered
WINDOW_FLAG_40 = 0x00000040,
};

enum DrawFlags {
Expand Down Expand Up @@ -6319,46 +6295,46 @@ enum EncounterStates {
};

enum EncounterCreateSubStates {
ENCOUNTER_SUBSTATE_CREATE_INIT = 0,
ENCOUNTER_SUBSTATE_CREATE_RUN_INIT_SCRIPT = 1,
ENCOUNTER_SUBSTATE_CREATE_RUN_AI = 2,
ENCOUNTER_SUBSTATE_CREATE_INIT = 0,
ENCOUNTER_SUBSTATE_CREATE_RUN_INIT_SCRIPT = 1,
ENCOUNTER_SUBSTATE_CREATE_RUN_AI = 2,
};

enum EncounterNeutralSubStates {
ENCOUNTER_SUBSTATE_NEUTRAL = 0,
ENCOUNTER_SUBSTATE_NEUTRAL = 0,
};

enum EncounterPreBattleSubStates {
ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT = 0,
ENCOUNTER_SUBSTATE_PRE_BATTLE_LOAD_BATTLE = 1,
ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN = 2,
ENCOUNTER_SUBSTATE_PRE_BATTLE_3 = 3,
ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT = 0,
ENCOUNTER_SUBSTATE_PRE_BATTLE_LOAD = 1,
ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN = 2,
ENCOUNTER_SUBSTATE_PRE_BATTLE_SKIP = 3,
};

enum EncounterConversationSubStates {
ENCOUNTER_SUBSTATE_CONVERSATION_INIT = 0,
ENCOUNTER_SUBSTATE_CONVERSATION_END = 1,
ENCOUNTER_SUBSTATE_CONVERSATION_INIT = 0,
ENCOUNTER_SUBSTATE_CONVERSATION_END = 1,
};

enum EncounterPostBattleSubStates {
ENCOUNTER_SUBSTATE_POST_BATTLE_INIT = 0,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_WAIT = 2,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_KILL = 3,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_TO_NEUTRAL = 4,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_CHECK_MERLEE_BONUS = 10,
ENCOUNTER_SUBSTATE_POST_BATTLE_PLAY_NPC_DEFEAT = 11,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_INIT = 100,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_WAIT = 101,
ENCOUNTER_SUBSTATE_POST_BATTLE_102 = 102,
ENCOUNTER_SUBSTATE_POST_BATTLE_103 = 103,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_INIT = 200,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_WAIT = 201,
ENCOUNTER_SUBSTATE_POST_BATTLE_202 = 202,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_TO_NEUTRAL = 203,
ENCOUNTER_SUBSTATE_POST_BATTLE_300 = 300,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_INIT = 400,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_WAIT = 401,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_TO_NEUTRAL = 402,
ENCOUNTER_SUBSTATE_POST_BATTLE_INIT = 0,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_FADE_IN = 2,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_KILL = 3,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_RESUME = 4,
ENCOUNTER_SUBSTATE_POST_BATTLE_WON_CHECK_MERLEE = 10,
ENCOUNTER_SUBSTATE_POST_BATTLE_PLAY_NPC_DEFEAT = 11,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_INIT = 100,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_FADE_IN = 101,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_RESUME = 102,
ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_DELAY = 103, // delay before battle can be retriggered
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_INIT = 200,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_FADE_IN = 201,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_RESUME = 202,
ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_DELAY = 203,
ENCOUNTER_SUBSTATE_POST_BATTLE_SKIP = 300,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_INIT = 400,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_FADE_IN = 401,
ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_RESUME = 402,
};

enum PlayerSpriteSets {
Expand Down
2 changes: 1 addition & 1 deletion include/evt.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ enum EventGroupFlags {
EVT_GROUP_00 = 0x00,
EVT_GROUP_0A = 0x0A, // 8 | 2
EVT_GROUP_0B = 0x0B, // 8 | 4 | 1
EVT_GROUP_1B = 0x1B, // 10 | 8 | 4 | 1
EVT_GROUP_1B = 0x1B, // EVT_GOUP_EXIT_MAP? 10 | 8 | 4 | 1
z64a marked this conversation as resolved.
Show resolved Hide resolved
EVT_GROUP_EF = 0xEF, // ~10
EVT_GROUP_01 = 0x01,
EVT_GROUP_02 = 0x02,
Expand Down
16 changes: 10 additions & 6 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ void player_input_to_move_vector(f32* angle, f32* magnitude);
void game_input_to_move_vector(f32* x, f32* y);
void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3);
void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2);
f32 func_800E5348(void);

// returns the angle that the player *sprite* is facing in world-space, this is NOT the direction the player character
z64a marked this conversation as resolved.
Show resolved Hide resolved
// is facing, i.e. the direction of motion. think of this as the direction of a hammer impact relative to the center
// of the player.
f32 player_get_side_angle(void);

void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style);

Expand Down Expand Up @@ -137,7 +141,7 @@ void player_handle_floor_collider_type(s32 colliderID);
f32 player_fall_distance(void);
void func_800E4AD8(s32 arg0);
f32 player_check_collision_below(f32, s32* colliderID);
s32 can_trigger_loading_zone(void);
b32 can_trigger_loading_zone(void);
void update_damage_popups(void);
void show_action_rating(s32, Actor*, f32, f32, f32);
s32 render_with_adjusted_palettes(s32, ActorPart*, s32, Matrix4f, s32);
Expand Down Expand Up @@ -197,7 +201,7 @@ s32 get_model_list_index_from_tree_index(s32 treeIndex);
s32 get_transform_group_index(s32);
void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY,
f32* sizeZ);
s32 collision_main_above(void);
HitID collision_main_above(void);
void collision_lava_reset_check_additional_overlaps(void);
s32 player_test_lateral_overlap(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32);
Npc* peach_make_disguise_npc(s32 peachDisguise);
Expand Down Expand Up @@ -419,9 +423,9 @@ PlayerData* get_player_data(void);

b32 npc_raycast_down_around(s32, f32*, f32*, f32*, f32*, f32, f32);
b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth);
s32 npc_raycast_up(s32, f32*, f32*, f32*, f32*);
b32 npc_raycast_up(s32, f32*, f32*, f32*, f32*);
HitID npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius);
s32 player_raycast_up_corners(PlayerStatus*, f32*, f32*, f32*, f32*, f32);
HitID player_raycast_up_corners(PlayerStatus*, f32*, f32*, f32*, f32*, f32);
HitID player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32* outY, f32* outZ, f32* outLength,
f32* hitRx, f32* hitRz, f32* hitDirX, f32* hitDirZ);
b32 npc_test_move_taller_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
Expand Down Expand Up @@ -1075,7 +1079,7 @@ s32 lookup_defense(s32*, s32);
s32 lookup_status_chance(s32*, s32);
void peach_check_for_parasol_input(void);
void peach_sync_disguise_npc(void);
s32 check_conversation_trigger(void);
b32 check_conversation_trigger(void);

void clear_player_status(void);
void clear_entity_models(void);
Expand Down
14 changes: 7 additions & 7 deletions include/npc.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ typedef struct FieldStatus {
} FieldStatus;

typedef struct EncounterStatus {
/* 0x000 */ s32 flags;
/* 0x004 */ s8 firstStrikeType; /* 0 = none, 1 = player, 2 = enemy */
/* 0x005 */ s8 hitType; /* 1 = none/enemy, 2 = jump */
/* 0x006 */ s8 hitTier; /* 0 = normal, 1 = super, 2 = ultra */
/* 0x000 */ s32 flags; // see enum: EncounterFlags
/* 0x004 */ s8 firstStrikeType; // see enum: FirstStrikeType
/* 0x005 */ s8 hitType; // see enum: EncounterTriggers
/* 0x006 */ s8 hitTier; // 0 = normal, 1 = super, 2 = ultra
/* 0x007 */ char unk_07;
/* 0x008 */ s8 unk_08;
/* 0x009 */ s8 battleOutcome; /* 0 = won, 1 = lost */
/* 0x009 */ s8 battleOutcome; // see enum: EncounterOutcomes
/* 0x00A */ s8 battleTriggerCooldown; ///< set to 15 after victory, 45 after fleeing
/* 0x00B */ b8 hasMerleeCoinBonus; /* triple coins when TRUE */
/* 0x00C */ u8 damageTaken; /* valid after battle */
Expand All @@ -394,7 +394,7 @@ typedef struct EncounterStatus {
/* 0x012 */ s8 scriptedBattle; ///< battle started by StartBattle but not by encounter
/* 0x013 */ s8 dropWhackaBump;
/* 0x014 */ s32 songID;
/* 0x018 */ s32 unk_18;
/* 0x018 */ s32 unk_18; // unused, related to songID. perhaps was meant for variation, but not implemented.
/* 0x01C */ s8 numEncounters; /* number of encounters for current map (in list) */
/* 0x01D */ s8 curAreaIndex;
/* 0x01E */ u8 curMapIndex;
Expand All @@ -407,7 +407,7 @@ typedef struct EncounterStatus {
/* 0x088 */ Encounter* curEncounter;
/* 0x08C */ Enemy* curEnemy;
/* 0x090 */ s32 fadeOutAmount;
/* 0x094 */ s32 unk_94;
/* 0x094 */ s32 substateDelay;
/* 0x098 */ s32 fadeOutAccel;
/* 0x09C */ s32 battleStartCountdown;
/* 0x0A0 */ FieldStatus dizzyAttack;
Expand Down
2 changes: 1 addition & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ extern SaveData gCurrentSaveFile;

extern s32 gEncounterSubState;
extern s32 timeFreezeMode;
extern s32 D_8009A678;
extern b32 EncounterStateChanged;

extern u8 IntroMessageIdx;
extern s32 PartnerIDFromMenuIndex[12]; // partner IDs
Expand Down
2 changes: 1 addition & 1 deletion src/23680.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {

amt += currentEncounter->coinsEarned;

if (enemy->flags & (ENEMY_FLAG_NO_DROPS | ENEMY_FLAG_40000)) {
if (enemy->flags & (ENEMY_FLAG_NO_DROPS | ENEMY_FLAG_NO_DELAY_AFTER_FLEE)) {
amt = 0;
}

Expand Down
Loading
Loading