flo/flo2/tik battle maps (#805)

* area_flo

* area_flo2

* area_tik
This commit is contained in:
Unnunu 2022-10-06 02:14:18 +03:00 committed by GitHub
parent 43c9a7c91d
commit 48588557a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
107 changed files with 20505 additions and 8897 deletions

View File

@ -856,6 +856,8 @@ enum SoundIDs {
SOUND_2A7 = 0x000002A7,
SOUND_UNUSED_2C1 = 0x000002C1,
SOUND_2C5 = 0x000002C5,
SOUND_2C6 = 0x000002C6,
SOUND_2C7 = 0x000002C7,
SOUND_2C9 = 0x000002C9,
SOUND_2CA = 0x000002CA,
SOUND_2CB = 0x000002CB,
@ -886,6 +888,7 @@ enum SoundIDs {
SOUND_2F4 = 0x000002F4,
SOUND_TWEESTER_LAUNCH = 0x000002F6,
SOUND_2F7 = 0x000002F7,
SOUND_2F8 = 0x000002F8,
SOUND_2F9 = 0x000002F9,
SOUND_2FD = 0x000002FD,
SOUND_CLOSE_SHELL = 0x000002FF,
@ -925,7 +928,10 @@ enum SoundIDs {
SOUND_351 = 0x00000351,
SOUND_356 = 0x00000356,
SOUND_357 = 0x00000357,
SOUND_358 = 0x00000358,
SOUND_359 = 0x00000359,
SOUND_35B = 0x0000035B,
SOUND_35C = 0x0000035C,
SOUND_35D = 0x0000035D,
SOUND_361 = 0x00000361,
SOUND_362 = 0x00000362,
@ -993,8 +999,10 @@ enum SoundIDs {
SOUND_3AD = 0x000003AD,
SOUND_3AE = 0x000003AE,
SOUND_3AF = 0x000003AF,
SOUND_3B0 = 0x000003B0,
SOUND_3B1 = 0x000003B1,
SOUND_3B2 = 0x000003B2,
SOUND_3B3 = 0x000003B3,
SOUND_3B4 = 0x000003B4,
SOUND_3BC = 0x000003BC,
SOUND_3BE = 0x000003BE,
@ -1006,10 +1014,12 @@ enum SoundIDs {
SOUND_3D0 = 0x000003D0,
SOUND_3D1 = 0x000003D1,
SOUND_3D2 = 0x000003D2,
SOUND_3D3 = 0x000003D3,
SOUND_OPEN_SHELL = 0x000003D4,
SOUND_3D5 = 0x000003D5,
SOUND_3D6 = 0x000003D6,
SOUND_3D9 = 0x000003D9,
SOUND_3DB = 0x000003DB,
SOUND_3DC = 0x000003DC,
SOUND_3DD = 0x000003DD,
SOUND_3E0 = 0x000003E0,
@ -1072,6 +1082,7 @@ enum SoundIDs {
SOUND_201B = 0x0000201B,
SOUND_2020 = 0x00002020,
SOUND_2021 = 0x00002021,
SOUND_2026 = 0x00002026,
SOUND_202A = 0x0000202A,
SOUND_202B = 0x0000202B,
SOUND_202C = 0x0000202C,
@ -1174,6 +1185,7 @@ enum SoundIDs {
SOUND_20B3 = 0x000020B3,
SOUND_20B4 = 0x000020B4,
SOUND_20B6 = 0x000020B6,
SOUND_20B7 = 0x000020B7,
SOUND_20B8 = 0x000020B8,
SOUND_20BA = 0x000020BA,
SOUND_20C1 = 0x000020C1,
@ -1183,8 +1195,12 @@ enum SoundIDs {
SOUND_20C5 = 0x000020C5,
SOUND_20C6 = 0x000020C6,
SOUND_20C8 = 0x000020C8,
SOUND_20CA = 0x000020CA,
SOUND_20CB = 0x000020CB,
SOUND_20CC = 0x000020CC,
SOUND_20CD = 0x000020CD,
SOUND_20D0 = 0x000020D0,
SOUND_20D2 = 0x000020D2,
SOUND_20D3 = 0x000020D3,
SOUND_SPELL_CAST1 = 0x000020D4,
SOUND_SPELL_CAST2 = 0x000020D5,
@ -1195,10 +1211,12 @@ enum SoundIDs {
SOUND_20DD = 0x000020DD,
SOUND_20DE = 0x000020DE,
SOUND_20DF = 0x000020DF,
SOUND_20E0 = 0x000020E0,
SOUND_20E3 = 0x000020E3,
SOUND_20E4 = 0x000020E4,
SOUND_20E5 = 0x000020E5,
SOUND_20E7 = 0x000020E7,
SOUND_20E9 = 0x000020E9,
SOUND_20EA = 0x000020EA,
SOUND_20EC = 0x000020EC,
SOUND_20ED = 0x000020ED,

View File

@ -1,7 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#include "common/UnkFloatFunc4.inc.c"

View File

@ -1,11 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_flo
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE dup_b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_flo
#include "common/MediGuySpriteRotationFunc.inc.c"

View File

@ -1,18 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_flo
#include "common/ShrinkActor.inc.c"
#define NAMESPACE dup_b_area_flo
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_flo
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"

View File

@ -1,21 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_flo
#define NAMESPACE dup_b_area_flo
#include "common/ShrinkActor.inc.c"
#define NAMESPACE b_area_flo
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE dup3_b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup_b_area_flo
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup_b_area_flo
#include "world/common/UnkFunc52.inc.c"
#define NAMESPACE b_area_flo

View File

@ -1,47 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "common/ShrinkActor.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup4_b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "world/common/UnkFunc52.inc.c"
#define NAMESPACE b_area_flo
#include "common/GetBootsHammerLevel.inc.c"
#include "common/UnkBattleFunc5.inc.c"
#define NAMESPACE dup3_b_area_flo
#include "common/ShrinkActor.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup3_b_area_flo
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup5_b_area_flo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup3_b_area_flo
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup3_b_area_flo
#include "world/common/UnkFunc52.inc.c"
#define NAMESPACE b_area_flo

View File

@ -1,183 +0,0 @@
#include "common.h"
#include "effects.h"
#define NAMESPACE b_area_flo
extern char* D_802311D8_5CA688[11];
extern char* D_80231678_5CAB28[11];
extern char* D_80231B08_5CAFB8[11];
extern char* D_80231FA8_5CB458[11];
extern char* D_80232428_5CB8D8[11];
extern char* D_802328D8_5CBD88[11];
extern char* D_80232BE8_5CC098[11];
extern char* D_80233564_5CCA14[11];
extern char* D_80233870_5CCD20[11];
extern char* D_80233950_5CCE00[11];
ApiStatus func_80219420_5B28D0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802311D8_5CA688); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802311D8_5CA688[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802194E0_5B2990(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80231678_5CAB28); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80231678_5CAB28[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802195A0_5B2A50(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80231B08_5CAFB8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80231B08_5CAFB8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219660_5B2B10(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80231FA8_5CB458); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80231FA8_5CB458[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219720_5B2BD0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80232428_5CB8D8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80232428_5CB8D8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802197E0_5B2C90(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802328D8_5CBD88); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802328D8_5CBD88[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802198A0_5B2D50(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80232BE8_5CC098); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80232BE8_5CC098[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
#define NAMESPACE dup_b_area_flo
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE b_area_flo
#define NAMESPACE dup2_b_area_flo
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE b_area_flo
ApiStatus func_80219C80_5B3130(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233564_5CCA14); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233564_5CCA14[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219D40_5B31F0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233870_5CCD20); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233870_5CCD20[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219E00_5B32B0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233950_5CCE00); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233950_5CCE00[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}

View File

@ -0,0 +1,377 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Dayzee.h"
#include "effects.h"
#define NAMESPACE b_area_flo_amazy_dayzee
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 10,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 10,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 10,
STATUS_SHRINK, 10,
STATUS_STOP, 10,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, -1,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, -1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 30 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_AMAZY_DAYZEE,
.level = 100,
.maxHP = 20,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 90,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 100,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 70,
.coinReward = 5,
.size = { 32, 34 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -14, 17 },
.statusMessageOffset = { 9, 25 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Dayzee_Amazy_Anim01,
STATUS_STONE, ANIM_Dayzee_Amazy_Anim00,
STATUS_SLEEP, ANIM_Dayzee_Amazy_Anim0C,
STATUS_POISON, ANIM_Dayzee_Amazy_Anim01,
STATUS_STOP, ANIM_Dayzee_Amazy_Anim00,
STATUS_STATIC, ANIM_Dayzee_Amazy_Anim01,
STATUS_PARALYZE, ANIM_Dayzee_Amazy_Anim00,
STATUS_DIZZY, ANIM_Dayzee_Amazy_Anim0B,
STATUS_FEAR, ANIM_Dayzee_Amazy_Anim0B,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 30, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(15)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim03)
EVT_EXEC_WAIT(DoReturnHome)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim09)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim0A)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim09)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim0A)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim0A)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim04)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim04)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackPainfulSong) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 70)
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(0)
EVT_IF_EQ(LocalFlag(0), 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim0E)
EVT_SET(LocalFlag(0), 1)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim0F)
EVT_SET(LocalFlag(0), 0)
EVT_END_IF
EVT_WAIT(1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_GT(LVar0, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim0E)
EVT_SET(LocalFlag(0), 1)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim0F)
EVT_SET(LocalFlag(0), 0)
EVT_END_IF
EVT_WAIT(1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(SetGoalPos, ACTOR_SELF, -35, 0, 10)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim01)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim06)
EVT_WAIT(40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim07)
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 25)
EVT_ADD(LVar2, 2)
EVT_LOOP(13)
EVT_CALL(RandInt, 30, LVar3)
EVT_SUB(LVar3, 15)
EVT_ADD(LVar3, LVar0)
EVT_CALL(PlayEffect, EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim01)
EVT_WAIT(10)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, STATUS_FLAG_1 | 0x00000002 | STATUS_FLAG_4 | STATUS_FLAG_8 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_SLEEP | STATUS_FLAG_80000000, 20, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamZoom, 300)
EVT_CALL(SetBattleCamOffsetZ, 30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 20)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim03)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Amazy_Anim04)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0))
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_40000, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(N(attackPainfulSong))
EVT_RETURN
EVT_END_IF
EVT_CALL(RandInt, 1000, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_LT(850)
EVT_EXEC_WAIT(N(flee))
EVT_CASE_DEFAULT
EVT_EXEC_WAIT(N(attackPainfulSong))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_bzzap
#include "battle/common/actor/bzzap.inc.c"

View File

@ -0,0 +1,388 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Dayzee.h"
#include "effects.h"
#define NAMESPACE b_area_flo_crazee_dayzee
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 95,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 30,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 30,
STATUS_SHRINK, 30,
STATUS_STOP, 30,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 30 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_CRAZEE_DAYZEE,
.level = 19,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 50,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 100,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 2,
.size = { 32, 34 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -14, 17 },
.statusMessageOffset = { 9, 25 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Dayzee_Anim01,
STATUS_STONE, ANIM_Dayzee_Anim00,
STATUS_SLEEP, ANIM_Dayzee_Anim0C,
STATUS_POISON, ANIM_Dayzee_Anim01,
STATUS_STOP, ANIM_Dayzee_Anim00,
STATUS_STATIC, ANIM_Dayzee_Anim01,
STATUS_PARALYZE, ANIM_Dayzee_Anim00,
STATUS_DIZZY, ANIM_Dayzee_Anim0B,
STATUS_FEAR, ANIM_Dayzee_Anim0B,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim03)
EVT_EXEC_WAIT(DoReturnHome)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim09)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim0A)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim09)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim0A)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim0A)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim04)
EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim04)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackPainfulSong) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 70)
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(0)
EVT_IF_EQ(LocalFlag(0), 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim0E)
EVT_SET(LocalFlag(0), 1)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim0F)
EVT_SET(LocalFlag(0), 0)
EVT_END_IF
EVT_WAIT(1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_GT(LVar0, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim0E)
EVT_SET(LocalFlag(0), 1)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim0F)
EVT_SET(LocalFlag(0), 0)
EVT_END_IF
EVT_WAIT(1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(SetGoalPos, ACTOR_SELF, -35, 0, 10)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim01)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim06)
EVT_WAIT(40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim07)
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 25)
EVT_ADD(LVar2, 2)
EVT_LOOP(13)
EVT_CALL(RandInt, 30, LVar3)
EVT_SUB(LVar3, 15)
EVT_ADD(LVar3, LVar0)
EVT_CALL(PlayEffect, EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim01)
EVT_WAIT(10)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, STATUS_FLAG_4 | 0x00000010 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_SLEEP | STATUS_FLAG_80000000, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamZoom, 300)
EVT_CALL(SetBattleCamOffsetZ, 30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 20)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim03)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Dayzee_Anim04)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0))
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_40000, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(N(attackPainfulSong))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_CALL(RandInt, 100, LVar1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_IF_LT(LVar1, 80)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(2)
EVT_IF_LT(LVar1, 40)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(3)
EVT_IF_LT(LVar1, 20)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(4)
EVT_IF_LT(LVar1, 10)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_END_SWITCH
EVT_EXEC_WAIT(N(attackPainfulSong))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_green_magikoopa
#include "battle/common/actor/green_magikoopa.inc.c"

View File

@ -0,0 +1,607 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Spiny.h"
#include "sprite/npc/Lakitu.h"
#include "effects.h"
#define NAMESPACE b_area_flo_lakitu
extern ActorBlueprint b_area_flo_spiny;
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Lakitu_Anim01,
STATUS_STONE, ANIM_Lakitu_Anim00,
STATUS_SLEEP, ANIM_Lakitu_Anim08,
STATUS_POISON, ANIM_Lakitu_Anim01,
STATUS_STOP, ANIM_Lakitu_Anim00,
STATUS_STATIC, ANIM_Lakitu_Anim01,
STATUS_PARALYZE, ANIM_Lakitu_Anim00,
STATUS_DIZZY, ANIM_Lakitu_Anim09,
STATUS_FEAR, ANIM_Lakitu_Anim09,
STATUS_END,
};
s32 N(idleAnimations2)[] = {
STATUS_NORMAL, ANIM_Lakitu_Anim0B,
STATUS_END,
};
s32 N(idleAnimations3)[] = {
STATUS_NORMAL, ANIM_Spiny_Anim01,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_MYSTERY, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 50,
STATUS_SHRINK, 75,
STATUS_STOP, 80,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, -1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -13,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations2),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations3),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_LAKITU,
.level = 20,
.maxHP = 12,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 90,
.spookChance = 90,
.baseStatusChance = 50,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 85,
.coinReward = 2,
.size = { 32, 38 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -11, 20 },
.statusMessageOffset = { 10, 34 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim03)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim01)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim05)
EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim05)
EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim03)
EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackSpinyFlip) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim03)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, -20, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim01)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0B)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim12)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim13)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -3)
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.4), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 12)
EVT_ADD(LVar2, 0)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -8)
EVT_ADD(LVar1, 40)
EVT_ADD(LVar2, 5)
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_ADD(LVar2, 2)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim15)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim01)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0C)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_20D2)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 2, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 20, 1)
EVT_SUB(LVar0, 30)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 10, 1)
EVT_SUB(LVar0, 20)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 5, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 20, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_THREAD
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 40)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 20, 1)
EVT_SUB(LVar0, 30)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 10, 1)
EVT_SUB(LVar0, 20)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 5, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
Vec3i N(spiny_pos) = { 0, -1000, 0 };
Formation N(formation_spiny) = {
{ .actor = &b_area_flo_spiny, .home = { .vec = &N(spiny_pos) }, .priority = 100, .var0 = 0x00000001, },
};
EvtScript N(summonSpiny) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_spiny)), 0)
EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0)
EVT_SET(LVarB, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0B)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim12)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim13)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -3)
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.4), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 12)
EVT_ADD(LVar2, 0)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -8)
EVT_ADD(LVar1, 40)
EVT_ADD(LVar2, 5)
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_ADD(LVar2, 2)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim15)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Lakitu_Anim01)
EVT_END_THREAD
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_20D2)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 2, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0C)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.6))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 40)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 12, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, 0, LVar2)
EVT_SUB(LVar0, 30)
EVT_THREAD
EVT_CALL(SetPartRotationOffset, ACTOR_SELF, 3, 0, 16, 0)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LocalFlag(0), 0)
EVT_LOOP(12)
EVT_ADD(LVar0, 30)
EVT_CALL(SetPartRotation, ACTOR_SELF, 3, 0, 0, LVar0)
EVT_ADD(LVar1, 1)
EVT_IF_GE(LVar1, 6)
EVT_IF_EQ(LocalFlag(0), 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_SET(LocalFlag(0), 0)
EVT_ELSE
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_SET(LocalFlag(0), 1)
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(1.3))
EVT_CALL(JumpPartTo, ACTOR_SELF, 3, LVar0, 0, LVar2, 12, 1)
EVT_END_THREAD
EVT_WAIT(1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.3))
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 12, 1)
EVT_CALL(PlayEffect, EFFECT_LANDING_DUST, 1, LVar0, 0, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetPartOffset, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01)
EVT_WAIT(20)
EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim04)
EVT_CALL(SetGoalToIndex, LVarB, LVarA)
EVT_CALL(GetGoalPos, LVarB, LVar0, LVar1, LVar2)
EVT_CALL(GetActorPos, LVarB, LVar3, LVar4, LVar5)
EVT_IF_LT(LVar0, LVar3)
EVT_CALL(SetActorYaw, LVarB, 0)
EVT_ELSE
EVT_CALL(SetActorYaw, LVarB, 180)
EVT_END_IF
EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, LVarB, 0, FALSE)
EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01)
EVT_CALL(SetActorYaw, LVarB, 0)
EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, LVarB)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_ADD(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(findPlacesForSummon) = {
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
EVT_CALL(GetIndexFromHome, LVar0, LVar5)
EVT_MOD(LVar5, 4)
EVT_SWITCH(LVar5)
EVT_CASE_EQ(0)
EVT_SET(LocalFlag(1), 1)
EVT_CASE_EQ(1)
EVT_SET(LocalFlag(2), 1)
EVT_CASE_EQ(2)
EVT_SET(LocalFlag(3), 1)
EVT_CASE_EQ(3)
EVT_SET(LocalFlag(4), 1)
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(1), 0)
EVT_SET(LVarA, 0)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(2), 0)
EVT_SET(LVarA, 1)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(3), 0)
EVT_SET(LVarA, 2)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(4), 0)
EVT_SET(LVarA, 3)
EVT_RETURN
EVT_END_IF
EVT_SET(LVarA, -1)
EVT_RETURN
EVT_END
};
EvtScript N(calcSummonChance) = {
EVT_SET(LVar9, 0)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar2)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(ACTOR_TYPE_LAKITU)
EVT_CALL(GetStatusFlags, LVar0, LVar3)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, LVar0, 0, LVar3)
EVT_IF_LT(LVar3, 3)
EVT_ADD(LVar9, 1)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_GE(LVar0, 3)
EVT_EXEC_WAIT(N(attackSpinyFlip))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(findPlacesForSummon))
EVT_IF_EQ(LVarA, -1)
EVT_EXEC_WAIT(N(attackSpinyFlip))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(calcSummonChance))
EVT_SWITCH(LVar9)
EVT_CASE_EQ(1)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 500)
EVT_EXEC_WAIT(N(summonSpiny))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(2)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 250)
EVT_EXEC_WAIT(N(summonSpiny))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(3)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 150)
EVT_EXEC_WAIT(N(summonSpiny))
EVT_RETURN
EVT_END_IF
EVT_END_SWITCH
EVT_EXEC_WAIT(N(attackSpinyFlip))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_medi_guy
#include "battle/common/actor/medi_guy.inc.c"

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_red_magikoopa
#include "battle/common/actor/red_magikoopa.inc.c"

View File

@ -0,0 +1,344 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/TuffPuff.h"
#define NAMESPACE b_area_flo_ruff_puff
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_TuffPuff_Idle,
STATUS_STONE, ANIM_TuffPuff_Still,
STATUS_SLEEP, ANIM_TuffPuff_Sleep,
STATUS_POISON, ANIM_TuffPuff_Idle,
STATUS_STOP, ANIM_TuffPuff_Still,
STATUS_STATIC, ANIM_TuffPuff_Idle,
STATUS_PARALYZE, ANIM_TuffPuff_Still,
STATUS_DIZZY, ANIM_TuffPuff_Dizzy,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_MYSTERY, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 90,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 70,
STATUS_PARALYZE, 40,
STATUS_SHRINK, 75,
STATUS_STOP, 80,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 26 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -13,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_RUFF_PUFF,
.level = 19,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 50,
.airLiftChance = 90,
.spookChance = 90,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 32, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
#include "common/UnkFloatFunc.inc.c"
EvtScript N(idle) = {
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_ADD(LVarF, 1)
EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0))
EVT_IF_GE(LVarF, 30)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TuffPuff_Run)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 11)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_TuffPuff_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_TuffPuff_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_BurnStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Run)
EVT_SET_CONST(LVar2, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Run)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Run)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TuffPuff_Run)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TuffPuff_Idle)
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TuffPuff_Grin)
EVT_WAIT(5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
EVT_SETF(LVar0, EVT_FLOAT(0.0))
EVT_LOOP(15)
EVT_ADDF(LVar0, EVT_FLOAT(12.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
EVT_SETF(LVar0, EVT_FLOAT(180.0))
EVT_LOOP(10)
EVT_ADDF(LVar0, EVT_FLOAT(18.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, 0, 0)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(AddGoalPos, ACTOR_SELF, -20, 0, 0)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 13, 0)
EVT_SETF(LVar0, EVT_FLOAT(0.0))
EVT_LOOP(8)
EVT_ADDF(LVar0, EVT_FLOAT(22.5))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
EVT_SETF(LVar0, EVT_FLOAT(180.0))
EVT_LOOP(10)
EVT_SUBF(LVar0, EVT_FLOAT(22.5))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(5.0))
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_spiny
#include "battle/common/actor/spiny.inc.c"

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_white_magikoopa
#include "battle/common/actor/white_magikoopa.inc.c"

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_flo_yellow_magikoopa
#include "battle/common/actor/yellow_magikoopa.inc.c"

297
src/battle/area_flo/area.c Normal file
View File

@ -0,0 +1,297 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo
extern ActorBlueprint N(lakitu);
extern ActorBlueprint N(ruff_puff);
extern ActorBlueprint N(bzzap);
extern ActorBlueprint N(crazee_dayzee);
extern ActorBlueprint N(spiny);
extern ActorBlueprint N(white_magikoopa);
extern ActorBlueprint N(red_magikoopa);
extern ActorBlueprint N(yellow_magikoopa);
extern ActorBlueprint N(medi_guy);
extern ActorBlueprint N(amazy_dayzee);
extern ActorBlueprint N(green_magikoopa_flying);
extern ActorBlueprint N(yellow_magikoopa_flying);
extern Stage N(flo_01);
extern Stage N(flo_01b);
extern Stage N(flo_01c);
extern Stage N(flo_02);
extern Stage N(flo_02b);
extern Stage N(flo_02c);
extern Stage N(flo_03);
extern Stage N(flo_04);
extern Stage N(flo_05);
extern Stage N(flo_06);
Formation N(formation_00) = {
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_01) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_02) = {
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_03) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_04) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(bzzap), .home = { .index = 7 }, .priority = 7, },
};
Formation N(formation_05) = {
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_06) = {
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_07) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(spiny), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_08) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(spiny), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_09) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(white_magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0A) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(red_magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0B) = {
{ .actor = &N(lakitu), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(yellow_magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_0C) = {
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_0D) = {
{ .actor = &N(spiny), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0E) = {
{ .actor = &N(spiny), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(medi_guy), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_0F) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 10, },
};
Formation N(formation_10) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_11) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(crazee_dayzee), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_12) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(crazee_dayzee), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(crazee_dayzee), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_13) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_14) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_15) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_16) = {
{ .actor = &N(crazee_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(crazee_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(amazy_dayzee), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_17) = {
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_18) = {
{ .actor = &N(bzzap), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_19) = {
{ .actor = &N(bzzap), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(green_magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_1A) = {
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_1B) = {
{ .actor = &N(bzzap), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_1C) = {
{ .actor = &N(amazy_dayzee), .home = { .index = 1 }, .priority = 10, },
};
Formation N(formation_1D) = {
{ .actor = &N(amazy_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bzzap), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_1E) = {
{ .actor = &N(amazy_dayzee), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(amazy_dayzee), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(amazy_dayzee), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(amazy_dayzee), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_1F) = {
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_20) = {
{ .actor = &N(ruff_puff), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(ruff_puff), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(ruff_puff), .home = { .index = 7 }, .priority = 7, },
};
Formation N(formation_21) = {
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(lakitu), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_22) = {
{ .actor = &N(ruff_puff), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(bzzap), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_23) = {
{ .actor = &N(ruff_puff), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(crazee_dayzee), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_24) = {
{ .actor = &N(ruff_puff), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(ruff_puff), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(yellow_magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
BattleList N(formationTable) = {
BATTLE("ジュゲムx2", N(formation_00), &N(flo_01)),
BATTLE("ジュゲムx3", N(formation_01), &N(flo_01)),
BATTLE("ジュゲム,クモクモーン", N(formation_02), &N(flo_01)),
BATTLE("ジュゲム,ハッチーx", N(formation_03), &N(flo_01)),
BATTLE("ジュゲム,ハッチー,ジュゲム,ハッチー", N(formation_04), &N(flo_01)),
BATTLE("ジュゲム,パンジー", N(formation_05), &N(flo_01)),
BATTLE("ジュゲム,トゲゾー", N(formation_06), &N(flo_01)),
BATTLE("ジュゲムx,トゲゾーx", N(formation_07), &N(flo_01)),
BATTLE("ジュゲムx,トゲゾー", N(formation_08), &N(flo_01)),
BATTLE("ジュゲムx,ホワイトカメック", N(formation_09), &N(flo_01)),
BATTLE("ジュゲムx,レッドカメック", N(formation_0A), &N(flo_01)),
BATTLE("ジュゲムx,イエローカメック", N(formation_0B), &N(flo_01)),
BATTLE("トゲゾーx2", N(formation_0C), &N(flo_01)),
BATTLE("トゲゾーx3", N(formation_0D), &N(flo_01)),
BATTLE("トゲゾー,パンジーさん,かいふくヘイホー", N(formation_0E), &N(flo_01)),
BATTLE("パンジーさん", N(formation_0F), &N(flo_01)),
BATTLE("パンジーさんx2", N(formation_10), &N(flo_01)),
BATTLE("パンジーさんx3", N(formation_11), &N(flo_01)),
BATTLE("パンジーさんx4", N(formation_12), &N(flo_01)),
BATTLE("パンジーさん,ハッチー", N(formation_13), &N(flo_01)),
BATTLE("パンジーさん,ハッチーx2", N(formation_14), &N(flo_01)),
BATTLE("パンジーさんx2,ハッチー", N(formation_15), &N(flo_01)),
BATTLE("パンジーさんx2,きらめくパンジーさん", N(formation_16), &N(flo_01)),
BATTLE("ハッチーx2", N(formation_17), &N(flo_01)),
BATTLE("ハッチーx3", N(formation_18), &N(flo_01)),
BATTLE("ハッチーx2,グリーンカメック(そら)", N(formation_19), &N(flo_01)),
BATTLE("ハッチー,クモクモーン", N(formation_1A), &N(flo_01)),
BATTLE("ハッチー,クモクモーン,ハッチー", N(formation_1B), &N(flo_01)),
BATTLE("きらめくパンジーさん", N(formation_1C), &N(flo_01)),
BATTLE("きらめくパンジーさん,ハッチーx2", N(formation_1D), &N(flo_01)),
BATTLE("きらめくパンジーさんx", N(formation_1E), &N(flo_01)),
BATTLE("クモクモーンx2", N(formation_1F), &N(flo_01)),
BATTLE("クモクモーンx4", N(formation_20), &N(flo_01)),
BATTLE("クモクモーン,ジュゲム", N(formation_21), &N(flo_01)),
BATTLE("クモクモーンx,ハッチー", N(formation_22), &N(flo_01)),
BATTLE("クモクモーンx,パンジー", N(formation_23), &N(flo_01)),
BATTLE("クモクモーンx,イエローカメック(そら)", N(formation_24), &N(flo_01)),
{},
};
StageList N(stageTable) = {
{ "flo_01", &N(flo_01) },
{ "flo_01b", &N(flo_01b) },
{ "flo_01c", &N(flo_01c) },
{ "flo_02", &N(flo_02) },
{ "flo_02b", &N(flo_02b) },
{ "flo_02c", &N(flo_02c) },
{ "flo_03", &N(flo_03) },
{ "flo_04", &N(flo_04) },
{ "flo_05", &N(flo_05) },
{ "flo_06", &N(flo_06) },
{},
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_01
EvtScript N(80230E90) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80230FA8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802310C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 1)
EVT_CALL(SetGroupEnabled, 28, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80230E90))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o400, MODEL_o401, MODEL_o407, MODEL_o411, MODEL_o422, MODEL_o423, MODEL_o424, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_01b
EvtScript N(80231330) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231448) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231560) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 0)
EVT_CALL(SetGroupEnabled, 28, 1)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80231330))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_kuki, MODEL_hana1, MODEL_mae1, MODEL_mae2, MODEL_mae3, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_01c
EvtScript N(802317C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802318D8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802319F0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 0)
EVT_CALL(SetGroupEnabled, 28, 0)
EVT_CALL(SetGroupEnabled, 22, 1)
EVT_EXEC(N(802317C0))
EVT_EXEC(N(802318D8))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o381, MODEL_o382, MODEL_o388, MODEL_o389, MODEL_o390, MODEL_o383, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_02
EvtScript N(80231C60) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231D78) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231E90) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 1)
EVT_CALL(SetGroupEnabled, 47, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80231E90))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o403, MODEL_o404, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_02b
EvtScript N(802320E0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802321F8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80232310) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 0)
EVT_CALL(SetGroupEnabled, 47, 1)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80232310))
EVT_CALL(ModifyColliderFlags, 3, 0, 0x00000006)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_8hana4, MODEL_8hana5, MODEL_8hana6, MODEL_8hana1, MODEL_8hana1, MODEL_8hana3, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo_flo_02c
EvtScript N(80232590) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802326A8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802327C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 1)
EVT_CALL(SetGroupEnabled, 47, 0)
EVT_CALL(SetGroupEnabled, 16, 0)
EVT_CALL(SetGroupEnabled, 22, 1)
EVT_EXEC(N(802327C0))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o403, MODEL_o404, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,192 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt03_shape.h"
#define NAMESPACE b_area_flo_flo_03
EvtScript N(80232A30) = {
EVT_SET(LVarA, LVar0)
EVT_USE_BUF(LVarA)
EVT_LOOP(0)
EVT_BUF_READ1(LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetTexPanner, LVar0, 14)
EVT_BUF_READ1(LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetTexPanner, LVar0, 15)
EVT_END_LOOP
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LABEL(0)
EVT_LABEL(0)
EVT_ADD(LVar0, -140)
EVT_IF_LT(LVar0, 0)
EVT_ADD(LVar0, 65536)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 14, 0, LVar0, 0)
EVT_ADD(LVar1, -200)
EVT_IF_LT(LVar1, 0)
EVT_ADD(LVar1, 65536)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 15, 0, LVar1, 0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
#include "common/UnkFloatFunc.inc.c"
EvtScript N(80232C48) = {
EVT_CALL(EnableModel, LVarF, 1)
EVT_SET(LVarE, 159)
EVT_LOOP(LVarE)
EVT_ADDF(LVar3, 0)
EVT_ADDF(LVar4, EVT_FLOAT(0.0))
EVT_SETF(LVar5, EVT_FLOAT(0.01))
EVT_ADDF(LVar0, LVar3)
EVT_ADDF(LVar1, LVar4)
EVT_ADDF(LVar2, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(1.01))
EVT_ADDF(LVar7, EVT_FLOAT(0.01))
EVT_SETF(LVar8, LVar6)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_ADDF(LVar8, LVarA)
EVT_SETF(LVar9, LVar7)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_ADDF(LVar9, LVarA)
EVT_SETF(LVarA, LVar0)
EVT_MULF(LVarA, EVT_FLOAT(10.0))
EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2)
EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1)
EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVarF, 0)
EVT_RETURN
EVT_END
};
s32 N(modelList)[] = {
MODEL_o419, MODEL_o420, MODEL_o422, 0,
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, N(modelList))
EVT_EXEC(N(80232A30))
EVT_CALL(SetTexPanner, 36, 1)
EVT_CALL(SetTexPanner, 37, 2)
EVT_CALL(SetTexPanner, 38, 3)
EVT_CALL(SetTexPanner, 39, 4)
EVT_CALL(SetTexPanner, 40, 5)
EVT_CALL(SetTexPanner, 41, 6)
EVT_CALL(SetTexPanner, 42, 7)
EVT_THREAD
EVT_SET(LVarE, 1)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_ADDF(LVarF, LVarE)
EVT_IF_GE(LVarF, 1080)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_SET(LVar0, LVarF)
EVT_DIV(LVar0, 9)
EVT_MOD(LVar0, 2)
EVT_MUL(LVar0, 16384)
EVT_SET(LVar1, LVarF)
EVT_DIV(LVar1, 4)
EVT_MOD(LVar1, 2)
EVT_MUL(LVar1, 16384)
EVT_SET(LVar2, LVarF)
EVT_DIV(LVar2, 5)
EVT_MOD(LVar2, 2)
EVT_MUL(LVar2, 16384)
EVT_SET(LVar3, LVarF)
EVT_DIV(LVar3, 6)
EVT_MOD(LVar3, 2)
EVT_MUL(LVar3, 16384)
EVT_SET(LVar4, LVarF)
EVT_DIV(LVar4, 2)
EVT_MOD(LVar4, 2)
EVT_MUL(LVar4, 16384)
EVT_SET(LVar5, LVarF)
EVT_DIV(LVar5, 8)
EVT_MOD(LVar5, 2)
EVT_MUL(LVar5, 16384)
EVT_SET(LVar6, LVarF)
EVT_DIV(LVar6, 8)
EVT_MOD(LVar6, 2)
EVT_MUL(LVar6, 32768)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0)
EVT_CALL(SetTexPanOffset, 3, 0, LVar2, 0)
EVT_CALL(SetTexPanOffset, 4, 0, LVar3, 0)
EVT_CALL(SetTexPanOffset, 5, 0, LVar4, 0)
EVT_CALL(SetTexPanOffset, 6, 0, LVar5, 0)
EVT_CALL(SetTexPanOffset, 7, 0, LVar6, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_SET(LVar1, LVar0)
EVT_ADD(LVar1, 10000)
EVT_ADD(LVar0, 1)
EVT_CALL(CloneModel, 44, LVar1)
EVT_CALL(EnableModel, LVar1, 0)
EVT_END_LOOP
EVT_CALL(EnableModel, 44, 0)
EVT_SET(LVarE, 0)
EVT_LOOP(0)
EVT_SETF(LVar0, EVT_FLOAT(106.0))
EVT_SETF(LVar1, EVT_FLOAT(94.0))
EVT_SETF(LVar2, EVT_FLOAT(-91.0))
EVT_CALL(RandInt, 100, LVar3)
EVT_ADDF(LVar3, -50)
EVT_DIVF(LVar3, EVT_FLOAT(200.0))
EVT_SETF(LVar4, EVT_FLOAT(1.0))
EVT_SETF(LVar5, 0)
EVT_SETF(LVar6, EVT_FLOAT(0.296875))
EVT_SETF(LVar7, EVT_FLOAT(0.296875))
EVT_SET(LVarF, LVarE)
EVT_ADD(LVarF, 10000)
EVT_EXEC(N(80232C48))
EVT_ADD(LVarE, 1)
EVT_IF_GE(LVarE, 16)
EVT_SET(LVarE, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_END_LOOP
EVT_END_THREAD
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o411, MODEL_o415, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt03_shape",
.hit = "flo_bt03_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,90 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt04_shape.h"
#define NAMESPACE b_area_flo_flo_04
#include "common/UnkFloatFunc.inc.c"
EvtScript N(80233470) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(ScaleModel, LVarA, LVar1, LVar0, 1)
EVT_ADD(LVarF, 1)
EVT_IF_GE(LVarF, 30)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, 14)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 16)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 18)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 20)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 25)
EVT_EXEC(N(80233470))
EVT_THREAD
EVT_SET(LVar0, 31)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 32)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 0)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 1)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 5)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 4)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 6)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 33)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 34)
EVT_EXEC(N(80233470))
EVT_END_THREAD
EVT_CALL(CloneModel, 27, 10000)
EVT_CALL(EnableModel, 10000, 0)
EVT_CALL(TranslateModel, 10000, 0, 9, 0)
EVT_CALL(ParentColliderToModel, 0, 10000)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o431, MODEL_o419, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt04_shape",
.hit = "flo_bt04_hit",
.bg = "sra_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,28 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo_flo_05
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt05_shape",
.hit = "flo_bt05_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,28 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo_flo_06
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt06_shape",
.hit = "flo_bt06_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -1,204 +0,0 @@
#include "common.h"
#include "effects.h"
#define NAMESPACE b_area_flo2
typedef struct SuctionPath {
/* 0x00 */ Vec3f start;
/* 0x0C */ Vec3f mid;
/* 0x18 */ Vec3f end;
} SuctionPath; // size = 0x24
extern s32 D_8021A35C_5D09EC;
extern s32 D_8021A378_5D0A08;
extern SuctionPath D_80235E00[];
#include "common/StartRumbleWithParams.inc.c"
ApiStatus func_80218058_5CE6E8(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(ACTOR_ENEMY0);
actor->healthBarPosition.x = actor->homePos.x + evt_get_variable(script, *args++);
actor->healthBarPosition.y = actor->homePos.y + evt_get_variable(script, *args++);
actor->healthBarPosition.z = actor->homePos.z;
return ApiStatus_DONE2;
}
#include "common/UnkFloatFunc.inc.c"
ApiStatus func_802182A4_5CE934(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
void* outVar1 = *args++;
f32 x = evt_get_float_variable(script, outVar1);
void* outVar2 = *args++;
f32 y = evt_get_float_variable(script, outVar2);
void* outVar3 = *args++;
f32 z = evt_get_float_variable(script, outVar3);
f32 temp_f26 = evt_get_float_variable(script, *args++);
f32 temp_f24 = evt_get_float_variable(script, *args++);
f32 factor = evt_get_float_variable(script, *args++);
temp_f24 -= 15.0f;
x += factor * cos_deg(temp_f26) * cos_deg(temp_f24);
y += factor * sin_deg(temp_f26);
z -= factor * cos_deg(temp_f26) * sin_deg(temp_f24);
evt_set_float_variable(script, outVar1, x);
evt_set_float_variable(script, outVar2, y);
evt_set_float_variable(script, outVar3, z);
return ApiStatus_DONE2;
}
ApiStatus func_80218440_5CEAD0(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 arr[10];
s32 flags = evt_get_variable(script, *args++);
s32 count = 0;
s32 var_a2;
if (!(flags & 2)) {
arr[count] = 2;
count++;
}
if (!(flags & 8)) {
arr[count] = 8;
count++;
}
if (!(flags & 0x20)) {
arr[count] = 0x20;
count++;
}
if (!(flags & 0x80)) {
arr[count] = 0x80;
count++;
}
if (!(flags & 0x200)) {
arr[count] = 0x200;
count++;
}
if (!(flags & 1)) {
arr[count] = 1;
count++;
}
if (!(flags & 4)) {
arr[count] = 4;
count++;
}
if (!(flags & 0x10)) {
arr[count] = 0x10;
count++;
}
if (count == 0) {
if (!(flags & 0x100)) {
arr[count] = 0x100;
count++;
}
if (!(flags & 0x40)) {
arr[count] = 0x40;
count++;
}
}
if (count == 0) {
var_a2 = -1;
} else {
var_a2 = arr[rand_int(count - 1)];
}
evt_set_variable(script, *args++, var_a2);
return ApiStatus_DONE2;
}
ApiStatus func_802185D4_5CEC64(Evt* script, s32 isInitialCall) {
s32* actorID = &script->owner1.actorID;
D_8021A35C_5D09EC = (s8) get_actor(*actorID)->turnPriority;
D_8021A378_5D0A08 = (s8) get_actor(*actorID)->turnPriority;
return ApiStatus_DONE2;
}
ApiStatus N(MakeSuctionPath)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
SuctionPath* path = &D_80235E00[evt_get_variable(script, *args++)];
path->start.x = evt_get_variable(script, *args++);
path->start.y = evt_get_variable(script, *args++);
path->start.z = evt_get_variable(script, *args++);
path->mid.x = -rand_int(20);
path->mid.y = rand_int(40) + 60;
path->mid.z = 0;
path->end.x = evt_get_variable(script, *args++);
path->end.y = evt_get_variable(script, *args++);
path->end.z = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
ApiStatus func_80218774_5CEE04(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++);
f32 var2 = evt_get_float_variable(script, *args++);
f32 var3 = evt_get_float_variable(script, *args++);
f32 var4 = evt_get_float_variable(script, *args++);
f32 var5 = evt_get_float_variable(script, *args++);
f32 var6 = evt_get_float_variable(script, *args++);
f32 var7 = evt_get_float_variable(script, *args++);
s32 var8 = evt_get_variable(script, *args++);
EffectInstance* effect = fx_huff_puff_breath(var1, var2, var3, var4, var5, var6, var7, var8);
evt_set_variable(script, *args++, effect);
return ApiStatus_DONE2;
}
#include "common/UnkBackgroundFunc3.inc.c"
#include "common/SetBackgroundAlpha.inc.c"
ApiStatus func_80218924_5CEFB4(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++);
s32 var3 = evt_get_variable(script, *args++);
f32 var4 = evt_get_float_variable(script, *args++);
script->varTable[0] = fx_snaking_static(0, var1, var2, var3, var4 * 2.5f, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802189FC_5CF08C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = evt_get_variable(script, *args++);
f32 posX = evt_get_float_variable(script, *args++);
f32 posY = evt_get_float_variable(script, *args++);
f32 posZ = evt_get_float_variable(script, *args++);
effect->data.snakingStatic->pos.x = posX;
effect->data.snakingStatic->pos.y = posY;
effect->data.snakingStatic->pos.z = posZ;
return ApiStatus_DONE2;
}
ApiStatus func_80218AA0_5CF130(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32* var1 = *args++;
f32 var2 = evt_get_float_variable(script, *args++);
f32 var3 = evt_get_float_variable(script, *args++);
f32 var4 = evt_get_float_variable(script, *args++);
f32 var5 = evt_get_float_variable(script, *args++);
evt_set_float_variable(script, var1, atan2(var2, var3, var4, var5));
return ApiStatus_DONE2;
}
ApiStatus func_80218B60_5CF1F0(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 temp_s3 = evt_get_variable(script, *args++);
f32 temp_f22 = evt_get_float_variable(script, *args++);
f32 temp_f20 = evt_get_float_variable(script, *args++);
s32 temp_s2 = evt_get_variable(script, *args++);
s32 temp_s4 = evt_get_variable(script, *args++);
evt_set_float_variable(script, *args++, update_lerp(temp_s3, temp_f22, temp_f20, temp_s2, temp_s4));
return ApiStatus_DONE2;
}

View File

@ -1,187 +0,0 @@
#include "common.h"
#include "effects.h"
#define NAMESPACE b_area_flo2
extern char* D_80232D48_5E93D8[11];
extern char* D_802331E8_5E9878[11];
extern char* D_80233678_5E9D08[11];
extern char* D_80233F98_5EA628[11];
extern char* D_802353E0_5EBA70[11];
extern char* D_802354C0_5EBB50[11];
extern char* D_80233B18_5EA1A8[11];
extern char* D_80234448_5EAAD8[11];
extern char* D_80234758_5EADE8[11];
extern char* D_802350D4_5EB764[11];
#define NAMESPACE dup_b_area_flo2
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE b_area_flo2
ApiStatus func_80218DD0_5CF460(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80232D48_5E93D8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80232D48_5E93D8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80218E90_5CF520(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802331E8_5E9878); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802331E8_5E9878[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80218F50_5CF5E0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233678_5E9D08); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233678_5E9D08[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219010_5CF6A0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233B18_5EA1A8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233B18_5EA1A8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802190D0_5CF760(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80233F98_5EA628); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80233F98_5EA628[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219190_5CF820(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80234448_5EAAD8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80234448_5EAAD8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_80219250_5CF8E0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_80234758_5EADE8); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_80234758_5EADE8[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
#define NAMESPACE dup2_b_area_flo2
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE b_area_flo2
#define NAMESPACE dup3_b_area_flo2
#include "common/UnkFloatFunc.inc.c"
#define NAMESPACE b_area_flo2
ApiStatus func_80219630_5CFCC0(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802350D4_5EB764); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802350D4_5EB764[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802196F0_5CFD80(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802353E0_5EBA70); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802353E0_5EBA70[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus func_802197B0_5CFE40(Evt* script, s32 isInitialCall) {
s32 var1 = 0;
u32 i;
for (i = 0; i < ARRAY_COUNT(D_802354C0_5EBB50); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, D_802354C0_5EBB50[i]) == 0) {
var1 = 1;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,438 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/MontyMole.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_monty_mole_boss
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations2)[];
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_HAMMER, 0,
ELEMENT_THROW, -3,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 60,
STATUS_POISON, 80,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 0,
STATUS_STATIC, 10,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -7,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 0, -15 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -7,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations2),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_MONTY_MOLE_BOSS,
.level = 19,
.maxHP = 12,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 50,
.airLiftChance = 55,
.spookChance = 40,
.baseStatusChance = 50,
.upAndAwayChance = 95,
.spinSmashReq = 4,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 34, 18 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_MontyMole_Dark_Anim01,
STATUS_STONE, ANIM_MontyMole_Dark_Anim00,
STATUS_SLEEP, ANIM_MontyMole_Dark_Anim14,
STATUS_POISON, ANIM_MontyMole_Dark_Anim01,
STATUS_STOP, ANIM_MontyMole_Dark_Anim00,
STATUS_STATIC, ANIM_MontyMole_Dark_Anim01,
STATUS_PARALYZE, ANIM_MontyMole_Dark_Anim00,
STATUS_DIZZY, ANIM_MontyMole_Dark_Anim14,
STATUS_FEAR, ANIM_MontyMole_Dark_Anim14,
STATUS_END,
};
s32 N(idleAnimations2)[] = {
STATUS_NORMAL, ANIM_MontyMole_Dark_Anim0F,
STATUS_END,
};
s32 N(idleAnimations_hole)[] = {
STATUS_NORMAL, ANIM_MontyMole_Dark_Anim12,
STATUS_END,
};
s32 N(idleAnimations_unused)[] = {
STATUS_NORMAL, ANIM_MontyMole_Dark_Anim06,
STATUS_END,
};
ActorPartBlueprint N(parts_hole)[] = {
{
.flags = ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations_hole),
.defenseTable = NULL,
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
EvtScript N(init_hole) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_RETURN
EVT_END
};
ActorBlueprint N(hole) = {
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_40000 | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY,
.type = ACTOR_TYPE_MONTY_HOLE,
.level = 9,
.maxHP = 5,
.partCount = ARRAY_COUNT(N(parts_hole)),
.partsData = N(parts_hole),
.script = &N(init_hole),
.statusTable = NULL,
.escapeChance = 80,
.airLiftChance = 0,
.spookChance = 80,
.baseStatusChance = 80,
.upAndAwayChance = 90,
.spinSmashReq = 4,
.powerBounceChance = 90,
.coinReward = 2,
.size = { 32, 18 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
Vec3i N(hole_pos) = { 0, -1000, 0 };
Formation N(formation_hole_1) = {
{ .actor = &N(hole), .home = { .vec = &N(hole_pos) }, .priority = 0, },
};
Formation N(formation_hole_2) = {
{ .actor = &N(hole), .home = { .vec = &N(hole_pos) }, .priority = 0, .var0 = 1, },
};
EvtScript N(onDeath) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_hole_2)), 0)
EVT_ELSE
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_hole_1)), 0)
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_SUB(LVar3, 1)
EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3)
EVT_RETURN
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_IF_FLAG(LVarE, DAMAGE_TYPE_SMASH)
EVT_CHILD_THREAD
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim07)
EVT_END_CHILD_THREAD
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim08)
EVT_WAIT(10)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0A)
EVT_SET_CONST(LVar2, ANIM_MontyMole_Dark_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0A)
EVT_SET_CONST(LVar2, ANIM_MontyMole_Dark_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(onDeath))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(80)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim14)
EVT_WAIT(20)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim06)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(onDeath))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim06)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim07)
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim08)
EVT_WAIT(8)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim06)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim07)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim08)
EVT_WAIT(15)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_hole)))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_EXEC_WAIT(N(onDeath))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -5, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim19)
EVT_ELSE
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -9, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -23, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim09)
EVT_END_IF
EVT_WAIT(1000)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(40)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim14)
EVT_WAIT(20)
EVT_CASE_EQ(EVENT_UP_AND_AWAY)
EVT_EXEC_WAIT(N(onDeath))
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_END_IF
EVT_CHILD_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
EVT_END_CHILD_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Dark_Anim04)
EVT_WAIT(37)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_ELSE
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 3, SOUND_MOLE_THROW)
EVT_CALL(SetPartSounds, ACTOR_SELF, 3, 1, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_SET(LVar1, -5)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(12.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(0.1))
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_MontyMole_Dark_Anim0F)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 30, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(12.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(0.1))
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_MontyMole_Dark_Anim0F)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 20, 0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 55)
EVT_SET(LVar1, 0)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(6.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(0.1))
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 25, 0)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(4.0))
EVT_SUB(LVar0, 20)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 21, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,383 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BattleLakilester.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_spike
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BattleLakilester_Idle,
STATUS_STONE, ANIM_BattleLakilester_Still,
STATUS_SLEEP, ANIM_BattleLakilester_Block,
STATUS_POISON, ANIM_BattleLakilester_Idle,
STATUS_STOP, ANIM_BattleLakilester_Still,
STATUS_STATIC, ANIM_BattleLakilester_Idle,
STATUS_PARALYZE, ANIM_BattleLakilester_Still,
STATUS_DIZZY, ANIM_BattleLakilester_Injured,
STATUS_FEAR, ANIM_BattleLakilester_Idle,
STATUS_END,
};
s32 N(idleAnimations_spiny)[] = {
STATUS_NORMAL, ANIM_BattleLakilester_Spiny,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 40,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 40,
STATUS_SHRINK, 50,
STATUS_STOP, 50,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, -1,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, -1,
STATUS_SHRINK_TURN_MOD, -1,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -13,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations_spiny),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_SPIKE,
.level = 40,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 0,
.size = { 32, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -14, 20 },
.statusMessageOffset = { 6, 32 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_Idle)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run)
EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attack) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_Run)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, 20, 30, LVar2)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_Idle)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, -1)
EVT_ADD(LVar1, 4)
EVT_ADD(LVar2, 2)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_ELSE
EVT_ADD(LVar0, -3)
EVT_ADD(LVar1, 10)
EVT_ADD(LVar2, 5)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_BattleLakilester_Spiny)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_LiftSpiny)
EVT_LOOP(4)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADDF(LVar1, EVT_FLOAT(2.4))
EVT_ELSE
EVT_ADD(LVar1, 6)
EVT_END_IF
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, -3)
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 2)
EVT_SETF(LVar3, EVT_FLOAT(0.4))
EVT_ELSE
EVT_ADD(LVar0, -8)
EVT_ADD(LVar1, 40)
EVT_ADD(LVar2, 5)
EVT_SETF(LVar3, EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2C5)
EVT_THREAD
EVT_LOOP(15)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, 1, 0, 0)
EVT_WAIT(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -1, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_HoldSpiny)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_StrainHoldSpiny)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleLakilester_ThrowSpiny)
EVT_WAIT(3)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_2C6)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 2, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_BattleLakilester_SpinySpin)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.5))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RandInt, 100, LVar3)
EVT_SUB(LVar3, 50)
EVT_ADD(LVar0, LVar3)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 20, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_THREAD
EVT_ADD(LVar0, -50)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 15, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_BattleLakilester_SpinySpin)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(1.5))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 20, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_THREAD
EVT_ADD(LVar0, -50)
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 15, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(attack))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,397 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/RuffPuff.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_tuff_puff
enum N(actorVars) {
N(VAR_IS_BIG) = 0,
N(VAR_INDEX) = 1,
N(VAR_2) = 2,
N(VAR_SCALE_X) = 3,
N(VAR_SCALE_Y) = 4,
};
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_RuffPuff_Anim02,
STATUS_STONE, ANIM_RuffPuff_Anim00,
STATUS_SLEEP, ANIM_RuffPuff_Anim02,
STATUS_POISON, ANIM_RuffPuff_Anim02,
STATUS_STOP, ANIM_RuffPuff_Anim00,
STATUS_STATIC, ANIM_RuffPuff_Anim02,
STATUS_PARALYZE, ANIM_RuffPuff_Anim02,
STATUS_PARALYZE, ANIM_RuffPuff_Anim00,
STATUS_DIZZY, ANIM_RuffPuff_Anim02,
STATUS_DIZZY, ANIM_RuffPuff_Anim02,
STATUS_FEAR, ANIM_RuffPuff_Anim02,
STATUS_END,
};
s32 N(idleAnimations2)[] = {
STATUS_NORMAL, ANIM_RuffPuff_Anim03,
STATUS_STONE, ANIM_RuffPuff_Anim01,
STATUS_SLEEP, ANIM_RuffPuff_Anim03,
STATUS_POISON, ANIM_RuffPuff_Anim03,
STATUS_STOP, ANIM_RuffPuff_Anim01,
STATUS_STATIC, ANIM_RuffPuff_Anim03,
STATUS_PARALYZE, ANIM_RuffPuff_Anim03,
STATUS_PARALYZE, ANIM_RuffPuff_Anim01,
STATUS_DIZZY, ANIM_RuffPuff_Anim03,
STATUS_DIZZY, ANIM_RuffPuff_Anim03,
STATUS_FEAR, ANIM_RuffPuff_Anim03,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 99,
ELEMENT_MYSTERY, 0,
ELEMENT_JUMP, 0,
ELEMENT_HAMMER, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 0,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -50 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_8000 | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_TUFF_PUFF,
.level = 0,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 0,
.size = { 24, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -15, 0 },
.statusMessageOffset = { 10, 10 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 2, -1, -9)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -1, 9)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 2, -1, -41)
EVT_CALL(SetActorSize, ACTOR_SELF, 20, 25)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_RuffPuff_Anim02)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_IS_BIG), 0)
EVT_ELSE
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -8, -13)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 2, -8, -13)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 1, 14)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 2, 1, -36)
EVT_CALL(SetActorSize, ACTOR_SELF, 28, 35)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations2)))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_RuffPuff_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_IS_BIG), 1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_2), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_X), 100)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_Y), 100)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn) = {
EVT_RETURN
EVT_END
};
#include "common/UnkFloatFunc.inc.c"
EvtScript N(idle) = {
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_2), LVarA)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_ADD(LVarF, 1)
EVT_CASE_EQ(1)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0)
EVT_ADD(LVarF, 3)
EVT_CASE_EQ(2)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0)
EVT_ADD(LVarF, 5)
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_Y), LVar3)
EVT_DIVF(LVar2, EVT_FLOAT(100.0))
EVT_DIVF(LVar3, EVT_FLOAT(100.0))
EVT_MULF(LVar1, LVar2)
EVT_MULF(LVar0, LVar3)
EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0))
EVT_IF_GE(LVarF, 30)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(onDeath) = {
EVT_CALL(ActorExists, ACTOR_ENEMY0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_INDEX), LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 2, LVar1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_BITWISE_AND_CONST(LVar1, ~0x1)
EVT_CASE_EQ(1)
EVT_BITWISE_AND_CONST(LVar1, ~0x2)
EVT_CASE_EQ(2)
EVT_BITWISE_AND_CONST(LVar1, ~0x4)
EVT_CASE_EQ(3)
EVT_BITWISE_AND_CONST(LVar1, ~0x8)
EVT_CASE_EQ(4)
EVT_BITWISE_AND_CONST(LVar1, ~0x10)
EVT_CASE_EQ(5)
EVT_BITWISE_AND_CONST(LVar1, ~0x20)
EVT_CASE_EQ(6)
EVT_BITWISE_AND_CONST(LVar1, ~0x40)
EVT_CASE_EQ(7)
EVT_BITWISE_AND_CONST(LVar1, ~0x80)
EVT_CASE_EQ(8)
EVT_BITWISE_AND_CONST(LVar1, ~0x100)
EVT_CASE_EQ(9)
EVT_BITWISE_AND_CONST(LVar1, ~0x200)
EVT_END_SWITCH
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 2, LVar1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0C)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0D)
EVT_END_IF
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0C)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0D)
EVT_END_IF
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0E)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim10)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar2)
EVT_IF_EQ(LVar2, 0)
EVT_SET_CONST(LVar2, ANIM_RuffPuff_Anim0F)
EVT_ELSE
EVT_SET_CONST(LVar2, ANIM_RuffPuff_Anim11)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0E)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim10)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar2)
EVT_IF_EQ(LVar2, 0)
EVT_SET_CONST(LVar2, ANIM_RuffPuff_Anim0F)
EVT_ELSE
EVT_SET_CONST(LVar2, ANIM_RuffPuff_Anim11)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(onDeath))
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0F)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim11)
EVT_END_IF
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim02)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim03)
EVT_END_IF
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim02)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim03)
EVT_END_IF
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0C)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0D)
EVT_END_IF
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(onDeath))
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0C)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0D)
EVT_END_IF
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim02)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim03)
EVT_END_IF
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim06)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim07)
EVT_END_IF
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_EXEC_WAIT(N(onDeath))
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0C)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim0D)
EVT_END_IF
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim02)
EVT_ELSE
EVT_SET_CONST(LVar1, ANIM_RuffPuff_Anim03)
EVT_END_IF
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,75 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo2
extern ActorBlueprint N(huff_n_puff);
extern ActorBlueprint N(monty_mole_boss);
extern ActorBlueprint N(spike);
extern Stage N(flo_01);
extern Stage N(flo_01b);
extern Stage N(flo_01c);
extern Stage N(flo_02);
extern Stage N(flo_02b);
extern Stage N(flo_02c);
extern Stage N(flo_03);
extern Stage N(flo_04);
extern Stage N(flo_05);
extern Stage N(flo_06);
Vec3i N(huff_n_puff_pos) = { 80, 80, 0 };
Formation N(formation_01) = {
{ .actor = &N(huff_n_puff), .home = { .vec = &N(huff_n_puff_pos) }, .priority = 10, },
};
Formation N(formation_02) = {
{ .actor = &N(monty_mole_boss), .home = { .index = 1 }, .priority = 10, },
};
Formation N(formation_03) = {
{ .actor = &N(monty_mole_boss), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(monty_mole_boss), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_04) = {
{ .actor = &N(monty_mole_boss), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(monty_mole_boss), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(monty_mole_boss), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_05) = {
{ .actor = &N(monty_mole_boss), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(monty_mole_boss), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(monty_mole_boss), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(monty_mole_boss), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_06) = {
{ .actor = &N(spike), .home = { .index = 5 }, .priority = 10, },
};
BattleList N(formationTable) = {
BATTLE("オズモーン", N(formation_01), &N(flo_04)),
BATTLE("フラワーチョロプー", N(formation_02), &N(flo_01)),
BATTLE("フラワーチョロプーx", N(formation_03), &N(flo_01)),
BATTLE("フラワーチョロプーx", N(formation_04), &N(flo_01)),
BATTLE("フラワーチョロプーx", N(formation_05), &N(flo_01)),
BATTLE("ジョナサン?", N(formation_06), &N(flo_01)),
{},
};
StageList N(stageTable) = {
{ "flo_01", &N(flo_01) },
{ "flo_01b", &N(flo_01b) },
{ "flo_01c", &N(flo_01c) },
{ "flo_02", &N(flo_02) },
{ "flo_02b", &N(flo_02b) },
{ "flo_02c", &N(flo_02c) },
{ "flo_03", &N(flo_03) },
{ "flo_04", &N(flo_04) },
{ "flo_05", &N(flo_05) },
{ "flo_06", &N(flo_06) },
{},
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_01
EvtScript N(80230E90) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80230FA8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802310C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 1)
EVT_CALL(SetGroupEnabled, 28, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80230E90))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o400, MODEL_o401, MODEL_o407, MODEL_o411, MODEL_o422, MODEL_o423, MODEL_o424, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_01b
EvtScript N(80231330) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231448) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231560) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 0)
EVT_CALL(SetGroupEnabled, 28, 1)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80231330))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_kuki, MODEL_hana1, MODEL_mae1, MODEL_mae2, MODEL_mae3, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt01_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_01c
EvtScript N(802317C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802318D8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802319F0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 37, 0)
EVT_CALL(SetGroupEnabled, 28, 0)
EVT_CALL(SetGroupEnabled, 22, 1)
EVT_EXEC(N(802317C0))
EVT_EXEC(N(802318D8))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o381, MODEL_o382, MODEL_o388, MODEL_o389, MODEL_o390, MODEL_o383, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt01_shape",
.hit = "flo_bt01_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,93 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_02
EvtScript N(80231C60) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231D78) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231E90) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 1)
EVT_CALL(SetGroupEnabled, 47, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80231E90))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o403, MODEL_o404, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_02b
EvtScript N(802320E0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802321F8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80232310) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 0)
EVT_CALL(SetGroupEnabled, 47, 1)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_EXEC(N(80232310))
EVT_CALL(ModifyColliderFlags, 3, 0, 0x00000006)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_8hana4, MODEL_8hana5, MODEL_8hana6, MODEL_8hana1, MODEL_8hana1, MODEL_8hana3, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,94 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt02_shape.h"
#include "effects.h"
#define NAMESPACE b_area_flo2_flo_02c
EvtScript N(80232590) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 40, LVar2)
EVT_SUB(LVar2, 100)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802326A8) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 0)
EVT_CALL(RandInt, 50, LVar2)
EVT_ADD(LVar2, 71)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802327C0) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 250, LVar0)
EVT_SUB(LVar0, 125)
EVT_SET(LVar1, 50)
EVT_CALL(RandInt, 40, LVar2)
EVT_ADD(LVar2, -124)
EVT_CALL(RandInt, 30, LVar3)
EVT_ADD(LVar3, 90)
EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 20)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 35, 1)
EVT_CALL(SetGroupEnabled, 47, 0)
EVT_CALL(SetGroupEnabled, 16, 0)
EVT_CALL(SetGroupEnabled, 22, 1)
EVT_EXEC(N(802327C0))
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o403, MODEL_o404, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt02_shape",
.hit = "flo_bt02_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,192 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt03_shape.h"
#define NAMESPACE b_area_flo2_flo_03
EvtScript N(80232A30) = {
EVT_SET(LVarA, LVar0)
EVT_USE_BUF(LVarA)
EVT_LOOP(0)
EVT_BUF_READ1(LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetTexPanner, LVar0, 14)
EVT_BUF_READ1(LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetTexPanner, LVar0, 15)
EVT_END_LOOP
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LABEL(0)
EVT_LABEL(0)
EVT_ADD(LVar0, -140)
EVT_IF_LT(LVar0, 0)
EVT_ADD(LVar0, 65536)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 14, 0, LVar0, 0)
EVT_ADD(LVar1, -200)
EVT_IF_LT(LVar1, 0)
EVT_ADD(LVar1, 65536)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 15, 0, LVar1, 0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
#include "common/UnkFloatFunc.inc.c"
EvtScript N(80232C48) = {
EVT_CALL(EnableModel, LVarF, 1)
EVT_SET(LVarE, 159)
EVT_LOOP(LVarE)
EVT_ADDF(LVar3, 0)
EVT_ADDF(LVar4, EVT_FLOAT(0.0))
EVT_SETF(LVar5, EVT_FLOAT(0.01))
EVT_ADDF(LVar0, LVar3)
EVT_ADDF(LVar1, LVar4)
EVT_ADDF(LVar2, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(1.01))
EVT_ADDF(LVar7, EVT_FLOAT(0.01))
EVT_SETF(LVar8, LVar6)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_ADDF(LVar8, LVarA)
EVT_SETF(LVar9, LVar7)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_ADDF(LVar9, LVarA)
EVT_SETF(LVarA, LVar0)
EVT_MULF(LVarA, EVT_FLOAT(10.0))
EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2)
EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1)
EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVarF, 0)
EVT_RETURN
EVT_END
};
s32 N(modelList)[] = {
MODEL_o419, MODEL_o420, MODEL_o422, 0,
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, N(modelList))
EVT_EXEC(N(80232A30))
EVT_CALL(SetTexPanner, 36, 1)
EVT_CALL(SetTexPanner, 37, 2)
EVT_CALL(SetTexPanner, 38, 3)
EVT_CALL(SetTexPanner, 39, 4)
EVT_CALL(SetTexPanner, 40, 5)
EVT_CALL(SetTexPanner, 41, 6)
EVT_CALL(SetTexPanner, 42, 7)
EVT_THREAD
EVT_SET(LVarE, 1)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_ADDF(LVarF, LVarE)
EVT_IF_GE(LVarF, 1080)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_SET(LVar0, LVarF)
EVT_DIV(LVar0, 9)
EVT_MOD(LVar0, 2)
EVT_MUL(LVar0, 16384)
EVT_SET(LVar1, LVarF)
EVT_DIV(LVar1, 4)
EVT_MOD(LVar1, 2)
EVT_MUL(LVar1, 16384)
EVT_SET(LVar2, LVarF)
EVT_DIV(LVar2, 5)
EVT_MOD(LVar2, 2)
EVT_MUL(LVar2, 16384)
EVT_SET(LVar3, LVarF)
EVT_DIV(LVar3, 6)
EVT_MOD(LVar3, 2)
EVT_MUL(LVar3, 16384)
EVT_SET(LVar4, LVarF)
EVT_DIV(LVar4, 2)
EVT_MOD(LVar4, 2)
EVT_MUL(LVar4, 16384)
EVT_SET(LVar5, LVarF)
EVT_DIV(LVar5, 8)
EVT_MOD(LVar5, 2)
EVT_MUL(LVar5, 16384)
EVT_SET(LVar6, LVarF)
EVT_DIV(LVar6, 8)
EVT_MOD(LVar6, 2)
EVT_MUL(LVar6, 32768)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0)
EVT_CALL(SetTexPanOffset, 3, 0, LVar2, 0)
EVT_CALL(SetTexPanOffset, 4, 0, LVar3, 0)
EVT_CALL(SetTexPanOffset, 5, 0, LVar4, 0)
EVT_CALL(SetTexPanOffset, 6, 0, LVar5, 0)
EVT_CALL(SetTexPanOffset, 7, 0, LVar6, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_SET(LVar1, LVar0)
EVT_ADD(LVar1, 10000)
EVT_ADD(LVar0, 1)
EVT_CALL(CloneModel, 44, LVar1)
EVT_CALL(EnableModel, LVar1, 0)
EVT_END_LOOP
EVT_CALL(EnableModel, 44, 0)
EVT_SET(LVarE, 0)
EVT_LOOP(0)
EVT_SETF(LVar0, EVT_FLOAT(106.0))
EVT_SETF(LVar1, EVT_FLOAT(94.0))
EVT_SETF(LVar2, EVT_FLOAT(-91.0))
EVT_CALL(RandInt, 100, LVar3)
EVT_ADDF(LVar3, -50)
EVT_DIVF(LVar3, EVT_FLOAT(200.0))
EVT_SETF(LVar4, EVT_FLOAT(1.0))
EVT_SETF(LVar5, 0)
EVT_SETF(LVar6, EVT_FLOAT(0.296875))
EVT_SETF(LVar7, EVT_FLOAT(0.296875))
EVT_SET(LVarF, LVarE)
EVT_ADD(LVarF, 10000)
EVT_EXEC(N(80232C48))
EVT_ADD(LVarE, 1)
EVT_IF_GE(LVarE, 16)
EVT_SET(LVarE, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_END_LOOP
EVT_END_THREAD
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o411, MODEL_o415, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt03_shape",
.hit = "flo_bt03_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,90 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/flo_bt04_shape.h"
#define NAMESPACE b_area_flo2_flo_04
#include "common/UnkFloatFunc.inc.c"
EvtScript N(80233470) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(ScaleModel, LVarA, LVar1, LVar0, 1)
EVT_ADD(LVarF, 1)
EVT_IF_GE(LVarF, 30)
EVT_SET(LVarF, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, 14)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 16)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 18)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 20)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 25)
EVT_EXEC(N(80233470))
EVT_THREAD
EVT_SET(LVar0, 31)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 32)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 0)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 1)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 5)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 4)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 6)
EVT_EXEC(N(80233470))
EVT_WAIT(5)
EVT_SET(LVar0, 33)
EVT_EXEC(N(80233470))
EVT_SET(LVar0, 34)
EVT_EXEC(N(80233470))
EVT_END_THREAD
EVT_CALL(CloneModel, 27, 10000)
EVT_CALL(EnableModel, 10000, 0)
EVT_CALL(TranslateModel, 10000, 0, 9, 0)
EVT_CALL(ParentColliderToModel, 0, 10000)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
-1, MODEL_o431, MODEL_o419, 0,
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt04_shape",
.hit = "flo_bt04_hit",
.bg = "sra_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,28 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo2_flo_05
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt05_shape",
.hit = "flo_bt05_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,28 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_flo2_flo_06
#include "common/MakeSun.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_EXEC_WAIT(N(MakeSun))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "flo_tex",
.shape = "flo_bt06_shape",
.hit = "flo_bt06_hit",
.bg = "fla_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -193,7 +193,7 @@ EvtScript N(idle_8021B07C) = {
EVT_LABEL(11)
EVT_WAIT(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, 0x35D000)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_GOTO(11)
EVT_END_IF
EVT_CALL(GetActorVar, -127, 2, LVar0)
@ -212,7 +212,7 @@ EvtScript N(idle_8021B07C) = {
EVT_LABEL(22)
EVT_WAIT(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, 0x35D000)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_GOTO(22)
EVT_END_IF
EVT_CALL(GetActorVar, -127, 2, LVar0)

View File

@ -558,7 +558,7 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_CASE_EQ(22)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, 0x80000)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
EVT_ELSE
@ -707,7 +707,7 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_CASE_EQ(22)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, 0x80000)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
EVT_ELSE

View File

@ -1,823 +1,5 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BuzzyBeetle.h"
#define NAMESPACE b_area_isk_part_1_buzzy_beetle
extern s32 N(idleAnimations_8021E62C)[];
extern EvtScript N(init_8021E6BC);
extern EvtScript N(idle_8021E88C);
extern EvtScript N(takeTurn_8021FF8C);
extern EvtScript N(handleEvent_8021ECD0);
extern EvtScript N(takeTurn_80220A44);
extern EvtScript N(handleEvent_8021F228);
s32 N(defenseTable_8021E4C0)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_FIRE, 99,
ELEMENT_BLAST, 99,
ELEMENT_END,
};
s32 N(defenseTable_8021E4DC)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_8021E4E8)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 90,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 90,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021E594)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021E62C),
.defenseTable = N(defenseTable_8021E4C0),
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
.elementImmunityFlags = 0,
.unk_1C = 1,
.unk_1D = 7,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_HP_OFFSET_BELOW,
.type = ACTOR_TYPE_BUZZY_BEETLE,
.level = 10,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021E594)),
.partsData = N(partsTable_8021E594),
.script = &N(init_8021E6BC),
.statusTable = N(statusTable_8021E4E8),
.escapeChance = 60,
.airLiftChance = 75,
.spookChance = 75,
.baseStatusChance = 75,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 1,
.size = { 22, 18 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -8, 16 },
.statusMessageOffset = { 8, 13 },
};
s32 N(idleAnimations_8021E5E0)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim01,
STATUS_STONE, ANIM_BuzzyBeetle_Anim00,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim09,
STATUS_POISON, ANIM_BuzzyBeetle_Anim01,
STATUS_STOP, ANIM_BuzzyBeetle_Anim00,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim01,
STATUS_PARALYZE, ANIM_BuzzyBeetle_Anim00,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim0A,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim0A,
STATUS_END,
};
s32 N(idleAnimations_8021E62C)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim0F,
STATUS_STONE, ANIM_BuzzyBeetle_Anim0E,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim14,
STATUS_POISON, ANIM_BuzzyBeetle_Anim0F,
STATUS_STOP, ANIM_BuzzyBeetle_Anim0E,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim0F,
STATUS_PARALYZE, ANIM_BuzzyBeetle_Anim0E,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim15,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim15,
STATUS_END,
};
s32 N(idleAnimations_8021E678)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim02,
STATUS_STONE, ANIM_BuzzyBeetle_Anim1A,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim1B,
STATUS_POISON, ANIM_BuzzyBeetle_Anim02,
STATUS_STOP, ANIM_BuzzyBeetle_Anim1A,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim02,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim1C,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim1C,
STATUS_END,
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(init_8021E6BC) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021E88C)))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 0, 10, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021FF8C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021ECD0)))
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 0)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80220A44)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021F228)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E5E0)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_END_IF
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021E88C) = {
EVT_RETURN
EVT_END
};
EvtScript N(8021E89C) = {
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80220A44)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021F228)))
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_8021E4DC)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E678)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_SPIKY_TOP, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 769, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA)
EVT_MOD(LVarA, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_SET(LVarD, LVarA)
EVT_SET(LVarE, LVarB)
EVT_SET(LVarF, LVarC)
EVT_SUB(LVarD, LVar0)
EVT_SUB(LVarE, LVar1)
EVT_SUB(LVarF, LVar2)
EVT_DIV(LVarD, 2)
EVT_DIV(LVarE, 2)
EVT_DIV(LVarF, 2)
EVT_ADD(LVar0, LVarD)
EVT_ADD(LVar1, LVarE)
EVT_ADD(LVar2, LVarF)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim02)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021ECD0) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(8021E89C))
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(8021E89C))
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(8021E89C))
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoJumpBack)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16)
EVT_EXEC_WAIT(DoImmune)
EVT_WAIT(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_EXEC_WAIT(N(8021E89C))
EVT_END_IF
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim11)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021F18C) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar3)
EVT_IF_EQ(LVar3, 2)
EVT_SET(LVar1, LVar2)
EVT_END_IF
EVT_RETURN
EVT_END
};
s32 N(intTable_8021F1DC)[] = {
7, 13, 17, 21, 23, 24, 23, 21, 17, 13,
7, 0, 4, 7, 6, 4, 0, 2, 0,
};
EvtScript N(handleEvent_8021F228) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_END_IF
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoDeath)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_8021E4DC)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E678)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim07)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180)
EVT_WAIT(1)
EVT_END_THREAD
EVT_USE_BUF(EVT_PTR(N(intTable_8021F1DC)))
EVT_LOOP(19)
EVT_BUF_READ1(LVar0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim19)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoJumpBack)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim17)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 9)
EVT_ELSE
EVT_ADD(LVar1, 24)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(8021F18C))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_END_IF
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_END_IF
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim08)
EVT_END_IF
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021FF8C) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80220A44)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021F228)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E5E0)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0E)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim11)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0E)
EVT_WAIT(8)
EVT_END_IF
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 769, 0)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_F)
EVT_CALL(SetBattleCamZoom, 430)
EVT_CALL(SetBattleCamOffsetZ, 20)
EVT_CALL(MoveBattleCamOver, 10)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetPartYaw, ACTOR_SELF, 1, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim00)
EVT_END_THREAD
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(8)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim04)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar4)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim00)
EVT_END_THREAD
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(8)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_LABEL(10)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80220A44) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_SUB(LVar0, 1)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_ELSE
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(20)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim01)
EVT_EXEC_WAIT(D_8029BBB4)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_8021E4C0)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E5E0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021E88C)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0C)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim06)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2021)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim05)
EVT_WAIT(20)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20D3)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(10)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_WAIT(8)
EVT_CALL(YieldTurn)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "battle/common/actor/buzzy_beetle.inc.c"

View File

@ -3,293 +3,44 @@
#define NAMESPACE b_area_kgr_kgr_01
#include "common/UnkFloatFunc005.inc.c"
EvtScript N(8021C330) = {
EVT_SET(LVarA, LVar0)
EVT_LABEL(0)
EVT_CALL(N(UnkFloatFunc005), 0)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(RandInt, 5, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(N(UnkFloatFunc005), 3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021C9C0) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
s32 N(intTable_8021CD64)[] = {
0, -1, -1, -2, -2, -3, -5, -8,
-8, -7, -6, -4, -2, -1, 0, 255,
};
EvtScript N(8021CDA4) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVar5, 5)
EVT_USE_BUF(EVT_PTR(N(intTable_8021CD64)))
EVT_LABEL(0)
EVT_BUF_READ1(LVar1)
EVT_IF_EQ(LVar1, 255)
EVT_USE_BUF(EVT_PTR(N(intTable_8021CD64)))
EVT_BUF_READ1(LVar1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_SET(LVar2, 0)
EVT_LOOP(20)
EVT_ADD(LVar5, 1)
EVT_SUB(LVar1, 2)
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_SUB(LVar5, 280)
EVT_SET(LVar1, 0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021D010) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
#include "common/UnkModelStuff2.inc.c"
EvtScript N(beforeBattle_8021D3B4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_THREAD
EVT_SET(LVar0, 19)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 20)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 21)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 22)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_END_THREAD
EVT_THREAD
EVT_SET(LVar0, 14)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 15)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 16)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 17)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_WAIT(4)
EVT_SET(LVar0, 18)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_END_THREAD
EVT_SET(LVar0, 11)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_SET(LVar0, 12)
EVT_EXEC(N(8021D010))
EVT_EXEC(N(script4))
EVT_RETURN
EVT_END
};

View File

@ -122,7 +122,7 @@ EvtScript N(idle_80219A98) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -138,7 +138,7 @@ EvtScript N(idle_80219A98) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -154,7 +154,7 @@ EvtScript N(idle_80219A98) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -120,7 +120,7 @@ EvtScript N(idle_8021D5E8) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -136,7 +136,7 @@ EvtScript N(idle_8021D5E8) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -152,7 +152,7 @@ EvtScript N(idle_8021D5E8) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -178,7 +178,7 @@ EvtScript N(idle_80220B50) = {
EVT_WAIT(LVar0)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, 0x35D000)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -193,7 +193,7 @@ EvtScript N(idle_80220B50) = {
EVT_WAIT(20)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, 0x35D000)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -122,7 +122,7 @@ EvtScript N(idle_8021B8A8) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -138,7 +138,7 @@ EvtScript N(idle_8021B8A8) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -154,7 +154,7 @@ EvtScript N(idle_8021B8A8) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -120,7 +120,7 @@ EvtScript N(idle_8021EFE8) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -136,7 +136,7 @@ EvtScript N(idle_8021EFE8) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -152,7 +152,7 @@ EvtScript N(idle_8021EFE8) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -202,7 +202,7 @@ ActorBlueprint NAMESPACE = {
EvtScript N(8022C6D4) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, 0x35D000)
EVT_IF_FLAG(LVar2, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
@ -480,7 +480,7 @@ EvtScript N(handleEvent_8022D1C4) = {
EVT_WAIT(20)
EVT_CASE_EQ(58)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_SET(LVar1, 2)
EVT_EXEC_WAIT(N(802315F0))
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
@ -488,7 +488,7 @@ EvtScript N(handleEvent_8022D1C4) = {
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_SET(LVar1, 5)
EVT_EXEC_WAIT(N(802315F0))
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)

View File

@ -133,7 +133,7 @@ ActorBlueprint NAMESPACE = {
EvtScript N(8022A750) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, 0x35D000)
EVT_IF_FLAG(LVar2, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
@ -329,13 +329,13 @@ EvtScript N(handleEvent_8022ADD8) = {
EVT_END_CASE_GROUP
EVT_CASE_EQ(58)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MageJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MageJrTroopa_Flail)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(8022ABA8))
@ -468,7 +468,7 @@ EvtScript N(nextTurn_8022BB44) = {
EVT_CALL(GetActorVar, -127, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_NOT_FLAG(LVar1, 0x35D000)
EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetActorVar, -127, 0, 2)
EVT_CALL(GetActorVar, -127, 3, LVar0)
EVT_IF_EQ(LVar0, 0)

View File

@ -119,7 +119,7 @@ ActorBlueprint NAMESPACE = {
EvtScript N(80225F7C) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, 0x35D000)
EVT_IF_FLAG(LVar2, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
@ -329,13 +329,13 @@ EvtScript N(handleEvent_802266B0) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ParaJrTroopa_Idle)
EVT_CASE_EQ(58)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ParaJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Flail)
EVT_EXEC_WAIT(DoImmune)
@ -598,7 +598,7 @@ EvtScript N(80227D38) = {
EvtScript N(80227E1C) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, -127, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, -127, 1, 0)

View File

@ -200,7 +200,7 @@ EvtScript N(idle_8021C4D4) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -215,7 +215,7 @@ EvtScript N(idle_8021C4D4) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -230,7 +230,7 @@ EvtScript N(idle_8021C4D4) = {
EVT_LOOP(40)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
@ -593,7 +593,7 @@ EvtScript N(idle) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -609,7 +609,7 @@ EvtScript N(idle) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -625,7 +625,7 @@ EvtScript N(idle) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF

View File

@ -120,7 +120,7 @@ EvtScript N(idle_8021A578) = {
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -136,7 +136,7 @@ EvtScript N(idle_8021A578) = {
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
@ -152,7 +152,7 @@ EvtScript N(idle_8021A578) = {
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, 0x35D000)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
@ -273,7 +273,7 @@ EvtScript N(handleEvent_8021A854) = {
EVT_RETURN
EVT_CASE_EQ(27)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Laugh)
EVT_END_IF
EVT_WAIT(10)

View File

@ -113,7 +113,7 @@ ActorBlueprint NAMESPACE = {
EvtScript N(80228084) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, 0x35D000)
EVT_IF_FLAG(LVar2, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
@ -343,13 +343,13 @@ EvtScript N(handleEvent_802287D0) = {
EVT_WAIT(20)
EVT_CASE_EQ(58)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedParaJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedParaJrTroopa_Flail)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(802284DC))
@ -697,7 +697,7 @@ EvtScript N(8022A39C) = {
EvtScript N(8022A480) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, -127, 2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, -127, 2, 0)

View File

@ -3,275 +3,26 @@
#define NAMESPACE b_area_kmr_part_3_mac_01
#include "common/UnkFloatFunc005.inc.c"
EvtScript N(80233AF0) = {
EVT_SET(LVarA, LVar0)
EVT_LABEL(0)
EVT_CALL(N(UnkFloatFunc005), 0)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(RandInt, 5, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(N(UnkFloatFunc005), 3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80234180) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
s32 N(intTable_80234524)[] = {
0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFB, 0xFFFFFFF8,
0xFFFFFFF8, 0xFFFFFFF9, 0xFFFFFFFA, 0xFFFFFFFC, 0xFFFFFFFE, 0xFFFFFFFF, 0x00000000, 0x000000FF,
};
EvtScript N(80234564) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVar5, 5)
EVT_USE_BUF(EVT_PTR(N(intTable_80234524)))
EVT_LABEL(0)
EVT_BUF_READ1(LVar1)
EVT_IF_EQ(LVar1, 255)
EVT_USE_BUF(EVT_PTR(N(intTable_80234524)))
EVT_BUF_READ1(LVar1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_SET(LVar2, 0)
EVT_LOOP(20)
EVT_ADD(LVar5, 1)
EVT_SUB(LVar1, 2)
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_SUB(LVar5, 280)
EVT_SET(LVar1, 0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802347D0) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
#include "common/UnkModelStuff2.inc.c"
EvtScript N(beforeBattle_80234B74) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_THREAD
EVT_SET(LVar0, 44)
EVT_EXEC(N(80234180))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 47)
EVT_EXEC(N(80234180))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 46)
EVT_EXEC(N(80234180))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 45)
EVT_EXEC(N(80234180))
EVT_EXEC(N(script2))
EVT_END_THREAD
EVT_SET(LVar0, 40)
EVT_EXEC(N(80233AF0))
EVT_EXEC(N(script1))
EVT_RETURN
EVT_END
};

View File

@ -1288,7 +1288,7 @@ EvtScript N(handleEvent_80220908) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, 0x80000)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
EVT_ELSE
@ -2102,7 +2102,7 @@ EvtScript N(handleEvent_80223584) = {
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(22)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x35D000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, 0x80000)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
EVT_ELSE

View File

@ -3,275 +3,26 @@
#define NAMESPACE b_area_mac_mac_01
#include "common/UnkFloatFunc005.inc.c"
EvtScript N(80231770) = {
EVT_SET(LVarA, LVar0)
EVT_LABEL(0)
EVT_CALL(N(UnkFloatFunc005), 0)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(RandInt, 5, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(N(UnkFloatFunc005), 3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 1)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1)
EVT_WAIT(5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1)
EVT_WAIT(3)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(5)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc005), 2)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVarB, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LVarB)
EVT_ADD(LVarB, 30)
EVT_LOOP(LVarB)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231E00) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 3, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 2, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, -1, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
s32 N(intTable_802321A4)[] = {
0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFB, 0xFFFFFFF8,
0xFFFFFFF8, 0xFFFFFFF9, 0xFFFFFFFA, 0xFFFFFFFC, 0xFFFFFFFE, 0xFFFFFFFF, 0x00000000, 0x000000FF,
};
EvtScript N(802321E4) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVar5, 5)
EVT_USE_BUF(EVT_PTR(N(intTable_802321A4)))
EVT_LABEL(0)
EVT_BUF_READ1(LVar1)
EVT_IF_EQ(LVar1, 255)
EVT_USE_BUF(EVT_PTR(N(intTable_802321A4)))
EVT_BUF_READ1(LVar1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_ADD(LVar5, 1)
EVT_SET(LVarC, LVarB)
EVT_SUB(LVarC, 20)
EVT_IF_GT(LVar5, LVarC)
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_SET(LVar2, 0)
EVT_LOOP(20)
EVT_ADD(LVar5, 1)
EVT_SUB(LVar1, 2)
EVT_SET(LVar0, LVar5)
EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_SUB(LVar5, 280)
EVT_SET(LVar1, 0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80232450) = {
EVT_SET(LVarA, LVar0)
EVT_LOOP(0)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -3, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -2, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, -1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 1, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(TranslateModel, LVarA, 0, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
#include "common/UnkModelStuff2.inc.c"
EvtScript N(beforeBattle_802327F4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_THREAD
EVT_SET(LVar0, 44)
EVT_EXEC(N(80231E00))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 47)
EVT_EXEC(N(80231E00))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 46)
EVT_EXEC(N(80231E00))
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 45)
EVT_EXEC(N(80231E00))
EVT_EXEC(N(script2))
EVT_END_THREAD
EVT_SET(LVar0, 40)
EVT_EXEC(N(80231770))
EVT_EXEC(N(script1))
EVT_RETURN
EVT_END
};

View File

@ -1,733 +1,5 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Bzzap.h"
#define NAMESPACE b_area_mim_bzzap
extern EvtScript N(init_8021AA24);
extern EvtScript N(takeTurn_8021D28C);
extern EvtScript N(idle_8021AB10);
extern EvtScript N(handleEvent_8021ACA8);
s32 N(idleAnimations_8021A820)[] = {
STATUS_NORMAL, ANIM_Bzzap_Anim01,
STATUS_STONE, ANIM_Bzzap_Anim00,
STATUS_SLEEP, ANIM_Bzzap_Anim09,
STATUS_POISON, ANIM_Bzzap_Anim01,
STATUS_STOP, ANIM_Bzzap_Anim00,
STATUS_STATIC, ANIM_Bzzap_Anim01,
STATUS_PARALYZE, ANIM_Bzzap_Anim00,
STATUS_DIZZY, ANIM_Bzzap_Anim0A,
STATUS_FEAR, ANIM_Bzzap_Anim0A,
STATUS_END,
};
s32 N(defenseTable_8021A86C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_8021A878)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 60,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021A924)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -7, 33 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 2,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 6,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021A820),
.defenseTable = N(defenseTable_8021A86C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_BZZAP,
.level = 19,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021A924)),
.partsData = N(partsTable_8021A924),
.script = &N(init_8021AA24),
.statusTable = N(statusTable_8021A878),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 95,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 1,
.size = { 38, 38 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
#include "common/UnkBattleFunc1.inc.c"
#include "common/UnkFloatFunc4.inc.c"
EvtScript N(init_8021AA24) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021D28C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021AB10)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021ACA8)))
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 4, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 5, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 6, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021AB10) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -7, 19)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 2, -6)
EVT_CALL(N(UnkBattleFunc1), -20, 20, 10, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -7, 33)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 2, -10)
EVT_CALL(N(UnkBattleFunc1), -16, 22, 4, 22)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021AC20) = {
EVT_CALL(SetPartRotation, ACTOR_SELF, 1, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim03)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021ACA8) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(8021AC20))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(8021AC20))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim03)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoBlowAway)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021B28C) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim03)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 52, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 12)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_ADD(LVar2, 1)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20CA)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim04)
EVT_WAIT(10)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(8021AC20))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_ADD(LVar2, 1)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20CA)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim04)
EVT_WAIT(6)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, STATUS_FLAG_8 | STATUS_FLAG_20 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(8021AC20))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021B77C) = {
EVT_SET(LVar9, LVar0)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_ADD(LVarA, 200)
EVT_ADD(LVarB, 100)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, 0x4B0003)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_ADD(LVarB, 50)
EVT_SUB(LVarC, 30)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_CALL(MakeLerp, 90, 450, 50, 0)
EVT_LABEL(0)
EVT_CALL(UpdateLerp)
EVT_CALL(N(UnkFloatFunc4), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_IF_GT(LVar3, LVar6)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180)
EVT_ELSE
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_IF_EQ(LVar9, 2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_I)
EVT_CALL(SetBattleCamZoom, 400)
EVT_CALL(SetBattleCamOffsetZ, 30)
EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER)
EVT_CALL(MoveBattleCamOver, 60)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, 0x4B0003)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVarA, LVarB, LVarC)
EVT_ADD(LVarB, 30)
EVT_ADD(LVarC, 30)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, 0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_CALL(MakeLerp, -90, -720, 100, 0)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(N(UnkFloatFunc4), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_IF_GT(LVar3, LVar6)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180)
EVT_ELSE
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(8021BC74) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 3, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 4, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 5, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 6, 1, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20CC)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim05)
EVT_WAIT(40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim01)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(PlaySound, 0x358)
EVT_SET(LVar0, 2)
EVT_EXEC_GET_TID(N(8021B77C), LVarA)
EVT_WAIT(11)
EVT_SET(LVar0, 3)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 4)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 5)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 6)
EVT_EXEC(N(8021B77C))
EVT_LABEL(0)
EVT_IS_THREAD_RUNNING(LVarA, LVar0)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 2, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 3, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 3, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 3, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 3, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 4, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 4, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 4, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 4, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 4, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 5, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 5, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 5, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 5, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 5, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 5, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 6, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 6, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 6, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 6, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 6, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 6, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(30)
EVT_CALL(StopSound, 856)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 2, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 3, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 3, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 4, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 4, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 4, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 5, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 5, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 5, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 5, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 6, 0x20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 6, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 6, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 6, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(StopSound, 856)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021D28C) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(N(8021B28C))
EVT_RETURN
EVT_END_IF
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 500)
EVT_EXEC_WAIT(N(8021B28C))
EVT_ELSE
EVT_EXEC_WAIT(N(8021BC74))
EVT_END_IF
EVT_RETURN
EVT_END
};
#include "battle/common/actor/bzzap.inc.c"

View File

@ -1,902 +1,5 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#include "sprite/npc/Magikoopa.h"
#include "sprite/npc/FlyingMagikoopa.h"
#define NAMESPACE b_area_pra_green_magikoopa
extern EvtScript N(init);
extern EvtScript N(init_flying);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(takeTurn);
extern EvtScript N(flee);
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations2)[];
extern s32 N(idleAnimations3)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_flying)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
s32 N(statusTable_flying)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
};
ActorPartBlueprint N(parts_flying)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations2),
.defenseTable = N(defenseTable_flying),
.eventFlags = ACTOR_EVENT_FLAG_800000,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations3),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_GREEN_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 80,
.spookChance = 70,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 2,
.size = { 36, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 32 },
};
ActorBlueprint N(flying) = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_FLYING_GREEN_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts_flying)),
.partsData = N(parts_flying),
.script = &N(init_flying),
.statusTable = N(statusTable_flying),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 75,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 2,
.size = { 48, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -25, 20 },
.statusMessageOffset = { 1, 34 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Magikoopa_Green_Anim01,
STATUS_STONE, ANIM_Magikoopa_Green_Anim00,
STATUS_SLEEP, ANIM_Magikoopa_Green_Anim08,
STATUS_POISON, ANIM_Magikoopa_Green_Anim01,
STATUS_STOP, ANIM_Magikoopa_Green_Anim00,
STATUS_STATIC, ANIM_Magikoopa_Green_Anim01,
STATUS_PARALYZE, ANIM_Magikoopa_Green_Anim00,
STATUS_DIZZY, ANIM_Magikoopa_Green_Anim07,
STATUS_FEAR, ANIM_Magikoopa_Green_Anim07,
STATUS_END,
};
s32 N(idleAnimations2)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_STONE, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_SLEEP, ANIM_FlyingMagikoopa_Green_Anim08,
STATUS_POISON, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_STOP, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_STATIC, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_PARALYZE, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_DIZZY, ANIM_FlyingMagikoopa_Green_Anim07,
STATUS_FEAR, ANIM_FlyingMagikoopa_Green_Anim07,
STATUS_END,
};
s32 N(idleAnimations3)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Green_Anim0A,
STATUS_END,
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
#include "common/ShrinkActor.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#include "common/UnkBattleFunc1.inc.c"
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(canBeKnockedOff) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_80000)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(MOVE_HEADBONK1)
EVT_CASE_OR_EQ(MOVE_HEADBONK2)
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(knockOff) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_LABEL(0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(N(StartRumbleWithParams), 150, 10)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
EVT_END_THREAD
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3)
EVT_IF_EQ(LVar3, EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 10)
EVT_ADD(LVar5, 5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GREEN_MAGIKOOPA)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable)))
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_flying) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackMagicBlast) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9)
EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 50)
EVT_SET(LVar4, 0)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
EVT_WAIT(50)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(14)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 10)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
EVT_WAIT(18)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_WAIT(19)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackWandStrike) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DB)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 5)
EVT_ELSE
EVT_ADD(LVar0, 25)
EVT_END_IF
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim03)
EVT_WAIT(11)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DC)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, EVENT_SCARE_AWAY)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(ForceNextTarget)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_flying) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_flying)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetIndexFromHome, LVar0, LVar1)
EVT_CALL(GetBattleVar, 2, LVar2)
EVT_IF_GT(LVar1, LVar2)
EVT_CALL(N(UnkFunc52), LVar0, LVar3)
EVT_IF_EQ(LVar3, 0)
EVT_CALL(GetActorDefenseBoost, LVar0, LVar4)
EVT_IF_LT(LVar4, 3)
EVT_SET(LVar8, LVar0)
EVT_CALL(SetBattleVar, 2, LVar1)
EVT_GOTO(100)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(SetBattleVar, 2, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_EXEC_WAIT(N(attackMagicBlast))
EVT_ELSE
EVT_EXEC_WAIT(N(attackWandStrike))
EVT_END_IF
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 6)
EVT_ADD(LVar1, 12)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 16)
EVT_ADD(LVar1, 31)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_END_IF
EVT_WAIT(5)
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_2DD)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(BoostDefense, LVar8, 1)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "battle/common/actor/green_magikoopa.inc.c"

View File

@ -1,904 +1,5 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#include "sprite/npc/Magikoopa.h"
#include "sprite/npc/FlyingMagikoopa.h"
#define NAMESPACE b_area_pra_yellow_magikoopa
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations_flying)[];
extern s32 N(80225248)[];
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(init_flying);
extern EvtScript N(flee);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_flying)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
s32 N(statusTable_flying)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
};
ActorPartBlueprint N(parts_flying)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations_flying),
.defenseTable = N(defenseTable_flying),
.eventFlags = ACTOR_EVENT_FLAG_800000,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(80225248),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_YELLOW_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 80,
.spookChance = 70,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 36, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 32 },
};
ActorBlueprint N(flying) = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_FLYING_YELLOW_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts_flying)),
.partsData = N(parts_flying),
.script = &N(init_flying),
.statusTable = N(statusTable_flying),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 75,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 48, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -25, 20 },
.statusMessageOffset = { 1, 34 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Magikoopa_Yellow_Anim01,
STATUS_STONE, ANIM_Magikoopa_Yellow_Anim00,
STATUS_SLEEP, ANIM_Magikoopa_Yellow_Anim08,
STATUS_POISON, ANIM_Magikoopa_Yellow_Anim01,
STATUS_STOP, ANIM_Magikoopa_Yellow_Anim00,
STATUS_STATIC, ANIM_Magikoopa_Yellow_Anim01,
STATUS_PARALYZE, ANIM_Magikoopa_Yellow_Anim00,
STATUS_DIZZY, ANIM_Magikoopa_Yellow_Anim07,
STATUS_FEAR, ANIM_Magikoopa_Yellow_Anim07,
STATUS_END,
};
s32 N(idleAnimations_flying)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_STONE, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_SLEEP, ANIM_FlyingMagikoopa_Yellow_Anim08,
STATUS_POISON, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_STOP, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_STATIC, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_PARALYZE, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_DIZZY, ANIM_FlyingMagikoopa_Yellow_Anim07,
STATUS_FEAR, ANIM_FlyingMagikoopa_Yellow_Anim07,
STATUS_END,
};
s32 N(80225248)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim0A,
STATUS_END,
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
#include "common/ShrinkActor.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#include "common/UnkBattleFunc1.inc.c"
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(canBeKnockedOff) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_80000)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(MOVE_HEADBONK1)
EVT_CASE_OR_EQ(MOVE_HEADBONK2)
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(knockOff) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_LABEL(0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(N(StartRumbleWithParams), 150, 10)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
EVT_END_THREAD
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3)
EVT_IF_EQ(LVar3, EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 10)
EVT_ADD(LVar5, 5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_YELLOW_MAGIKOOPA)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable)))
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_flying) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackMagicBlast) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9)
EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 50)
EVT_SET(LVar4, 0)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
EVT_WAIT(50)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(14)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 10)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
EVT_WAIT(18)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_WAIT(19)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackWandStrike) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DB)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 5)
EVT_ELSE
EVT_ADD(LVar0, 25)
EVT_END_IF
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim03)
EVT_WAIT(11)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DC)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, EVENT_SCARE_AWAY)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(ForceNextTarget)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_flying) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_flying)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetIndexFromHome, LVar0, LVar1)
EVT_CALL(GetBattleVar, 2, LVar2)
EVT_IF_GT(LVar1, LVar2)
EVT_CALL(N(UnkFunc52), LVar0, LVar3)
EVT_IF_EQ(LVar3, 0)
EVT_CALL(GetStatusFlags, LVar0, LVar4)
EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT)
EVT_SET(LVar8, LVar0)
EVT_CALL(SetBattleVar, 2, LVar1)
EVT_GOTO(100)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(SetBattleVar, 2, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_EXEC_WAIT(N(attackMagicBlast))
EVT_ELSE
EVT_EXEC_WAIT(N(attackWandStrike))
EVT_END_IF
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F0)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 6)
EVT_ADD(LVar1, 12)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 16)
EVT_ADD(LVar1, 31)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_END_IF
EVT_WAIT(5)
EVT_THREAD
EVT_WAIT(10)
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_3D2)
EVT_CALL(RandInt, 3, LVar0)
EVT_ADD(LVar0, 3)
EVT_WAIT(LVar0)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(ElectrifyActor, LVar8, 3)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "battle/common/actor/yellow_magikoopa.inc.c"

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#include "common/UnkBattleFunc1.inc.c"

View File

@ -1,9 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE dup_b_area_tik
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_tik

View File

@ -1,17 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#include "common/BattleAreaAngleStuff.inc.c"
#define NAMESPACE dup_b_area_tik
#include "common/BattleAreaAngleStuff.inc.c"
#define NAMESPACE b_area_tik
#define NAMESPACE dup_b_area_tik
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_tik
#define NAMESPACE dup2_b_area_tik
#include "common/BattleAreaAngleStuff.inc.c"
#define NAMESPACE b_area_tik

View File

@ -1,7 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#define NAMESPACE dup2_b_area_tik
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_tik

View File

@ -1,7 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#define NAMESPACE dup3_b_area_tik
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_tik

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE dup_b_area_tik
#include "world/common/UnkFunc56.inc.c"

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#include "world/common/UnkFunc56.inc.c"

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE dup2_b_area_tik
#include "world/common/UnkFunc56.inc.c"

View File

@ -1,8 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_tik
#include "common/UnkFloatFunc005.inc.c"
#include "world/common/atomic/TexturePan.inc.c"

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_tik_buzzy_beetle
#include "battle/common/actor/buzzy_beetle.inc.c"

View File

@ -0,0 +1,888 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/KoopaTroopa.h"
#include "effects.h"
#define NAMESPACE b_area_tik_dark_koopa
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_HAMMER, 2,
ELEMENT_JUMP, 2,
ELEMENT_WATER, 2,
ELEMENT_BLAST, 2,
ELEMENT_END,
};
s32 N(defenseTable_flipped)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 80,
STATUS_POISON, 60,
STATUS_FROZEN, 100,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 80,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 36 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -7,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_DARK_KOOPA,
.level = 18,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 75,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 2,
.size = { 28, 36 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -15, 32 },
.statusMessageOffset = { 5, 32 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_KoopaTroopa_Dark_Anim01,
STATUS_STONE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_SLEEP, ANIM_KoopaTroopa_Dark_Anim11,
STATUS_POISON, ANIM_KoopaTroopa_Dark_Anim01,
STATUS_STOP, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_STATIC, ANIM_KoopaTroopa_Dark_Anim01,
STATUS_PARALYZE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_DIZZY, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_FEAR, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_END,
};
s32 N(idleAnimations_step)[] = {
STATUS_NORMAL, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_STONE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_SLEEP, ANIM_KoopaTroopa_Dark_Anim11,
STATUS_POISON, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_STOP, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_STATIC, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_PARALYZE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_DIZZY, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_FEAR, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_END,
};
s32 N(idleAnimations_active)[] = {
STATUS_NORMAL, ANIM_KoopaTroopa_Dark_Anim02,
STATUS_STONE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_SLEEP, ANIM_KoopaTroopa_Dark_Anim11,
STATUS_POISON, ANIM_KoopaTroopa_Dark_Anim02,
STATUS_STOP, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_STATIC, ANIM_KoopaTroopa_Dark_Anim02,
STATUS_PARALYZE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_DIZZY, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_FEAR, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_END,
};
s32 N(idleAnimations_step_active)[] = {
STATUS_NORMAL, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_STONE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_SLEEP, ANIM_KoopaTroopa_Dark_Anim11,
STATUS_POISON, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_STOP, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_STATIC, ANIM_KoopaTroopa_Dark_Anim03,
STATUS_PARALYZE, ANIM_KoopaTroopa_Dark_Anim00,
STATUS_DIZZY, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_FEAR, ANIM_KoopaTroopa_Dark_Anim13,
STATUS_END,
};
s32 N(idleAnimations_flipped)[] = {
STATUS_NORMAL, ANIM_KoopaTroopa_Dark_Anim0F,
STATUS_STONE, ANIM_KoopaTroopa_Dark_Anim10,
STATUS_SLEEP, ANIM_KoopaTroopa_Dark_Anim12,
STATUS_POISON, ANIM_KoopaTroopa_Dark_Anim0F,
STATUS_STOP, ANIM_KoopaTroopa_Dark_Anim10,
STATUS_STATIC, ANIM_KoopaTroopa_Dark_Anim0F,
STATUS_PARALYZE, ANIM_KoopaTroopa_Dark_Anim10,
STATUS_DIZZY, ANIM_KoopaTroopa_Dark_Anim14,
STATUS_FEAR, ANIM_KoopaTroopa_Dark_Anim14,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 300)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim02)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(updateOffsets) = {
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -5, 15)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 32)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -4)
EVT_CALL(N(UnkBattleFunc1), -15, 32, 5, 32)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -5, 15)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 80, LVarA)
EVT_ADD(LVarA, 80)
EVT_LOOP(LVarA)
EVT_LABEL(1)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_EXEC_WAIT(N(updateOffsets))
EVT_IF_EQ(LVar0, 2)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_IF_EQ(LVar0, 3)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CASE_EQ(1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step_active)))
EVT_END_SWITCH
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CASE_EQ(1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_LOOP(20)
EVT_LABEL(2)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_EXEC_WAIT(N(updateOffsets))
EVT_IF_EQ(LVar0, 2)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_IF_EQ(LVar0, 3)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CASE_EQ(1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step_active)))
EVT_END_SWITCH
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CASE_EQ(1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_LOOP(50)
EVT_LABEL(3)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_EXEC_WAIT(N(updateOffsets))
EVT_IF_EQ(LVar0, 2)
EVT_WAIT(1)
EVT_GOTO(3)
EVT_END_IF
EVT_IF_EQ(LVar0, 3)
EVT_WAIT(1)
EVT_GOTO(3)
EVT_END_IF
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(3)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_THREAD
EVT_CALL(MakeLerp, 720, 0, 30, 10)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar1, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar2)
EVT_IF_EQ(LVar2, 1)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_END_THREAD
EVT_WAIT(8)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 1, 7)
EVT_WAIT(15)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 1)
EVT_WAIT(8)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CASE_EQ(0)
EVT_CASE_EQ(2)
EVT_CASE_EQ(3)
EVT_END_SWITCH
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
s32 N(bounceTable)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0, };
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_END_IF
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0C)
EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_Anim0D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0C)
EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_Anim0D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0D)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 3)
EVT_END_SWITCH
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_flipped)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -5, 15)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_THREAD
EVT_WAIT(4)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75)
EVT_WAIT(1)
EVT_END_THREAD
EVT_USE_BUF(N(bounceTable))
EVT_LOOP(22)
EVT_BUF_READ1(LVar0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(0.5))
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim07)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim08)
EVT_WAIT(10)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim02)
EVT_EXEC_WAIT(DoRecover)
EVT_END_IF
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_Anim0B)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim17)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim17)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackShellToss) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim06)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim07)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 4)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(3)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2021)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim06)
EVT_WAIT(10)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20D3)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 3, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim08)
EVT_WAIT(8)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_WAIT(4)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim15)
EVT_WAIT(1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim17)
EVT_WAIT(6)
EVT_SUB(LVar1, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim17)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim01)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim08)
EVT_WAIT(8)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackDizzyTornado) = {
EVT_LABEL(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(AddGoalPos, ACTOR_SELF, 8, 0, 0)
EVT_ELSE
EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim02)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim07)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 4)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(3)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2021)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim06)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2026)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 1, 7)
EVT_WAIT(40)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim08)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 1)
EVT_WAIT(10)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim17)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim02)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 65535, STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_200 | STATUS_FLAG_DIZZY | STATUS_FLAG_80000000, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_THREAD
EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(MakeLerp, 0, 1080, 30, 10)
EVT_LABEL(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim08)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 1)
EVT_WAIT(10)
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim02)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(standUp) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_SUB(LVar0, 1)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_WAIT(30)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(0.5))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_ELSE
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_WAIT(20)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(0.5))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JUMP_3E2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_KoopaTroopa_Dark_Anim0F)
EVT_SET(LVar0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_THREAD
EVT_LOOP(5)
EVT_ADD(LVar0, 15)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20BA)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable)))
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 32)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -4)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(2)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CASE_EQ(3)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_END_SWITCH
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(attackShellToss))
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 300)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_END_IF
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(attackDizzyTornado))
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 300)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_active)))
EVT_END_IF
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_EXEC_WAIT(N(standUp))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,457 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Goomba.h"
#define NAMESPACE b_area_tik_gloomba
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 100,
STATUS_FROZEN, 100,
STATUS_DIZZY, 80,
STATUS_FEAR, 100,
STATUS_STATIC, 100,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_GLOOMBA,
.level = 11,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 70,
.airLiftChance = 90,
.spookChance = 85,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 24, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Goomba_Dark_Idle,
STATUS_STONE, ANIM_Goomba_Dark_Still,
STATUS_SLEEP, ANIM_Goomba_Dark_Sleep,
STATUS_POISON, ANIM_Goomba_Dark_Idle,
STATUS_STOP, ANIM_Goomba_Dark_Still,
STATUS_STATIC, ANIM_Goomba_Dark_Idle,
STATUS_PARALYZE, ANIM_Goomba_Dark_Still,
STATUS_DIZZY, ANIM_Goomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Goomba_Dark_Dizzy,
STATUS_END,
};
s32 N(idleAnimations_step)[] = {
STATUS_NORMAL, ANIM_Goomba_Dark_Run,
STATUS_STONE, ANIM_Goomba_Dark_Still,
STATUS_SLEEP, ANIM_Goomba_Dark_Sleep,
STATUS_POISON, ANIM_Goomba_Dark_Idle,
STATUS_STOP, ANIM_Goomba_Dark_Still,
STATUS_STATIC, ANIM_Goomba_Dark_Run,
STATUS_PARALYZE, ANIM_Goomba_Dark_Still,
STATUS_DIZZY, ANIM_Goomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Goomba_Dark_Dizzy,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Dizzy)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/anglestuff.inc.c"
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
EVT_WAIT(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 10)
EVT_SET(LVar1, 10)
EVT_ADD(LVar2, 3)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Sleep)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Hurt)
EVT_WAIT(HIT_RESULT_LUCKY)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_THREAD
EVT_WAIT(4)
EVT_SET(LVar0, 180)
EVT_LOOP(4)
EVT_SUB(LVar0, 45)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Dizzy)
EVT_WAIT(5)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Tense)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_WAIT(3)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,931 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Paragoomba.h"
#include "sprite/npc/Goomba.h"
#include "effects.h"
#define NAMESPACE b_area_tik_paragloomba
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(fall);
extern EvtScript N(init_gloomba);
extern EvtScript N(takeTurn_gloomba);
extern EvtScript N(idle_gloomba);
extern EvtScript N(handleEvent_gloomba);
extern s32 N(idleAnimations_gloomba)[];
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations_left_wing)[];
extern s32 N(idleAnimations_right_wing)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable2)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_gloomba)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 100,
STATUS_FROZEN, 100,
STATUS_DIZZY, 80,
STATUS_FEAR, 100,
STATUS_STATIC, 100,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 80,
STATUS_FROZEN, 100,
STATUS_DIZZY, 90,
STATUS_FEAR, 80,
STATUS_STATIC, 80,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
.opacity = 255,
.idleAnimations = N(idleAnimations_gloomba),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable2),
.eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { -16, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_left_wing),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 4,
.posOffset = { 0, 0, 0 },
.targetOffset = { -16, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_right_wing),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_PARAGLOOMBA,
.level = 11,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 65,
.airLiftChance = 95,
.spookChance = 90,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 36, 26 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Paragoomba_Dark_Idle,
STATUS_STONE, ANIM_Paragoomba_Dark_Still,
STATUS_SLEEP, ANIM_Paragoomba_Dark_Sleep,
STATUS_POISON, ANIM_Paragoomba_Dark_Idle,
STATUS_STOP, ANIM_Paragoomba_Dark_Still,
STATUS_STATIC, ANIM_Paragoomba_Dark_Idle,
STATUS_PARALYZE, ANIM_Paragoomba_Dark_Still,
STATUS_DIZZY, ANIM_Paragoomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Paragoomba_Dark_Dizzy,
STATUS_END,
};
s32 N(idleAnimations_step)[] = {
STATUS_NORMAL, ANIM_Paragoomba_Dark_Run,
STATUS_STONE, ANIM_Paragoomba_Dark_Still,
STATUS_SLEEP, ANIM_Paragoomba_Dark_Sleep,
STATUS_POISON, ANIM_Paragoomba_Dark_Idle,
STATUS_STOP, ANIM_Paragoomba_Dark_Still,
STATUS_STATIC, ANIM_Paragoomba_Dark_Run,
STATUS_PARALYZE, ANIM_Paragoomba_Dark_Still,
STATUS_DIZZY, ANIM_Paragoomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Paragoomba_Dark_Dizzy,
STATUS_END,
};
s32 N(idleAnimations_left_wing)[] = {
STATUS_NORMAL, ANIM_Paragoomba_Dark_LWingStill,
STATUS_END,
};
s32 N(idleAnimations_right_wing)[] = {
STATUS_NORMAL, ANIM_Paragoomba_Dark_RWingStill,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations)))
EVT_LOOP(40)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Idle)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(GetEncounterState, LVar0)
EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER)
EVT_EXEC_WAIT(N(fall))
EVT_END_IF
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_FALL_TRIGGER)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(fall))
EVT_CASE_EQ(EVENT_15)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(fall))
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Dizzy)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Run)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Run)
EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Run)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Run)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66)
EVT_CALL(SetBattleCamZoom, 300)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Dive)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
EVT_CALL(SetActorSounds, ACTOR_SELF, 1, 0, 0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_SUB(LVar0, 80)
EVT_SET(LVar1, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20DF)
EVT_WAIT(4)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Miss)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FLOAT(3.0))
EVT_WAIT(10)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FLOAT(1.0))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Run)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66)
EVT_CALL(SetBattleCamZoom, 300)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Dive)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
EVT_CALL(SetActorSounds, ACTOR_SELF, 1, 0, 0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Run)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(5)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Paragoomba_Dark_Run)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/StartRumbleWithParams.inc.c"
EvtScript N(fall) = {
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(SetPartFlags, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, 3, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, 4, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, 1, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_MULTI_TARGET)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, -9, 7, -2)
EVT_CALL(SetPartPos, ACTOR_SELF, 4, LVar0, LVar1, LVar2)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 4, 11, 7, -2)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_BurnStill)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Hurt)
EVT_END_IF
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, SOUND_301, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(N(StartRumbleWithParams), 100, 10)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.3))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3)
EVT_IF_EQ(LVar3, 15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Hurt)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 10)
EVT_ADD(LVar5, 5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(10)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable_gloomba)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GLOOMBA)
EVT_EXEC_WAIT(N(init_gloomba))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_RETURN
EVT_END
};
s32 N(idleAnimations_gloomba)[] = {
STATUS_NORMAL, ANIM_Goomba_Dark_Idle,
STATUS_STONE, ANIM_Goomba_Dark_Still,
STATUS_SLEEP, ANIM_Goomba_Dark_Sleep,
STATUS_POISON, ANIM_Goomba_Dark_Idle,
STATUS_STOP, ANIM_Goomba_Dark_Still,
STATUS_STATIC, ANIM_Goomba_Dark_Idle,
STATUS_PARALYZE, ANIM_Goomba_Dark_Still,
STATUS_DIZZY, ANIM_Goomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Goomba_Dark_Dizzy,
STATUS_END,
};
s32 N(idleAnimations_gloomba_step)[] = {
STATUS_NORMAL, ANIM_Goomba_Dark_Run,
STATUS_STONE, ANIM_Goomba_Dark_Still,
STATUS_SLEEP, ANIM_Goomba_Dark_Sleep,
STATUS_POISON, ANIM_Goomba_Dark_Idle,
STATUS_STOP, ANIM_Goomba_Dark_Still,
STATUS_STATIC, ANIM_Goomba_Dark_Run,
STATUS_PARALYZE, ANIM_Goomba_Dark_Still,
STATUS_DIZZY, ANIM_Goomba_Dark_Dizzy,
STATUS_FEAR, ANIM_Goomba_Dark_Dizzy,
STATUS_END,
};
EvtScript N(init_gloomba) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_gloomba)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_gloomba)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_gloomba)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_gloomba) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_gloomba_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_gloomba)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_gloomba_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_gloomba)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_gloomba) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Dizzy)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run)
EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/anglestuff.inc.c"
EvtScript N(takeTurn_gloomba) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
EVT_WAIT(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 10)
EVT_SET(LVar1, 10)
EVT_ADD(LVar2, 3)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Sleep)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_THREAD
EVT_WAIT(4)
EVT_SET(LVar0, 180)
EVT_LOOP(4)
EVT_SUB(LVar0, 45)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Dizzy)
EVT_WAIT(5)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Tense)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Idle)
EVT_WAIT(3)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_tik_spike_top
#include "battle/common/actor/spike_top.inc.c"

View File

@ -0,0 +1,479 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/SpikedGoomba.h"
#include "effects.h"
#define NAMESPACE b_area_tik_spiked_gloomba
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 80,
STATUS_FROZEN, 100,
STATUS_DIZZY, 80,
STATUS_FEAR, 80,
STATUS_STATIC, 80,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -12,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SPIKED_GLOOMBA,
.level = 12,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 65,
.airLiftChance = 90,
.spookChance = 85,
.baseStatusChance = 75,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 24, 28 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_SpikedGoomba_Dark_Idle,
STATUS_STONE, ANIM_SpikedGoomba_Dark_Still,
STATUS_SLEEP, ANIM_SpikedGoomba_Dark_Sleep,
STATUS_POISON, ANIM_SpikedGoomba_Dark_Idle,
STATUS_STOP, ANIM_SpikedGoomba_Dark_Still,
STATUS_STATIC, ANIM_SpikedGoomba_Dark_Idle,
STATUS_PARALYZE, ANIM_SpikedGoomba_Dark_Still,
STATUS_DIZZY, ANIM_SpikedGoomba_Dark_Dizzy,
STATUS_FEAR, ANIM_SpikedGoomba_Dark_Dizzy,
STATUS_END,
};
s32 N(idleAnimations_step)[] = {
STATUS_NORMAL, ANIM_SpikedGoomba_Dark_Run,
STATUS_STONE, ANIM_SpikedGoomba_Dark_Still,
STATUS_SLEEP, ANIM_SpikedGoomba_Dark_Sleep,
STATUS_POISON, ANIM_SpikedGoomba_Dark_Idle,
STATUS_STOP, ANIM_SpikedGoomba_Dark_Still,
STATUS_STATIC, ANIM_SpikedGoomba_Dark_Run,
STATUS_PARALYZE, ANIM_SpikedGoomba_Dark_Still,
STATUS_DIZZY, ANIM_SpikedGoomba_Dark_Dizzy,
STATUS_FEAR, ANIM_SpikedGoomba_Dark_Dizzy,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_step)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesOpen)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Dizzy)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Electrocute)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Run)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Run)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Laugh)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 10)
EVT_ELSE
EVT_ADD(LVar1, 26)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/anglestuff.inc.c"
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Run)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
EVT_WAIT(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 10)
EVT_SET(LVar1, 10)
EVT_ADD(LVar2, 3)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Sleep)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_THREAD
EVT_WAIT(4)
EVT_SET(LVar0, 180)
EVT_LOOP(4)
EVT_SUB(LVar0, 45)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Dizzy)
EVT_WAIT(5)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
EVT_SET(LVar0, 0)
EVT_LOOP(16)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
EVT_CALL(N(CalculateRotationZ), LVar1, LVar2, LVar4, LVar5, LVar0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_SET(LVar3, LVar6)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(6)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Midair)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Laugh)
EVT_WAIT(15)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Idle)
EVT_WAIT(3)
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Dark_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,5 @@
#include "common.h"
#define NAMESPACE b_area_tik_spiny
#include "battle/common/actor/spiny.inc.c"

207
src/battle/area_tik/area.c Normal file
View File

@ -0,0 +1,207 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_tik
extern ActorBlueprint N(dark_koopa);
extern ActorBlueprint N(dark_paratroopa);
extern ActorBlueprint N(gloomba);
extern ActorBlueprint N(spiked_gloomba);
extern ActorBlueprint N(paragloomba);
extern ActorBlueprint N(buzzy_beetle);
extern ActorBlueprint N(spike_top);
extern ActorBlueprint N(spiny);
extern Stage N(tik_01);
extern Stage N(tik_02);
extern Stage N(tik_03);
extern Stage N(tik_04);
extern Stage N(tik_05);
Formation N(formation_00) = {
{ .actor = &N(dark_koopa), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(dark_koopa), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_01) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dark_koopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dark_koopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_02) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dark_koopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dark_koopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(dark_koopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_03) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dark_paratroopa), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(dark_paratroopa), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_04) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_05) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dark_koopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_06) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_07) = {
{ .actor = &N(dark_koopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dark_koopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(spiny), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_08) = {
{ .actor = &N(dark_paratroopa), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(dark_paratroopa), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_09) = {
{ .actor = &N(dark_paratroopa), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(dark_paratroopa), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(dark_paratroopa), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_0A) = {
{ .actor = &N(gloomba), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(gloomba), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_0B) = {
{ .actor = &N(gloomba), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(gloomba), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(gloomba), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(gloomba), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_0C) = {
{ .actor = &N(paragloomba), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(paragloomba), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(paragloomba), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_0D) = {
{ .actor = &N(paragloomba), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(spiked_gloomba), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_0E) = {
{ .actor = &N(spiked_gloomba), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(spiked_gloomba), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_0F) = {
{ .actor = &N(spiked_gloomba), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(gloomba), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(gloomba), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_10) = {
{ .actor = &N(spiked_gloomba), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(buzzy_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(buzzy_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_11) = {
{ .actor = &N(spiked_gloomba), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(buzzy_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spiked_gloomba), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(buzzy_beetle), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_12) = {
{ .actor = &N(spiked_gloomba), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(buzzy_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(paragloomba), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(buzzy_beetle), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_13) = {
{ .actor = &N(spike_top), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(spike_top), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_14) = {
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_15) = {
{ .actor = &N(buzzy_beetle), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiked_gloomba), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(buzzy_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_16) = {
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_17) = {
{ .actor = &N(spiny), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_18) = {
{ .actor = &N(spiny), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(spiny), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(spiny), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(spiny), .home = { .index = 3 }, .priority = 7, },
};
BattleList N(formationTable) = {
BATTLE("ヤミコx", N(formation_00), &N(tik_01)),
BATTLE("ヤミコx", N(formation_01), &N(tik_01)),
BATTLE("ヤミコx", N(formation_02), &N(tik_01)),
BATTLE("ヤミノコノコ,ヤミパタパタx", N(formation_03), &N(tik_01)),
BATTLE("ヤミノコノコ,トゲメットx", N(formation_04), &N(tik_01)),
BATTLE("ヤミノコノコ,トゲメット,ヤミノコノコ", N(formation_05), &N(tik_01)),
BATTLE("ヤミノコノコ,トゲゾーx", N(formation_06), &N(tik_01)),
BATTLE("ヤミノコノコ,トゲゾー,ヤミノコノコ,トゲゾー", N(formation_07), &N(tik_01)),
BATTLE("ヤミパタパタx", N(formation_08), &N(tik_01)),
BATTLE("ヤミパタパタx", N(formation_09), &N(tik_01)),
BATTLE("ヤミクリボーx", N(formation_0A), &N(tik_01)),
BATTLE("ヤミクリボーx", N(formation_0B), &N(tik_01)),
BATTLE("ヤミパタクリx", N(formation_0C), &N(tik_01)),
BATTLE("ヤミパタクリ,ヤミトゲクリ", N(formation_0D), &N(tik_01)),
BATTLE("ヤミトゲクリx", N(formation_0E), &N(tik_01)),
BATTLE("ヤミトゲクリ,ヤミクリボーx", N(formation_0F), &N(tik_01)),
BATTLE("ヤミトゲクリ,メットx", N(formation_10), &N(tik_01)),
BATTLE("ヤミトゲクリ,メット,ヤミトゲクリ,メット", N(formation_11), &N(tik_01)),
BATTLE("ヤミトゲクリ,メット,ヤミパタクリ,メット", N(formation_12), &N(tik_01)),
BATTLE("トゲメットx", N(formation_13), &N(tik_01)),
BATTLE("トゲメットx", N(formation_14), &N(tik_01)),
BATTLE("メット,ヤミトゲクリ,メット", N(formation_15), &N(tik_01)),
BATTLE("トゲゾーx", N(formation_16), &N(tik_01)),
BATTLE("トゲゾーx", N(formation_17), &N(tik_01)),
BATTLE("トゲゾーx", N(formation_18), &N(tik_01)),
{},
};
StageList N(stageTable) = {
{ "tik_01", &N(tik_01) },
{ "tik_02", &N(tik_02) },
{ "tik_03", &N(tik_03) },
{ "tik_04", &N(tik_04) },
{ "tik_05", &N(tik_05) },
{},
};

View File

@ -0,0 +1,227 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_tik_tik_01
#include "world/common/UnkFunc56.inc.c"
EvtScript N(802301F0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(802302C0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, LVarA, 1, LVar1, 0)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(802303AC) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, 0, LVar0)
EVT_CALL(SetTexPanOffset, LVarA, 1, 0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80230498) = {
EVT_SET(LVar1, ArrayVar(5))
EVT_ADD(LVar1, 1)
EVT_SET(LVar2, ArrayVar(0))
EVT_SET(LVar3, ArrayVar(1))
EVT_SET(LVar4, ArrayVar(5))
EVT_ADD(LVar4, 2)
EVT_SET(LVar5, ArrayVar(0))
EVT_SET(LVar6, ArrayVar(1))
EVT_SET(LVar7, ArrayVar(5))
EVT_ADD(LVar7, 3)
EVT_SET(LVar8, ArrayVar(0))
EVT_SET(LVar9, ArrayVar(1))
EVT_SET(LVarA, ArrayVar(5))
EVT_ADD(LVarA, 4)
EVT_SET(LVarB, ArrayVar(0))
EVT_SET(LVarC, ArrayVar(1))
EVT_CALL(EnableModel, LVar1, 1)
EVT_CALL(EnableModel, LVar4, 1)
EVT_CALL(EnableModel, LVar7, 1)
EVT_CALL(EnableModel, LVarA, 1)
EVT_LOOP(5)
EVT_ADD(LVar0, 1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(5)
EVT_ADD(LVar0, -1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVar1, 0)
EVT_CALL(EnableModel, LVar4, 0)
EVT_CALL(EnableModel, LVar7, 0)
EVT_CALL(EnableModel, LVarA, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80230968) = {
EVT_SET_GROUP(0)
EVT_USE_ARRAY(LVarA)
EVT_SET(LVar5, ArrayVar(5))
EVT_LOOP(5)
EVT_CALL(CloneModel, 16, LVar5)
EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1))
EVT_ADD(LVar5, 1)
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(RandInt, 200, LVar0)
EVT_ADD(LVar0, 50)
EVT_WAIT(LVar0)
EVT_CALL(EnableModel, ArrayVar(5), 1)
EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), 1)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1))
EVT_WAIT(1)
EVT_CALL(N(UnkFunc56), ArrayVar(5))
EVT_IF_EQ(LVar2, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_LABEL(10)
EVT_CALL(EnableModel, ArrayVar(5), 0)
EVT_EXEC_WAIT(N(80230498))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80230B30) = {
EVT_SET(LVarF, 10000)
EVT_USE_BUF(LVar0)
EVT_BUF_READ1(LVar1)
EVT_LOOP(LVar1)
EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5)
EVT_BUF_READ3(LVar6, LVar7, LVar8)
EVT_BUF_READ1(LVar9)
EVT_LOOP(LVar9)
EVT_MALLOC_ARRAY(6, LVarA)
EVT_USE_ARRAY(LVarA)
EVT_CALL(RandInt, LVar4, LVarB)
EVT_CALL(RandInt, LVar5, LVarC)
EVT_SET(LVarD, LVar2)
EVT_SET(LVarE, LVar3)
EVT_ADD(LVarD, LVarB)
EVT_ADD(LVarE, LVarC)
EVT_SET(ArrayVar(0), LVarD)
EVT_SET(ArrayVar(1), LVarE)
EVT_SET(ArrayVar(2), LVar6)
EVT_SET(ArrayVar(3), LVar7)
EVT_SET(ArrayVar(4), LVar8)
EVT_SET(ArrayVar(5), LVarF)
EVT_CHILD_THREAD
EVT_EXEC(N(80230968))
EVT_END_CHILD_THREAD
EVT_ADD(LVarF, 5)
EVT_END_LOOP
EVT_END_LOOP
EVT_CALL(EnableModel, 16, 0)
EVT_RETURN
EVT_END
};
s32 N(80230CEC)[] = {
1, -100, -50, 200, 100, 200, 0, 60, 4,
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, 13)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_SET(LVar3, -500)
EVT_EXEC(N(802301F0))
EVT_SET(LVar0, N(80230CEC))
EVT_EXEC(N(80230B30))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "tik_tex",
.shape = "tik_bt01_shape",
.hit = "tik_bt01_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,227 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_tik_tik_02
#include "world/common/UnkFunc56.inc.c"
EvtScript N(80230DF0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80230EC0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, LVarA, 1, LVar1, 0)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80230FAC) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, 0, LVar0)
EVT_CALL(SetTexPanOffset, LVarA, 1, 0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80231098) = {
EVT_SET(LVar1, ArrayVar(5))
EVT_ADD(LVar1, 1)
EVT_SET(LVar2, ArrayVar(0))
EVT_SET(LVar3, ArrayVar(1))
EVT_SET(LVar4, ArrayVar(5))
EVT_ADD(LVar4, 2)
EVT_SET(LVar5, ArrayVar(0))
EVT_SET(LVar6, ArrayVar(1))
EVT_SET(LVar7, ArrayVar(5))
EVT_ADD(LVar7, 3)
EVT_SET(LVar8, ArrayVar(0))
EVT_SET(LVar9, ArrayVar(1))
EVT_SET(LVarA, ArrayVar(5))
EVT_ADD(LVarA, 4)
EVT_SET(LVarB, ArrayVar(0))
EVT_SET(LVarC, ArrayVar(1))
EVT_CALL(EnableModel, LVar1, 1)
EVT_CALL(EnableModel, LVar4, 1)
EVT_CALL(EnableModel, LVar7, 1)
EVT_CALL(EnableModel, LVarA, 1)
EVT_LOOP(5)
EVT_ADD(LVar0, 1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(5)
EVT_ADD(LVar0, -1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVar1, 0)
EVT_CALL(EnableModel, LVar4, 0)
EVT_CALL(EnableModel, LVar7, 0)
EVT_CALL(EnableModel, LVarA, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80231568) = {
EVT_SET_GROUP(0)
EVT_USE_ARRAY(LVarA)
EVT_SET(LVar5, ArrayVar(5))
EVT_LOOP(5)
EVT_CALL(CloneModel, 16, LVar5)
EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1))
EVT_ADD(LVar5, 1)
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(RandInt, 200, LVar0)
EVT_ADD(LVar0, 50)
EVT_WAIT(LVar0)
EVT_CALL(EnableModel, ArrayVar(5), 1)
EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), 1)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1))
EVT_WAIT(1)
EVT_CALL(N(UnkFunc56), ArrayVar(5))
EVT_IF_EQ(LVar2, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_LABEL(10)
EVT_CALL(EnableModel, ArrayVar(5), 0)
EVT_EXEC_WAIT(N(80231098))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80231730) = {
EVT_SET(LVarF, 10000)
EVT_USE_BUF(LVar0)
EVT_BUF_READ1(LVar1)
EVT_LOOP(LVar1)
EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5)
EVT_BUF_READ3(LVar6, LVar7, LVar8)
EVT_BUF_READ1(LVar9)
EVT_LOOP(LVar9)
EVT_MALLOC_ARRAY(6, LVarA)
EVT_USE_ARRAY(LVarA)
EVT_CALL(RandInt, LVar4, LVarB)
EVT_CALL(RandInt, LVar5, LVarC)
EVT_SET(LVarD, LVar2)
EVT_SET(LVarE, LVar3)
EVT_ADD(LVarD, LVarB)
EVT_ADD(LVarE, LVarC)
EVT_SET(ArrayVar(0), LVarD)
EVT_SET(ArrayVar(1), LVarE)
EVT_SET(ArrayVar(2), LVar6)
EVT_SET(ArrayVar(3), LVar7)
EVT_SET(ArrayVar(4), LVar8)
EVT_SET(ArrayVar(5), LVarF)
EVT_CHILD_THREAD
EVT_EXEC(N(80231568))
EVT_END_CHILD_THREAD
EVT_ADD(LVarF, 5)
EVT_END_LOOP
EVT_END_LOOP
EVT_CALL(EnableModel, 16, 0)
EVT_RETURN
EVT_END
};
s32 N(802318EC)[] = {
1, -100, -50, 200, 100, 200, 0, 60, 4,
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, N(802318EC))
EVT_EXEC(N(80231730))
EVT_SET(LVar0, 14)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_SET(LVar3, -500)
EVT_EXEC(N(80230DF0))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "tik_tex",
.shape = "tik_bt02_shape",
.hit = "tik_bt02_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,170 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_tik_tik_03
#include "world/common/UnkFunc56.inc.c"
EvtScript N(802319F0) = {
EVT_SET(LVar1, ArrayVar(5))
EVT_ADD(LVar1, 1)
EVT_SET(LVar2, ArrayVar(0))
EVT_SET(LVar3, ArrayVar(1))
EVT_SET(LVar4, ArrayVar(5))
EVT_ADD(LVar4, 2)
EVT_SET(LVar5, ArrayVar(0))
EVT_SET(LVar6, ArrayVar(1))
EVT_SET(LVar7, ArrayVar(5))
EVT_ADD(LVar7, 3)
EVT_SET(LVar8, ArrayVar(0))
EVT_SET(LVar9, ArrayVar(1))
EVT_SET(LVarA, ArrayVar(5))
EVT_ADD(LVarA, 4)
EVT_SET(LVarB, ArrayVar(0))
EVT_SET(LVarC, ArrayVar(1))
EVT_CALL(EnableModel, LVar1, 1)
EVT_CALL(EnableModel, LVar4, 1)
EVT_CALL(EnableModel, LVar7, 1)
EVT_CALL(EnableModel, LVarA, 1)
EVT_LOOP(5)
EVT_ADD(LVar0, 1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(5)
EVT_ADD(LVar0, -1)
EVT_ADD(LVar2, 1)
EVT_ADD(LVar3, 1)
EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3)
EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar5, -1)
EVT_ADD(LVar6, 1)
EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6)
EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVar8, 1)
EVT_ADD(LVar9, -1)
EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9)
EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_ADD(LVarB, -1)
EVT_ADD(LVarC, -1)
EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC)
EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVar1, 0)
EVT_CALL(EnableModel, LVar4, 0)
EVT_CALL(EnableModel, LVar7, 0)
EVT_CALL(EnableModel, LVarA, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80231EC0) = {
EVT_SET_GROUP(0)
EVT_USE_ARRAY(LVarA)
EVT_SET(LVar5, ArrayVar(5))
EVT_LOOP(5)
EVT_CALL(CloneModel, 18, LVar5)
EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1))
EVT_ADD(LVar5, 1)
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(RandInt, 200, LVar0)
EVT_ADD(LVar0, 50)
EVT_WAIT(LVar0)
EVT_CALL(EnableModel, ArrayVar(5), 1)
EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), 1)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1))
EVT_WAIT(1)
EVT_CALL(N(UnkFunc56), ArrayVar(5))
EVT_IF_EQ(LVar2, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_LABEL(10)
EVT_CALL(EnableModel, ArrayVar(5), 0)
EVT_EXEC_WAIT(N(802319F0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80232088) = {
EVT_SET(LVarF, 10000)
EVT_USE_BUF(LVar0)
EVT_BUF_READ1(LVar1)
EVT_LOOP(LVar1)
EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5)
EVT_BUF_READ3(LVar6, LVar7, LVar8)
EVT_BUF_READ1(LVar9)
EVT_LOOP(LVar9)
EVT_MALLOC_ARRAY(6, LVarA)
EVT_USE_ARRAY(LVarA)
EVT_CALL(RandInt, LVar4, LVarB)
EVT_CALL(RandInt, LVar5, LVarC)
EVT_SET(LVarD, LVar2)
EVT_SET(LVarE, LVar3)
EVT_ADD(LVarD, LVarB)
EVT_ADD(LVarE, LVarC)
EVT_SET(ArrayVar(0), LVarD)
EVT_SET(ArrayVar(1), LVarE)
EVT_SET(ArrayVar(2), LVar6)
EVT_SET(ArrayVar(3), LVar7)
EVT_SET(ArrayVar(4), LVar8)
EVT_SET(ArrayVar(5), LVarF)
EVT_CHILD_THREAD
EVT_EXEC(N(80231EC0))
EVT_END_CHILD_THREAD
EVT_ADD(LVarF, 5)
EVT_END_LOOP
EVT_END_LOOP
EVT_CALL(EnableModel, 18, 0)
EVT_RETURN
EVT_END
};
s32 N(80232244)[] = {
1, -100, -50, 200, 100, 200, 0, 60, 4,
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, N(80232244))
EVT_EXEC(N(80232088))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "tik_tex",
.shape = "tik_bt03_shape",
.hit = "tik_bt03_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_tik_tik_04
#include "common/UnkModelStuff2.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_THREAD
EVT_SET(LVar0, 15)
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 16)
EVT_EXEC(N(script2))
EVT_WAIT(5)
EVT_SET(LVar0, 17)
EVT_EXEC(N(script2))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(5)
EVT_SET(LVar0, 9)
EVT_SET(LVar1, 145)
EVT_EXEC(N(script3))
EVT_SET(LVar0, 10)
EVT_SET(LVar1, 145)
EVT_EXEC(N(script3))
EVT_END_THREAD
EVT_SET(LVar0, 12)
EVT_SET(LVar1, 60)
EVT_EXEC(N(script3))
EVT_SET(LVar0, 13)
EVT_SET(LVar1, 60)
EVT_EXEC(N(script3))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "tik_tex",
.shape = "tik_bt04_shape",
.hit = "tik_bt04_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,86 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/tik_bt05_shape.h"
#define NAMESPACE b_area_tik_tik_05
#include "world/common/atomic/TexturePan.inc.c"
EvtScript N(80233540) = {
EVT_SET_GROUP(0)
EVT_IF_EQ(LVar5, 1)
EVT_IF_EQ(LVar6, 1)
EVT_IF_EQ(LVar7, 1)
EVT_IF_EQ(LVar8, 1)
EVT_CALL(N(UpdateTexturePanSmooth))
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(N(UpdateTexturePanStepped))
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetTexPanner, 15, 1)
EVT_CALL(EnableTexPanning, 15, 1)
EVT_THREAD
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, -2700)
EVT_SET(LVar3, 0)
EVT_SET(LVar4, -3000)
EVT_SET(LVar5, 1)
EVT_SET(LVar6, 1)
EVT_SET(LVar7, 1)
EVT_SET(LVar8, 1)
EVT_SET(LVar9, 0)
EVT_SET(LVarA, 0)
EVT_SET(LVarB, 0)
EVT_SET(LVarC, 0)
EVT_EXEC(N(80233540))
EVT_END_THREAD
EVT_CALL(SetTexPanner, 16, 2)
EVT_CALL(EnableTexPanning, 16, 1)
EVT_THREAD
EVT_SET(LVar0, 2)
EVT_SET(LVar1, 50)
EVT_SET(LVar2, -200)
EVT_SET(LVar3, 110)
EVT_SET(LVar4, -500)
EVT_SET(LVar5, 1)
EVT_SET(LVar6, 1)
EVT_SET(LVar7, 1)
EVT_SET(LVar8, 1)
EVT_SET(LVar9, 0)
EVT_SET(LVarA, 0)
EVT_SET(LVarB, 0)
EVT_SET(LVarC, 0)
EVT_EXEC(N(80233540))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_taki1, 0,
};
Stage NAMESPACE = {
.texture = "tik_tex",
.shape = "tik_bt05_shape",
.hit = "tik_bt05_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -157,20 +157,20 @@ BattleArea gBattleAreas[] = {
[BTL_AREA_FLO] = {
BTL_AREA(area_flo),
.name = "エリア ",
.battles = 0x80234574,
.stages = 0x8023486C,
.battles = &b_area_flo_formationTable,
.stages = &b_area_flo_stageTable,
},
[BTL_AREA_FLO2] = {
BTL_AREA(area_flo2),
.name = "エリア ",
.battles = 0x802356FC,
.stages = 0x80235788,
.battles = &b_area_flo2_formationTable,
.stages = &b_area_flo2_stageTable,
},
[BTL_AREA_TIK] = {
BTL_AREA(area_tik),
.name = "エリア ",
.battles = 0x802340B4,
.stages = 0x802342BC,
.battles = &b_area_tik_formationTable,
.stages = &b_area_tik_stageTable,
},
[BTL_AREA_TIK2] = {
BTL_AREA(area_tik2),

View File

@ -73,6 +73,15 @@ extern StageList b_area_jan2_stageTable;
extern BattleList b_area_kzn_formationTable;
extern StageList b_area_kzn_stageTable;
extern BattleList b_area_flo_formationTable;
extern StageList b_area_flo_stageTable;
extern BattleList b_area_flo2_formationTable;
extern StageList b_area_flo2_stageTable;
extern BattleList b_area_tik_formationTable;
extern StageList b_area_tik_stageTable;
extern BattleList b_area_sam_formationTable;
extern StageList b_area_sam_stageTable;

View File

@ -0,0 +1,821 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BuzzyBeetle.h"
extern s32 N(idleAnimations)[];
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn_ceiling);
extern EvtScript N(handleEvent_ceiling);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_FIRE, 99,
ELEMENT_BLAST, 99,
ELEMENT_END,
};
s32 N(defenseTable_flipped)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 90,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 90,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
.elementImmunityFlags = 0,
.unk_1C = 1,
.unk_1D = 7,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_HP_OFFSET_BELOW,
.type = ACTOR_TYPE_BUZZY_BEETLE,
.level = 10,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 60,
.airLiftChance = 75,
.spookChance = 75,
.baseStatusChance = 75,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 1,
.size = { 22, 18 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -8, 16 },
.statusMessageOffset = { 8, 13 },
};
s32 N(idleAnimations_normal)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim01,
STATUS_STONE, ANIM_BuzzyBeetle_Anim00,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim09,
STATUS_POISON, ANIM_BuzzyBeetle_Anim01,
STATUS_STOP, ANIM_BuzzyBeetle_Anim00,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim01,
STATUS_PARALYZE, ANIM_BuzzyBeetle_Anim00,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim0A,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim0A,
STATUS_END,
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim0F,
STATUS_STONE, ANIM_BuzzyBeetle_Anim0E,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim14,
STATUS_POISON, ANIM_BuzzyBeetle_Anim0F,
STATUS_STOP, ANIM_BuzzyBeetle_Anim0E,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim0F,
STATUS_PARALYZE, ANIM_BuzzyBeetle_Anim0E,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim15,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim15,
STATUS_END,
};
s32 N(idleAnimations_flipped)[] = {
STATUS_NORMAL, ANIM_BuzzyBeetle_Anim02,
STATUS_STONE, ANIM_BuzzyBeetle_Anim1A,
STATUS_SLEEP, ANIM_BuzzyBeetle_Anim1B,
STATUS_POISON, ANIM_BuzzyBeetle_Anim02,
STATUS_STOP, ANIM_BuzzyBeetle_Anim1A,
STATUS_STATIC, ANIM_BuzzyBeetle_Anim02,
STATUS_DIZZY, ANIM_BuzzyBeetle_Anim1C,
STATUS_FEAR, ANIM_BuzzyBeetle_Anim1C,
STATUS_END,
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 0, 10, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_ceiling)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_ceiling)))
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 0)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_normal)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_END_IF
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(fallOff) = {
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_flipped)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_SPIKY_TOP, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, SOUND_301, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA)
EVT_MOD(LVarA, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_SET(LVarD, LVarA)
EVT_SET(LVarE, LVarB)
EVT_SET(LVarF, LVarC)
EVT_SUB(LVarD, LVar0)
EVT_SUB(LVarE, LVar1)
EVT_SUB(LVarF, LVar2)
EVT_DIV(LVarD, 2)
EVT_DIV(LVarE, 2)
EVT_DIV(LVarF, 2)
EVT_ADD(LVar0, LVarD)
EVT_ADD(LVar1, LVarE)
EVT_ADD(LVar2, LVarF)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim02)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_ceiling) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(fallOff))
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(fallOff))
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(fallOff))
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoJumpBack)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16)
EVT_EXEC_WAIT(DoImmune)
EVT_WAIT(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_EXEC_WAIT(N(fallOff))
EVT_END_IF
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim11)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim13)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(setAnimation) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar3)
EVT_IF_EQ(LVar3, 2)
EVT_SET(LVar1, LVar2)
EVT_END_IF
EVT_RETURN
EVT_END
};
s32 N(bounceTable)[] = {
7, 13, 17, 21, 23, 24, 23, 21, 17, 13,
7, 0, 4, 7, 6, 4, 0, 2, 0,
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_END_IF
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D)
EVT_EXEC_WAIT(DoDeath)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_flipped)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim07)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135)
EVT_WAIT(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180)
EVT_WAIT(1)
EVT_END_THREAD
EVT_USE_BUF(EVT_PTR(N(bounceTable)))
EVT_LOOP(19)
EVT_BUF_READ1(LVar0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim19)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoJumpBack)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim17)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 9)
EVT_ELSE
EVT_ADD(LVar1, 24)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19)
EVT_EXEC_WAIT(N(setAnimation))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_END_IF
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim07)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_END_IF
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim08)
EVT_END_IF
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(8)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_ceiling) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_normal)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_FLIPABLE, 1)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0E)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim11)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0E)
EVT_WAIT(8)
EVT_END_IF
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 769, 0)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_F)
EVT_CALL(SetBattleCamZoom, 430)
EVT_CALL(SetBattleCamOffsetZ, 20)
EVT_CALL(MoveBattleCamOver, 10)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetPartYaw, ACTOR_SELF, 1, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim00)
EVT_END_THREAD
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(8)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim04)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim08)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar4)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim00)
EVT_END_THREAD
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(8)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_LABEL(10)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_SUB(LVar0, 1)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_ELSE
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(20)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02)
EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim01)
EVT_EXEC_WAIT(D_8029BBB4)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 16)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_normal)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0C)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim06)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2021)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim05)
EVT_WAIT(20)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20D3)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim0D)
EVT_WAIT(10)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_WAIT(8)
EVT_CALL(YieldTurn)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BuzzyBeetle_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,744 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Bzzap.h"
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Bzzap_Anim01,
STATUS_STONE, ANIM_Bzzap_Anim00,
STATUS_SLEEP, ANIM_Bzzap_Anim09,
STATUS_POISON, ANIM_Bzzap_Anim01,
STATUS_STOP, ANIM_Bzzap_Anim00,
STATUS_STATIC, ANIM_Bzzap_Anim01,
STATUS_PARALYZE, ANIM_Bzzap_Anim00,
STATUS_DIZZY, ANIM_Bzzap_Anim0A,
STATUS_FEAR, ANIM_Bzzap_Anim0A,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 60,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -7, 33 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 2,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 6,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 255,
.unk_1D = -5,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_BZZAP,
.level = 19,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 95,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 1,
.size = { 38, 38 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
#include "common/UnkBattleFunc1.inc.c"
ApiStatus N(AddVecXZ)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 prevX = evt_get_variable(script, *args++);
s32 prevZ = evt_get_variable(script, *args++);
s32 length = evt_get_variable(script, *args++);
s32 yaw = evt_get_variable(script, *args++);
f32 outX = prevX + (length * cos_deg(yaw));
f32 outZ = prevZ - (length * sin_deg(yaw));
evt_set_float_variable(script, *args++, outX);
evt_set_float_variable(script, *args++, outZ);
return ApiStatus_DONE2;
}
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 4, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 5, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_CALL(SetPartScale, ACTOR_SELF, 6, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -7, 19)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 2, -6)
EVT_CALL(N(UnkBattleFunc1), -20, 20, 10, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -7, 33)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 2, -10)
EVT_CALL(N(UnkBattleFunc1), -16, 22, 4, 22)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(SetPartRotation, ACTOR_SELF, 1, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim03)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim03)
EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06)
EVT_EXEC_WAIT(DoBlowAway)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackThornStab) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim03)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 52, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 12)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_ADD(LVar2, 1)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20CA)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim04)
EVT_WAIT(10)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_ADD(LVar2, 1)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20CA)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim04)
EVT_WAIT(6)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, STATUS_FLAG_8 | STATUS_FLAG_20 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(20)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021B77C) = {
EVT_SET(LVar9, LVar0)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_ADD(LVarA, 200)
EVT_ADD(LVarB, 100)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_ADD(LVarB, 50)
EVT_SUB(LVarC, 30)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_CALL(MakeLerp, 90, 450, 50, 0)
EVT_LABEL(0)
EVT_CALL(UpdateLerp)
EVT_CALL(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_IF_GT(LVar3, LVar6)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180)
EVT_ELSE
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_IF_EQ(LVar9, 2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_I)
EVT_CALL(SetBattleCamZoom, 400)
EVT_CALL(SetBattleCamOffsetZ, 30)
EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER)
EVT_CALL(MoveBattleCamOver, 60)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVarA, LVarB, LVarC)
EVT_ADD(LVarB, 30)
EVT_ADD(LVarC, 30)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, 0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_CALL(MakeLerp, -90, -720, 100, 0)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
EVT_IF_GT(LVar3, LVar6)
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180)
EVT_ELSE
EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0)
EVT_END_IF
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(attackSwarmSting) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 3, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 4, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 5, 1, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 6, 1, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20CC)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim05)
EVT_WAIT(40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Bzzap_Anim01)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(PlaySound, SOUND_358)
EVT_SET(LVar0, 2)
EVT_EXEC_GET_TID(N(8021B77C), LVarA)
EVT_WAIT(11)
EVT_SET(LVar0, 3)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 4)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 5)
EVT_EXEC(N(8021B77C))
EVT_WAIT(11)
EVT_SET(LVar0, 6)
EVT_EXEC(N(8021B77C))
EVT_LABEL(0)
EVT_IS_THREAD_RUNNING(LVarA, LVar0)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 2, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 3, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 3, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 3, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 3, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 4, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 4, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 4, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 4, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 4, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 5, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 5, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 5, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 5, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 5, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 5, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 6, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 6, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 6, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 6, 0, 2)
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 6, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 6, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(30)
EVT_CALL(StopSound, 856)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 2, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 3, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 3, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 3, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 3, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 4, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 4, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 4, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 4, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 4, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 4, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 5, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 5, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_40)
EVT_CALL(SetAnimation, ACTOR_SELF, 5, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 5, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 5, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 5, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT(11)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 6, SOUND_20CB)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 6, EVT_FLOAT(3.0))
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Bzzap_Anim03)
EVT_CALL(SetPartYaw, ACTOR_SELF, 6, 180)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 100)
EVT_ADD(LVar2, 100)
EVT_CALL(FlyPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, 10, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 6, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(StopSound, 856)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(N(attackThornStab))
EVT_RETURN
EVT_END_IF
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 500)
EVT_EXEC_WAIT(N(attackThornStab))
EVT_ELSE
EVT_EXEC_WAIT(N(attackSwarmSting))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,900 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#include "sprite/npc/Magikoopa.h"
#include "sprite/npc/FlyingMagikoopa.h"
extern EvtScript N(init);
extern EvtScript N(init_flying);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(takeTurn);
extern EvtScript N(flee);
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations2)[];
extern s32 N(idleAnimations3)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_flying)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
s32 N(statusTable_flying)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
};
ActorPartBlueprint N(parts_flying)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations2),
.defenseTable = N(defenseTable_flying),
.eventFlags = ACTOR_EVENT_FLAG_800000,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations3),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_GREEN_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 80,
.spookChance = 70,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 2,
.size = { 36, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 32 },
};
ActorBlueprint N(flying) = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_FLYING_GREEN_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts_flying)),
.partsData = N(parts_flying),
.script = &N(init_flying),
.statusTable = N(statusTable_flying),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 75,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 2,
.size = { 48, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -25, 20 },
.statusMessageOffset = { 1, 34 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Magikoopa_Green_Anim01,
STATUS_STONE, ANIM_Magikoopa_Green_Anim00,
STATUS_SLEEP, ANIM_Magikoopa_Green_Anim08,
STATUS_POISON, ANIM_Magikoopa_Green_Anim01,
STATUS_STOP, ANIM_Magikoopa_Green_Anim00,
STATUS_STATIC, ANIM_Magikoopa_Green_Anim01,
STATUS_PARALYZE, ANIM_Magikoopa_Green_Anim00,
STATUS_DIZZY, ANIM_Magikoopa_Green_Anim07,
STATUS_FEAR, ANIM_Magikoopa_Green_Anim07,
STATUS_END,
};
s32 N(idleAnimations2)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_STONE, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_SLEEP, ANIM_FlyingMagikoopa_Green_Anim08,
STATUS_POISON, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_STOP, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_STATIC, ANIM_FlyingMagikoopa_Green_Anim01,
STATUS_PARALYZE, ANIM_FlyingMagikoopa_Green_Anim00,
STATUS_DIZZY, ANIM_FlyingMagikoopa_Green_Anim07,
STATUS_FEAR, ANIM_FlyingMagikoopa_Green_Anim07,
STATUS_END,
};
s32 N(idleAnimations3)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Green_Anim0A,
STATUS_END,
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
#include "common/ShrinkActor.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#include "common/UnkBattleFunc1.inc.c"
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(canBeKnockedOff) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_80000)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(MOVE_HEADBONK1)
EVT_CASE_OR_EQ(MOVE_HEADBONK2)
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(knockOff) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_LABEL(0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(N(StartRumbleWithParams), 150, 10)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
EVT_END_THREAD
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3)
EVT_IF_EQ(LVar3, EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 10)
EVT_ADD(LVar5, 5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GREEN_MAGIKOOPA)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable)))
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_flying) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackMagicBlast) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9)
EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 50)
EVT_SET(LVar4, 0)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
EVT_WAIT(50)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(14)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 10)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
EVT_WAIT(18)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_WAIT(19)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackWandStrike) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DB)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 5)
EVT_ELSE
EVT_ADD(LVar0, 25)
EVT_END_IF
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim03)
EVT_WAIT(11)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DC)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, EVENT_SCARE_AWAY)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(ForceNextTarget)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_flying) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_flying)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetIndexFromHome, LVar0, LVar1)
EVT_CALL(GetBattleVar, 2, LVar2)
EVT_IF_GT(LVar1, LVar2)
EVT_CALL(N(UnkFunc52), LVar0, LVar3)
EVT_IF_EQ(LVar3, 0)
EVT_CALL(GetActorDefenseBoost, LVar0, LVar4)
EVT_IF_LT(LVar4, 3)
EVT_SET(LVar8, LVar0)
EVT_CALL(SetBattleVar, 2, LVar1)
EVT_GOTO(100)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(SetBattleVar, 2, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_EXEC_WAIT(N(attackMagicBlast))
EVT_ELSE
EVT_EXEC_WAIT(N(attackWandStrike))
EVT_END_IF
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim02)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim02)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 6)
EVT_ADD(LVar1, 12)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 16)
EVT_ADD(LVar1, 31)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Green_Anim01)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Green_Anim01)
EVT_END_IF
EVT_WAIT(5)
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_2DD)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(BoostDefense, LVar8, 1)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -4,16 +4,16 @@
#include "script_api/battle.h"
#include "sprite/npc/MediGuy.h"
extern EvtScript N(init_8021F9E8);
extern EvtScript N(takeTurn_80220DCC);
extern EvtScript N(idle_8021FA8C);
extern EvtScript N(handleEvent_8021FC60);
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
#include "common/UnkBattleFunc1.inc.c"
#include "common/MediGuySpriteRotationFunc.inc.c"
s32 N(idleAnimations_8021F890)[] = {
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_MediGuy_Anim01,
STATUS_STONE, ANIM_MediGuy_Anim00,
STATUS_SLEEP, ANIM_MediGuy_Anim04,
@ -26,13 +26,13 @@ s32 N(idleAnimations_8021F890)[] = {
STATUS_END,
};
s32 N(defenseTable_8021F8DC)[] = {
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_8021F8F0)[] = {
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
@ -57,15 +57,15 @@ s32 N(statusTable_8021F8F0)[] = {
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021F99C)[] = {
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 38 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021F890),
.defenseTable = N(defenseTable_8021F8DC),
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
@ -78,10 +78,10 @@ ActorBlueprint NAMESPACE = {
.type = ACTOR_TYPE_MEDI_GUY,
.level = 14,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021F99C)),
.partsData = N(partsTable_8021F99C),
.script = &N(init_8021F9E8),
.statusTable = N(statusTable_8021F8F0),
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 60,
.airLiftChance = 90,
.spookChance = 95,
@ -96,10 +96,10 @@ ActorBlueprint NAMESPACE = {
.statusMessageOffset = { 12, 31 },
};
EvtScript N(init_8021F9E8) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80220DCC)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021FA8C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021FC60)))
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 5)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -108,7 +108,7 @@ EvtScript N(init_8021F9E8) = {
EVT_END
};
EvtScript N(idle_8021FA8C) = {
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP)
@ -126,7 +126,7 @@ EvtScript N(idle_8021FA8C) = {
EVT_END
};
EvtScript N(8021FB9C) = {
EvtScript N(returnHome) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetPartRotation, ACTOR_SELF, 1, 0, 0, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
@ -139,7 +139,7 @@ EvtScript N(8021FB9C) = {
EVT_END
};
EvtScript N(handleEvent_8021FC60) = {
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -184,7 +184,7 @@ EvtScript N(handleEvent_8021FC60) = {
EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8021FB9C))
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06)
@ -215,7 +215,7 @@ EvtScript N(handleEvent_8021FC60) = {
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8021FB9C))
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
@ -270,7 +270,7 @@ EvtScript N(flyingAttack) = {
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2F8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MediGuy_Anim05)
@ -278,7 +278,7 @@ EvtScript N(flyingAttack) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 1, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2F9)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F9)
EVT_THREAD
EVT_WAIT(5)
EVT_SET(LVar0, 0)
@ -305,7 +305,7 @@ EvtScript N(flyingAttack) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_EXEC_WAIT(N(8021FB9C))
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -313,7 +313,7 @@ EvtScript N(flyingAttack) = {
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2F8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MediGuy_Anim05)
@ -324,7 +324,7 @@ EvtScript N(flyingAttack) = {
EVT_SET(LVarB, LVar1)
EVT_SET(LVarC, LVar2)
EVT_CALL(SetActorSounds, ACTOR_SELF, 1, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2F9)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F9)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, 1)
@ -346,7 +346,7 @@ EvtScript N(flyingAttack) = {
EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(2.0))
EVT_WAIT(20)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8021FB9C))
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
@ -363,8 +363,8 @@ EvtScript N(healOneAlly) = {
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(GetOwnerID, LVar0)
EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2F8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x214)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_214)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MediGuy_Anim05)
EVT_ADD(LVar2, 50)
@ -380,8 +380,8 @@ EvtScript N(healOneAlly) = {
EVT_DIV(LVar4, 100)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, LVarA, 0x206D)
EVT_CALL(PlaySoundAtActor, LVarA, 0x214)
EVT_CALL(PlaySoundAtActor, LVarA, SOUND_206D)
EVT_CALL(PlaySoundAtActor, LVarA, SOUND_214)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, LVarA, SOUND_25C)
EVT_END_THREAD
@ -398,7 +398,7 @@ EvtScript N(healOneAlly) = {
EVT_END
};
EvtScript N(80220CEC) = {
EvtScript N(findTargetsToHeal) = {
EVT_CALL(EnemyCreateTargetList, 2)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
@ -417,8 +417,8 @@ EvtScript N(80220CEC) = {
EVT_END
};
EvtScript N(takeTurn_80220DCC) = {
EVT_EXEC_WAIT(N(80220CEC))
EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(findTargetsToHeal))
EVT_IF_EQ(LVar0, -1)
EVT_EXEC_WAIT(N(flyingAttack))
EVT_ELSE

View File

@ -4,15 +4,15 @@
#include "script_api/battle.h"
#include "sprite/npc/SpikeTop.h"
extern s32 N(idleAnimations_8021CA1C)[];
extern EvtScript N(init_8021CAAC);
extern EvtScript N(idle_8021CC7C);
extern s32 N(idleAnimations)[];
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(spikeTop_TakeTurn_Ceiling);
extern EvtScript N(spikeTop_HandleEvent_Ceiling);
extern EvtScript N(spikeTop_TakeTurn_Floor);
extern EvtScript N(spikeTop_HandleEvent_Floor);
s32 N(defenseTable_8021C8B0)[] = {
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 4,
ELEMENT_FIRE, 99,
ELEMENT_BLAST, 99,
@ -24,7 +24,7 @@ s32 N(defenseTable_8021C8CC)[] = {
ELEMENT_END,
};
s32 N(statusTable_8021C8D8)[] = {
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 60,
@ -49,15 +49,15 @@ s32 N(statusTable_8021C8D8)[] = {
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021C984)[] = {
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021CA1C),
.defenseTable = N(defenseTable_8021C8B0),
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP | ACTOR_EVENT_FLAG_FLIPABLE,
.elementImmunityFlags = 0,
.unk_1D = 14,
@ -69,10 +69,10 @@ ActorBlueprint NAMESPACE = {
.type = ACTOR_TYPE_SPIKE_TOP,
.level = 17,
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_8021C984)),
.partsData = N(partsTable_8021C984),
.script = &N(init_8021CAAC),
.statusTable = N(statusTable_8021C8D8),
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 60,
.airLiftChance = 70,
.spookChance = 65,
@ -100,7 +100,7 @@ s32 N(idleAnimations_8021C9D0)[] = {
STATUS_END,
};
s32 N(idleAnimations_8021CA1C)[] = {
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_SpikeTop_Anim04,
STATUS_STONE, ANIM_SpikeTop_Anim01,
STATUS_SLEEP, ANIM_SpikeTop_Anim1C,
@ -127,8 +127,8 @@ s32 N(idleAnimations_8021CA68)[] = {
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(init_8021CAAC) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021CC7C)))
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
@ -153,7 +153,7 @@ EvtScript N(init_8021CAAC) = {
EVT_END
};
EvtScript N(idle_8021CC7C) = {
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
@ -179,7 +179,7 @@ EvtScript N(spikeTop_FallDown) = {
EVT_SUB(LVar1, 24)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 769, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, SOUND_301, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
@ -585,7 +585,7 @@ EvtScript N(spikeTop_TakeTurn_Ceiling) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikeTop_Anim01)
EVT_WAIT(8)
EVT_END_IF
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 769, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, SOUND_301, 0)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_F)
@ -711,9 +711,9 @@ EvtScript N(spikeTop_TakeTurn_Floor) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -9)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_8021C8B0)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021C9D0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021CC7C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_SPIKY_TOP, 1)
EVT_END_IF
@ -736,11 +736,11 @@ EvtScript N(spikeTop_TakeTurn_Floor) = {
EVT_WAIT(5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2021)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2021)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikeTop_Anim0A)
EVT_WAIT(20)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20D3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20D3)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)

View File

@ -0,0 +1,496 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/Spiny.h"
#include "sprite/npc/Lakitu.h"
#include "effects.h"
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Spiny_Anim01,
STATUS_STONE, ANIM_Spiny_Anim00,
STATUS_SLEEP, ANIM_Spiny_Anim10,
STATUS_POISON, ANIM_Spiny_Anim01,
STATUS_STOP, ANIM_Spiny_Anim00,
STATUS_STATIC, ANIM_Spiny_Anim01,
STATUS_PARALYZE, ANIM_Spiny_Anim00,
STATUS_DIZZY, ANIM_Spiny_Anim12,
STATUS_FEAR, ANIM_Spiny_Anim12,
STATUS_END,
};
s32 N(idleAnimations_flipped)[] = {
STATUS_NORMAL, ANIM_Spiny_Anim02,
STATUS_STONE, ANIM_Spiny_Anim15,
STATUS_SLEEP, ANIM_Spiny_Anim11,
STATUS_POISON, ANIM_Spiny_Anim02,
STATUS_STOP, ANIM_Spiny_Anim15,
STATUS_STATIC, ANIM_Spiny_Anim02,
STATUS_PARALYZE, ANIM_Spiny_Anim15,
STATUS_DIZZY, ANIM_Spiny_Anim13,
STATUS_FEAR, ANIM_Spiny_Anim13,
STATUS_END,
};
s32 N(idleAnimations_2)[] = {
STATUS_NORMAL, ANIM_Lakitu_Anim0B,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 3,
ELEMENT_END,
};
s32 N(defenseTable_flipped)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 60,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE | ACTOR_EVENT_FLAG_200000,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -4,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations_2),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SPINY,
.level = 19,
.maxHP = 5,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 60,
.airLiftChance = 75,
.spookChance = 75,
.baseStatusChance = 60,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 90,
.coinReward = 1,
.size = { 24, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0C)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim1A)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim01)
EVT_RETURN
EVT_END
};
EvtScript N(getAnimation) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar3)
EVT_IF_EQ(LVar3, 1)
EVT_SET(LVar1, LVar2)
EVT_END_IF
EVT_RETURN
EVT_END
};
s32 N(bounceArray)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 7, 6, 4, 0, 2, 0, };
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_NE(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0B)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0C)
EVT_EXEC_WAIT(DoBurnHit)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0D)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_END_IF
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_NE(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0B)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0C)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0D)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim0A)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim16)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_flipped)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_flipped)))
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_200000, 0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
EVT_USE_BUF(N(bounceArray))
EVT_LOOP(19)
EVT_BUF_READ1(LVar0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim06)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim07)
EVT_WAIT(10)
EVT_CASE_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_SWITCH
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVarA)
EVT_IF_EQ(LVarA, 0)
EVT_ADD(LVar0, 0)
EVT_END_IF
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVarA)
EVT_IF_EQ(LVarA, 0)
EVT_ADD(LVar0, -1)
EVT_END_IF
EVT_ADD(LVar1, 22)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A)
EVT_EXEC_WAIT(N(getAnimation))
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_SWITCH
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim09)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_END_SWITCH
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04)
EVT_CASE_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_END_SWITCH
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04)
EVT_CASE_EQ(1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_END_SWITCH
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim14)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim14)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(20)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02)
EVT_SET_CONST(LVar2, ANIM_Spiny_Anim01)
EVT_EXEC_WAIT(D_8029BBB4)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_200000, 1)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim19)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Spiny_Anim18)
EVT_WAIT(10)
EVT_ELSE
EVT_WAIT(20)
EVT_END_IF
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_WAIT(5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0C)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_2C7)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 0, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 4, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_Lakitu_Anim0B)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LVar0, 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,902 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#include "sprite/npc/Magikoopa.h"
#include "sprite/npc/FlyingMagikoopa.h"
extern s32 N(idleAnimations)[];
extern s32 N(idleAnimations_flying)[];
extern s32 N(80225248)[];
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(init_flying);
extern EvtScript N(flee);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_flying)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
s32 N(statusTable_flying)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 80,
STATUS_STOP, 90,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
};
ActorPartBlueprint N(parts_flying)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -5,
.unk_1D = -12,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations_flying),
.defenseTable = N(defenseTable_flying),
.eventFlags = ACTOR_EVENT_FLAG_800000,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(80225248),
.defenseTable = N(defenseTable_flying),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_YELLOW_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 80,
.spookChance = 70,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 36, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 32 },
};
ActorBlueprint N(flying) = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_FLYING_YELLOW_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(parts_flying)),
.partsData = N(parts_flying),
.script = &N(init_flying),
.statusTable = N(statusTable_flying),
.escapeChance = 40,
.airLiftChance = 95,
.spookChance = 75,
.baseStatusChance = 40,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 48, 40 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -25, 20 },
.statusMessageOffset = { 1, 34 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_Magikoopa_Yellow_Anim01,
STATUS_STONE, ANIM_Magikoopa_Yellow_Anim00,
STATUS_SLEEP, ANIM_Magikoopa_Yellow_Anim08,
STATUS_POISON, ANIM_Magikoopa_Yellow_Anim01,
STATUS_STOP, ANIM_Magikoopa_Yellow_Anim00,
STATUS_STATIC, ANIM_Magikoopa_Yellow_Anim01,
STATUS_PARALYZE, ANIM_Magikoopa_Yellow_Anim00,
STATUS_DIZZY, ANIM_Magikoopa_Yellow_Anim07,
STATUS_FEAR, ANIM_Magikoopa_Yellow_Anim07,
STATUS_END,
};
s32 N(idleAnimations_flying)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_STONE, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_SLEEP, ANIM_FlyingMagikoopa_Yellow_Anim08,
STATUS_POISON, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_STOP, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_STATIC, ANIM_FlyingMagikoopa_Yellow_Anim01,
STATUS_PARALYZE, ANIM_FlyingMagikoopa_Yellow_Anim00,
STATUS_DIZZY, ANIM_FlyingMagikoopa_Yellow_Anim07,
STATUS_FEAR, ANIM_FlyingMagikoopa_Yellow_Anim07,
STATUS_END,
};
s32 N(80225248)[] = {
STATUS_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim0A,
STATUS_END,
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
#include "common/ShrinkActor.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#include "common/UnkBattleFunc1.inc.c"
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(canBeKnockedOff) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_80000)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(MOVE_HEADBONK1)
EVT_CASE_OR_EQ(MOVE_HEADBONK2)
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(knockOff) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_LABEL(0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(N(StartRumbleWithParams), 150, 10)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
EVT_END_THREAD
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3)
EVT_IF_EQ(LVar3, EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 10)
EVT_ADD(LVar5, 5)
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_YELLOW_MAGIKOOPA)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable)))
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0)
EVT_MOD(LVar0, 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_flying) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(knockOff))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
EVT_ELSE
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackMagicBlast) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_ELSE
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9)
EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 50)
EVT_SET(LVar4, 0)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
EVT_WAIT(50)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(14)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_WAIT(30)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim03)
EVT_WAIT(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 8)
EVT_ADD(LVar1, 8)
EVT_ELSE
EVT_SUB(LVar0, 20)
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 10)
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
EVT_WAIT(18)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_WAIT(19)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackWandStrike) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DB)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 5)
EVT_ELSE
EVT_ADD(LVar0, 25)
EVT_END_IF
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim03)
EVT_WAIT(11)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DC)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_SET(LVar0, 200)
EVT_LOOP(20)
EVT_SUB(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
EVT_SET(LVar0, 55)
EVT_LOOP(20)
EVT_ADD(LVar0, 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(flee) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, EVENT_SCARE_AWAY)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(ForceNextTarget)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_flying) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_flying)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_SET(LocalFlag(0), 0)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetIndexFromHome, LVar0, LVar1)
EVT_CALL(GetBattleVar, 2, LVar2)
EVT_IF_GT(LVar1, LVar2)
EVT_CALL(N(UnkFunc52), LVar0, LVar3)
EVT_IF_EQ(LVar3, 0)
EVT_CALL(GetStatusFlags, LVar0, LVar4)
EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT)
EVT_SET(LVar8, LVar0)
EVT_CALL(SetBattleVar, 2, LVar1)
EVT_GOTO(100)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(SetBattleVar, 2, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(flee))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_EXEC_WAIT(N(attackMagicBlast))
EVT_ELSE
EVT_EXEC_WAIT(N(attackWandStrike))
EVT_END_IF
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT(15)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim02)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim02)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2F0)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 6)
EVT_ADD(LVar1, 12)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 16)
EVT_ADD(LVar1, 31)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK)
EVT_SUB(LVar0, 12)
EVT_ADD(LVar1, 14)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 36)
EVT_SUB(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Magikoopa_Yellow_Anim01)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Yellow_Anim01)
EVT_END_IF
EVT_WAIT(5)
EVT_THREAD
EVT_WAIT(10)
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_3D2)
EVT_CALL(RandInt, 3, LVar0)
EVT_ADD(LVar0, 3)
EVT_WAIT(LVar0)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(ElectrifyActor, LVar8, 3)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

40
src/common/MakeSun.inc.c Normal file
View File

@ -0,0 +1,40 @@
#include "common.h"
#include "effects.h"
char* N(sunny_areas)[] = {
"flo_03",
"flo_08",
"flo_09",
"flo_10",
"flo_16",
"flo_17",
"flo_18",
"flo_19",
"flo_21",
"flo_22",
"flo_24",
};
ApiStatus N(make_sun)(Evt* script, s32 isInitialCall) {
s32 var1 = FALSE;
u32 i;
for (i = 0; i < ARRAY_COUNT(N(sunny_areas)); i++) {
if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, N(sunny_areas)[i]) == 0) {
var1 = TRUE;
break;
}
}
fx_sun(var1, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(MakeSun) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(make_sun))
EVT_END_IF
EVT_RETURN
EVT_END
};

Some files were not shown because too many files have changed in this diff Show More