Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
pokey_mummy.inc.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/npc/Pokey.h"
6
7#define NAMESPACE A(pokey_mummy)
8
9extern s32 N(FourPartAnims)[];
10extern s32 N(ThrownPartAnims)[];
11extern EvtScript N(EVS_Init);
12extern EvtScript N(EVS_TakeTurn);
13extern EvtScript N(EVS_Idle);
14extern EvtScript N(EVS_HandleEvent);
15extern EvtScript N(EVS_KnockPartAway);
16extern EvtScript N(EVS_Attack_SinglePartLeap);
17extern EvtScript N(EVS_Pokey_SpinSmashHit);
18extern EvtScript N(EVS_DecrementSize);
19extern EvtScript N(EVS_Pokey_Hit);
20extern EvtScript N(EVS_Pokey_ScareAway);
21
22// while these parts seem set up to manage Pokeys changing size, its actually all handled via animations
23// and the PRT_BODY* are always invisible
24enum N(ActorPartIDs) {
25 PRT_MAIN = 1, // top part of a 4-part Pokey
26 PRT_BODY3 = 2, // bottom part of a 4-part Pokey
27 PRT_BODY2 = 3,
28 PRT_BODY1 = 4,
29 PRT_SINGLE = 5, // single-part Pokey
30 PRT_PROJECTILE = 6, // part which is thrown
31};
32
33enum N(ActorVars) {
34 AVAR_IN_CantSummon = 1,
35 AVAR_PartsThrown = 0,
36 AVAR_Anim_Immune = 1,
37 AVAR_Anim_Run = 2,
38 AVAR_Anim_Hit = 3,
39 AVAR_Anim_Windup = 4,
40 AVAR_Anim_Throw = 5,
41 AVAR_Anim_BurnHurt = 6,
42 AVAR_Anim_BurnStill = 7,
43 AVAR_CantSummon = 9,
44 AVAR_Generation = 10,
45
46 AVAL_Generation_First = 0,
47 AVAL_Generation_Second = 1,
48 AVAL_Generation_Last = 2,
49};
50
51enum N(ActorParams) {
52 DMG_THROW_PART = 2, // throw a body part at the player
53 DMG_LEAP = 2, // jump onto the player, used when no more parts can be thrown
54};
55
56s32 N(DefenseTable)[] = {
59};
60
61s32 N(StatusTable)[] = {
84};
85
86ActorPartBlueprint N(ActorParts)[] = {
87 {
89 .index = PRT_MAIN,
90 .posOffset = { 0, 0, 0 },
91 .targetOffset = { 0, 20 },
92 .opacity = 255,
93 .idleAnimations = N(FourPartAnims),
94 .defenseTable = N(DefenseTable),
96 .elementImmunityFlags = 0,
97 .projectileTargetOffset = { 0, 0 },
98 },
99 {
101 .index = PRT_BODY3,
102 .posOffset = { 0, 0, 0 },
103 .targetOffset = { 0, 72 },
104 .opacity = 255,
105 .idleAnimations = NULL,
106 .defenseTable = N(DefenseTable),
108 .elementImmunityFlags = 0,
109 .projectileTargetOffset = { 0, -8 },
110 },
111 {
113 .index = PRT_BODY2,
114 .posOffset = { 0, 0, 0 },
115 .targetOffset = { 0, 54 },
116 .opacity = 255,
117 .idleAnimations = NULL,
118 .defenseTable = N(DefenseTable),
120 .elementImmunityFlags = 0,
121 .projectileTargetOffset = { 0, -8 },
122 },
123 {
125 .index = PRT_BODY1,
126 .posOffset = { 0, 0, 0 },
127 .targetOffset = { 0, 36 },
128 .opacity = 255,
129 .idleAnimations = NULL,
130 .defenseTable = N(DefenseTable),
132 .elementImmunityFlags = 0,
133 .projectileTargetOffset = { 0, -8 },
134 },
135 {
137 .index = PRT_SINGLE,
138 .posOffset = { 0, 0, 0 },
139 .targetOffset = { 0, 16 },
140 .opacity = 255,
141 .idleAnimations = NULL,
142 .defenseTable = N(DefenseTable),
144 .elementImmunityFlags = 0,
145 .projectileTargetOffset = { 0, -8 },
146 },
147 {
149 .index = PRT_PROJECTILE,
150 .posOffset = { 0, 0, 0 },
151 .targetOffset = { 0, 0 },
152 .opacity = 255,
153 .idleAnimations = N(ThrownPartAnims),
154 .defenseTable = N(DefenseTable),
156 .elementImmunityFlags = 0,
157 .projectileTargetOffset = { 0, 0 },
158 },
159};
160
161ActorBlueprint NAMESPACE = {
162 .flags = 0,
163 .type = ACTOR_TYPE_POKEY_MUMMY,
164 .level = ACTOR_LEVEL_POKEY_MUMMY,
165 .maxHP = 4,
166 .partCount = ARRAY_COUNT(N(ActorParts)),
167 .partsData = N(ActorParts),
168 .initScript = &N(EVS_Init),
169 .statusTable = N(StatusTable),
170 .escapeChance = 60,
171 .airLiftChance = 90,
172 .hurricaneChance = 85,
173 .spookChance = 60,
174 .upAndAwayChance = 95,
175 .spinSmashReq = 0,
176 .powerBounceChance = 95,
177 .coinReward = 1,
178 .size = { 24, 80 },
179 .healthBarOffset = { 0, 0 },
180 .statusIconOffset = { -15, 75 },
181 .statusTextOffset = { 10, 65 },
182};
183
184s32 N(FourPartAnims)[] = {
185 STATUS_KEY_NORMAL, ANIM_Pokey_Mummy_Idle4,
186 STATUS_KEY_STONE, ANIM_Pokey_Mummy_Still4,
187 STATUS_KEY_SLEEP, ANIM_Pokey_Mummy_Sleep4,
188 STATUS_KEY_STOP, ANIM_Pokey_Mummy_Still4,
189 STATUS_KEY_PARALYZE, ANIM_Pokey_Mummy_Still4,
190 STATUS_KEY_DIZZY, ANIM_Pokey_Mummy_Dizzy4,
191 STATUS_KEY_FEAR, ANIM_Pokey_Mummy_Dizzy4,
193};
194
195s32 N(ThreePartAnims)[] = {
196 STATUS_KEY_NORMAL, ANIM_Pokey_Mummy_Idle3,
197 STATUS_KEY_STONE, ANIM_Pokey_Mummy_Still3,
198 STATUS_KEY_SLEEP, ANIM_Pokey_Mummy_Sleep3,
199 STATUS_KEY_STOP, ANIM_Pokey_Mummy_Still3,
200 STATUS_KEY_PARALYZE, ANIM_Pokey_Mummy_Still3,
201 STATUS_KEY_DIZZY, ANIM_Pokey_Mummy_Dizzy3,
202 STATUS_KEY_FEAR, ANIM_Pokey_Mummy_Dizzy3,
204};
205
206s32 N(TwoPartAnims)[] = {
207 STATUS_KEY_NORMAL, ANIM_Pokey_Mummy_Idle2,
208 STATUS_KEY_STONE, ANIM_Pokey_Mummy_Still2,
209 STATUS_KEY_SLEEP, ANIM_Pokey_Mummy_Sleep2,
210 STATUS_KEY_STOP, ANIM_Pokey_Mummy_Still2,
211 STATUS_KEY_PARALYZE, ANIM_Pokey_Mummy_Still2,
212 STATUS_KEY_DIZZY, ANIM_Pokey_Mummy_Dizzy2,
213 STATUS_KEY_FEAR, ANIM_Pokey_Mummy_Dizzy2,
215};
216
217s32 N(OnePartAnims)[] = {
218 STATUS_KEY_NORMAL, ANIM_Pokey_Mummy_Idle1,
219 STATUS_KEY_STONE, ANIM_Pokey_Mummy_Still1,
220 STATUS_KEY_SLEEP, ANIM_Pokey_Mummy_Sleep1,
221 STATUS_KEY_STOP, ANIM_Pokey_Mummy_Still1,
222 STATUS_KEY_PARALYZE, ANIM_Pokey_Mummy_Still1,
223 STATUS_KEY_DIZZY, ANIM_Pokey_Mummy_Dizzy1,
224 STATUS_KEY_FEAR, ANIM_Pokey_Mummy_Dizzy1,
226};
227
228s32 N(ThrownPartAnims)[] = {
229 STATUS_KEY_NORMAL, ANIM_Pokey_Mummy_Projectile,
231};
232
234
235EvtScript N(EVS_Init) = {
236 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
237 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
238 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
239 Call(SetActorVar, ACTOR_SELF, AVAR_Generation, AVAL_Generation_First)
240 // copy input var from Formation
241 Call(GetActorVar, ACTOR_SELF, AVAR_IN_CantSummon, LVar0)
242 Call(SetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0)
243 Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 0)
244 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle4)
245 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run4)
246 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt4)
247 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup3)
248 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw3)
249 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt4)
250 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill4)
251 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
252 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
253 Return
254 End
255};
256
257EvtScript N(EVS_Idle) = {
258 Return
259 End
260};
261
262EvtScript N(EVS_HandleEvent) = {
263 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
264 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
265 Call(GetLastEvent, ACTOR_SELF, LVar0)
268 SetConst(LVar0, PRT_MAIN)
269 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
272 Call(GetStatusFlags, ACTOR_SELF, LVar0)
274 SetConst(LVar0, PRT_MAIN)
275 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
277 Else
278 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
279 IfEq(LVarA, 3)
280 SetConst(LVar0, PRT_MAIN)
281 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
283 Else
284 Call(GetDamageSource, LVar0)
289 ExecWait(N(EVS_Pokey_Hit))
292 SetConst(LVar0, PRT_MAIN)
293 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
296 EndIf
297 EndIf
299 Call(GetStatusFlags, ACTOR_SELF, LVar0)
301 SetConst(LVar0, PRT_MAIN)
302 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
304 Wait(10)
305 Else
306 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
307 IfEq(LVarA, 3)
308 SetConst(LVar0, PRT_MAIN)
309 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
311 Wait(10)
312 Else
313 Call(GetDamageSource, LVar0)
318 ExecWait(N(EVS_Pokey_Hit))
321 SetConst(LVar0, PRT_MAIN)
322 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
324 Wait(10)
326 EndIf
327 EndIf
328 SetConst(LVar0, PRT_MAIN)
329 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
331 Return
333 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1)
334 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2)
335 SetConst(LVar0, PRT_MAIN)
336 Call(GetStatusFlags, ACTOR_SELF, LVar3)
339 Else
340 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
341 IfEq(LVarA, 3)
343 Else
344 Call(GetDamageSource, LVarA)
349 ExecWait(N(EVS_Pokey_Hit))
354 EndIf
355 EndIf
357 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1)
358 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2)
359 SetConst(LVar0, PRT_MAIN)
360 Call(GetStatusFlags, ACTOR_SELF, LVar3)
363 Else
364 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
365 IfEq(LVarA, 3)
367 Else
368 Call(GetDamageSource, LVarA)
373 ExecWait(N(EVS_Pokey_Hit))
378 EndIf
379 EndIf
380 SetConst(LVar0, PRT_MAIN)
381 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1)
383 Return
385 ExecWait(N(EVS_Pokey_SpinSmashHit))
387 ExecWait(N(EVS_Pokey_SpinSmashHit))
388 SetConst(LVar0, PRT_MAIN)
389 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
391 Return
393 Call(GetStatusFlags, ACTOR_SELF, LVar3)
395 SetConst(LVar0, PRT_MAIN)
396 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
398 Else
399 ExecWait(N(EVS_Pokey_Hit))
400 EndIf
402 Call(GetStatusFlags, ACTOR_SELF, LVar3)
404 SetConst(LVar0, PRT_MAIN)
405 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
407 Else
408 ExecWait(N(EVS_Pokey_Hit))
409 EndIf
410 SetConst(LVar0, PRT_MAIN)
411 SetConst(LVar1, -1)
413 Return
415 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
416 SetConst(LVar0, PRT_MAIN)
417 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
419 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1)
420 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
421 Call(SetGoalToHome, ACTOR_SELF)
422 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
423 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
424 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
427 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
428 SetConst(LVar0, PRT_MAIN)
429 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
431 SetConst(LVar0, PRT_MAIN)
432 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
434 Return
437 SetConst(LVar0, PRT_MAIN)
438 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1)
442 Call(GetBattleFlags, LVar0)
444 Call(AfflictActor, ACTOR_PLAYER, STATUS_KEY_POISON, 3)
445 EndIf
446 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0)
448 CaseEq(0)
449 Set(LVar0, 0)
450 Set(LVar1, 77)
451 SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy4)
452 CaseEq(1)
453 Set(LVar0, 0)
454 Set(LVar1, 59)
455 SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy3)
456 CaseEq(2)
457 Set(LVar0, 0)
458 Set(LVar1, 41)
459 SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy2)
460 CaseEq(3)
461 Set(LVar0, 0)
462 Set(LVar1, 23)
463 SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy1)
465 Call(GetStatusFlags, ACTOR_SELF, LVar3)
467 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2)
468 EndIf
469 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
470 Call(GetStatusFlags, ACTOR_SELF, LVar6)
472 MulF(LVar0, Float(0.4))
473 MulF(LVar1, Float(0.4))
474 EndIf
477 PlayEffect(EFFECT_LENS_FLARE, 0, LVar3, LVar4, LVar5, 20, 0)
478 Wait(30)
480 SetConst(LVar0, PRT_MAIN)
481 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1)
484 ExecWait(N(EVS_Pokey_ScareAway))
485 Return
488 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
489 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
490 Return
491 End
492};
493
494EvtScript N(EVS_TakeTurn) = {
495 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
496 IfEq(LVarA, 3)
497 ExecWait(N(EVS_Attack_SinglePartLeap))
498 Return
499 EndIf
500 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
501 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
502 Call(GetBattlePhase, LVar0)
504 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
505 Call(MoveBattleCamOver, 1)
506 EndIf
507 Call(SetPartSounds, ACTOR_SELF, PRT_PROJECTILE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE)
508 Call(GetStatusFlags, ACTOR_SELF, LVar0)
510 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0))
511 Else
512 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0))
513 EndIf
515 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
516 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
517 Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2)
518 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(2.2))
519 Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile)
520 Call(GetStatusFlags, ACTOR_SELF, LVar5)
521 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
523 CaseEq(0)
525 Add(LVar1, 38)
526 Else
527 Add(LVar1, 15)
528 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2))
529 EndIf
530 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE)
531 CaseEq(1)
533 Add(LVar1, 20)
534 Else
535 Add(LVar1, 8)
536 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2))
537 EndIf
538 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE)
539 CaseEq(2)
541 Add(LVar1, 8)
542 Else
543 Add(LVar1, 3)
544 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2))
545 EndIf
546 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE)
547 CaseEq(3)
550 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY)
551 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Windup, LVar1)
552 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
553 Wait(12)
554 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Throw, LVar1)
555 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
556 Wait(1)
557 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_THROW)
558 Wait(3)
559 ExecWait(N(EVS_DecrementSize))
560 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
567 Wait(5)
568 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
570 EndIf
571 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
572 Call(SetGoalToTarget, ACTOR_SELF)
573 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
574 Sub(LVar0, 80)
575 Sub(LVar1, 5)
576 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0))
577 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1))
578 Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile)
579 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE)
580 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
581 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1)
582 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
583 Return
586 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
587 Call(SetGoalToTarget, ACTOR_SELF)
588 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
589 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0))
590 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1))
591 Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile)
592 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE)
594 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1)
595 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
599 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
600 Sub(LVar0, 55)
601 Set(LVar1, 0)
602 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0))
603 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1))
604 Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR)
605 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(4.0))
606 Sub(LVar0, 24)
607 Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR)
608 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(3.0))
609 Sub(LVar0, 20)
610 Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR)
611 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
614 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
615 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
616 Return
617 End
618};
619
620EvtScript N(EVS_Attack_SinglePartLeap) = {
621 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
622 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
625 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
626 Call(BattleCamTargetActor, ACTOR_SELF)
627 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
628 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
629 Call(SetGoalToTarget, ACTOR_SELF)
630 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
631 Add(LVar0, 50)
632 Set(LVar1, 0)
633 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
634 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1)
635 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
636 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
638 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1)
639 Wait(4)
640 Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
641 Wait(1)
642 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
643 Wait(4)
644 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
645 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1)
646 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS)
650 Set(LVarA, LVar0)
651 Call(SetGoalToTarget, ACTOR_SELF)
652 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
653 Sub(LVar0, 5)
654 Set(LVar1, 10)
655 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
656 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1))
658 Wait(2)
659 Set(LVar0, 0)
660 Loop(5)
661 Add(LVar0, 30)
662 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
663 Wait(1)
664 EndLoop
666 Call(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE)
668 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
669 EndIf
670 Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0)
672 Wait(2)
673 Set(LVar0, 180)
674 Loop(6)
675 Add(LVar0, 30)
676 IfEq(LVar0, 360)
677 Set(LVar0, 0)
678 EndIf
679 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
680 Wait(1)
681 EndLoop
682 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
684 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
685 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
686 Sub(LVar0, 30)
687 Set(LVar1, 0)
688 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
689 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
690 Wait(15)
691 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
692 Call(YieldTurn)
693 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
694 Call(SetGoalToHome, ACTOR_SELF)
695 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
696 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
697 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1)
698 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
700 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
701 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1)
702 Return
705 Call(SetGoalToTarget, ACTOR_SELF)
706 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1))
708 Wait(2)
709 Set(LVar0, 0)
710 Loop(5)
711 Add(LVar0, 30)
712 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
713 Wait(1)
714 EndLoop
716 Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
717 Wait(2)
718 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS)
719 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1)
723 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
724 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
725 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
726 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
727 Add(LVar0, 40)
728 Set(LVar1, 0)
729 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
730 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
731 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
732 Add(LVar0, 30)
733 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
734 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
735 Add(LVar0, 20)
736 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
737 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
738 Sub(LVar0, 10)
739 Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
740 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1)
741 Call(SetGoalToHome, ACTOR_SELF)
742 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
743 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
744 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1)
745 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
747 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1)
749 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
750 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
751 Return
752 End
753};
754
755EvtScript N(EVS_Pokey_SpinSmashHit) = {
756 Call(GetStatusFlags, ACTOR_SELF, LVarA)
758 SetConst(LVar0, PRT_MAIN)
759 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
761 Return
762 EndIf
763 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
765 CaseEq(0)
766 ExecWait(N(EVS_KnockPartAway))
767 CaseEq(1)
768 ExecWait(N(EVS_KnockPartAway))
769 CaseEq(2)
770 ExecWait(N(EVS_KnockPartAway))
771 CaseEq(3)
772 SetConst(LVar0, PRT_MAIN)
773 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
776 Return
777 End
778};
779
780EvtScript N(EVS_DecrementSize) = {
781 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
783 CaseEq(0)
784 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle3)
785 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run3)
786 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt3)
787 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup2)
788 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw2)
789 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt3)
790 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill3)
791 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ThreePartAnims)))
792 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
793 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_NO_TARGET, TRUE)
794 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, FALSE)
795 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
796 Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 1)
797 Call(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG)
798 Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 62, EVT_IGNORE_ARG)
799 Call(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45)
800 CaseEq(1)
801 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle2)
802 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run2)
803 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt2)
804 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup1)
805 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw1)
806 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt2)
807 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill2)
808 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TwoPartAnims)))
809 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
810 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, TRUE)
811 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, FALSE)
812 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
813 Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 2)
814 Call(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG)
815 Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 44, EVT_IGNORE_ARG)
816 Call(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25)
817 CaseEq(2)
818 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle1)
819 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run1)
820 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt1)
821 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt1)
822 Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill1)
823 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(OnePartAnims)))
824 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
825 Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, TRUE)
826 Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_NO_TARGET, FALSE)
827 Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
828 Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 3)
829 Call(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG)
830 Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 26, EVT_IGNORE_ARG)
831 Call(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5)
833 Return
834 End
835};
836
837EvtScript N(EVS_HitReactionBounce) = {
838 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
839 Add(LVar1, 18)
840 Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
841 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
842 Set(LVar3, LVar1)
843 Wait(2)
844 Sub(LVar3, 1)
845 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
846 Wait(3)
847 Sub(LVar3, 2)
848 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
849 Wait(2)
850 Sub(LVar3, 3)
851 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
852 Wait(1)
853 Sub(LVar3, 5)
854 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
855 Wait(1)
856 Sub(LVar3, 7)
857 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
858 Wait(1)
859 Add(LVar3, 2)
860 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
861 Wait(1)
862 Add(LVar3, 3)
863 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
864 Wait(1)
865 Add(LVar3, 3)
866 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
867 Wait(1)
868 Sub(LVar3, 3)
869 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
870 Wait(1)
871 Sub(LVar3, 3)
872 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
873 Wait(1)
874 Sub(LVar3, 2)
875 Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2)
876 Return
877 End
878};
879
880EvtScript N(EVS_KnockPartAway) = {
881 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
882 Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2)
883 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
884 Call(GetStatusFlags, ACTOR_SELF, LVar0)
886 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0))
887 Else
888 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0))
889 EndIf
890 ExecWait(N(EVS_DecrementSize))
891 SetConst(LVar0, PRT_MAIN)
892 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
893 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
895 Wait(4)
896 ExecWait(N(EVS_HitReactionBounce))
899 Call(InitTargetIterator)
900 Label(0)
901 Call(GetOwnerID, LVar1)
902 Call(GetOwnerTarget, LVar0, LVar9)
904 Call(ChooseNextTarget, ITER_NEXT, LVar0)
905 Goto(0)
906 EndIf
907 Label(1)
908 Add(LVarF, 1)
909 Call(ChooseNextTarget, ITER_NEXT, LVar0)
911 Goto(10)
912 EndIf
913 Call(GetOwnerTarget, LVar0, LVar9)
914 Call(GetActorFlags, LVar0, LVar1)
916 Goto(1)
917 EndIf
918 Call(GetOwnerID, LVar0)
919 Call(GetOwnerTarget, LVar0, LVar1)
920 Call(SetGoalToTarget, ACTOR_SELF)
921 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
922 Set(LVar1, 0)
923 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1))
924 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(7.0))
925 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE)
927 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0))
929 Call(SetGoalToTarget, ACTOR_SELF)
930 Call(GetOwnerTarget, LVar0, LVar1)
931 Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT)
932 Goto(1)
933 Label(10)
934 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
935 Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1))
936 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0))
937 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE)
938 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE)
939 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
940 Return
941 End
942};
943
944EvtScript N(EVS_Pokey_Hit) = {
945 Call(GetStatusFlags, ACTOR_SELF, LVar0)
947 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0))
948 Else
949 Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0))
950 EndIf
951 ExecWait(N(EVS_DecrementSize))
952 SetConst(LVar0, PRT_MAIN)
953 Call(GetLastEvent, ACTOR_SELF, LVar1)
957 Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile)
958 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1)
961 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
963 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
965 Wait(4)
966 ExecWait(N(EVS_HitReactionBounce))
968 Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA)
969 IfNe(LVarA, 3)
970 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
971 Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2)
972 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
973 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0))
974 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
975 Add(LVar0, 30)
976 Set(LVar1, 0)
977 Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 10, 18, EASING_LINEAR)
978 Add(LVar0, 20)
979 Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 8, 10, EASING_LINEAR)
980 Loop(20)
981 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
982 Wait(1)
983 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
984 Wait(1)
985 EndLoop
986 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE)
987 Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
988 Else
989 Wait(30)
990 EndIf
991 Call(GetLastEvent, ACTOR_SELF, LVar0)
994 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1)
995 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
996 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
997 Call(GetActorSize, ACTOR_SELF, LVar3, LVar4)
998 Div(LVar3, 2)
999 Add(LVar1, LVar3)
1000 Add(LVar2, 5)
1001 DivF(LVar3, Float(10.0))
1002 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0)
1004 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1)
1005 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
1006 Wait(10)
1008 EndSwitch
1009 Return
1010 End
1011};
1012
1013EvtScript N(EVS_Pokey_ScareAway) = {
1014 SetConst(LVar0, PRT_MAIN)
1015 Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1)
1016 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1017 Call(GetActorFlags, ACTOR_SELF, LVar9)
1018 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05))
1019 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1020 Set(LVarD, LVarB)
1021 Add(LVarD, 40)
1022 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC)
1023 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1024 Call(SetAnimation, ACTOR_SELF, LVar0, LVar1)
1025 Wait(20)
1026 Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
1027 Call(FallToGoal, ACTOR_SELF, 10)
1028 Wait(20)
1029 Call(SetActorYaw, ACTOR_SELF, 180)
1030 Wait(5)
1031 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
1032 Call(SetGoalPos, ACTOR_SELF, 200, 0, 0)
1033 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1034 Wait(8)
1035 Call(HideHealthBar, ACTOR_SELF)
1036 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1037 Call(RemoveActor, ACTOR_SELF)
1038 Return
1039 End
1040};
Bytecode EvtScript[]
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_WALK
Definition enums.h:2034
@ ACTOR_SOUND_JUMP
Definition enums.h:2036
@ BS_FLAGS1_PARTNER_ACTING
Definition enums.h:3588
@ 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_EVENT_FLAG_ALT_SPIKY
Additional spiky quality associated with Pokeys and Spinies.
Definition enums.h:3388
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ 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
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ TARGET_FLAG_PRIMARY_ONLY
Definition enums.h:1863
@ TARGET_FLAG_ALLOW_TARGET_ONLY
Definition enums.h:1864
@ TARGET_FLAG_GROUND
Definition enums.h:1851
@ EASING_LINEAR
Definition enums.h:510
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ DMG_SRC_POWER_SHELL
Definition enums.h:1995
@ DMG_SRC_FIRE_SHELL
Definition enums.h:1997
@ DMG_SRC_SHELL_TOSS
Definition enums.h:1994
@ SOUND_NONE
Definition enums.h:547
@ SOUND_POKEY_THROW
Definition enums.h:1040
@ SOUND_POKEY_SWAY
Definition enums.h:1146
@ SOUND_POKEY_STEP
Definition enums.h:1070
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_TARGET_ONLY
Battle ends even if undefeated. No turn.
Definition enums.h:3334
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4905
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SPIN_SMASH_LAUNCH_HIT
Definition enums.h:2138
@ 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_SPIKE_TAUNT
Definition enums.h:2148
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SPIN_SMASH_LAUNCH_DEATH
Definition enums.h:2158
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ 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
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
EvtScript EVS_Enemy_HopToPos
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus ShakeCam(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 DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#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 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 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 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 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 LVar2
Definition macros.h:150
#define MulF(VAR, FLOAT_VALUE)
Definition macros.h:385
#define DMG_STATUS_KEY(typeFlag, duration, chance)
Definition macros.h:224
#define EVT_IGNORE_ARG
Definition macros.h:46
#define LVar1
Definition macros.h:149
#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 Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#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 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 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