Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Clubba_Multi.inc.c
Go to the documentation of this file.
1#include "Clubba.h"
2
3EvtScript N(EVS_NpcDefeat_Clubba) = {
15 Return
16 End
17};
18
19AnimID N(ExtraAnims_Clubba)[] = {
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_Clubba_Hitbox)[] = {
33 ANIM_WorldClubba_Anim00,
35};
36
37#ifdef INCLUDE_CLUBBA_WANDER
39
40MobileAISettings N(AISettings_Clubba_Wander) = {
41 .moveSpeed = 1.5f,
42 .moveTime = 120,
43 .waitTime = 30,
44 .alertRadius = 85.0f,
45 .alertOffsetDist = 65.0f,
46 .playerSearchInterval = 5,
47 .chaseSpeed = 3.5f,
48 .chaseTurnRate = 90,
49 .chaseUpdateInterval = 12,
50 .chaseRadius = 110.0f,
51 .chaseOffsetDist = 90.0f,
52 .unk_AI_2C = 3,
53};
54
55EvtScript N(EVS_NpcAI_Clubba_Wander) = {
56 Call(SetSelfVar, 0, 0)
57 Call(SetSelfVar, 1, 5)
58 Call(SetSelfVar, 2, 8)
59 Call(SetSelfVar, 3, 12)
60 Call(N(WanderMeleeAI_Main), Ref(N(AISettings_Clubba_Wander)))
61 Return
62 End
63};
64
65NpcSettings N(NpcSettings_Clubba_Wander) = {
66 .height = 36,
67 .radius = 34,
68 .level = ACTOR_LEVEL_CLUBBA,
69 .ai = &N(EVS_NpcAI_Clubba_Wander),
70 .onHit = &EnemyNpcHit,
71 .onDefeat = &EnemyNpcDefeat,
72};
73
74#endif
75
76#ifdef INCLUDE_CLUBBA_PATROL
79
80MobileAISettings N(AISettings_Clubba_Patrol) = {
81 .moveSpeed = 1.5f,
82 .moveTime = 20,
83 .waitTime = 30,
84 .alertRadius = 85.0f,
85 .alertOffsetDist = 65.0f,
86 .playerSearchInterval = 5,
87 .chaseSpeed = 3.5f,
88 .chaseTurnRate = 90,
89 .chaseUpdateInterval = 12,
90 .chaseRadius = 110.0f,
91 .chaseOffsetDist = 90.0f,
92 .unk_AI_2C = 3,
93};
94
95EvtScript N(EVS_NpcAI_Clubba_Patrol) = {
96 Call(SetSelfVar, 0, 0)
97 Call(SetSelfVar, 1, 5)
98 Call(SetSelfVar, 2, 8)
99 Call(SetSelfVar, 3, 12)
100 Call(N(ClubbaPatrolAI_Main), Ref(N(AISettings_Clubba_Patrol)))
101 Return
102 End
103};
104
105NpcSettings N(NpcSettings_Clubba_Patrol) = {
106 .height = 36,
107 .radius = 34,
108 .level = ACTOR_LEVEL_CLUBBA,
109 .ai = &N(EVS_NpcAI_Clubba_Patrol),
110 .onHit = &EnemyNpcHit,
111 .onDefeat = &EnemyNpcDefeat,
112};
113
114#endif
115
116#ifdef INCLUDE_CLUBBA_NAPPING
119
120MobileAISettings N(AISettings_Clubba_Napping) = {
121 .moveSpeed = 1.0f,
122 .moveTime = 120,
123 .waitTime = 30,
124 .alertRadius = 100.0f,
125 .alertOffsetDist = 40.0f,
126 .playerSearchInterval = 10,
127 .chaseSpeed = 3.5f,
128 .chaseTurnRate = 90,
129 .chaseUpdateInterval = 15,
130 .chaseRadius = 200.0f,
131 .chaseOffsetDist = 160.0f,
132 .unk_AI_2C = 1,
133};
134
135EvtScript N(EVS_NpcAI_Clubba_Napping) = {
136 Call(SetSelfVar, 0, 0)
137 Call(SetSelfVar, 1, 10)
138 Call(SetSelfVar, 2, 14)
139 Call(SetSelfVar, 3, 18)
140 Call(N(ClubbaNappingAI_Main), Ref(N(AISettings_Clubba_Napping)))
141 Return
142 End
143};
144
145NpcSettings N(NpcSettings_Clubba_Napping) = {
146 .height = 36,
147 .radius = 34,
148 .level = ACTOR_LEVEL_CLUBBA,
149 .ai = &N(EVS_NpcAI_Clubba_Napping),
150 .onHit = &EnemyNpcHit,
151 .onDefeat = &EnemyNpcDefeat,
152};
153
154#endif
155
157
158EvtScript N(EVS_NpcAI_Clubba_Hitbox) = {
160 Call(SetSelfVar, 0, 4)
161 Call(SetSelfVar, 1, 32)
162 Call(SetSelfVar, 2, 50)
163 Call(SetSelfVar, 3, 32)
164 Call(SetSelfVar, 4, 3)
166 Call(N(MeleeHitbox_Main))
167 Return
168 End
169};
170
171NpcSettings N(NpcSettings_Clubba_Hitbox) = {
172 .height = 14,
173 .radius = 18,
174 .level = ACTOR_LEVEL_CLUBBA,
175 .ai = &N(EVS_NpcAI_Clubba_Hitbox),
176 .onDefeat = &N(EVS_NpcDefeat_Clubba),
177 .actionFlags = AI_ACTION_08,
178};
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