Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
putrid_piranha.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/LargePiranha.h"
4
5#define NAMESPACE A(putrid_piranha)
6
7extern EvtScript N(EVS_Init);
8extern EvtScript N(EVS_Idle);
9extern EvtScript N(EVS_TakeTurn);
10extern EvtScript N(EVS_HandleEvent);
11extern EvtScript N(EVS_Attack_Bite);
12extern EvtScript N(EVS_Attack_BadBreath);
13
14enum N(ActorPartIDs) {
15 PRT_MAIN = 1,
16};
17
18enum N(ActorParams) {
19 DMG_BITE = 3,
20 DMG_BREATH = 2,
21};
22
23s32 N(DefaultAnims)[] = {
24 STATUS_KEY_NORMAL, ANIM_LargePiranha_Putrid_Anim01,
25 STATUS_KEY_STONE, ANIM_LargePiranha_Putrid_Anim00,
26 STATUS_KEY_SLEEP, ANIM_LargePiranha_Putrid_Anim00,
27 STATUS_KEY_POISON, ANIM_LargePiranha_Putrid_Anim01,
28 STATUS_KEY_STOP, ANIM_LargePiranha_Putrid_Anim00,
29 STATUS_KEY_STATIC, ANIM_LargePiranha_Putrid_Anim00,
30 STATUS_KEY_PARALYZE, ANIM_LargePiranha_Putrid_Anim00,
31 STATUS_KEY_PARALYZE, ANIM_LargePiranha_Putrid_Anim00,
32 STATUS_KEY_DIZZY, ANIM_LargePiranha_Putrid_Anim0F,
34};
35
36s32 N(DefenseTable)[] = {
38 ELEMENT_FIRE, 0,
40};
41
42s32 N(StatusTable)[] = {
65};
66
67ActorPartBlueprint N(ActorParts)[] = {
68 {
70 .index = PRT_MAIN,
71 .posOffset = { 0, 0, 0 },
72 .targetOffset = { -15, 50 },
73 .opacity = 255,
74 .idleAnimations = N(DefaultAnims),
75 .defenseTable = N(DefenseTable),
76 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
77 .elementImmunityFlags = 0,
78 .projectileTargetOffset = { 3, -14 },
79 },
80};
81
82ActorBlueprint NAMESPACE = {
83 .flags = 0,
84 .type = ACTOR_TYPE_PUTRID_PIRANHA,
85 .level = ACTOR_LEVEL_PUTRID_PIRANHA,
86 .maxHP = 12,
87 .partCount = ARRAY_COUNT(N(ActorParts)),
88 .partsData = N(ActorParts),
89 .initScript = &N(EVS_Init),
90 .statusTable = N(StatusTable),
91 .escapeChance = 60,
92 .airLiftChance = 20,
93 .hurricaneChance = 20,
94 .spookChance = 30,
95 .upAndAwayChance = 95,
96 .spinSmashReq = 0,
97 .powerBounceChance = 95,
98 .coinReward = 1,
99 .size = { 60, 52 },
100 .healthBarOffset = { 0, 0 },
101 .statusIconOffset = { -22, 32 },
102 .statusTextOffset = { 1, 44 },
103};
104
105EvtScript N(EVS_Init) = {
106 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
107 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
108 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
109 Return
110 End
111};
112
114
115EvtScript N(EVS_Idle) = {
116 Label(0)
117 Call(GetStatusFlags, ACTOR_SELF, LVarA)
119 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33)
120 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11)
121 Call(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31)
122 Else
123 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50)
124 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14)
125 Call(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44)
126 EndIf
127 Wait(1)
128 Goto(0)
129 Return
130 End
131};
132
133EvtScript N(EVS_ReturnHome) = {
134 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03)
135 Call(SetGoalToHome, ACTOR_SELF)
136 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
137 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01)
138 Call(SetActorYaw, ACTOR_SELF, 0)
139 Return
140 End
141};
142
143EvtScript N(EVS_HandleEvent) = {
144 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
145 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
146 Call(GetLastEvent, ACTOR_SELF, LVar0)
150 SetConst(LVar0, PRT_MAIN)
151 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
155 SetConst(LVar0, PRT_MAIN)
156 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim10)
157 SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim11)
160 SetConst(LVar0, PRT_MAIN)
161 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim10)
162 SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim11)
164 SetConst(LVar0, PRT_MAIN)
165 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim11)
167 Return
169 SetConst(LVar0, PRT_MAIN)
170 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
173 SetConst(LVar0, PRT_MAIN)
174 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
176 SetConst(LVar0, PRT_MAIN)
177 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
179 Return
181 SetConst(LVar0, PRT_MAIN)
182 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
184 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
185 ExecWait(N(EVS_ReturnHome))
187 SetConst(LVar0, PRT_MAIN)
188 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
190 SetConst(LVar0, PRT_MAIN)
191 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
193 Return
197 SetConst(LVar0, PRT_MAIN)
198 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim01)
202 SetConst(LVar0, PRT_MAIN)
203 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
205 Wait(10)
206 SetConst(LVar0, PRT_MAIN)
207 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E)
209 Return
211 SetConst(LVar0, PRT_MAIN)
212 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim01)
215 SetConst(LVar0, PRT_MAIN)
216 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03)
217 SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim0E)
219 Return
221 SetConst(LVar0, PRT_MAIN)
222 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03)
225 SetConst(LVar0, PRT_MAIN)
226 SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03)
228 Return
231 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
232 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
233 Return
234 End
235};
236
237EvtScript N(EVS_TakeTurn) = {
238 Call(GetBattlePhase, LVar0)
240 ExecWait(N(EVS_Attack_Bite))
241 Return
242 EndIf
243 Call(RandInt, 100, LVar0)
244 IfLt(LVar0, 70)
245 ExecWait(N(EVS_Attack_BadBreath))
246 Else
247 ExecWait(N(EVS_Attack_Bite))
248 EndIf
249 Return
250 End
251};
252
253EvtScript N(EVS_Attack_Bite) = {
254 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
255 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
256 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
257 Call(GetBattlePhase, LVar0)
259 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18)
260 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
261 Wait(8)
262 Call(SetGoalToTarget, ACTOR_SELF)
263 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
264 Add(LVar0, 27)
265 Set(LVar1, 0)
266 Set(LVar3, LVar0)
267 Set(LVar4, LVar1)
268 Set(LVar5, LVar2)
269 Call(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8)
270 Add(LVar3, LVar6)
271 Add(LVar4, LVar7)
272 Add(LVar5, LVar8)
273 Div(LVar3, 2)
274 Div(LVar4, 2)
275 Div(LVar5, 2)
276 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
277 Call(SetBattleCamTarget, LVar3, LVar4, LVar5)
278 Call(SetBattleCamDist, 300)
279 Call(SetBattleCamOffsetY, 40)
280 Wait(20)
281 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
282 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
283 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
284 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17)
285 Wait(8)
286 Else
287 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
288 Call(BattleCamTargetActor, ACTOR_SELF)
289 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
290 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03)
291 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
292 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03)
293 Call(SetGoalToTarget, ACTOR_SELF)
294 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
295 Call(GetStatusFlags, ACTOR_SELF, LVarA)
297 Add(LVar0, 10)
298 Else
299 Add(LVar0, 27)
300 EndIf
301 Set(LVar1, 0)
302 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
303 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
304 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01)
305 EndIf
306 Thread
307 Wait(8)
308 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE)
310 Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
314 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05)
315 Wait(10)
316 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06)
317 Wait(6)
318 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07)
320 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
321 EndIf
322 Wait(14)
323 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
324 Call(MoveBattleCamOver, 20)
325 Call(YieldTurn)
326 Call(GetBattlePhase, LVar0)
328 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
329 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
330 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
331 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18)
332 Wait(10)
333 Call(SetGoalToHome, ACTOR_SELF)
334 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
335 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
336 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
337 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17)
338 Wait(10)
339 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
340 Else
341 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
342 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
343 Call(SetActorYaw, ACTOR_SELF, 180)
344 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
345 ExecWait(N(EVS_ReturnHome))
346 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
347 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
348 EndIf
349 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
350 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
351 Return
354 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05)
355 Wait(10)
356 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06)
357 Wait(1)
358 Wait(2)
359 Call(SetGoalToTarget, ACTOR_SELF)
360 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS)
361 Set(LVarF, LVar0)
365 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
366 Wait(10)
367 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07)
368 Wait(20)
369 Call(YieldTurn)
370 Call(GetBattlePhase, LVar0)
372 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
373 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
374 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
375 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18)
376 Wait(10)
377 Call(SetGoalToHome, ACTOR_SELF)
378 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
379 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
380 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
381 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17)
382 Wait(10)
383 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
384 Else
385 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
386 ExecWait(N(EVS_ReturnHome))
387 EndIf
390 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
391 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
392 Return
393 End
394};
395
396#include "common/UnkEffect6FFunc.inc.c"
397
398EvtScript N(EVS_Attack_BadBreath) = {
399 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
400 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
401 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
402 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
403 Call(BattleCamTargetActor, ACTOR_SELF)
404 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
405 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03)
406 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
407 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03)
408 Call(SetGoalToTarget, ACTOR_SELF)
409 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
410 Call(GetStatusFlags, ACTOR_SELF, LVarA)
412 Add(LVar0, 16)
413 Else
414 Add(LVar0, 40)
415 EndIf
416 Set(LVar1, 0)
417 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
418 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
419 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01)
420 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim08)
421 Wait(11)
422 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH)
423 Call(SetGoalToTarget, ACTOR_SELF)
424 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
425 Call(GetStatusFlags, ACTOR_SELF, LVarA)
427 Add(LVar0, 12)
428 Set(LVar1, 5)
429 SetF(LVar3, Float(0.4))
430 Else
431 Add(LVar0, 32)
432 Set(LVar1, 13)
433 SetF(LVar3, Float(1.0))
434 EndIf
435 Call(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120)
436 Wait(1)
437 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim09)
438 Wait(5)
439 Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
443 Wait(10)
444 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A)
446 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
447 EndIf
448 Wait(14)
449 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
450 Call(YieldTurn)
451 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
452 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
453 Call(SetActorYaw, ACTOR_SELF, 180)
454 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
455 ExecWait(N(EVS_ReturnHome))
456 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
457 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
458 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
459 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
460 Return
463 Wait(2)
464 Call(SetGoalToTarget, ACTOR_SELF)
466 Set(LVarF, LVar0)
470 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
471 Wait(10)
472 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A)
473 Wait(20)
474 Call(YieldTurn)
475 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
476 ExecWait(N(EVS_ReturnHome))
479 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
480 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
481 Return
482 End
483};
Bytecode EvtScript[]
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ ELEMENT_FIRE
Definition enums.h:2116
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ STATUS_KEY_PARALYZE
Definition enums.h:2201
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_KEY_STATIC
Definition enums.h:2207
@ STATUS_END
Definition enums.h:2196
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_KEY_FEAR
Definition enums.h:2199
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_KEY_SLEEP
Definition enums.h:2202
@ STATUS_KEY_STONE
Definition enums.h:2208
@ STATUS_KEY_STOP
Definition enums.h:2204
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_KEY_DIZZY
Definition enums.h:2200
@ STATUS_KEY_POISON
Definition enums.h:2205
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_KEY_NORMAL
Definition enums.h:2197
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DEFAULT
Definition enums.h:2198
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_LUCKY
Definition enums.h:1955
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_REPOSITION
Definition enums.h:4841
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4885
@ SUPPRESS_EVENT_ALL
Definition enums.h:2907
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ SOUND_BURROW_SURFACE
Definition enums.h:1117
@ SOUND_BURROW_DIG
Definition enums.h:1118
@ SOUND_PIRANHA_BREATH
Definition enums.h:1241
@ SOUND_PIRANHA_BITE
Definition enums.h:1508
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
Definition enums.h:3325
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4905
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define LVar6
Definition macros.h:154
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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 LVarF
Definition macros.h:163
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:275
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define Div(VAR, INT_VALUE)
Definition macros.h:379
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#define LVar8
Definition macros.h:156
#define LVar2
Definition macros.h:150
#define DMG_STATUS_KEY(typeFlag, duration, chance)
Definition macros.h:224
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217