Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
FrostClubba_Multi.inc.c
Go to the documentation of this file.
1#include "FrostClubba.h"
2
3EvtScript N(EVS_NpcDefeat_FrostClubba) = {
15 Return
16 End
17};
18
19AnimID N(ExtraAnims_FrostClubba)[] = {
20 ANIM_WorldClubba_Anim00,
21 ANIM_WorldClubba_Anim02,
22 ANIM_WorldClubba_Anim03,
23 ANIM_WorldClubba_Anim04,
24 ANIM_WorldClubba_Anim0C,
25 ANIM_WorldClubba_Anim07,
26 ANIM_WorldClubba_Anim08,
27 ANIM_WorldClubba_Anim11,
28 ANIM_WorldClubba_Anim12,
30};
31
32AnimID N(ExtraAnims_FrostClubba_Hitbox)[] = {
33 ANIM_WorldClubba_Anim00,
35};
36
37#ifdef INCLUDE_FROST_CLUBBA_WANDER
39
40MobileAISettings N(AISettings_FrostClubba_Wander) = {
41 .moveSpeed = 1.5f,
42 .moveTime = 120,
43 .waitTime = 30,
44 .alertRadius = 100.0f,
45 .alertOffsetDist = 40.0f,
46 .playerSearchInterval = 7,
47 .chaseSpeed = 3.8f,
48 .chaseTurnRate = 90,
49 .chaseUpdateInterval = 15,
50 .chaseRadius = 200.0f,
51 .chaseOffsetDist = 160.0f,
52 .unk_AI_2C = 1,
53};
54
55EvtScript N(EVS_NpcAI_FrostClubba_Wander) = {
56 Call(SetSelfVar, 0, 0)
57 Call(SetSelfVar, 1, 3)
58 Call(SetSelfVar, 2, 7)
59 Call(SetSelfVar, 3, 6)
60 Call(N(WanderMeleeAI_Main), Ref(N(AISettings_FrostClubba_Wander)))
61 Return
62 End
63};
64
65NpcSettings N(NpcSettings_FrostClubba_Wander) = {
66 .height = 36,
67 .radius = 34,
68 .level = ACTOR_LEVEL_WHITE_CLUBBA,
69 .ai = &N(EVS_NpcAI_FrostClubba_Wander),
70 .onHit = &EnemyNpcHit,
71 .onDefeat = &EnemyNpcDefeat,
72};
73
74#endif
75
76#ifdef INCLUDE_FROST_CLUBBA_PATROL
79
80MobileAISettings N(AISettings_FrostClubba_Patrol) = {
81 .moveSpeed = 2.0f,
82 .alertRadius = 100.0f,
83 .alertOffsetDist = 40.0f,
84 .playerSearchInterval = 7,
85 .chaseSpeed = 3.8f,
86 .chaseTurnRate = 60,
87 .chaseUpdateInterval = 10,
88 .chaseRadius = 110.0f,
89 .chaseOffsetDist = 50.0f,
90 .unk_AI_2C = 1,
91};
92
93EvtScript N(EVS_NpcAI_FrostClubba_Patrol) = {
94 Call(SetSelfVar, 0, 0)
95 Call(SetSelfVar, 1, 3)
96 Call(SetSelfVar, 2, 7)
97 Call(SetSelfVar, 3, 6)
98 Call(N(ClubbaPatrolAI_Main), Ref(N(AISettings_FrostClubba_Patrol)))
99 Return
100 End
101};
102
103NpcSettings N(NpcSettings_FrostClubba_Patrol) = {
104 .height = 36,
105 .radius = 34,
106 .level = ACTOR_LEVEL_WHITE_CLUBBA,
107 .ai = &N(EVS_NpcAI_FrostClubba_Patrol),
108 .onHit = &EnemyNpcHit,
109 .onDefeat = &EnemyNpcDefeat,
110};
111
112#endif
113
114#ifdef INCLUDE_FROST_CLUBBA_NAPPING
117
118MobileAISettings N(AISettings_FrostClubba_Napping) = {
119 .moveSpeed = 1.0f,
120 .moveTime = 120,
121 .waitTime = 30,
122 .alertRadius = 100.0f,
123 .alertOffsetDist = 40.0f,
124 .playerSearchInterval = 10,
125 .chaseSpeed = 3.5f,
126 .chaseTurnRate = 90,
127 .chaseUpdateInterval = 15,
128 .chaseRadius = 200.0f,
129 .chaseOffsetDist = 160.0f,
130 .unk_AI_2C = 1,
131};
132
133EvtScript N(EVS_NpcAI_FrostClubba_Napping) = {
134 Call(SetSelfVar, 0, 0)
135 Call(SetSelfVar, 1, 10)
136 Call(SetSelfVar, 2, 14)
137 Call(SetSelfVar, 3, 18)
138 Call(N(ClubbaNappingAI_Main), Ref(N(AISettings_FrostClubba_Napping)))
139 Return
140 End
141};
142
143NpcSettings N(NpcSettings_FrostClubba_Napping) = {
144 .height = 36,
145 .radius = 34,
146 .level = ACTOR_LEVEL_WHITE_CLUBBA,
147 .ai = &N(EVS_NpcAI_FrostClubba_Napping),
148 .onHit = &EnemyNpcHit,
149 .onDefeat = &EnemyNpcDefeat,
150};
151
152#endif
153
155
156EvtScript N(EVS_NpcAI_FrostClubba_Hitbox) = {
158 Call(SetSelfVar, 0, 4)
159 Call(SetSelfVar, 1, 32)
160 Call(SetSelfVar, 2, 48)
161 Call(SetSelfVar, 3, 30)
162 Call(SetSelfVar, 4, 3)
164 Call(N(MeleeHitbox_Main))
165 Return
166 End
167};
168
169NpcSettings N(NpcSettings_FrostClubba_Hitbox) = {
170 .height = 14,
171 .radius = 16,
172 .level = ACTOR_LEVEL_WHITE_CLUBBA,
173 .ai = &N(EVS_NpcAI_FrostClubba_Hitbox),
174 .onDefeat = &N(EVS_NpcDefeat_FrostClubba),
175 .actionFlags = AI_ACTION_08,
176};
Bytecode EvtScript[]
u32 AnimID
@ ENEMY_FLAG_FLED
Definition enums.h:4525
@ NPC_SELF
Definition enums.h:2526
@ SOUND_CLUBBA_SWING
Definition enums.h:1484
@ OUTCOME_ENEMY_FLED
Definition enums.h:1905
@ OUTCOME_PLAYER_WON
Definition enums.h:1902
@ OUTCOME_PLAYER_FLED
Definition enums.h:1904
@ AI_ACTION_08
Definition enums.h:4615
s16 height
Definition npc.h:145
ApiStatus EnableNpcShadow(Evt *script, b32 isInitialCall)
EvtScript EnemyNpcDefeat
Definition encounter.c:158
ApiStatus SetEnemyFlagBits(Evt *script, b32 isInitialCall)
EvtScript EnemyNpcHit
Definition encounter.c:131
ApiStatus RemoveNpc(Evt *script, b32 isInitialCall)
ApiStatus SetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus OnPlayerFled(Evt *script, b32 isInitialCall)
ApiStatus SetSelfVar(Evt *script, b32 isInitialCall)
ApiStatus GetBattleOutcome(Evt *script, b32 isInitialCall)
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define NPC_DISPOSE_LOCATION
Definition macros.h:158
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217
#define ANIM_LIST_END
Terminates an extraAnimationList.
Definition types.h:22