Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
standard_events.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "battle/battle.h"
4#include "script_api/battle.h"
5#include "sprite/player.h"
6
9
10API_CALLABLE(GetDamageIntensity) {
12 script->varTable[0] = DAMAGE_INTENSITY_LIGHT;
13 } else if (gBattleStatus.lastAttackDamage < 7) {
14 script->varTable[0] = DAMAGE_INTENSITY_MEDIUM;
15 } else if (gBattleStatus.lastAttackDamage < 10) {
16 script->varTable[0] = DAMAGE_INTENSITY_HEAVY;
17 } else {
18 script->varTable[0] = DAMAGE_INTENSITY_EXTREME;
19 }
20 return ApiStatus_DONE2;
21}
22
23API_CALLABLE(AddEffectOffset) {
24 Bytecode* args = script->ptrReadPos;
25 EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
26
27 effect->data.flashingBoxShockwave->pos.x += evt_get_variable(script, *args++);
28 effect->data.flashingBoxShockwave->pos.y += evt_get_variable(script, *args++);
29 effect->data.flashingBoxShockwave->pos.z += evt_get_variable(script, *args++);
30
31 return ApiStatus_DONE2;
32}
33
34// Partner actions during end-of-battle celebration
35// (in) LVar0: partIdx
36// (in) LVar1: celebration loop animID
37// (in) LVar2: celebration end animID
38// (in) LVar3: idle animID
40 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
41 Loop(2)
42 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
43 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
44 Wait(1)
45 Call(AddActorPos, ACTOR_SELF, 0, 4, 0)
46 Wait(1)
47 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
48 Wait(1)
49 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
50 Wait(1)
51 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
52 Wait(1)
53 Call(AddActorPos, ACTOR_SELF, 0, -1, 0)
54 Wait(1)
55 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
56 Wait(1)
57 Call(AddActorPos, ACTOR_SELF, 0, -3, 0)
58 Wait(1)
59 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
60 Wait(1)
61 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
62 Wait(1)
63 Wait(1)
64 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
65 Wait(1)
67 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
68 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
69 Wait(1)
70 Call(AddActorPos, ACTOR_SELF, 0, 4, 0)
71 Wait(1)
72 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
73 Wait(1)
74 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
75 Wait(1)
76 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
77 Wait(1)
78 Call(AddActorPos, ACTOR_SELF, 0, -1, 0)
79 Wait(1)
80 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
81 Wait(1)
82 Call(AddActorPos, ACTOR_SELF, 0, -3, 0)
83 Wait(1)
84 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
85 Wait(1)
86 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
87 Wait(1)
88 Wait(1)
89 Call(SetAnimation, ACTOR_SELF, LVar0, LVar3)
90 Return
91 End
92};
93
94// Partner actions during 'Run Away'
95// (in) LVar0: part idx
96// (in) LVar1: run animID
98 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
99 Call(SetActorYaw, ACTOR_SELF, 180)
100 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
101 Wait(10)
102 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
103 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
104 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
105 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
106 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
107 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
108 Wait(5)
109 Call(SetActorSpeed, ACTOR_SELF, Float(12.0))
110 Call(SetGoalPos, ACTOR_PARTNER, -250, 0, 0)
111 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
112 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
113 Return
114 End
115};
116
117// Partner reaction to touching a fiery enemy
118// (in) LVar1: burn loop animID
119// (in) LVar2: rotation y-offset
120// (in) LVar3: burn still animID
122 Set(LVarA, LVar1)
123 Set(LVarB, LVar2)
124 Set(LVarC, LVar3)
125 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
126 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
127 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
128 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
129 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
130 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
131 Sub(LVar0, 60)
132 Add(LVar1, 40)
133 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
134 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
135 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
136 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
137 Set(LVar1, LVarA)
138 Set(LVar2, LVarC)
140 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
142 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
143 Set(LVar0, 0)
144 Loop(15)
145 Add(LVar0, 48)
146 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
147 Wait(1)
148 EndLoop
149 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
151 Call(SetGoalToHome, ACTOR_PARTNER)
152 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
153 Add(LVar0, 30)
154 Set(LVar1, 0)
155 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
156 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
157 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
158 Sub(LVar0, 20)
159 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
160 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
161 Sub(LVar0, 10)
162 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
163 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
164 Return
165 End
166};
167
168// Partner reaction to touching a spiky enemy
169// (in) LVar1: hurt still animID
170// (in) LVar2: rotation y-offset
172 Set(LVarA, LVar1)
173 Set(LVarB, LVar2)
174 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
175 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
176 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
177 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_SPIKE)
178 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
179 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
180 Sub(LVar0, 60)
181 Add(LVar1, 40)
182 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
183 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
184 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
185 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
186 Set(LVar1, LVarA)
187 Set(LVar2, 0)
189 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
191 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
192 Set(LVar0, 0)
193 Loop(15)
194 Add(LVar0, 48)
195 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
196 Wait(1)
197 EndLoop
198 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
200 Call(SetGoalToHome, ACTOR_PARTNER)
201 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
202 Add(LVar0, 30)
203 Set(LVar1, 0)
204 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
205 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
206 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
207 Sub(LVar0, 20)
208 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
209 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
210 Sub(LVar0, 10)
211 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
212 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
213 Return
214 End
215};
216
217// Bombette-specific reaction to touching a spiky enemy
218// (in) LVar1: hurt loop animID
219// (in) LVar2: rotation y-offset
220// (in) LVar3: injured animID
222 Set(LVarA, LVar1)
223 Set(LVarB, LVar2)
224 Set(LVarC, LVar3)
225 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
226 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
227 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
228 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_SPIKE)
229 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
230 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
231 Sub(LVar0, 60)
232 Add(LVar1, 40)
233 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
234 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
235 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
236 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
237 Set(LVar1, LVarA)
238 Set(LVar2, 0)
240 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
242 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
243 Set(LVar0, 0)
244 Loop(15)
245 Add(LVar0, 48)
246 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
247 Wait(1)
248 EndLoop
249 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
251 Call(SetGoalToHome, ACTOR_PARTNER)
252 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
253 Add(LVar0, 30)
254 Set(LVar1, 0)
255 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
256 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
257 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
258 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
259 Wait(1)
260 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
261 Sub(LVar0, 20)
262 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
263 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
264 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
265 Wait(1)
266 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
267 Sub(LVar0, 10)
268 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
269 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
270 Return
271 End
272};
273
274// Partner reaction to being hit by a shocking attack
275// (in) LVar1: hurt loop animID
276// (in) LVar2: rotation y-offset
278 Set(LVarA, LVar1)
279 Set(LVarB, LVar2)
280 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
281 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
282 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
283 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
284 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
285 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
286 Sub(LVar0, 60)
287 Add(LVar1, 40)
288 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
289 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
290 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
291 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
292 Call(ShowShockEffect, ACTOR_SELF)
293 Set(LVar1, LVarA)
294 Set(LVar2, 0)
296 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
298 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
299 Set(LVar0, 0)
300 Loop(15)
301 Add(LVar0, 48)
302 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
303 Wait(1)
304 EndLoop
305 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
307 Call(SetGoalToHome, ACTOR_PARTNER)
308 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
309 Add(LVar0, 30)
310 Set(LVar1, 0)
311 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
312 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
313 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
314 Sub(LVar0, 20)
315 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
316 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
317 Sub(LVar0, 10)
318 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
319 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
320 Return
321 End
322};
323
324// Unused partner reaction to being hit by a shocking attack
325// Only difference is a new arg on LVar3 which sets an anim for 1 frame twice at the end
326// (in) LVar1: hurt loop animID
327// (in) LVar2: rotation y-offset
328// (in) LVar3: jolt animID (?)
330 Set(LVarA, LVar1)
331 Set(LVarB, LVar2)
332 Set(LVarC, LVar3)
333 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
334 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
335 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
336 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
337 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
338 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
339 Sub(LVar0, 60)
340 Add(LVar1, 40)
341 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
342 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
343 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
344 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
345 Call(ShowShockEffect, ACTOR_SELF)
346 Set(LVar1, LVarA)
347 Set(LVar2, 0)
349 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
351 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0)
352 Set(LVar0, 0)
353 Loop(15)
354 Add(LVar0, 48)
355 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
356 Wait(1)
357 EndLoop
358 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
360 Call(SetGoalToHome, ACTOR_PARTNER)
361 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
362 Add(LVar0, 30)
363 Set(LVar1, 0)
364 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
365 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
366 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
367 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
368 Wait(1)
369 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
370 Sub(LVar0, 20)
371 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
372 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
373 Call(SetAnimation, ACTOR_PARTNER, -1, LVarC)
374 Wait(1)
375 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
376 Sub(LVar0, 10)
377 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
378 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
379 Return
380 End
381};
382
383// Partner gets up from being KO
384// (in) LVar0: part idx? (unused)
385// (in) LVar1: idle animID
386// (in) LVar2: run animID
387// (in) LVar3: idle y-pos
389 Set(LVar6, LVar3)
390 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.8))
391 Call(GetActorPos, ACTOR_PARTNER, LVar7, LVar8, LVar9)
392 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
393 IfEq(LVar6, 0)
394 Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9)
395 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
396 Else
397 Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9)
398 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE)
399 EndIf
400 Call(SetGoalToHome, ACTOR_PARTNER)
401 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
402 Call(SetAnimation, ACTOR_PARTNER, -1, LVar1)
403 Call(RunToGoal, ACTOR_PARTNER, 0)
404 Return
405 End
406};
407
408// Partner falls down if y > 0
409// (in) LVar1: hurt animID
411 Set(LVarA, LVar1)
412 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
413 IfEq(LVar1, 0)
414 Goto(10)
415 EndIf
416 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
417 Call(func_8026F1A0, ACTOR_PARTNER, 1)
418 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
419 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
420 Set(LVar1, 0)
421 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
422 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
423 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
424 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
425 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
426 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
427 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
428 Wait(8)
429 Label(10)
430 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
431 PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2)
432 Return
433 End
434};
435
436// Partner reaction to being hit by a fiery attack
437// (in) LVar1: burn hurt loop animID
438// (in) LVar2: burn hurt end animID
440 Call(SetAnimation, ACTOR_PARTNER, -1, LVar1)
442 Call(GetActorPos, ACTOR_PARTNER, LVar5, LVar6, LVar7)
443 Add(LVar5, -5)
444 Add(LVar6, 18)
445 Add(LVar7, 5)
446 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
447 Wait(2)
448 Add(LVar5, 10)
449 Add(LVar6, -14)
450 PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15)
452 Call(GetDamageIntensity)
455 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
456 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
457 Wait(1)
458 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
459 Wait(1)
460 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
461 Wait(1)
462 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
463 Wait(1)
464 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
465 Wait(1)
466 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
467 Wait(1)
468 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
469 Wait(1)
470 Loop(2)
471 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
472 Wait(1)
473 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
474 Wait(1)
475 EndLoop
476 Loop(4)
477 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
478 Wait(1)
479 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
480 Wait(1)
481 EndLoop
482 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
483 Wait(10)
485 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
486 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
487 Wait(1)
488 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
489 Wait(1)
490 Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0)
491 Wait(1)
492 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
493 Wait(1)
494 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
495 Wait(1)
496 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
497 Wait(1)
498 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
499 Wait(1)
500 Loop(2)
501 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
502 Wait(1)
503 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
504 Wait(1)
505 EndLoop
506 Loop(6)
507 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
508 Wait(1)
509 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
510 Wait(1)
511 EndLoop
512 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
513 Wait(10)
515 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
516 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
517 Wait(1)
518 Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0)
519 Wait(1)
520 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
521 Wait(1)
522 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
523 Wait(1)
524 Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0)
525 Wait(1)
526 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
527 Wait(1)
528 Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0)
529 Wait(1)
530 Loop(2)
531 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
532 Wait(1)
533 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
534 Wait(1)
535 EndLoop
536 Loop(6)
537 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
538 Wait(1)
539 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
540 Wait(1)
541 EndLoop
542 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
543 Wait(10)
545 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
546 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
547 Wait(1)
548 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
549 Wait(1)
550 Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0)
551 Wait(1)
552 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
553 Wait(1)
554 Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0)
555 Wait(1)
556 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
557 Wait(1)
558 Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0)
559 Wait(1)
560 Loop(2)
561 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
562 Wait(1)
563 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
564 Wait(1)
565 EndLoop
566 Loop(6)
567 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
568 Wait(1)
569 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
570 Wait(1)
571 EndLoop
572 Loop(2)
573 Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0)
574 Wait(1)
575 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
576 Wait(1)
577 EndLoop
578 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
579 Wait(10)
581 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
582 Wait(8)
583 Return
584 End
585};
586
587// Internal script for animating a partner hit by an attack
588// (in) LVar1: hurt loop animID
590 Call(SetAnimation, ACTOR_PARTNER, -1, LVar1)
591 Call(GetDamageIntensity)
594 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
595 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
596 Wait(1)
597 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
598 Wait(1)
599 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
600 Wait(1)
601 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
602 Wait(1)
603 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
604 Wait(1)
605 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
606 Wait(1)
607 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
608 Wait(1)
609 Loop(2)
610 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
611 Wait(1)
612 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
613 Wait(1)
614 EndLoop
615 Loop(4)
616 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
617 Wait(1)
618 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
619 Wait(1)
620 EndLoop
621 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
622 Wait(10)
624 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
625 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
626 Wait(1)
627 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
628 Wait(1)
629 Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0)
630 Wait(1)
631 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
632 Wait(1)
633 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
634 Wait(1)
635 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
636 Wait(1)
637 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
638 Wait(1)
639 Loop(2)
640 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
641 Wait(1)
642 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
643 Wait(1)
644 EndLoop
645 Loop(6)
646 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
647 Wait(1)
648 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
649 Wait(1)
650 EndLoop
651 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
652 Wait(10)
654 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
655 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
656 Wait(1)
657 Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0)
658 Wait(1)
659 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
660 Wait(1)
661 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
662 Wait(1)
663 Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0)
664 Wait(1)
665 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
666 Wait(1)
667 Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0)
668 Wait(1)
669 Loop(2)
670 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
671 Wait(1)
672 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
673 Wait(1)
674 EndLoop
675 Loop(6)
676 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
677 Wait(1)
678 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
679 Wait(1)
680 EndLoop
681 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
682 Wait(10)
684 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
685 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
686 Wait(1)
687 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
688 Wait(1)
689 Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0)
690 Wait(1)
691 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
692 Wait(1)
693 Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0)
694 Wait(1)
695 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
696 Wait(1)
697 Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0)
698 Wait(1)
699 Loop(2)
700 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
701 Wait(1)
702 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
703 Wait(1)
704 EndLoop
705 Loop(6)
706 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
707 Wait(1)
708 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
709 Wait(1)
710 EndLoop
711 Loop(2)
712 Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0)
713 Wait(1)
714 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
715 Wait(1)
716 EndLoop
717 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
718 Wait(10)
720 Return
721 End
722};
723
724// Internal script for animating a partner hit by a crushing attack
726 Call(StartRumble, BTL_RUMBLE_HIT_MAX)
727 SetF(LVar0, Float(1.0))
728 SetF(LVar1, Float(1.0))
729 Loop(10)
730 AddF(LVar0, Float(0.1))
731 SubF(LVar1, Float(0.08))
732 Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, Float(1.0))
733 Wait(1)
734 EndLoop
735 Wait(45)
736 Loop(5)
737 SubF(LVar0, Float(0.22))
738 AddF(LVar1, Float(0.2))
739 Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, Float(1.0))
740 Wait(1)
741 EndLoop
742 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
743 Return
744 End
745};
746
747// Lakilester-specific reaction to being hit by an attack
748// (in) LVar1: hurt loop animID
749// (in) LVar2: hurt end animID
770
771// Partner reaction to being hit by an attack
772// (in) LVar1: hurt loop animID
773// (in) LVar2: hurt end animID
776 IfNe(LVar2, 0)
777 Call(SetAnimation, ACTOR_PARTNER, -1, LVar2)
778 Wait(8)
779 EndIf
780 Return
781 End
782};
783
784// Partner reaction to being hit by an attack dealing no damage
785// (in) LVar0: part idx
786// (in) LVar1: hurt loop animID
788 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
789 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
790 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
791 Wait(1)
792 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
793 Wait(1)
794 Call(AddActorPos, ACTOR_SELF, -4, 0, 0)
795 Wait(1)
796 Call(AddActorPos, ACTOR_SELF, 4, 0, 0)
797 Wait(1)
798 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
799 Wait(1)
800 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
801 Wait(1)
802 Call(AddActorPos, ACTOR_SELF, -3, 0, 0)
803 Wait(1)
804 Call(AddActorPos, ACTOR_SELF, 3, 0, 0)
805 Wait(1)
806 Call(AddActorPos, ACTOR_SELF, -2, 0, 0)
807 Wait(1)
808 Call(AddActorPos, ACTOR_SELF, 2, 0, 0)
809 Wait(1)
810 Call(AddActorPos, ACTOR_SELF, -1, 0, 0)
811 Wait(1)
812 Call(AddActorPos, ACTOR_SELF, 1, 0, 0)
813 Wait(1)
814 Return
815 End
816};
817
818// Internal script for animating player hit by an attack
819// (in) LVar0: damage intensity (unused)
820// (in) LVar1: hurt loop animID
821// (in) LVar2: hurt end animID (unused)
823 Call(SetAnimation, ACTOR_PLAYER, 0, LVar1)
824 Call(GetDamageIntensity)
827 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
828 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
829 Wait(1)
830 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
831 Wait(1)
832 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
833 Wait(1)
834 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
835 Wait(1)
836 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
837 Wait(1)
838 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
839 Wait(1)
840 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
841 Wait(1)
842 Loop(2)
843 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
844 Wait(1)
845 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
846 Wait(1)
847 EndLoop
848 Loop(4)
849 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
850 Wait(1)
851 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
852 Wait(1)
853 EndLoop
854 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
855 Wait(10)
857 Call(StartRumble, BTL_RUMBLE_HIT_LIGHT)
858 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
859 Wait(1)
860 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
861 Wait(1)
862 Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0)
863 Wait(1)
864 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
865 Wait(1)
866 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
867 Wait(1)
868 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
869 Wait(1)
870 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
871 Wait(1)
872 Loop(2)
873 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
874 Wait(1)
875 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
876 Wait(1)
877 EndLoop
878 Loop(6)
879 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
880 Wait(1)
881 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
882 Wait(1)
883 EndLoop
884 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
885 Wait(10)
887 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
888 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
889 Wait(1)
890 Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0)
891 Wait(1)
892 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
893 Wait(1)
894 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
895 Wait(1)
896 Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0)
897 Wait(1)
898 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
899 Wait(1)
900 Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0)
901 Wait(1)
902 Loop(2)
903 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
904 Wait(1)
905 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
906 Wait(1)
907 EndLoop
908 Loop(6)
909 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
910 Wait(1)
911 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
912 Wait(1)
913 EndLoop
914 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
915 Wait(10)
917 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
918 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
919 Wait(1)
920 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
921 Wait(1)
922 Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0)
923 Wait(1)
924 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
925 Wait(1)
926 Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0)
927 Wait(1)
928 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
929 Wait(1)
930 Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0)
931 Wait(1)
932 Loop(2)
933 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
934 Wait(1)
935 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
936 Wait(1)
937 EndLoop
938 Loop(6)
939 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
940 Wait(1)
941 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
942 Wait(1)
943 EndLoop
944 Loop(2)
945 Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0)
946 Wait(1)
947 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
948 Wait(1)
949 EndLoop
950 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
951 Wait(10)
953 Return
954 End
955};
956
958 Call(StartRumble, BTL_RUMBLE_HIT_MAX)
959 SetF(LVar0, Float(1.0))
960 SetF(LVar1, Float(1.0))
961 Loop(10)
962 AddF(LVar0, Float(0.1))
963 SubF(LVar1, Float(0.08))
964 Call(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, Float(1.0))
965 Wait(1)
966 EndLoop
967 Wait(45)
968 Loop(5)
969 SubF(LVar0, Float(0.22))
970 AddF(LVar1, Float(0.2))
971 Call(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, Float(1.0))
972 Wait(1)
973 EndLoop
974 Call(SetActorScale, ACTOR_PLAYER, Float(1.0), Float(1.0), Float(1.0))
975 Return
976 End
977};
978
981 Set(LVar0, 0)
982 Loop(10)
983 Add(LVar0, 36)
984 Call(SetActorYaw, ACTOR_SELF, LVar0)
985 Wait(1)
986 EndLoop
988 Call(GetDamageIntensity)
990 Return
991 End
992};
993
996 Set(LVar0, 0)
997 Loop(10)
998 Add(LVar0, -36)
999 Call(SetActorYaw, ACTOR_SELF, LVar0)
1000 Wait(1)
1001 EndLoop
1003 Call(GetDamageIntensity)
1005 Return
1006 End
1007};
1008
1011 Call(MakeLerp, 0, 2160, 60, EASING_COS_IN_OUT)
1012 Label(1)
1014 Call(SetActorYaw, ACTOR_SELF, LVar0)
1015 Wait(1)
1016 IfEq(LVar1, 1)
1017 Goto(1)
1018 EndIf
1020 Call(GetDamageIntensity)
1022 Wait(40)
1023 Return
1024 End
1025};
1026
1029 Call(MakeLerp, 2160, 0, 60, EASING_COS_IN_OUT)
1030 Label(1)
1032 Call(SetActorYaw, ACTOR_SELF, LVar0)
1033 Wait(1)
1034 IfEq(LVar1, 1)
1035 Goto(1)
1036 EndIf
1038 Call(GetDamageIntensity)
1040 Wait(40)
1041 Return
1042 End
1043};
1044
1045// Player reaction to being hit by an attack, handling different damage sources
1046// (in) LVar1: hurt loop animID
1047// (in) LVar2: hurt end animID
1086
1087// Player reaction to being hit which ignores damage source
1088// (in) LVar1: hurt loop animID
1089// (in) LVar2: hurt end animID
1092 IfNe(LVar2, 0)
1093 Call(SetAnimation, ACTOR_PLAYER, 0, LVar2)
1094 Wait(8)
1095 EndIf
1096 Return
1097 End
1098};
1099
1100// Player reaction to being hit by an attack dealing no damage
1101// (in) LVar0: part idx
1102// (in) LVar1: hurt loop animID
1104 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1105 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1106 Call(GetStatusFlags, ACTOR_PLAYER, LVar0)
1108 Call(SetAnimation, ACTOR_PLAYER, 0, LVar1)
1109 EndIf
1110 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1111 Wait(1)
1112 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1113 Wait(1)
1114 Call(SetActorDispOffset, ACTOR_SELF, -4, 0, 0)
1115 Wait(1)
1116 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1117 Wait(1)
1118 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1119 Wait(1)
1120 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1121 Wait(1)
1122 Call(SetActorDispOffset, ACTOR_SELF, -3, 0, 0)
1123 Wait(1)
1124 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1125 Wait(1)
1126 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1127 Wait(1)
1128 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1129 Wait(1)
1130 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
1131 Wait(1)
1132 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1133 Wait(1)
1134 Call(GetDamageSource, LVar0)
1135 Switch(LVar0)
1137 Wait(15)
1138 EndSwitch
1139 Return
1140 End
1141};
1142
1144 Call(GetOwnerID, LVarA)
1145 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1146 Call(InitTargetIterator)
1147 Label(0)
1148 Call(GetOwnerTarget, LVar0, LVar1)
1149 IfNe(LVar0, LVarA)
1150 Call(GetOriginalActorType, LVar0, LVar2)
1151 IfNe(LVar2, ACTOR_TYPE_DRY_BONES)
1152 Return
1153 EndIf
1154 EndIf
1155 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1157 Goto(0)
1158 EndIf
1159 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1160 Call(InitTargetIterator)
1161 Label(1)
1162 Call(GetOwnerTarget, LVar0, LVar1)
1163 IfNe(LVar0, LVarA)
1164 Call(GetActorVar, LVar0, 8, LVar3)
1165 IfNe(LVar3, 1)
1166 Return
1167 EndIf
1168 EndIf
1169 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1171 Goto(1)
1172 EndIf
1173 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1174 Call(InitTargetIterator)
1175 Label(2)
1176 Call(GetOwnerTarget, LVar0, LVar1)
1177 Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE)
1178 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1180 Goto(2)
1181 EndIf
1182 Return
1183 End
1184};
1185
1187 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_HIT)
1188 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1189 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
1190 DivF(LVar3, Float(40.0))
1191 IfLt(LVar3, 1)
1192 SetF(LVar3, Float(1.0))
1193 EndIf
1194 Call(GetStatusFlags, ACTOR_SELF, LVar5)
1196 MulF(LVar3, Float(0.4))
1197 EndIf
1198 Call(GetActorFlags, ACTOR_SELF, LVar6)
1200 Call(GetActorSize, ACTOR_SELF, LVar7, LVar8)
1201 Sub(LVar1, LVar7)
1202 EndIf
1203 Sub(LVar1, 3)
1204 PlayEffect(EFFECT_WHIRLWIND, 0, LVar0, LVar1, LVar2, LVar3)
1205 Call(GetDamageSource, LVar0)
1206 Switch(LVar0)
1209 Wait(10)
1214 Wait(40)
1216 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_END)
1218 EndSwitch
1219 Return
1220 End
1221};
1222
1224 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1225 Call(GetDamageSource, LVar2)
1226 Switch(LVar2)
1228 Call(GetOriginalActorType, ACTOR_SELF, LVar5)
1229 Switch(LVar5)
1230 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1231 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1234 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1235 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
1236 Add(LVar1, 55)
1237 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1238 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1239 EndSwitch
1240 Set(LVar5, 0)
1241 Loop(30)
1242 Add(LVar5, 48)
1243 Call(SetActorYaw, ACTOR_SELF, LVar5)
1244 Wait(1)
1245 EndLoop
1246 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1247 Switch(LVar7)
1248 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1249 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1250 Wait(30)
1253 Sub(LVar1, 55)
1254 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
1255 IfEq(LVar1, 0)
1256 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1257 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1258 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1259 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1260 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1261 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1262 Else
1263 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1264 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1265 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1266 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1267 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1268 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
1269 EndIf
1270 EndSwitch
1275 EndIf
1277 Set(LVar0, 0)
1278 Loop(10)
1279 Add(LVar0, 36)
1280 Call(SetActorYaw, ACTOR_SELF, LVar0)
1281 Wait(1)
1282 EndLoop
1284 Call(GetDamageIntensity)
1291 EndIf
1293 Call(MakeLerp, 0, 0x00000870, 60, EASING_COS_IN_OUT)
1294 Label(0)
1296 Call(SetActorYaw, ACTOR_SELF, LVar0)
1297 Wait(1)
1298 IfEq(LVar1, 1)
1299 Goto(0)
1300 EndIf
1302 Call(GetDamageIntensity)
1304 Wait(60)
1310 EndIf
1312 Set(LVar0, 360)
1313 Loop(10)
1314 Sub(LVar0, 36)
1315 Call(SetActorYaw, ACTOR_SELF, LVar0)
1316 Wait(1)
1317 EndLoop
1319 Call(GetDamageIntensity)
1326 EndIf
1328 Call(MakeLerp, 0x00000870, 0, 60, EASING_COS_IN_OUT)
1329 Label(1)
1331 Call(SetActorYaw, ACTOR_SELF, LVar0)
1332 Wait(1)
1333 IfEq(LVar1, 1)
1334 Goto(1)
1335 EndIf
1337 Call(GetDamageIntensity)
1339 Wait(60)
1346 Call(GetDamageIntensity)
1348 Label(2)
1349 Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2)
1350 Mod(LVar1, 360)
1351 IfNe(LVar1, 0)
1352 Wait(1)
1353 Goto(2)
1354 EndIf
1356 Call(SetActorYaw, ACTOR_SELF, 0)
1358 Call(GetDamageIntensity)
1360 EndSwitch
1361 Return
1362 End
1363};
1364
1365// Enemy shakes in reaction to being hit
1366// (in) LVar0: damage intensity
1368 Switch(LVar0)
1369 CaseEq(0)
1370 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
1371 Wait(1)
1372 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
1373 Wait(1)
1374 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
1375 Wait(1)
1376 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
1377 Wait(1)
1378 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
1379 Wait(1)
1380 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
1381 Wait(1)
1382 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
1383 Wait(1)
1384 Loop(2)
1385 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
1386 Wait(1)
1387 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1388 Wait(1)
1389 EndLoop
1390 Loop(4)
1391 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
1392 Wait(1)
1393 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1394 Wait(1)
1395 EndLoop
1396 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1397 CaseEq(1)
1398 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
1399 Wait(1)
1400 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
1401 Wait(1)
1402 Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0)
1403 Wait(1)
1404 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
1405 Wait(1)
1406 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
1407 Wait(1)
1408 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
1409 Wait(1)
1410 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
1411 Wait(1)
1412 Loop(2)
1413 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
1414 Wait(1)
1415 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1416 Wait(1)
1417 EndLoop
1418 Loop(6)
1419 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
1420 Wait(1)
1421 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1422 Wait(1)
1423 EndLoop
1424 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1425 CaseEq(2)
1426 Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
1427 Wait(1)
1428 Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0)
1429 Wait(1)
1430 Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0)
1431 Wait(1)
1432 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
1433 Wait(1)
1434 Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0)
1435 Wait(1)
1436 Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0)
1437 Wait(1)
1438 Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0)
1439 Wait(1)
1440 Loop(2)
1441 Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
1442 Wait(1)
1443 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1444 Wait(1)
1445 EndLoop
1446 Loop(6)
1447 Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0)
1448 Wait(1)
1449 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1450 Wait(1)
1451 EndLoop
1452 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1453 CaseEq(3)
1454 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
1455 Wait(1)
1456 Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
1457 Wait(1)
1458 Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0)
1459 Wait(1)
1460 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
1461 Wait(1)
1462 Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0)
1463 Wait(1)
1464 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
1465 Wait(1)
1466 Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0)
1467 Wait(1)
1468 Loop(2)
1469 Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0)
1470 Wait(1)
1471 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1472 Wait(1)
1473 EndLoop
1474 Loop(6)
1475 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
1476 Wait(1)
1477 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1478 Wait(1)
1479 EndLoop
1480 Loop(2)
1481 Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0)
1482 Wait(1)
1483 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1484 Wait(1)
1485 EndLoop
1486 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1487 EndSwitch
1488 Return
1489 End
1490};
1491
1493 Call(GetLastEvent, ACTOR_SELF, LVar3)
1495 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1496 EndIf
1497 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1498 Call(GetDamageSource, LVar3)
1499 Switch(LVar3)
1501 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1502 Switch(LVar7)
1503 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1504 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1507 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1508 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
1509 Add(LVar5, 55)
1510 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1511 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE)
1512 EndSwitch
1513 Set(LVar7, 0)
1514 Loop(30)
1515 Add(LVar7, 48)
1516 Call(SetActorYaw, ACTOR_SELF, LVar7)
1517 Wait(1)
1518 EndLoop
1519 Call(GetOriginalActorType, ACTOR_SELF, LVar7)
1520 Switch(LVar7)
1521 CaseOrEq(ACTOR_TYPE_MONTY_MOLE)
1522 CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS)
1523 Wait(30)
1526 Sub(LVar5, 55)
1527 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
1528 IfEq(LVar5, 0)
1529 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1530 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1531 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1532 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1533 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1534 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1535 Else
1536 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1537 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1538 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1539 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
1540 Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1541 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
1542 EndIf
1543 EndSwitch
1545 Wait(20)
1546 EndSwitch
1547 IfNe(LVar2, -1)
1548 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
1549 EndIf
1550 Wait(10)
1551 Call(GetLastEvent, ACTOR_SELF, LVar1)
1552 Switch(LVar1)
1554 Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
1556 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1557 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
1558 Call(GetStatusFlags, ACTOR_SELF, LVar5)
1560 MulF(LVar3, Float(0.4))
1561 MulF(LVar4, Float(0.4))
1562 EndIf
1563 DivF(LVar3, Float(2.0))
1564 Call(GetActorFlags, ACTOR_SELF, LVar5)
1566 SubF(LVar1, LVar3)
1567 Else
1568 AddF(LVar1, LVar3)
1569 EndIf
1570 AddF(LVar2, Float(5.0))
1571 DivF(LVar3, Float(10.0))
1572 Call(GetStatusFlags, ACTOR_SELF, LVar5)
1574 MulF(LVar3, Float(0.4))
1575 IfLt(LVar3, 1)
1576 SetF(LVar3, Float(1.0))
1577 EndIf
1578 EndIf
1579 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10)
1580 EndIf
1582 EndSwitch
1583 Return
1584 End
1585};
1586
1588 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1589 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1590 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1592 Return
1593 End
1594};
1595
1597 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1598 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1599 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
1600 SetF(LVar5, LVar3)
1601 DivF(LVar5, Float(20.0))
1602 AddF(LVar1, LVar5)
1603 PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, FX_SHOCK_OVERLAY_SHOCK_HIT, LVar0, LVar1, LVar2, LVar4, LVar3)
1604 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK)
1605 Call(HideHealthBar, ACTOR_SELF)
1606 Call(HPBarToCurrent, ACTOR_SELF)
1607 Call(ShowHealthBar, ACTOR_SELF)
1608 Call(AddActorPos, ACTOR_SELF, 0, 1, 0)
1609 Call(AddEffectOffset, LVarF, 0, 1, 0)
1610 Wait(1)
1611 Call(AddActorPos, ACTOR_SELF, 0, 3, 0)
1612 Call(AddEffectOffset, LVarF, 0, 3, 0)
1613 Wait(1)
1614 Call(AddActorPos, ACTOR_SELF, 0, 12, 0)
1615 Call(AddEffectOffset, LVarF, 0, 12, 0)
1616 Wait(1)
1617 Call(AddActorPos, ACTOR_SELF, 0, -8, 0)
1618 Call(AddEffectOffset, LVarF, 0, -8, 0)
1619 Wait(1)
1620 Call(AddActorPos, ACTOR_SELF, 0, 12, 0)
1621 Call(AddEffectOffset, LVarF, 0, 12, 0)
1622 Wait(1)
1623 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
1624 Call(AddEffectOffset, LVarF, 0, -4, 0)
1625 Wait(1)
1626 Call(AddActorPos, ACTOR_SELF, 0, -4, 0)
1627 Call(AddEffectOffset, LVarF, 0, -4, 0)
1628 Wait(1)
1629 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1630 Call(AddEffectOffset, LVarF, 0, -6, 0)
1631 Wait(1)
1632 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1633 Call(AddEffectOffset, LVarF, 0, -6, 0)
1634 Wait(1)
1635 Call(AddActorPos, ACTOR_SELF, 0, 6, 0)
1636 Call(AddEffectOffset, LVarF, 0, 6, 0)
1637 Wait(1)
1638 Call(AddActorPos, ACTOR_SELF, 0, -6, 0)
1639 Call(AddEffectOffset, LVarF, 0, -6, 0)
1640 Wait(1)
1641 Loop(6)
1642 Call(AddActorPos, ACTOR_SELF, 0, 2, 0)
1643 Call(AddEffectOffset, LVarF, 0, 2, 0)
1644 Wait(1)
1645 Call(AddActorPos, ACTOR_SELF, 0, -2, 0)
1646 Call(AddEffectOffset, LVarF, 0, -2, 0)
1647 Wait(1)
1648 EndLoop
1649 Wait(5)
1650 Call(HideHealthBar, ACTOR_SELF)
1651 Call(HPBarToHome, ACTOR_SELF)
1652 Call(GetLastEvent, ACTOR_SELF, LVar0)
1654 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1655 EndIf
1656 Return
1657 End
1658};
1659
1660// Enemy reaction to being hit by an attack dealing no damage
1661// (in) LVar0: part idx
1662// (in) LVar1: hurt loop animID
1664 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1665 Call(GetStatusFlags, ACTOR_SELF, LVar2)
1667 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1668 EndIf
1669 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1670 Wait(1)
1671 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1672 Wait(1)
1673 Call(SetActorDispOffset, ACTOR_SELF, -4, 0, 0)
1674 Wait(1)
1675 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1676 Wait(1)
1677 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1678 Wait(1)
1679 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1680 Wait(1)
1681 Call(SetActorDispOffset, ACTOR_SELF, -3, 0, 0)
1682 Wait(1)
1683 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1684 Wait(1)
1685 Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0)
1686 Wait(1)
1687 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1688 Wait(1)
1689 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
1690 Wait(1)
1691 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1692 Wait(1)
1693 Return
1694 End
1695};
1696
1699 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1701 Call(RemoveActor, ACTOR_SELF)
1702 Return
1703 End
1704};
1705
1706// in LVar2: if set to EXEC_DEATH_NO_SPINNING, the actor will not spin around
1708 Call(HideHealthBar, ACTOR_SELF)
1709 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1710 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1711 IfNe(LVar1, -1)
1712 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1713 Wait(10)
1714 EndIf
1715 Call(GetDamageSource, LVar5)
1716 Switch(LVar5)
1728 Set(LFlag0, FALSE)
1729 Call(GetOriginalActorType, ACTOR_SELF, LVar1)
1730 Switch(LVar1)
1731 CaseOrEq(ACTOR_TYPE_BOB_OMB)
1732 CaseOrEq(ACTOR_TYPE_BULLET_BILL)
1733 CaseOrEq(ACTOR_TYPE_BOMBSHELL_BILL)
1736 EndSwitch
1737 IfNe(LVar2, EXEC_DEATH_NO_SPINNING) // special signal value
1738 Set(LVar2, 0)
1739 Loop(24)
1740 Call(SetActorYaw, ACTOR_SELF, LVar2)
1741 Add(LVar2, 30)
1742 Wait(1)
1743 EndLoop
1744 Call(SetActorYaw, ACTOR_SELF, 0)
1745 EndIf
1746 EndSwitch
1747 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1748 Add(LVar1, 10)
1749 Add(LVar2, 10)
1750 PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2)
1751 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH)
1752 Call(DropStarPoints, ACTOR_SELF)
1753 Call(SetActorYaw, ACTOR_SELF, 0)
1754 Set(LVar3, 0)
1755 Loop(12)
1756 Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0)
1757 Add(LVar3, 8)
1758 Wait(1)
1759 EndLoop
1760 Return
1761 End
1762};
1763
1765 Call(HideHealthBar, ACTOR_SELF)
1766 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1767 Call(SetAnimation, ACTOR_SELF, LVar0, LVar2)
1768 Call(GetActorFlags, ACTOR_SELF, LVar9)
1769 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05))
1770 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1771 Set(LVarD, LVarB)
1772 Add(LVarD, 20)
1774 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC)
1775 Call(JumpToGoal, ACTOR_SELF, 3, FALSE, FALSE, FALSE)
1776 Wait(20)
1777 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1778 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1779 Call(FallToGoal, ACTOR_SELF, 7)
1780 Else
1781 Wait(15)
1782 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1783 EndIf
1784 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1785 Wait(17)
1786 Call(SetActorYaw, ACTOR_SELF, 180)
1787 Wait(3)
1788 Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
1789 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
1790 Add(LVarA, 300)
1791 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1792 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1794 Call(HideHealthBar, ACTOR_SELF)
1795 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1796 Call(RemoveActor, ACTOR_SELF)
1797 Return
1798 End
1799};
1800
1802 Call(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY)
1803 Call(InitTargetIterator)
1804 Label(0)
1805 Call(GetOwnerID, LVar1)
1806 Call(GetOwnerTarget, LVar0, LVar9)
1807 IfNe(LVar1, LVar0)
1808 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1809 Goto(0)
1810 EndIf
1811 Label(1)
1812 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1814 Goto(10)
1815 EndIf
1816 Call(GetOwnerTarget, LVar0, LVar9)
1817 Call(GetActorFlags, LVar0, LVar1)
1819 Goto(1)
1820 EndIf
1821 Call(GetStatusFlags, LVar0, LVar9)
1823 Goto(1)
1824 EndIf
1825 Call(SetGoalToTarget, ACTOR_SELF)
1826 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1827 Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
1828 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1))
1829 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
1830 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
1832 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0))
1834 Call(SetGoalToTarget, ACTOR_SELF)
1835 Call(GetOwnerTarget, LVar0, LVar1)
1836 Call(GetOriginalActorType, LVar0, LVar1)
1837 Switch(LVar1)
1838 CaseOrEq(ACTOR_TYPE_POKEY)
1839 CaseOrEq(ACTOR_TYPE_POKEY_MUMMY)
1840 CaseOrEq(ACTOR_TYPE_UNUSED_69)
1841 Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT)
1842 Goto(1)
1844 EndSwitch
1846 Goto(1)
1847 // done
1848 Label(10)
1850 Wait(20)
1851 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
1853 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1))
1854 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
1855 Call(SetGoalPos, ACTOR_SELF, 296, 0, 0)
1856 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
1857 Return
1858 End
1859};
1860
1862 Set(LVar0, 0)
1863 Label(0)
1864 Sub(LVar0, 30)
1865 IfLt(LVar0, 0)
1866 Add(LVar0, 360)
1867 EndIf
1868 Call(SetActorYaw, ACTOR_SELF, LVar0)
1869 Wait(1)
1870 Goto(0)
1871 Return
1872 End
1873};
1874
1876 Call(GetActorSize, ACTOR_SELF, LVar0, LVar1)
1877 Mul(LVar0, LVar1)
1878 Switch(LVar0)
1879 CaseLt(1000)
1881 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.3))
1883 CaseLt(2000)
1885 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.6))
1889 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.9))
1891 EndSwitch
1892 Return
1893 End
1894};
1895
1898 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1899 Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
1901 Call(SetActorPos, ACTOR_SELF, -200, 30, 0)
1902 Call(SetGoalToHome, ACTOR_SELF)
1903 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.4))
1904 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
1905 Call(AddGoalPos, ACTOR_SELF, -30, 0, 0)
1906 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
1908 Call(AddGoalPos, ACTOR_SELF, 20, 0, 0)
1909 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1911 Call(AddGoalPos, ACTOR_SELF, 10, 0, 0)
1912 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
1914 Wait(15)
1915 Label(0)
1916 Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2)
1917 Mod(LVar1, 360)
1918 IfNe(LVar1, 0)
1919 Wait(1)
1920 Goto(0)
1921 EndIf
1923 Call(SetActorYaw, ACTOR_SELF, 0)
1924 Return
1925 End
1926};
1927
1929 Set(LVarA, LVar0)
1930 Set(LVarB, LVar1)
1931 Set(LVarC, LVar2)
1932 Call(SetAnimation, ACTOR_SELF, LVarA, LVarB)
1933 Set(LVar0, 0)
1934 Set(LVar1, 0)
1935 Set(LVar2, 0)
1936 Loop(5)
1937 Add(LVar0, 30)
1938 Add(LVar1, 4)
1939 Add(LVar2, -2)
1940 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1941 Call(SetActorDispOffset, ACTOR_SELF, LVar2, LVar1, 0)
1942 Wait(1)
1943 EndLoop
1944 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1945 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1946 Call(SetAnimation, ACTOR_SELF, LVarA, LVarC)
1947 Set(LVar2, -10)
1948 Loop(5)
1949 Add(LVar2, 2)
1950 Call(SetActorDispOffset, ACTOR_SELF, LVar2, 0, 0)
1951 Wait(1)
1952 EndLoop
1953 Return
1954 End
1955};
1956
1958 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1959 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1960 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1961 Set(LVar1, 0)
1962 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1963 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4))
1964 Call(AddGoalPos, ACTOR_SELF, 30, 0, 0)
1965 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1966 Call(AddGoalPos, ACTOR_SELF, 15, 0, 0)
1967 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
1968 Call(AddGoalPos, ACTOR_SELF, 5, 0, 0)
1969 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1970 Return
1971 End
1972};
1973
1975 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1976 Call(SetGoalToHome, ACTOR_SELF)
1977 Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF)
1979 IfGe(LVar9, Float(8.0))
1980 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1981 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1982 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1983 EndIf
1984 Call(SetActorYaw, ACTOR_SELF, 0)
1985 Return
1986 End
1987};
1988
1990 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1991 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1992 Call(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1993 Call(GetActorFlags, ACTOR_SELF, LVar0)
1995 Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1996 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
1997 Else
1998 Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9)
1999 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
2000 EndIf
2001 Return
2002 End
2003};
2004
2005// (in) LVar0: part idx
2006// (in) LVar1: hopping animID
2008 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2009 Call(SetGoalToHome, ACTOR_SELF)
2010 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2011 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
2012 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
2014 Return
2015 End
2016};
2017
2018// (in) LVar0: target posX
2019// (in) LVar1: target posY
2020// (in) LVar2: target posZ
2022 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2023 Label(0)
2024 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2025 IfEq(LVar3, LVar0)
2026 Goto(10)
2027 EndIf
2028 IfLt(LVar3, LVar0)
2029 Set(LVar4, LVar0)
2030 Sub(LVar4, LVar3)
2031 IfLt(LVar4, 30)
2032 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2033 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
2034 Else
2035 Set(LVar4, LVar3)
2036 Add(LVar3, 30)
2037 Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2)
2038 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
2039 EndIf
2040 Else
2041 Set(LVar4, LVar3)
2042 Sub(LVar4, LVar0)
2043 IfLt(LVar4, 30)
2044 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
2045 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
2046 Else
2047 Sub(LVar3, 30)
2048 Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2)
2049 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
2050 EndIf
2051 EndIf
2052 Goto(0)
2053 Label(10)
2054 Return
2055 End
2056};
2057
2059 Call(GetStatusFlags, ACTOR_SELF, LVar2)
2061 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2062 Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(2.0))
2063 Loop(10)
2064 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
2065 Call(GetActorSize, ACTOR_SELF, LVar6, LVar7)
2066 Add(LVar4, LVar6)
2067 PlayEffect(EFFECT_SWEAT, 0, LVar3, LVar4, LVar5, 5, -45, 20)
2068 Wait(10)
2069 EndLoop
2070 Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(1.0))
2071 EndIf
2072 Return
2073 End
2074};
2075
2077 Call(GetStatusFlags, ACTOR_SELF, LVar5)
2079 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2080 Else
2081 Set(LFlag0, FALSE)
2084 Set(LFlag0, TRUE)
2085 EndIf
2086 EndIf
2089 Set(LFlag0, TRUE)
2090 EndIf
2091 EndIf
2094 Set(LFlag0, TRUE)
2095 EndIf
2096 EndIf
2099 Set(LFlag0, TRUE)
2100 EndIf
2101 EndIf
2104 Set(LFlag0, TRUE)
2105 EndIf
2106 EndIf
2109 Set(LFlag0, TRUE)
2110 EndIf
2111 EndIf
2114 Set(LFlag0, TRUE)
2115 EndIf
2116 EndIf
2118 Set(LFlag0, TRUE)
2119 EndIf
2122 Set(LFlag0, TRUE)
2123 EndIf
2124 EndIf
2127 Set(LFlag0, TRUE)
2128 EndIf
2129 EndIf
2130 IfEq(LFlag0, TRUE)
2131 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
2132 EndIf
2133 EndIf
2135 Wait(1000)
2136 Return
2137 End
2138};
Bytecode EvtScript[]
@ FX_SHOCK_OVERLAY_SHOCK_HIT
Definition effects.h:1263
EffectData data
Definition effects.h:2605
struct ShockOverlayFXData * flashingBoxShockwave
Definition effects.h:2538
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ DAMAGE_INTENSITY_EXTREME
Definition enums.h:3509
@ DAMAGE_INTENSITY_LIGHT
Definition enums.h:3506
@ DAMAGE_INTENSITY_HEAVY
Definition enums.h:3508
@ DAMAGE_INTENSITY_MEDIUM
Definition enums.h:3507
@ ACTOR_EVENT_FLAG_FIREY
Player takes burn damage upon contact.
Definition enums.h:3371
@ ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
Blast and fire attacks trigger an explosion.
Definition enums.h:3377
@ BTL_CAM_RETURN_HOME
Definition enums.h:4826
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_PARTNER_HIT_SPIKE
Definition enums.h:4883
@ BTL_CAM_PARTNER_HIT_HAZARD
Definition enums.h:4884
@ TARGET_FLAG_PRIMARY_ONLY
Definition enums.h:1863
@ TARGET_FLAG_ALLOW_TARGET_ONLY
Definition enums.h:1864
@ TARGET_FLAG_GROUND
Definition enums.h:1851
@ TARGET_FLAG_2
Definition enums.h:1850
@ SUPPRESS_EVENT_ALL
Definition enums.h:2907
@ EASING_COS_IN_OUT
Definition enums.h:520
@ STATUS_FLAG_FEAR
Definition enums.h:2815
@ STATUS_FLAG_FROZEN
Definition enums.h:2814
@ STATUS_FLAG_STATIC
Definition enums.h:2813
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_PARALYZE
Definition enums.h:2816
@ STATUS_FLAG_STONE
Definition enums.h:2820
@ STATUS_FLAG_KO
Definition enums.h:2823
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_TRANSPARENT
Definition enums.h:2825
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ DMG_SRC_CRUSH
Definition enums.h:2012
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:1999
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2001
@ DMG_SRC_NEXT_FAN_SMACK_LEFT
Definition enums.h:2002
@ DMG_SRC_LAST_FAN_SMACK_LEFT
Definition enums.h:2004
@ DMG_SRC_LEECH
Definition enums.h:1989
@ DMG_SRC_DEFAULT
Definition enums.h:1988
@ DMG_SRC_POWER_SHELL
Definition enums.h:1995
@ DMG_SRC_TUBBA_SMASH
Definition enums.h:2011
@ DMG_SRC_SPIN_SMASH
Definition enums.h:1990
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:1998
@ DMG_SRC_FIRE_SHELL
Definition enums.h:1997
@ DMG_SRC_TUTORIAL_GOOMBARIO
Definition enums.h:1993
@ DMG_SRC_CRUSH_PARTNER
Definition enums.h:2013
@ DMG_SRC_INK_BLAST
Definition enums.h:2014
@ DMG_SRC_NEXT_FAN_SMACK_RIGHT
Definition enums.h:2003
@ DMG_SRC_SPOOK
Definition enums.h:2006
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2000
@ DMG_SRC_LAST_FAN_SMACK_RIGHT
Definition enums.h:2005
@ SOUND_ACTOR_DEATH
Definition enums.h:1293
@ SOUND_FAN_SMACK_END
Definition enums.h:1344
@ SOUND_HIT_SHOCK
Definition enums.h:1195
@ SOUND_FAN_SMACK_HIT
Definition enums.h:1343
@ BTL_RUMBLE_HIT_HEAVY
Definition enums.h:4256
@ BTL_RUMBLE_HIT_LIGHT
Definition enums.h:4255
@ BTL_RUMBLE_HIT_MAX
Definition enums.h:4258
@ BTL_RUMBLE_HIT_EXTREME
Definition enums.h:4257
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
Definition enums.h:3331
@ ACTOR_FLAG_TARGET_ONLY
Battle ends even if undefeated. No turn.
Definition enums.h:3334
@ ACTOR_FLAG_NO_DMG_APPLY
Damage is not applied to actor HP.
Definition enums.h:3340
@ ACTOR_FLAG_NO_ATTACK
Skip attack turn.
Definition enums.h:3339
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
@ EVENT_SPIN_SMASH_LAUNCH_HIT
Definition enums.h:2138
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2877
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
ApiStatus GetDist2D(Evt *script, b32 isInitialCall)
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus RemoveEffect(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus DismissEffect(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 Mul(VAR, INT_VALUE)
Definition macros.h:378
#define DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#define IfGe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR >= RVAR.
Definition macros.h:284
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:383
#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 EndChildThread
Marks the end of a child thread block.
Definition macros.h:563
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define LVarF
Definition macros.h:163
#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 Mod(VAR, INT_VALUE)
Definition macros.h:380
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#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 LVarC
Definition macros.h:160
#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 LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#define KillThread(TID)
Kills a thread by its thread ID.
Definition macros.h:510
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#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 MulF(VAR, FLOAT_VALUE)
Definition macros.h:385
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
Definition macros.h:292
#define LVarD
Definition macros.h:161
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
Definition macros.h:460
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define SubF(VAR, FLOAT_VALUE)
Definition macros.h:384
#define PlayEffect(args...)
Definition macros.h:807
#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 CaseLt(RVAR)
Marks the start of a switch case that executes only if LVAR < RVAR. It also marks the end of any prev...
Definition macros.h:325
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVarE
Definition macros.h:162
#define LVar0
Definition macros.h:148
#define Exec(EVT_SOURCE)
Launches a new thread.
Definition macros.h:455
#define Return
Kills the current EVT thread.
Definition macros.h:217
#define EXEC_DEATH_NO_SPINNING
Definition battle.h:263
EvtScript EVS_Enemy_ReturnHome
EvtScript EVS_Player_NoDamageHit
EvtScript EVS_Partner_Hit
EvtScript EVS_Partner_Recover
EvtScript EVS_Player_SimpleHit
EvtScript EVS_Partner_UnusedShockHit
EvtScript EVS_Enemy_DeathWithoutRemove
EvtScript EVS_Enemy_SpinSmash_HitNext
EvtScript EVS_Enemy_SpinSmash_ShakeCam
EvtScript EVS_Partner_BurnContact
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_HopToPos
EvtScript EVS_Player_NextSlapLeft_Impl
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Partner_Drop
EvtScript EVS_Partner_NoDamageHit
EvtScript EVS_Enemy_FanSmack_Impl
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit_Impl
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Partner_ShockHit
EvtScript EVS_Enemy_HopHome
EvtScript EVS_Enemy_FlipBackUp
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_Hit_Impl
EvtScript EVS_ForceNextTarget
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Partner_BurnHit
EvtScript EVS_Player_ComplexHit
EvtScript EVS_Enemy_Recover
EvtScript EVS_Partner_Crushed_Impl
EvtScript EVS_Partner_BombetteSpikeContact
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Player_LastSlapLeft_Impl
EvtScript EVS_Partner_Hit_Impl
EvtScript EVS_Enemy_SpinAround_Impl
EvtScript EVS_Partner_Celebrate
EvtScript EVS_Player_Crushed_Impl
EvtScript EVS_Player_NextSlapRight_Impl
EvtScript EVS_Partner_SpikeContact
EvtScript EVS_Partner_LakilesterHit
EvtScript EVS_Player_LastSlapRight_Impl
EvtScript EVS_Partner_RunAway
EvtScript EVS_Player_Hit_Impl
EvtScript EVS_Enemy_NoDamageHit
BattleStatus gBattleStatus
Definition battle.c:11