Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
gulpit.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "effects.h"
4#include "sprite/npc/Gulpit.h"
5
6#define NAMESPACE A(gulpit)
7
8extern EvtScript N(EVS_Init);
9extern EvtScript N(EVS_TakeTurn);
10extern EvtScript N(EVS_Idle);
11extern EvtScript N(EVS_HandleEvent);
12
13enum N(ActorPartIDs) {
14 PRT_MAIN = 1,
15 PRT_BIG_ROCK = 2,
16 PRT_SMALL_ROCK = 3,
17};
18
19enum N(ActorVars) {
20 AVAR_Rock_Type = 0, // from gulpit rock
21};
22
23enum N(ActorParams) {
24 DMG_LICK = 2,
25 DMG_SMALL_ROCK = 5,
26 DMG_BIG_ROCK = 7,
27};
28
29s32 N(DefaultAnims)[] = {
30 STATUS_KEY_NORMAL, ANIM_Gulpit_Anim01,
31 STATUS_KEY_STONE, ANIM_Gulpit_Anim00,
32 STATUS_KEY_SLEEP, ANIM_Gulpit_Anim0F,
33 STATUS_KEY_POISON, ANIM_Gulpit_Anim01,
34 STATUS_KEY_STOP, ANIM_Gulpit_Anim00,
35 STATUS_KEY_STATIC, ANIM_Gulpit_Anim01,
36 STATUS_KEY_PARALYZE, ANIM_Gulpit_Anim00,
37 STATUS_KEY_DIZZY, ANIM_Gulpit_Anim0E,
38 STATUS_KEY_FEAR, ANIM_Gulpit_Anim0E,
40};
41
42s32 N(BigRockAnims)[] = {
43 STATUS_KEY_NORMAL, ANIM_Gulpit_Anim10,
45};
46
47s32 N(SmallRockAnims)[] = {
48 STATUS_KEY_NORMAL, ANIM_Gulpit_Anim12,
50};
51
52s32 N(DefenseTable)[] = {
55};
56
57s32 N(StatusTable)[] = {
80};
81
82ActorPartBlueprint N(ActorParts)[] = {
83 {
85 .index = PRT_MAIN,
86 .posOffset = { 0, 0, 0 },
87 .targetOffset = { -7, 48 },
88 .opacity = 255,
89 .idleAnimations = N(DefaultAnims),
90 .defenseTable = N(DefenseTable),
91 .eventFlags = 0,
92 .elementImmunityFlags = 0,
93 .projectileTargetOffset = { -3, -23 },
94 },
95 {
97 .index = PRT_BIG_ROCK,
98 .posOffset = { 0, 0, 0 },
99 .targetOffset = { 0, 0 },
100 .opacity = 255,
101 .idleAnimations = N(BigRockAnims),
102 .defenseTable = N(DefenseTable),
103 .eventFlags = 0,
104 .elementImmunityFlags = 0,
105 .projectileTargetOffset = { 0, 0 },
106 },
107 {
109 .index = PRT_SMALL_ROCK,
110 .posOffset = { 0, 0, 0 },
111 .targetOffset = { 0, 0 },
112 .opacity = 255,
113 .idleAnimations = N(SmallRockAnims),
114 .defenseTable = N(DefenseTable),
115 .eventFlags = 0,
116 .elementImmunityFlags = 0,
117 .projectileTargetOffset = { 0, 0 },
118 },
119};
120
121ActorBlueprint NAMESPACE = {
122 .flags = 0,
123 .type = ACTOR_TYPE_GULPIT,
124 .level = ACTOR_LEVEL_GULPIT,
125 .maxHP = 12,
126 .partCount = ARRAY_COUNT(N(ActorParts)),
127 .partsData = N(ActorParts),
128 .initScript = &N(EVS_Init),
129 .statusTable = N(StatusTable),
130 .escapeChance = 60,
131 .airLiftChance = 50,
132 .hurricaneChance = 50,
133 .spookChance = 70,
134 .upAndAwayChance = 95,
135 .spinSmashReq = 0,
136 .powerBounceChance = 100,
137 .coinReward = 1,
138 .size = { 53, 50 },
139 .healthBarOffset = { 0, 0 },
140 .statusIconOffset = { -3, 37 },
141 .statusTextOffset = { 10, 45 },
142};
143
144EvtScript N(EVS_Init) = {
145 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
146 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
147 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
148 Return
149 End
150};
151
152EvtScript N(EVS_Idle) = {
153 Return
154 End
155};
156
157EvtScript N(EVS_ReturnHome) = {
158 SetConst(LVar0, PRT_MAIN)
159 SetConst(LVar1, ANIM_Gulpit_Anim03)
161 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01)
162 Return
163 End
164};
165
166EvtScript N(EVS_HandleEvent) = {
167 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
168 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
169 Call(GetLastEvent, ACTOR_SELF, LVar0)
173 SetConst(LVar0, PRT_MAIN)
174 SetConst(LVar1, ANIM_Gulpit_Anim0B)
178 SetConst(LVar0, PRT_MAIN)
179 SetConst(LVar1, ANIM_Gulpit_Anim0C)
180 SetConst(LVar2, ANIM_Gulpit_Anim0D)
183 SetConst(LVar0, PRT_MAIN)
184 SetConst(LVar1, ANIM_Gulpit_Anim0C)
185 SetConst(LVar2, ANIM_Gulpit_Anim0D)
187 SetConst(LVar0, PRT_MAIN)
188 SetConst(LVar1, ANIM_Gulpit_Anim0D)
190 Return
192 SetConst(LVar0, PRT_MAIN)
193 SetConst(LVar1, ANIM_Gulpit_Anim0B)
196 SetConst(LVar0, PRT_MAIN)
197 SetConst(LVar1, ANIM_Gulpit_Anim0B)
199 SetConst(LVar0, PRT_MAIN)
200 SetConst(LVar1, ANIM_Gulpit_Anim0B)
202 Return
204 SetConst(LVar0, PRT_MAIN)
205 SetConst(LVar1, ANIM_Gulpit_Anim0B)
207 SetConst(LVar0, PRT_MAIN)
208 SetConst(LVar1, ANIM_Gulpit_Anim0B)
210 ExecWait(N(EVS_ReturnHome))
212 SetConst(LVar0, PRT_MAIN)
213 SetConst(LVar1, ANIM_Gulpit_Anim0B)
215 SetConst(LVar0, PRT_MAIN)
216 SetConst(LVar1, ANIM_Gulpit_Anim0B)
218 Return
222 SetConst(LVar0, PRT_MAIN)
223 SetConst(LVar1, ANIM_Gulpit_Anim01)
227 SetConst(LVar0, PRT_MAIN)
228 SetConst(LVar1, ANIM_Gulpit_Anim0B)
230 Wait(10)
231 SetConst(LVar0, PRT_MAIN)
232 SetConst(LVar1, ANIM_Gulpit_Anim0B)
234 Return
236 SetConst(LVar0, PRT_MAIN)
237 SetConst(LVar1, ANIM_Gulpit_Anim01)
240 SetConst(LVar0, PRT_MAIN)
241 SetConst(LVar1, ANIM_Gulpit_Anim03)
242 SetConst(LVar2, ANIM_Gulpit_Anim0B)
244 Return
246 SetConst(LVar0, PRT_MAIN)
247 SetConst(LVar1, ANIM_Gulpit_Anim03)
250 SetConst(LVar0, PRT_MAIN)
251 SetConst(LVar1, ANIM_Gulpit_Anim03)
255 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
256 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
257 Return
258 End
259};
260
261EvtScript N(EVS_Attack_Lick) = {
262 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
263 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
264 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
265 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
266 Call(BattleCamTargetActor, ACTOR_SELF)
267 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
268 Call(GetBattlePhase, LVar0)
270 Call(SetGoalToTarget, ACTOR_SELF)
271 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
272 Add(LVar0, 80)
273 Set(LVar1, 0)
274 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
275 EndIf
276 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim03)
277 Call(SetGoalToTarget, ACTOR_SELF)
278 Call(GetStatusFlags, ACTOR_SELF, LVar0)
280 Call(AddGoalPos, ACTOR_SELF, 10, 0, 0)
281 Else
282 Call(AddGoalPos, ACTOR_SELF, 20, 0, 0)
283 EndIf
284 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
285 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
286 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01)
287 Wait(10)
288 Thread
289 Wait(3)
290 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK)
292 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim04)
293 Wait(9)
294 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
298 Set(LVarA, LVar0)
300 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
301 EndIf
302 Wait(15)
303 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
304 Call(YieldTurn)
305 Call(SetActorYaw, ACTOR_SELF, 180)
306 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
307 ExecWait(N(EVS_ReturnHome))
308 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
309 Call(SetActorYaw, ACTOR_SELF, 0)
310 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
311 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
312 Return
315 Wait(2)
316 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LICK, BS_FLAGS1_TRIGGER_EVENTS)
320 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
321 Wait(10)
322 Call(YieldTurn)
323 ExecWait(N(EVS_ReturnHome))
326 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
327 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
328 Return
329 End
330};
331
332EvtScript N(EVS_Attack_SpitRock) = {
333 Set(LVarA, LVar0)
334 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
335 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
336 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
337 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
338 Call(BattleCamTargetActor, ACTOR_SELF)
339 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
340 Call(GetActorPos, LVarA, LVar0, LVar1, LVar2)
341 Add(LVar0, 20)
342 Sub(LVar2, 1)
343 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim02)
344 Call(SetActorSpeed, ACTOR_SELF, Float(3.0))
345 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
346 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
347 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01)
348 Wait(10)
349 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK)
350 Call(GetActorVar, LVarA, AVAR_Rock_Type, LVar0)
351 Set(LVarB, LVar0)
353 CaseEq(0)
354 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim05)
355 Wait(3)
356 Call(RemoveActor, LVarA)
357 Wait(20)
358 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim06)
359 Wait(15)
360 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim07)
361 Set(LVarA, 2)
362 CaseEq(1)
363 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim08)
364 Wait(3)
365 Call(RemoveActor, LVarA)
366 Wait(20)
367 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim09)
368 Wait(15)
369 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim0A)
370 Set(LVarA, 3)
373 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
377 Set(LVar9, LVar0)
378 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
379 Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE)
380 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
381 Add(LVar1, 20)
382 Add(LVar2, 2)
383 Call(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2)
384 Call(SetGoalToTarget, ACTOR_SELF)
385 Call(AddGoalPos, ACTOR_SELF, -100, 0, 5)
386 Call(SetPartMoveSpeed, ACTOR_SELF, LVarA, Float(14.0))
387 Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(0.01))
388 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
389 Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE)
390 Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE)
392 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
393 EndIf
394 Wait(15)
395 Call(YieldTurn)
396 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
397 ExecWait(N(EVS_ReturnHome))
398 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
399 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
400 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
401 Return
404 Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE)
405 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
406 Add(LVar1, 20)
407 Add(LVar2, 2)
408 Call(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2)
409 Call(SetGoalToTarget, ACTOR_SELF)
410 Call(SetPartMoveSpeed, ACTOR_SELF, LVarA, Float(14.0))
411 Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(0.01))
412 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
413 Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE)
415 CaseEq(PRT_BIG_ROCK)
416 Wait(2)
417 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BIG_ROCK, BS_FLAGS1_TRIGGER_EVENTS)
418 CaseEq(PRT_SMALL_ROCK)
419 Wait(2)
420 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SMALL_ROCK, BS_FLAGS1_TRIGGER_EVENTS)
425 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
426 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01)
427 Call(GetPartOffset, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2)
428 Add(LVar0, -100)
429 Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(1.0))
430 Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 25, TRUE)
431 Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE)
432 Wait(10)
433 Call(YieldTurn)
434 ExecWait(N(EVS_ReturnHome))
437 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
438 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
439 Return
440 End
441};
442
443EvtScript N(EVS_TakeTurn) = {
444 Call(GetBattlePhase, LVar0)
446 ExecWait(N(EVS_Attack_Lick))
447 Return
448 EndIf
449 Call(GetStatusFlags, ACTOR_SELF, LVar0)
451 ExecWait(N(EVS_Attack_Lick))
452 Return
453 EndIf
454 Set(LVarA, 0)
455 // search for rock actors to pick up
456 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_ALLOW_TARGET_ONLY)
457 Call(InitTargetIterator)
458 Label(0)
459 Call(GetOwnerTarget, LVar0, LVar1)
460 Call(GetOriginalActorType, LVar0, LVar2)
461 IfEq(LVar2, ACTOR_TYPE_GULPIT_ROCKS)
462 Add(LVarA, 1)
464 CaseEq(1)
465 Set(LVarB, LVar0)
466 CaseEq(2)
467 Set(LVarC, LVar0)
468 CaseEq(3)
469 Set(LVarD, LVar0)
471 EndIf
472 Call(ChooseNextTarget, ITER_NEXT, LVar0)
474 Goto(0)
475 EndIf
477 CaseEq(0)
478 ExecWait(N(EVS_Attack_Lick))
479 CaseEq(1)
480 Set(LVar0, LVarB)
481 ExecWait(N(EVS_Attack_SpitRock))
482 CaseEq(2)
483 Call(RandInt, 1, LVar0)
485 CaseEq(0)
486 Set(LVar0, LVarB)
487 CaseEq(1)
488 Set(LVar0, LVarC)
490 ExecWait(N(EVS_Attack_SpitRock))
491 CaseGe(3)
492 Call(RandInt, 2, LVar0)
494 CaseEq(0)
495 Set(LVar0, LVarB)
496 CaseEq(1)
497 Set(LVar0, LVarC)
498 CaseEq(2)
499 Set(LVar0, LVarD)
501 ExecWait(N(EVS_Attack_SpitRock))
503 Return
504 End
505};
506
Bytecode EvtScript[]
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_JUMP
Definition enums.h:2036
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ 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_ENEMY_APPROACH
Definition enums.h:4885
@ TARGET_FLAG_ALLOW_TARGET_ONLY
Definition enums.h:1864
@ TARGET_FLAG_2
Definition enums.h:1850
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ SOUND_GULPIT_LICK
Definition enums.h:1524
@ SOUND_NONE
Definition enums.h:547
@ SOUND_LIGHT_THROW
Definition enums.h:1283
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ 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
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
Definition enums.h:3361
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
Definition enums.h:3360
@ ACTOR_PART_FLAG_INVISIBLE
Definition enums.h:3350
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
EvtScript EVS_Enemy_ReturnHome
EvtScript EVS_Enemy_Knockback
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 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 Sub(VAR, INT_VALUE)
Definition macros.h:377
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#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 CaseGe(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:334
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define LVarC
Definition macros.h:160
#define ARRAY_COUNT(arr)
Definition macros.h:40
#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 CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#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 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 LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define LVarD
Definition macros.h:161
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#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 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