Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
frost_piranha.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/LargePiranha.h"
5
6#define NAMESPACE A(frost_piranha)
7
8extern EvtScript N(EVS_Init);
9extern EvtScript N(EVS_Idle);
10extern EvtScript N(EVS_TakeTurn);
11extern EvtScript N(EVS_HandleEvent);
12extern EvtScript N(EVS_Attack_Bite);
13extern EvtScript N(EVS_Attack_FrostBreath);
14
15enum N(ActorPartIDs) {
16 PRT_MAIN = 1,
17};
18
19enum N(ActorParams) {
20 DMG_BITE = 4,
21};
22
23s32 N(DefaultAnims)[] = {
24 STATUS_KEY_NORMAL, ANIM_LargePiranha_Frost_Anim01,
25 STATUS_KEY_STONE, ANIM_LargePiranha_Frost_Anim00,
26 STATUS_KEY_SLEEP, ANIM_LargePiranha_Frost_Anim00,
27 STATUS_KEY_POISON, ANIM_LargePiranha_Frost_Anim01,
28 STATUS_KEY_STOP, ANIM_LargePiranha_Frost_Anim00,
29 STATUS_KEY_STATIC, ANIM_LargePiranha_Frost_Anim00,
30 STATUS_KEY_PARALYZE, ANIM_LargePiranha_Frost_Anim00,
31 STATUS_KEY_PARALYZE, ANIM_LargePiranha_Frost_Anim00,
32 STATUS_KEY_DIZZY, ANIM_LargePiranha_Frost_Anim0F,
34};
35
36s32 N(DefenseTable)[] = {
38 ELEMENT_FIRE, -2,
39 ELEMENT_ICE, 99,
41};
42
43s32 N(StatusTable)[] = {
66};
67
68ActorPartBlueprint N(ActorParts)[] = {
69 {
71 .index = PRT_MAIN,
72 .posOffset = { 0, 0, 0 },
73 .targetOffset = { -15, 50 },
74 .opacity = 255,
75 .idleAnimations = N(DefaultAnims),
76 .defenseTable = N(DefenseTable),
77 .eventFlags = ACTOR_EVENT_FLAG_ICY,
78 .elementImmunityFlags = 0,
79 .projectileTargetOffset = { 3, -14 },
80 },
81};
82
83ActorBlueprint NAMESPACE = {
84 .flags = 0,
85 .type = ACTOR_TYPE_FROST_PIRANHA,
86 .level = ACTOR_LEVEL_FROST_PIRANHA,
87 .maxHP = 10,
88 .partCount = ARRAY_COUNT(N(ActorParts)),
89 .partsData = N(ActorParts),
90 .initScript = &N(EVS_Init),
91 .statusTable = N(StatusTable),
92 .escapeChance = 70,
93 .airLiftChance = 20,
94 .hurricaneChance = 20,
95 .spookChance = 20,
96 .upAndAwayChance = 95,
97 .spinSmashReq = 0,
98 .powerBounceChance = 90,
99 .coinReward = 1,
100 .size = { 60, 52 },
101 .healthBarOffset = { 0, 0 },
102 .statusIconOffset = { -22, 32 },
103 .statusTextOffset = { 1, 44 },
104};
105
106EvtScript N(EVS_Init) = {
107 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
108 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
109 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
110 Return
111 End
112};
113
115
116EvtScript N(EVS_Idle) = {
117 Label(0)
118 Call(GetStatusFlags, ACTOR_SELF, LVarA)
120 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33)
121 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11)
122 Call(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31)
123 Else
124 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50)
125 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14)
126 Call(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44)
127 EndIf
128 Wait(1)
129 Goto(0)
130 Return
131 End
132};
133
134EvtScript N(EVS_ReturnHome) = {
135 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
136 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03)
137 Call(SetGoalToHome, ACTOR_SELF)
138 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
139 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01)
140 Call(SetActorYaw, ACTOR_SELF, 0)
141 Return
142 End
143};
144
145EvtScript N(EVS_HandleEvent) = {
146 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
147 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
148 Call(GetLastEvent, ACTOR_SELF, LVar0)
152 SetConst(LVar0, PRT_MAIN)
153 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
157 SetConst(LVar0, PRT_MAIN)
158 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim10)
159 SetConst(LVar2, ANIM_LargePiranha_Frost_Anim11)
162 SetConst(LVar0, PRT_MAIN)
163 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim10)
164 SetConst(LVar2, ANIM_LargePiranha_Frost_Anim11)
166 SetConst(LVar0, PRT_MAIN)
167 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim11)
169 Return
171 SetConst(LVar0, PRT_MAIN)
172 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
175 SetConst(LVar0, PRT_MAIN)
176 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
178 SetConst(LVar0, PRT_MAIN)
179 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
181 Return
183 SetConst(LVar0, PRT_MAIN)
184 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
186 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
187 ExecWait(N(EVS_ReturnHome))
189 SetConst(LVar0, PRT_MAIN)
190 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
192 SetConst(LVar0, PRT_MAIN)
193 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
195 Return
199 SetConst(LVar0, PRT_MAIN)
200 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim01)
204 SetConst(LVar0, PRT_MAIN)
205 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
207 Wait(10)
208 SetConst(LVar0, PRT_MAIN)
209 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E)
211 Return
213 SetConst(LVar0, PRT_MAIN)
214 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim01)
217 SetConst(LVar0, PRT_MAIN)
218 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03)
219 SetConst(LVar2, ANIM_LargePiranha_Frost_Anim0E)
221 Return
223 SetConst(LVar0, PRT_MAIN)
224 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03)
227 SetConst(LVar0, PRT_MAIN)
228 SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03)
230 Return
233 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
234 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
235 Return
236 End
237};
238
239EvtScript N(EVS_TakeTurn) = {
240 Call(GetBattlePhase, LVar0)
242 ExecWait(N(EVS_Attack_Bite))
243 Return
244 EndIf
245 Call(GetStatusFlags, ACTOR_PLAYER, LVar0)
247 ExecWait(N(EVS_Attack_Bite))
248 Return
249 EndIf
250 Call(RandInt, 1000, LVar0)
251 IfLt(LVar0, 250)
252 ExecWait(N(EVS_Attack_FrostBreath))
253 Else
254 ExecWait(N(EVS_Attack_Bite))
255 EndIf
256 Return
257 End
258};
259
260EvtScript N(EVS_Attack_Bite) = {
261 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
262 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
263 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
264 Call(GetBattlePhase, LVar0)
266 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18)
267 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
268 Wait(8)
269 Call(SetGoalToTarget, ACTOR_SELF)
270 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
271 Add(LVar0, 27)
272 Set(LVar1, 0)
273 Set(LVar3, LVar0)
274 Set(LVar4, LVar1)
275 Set(LVar5, LVar2)
276 Call(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8)
277 Add(LVar3, LVar6)
278 Add(LVar4, LVar7)
279 Add(LVar5, LVar8)
280 Div(LVar3, 2)
281 Div(LVar4, 2)
282 Div(LVar5, 2)
283 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
284 Call(SetBattleCamTarget, LVar3, LVar4, LVar5)
285 Call(SetBattleCamDist, 300)
286 Call(SetBattleCamOffsetY, 40)
287 Wait(20)
288 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
289 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
290 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
291 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17)
292 Wait(8)
293 Else
294 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
295 Call(BattleCamTargetActor, ACTOR_SELF)
296 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
297 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03)
298 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
299 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03)
300 Call(SetGoalToTarget, ACTOR_SELF)
301 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
302 Call(GetStatusFlags, ACTOR_SELF, LVarA)
304 Add(LVar0, 10)
305 Else
306 Add(LVar0, 27)
307 EndIf
308 Set(LVar1, 0)
309 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
310 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
311 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01)
312 EndIf
313 Thread
314 Wait(8)
315 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE)
317 Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
321 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05)
322 Wait(10)
323 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06)
324 Wait(6)
325 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07)
327 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
328 EndIf
329 Wait(14)
330 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
331 Call(YieldTurn)
332 Call(GetBattlePhase, LVar0)
334 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
335 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
336 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
337 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18)
338 Wait(10)
339 Call(SetGoalToHome, ACTOR_SELF)
340 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
341 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
342 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
343 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17)
344 Wait(10)
345 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
346 Else
347 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
348 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
349 Call(SetActorYaw, ACTOR_SELF, 180)
350 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
351 ExecWait(N(EVS_ReturnHome))
352 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
353 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
354 EndIf
355 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
356 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
357 Return
360 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05)
361 Wait(10)
362 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06)
363 Wait(1)
364 Wait(2)
365 Call(SetGoalToTarget, ACTOR_SELF)
366 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS)
367 Set(LVarF, LVar0)
371 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
372 Wait(10)
373 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07)
374 Wait(20)
375 Call(YieldTurn)
376 Call(GetBattlePhase, LVar0)
378 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
379 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
380 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
381 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18)
382 Wait(10)
383 Call(SetGoalToHome, ACTOR_SELF)
384 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
385 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
386 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
387 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17)
388 Wait(10)
389 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE)
390 Else
391 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
392 ExecWait(N(EVS_ReturnHome))
393 EndIf
396 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
397 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
398 Return
399 End
400};
401
402#include "common/UnkEffect6FFunc.inc.c"
403
404EvtScript N(EVS_Attack_FrostBreath) = {
405 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
406 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
407 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
408 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
409 Call(BattleCamTargetActor, ACTOR_SELF)
410 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
411 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03)
412 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
413 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03)
414 Call(SetGoalToTarget, ACTOR_SELF)
415 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
416 Call(GetStatusFlags, ACTOR_SELF, LVarA)
418 Add(LVar0, 20)
419 Else
420 Add(LVar0, 50)
421 EndIf
422 Set(LVar1, 0)
423 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
424 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
425 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01)
426 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0B)
427 Wait(11)
428 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH)
429 Call(SetGoalToTarget, ACTOR_SELF)
430 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
431 Call(GetStatusFlags, ACTOR_SELF, LVarA)
433 Add(LVar0, 12)
434 Set(LVar1, 5)
435 SetF(LVar3, Float(0.4))
436 Else
437 Add(LVar0, 32)
438 Set(LVar1, 13)
439 SetF(LVar3, Float(1.0))
440 EndIf
441 Call(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120)
442 Wait(1)
443 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0C)
444 Wait(5)
445 Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_INCLUDE_POWER_UPS) //@bug malformed status word
449 Wait(10)
450 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D)
452 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
453 EndIf
454 Wait(14)
455 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
456 Call(YieldTurn)
457 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
458 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
459 Call(SetActorYaw, ACTOR_SELF, 180)
460 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
461 ExecWait(N(EVS_ReturnHome))
462 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
463 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
464 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
465 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
466 Return
469 Wait(2)
470 Call(SetGoalToTarget, ACTOR_SELF)
472 Set(LVarF, LVar0)
476 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
477 Wait(10)
478 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D)
479 Wait(20)
480 Call(YieldTurn)
481 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
482 ExecWait(N(EVS_ReturnHome))
485 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
486 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
487 Return
488 End
489};
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_ICE
Definition enums.h:2118
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ACTOR_EVENT_FLAG_ICY
No known effect, but is used.
Definition enums.h:3372
@ 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_FROZEN
Definition enums.h:2814
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ 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_ICE
Definition enums.h:2854
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ 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 DMG_STATUS_IGNORE_RES(typeFlag, duration)
Definition macros.h:226
#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 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