Disassemble Various Battle Scripts (#626)

* Disassemble DGB

* Disasm omo

* Disassemble KGR

* Disassemble Battle Goompa

* Disasm Goombario

* Disasm Jan2

* Disasm JAN Battle Map

* Delete data files

* Disasm Spin Smash

* Partners Disasm

* Disasm KZN Battle Map

* Delete func

* jungle_guy

* Spear Guy
This commit is contained in:
JoshDuMan 2022-01-19 06:21:19 -05:00 committed by GitHub
parent 44dd710d54
commit 0f67c8c425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
146 changed files with 23864 additions and 4030 deletions

View File

@ -1172,6 +1172,7 @@ enum Phases {
PHASE_FIRST_STRIKE = 1,
PHASE_RUN_AWAY_START = 3,
PHASE_RUN_AWAY_RESET = 4,
PHASE_5 = 5,
PHASE_USE_DEFEND = 6,
PHASE_RUN_AWAY_FAIL = 7,
PHASE_USE_LIFE_SHROOM = 8,
@ -1277,6 +1278,7 @@ enum Events {
EVENT_30 = 0x00000030,
EVENT_RECOVER_STATUS = 0x00000031,
EVENT_32 = 0x00000032,
EVENT_33 = 0x00000033,
EVENT_34 = 0x00000034,
EVENT_END_FIRST_STRIKE = 0x00000035,
EVENT_LUCKY = 0x00000037,
@ -1652,8 +1654,10 @@ enum PlayerBuffs {
enum StatusFlags {
STATUS_FLAG_1 = 0x00000001,
STATUS_FLAG_4 = 0x00000004,
STATUS_FLAG_8 = 0x00000008,
STATUS_FLAG_20 = 0x00000020,
STATUS_FLAG_40 = 0x00000040,
STATUS_FLAG_100 = 0x00000100,
STATUS_FLAG_200 = 0x00000200,
STATUS_FLAG_SLEEP = 0x00001000,

View File

@ -807,6 +807,7 @@ void draw_encounters_pre_battle(void);
void draw_encounters_neutral(void);
void show_first_strike_message(void);
void entity_upgrade_block_hide_content(s32);
s32 lookup_defense(s32*, s32);
void clear_player_status(void);
void clear_entity_models(void);

View File

@ -34,6 +34,7 @@ ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall);
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall);
ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall);
ApiStatus func_802536A8(Evt* script, s32 isInitialCall);
ApiStatus func_80253734(Evt* script, s32 isInitialCall);
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall);
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall);
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall);
@ -163,6 +164,7 @@ ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall);
ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall);
ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall);
ApiStatus GetOwnerTarget(Evt* script, s32 isInitialCall);
ApiStatus func_8026E914(Evt* script, s32 isInitialCall);
ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall);
ApiStatus GetDistanceToGoal(Evt* script, s32 isInitialCall);
ApiStatus func_8026EA7C(Evt* script, s32 isInitialCall);
@ -249,6 +251,7 @@ ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall);
ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall);
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall);
ApiStatus AfflictActor(Evt* script, s32 isInitialCall);
ApiStatus func_8027D75C(Evt* script, s32 isInitialCall);
ApiStatus GetEncounterState(Evt* script, s32 isInitialCall);
ApiStatus YieldTurn(Evt* script, s32 isInitialCall);
ApiStatus SetActorSize(Evt* script, s32 isInitialCall);
@ -363,6 +366,7 @@ extern EvtScript ForceNextTarget;
extern EvtScript DoNormalHit;
extern EvtScript D_80294AFC;
extern EvtScript D_80294FE4;
extern EvtScript D_80295350;
extern EvtScript D_80294C68;
extern EvtScript D_80295EC4;
extern EvtScript D_80295744;

View File

@ -84,7 +84,7 @@
/// Global Saved **Byte**. A variable saved in the save file.
///
/// Used for almost all savefile state.
#define GSW(INDEX) (((((INDEX)) - 170000000))
#define GSW(INDEX) ((((INDEX)) - 170000000))
/// User Word. A variable stored within the current thread's array.
/// You can load an array with EVT_USE_ARRAY or temporarily allocate one with EVT_MALLOC_ARRAY, then get/set values with

View File

@ -0,0 +1,9 @@
#ifndef _BODY_SLAM_H_
#define _BODY_SLAM_H_
#include "common_structs.h"
ApiStatus action_command_body_slam_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus action_command_body_slam_MashActionCommandInit(Evt* script, s32 isInitialCall);
#endif

View File

@ -0,0 +1,9 @@
#ifndef _BOMB_H_
#define _BOMB_H_
#include "common_structs.h"
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall);
ApiStatus action_command_bomb_MashActionCommandInit(Evt* script, s32 isInitialCall);
#endif

View File

@ -0,0 +1,9 @@
#ifndef _DIZZY_SHELL_H_
#define _DIZZY_SHELL_H_
#include "common_structs.h"
ApiStatus func_802A9000_426170(Evt* script, s32 isInitialCall);
ApiStatus action_command_dizzy_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);
#endif

View File

@ -0,0 +1,9 @@
#ifndef _FIRE_SHELL_H_
#define _FIRE_SHELL_H_
#include "common_structs.h"
ApiStatus func_802A9000_4269D0(Evt* script, s32 isInitialCall);
ApiStatus action_command_fire_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);
#endif

View File

@ -8,7 +8,7 @@ extern HudScript HudScript_BlueMeter[];
extern HudScript HudScript_AButton[];
extern s32 D_80294260;
ApiStatus func_802A9000_425590(void) {
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
@ -43,7 +43,7 @@ ApiStatus func_802A9000_425590(void) {
return ApiStatus_DONE2;
}
ApiStatus func_802A9110_4256A0(Evt* script) {
ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;

View File

@ -0,0 +1,9 @@
#ifndef _STOP_LEECH_H_
#define _STOP_LEECH_H_
#include "common_structs.h"
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall);
ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall);
#endif

View File

@ -0,0 +1,287 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/battle_clubba.h"
#define NAMESPACE b_area_dgb_clubba
extern EvtScript N(init_80218150);
extern EvtScript N(takeTurn_802186BC);
extern EvtScript N(idle_8021819C);
extern EvtScript N(handleEvent_802181AC);
s32 N(idleAnimations_80218000)[] = {
STATUS_NORMAL, NPC_ANIM_battle_clubba_Palette_00_Anim_1,
STATUS_STONE, NPC_ANIM_battle_clubba_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_battle_clubba_Palette_00_Anim_3,
STATUS_POISON, NPC_ANIM_battle_clubba_Palette_00_Anim_1,
STATUS_STOP, NPC_ANIM_battle_clubba_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_battle_clubba_Palette_00_Anim_1,
STATUS_PARALYZE, NPC_ANIM_battle_clubba_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_battle_clubba_Palette_00_Anim_5,
STATUS_FEAR, NPC_ANIM_battle_clubba_Palette_00_Anim_5,
STATUS_END,
};
s32 N(defenseTable_8021804C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_80218058)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 90,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 75,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
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, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(partsTable_80218104)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -12, 32 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80218000),
.defenseTable = N(defenseTable_8021804C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 2301,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_CLUBBA,
.level = 13,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_80218104)),
.partsData = N(partsTable_80218104),
.script = N(init_80218150),
.statusTable = N(statusTable_80218058),
.escapeChance = 60,
.airLiftChance = 60,
.spookChance = 70,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 1,
.size = { 42, 42 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 35 },
};
EvtScript N(init_80218150) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802186BC)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021819C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802181AC)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021819C) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_802181AC) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_6)
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_6)
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoJumpBack)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_2)
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_4)
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_802186BC) = {
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(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 27)
EVT_SET(LW(1), 0)
EVT_SUB(LW(2), 6)
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(15)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_00_Anim_2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SHRINK)
EVT_CALL(AddGoalPos, ACTOR_SELF, 27, 0, -6)
EVT_ELSE
EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, -6)
EVT_END_IF
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_00_Anim_1)
EVT_WAIT_FRAMES(10)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_00_Anim_8)
EVT_WAIT_FRAMES(10)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_WAIT_FRAMES(20)
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoReturnHome)
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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_00_Anim_9)
EVT_WAIT_FRAMES(15)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_00_Anim_A)
EVT_WAIT_FRAMES(2)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
EVT_END_THREAD
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT_FRAMES(19)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoReturnHome)
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,645 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/battle_tubba.h"
#define NAMESPACE b_area_dgb_tubba_blubba
extern EvtScript N(init_80218D70);
extern EvtScript N(takeTurn_80219750);
extern EvtScript N(idle_80219204);
extern EvtScript N(handleEvent_80219338);
extern EvtScript N(nextTurn_80218FB0);
extern EvtScript N(80218E60);
extern EvtScript N(80219D88);
extern EvtScript N(8021A36C);
s32 N(idleAnimations_80218C10)[] = {
STATUS_NORMAL, NPC_ANIM_battle_tubba_Palette_00_Anim_2,
STATUS_STONE, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_POISON, NPC_ANIM_battle_tubba_Palette_00_Anim_2,
STATUS_STOP, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_PARALYZE, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_PARALYZE, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_FEAR, NPC_ANIM_battle_tubba_Palette_00_Anim_0,
STATUS_END,
};
s32 N(defenseTable_80218C6C)[] = {
ELEMENT_NORMAL, 99,
ELEMENT_END,
};
s32 N(statusTable_80218C78)[] = {
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(partsTable_80218D24)[] = {
{
.flags = ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -15, 75 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80218C10),
.defenseTable = N(defenseTable_80218C6C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 246,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUBBA_BLUBBA,
.level = 0,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_80218D24)),
.partsData = N(partsTable_80218D24),
.script = N(init_80218D70),
.statusTable = N(statusTable_80218C78),
.escapeChance = 15,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 4,
.powerBounceChance = 90,
.coinReward = 0,
.size = { 100, 100 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -33, 78 },
.statusMessageOffset = { 10, 75 },
};
EvtScript N(init_80218D70) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80219750)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80219204)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80219338)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_ADDR(N(nextTurn_80218FB0)))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_IF_GE(GSW(0), -30)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_EXEC_GET_TID(N(80218E60), LW(0))
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LW(0))
EVT_RETURN
EVT_END
};
EvtScript N(80218E60) = {
EVT_LABEL(0)
EVT_WAIT_FRAMES(1)
EVT_CALL(ActorExists, ACTOR_SELF, LW(0))
EVT_IF_EQ(LW(0), FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LW(0))
EVT_IF_EQ(LW(0), NPC_ANIM_battle_tubba_Palette_00_Anim_6)
EVT_GOTO(1)
EVT_END_IF
EVT_IF_EQ(LW(0), NPC_ANIM_battle_tubba_Palette_00_Anim_7)
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.5))
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_80218FB0) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetBattlePhase, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_CALL(func_802535B4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 75)
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
EVT_CALL(SetBattleCamZoom, 380)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(ActorSpeak, MESSAGE_ID(0x0E, 0x0102), ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_9, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_15)
EVT_WAIT_FRAMES(4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_16)
EVT_WAIT_FRAMES(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_END_THREAD
EVT_CALL(EndActorSpeech, ACTOR_SELF, 1, -1, -1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(func_802535B4, 1)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle_80219204) = {
EVT_LABEL(0)
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80219238) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_7)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END
};
EvtScript N(802192E0) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(1))
EVT_IF_EQ(LW(1), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219338) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_EXEC_WAIT(N(802192E0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_BURN_DEATH)
EVT_EXEC_WAIT(N(802192E0))
EVT_WAIT_FRAMES(20)
EVT_WAIT_FRAMES(15)
EVT_IF_EQ(LW(0), EVENT_BURN_DEATH)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(802192E0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219238))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_EXEC_WAIT(N(802192E0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH)
EVT_CASE_OR_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CASE_EQ(EVENT_BURN_CONTACT)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(80219238))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoRecover)
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_80219750) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_IF_EQ(LW(0), HIT_RESULT_MISS)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_7)
EVT_CALL(SetGoalPos, ACTOR_SELF, 0, 0, 0)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_1)
EVT_WAIT_FRAMES(30)
EVT_SET(LW(0), 0)
EVT_LOOP(12)
EVT_ADD(LW(0), 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_WAIT_FRAMES(10)
EVT_SET(LW(0), 180)
EVT_LOOP(12)
EVT_SUB(LW(0), 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SET(LW(1), 80)
EVT_CALL(PlayEffect, EFFECT_ID_10, 2, 0, LW(0), LW(1), LW(2), 30, 315, 30, 0, 0, 0, 0, 0)
EVT_WAIT_FRAMES(40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_1)
EVT_SET(LW(0), 0)
EVT_LOOP(15)
EVT_ADD(LW(0), 12)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_6)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SET(LW(0), 220)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LW(0))
EVT_KILL_THREAD(LW(0))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_20000 | BS_FLAGS1_40000, 1)
EVT_CALL(func_8026F60C, 10)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(0))
EVT_IF_EQ(LW(0), 1)
EVT_CALL(func_802535B4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 75)
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
EVT_CALL(SetBattleCamZoom, 380)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(ActorSpeak, MESSAGE_ID(0x0E, 0x0103), ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_9, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_15)
EVT_WAIT_FRAMES(4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_16)
EVT_WAIT_FRAMES(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_END_THREAD
EVT_CALL(EndActorSpeech, ACTOR_SELF, 1, -1, -1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT_FRAMES(15)
EVT_CALL(func_802535B4, 1)
EVT_END_IF
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 60)
EVT_EXEC_WAIT(N(80219D88))
EVT_ELSE
EVT_EXEC_WAIT(N(8021A36C))
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80219D88) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 150)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_7)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_IF_NOT_FLAG(LW(5), 0x00080000)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_ELSE
EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_15)
EVT_WAIT_FRAMES(8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x35E)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_16)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_17)
EVT_WAIT_FRAMES(3)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SHRINK)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SET(LW(1), 0)
EVT_CALL(PlayEffect, EFFECT_ID_06, 4, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, EFFECT_ID_25, 1, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(15.0))
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20EA)
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(10))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_WAIT_FRAMES(10)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_EXEC_WAIT(N(80219238))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
EVT_IF_NOT_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_25, 1, LW(0), 0, LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_IF_NOT_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_CALL(func_80269EAC, 23)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(15), DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 200)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 30)
EVT_SWITCH(LW(15))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT_FRAMES(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_IF_EQ(LW(15), HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(80219238))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(8021A36C) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 180)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_7)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_F)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_10)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 999, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_11)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 15)
EVT_SET(LW(1), 0)
EVT_ADD(LW(2), 5)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20EA)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_12)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_1D, 0, LW(0), LW(1), LW(2), 60, 8, 10, 20, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 20)
EVT_SET(LW(1), 0)
EVT_ADD(LW(2), 5)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_1D, 0, LW(0), LW(1), LW(2), 60, 8, 10, 20, 0, 0, 0, 0, 0)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_13)
EVT_WAIT_FRAMES(4)
EVT_EXEC_WAIT(N(80219238))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_11)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
EVT_END_SWITCH
EVT_WAIT_FRAMES(2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20EA)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
EVT_IF_NOT_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_CALL(func_80269EAC, 24)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20EA)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 200)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 30)
EVT_SET(LW(15), LW(0))
EVT_SWITCH(LW(15))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
EVT_IF_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_STONE)
EVT_CALL(LandJump, ACTOR_SELF)
EVT_ELSE
EVT_GOTO(1)
EVT_END_IF
EVT_ELSE
EVT_GOTO(1)
EVT_END_IF
EVT_LABEL(0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_25, 0, LW(0), 0, LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_D)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_1D, 0, LW(0), LW(1), LW(2), 60, 8, 10, 20, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 20)
EVT_SET(LW(1), 0)
EVT_ADD(LW(2), 5)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_1D, 0, LW(0), LW(1), LW(2), 60, 8, 10, 20, 0, 0, 0, 0, 0)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
EVT_IF_NOT_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_WAIT_FRAMES(3)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_25, 1, LW(0), 0, LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_THREAD
EVT_WAIT_FRAMES(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_tubba_Palette_00_Anim_E)
EVT_END_THREAD
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_IF_NOT_FLAG(LW(5), STATUS_FLAG_SHRINK)
EVT_CALL(StartRumble, 1)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlayEffect, EFFECT_ID_1D, 0, LW(0), LW(1), LW(2), 60, 8, 10, 20, 0, 0, 0, 0, 0)
EVT_WAIT_FRAMES(8)
EVT_END_IF
EVT_LABEL(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_IF_EQ(LW(15), HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(80219238))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,64 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb
extern ActorBlueprint N(clubba);
extern ActorBlueprint N(tubba_blubba);
extern Stage N(dgb_01);
extern Stage N(dgb_02);
extern Stage N(dgb_03);
extern Stage N(dgb_04);
extern Stage N(dgb_05);
Formation N(formation_00) = {
{ .actor = &N(clubba), .home = { .index = 1 }, .priority = 10 },
};
Formation N(formation_01) = {
{ .actor = &N(clubba), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(clubba), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_02) = {
{ .actor = &N(clubba), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(clubba), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(clubba), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_03) = {
{ .actor = &N(clubba), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(clubba), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(clubba), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(clubba), .home = { .index = 3 }, .priority = 7 },
};
Vec3i N(vector3D_8021B348) = { 75, 0, 10 };
Formation N(formation_04) = {
{ .actor = &N(tubba_blubba), .home = { .vec = &N(vector3D_8021B348) }, .priority = 10 },
};
Formation N(formation_05) = {
{ .actor = &N(tubba_blubba), .home = { .vec = &N(vector3D_8021B348) }, .priority = 10, .var0 = 1 },
};
BattleList N(formationTable) = {
BATTLE("ガボンへい", N(formation_00), &N(dgb_01)),
BATTLE("ガボンへいx", N(formation_01), &N(dgb_01)),
BATTLE("ガボンへいx", N(formation_02), &N(dgb_01)),
BATTLE("ガボンへいx", N(formation_03), &N(dgb_01)),
BATTLE("むてきドガボン", N(formation_04), &N(dgb_01)),
BATTLE("むてきドガボンせりふなし", N(formation_05), &N(dgb_01)),
{},
};
StageList N(stageTable) = {
{ "dgb_01", &N(dgb_01) },
{ "dgb_02", &N(dgb_02) },
{ "dgb_03", &N(dgb_03) },
{ "dgb_04", &N(dgb_04) },
{ "dgb_05", &N(dgb_05) },
{},
};

View File

@ -0,0 +1,23 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb_dgb_01
EvtScript N(beforeBattle_8021B050) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021B070) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "dgb_tex",
.shape = "dgb_bt01_shape",
.hit = "dgb_bt01_hit",
.preBattle = N(beforeBattle_8021B050),
.postBattle = N(afterBattle_8021B070),
};

View File

@ -0,0 +1,23 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb_dgb_02
EvtScript N(beforeBattle_8021B0B0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021B0D0) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "dgb_tex",
.shape = "dgb_bt02_shape",
.hit = "dgb_bt02_hit",
.preBattle = N(beforeBattle_8021B0B0),
.postBattle = N(afterBattle_8021B0D0),
};

View File

@ -0,0 +1,23 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb_dgb_03
EvtScript N(beforeBattle_8021B110) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021B130) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "dgb_tex",
.shape = "dgb_bt03_shape",
.hit = "dgb_bt03_hit",
.preBattle = N(beforeBattle_8021B110),
.postBattle = N(afterBattle_8021B130),
};

View File

@ -0,0 +1,28 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb_dgb_04
EvtScript N(beforeBattle_8021B170) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021B190) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021B1A0)[] = {
0x00000012, 0x00000000,
};
Stage NAMESPACE = {
.texture = "dgb_tex",
.shape = "dgb_bt04_shape",
.hit = "dgb_bt04_hit",
.preBattle = N(beforeBattle_8021B170),
.postBattle = N(afterBattle_8021B190),
.foregroundModelList = N(foregroundModelList_8021B1A0),
};

View File

@ -0,0 +1,23 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_dgb_dgb_05
EvtScript N(beforeBattle_8021B1D0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021B1F0) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "dgb_tex",
.shape = "dgb_bt05_shape",
.hit = "dgb_bt05_hit",
.preBattle = N(beforeBattle_8021B1D0),
.postBattle = N(afterBattle_8021B1F0),
};

View File

@ -39,7 +39,7 @@ Stage NAMESPACE = {
.postBattle = N(afterBattle_80220894),
.foregroundModelList = N(foregroundModelList_802208A4),
.unk_1C = 1,
.unk_20 = N(specialFormation_802208E4),
.unk_20 = &N(specialFormation_802208E4),
.unk_24 = 0x200,
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,348 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/hurt_plant.h"
#define NAMESPACE b_area_jan_hurt_plant
extern EvtScript N(init_8021DA98);
extern EvtScript N(takeTurn_8021E33C);
extern EvtScript N(idle_8021DAE4);
extern EvtScript N(handleEvent_8021DCF4);
s32 N(idleAnimations_8021D940)[] = {
STATUS_NORMAL, NPC_ANIM_hurt_plant_Palette_00_Anim_2,
STATUS_STONE, NPC_ANIM_hurt_plant_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_hurt_plant_Palette_00_Anim_C,
STATUS_POISON, NPC_ANIM_hurt_plant_Palette_00_Anim_2,
STATUS_STOP, NPC_ANIM_hurt_plant_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_hurt_plant_Palette_00_Anim_2,
STATUS_PARALYZE, NPC_ANIM_hurt_plant_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_hurt_plant_Palette_00_Anim_9,
STATUS_FEAR, NPC_ANIM_hurt_plant_Palette_00_Anim_9,
STATUS_END,
};
s32 N(defenseTable_8021D98C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_FIRE, 0,
ELEMENT_END,
};
s32 N(statusTable_8021D9A0)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 95,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
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, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021DA4C)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021D940),
.defenseTable = N(defenseTable_8021D98C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -1797,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_HURT_PLANT,
.level = 16,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8021DA4C)),
.partsData = N(partsTable_8021DA4C),
.script = N(init_8021DA98),
.statusTable = N(statusTable_8021D9A0),
.escapeChance = 70,
.airLiftChance = 20,
.spookChance = 20,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 95,
.coinReward = 1,
.size = { 40, 35 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -18, 23 },
.statusMessageOffset = { 1, 20 },
};
EvtScript N(init_8021DA98) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021E33C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021DAE4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021DCF4)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_8021DAE4) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_FLAG(STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -6, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -2, -5)
EVT_CALL(N(UnkBattleFunc1), -20, 8, 0, 14)
EVT_CASE_DEFAULT
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -10, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -8, -5)
EVT_CALL(N(UnkBattleFunc1), -18, 23, 1, 20)
EVT_END_SWITCH
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021DBFC) = {
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_4)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_3)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021DCF4) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_A)
EVT_SET_CONST(LW(2), -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_A)
EVT_SET_CONST(LW(2), -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_A)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoShockHit)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8021DBFC))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_D)
EVT_WAIT_FRAMES(3)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_4)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
EVT_WAIT_FRAMES(20)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_hurt_plant_Palette_00_Anim_2)
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_8021E33C) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_4)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 1)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 27)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(15)
EVT_GOTO(123)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_4)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
EVT_WAIT_FRAMES(8)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 27)
EVT_SET(LW(1), 0)
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
EVT_CALL(SetBattleCamZoom, 350)
EVT_CALL(SetBattleCamOffsetZ, 45)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 27)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_LABEL(123)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_3)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_5)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2C4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_6)
EVT_WAIT_FRAMES(6)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_7)
EVT_WAIT_FRAMES(5)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8021DBFC))
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_FRAMES(2)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_POISON)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LW(0))
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, 1, NPC_ANIM_hurt_plant_Palette_00_Anim_7)
EVT_WAIT_FRAMES(5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8021DBFC))
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,834 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/fuzzy.h"
#include "battle/action_cmd/stop_leech.h"
#define NAMESPACE b_area_jan_jungle_fuzzy
extern s32 N(idleAnimations_8021EADC)[];
extern EvtScript N(init_8021EB28);
extern EvtScript N(takeTurn_80221628);
extern EvtScript N(idle_8021EB8C);
extern EvtScript N(handleEvent_8021EB9C);
extern Formation N(specialFormation_8022180C);
s32 N(defenseTable_8021E9D0)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_FIRE, 0,
ELEMENT_END,
};
s32 N(statusTable_8021E9E4)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 95,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 0,
STATUS_STATIC, 70,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
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, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_8021EA90)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021EADC),
.defenseTable = N(defenseTable_8021E9D0),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 246,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_JUNGLE_FUZZY,
.level = 16,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021EA90)),
.partsData = N(partsTable_8021EA90),
.script = N(init_8021EB28),
.statusTable = N(statusTable_8021E9E4),
.escapeChance = 30,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 75,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 33, 28 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021EADC)[] = {
STATUS_NORMAL, NPC_ANIM_fuzzy_Palette_03_Anim_1,
STATUS_STONE, NPC_ANIM_fuzzy_Palette_03_Anim_0,
STATUS_SLEEP, NPC_ANIM_fuzzy_Palette_03_Anim_E,
STATUS_POISON, NPC_ANIM_fuzzy_Palette_03_Anim_1,
STATUS_STOP, NPC_ANIM_fuzzy_Palette_03_Anim_0,
STATUS_STATIC, NPC_ANIM_fuzzy_Palette_03_Anim_1,
STATUS_PARALYZE, NPC_ANIM_fuzzy_Palette_03_Anim_0,
STATUS_DIZZY, NPC_ANIM_fuzzy_Palette_03_Anim_F,
STATUS_FEAR, NPC_ANIM_fuzzy_Palette_03_Anim_F,
STATUS_END,
};
EvtScript N(init_8021EB28) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80221628)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021EB8C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021EB9C)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021EB8C) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021EB9C) = {
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(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CALL(GetLastElement, LW(0))
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_ELECTRIC)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_ELSE
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_END_IF
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_10)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_03_Anim_12)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_10)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_03_Anim_12)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_12)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CALL(func_80269470)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_EXEC_WAIT(D_8029C0A4)
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_CALL(func_80269470)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_CALL(GetLastElement, LW(0))
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_ELECTRIC)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_13)
EVT_EXEC_WAIT(DoDeath)
EVT_ELSE
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_8)
EVT_EXEC_WAIT(DoDeath)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_03_Anim_9)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(divide) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
EVT_CALL(SetBattleCamZoom, 330)
EVT_CALL(SetBattleCamOffsetZ, 30)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_THREAD
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x206E)
EVT_WAIT_FRAMES(30)
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x206F)
EVT_WAIT_FRAMES(11)
EVT_END_LOOP
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2070)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_D)
EVT_WAIT_FRAMES(130)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_2)
EVT_CALL(SummonEnemy, EVT_ADDR(N(specialFormation_8022180C)), 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(SetActorPos, LW(0), LW(1), LW(2), LW(3))
EVT_CALL(SetGoalToIndex, LW(0), LW(10))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_2)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(1), LW(2), LW(3))
EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE)
EVT_END_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(SetAnimation, LW(0), 1, NPC_ANIM_fuzzy_Palette_03_Anim_2)
EVT_CALL(SetActorJumpGravity, LW(0), EVT_FLOAT(1.4))
EVT_CALL(JumpToGoal, LW(0), 14, FALSE, TRUE, FALSE)
EVT_CALL(GetActorPos, LW(0), LW(1), LW(2), LW(3))
EVT_CALL(ForceHomePos, LW(0), LW(1), LW(2), LW(3))
EVT_CALL(HPBarToHome, LW(0))
EVT_CALL(SetAnimation, LW(0), 1, NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(1))
EVT_SWITCH(LW(1))
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, LW(0), 0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, LW(0), 0, 2)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc2.inc.c"
EvtScript N(leechAttack) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_GOTO(100)
EVT_END_IF
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_LABEL(100)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_4)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
EVT_WAIT_FRAMES(5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 5)
EVT_SET(LW(1), 0)
EVT_SUB(LW(2), 5)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_5)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_9)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 20)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 15)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(4)
EVT_WAIT_FRAMES(5)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_EXEC_WAIT(D_8029C12C)
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_CASE_EQ(HIT_RESULT_HIT_STATIC)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_STATIC)
EVT_SET(LF(0), 0)
EVT_ELSE
EVT_SET(LF(0), 1)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -3, -12, -15)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_5)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LF(0), 1)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(1))
EVT_IF_FLAG(LW(1), STATUS_FLAG_STONE)
EVT_WAIT_FRAMES(10)
EVT_LOOP(2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3E0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_7)
EVT_WAIT_FRAMES(21)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3E0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(2)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(10)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_40)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_5)
EVT_WAIT_FRAMES(30)
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, 49, 32767)
EVT_CALL(func_802694A4, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(SetupMashMeter, 1, 23, 0, 0, 0, 0)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_SET(LW(13), 0)
EVT_LOOP(5)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000C)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3E0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_7)
EVT_SET(LF(0), 0)
EVT_LOOP(21)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3E0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(1)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(1)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(1)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(1)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(2)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0))
EVT_SET(LF(0), 0)
EVT_LOOP(10)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_SET(LF(0), 0)
EVT_LOOP(2)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_40)
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(3))
EVT_IF_NE(LW(3), 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x214)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 10)
EVT_CALL(N(UnkBattleFunc2), LW(0), LW(1), LW(2), LW(3))
EVT_THREAD
EVT_WAIT_FRAMES(15)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_25C)
EVT_CALL(N(UnkBattleFunc2_2), LW(0), LW(1), LW(2), LW(3))
EVT_END_THREAD
EVT_ADD(LW(0), 20)
EVT_ADD(LW(1), 20)
EVT_CALL(PlayEffect, EFFECT_ID_40, 0, LW(0), LW(1), LW(2), LW(3), 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorHP, ACTOR_SELF, LW(0))
EVT_ADD(LW(0), LW(3))
EVT_CALL(SetEnemyHP, ACTOR_SELF, LW(0))
EVT_ELSE
EVT_ADD(LW(13), 1)
EVT_IF_GT(LW(13), 1)
EVT_CALL(func_80269470)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_5)
EVT_CALL(GetPlayerHP, LW(1))
EVT_IF_EQ(LW(1), 0)
EVT_CALL(func_80269470)
EVT_BREAK_LOOP
EVT_END_IF
EVT_SET(LF(0), 0)
EVT_LOOP(35)
EVT_CALL(GetActionSuccessCopy, LW(1))
EVT_IF_EQ(LW(1), 1)
EVT_SET(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_IF_EQ(LF(0), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_80269470)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_5)
EVT_END_IF
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_THREAD
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.6), EVT_FLOAT(0.6), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 300)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 270)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 240)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 210)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(2)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.2), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 150)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 120)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 90)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 60)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(5)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_3)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_03_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(802210E0) = {
EVT_SET(LF(1), 0)
EVT_SET(LF(2), 0)
EVT_SET(LF(3), 0)
EVT_SET(LF(4), 0)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LW(0), LW(5))
EVT_CALL(GetIndexFromHome, LW(0), LW(5))
EVT_MOD(LW(5), 4)
EVT_SWITCH(LW(5))
EVT_CASE_EQ(0)
EVT_SET(LF(1), 1)
EVT_CASE_EQ(1)
EVT_SET(LF(2), 1)
EVT_CASE_EQ(2)
EVT_SET(LF(3), 1)
EVT_CASE_EQ(3)
EVT_SET(LF(4), 1)
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LW(0))
EVT_IF_NE(LW(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LW(10), -1)
EVT_SET(LW(11), -1)
EVT_CALL(GetIndexFromHome, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_IF_EQ(LF(2), 0)
EVT_SET(LW(10), 1)
EVT_END_IF
EVT_CASE_EQ(1)
EVT_IF_EQ(LF(1), 0)
EVT_SET(LW(10), 0)
EVT_END_IF
EVT_IF_EQ(LF(3), 0)
EVT_IF_EQ(LW(10), -1)
EVT_SET(LW(10), 2)
EVT_ELSE
EVT_SET(LW(11), 2)
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(2)
EVT_IF_EQ(LF(2), 0)
EVT_SET(LW(10), 1)
EVT_END_IF
EVT_IF_EQ(LF(4), 0)
EVT_IF_EQ(LW(10), -1)
EVT_SET(LW(10), 3)
EVT_ELSE
EVT_SET(LW(11), 3)
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(3)
EVT_IF_EQ(LF(3), 0)
EVT_SET(LW(10), 2)
EVT_END_IF
EVT_END_SWITCH
EVT_IF_NE(LW(11), -1)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 500)
EVT_SET(LW(10), LW(11))
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80221468) = {
EVT_SET(LW(9), 0)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
EVT_CALL(GetOriginalActorType, LW(0), LW(2))
EVT_SWITCH(LW(2))
EVT_CASE_OR_EQ(ACTOR_TYPE_FOREST_FUZZY)
EVT_CASE_OR_EQ(ACTOR_TYPE_JUNGLE_FUZZY)
EVT_CALL(GetStatusFlags, LW(0), LW(3))
EVT_IF_NOT_FLAG(LW(3), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, LW(0), 0, LW(3))
EVT_IF_NE(LW(3), 2)
EVT_ADD(LW(9), 1)
EVT_END_IF
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(ACTOR_TYPE_SPEAR_GUY)
EVT_CALL(GetStatusFlags, LW(0), LW(3))
EVT_IF_NOT_FLAG(LW(3), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, LW(0), 1, LW(3))
EVT_IF_LT(LW(3), 2)
EVT_ADD(LW(9), 1)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LW(0))
EVT_IF_NE(LW(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80221628) = {
EVT_CALL(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(N(leechAttack))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_IF_EQ(LW(0), 2)
EVT_EXEC_WAIT(N(leechAttack))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(802210E0))
EVT_IF_EQ(LW(10), -1)
EVT_EXEC_WAIT(N(leechAttack))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(80221468))
EVT_SWITCH(LW(9))
EVT_CASE_EQ(1)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 400)
EVT_EXEC_WAIT(N(divide))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(2)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 150)
EVT_EXEC_WAIT(N(divide))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(3)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 70)
EVT_EXEC_WAIT(N(divide))
EVT_RETURN
EVT_END_IF
EVT_END_SWITCH
EVT_EXEC_WAIT(N(leechAttack))
EVT_RETURN
EVT_END
};
Vec3i N(vector3D_80221800) = { 0, -1000, 0 };
Formation N(specialFormation_8022180C) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_80221800) } },
};

View File

@ -0,0 +1,295 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/m_bush.h"
#define NAMESPACE b_area_jan_m_bush
extern EvtScript N(init_80221988);
extern EvtScript N(takeTurn_80221F78);
extern EvtScript N(idle_802219D4);
extern EvtScript N(handleEvent_80221A74);
s32 N(idleAnimations_80221830)[] = {
STATUS_NORMAL, NPC_ANIM_m_bush_Palette_00_Anim_2,
STATUS_STONE, NPC_ANIM_m_bush_Palette_00_Anim_1,
STATUS_SLEEP, NPC_ANIM_m_bush_Palette_00_Anim_8,
STATUS_POISON, NPC_ANIM_m_bush_Palette_00_Anim_2,
STATUS_STOP, NPC_ANIM_m_bush_Palette_00_Anim_1,
STATUS_STATIC, NPC_ANIM_m_bush_Palette_00_Anim_2,
STATUS_PARALYZE, NPC_ANIM_m_bush_Palette_00_Anim_1,
STATUS_DIZZY, NPC_ANIM_m_bush_Palette_00_Anim_9,
STATUS_FEAR, NPC_ANIM_m_bush_Palette_00_Anim_9,
STATUS_END,
};
s32 N(defenseTable_8022187C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_FIRE, 0,
ELEMENT_END,
};
s32 N(statusTable_80221890)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 95,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 90,
STATUS_SHRINK, 75,
STATUS_STOP, 90,
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, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_8022193C)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 22 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80221830),
.defenseTable = N(defenseTable_8022187C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 246,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_M_BUSH,
.level = 16,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8022193C)),
.partsData = N(partsTable_8022193C),
.script = N(init_80221988),
.statusTable = N(statusTable_80221890),
.escapeChance = 70,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 60,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 85,
.coinReward = 1,
.size = { 32, 30 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init_80221988) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80221F78)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802219D4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221A74)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_802219D4) = {
EVT_RETURN
EVT_END
};
EvtScript N(802219E4) = {
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_m_bush_Palette_00_Anim_5)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_m_bush_Palette_00_Anim_2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80221A74) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_A)
EVT_SET_CONST(LW(2), NPC_ANIM_m_bush_Palette_00_Anim_B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_A)
EVT_SET_CONST(LW(2), NPC_ANIM_m_bush_Palette_00_Anim_B)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(802219E4))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_2)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_5)
EVT_SET_CONST(LW(2), NPC_ANIM_m_bush_Palette_00_Anim_9)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_5)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_m_bush_Palette_00_Anim_5)
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_80221F78) = {
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, NPC_ANIM_m_bush_Palette_00_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 8393, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_m_bush_Palette_00_Anim_6)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_m_bush_Palette_00_Anim_2)
EVT_WAIT_FRAMES(15)
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(802219E4))
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, 1, NPC_ANIM_m_bush_Palette_00_Anim_6)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, STATUS_FLAG_1 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
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, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_m_bush_Palette_00_Anim_2)
EVT_WAIT_FRAMES(8)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(802219E4))
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,9 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/medi_guy.h"
#define NAMESPACE b_area_jan_medi_guy
#include "battle/common/actor/medi_guy.inc.c"

File diff suppressed because it is too large Load Diff

View File

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

154
src/battle/area_jan/area.c Normal file
View File

@ -0,0 +1,154 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan
extern ActorBlueprint N(spear_guy);
extern ActorBlueprint N(jungle_fuzzy);
extern ActorBlueprint N(medi_guy);
extern ActorBlueprint N(spike_top);
extern ActorBlueprint N(hurt_plant);
extern ActorBlueprint N(m_bush);
extern Stage N(jan_00);
extern Stage N(jan_01);
extern Stage N(jan_01b);
extern Stage N(jan_02);
extern Stage N(jan_03);
extern Stage N(jan_03b);
extern Stage N(jan_04);
extern Stage N(jan_04b);
Formation N(formation_00) = {
{ .actor = &N(spear_guy), .home = { .index = 1 }, .priority = 10, .var0 = 0 },
{ .actor = &N(spear_guy), .home = { .index = 2 }, .priority = 9, .var0 = 1 },
};
Formation N(formation_01) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(spear_guy), .home = { .index = 1 }, .priority = 9, .var0 = 1 },
{ .actor = &N(spear_guy), .home = { .index = 2 }, .priority = 8, .var0 = 1 },
};
Formation N(formation_02) = {
{ .actor = &N(spear_guy), .home = { .index = 1 }, .priority = 10, .var0 = 0 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_03) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_04) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_05) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(spear_guy), .home = { .index = 2 }, .priority = 8, .var0 = 1 },
};
Formation N(formation_06) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(spear_guy), .home = { .index = 2 }, .priority = 8, .var0 = 1 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_07) = {
{ .actor = &N(spear_guy), .home = { .index = 0 }, .priority = 10, .var0 = 0 },
{ .actor = &N(medi_guy), .home = { .index = 5 }, .priority = 9 },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_08) = {
{ .actor = &N(hurt_plant), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(hurt_plant), .home = { .index = 2 }, .priority = 10 },
};
Formation N(formation_09) = {
{ .actor = &N(hurt_plant), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(hurt_plant), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(hurt_plant), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_0A) = {
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_0B) = {
{ .actor = &N(jungle_fuzzy), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_0C) = {
{ .actor = &N(jungle_fuzzy), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_0D) = {
{ .actor = &N(jungle_fuzzy), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spear_guy), .home = { .index = 1 }, .priority = 9, .var0 = 1 },
{ .actor = &N(jungle_fuzzy), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_0E) = {
{ .actor = &N(m_bush), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(m_bush), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_0F) = {
{ .actor = &N(m_bush), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(m_bush), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(m_bush), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_10) = {
{ .actor = &N(m_bush), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(m_bush), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(m_bush), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(m_bush), .home = { .index = 3 }, .priority = 7 },
};
BattleList N(formationTable) = {
BATTLE("ヤリダンサーx2", N(formation_00), &N(jan_01)),
BATTLE("ヤリダンサーx3", N(formation_01), &N(jan_01)),
BATTLE("ヤリダンサー,トロピカル", N(formation_02), &N(jan_01)),
BATTLE("ヤリダンサー,トロピカルx", N(formation_03), &N(jan_01)),
BATTLE("ヤリダンサー,トロピカルx", N(formation_04), &N(jan_01)),
BATTLE("ヤリダンサー,トロピカル,ヤリダンサー", N(formation_05), &N(jan_01)),
BATTLE("ヤリダンサー,トロピカル,ヤリダンサー,トロピカル", N(formation_06), &N(jan_01)),
BATTLE("ヤリダンサー,かいふくヘイホー,トゲメット", N(formation_07), &N(jan_01)),
BATTLE("ピロリンそうだましx2", N(formation_08), &N(jan_01)),
BATTLE("ピロリンそうだましx3", N(formation_09), &N(jan_01)),
BATTLE("トロピカルx2", N(formation_0A), &N(jan_01)),
BATTLE("トロピカルx3", N(formation_0B), &N(jan_01)),
BATTLE("トロピカルx4", N(formation_0C), &N(jan_01)),
BATTLE("トロピカル,ヤリダンサー,トロピカル", N(formation_0D), &N(jan_01)),
BATTLE("ぎたいそうx2", N(formation_0E), &N(jan_01)),
BATTLE("ぎたいそうx3", N(formation_0F), &N(jan_01)),
BATTLE("ぎたいそうx4", N(formation_10), &N(jan_01)),
{},
};
StageList N(stageTable) = {
{ "jan_00", &N(jan_00) },
{ "jan_01", &N(jan_01) },
{ "jan_01b", &N(jan_01b) },
{ "jan_02", &N(jan_02) },
{ "jan_03", &N(jan_03) },
{ "jan_03b", &N(jan_03b) },
{ "jan_04", &N(jan_04) },
{ "jan_04b", &N(jan_04b) },
{},
};

View File

@ -0,0 +1,130 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_00
EvtScript N(80226B00) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80226C18) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_802271C4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LW(0), 32)
EVT_EXEC(N(80226B00))
EVT_SET(LW(0), 43)
EVT_EXEC(N(80226B00))
EVT_SET(LW(0), 53)
EVT_EXEC(N(80226C18))
EVT_CALL(PlayEffect, EFFECT_ID_82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80227298) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt00_shape",
.hit = "jan_bt00_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_802271C4),
.postBattle = N(afterBattle_80227298),
};

View File

@ -0,0 +1,139 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_01
EvtScript N(802272D0) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802273E8) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_80227994) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 63, 0)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 9)
EVT_EXEC(N(802273E8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 10)
EVT_EXEC(N(802273E8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 11)
EVT_EXEC(N(802273E8))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80227A6C) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80227A7C)[] = {
0x00000012, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt01_shape",
.hit = "jan_bt01_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_80227994),
.postBattle = N(afterBattle_80227A6C),
.foregroundModelList = N(foregroundModelList_80227A7C),
};

View File

@ -0,0 +1,139 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_01b
EvtScript N(80227AB0) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80227BC8) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_80228174) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 40, 0)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 9)
EVT_EXEC(N(80227BC8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 10)
EVT_EXEC(N(80227BC8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 11)
EVT_EXEC(N(80227BC8))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8022824C) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8022825C)[] = {
0x00000012, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt01_shape",
.hit = "jan_bt01_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_80228174),
.postBattle = N(afterBattle_8022824C),
.foregroundModelList = N(foregroundModelList_8022825C),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_02
EvtScript N(beforeBattle_80228290) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_802282CC) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_802282DC)[] = {
0x00000005, 0x00000006, 0x00000007, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt02_shape",
.hit = "jan_bt02_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_80228290),
.postBattle = N(afterBattle_802282CC),
.foregroundModelList = N(foregroundModelList_802282DC),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_03
EvtScript N(beforeBattle_80228320) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80228370) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80228380)[] = {
0x00000040, 0x0000003F, 0x0000003E, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt03_shape",
.hit = "jan_bt03_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_80228320),
.postBattle = N(afterBattle_80228370),
.foregroundModelList = N(foregroundModelList_80228380),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_03b
EvtScript N(beforeBattle_802283C0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 66, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80228410) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80228420)[] = {
0x00000040, 0x0000003F, 0x0000003E, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt03_shape",
.hit = "jan_bt03_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_802283C0),
.postBattle = N(afterBattle_80228410),
.foregroundModelList = N(foregroundModelList_80228420),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_04
EvtScript N(beforeBattle_80228460) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 65, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_802284B0) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_802284C0)[] = {
0x00000025, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt04_shape",
.hit = "jan_bt04_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_80228460),
.postBattle = N(afterBattle_802284B0),
.foregroundModelList = N(foregroundModelList_802284C0),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan_jan_04b
EvtScript N(beforeBattle_802284F0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 33, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80228540) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80228550)[] = {
0x00000025, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt04_shape",
.hit = "jan_bt04_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_802284F0),
.postBattle = N(afterBattle_80228540),
.foregroundModelList = N(foregroundModelList_80228550),
};

View File

@ -1,10 +0,0 @@
#include "common.h"
#include "effects.h"
#define NAMESPACE b_area_jan2
#define NAMESPACE dup_b_area_jan2
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_jan2
#include "common/UnkEffect6FFunc.inc.c"

View File

@ -1,17 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_jan2
#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"
#include "common/GetBootsHammerLevel.inc.c"
#include "common/UnkBattleFunc5.inc.c"

View File

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

View File

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

View File

@ -0,0 +1,58 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2
extern ActorBlueprint N(putrid_piranha);
extern ActorBlueprint N(white_magikoopa);
extern Stage N(jan_00);
extern Stage N(jan_01);
extern Stage N(jan_01b);
extern Stage N(jan_02);
extern Stage N(jan_03);
extern Stage N(jan_03b);
extern Stage N(jan_04);
extern Stage N(jan_04b);
Formation N(formation_00) = {
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 10 },
};
Formation N(formation_01) = {
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_02) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_03) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(white_magikoopa), .home = { .index = 3 }, .priority = 7 },
};
BattleList N(formationTable) = {
BATTLE("ポイズンパックン", N(formation_00), &N(jan_01)),
BATTLE("ポイズンパックンx", N(formation_01), &N(jan_01)),
BATTLE("ポイズンパックンx", N(formation_02), &N(jan_01)),
BATTLE("ポイズンパックンx,ホワイトカメック", N(formation_03), &N(jan_01)),
{},
};
StageList N(stageTable) = {
{ "jan_00", &N(jan_00) },
{ "jan_01", &N(jan_01) },
{ "jan_01b", &N(jan_01b) },
{ "jan_02", &N(jan_02) },
{ "jan_03", &N(jan_03) },
{ "jan_03b", &N(jan_03b) },
{ "jan_04", &N(jan_04) },
{ "jan_04b", &N(jan_04b) },
{},
};

View File

@ -0,0 +1,130 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_00
EvtScript N(8021DB30) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021DC48) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8021E1F4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LW(0), 32)
EVT_EXEC(N(8021DB30))
EVT_SET(LW(0), 43)
EVT_EXEC(N(8021DB30))
EVT_SET(LW(0), 53)
EVT_EXEC(N(8021DC48))
EVT_CALL(PlayEffect, EFFECT_ID_82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021E2C8) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt00_shape",
.hit = "jan_bt00_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_8021E1F4),
.postBattle = N(afterBattle_8021E2C8),
};

View File

@ -0,0 +1,139 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_01
EvtScript N(8021E300) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021E418) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8021E9C4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 63, 0)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 9)
EVT_EXEC(N(8021E418))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 10)
EVT_EXEC(N(8021E418))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 11)
EVT_EXEC(N(8021E418))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021EA9C) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021EAAC)[] = {
0x00000012, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt01_shape",
.hit = "jan_bt01_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_8021E9C4),
.postBattle = N(afterBattle_8021EA9C),
.foregroundModelList = N(foregroundModelList_8021EAAC),
};

View File

@ -0,0 +1,139 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_01b
EvtScript N(8021EAE0) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(RotateGroup, LW(10), 2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), -2, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RotateGroup, LW(10), 1, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(RandInt, 30, LW(0))
EVT_ADD(LW(0), 30)
EVT_WAIT_FRAMES(LW(0))
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021EBF8) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, EVT_FLOAT(-2.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(2.5), -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, EVT_FLOAT(-1.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, EVT_FLOAT(0.5), 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), EVT_FLOAT(-0.5), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8021F1A4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 40, 0)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 9)
EVT_EXEC(N(8021EBF8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 10)
EVT_EXEC(N(8021EBF8))
EVT_WAIT_FRAMES(5)
EVT_SET(LW(0), 11)
EVT_EXEC(N(8021EBF8))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F27C) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F28C)[] = {
0x00000012, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt01_shape",
.hit = "jan_bt01_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_8021F1A4),
.postBattle = N(afterBattle_8021F27C),
.foregroundModelList = N(foregroundModelList_8021F28C),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_02
EvtScript N(beforeBattle_8021F2C0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F2FC) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F30C)[] = {
0x00000005, 0x00000006, 0x00000007, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt02_shape",
.hit = "jan_bt02_hit",
.bg = "yos_bg",
.preBattle = N(beforeBattle_8021F2C0),
.postBattle = N(afterBattle_8021F2FC),
.foregroundModelList = N(foregroundModelList_8021F30C),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_03
EvtScript N(beforeBattle_8021F350) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F3A0) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F3B0)[] = {
0x00000040, 0x0000003F, 0x0000003E, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt03_shape",
.hit = "jan_bt03_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_8021F350),
.postBattle = N(afterBattle_8021F3A0),
.foregroundModelList = N(foregroundModelList_8021F3B0),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_03b
EvtScript N(beforeBattle_8021F3F0) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 66, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F440) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F450)[] = {
0x00000040, 0x0000003F, 0x0000003E, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt03_shape",
.hit = "jan_bt03_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_8021F3F0),
.postBattle = N(afterBattle_8021F440),
.foregroundModelList = N(foregroundModelList_8021F450),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_04
EvtScript N(beforeBattle_8021F490) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 65, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F4E0) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F4F0)[] = {
0x00000025, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt04_shape",
.hit = "jan_bt04_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_8021F490),
.postBattle = N(afterBattle_8021F4E0),
.foregroundModelList = N(foregroundModelList_8021F4F0),
};

View File

@ -0,0 +1,31 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_jan2_jan_04b
EvtScript N(beforeBattle_8021F520) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 33, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021F570) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021F580)[] = {
0x00000025, 0x00000000,
};
Stage NAMESPACE = {
.texture = "jan_tex",
.shape = "jan_bt04_shape",
.hit = "jan_bt04_hit",
.bg = "jan_bg",
.preBattle = N(beforeBattle_8021F520),
.postBattle = N(afterBattle_8021F570),
.foregroundModelList = N(foregroundModelList_8021F580),
};

View File

@ -1,13 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kgr
#include "common/UnkBattleFunc1.inc.c"
#include "common/ItemEntityJumpToPos.inc.c"
INCLUDE_ASM(s32, "battle/area_kgr/56E2A0", func_802182E4_56E584);
#include "common/StartRumbleWithParams.inc.c"
#include "common/SpyGuyActionFunc.inc.c"

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kgr
INCLUDE_ASM(s32, "battle/area_kgr/56E800", func_80218560_56E800);

View File

@ -0,0 +1,974 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/fuzzipede.h"
#define NAMESPACE b_area_kgr_fuzzipede
extern EvtScript N(init_80218B70);
extern EvtScript N(takeTurn_8021C1A4);
extern EvtScript N(idle_80218D58);
extern EvtScript N(handleEvent_802197FC);
extern EvtScript N(handleEvent_80219ED4);
extern EvtScript N(nextTurn_80218C58);
extern EvtScript N(8021A2E8);
s32 N(idleAnimations_802189B0)[] = {
STATUS_NORMAL, NPC_ANIM_fuzzipede_Palette_00_Anim_4,
STATUS_STONE, NPC_ANIM_fuzzipede_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_fuzzipede_Palette_00_Anim_29,
STATUS_POISON, NPC_ANIM_fuzzipede_Palette_00_Anim_4,
STATUS_STOP, NPC_ANIM_fuzzipede_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_fuzzipede_Palette_00_Anim_4,
STATUS_PARALYZE, NPC_ANIM_fuzzipede_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_fuzzipede_Palette_00_Anim_26,
STATUS_FEAR, NPC_ANIM_fuzzipede_Palette_00_Anim_26,
STATUS_END,
};
s32 N(idleAnimations_802189FC)[] = {
STATUS_NORMAL, NPC_ANIM_fuzzipede_Palette_00_Anim_6,
STATUS_STONE, NPC_ANIM_fuzzipede_Palette_00_Anim_2,
STATUS_SLEEP, NPC_ANIM_fuzzipede_Palette_00_Anim_2A,
STATUS_POISON, NPC_ANIM_fuzzipede_Palette_00_Anim_6,
STATUS_STOP, NPC_ANIM_fuzzipede_Palette_00_Anim_2,
STATUS_STATIC, NPC_ANIM_fuzzipede_Palette_00_Anim_6,
STATUS_PARALYZE, NPC_ANIM_fuzzipede_Palette_00_Anim_2,
STATUS_DIZZY, NPC_ANIM_fuzzipede_Palette_00_Anim_27,
STATUS_FEAR, NPC_ANIM_fuzzipede_Palette_00_Anim_27,
STATUS_END,
};
s32 N(defenseTable_80218A48)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_80218A54)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 75,
STATUS_SHRINK, 50,
STATUS_STOP, 75,
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, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(partsTable_80218B00)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_802189B0),
.defenseTable = N(defenseTable_80218A48),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -266,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.index = 2,
.posOffset = { 0, 40, 0 },
.targetOffset = { 2, -16 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(defenseTable_80218A48),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -266,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_FUZZIPEDE,
.level = 43,
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80218B00)),
.partsData = N(partsTable_80218B00),
.script = N(init_80218B70),
.statusTable = N(statusTable_80218A54),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 0,
.size = { 26, 38 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(init_80218B70) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021C1A4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80218D58)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802197FC)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_ADDR(N(nextTurn_80218C58)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(SetHomePos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(func_80253734, 1)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_80218C58) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_I)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetBattleCamZoom, 200)
EVT_CALL(SetBattleCamOffsetZ, 10)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT_FRAMES(30)
EVT_CALL(ActorSpeak, MESSAGE_ID(0x07, 0x009C), ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_24, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT_FRAMES(30)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(idle_80218D58) = {
EVT_RETURN
EVT_END
};
EvtScript N(80218D68) = {
EVT_CALL(SetHomePos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_A)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 60)
EVT_SET(LW(1), 0)
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802189B0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802197FC)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 2, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -2, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(80218FC8) = {
EVT_CALL(SetHomePos, ACTOR_SELF, 60, 0, 15)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_A)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802189B0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802197FC)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 2, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -2, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(802191AC) = {
EVT_CALL(SetHomePos, ACTOR_SELF, 30, 115, -28)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_A)
EVT_SET(LW(0), 65)
EVT_SET(LW(1), 0)
EVT_SET(LW(2), -15)
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalPos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, 130, 100, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalPos, ACTOR_SELF, 110, 109, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, 90, 117, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, 70, 120, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, 50, 125, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, 30, 130, -28)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_LOOP(10)
EVT_ADDF(LW(1), EVT_FLOAT(-1.5))
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_SET(LW(0), 0)
EVT_LOOP(10)
EVT_ADD(LW(0), 18)
EVT_CALL(SetActorRotation, ACTOR_SELF, LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802189FC)))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_6)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80219ED4)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 1)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 2, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 2, 8)
EVT_CALL(N(UnkBattleFunc1), -10, -25, 10, -30)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(80219668) = {
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 2)
EVT_CASE_EQ(2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 3)
EVT_CASE_EQ(3)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 4)
EVT_CASE_EQ(4)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(80218D68))
EVT_CASE_OR_EQ(1)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(4)
EVT_EXEC_WAIT(N(802191AC))
EVT_END_CASE_GROUP
EVT_CASE_EQ(3)
EVT_EXEC_WAIT(N(80218FC8))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_802197FC) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1E)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzipede_Palette_00_Anim_1F)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1E)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzipede_Palette_00_Anim_1F)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1F)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219668))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SWAP_PARTNER)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_19)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80219D68) = {
EVT_CALL(GetLastDamage, ACTOR_SELF, LW(0))
EVT_IF_LE(LW(0), 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_EXEC_WAIT(N(8021A2E8))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802189B0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802197FC)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 2, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -2, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 3)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_ELSE
EVT_EXEC_WAIT(N(802191AC))
EVT_WAIT_FRAMES(20)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219ED4) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(80219D68))
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_20)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzipede_Palette_00_Anim_21)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(80219D68))
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_20)
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzipede_Palette_00_Anim_21)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_21)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219668))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzipede_Palette_00_Anim_1C)
EVT_EXEC_WAIT(DoDeath)
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(8021A2E8) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 60)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CASE_EQ(3)
EVT_CASE_OR_EQ(1)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(4)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_HP_OFFSET_BELOW, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.001953125))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_SET(LW(1), 11)
EVT_ELSE
EVT_SET(LW(1), 28)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_THREAD
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(0), 180)
EVT_LOOP(8)
EVT_SUB(LW(0), 22)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_ADD(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), 0, LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(8021A6D8) = {
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_EXEC_WAIT(N(8021A2E8))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_A)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_12)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20DA)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(15), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(15))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_5)
EVT_THREAD
EVT_SET(LW(0), 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_LOOP(20)
EVT_ADD(LW(0), 9)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -20, 0, 5)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), -5, LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(15), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(15), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(30)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_END_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), 0, LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(80219668))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_5)
EVT_THREAD
EVT_SET(LW(0), 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_LOOP(20)
EVT_ADD(LW(0), 9)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(15), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_SWITCH(LW(15))
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, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_THREAD
EVT_SET(LW(0), 180)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_LOOP(10)
EVT_SUB(LW(0), 18)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_ADD(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(8)
EVT_EXEC_WAIT(N(80219668))
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/ItemEntityJumpToPos.inc.c"
#include "common/DisableRandomAbility.inc.c"
#include "common/StartRumbleWithParams.inc.c"
#include "common/SpyGuyActionFunc.inc.c"
EvtScript N(8021B008) = {
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(10))
EVT_SWITCH(LW(10))
EVT_CASE_EQ(0)
EVT_CASE_EQ(1)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(1), LW(2), LW(3))
EVT_SET(LW(2), 0)
EVT_SUB(LW(3), 1)
EVT_CALL(N(DisableRandomAbility), LW(4), LW(5))
EVT_CALL(MakeItemEntity, LW(4), LW(1), LW(2), LW(3), 1, 0)
EVT_ADD(LW(1), 30)
EVT_CALL(N(ItemEntityJumpToPos), LW(0), LW(1), LW(2), LW(3), 20, EVT_FLOAT(1.0))
EVT_ADD(LW(1), 20)
EVT_CALL(N(ItemEntityJumpToPos), LW(0), LW(1), LW(2), LW(3), 10, EVT_FLOAT(1.0))
EVT_ADD(LW(1), 10)
EVT_CALL(N(ItemEntityJumpToPos), LW(0), LW(1), LW(2), LW(3), 5, EVT_FLOAT(1.0))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CASE_EQ(2)
EVT_CALL(ShowMessageBox, LW(5), 60)
EVT_SUB(LW(1), 150)
EVT_CALL(N(ItemEntityJumpToPos), LW(0), LW(1), LW(2), LW(3), 30, EVT_FLOAT(1.0))
EVT_CALL(RemoveItemEntity, LW(0))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 3)
EVT_RETURN
EVT_END_SWITCH
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021B22C) = {
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_EXEC_WAIT(N(8021A2E8))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_A)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_EXEC_WAIT(D_8029C12C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_12)
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20DB)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(15), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(15))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_11)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.001953125))
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(15), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(15), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_THREAD
EVT_SET(LW(0), 90)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_LOOP(6)
EVT_ADD(LW(0), 15)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_SUB(LW(0), 30)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_SET(LW(0), 180)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_LOOP(7)
EVT_ADD(LW(0), 25)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_SUB(LW(0), 20)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 7, FALSE, TRUE, FALSE)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_WAIT_FRAMES(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_EXEC_WAIT(N(80219668))
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, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_11)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.001953125))
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(2), 1)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(15), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_THREAD
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_SWITCH(LW(15))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_SET(LF(0), 0)
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_SET(LF(0), 1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_LE(LW(0), 0)
EVT_SET(LF(0), 0)
EVT_END_IF
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
EVT_SET(LF(0), 0)
EVT_END_IF
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON)
EVT_SET(LF(0), 0)
EVT_END_IF
EVT_IF_EQ(LF(0), 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_EXEC(N(8021B008))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_WAIT_FRAMES(8)
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(0))
EVT_IF_NE(LW(0), 0)
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_LOOP(3)
EVT_SUB(LW(0), 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_END_LOOP
EVT_WAIT_FRAMES(10)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_CALL(PlayEffect, EFFECT_ID_43, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(N(StartRumbleWithParams), 200, 10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20DC)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_13)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_ADD(LW(0), 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_WAIT_FRAMES(8)
EVT_WAIT_FRAMES(10)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(N(80219668))
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(8021C004) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_12)
EVT_WAIT_FRAMES(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzipede_Palette_00_Anim_4)
EVT_THREAD
EVT_WAIT_FRAMES(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x214)
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_25C)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(HealActor, ACTOR_SELF, 4, 0)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021C1A4) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(3)
EVT_CALL(GetActorHP, ACTOR_SELF, LW(0))
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LW(1))
EVT_MUL(LW(0), 100)
EVT_DIV(LW(0), LW(1))
EVT_IF_LE(LW(0), 35)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 500)
EVT_EXEC_WAIT(N(8021C004))
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 500)
EVT_EXEC_WAIT(N(8021A6D8))
EVT_ELSE
EVT_CALL(N(SpyGuyActionFunc), LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(8021B22C))
EVT_ELSE
EVT_EXEC_WAIT(N(8021A6D8))
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,22 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kgr
extern ActorBlueprint N(fuzzipede);
extern Stage N(kgr_01);
Formation N(formation_00) = {
{ .actor = &N(fuzzipede), .home = { .index = 2 }, .priority = 10 },
};
BattleList N(formationTable) = {
BATTLE("ケムシ", N(formation_00), &N(kgr_01)),
{},
};
StageList N(stageTable) = {
{ "kgr_01", &N(kgr_01) },
{},
};

View File

@ -0,0 +1,314 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kgr_kgr_01
ApiStatus func_80218560_56E800(Evt* script, s32 isInitialCall);
INCLUDE_ASM(s32, "battle/area_kgr/56E800", func_80218560_56E800);
EvtScript N(8021C330) = {
EVT_SET(LW(10), LW(0))
EVT_LABEL(0)
EVT_CALL(func_80218560_56E800, 0)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_LOOP(0)
EVT_CALL(func_80218560_56E800, 1)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(11), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -7, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -27, 0, 0, 1)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -5, 0, 0, 1)
EVT_WAIT_FRAMES(3)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_LOOP(0)
EVT_CALL(func_80218560_56E800, 2)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(11), 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LW(11))
EVT_ADD(LW(11), 30)
EVT_LOOP(LW(11))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(RandInt, 5, LW(0))
EVT_IF_NE(LW(0), 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(func_80218560_56E800, 3)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_LOOP(0)
EVT_CALL(func_80218560_56E800, 1)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(11), 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -7, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -27, 0, 0, 1)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -5, 0, 0, 1)
EVT_WAIT_FRAMES(3)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(5)
EVT_LOOP(0)
EVT_CALL(func_80218560_56E800, 2)
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(11), 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(RandInt, 80, LW(11))
EVT_ADD(LW(11), 30)
EVT_LOOP(LW(11))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
EVT_CALL(RotateModel, LW(10), -20, 0, 0, 1)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021C9C0) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 3, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 2, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), -1, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(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(LW(10), LW(0))
EVT_SET(LW(11), LW(1))
EVT_SET(LW(5), 5)
EVT_USE_BUF(EVT_ADDR(N(intTable_8021CD64)))
EVT_LABEL(0)
EVT_BUF_READ1(LW(1))
EVT_IF_EQ(LW(1), 255)
EVT_USE_BUF(EVT_ADDR(N(intTable_8021CD64)))
EVT_BUF_READ1(LW(1))
EVT_END_IF
EVT_SET(LW(0), LW(5))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), 0)
EVT_WAIT_FRAMES(1)
EVT_ADD(LW(5), 1)
EVT_SET(LW(12), LW(11))
EVT_SUB(LW(12), 20)
EVT_IF_GT(LW(5), LW(12))
EVT_GOTO(1)
EVT_END_IF
EVT_SET(LW(0), LW(5))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), 0)
EVT_WAIT_FRAMES(1)
EVT_ADD(LW(5), 1)
EVT_SET(LW(12), LW(11))
EVT_SUB(LW(12), 20)
EVT_IF_GT(LW(5), LW(12))
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_SET(LW(2), 0)
EVT_LOOP(20)
EVT_ADD(LW(5), 1)
EVT_SUB(LW(1), 2)
EVT_SET(LW(0), LW(5))
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), 0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_SUB(LW(5), 280)
EVT_SET(LW(1), 0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021D010) = {
EVT_SET(LW(10), LW(0))
EVT_LOOP(0)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -3, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -2, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, -1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 1, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
EVT_WAIT_FRAMES(2)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8021D3B4) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_THREAD
EVT_SET(LW(0), 19)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 20)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 21)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 22)
EVT_EXEC(N(8021D010))
EVT_END_THREAD
EVT_THREAD
EVT_SET(LW(0), 14)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 15)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 16)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 17)
EVT_EXEC(N(8021D010))
EVT_WAIT_FRAMES(4)
EVT_SET(LW(0), 18)
EVT_EXEC(N(8021D010))
EVT_END_THREAD
EVT_SET(LW(0), 11)
EVT_EXEC(N(8021D010))
EVT_SET(LW(0), 12)
EVT_EXEC(N(8021D010))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8021D598) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8021D5A8)[] = {
0x00000009, 0x00000010, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kgr_tex",
.shape = "kgr_bt01_shape",
.hit = "kgr_bt01_hit",
.preBattle = N(beforeBattle_8021D3B4),
.postBattle = N(afterBattle_8021D598),
.foregroundModelList = N(foregroundModelList_8021D5A8),
};

View File

@ -64,6 +64,7 @@ INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219818_6A0A18);
#include "common/GetItemEntityPosition.inc.c"
#define NAMESPACE b_area_kpa2
//#include "common/DisableRandomAbility.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219FFC_6A11FC);
#define NAMESPACE dup_b_area_kpa2
@ -108,6 +109,7 @@ INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021ABD8_6A1DD8);
#include "common/GetItemEntityPosition.inc.c"
//#include "common/DisableRandomAbility.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021B3B4_6A25B4);
#define NAMESPACE dup6_b_area_kpa2

View File

@ -41,6 +41,7 @@ INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021C520_6A3720);
#include "common/GetItemEntityPosition.inc.c"
#define NAMESPACE b_area_kpa2
//#include "common/DisableRandomAbility.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CCFC_6A3EFC);
#include "common/CanPlayerLoseAction.inc.c"

View File

@ -1,10 +0,0 @@
#include "common.h"
#include "effects.h"
#define NAMESPACE b_area_kzn
#include "common/UnkSfxFunc.inc.c"
#include "common/UnkBattleFunc1.inc.c"
#include "common/UnkEffect6FFunc.inc.c"

View File

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

View File

@ -1,9 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup2_b_area_kzn
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kzn
INCLUDE_ASM(s32, "battle/area_kzn/58C740", func_8021851C_58C80C);

View File

@ -1,15 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kzn
#include "common/ShrinkActor.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE dup3_b_area_kzn
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kzn
#include "common/StartRumbleWithParams.inc.c"
#include "world/common/UnkFunc52.inc.c"

View File

@ -1,27 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup_b_area_kzn
#include "common/ShrinkActor.inc.c"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup_b_area_kzn
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup4_b_area_kzn
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup_b_area_kzn
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kzn
#define NAMESPACE dup_b_area_kzn
#include "world/common/UnkFunc52.inc.c"
#define NAMESPACE b_area_kzn
#include "common/GetBootsHammerLevel.inc.c"
#include "common/UnkBattleFunc5.inc.c"

View File

@ -0,0 +1,678 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/bubble.h"
#define NAMESPACE b_area_kzn_lava_bubble
extern s32 N(idleAnimations_80218FC4)[];
extern s32 N(idleAnimations_80219010)[];
extern EvtScript N(init_8021901C);
extern EvtScript N(takeTurn_8021AEA4);
extern EvtScript N(idle_802191E4);
extern EvtScript N(handleEvent_80219500);
s32 N(defenseTable_80218E10)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_WATER, 4294967294,
ELEMENT_ICE, 4294967294,
ELEMENT_FIRE, 99,
ELEMENT_BLAST, 4294967295,
ELEMENT_END,
};
s32 N(statusTable_80218E3C)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
STATUS_PARALYZE, 50,
STATUS_SHRINK, 75,
STATUS_STOP, 85,
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, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(partsTable_80218EE8)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 25 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80218FC4),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = ELEMENT_IMMUNITY_FLAGS_2,
.unk_1C = -522,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80219010),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80219010),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
.index = 4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80219010),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
.index = 5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80219010),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_LAVA_BUBBLE,
.level = 17,
.maxHP = 9,
.partCount = ARRAY_COUNT(N(partsTable_80218EE8)),
.partsData = N(partsTable_80218EE8),
.script = N(init_8021901C),
.statusTable = N(statusTable_80218E3C),
.escapeChance = 50,
.airLiftChance = 90,
.spookChance = 85,
.baseStatusChance = 50,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 1,
.size = { 33, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_80218FC4)[] = {
STATUS_NORMAL, NPC_ANIM_bubble_Palette_00_Anim_1,
STATUS_STONE, NPC_ANIM_bubble_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_bubble_Palette_00_Anim_1,
STATUS_POISON, NPC_ANIM_bubble_Palette_00_Anim_1,
STATUS_STOP, NPC_ANIM_bubble_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_bubble_Palette_00_Anim_1,
STATUS_PARALYZE, NPC_ANIM_bubble_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_bubble_Palette_00_Anim_A,
STATUS_FEAR, NPC_ANIM_bubble_Palette_00_Anim_A,
STATUS_END,
};
s32 N(idleAnimations_80219010)[] = {
STATUS_NORMAL, NPC_ANIM_bubble_Palette_00_Anim_1,
STATUS_END,
};
EvtScript N(init_8021901C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021AEA4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802191E4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80219500)))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_END_SWITCH
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, ACTOR_SELF, 4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, ACTOR_SELF, 5, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 5)
EVT_CALL(ForceHomePos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(idle_802191E4) = {
EVT_LABEL(0)
EVT_CALL(MakeLerp, 0, 10, 25, 10)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(GetHomePos, ACTOR_SELF, LW(2), LW(3), LW(4))
EVT_ADD(LW(0), LW(3))
EVT_CALL(SetActorPos, ACTOR_SELF, LW(2), LW(0), LW(4))
EVT_IF_EQ(LW(1), 1)
EVT_LABEL(11)
EVT_WAIT_FRAMES(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), 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, ACTOR_SELF, 2, LW(0))
EVT_IF_EQ(LW(0), 1)
EVT_GOTO(11)
EVT_END_IF
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(MakeLerp, 10, 0, 25, 10)
EVT_LABEL(2)
EVT_CALL(UpdateLerp)
EVT_CALL(GetHomePos, ACTOR_SELF, LW(2), LW(3), LW(4))
EVT_ADD(LW(0), LW(3))
EVT_CALL(SetActorPos, ACTOR_SELF, LW(2), LW(0), LW(4))
EVT_IF_EQ(LW(1), 1)
EVT_LABEL(22)
EVT_WAIT_FRAMES(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), 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, ACTOR_SELF, 2, LW(0))
EVT_IF_EQ(LW(0), 1)
EVT_GOTO(22)
EVT_END_IF
EVT_GOTO(2)
EVT_END_IF
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/UnkSfxFunc.inc.c"
EvtScript N(80219464) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219500) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_8)
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_00_Anim_9)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_8)
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_00_Anim_9)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_9)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219464))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
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_CASE_OR_EQ(EVENT_BURN_TAUNT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoNormalHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_7)
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(80219464))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_00_Anim_7)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_UP_AND_AWAY)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(fireTackle) = {
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, NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 5)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_1)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 20)
EVT_SET(LW(1), 0)
EVT_ADD(LW(2), 1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(14)
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(80219464))
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, 1, NPC_ANIM_bubble_Palette_00_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(2), 1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_SET(LW(0), 1)
EVT_SET(LW(1), 4587524)
EVT_EXEC_WAIT(DoJumpBack)
EVT_WAIT_FRAMES(5)
EVT_EXEC_WAIT(N(80219464))
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(8021A074) = {
EVT_SET(LW(6), 2)
EVT_LOOP(4)
EVT_THREAD
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, LW(6), EVT_FLOAT(0.2), EVT_FLOAT(0.2), EVT_FLOAT(0.2))
EVT_ELSE
EVT_CALL(SetPartScale, ACTOR_SELF, LW(6), EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_END_IF
EVT_CALL(SetPartPos, ACTOR_SELF, LW(6), LW(0), LW(1), LW(2))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(6), ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LW(6), EVT_FLOAT(8.0))
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LW(6), EVT_FLOAT(0.01))
EVT_CALL(SetPartSounds, ACTOR_SELF, LW(6), 2, 720, 0)
EVT_CALL(JumpPartTo, ACTOR_SELF, LW(6), LW(3), LW(4), LW(5), 0, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(6), ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_END_THREAD
EVT_WAIT_FRAMES(3)
EVT_ADD(LW(6), 1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8021A218) = {
EVT_EXEC(N(8021A074))
EVT_CALL(GetDistanceToGoal, ACTOR_SELF, LW(0))
EVT_DIVF(LW(0), EVT_FLOAT(8.0))
EVT_ADD(LW(0), 1)
EVT_WAIT_FRAMES(LW(0))
EVT_RETURN
EVT_END
};
EvtScript N(fireballs_Partner) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(10))
EVT_IF_EQ(LW(10), 1)
EVT_ADD(LW(0), 100)
EVT_SET(LW(1), 5)
EVT_ELSE
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 50)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_1)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_5)
EVT_WAIT_FRAMES(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_6)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 5)
EVT_ADD(LW(1), 4)
EVT_ADD(LW(2), 2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
EVT_SUB(LW(3), 100)
EVT_ADD(LW(5), 2)
EVT_EXEC_WAIT(N(8021A218))
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(20)
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(80219464))
EVT_WAIT_FRAMES(20)
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, 1, NPC_ANIM_bubble_Palette_00_Anim_6)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 5)
EVT_ADD(LW(1), 4)
EVT_ADD(LW(2), 2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
EVT_SUB(LW(4), 6)
EVT_ADD(LW(5), 2)
EVT_EXEC_WAIT(N(8021A218))
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_WAIT_FRAMES(20)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(N(80219464))
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(fireballs_Player) = {
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, NPC_ANIM_bubble_Palette_00_Anim_3)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 11)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_WAIT_FRAMES(10)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2CF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_4)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_ADD(LW(2), 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_4)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(30)
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(80219464))
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_WAIT_FRAMES(5)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2CF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_00_Anim_4)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_SET(LW(10), LW(0))
EVT_SET(LW(11), LW(1))
EVT_SET(LW(12), LW(2))
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(2), 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(10), LW(11), LW(12))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_WAIT_FRAMES(20)
EVT_EXEC_WAIT(N(80219464))
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_8021AEA4) = {
EVT_CALL(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(fireTackle))
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(fireballs_Player))
EVT_END_SWITCH
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(1)
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_KO)
EVT_EXEC_WAIT(N(fireTackle))
EVT_ELSE
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LE(LW(0), 300)
EVT_EXEC_WAIT(N(fireballs_Partner))
EVT_ELSE
EVT_EXEC_WAIT(N(fireTackle))
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(0)
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_KO)
EVT_EXEC_WAIT(N(fireballs_Player))
EVT_ELSE
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LE(LW(0), 300)
EVT_EXEC_WAIT(N(fireballs_Partner))
EVT_ELSE
EVT_EXEC_WAIT(N(fireballs_Player))
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,9 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/medi_guy.h"
#define NAMESPACE b_area_kzn_medi_guy
#include "battle/common/actor/medi_guy.inc.c"

View File

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

View File

@ -0,0 +1,898 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/magikoopa.h"
#include "sprite/npc/flying_magikoopa.h"
#define NAMESPACE b_area_kzn_red_magikoopa
extern s32 N(idleAnimations_802210B0)[];
extern s32 N(idleAnimations_802210FC)[];
extern s32 N(idleAnimations_80221148)[];
extern EvtScript N(init_80223298);
extern EvtScript N(init_8022333C);
extern EvtScript N(takeTurn_802233E0);
extern EvtScript N(run_away);
s32 N(defenseTable_80220E60)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_80220E6C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_80220E78)[] = {
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_80220F24)[] = {
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(partsTable_80220FD0)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations_802210B0),
.defenseTable = N(defenseTable_80220E60),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -1036,
},
};
ActorPartBlueprint N(partsTable_80220FF4)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations_802210B0),
.defenseTable = N(defenseTable_80220E6C),
.eventFlags = ACTOR_EVENT_FLAG_800000,
.elementImmunityFlags = 0,
.unk_1C = -1036,
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
.opacity = 255,
.idleAnimations = N(idleAnimations_802210FC),
.defenseTable = N(defenseTable_80220E6C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 248,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80221148),
.defenseTable = N(defenseTable_80220E6C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_RED_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80220FD0)),
.partsData = N(partsTable_80220FD0),
.script = N(init_80223298),
.statusTable = N(statusTable_80220E78),
.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_RED_MAGIKOOPA,
.level = 21,
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80220FF4)),
.partsData = N(partsTable_80220FF4),
.script = N(init_8022333C),
.statusTable = N(statusTable_80220F24),
.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_802210B0)[] = {
STATUS_NORMAL, NPC_ANIM_magikoopa_Palette_01_Anim_1,
STATUS_STONE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
STATUS_SLEEP, NPC_ANIM_magikoopa_Palette_01_Anim_8,
STATUS_POISON, NPC_ANIM_magikoopa_Palette_01_Anim_1,
STATUS_STOP, NPC_ANIM_magikoopa_Palette_01_Anim_0,
STATUS_STATIC, NPC_ANIM_magikoopa_Palette_01_Anim_1,
STATUS_PARALYZE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
STATUS_DIZZY, NPC_ANIM_magikoopa_Palette_01_Anim_7,
STATUS_FEAR, NPC_ANIM_magikoopa_Palette_01_Anim_7,
STATUS_END,
};
s32 N(idleAnimations_802210FC)[] = {
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
STATUS_STONE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
STATUS_SLEEP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_8,
STATUS_POISON, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
STATUS_STOP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
STATUS_STATIC, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
STATUS_PARALYZE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
STATUS_DIZZY, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
STATUS_FEAR, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
STATUS_END,
};
s32 N(idleAnimations_80221148)[] = {
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_A,
STATUS_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(idle_80221154) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80221164) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
EVT_EXEC_WAIT(N(run_away))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_2)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LW(0), 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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
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(8022167C) = {
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_80000)
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(131)
EVT_CASE_OR_EQ(132)
EVT_CASE_OR_EQ(133)
EVT_CASE_OR_EQ(136)
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), 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(80221788) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_IF_EQ(LW(0), 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetLastElement, LW(0))
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_POW)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_LABEL(0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), 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_100000, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(2), 1)
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x301)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
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, LW(3))
EVT_IF_EQ(LW(3), EVENT_15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
EVT_ADD(LW(4), 10)
EVT_ADD(LW(5), 5)
EVT_CALL(PlayEffect, EFFECT_ID_27, 0, LW(3), LW(4), LW(5), EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
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_FRAMES(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221164)))
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA)
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_ADDR(N(statusTable_80220E78)))
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, LW(0))
EVT_MOD(LW(0), 4)
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(ForceHomePos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80221D84) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(8022167C))
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(8022167C))
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(80221788))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(8022167C))
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoBurnHit)
EVT_EXEC_WAIT(N(80221788))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
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(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
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, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
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, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
EVT_EXEC_WAIT(N(run_away))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LW(0), 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(LW(0), 2)
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
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(rMagikoopa_ShapeSpell) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LW(0))
EVT_IF_EQ(LW(0), 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, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_SUB(LW(0), 12)
EVT_ADD(LW(1), 14)
EVT_ELSE
EVT_SUB(LW(0), 30)
EVT_ADD(LW(1), 36)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_ID_47, 0, LW(0), LW(1), LW(2), EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
EVT_WAIT_FRAMES(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
EVT_WAIT_FRAMES(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(9))
EVT_IF_FLAG(LW(9), STATUS_FLAG_SHRINK)
EVT_SUB(LW(0), 8)
EVT_ADD(LW(1), 8)
EVT_ELSE
EVT_SUB(LW(0), 20)
EVT_ADD(LW(1), 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
EVT_SUB(LW(3), 50)
EVT_SET(LW(4), 0)
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 25)
EVT_WAIT_FRAMES(50)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(14)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
EVT_WAIT_FRAMES(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, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
EVT_WAIT_FRAMES(5)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_SUB(LW(0), 8)
EVT_ADD(LW(1), 8)
EVT_ELSE
EVT_SUB(LW(0), 20)
EVT_ADD(LW(1), 20)
EVT_END_IF
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
EVT_SUB(LW(3), 10)
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 20)
EVT_WAIT_FRAMES(18)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_WAIT_FRAMES(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(rMagikoopa_WandStrike) = {
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, 0x2DB)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
EVT_SET(LW(0), 200)
EVT_LOOP(20)
EVT_SUB(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT_FRAMES(10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_ADD(LW(0), 5)
EVT_ELSE
EVT_ADD(LW(0), 25)
EVT_END_IF
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LW(0), 55)
EVT_LOOP(20)
EVT_ADD(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_3)
EVT_WAIT_FRAMES(11)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2DC)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT_FRAMES(15)
EVT_SET(LW(0), 200)
EVT_LOOP(20)
EVT_SUB(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
EVT_SET(LW(0), 55)
EVT_LOOP(20)
EVT_ADD(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(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_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT_FRAMES(10)
EVT_SET(LW(0), 200)
EVT_LOOP(20)
EVT_SUB(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(YieldTurn)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
EVT_SET(LW(0), 55)
EVT_LOOP(20)
EVT_ADD(LW(0), 10)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
EVT_WAIT_FRAMES(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(run_away) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_IF_NE(LW(0), EVENT_SCARE_AWAY)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 15)
EVT_WAIT_FRAMES(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, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT_FRAMES(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, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 200)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
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_80223298) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221154)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802233E0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221164)))
EVT_CALL(GetBattleVar, 2, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_8022333C) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221154)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802233E0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221D84)))
EVT_CALL(GetBattleVar, 2, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_802233E0) = {
EVT_SET(LF(0), 0)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
EVT_CALL(GetIndexFromHome, LW(0), LW(1))
EVT_CALL(GetBattleVar, 2, LW(2))
EVT_IF_GT(LW(1), LW(2))
EVT_CALL(N(UnkFunc52), LW(0), LW(3))
EVT_IF_EQ(LW(3), 0)
EVT_CALL(GetActorAttackBoost, LW(0), LW(4))
EVT_IF_LT(LW(4), 3)
EVT_SET(LW(8), LW(0))
EVT_CALL(SetBattleVar, 2, LW(1))
EVT_GOTO(100)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LW(0))
EVT_IF_NE(LW(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LF(0), 0)
EVT_SET(LF(0), 1)
EVT_CALL(SetBattleVar, 2, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LW(0))
EVT_IF_EQ(LW(0), 1)
EVT_EXEC_WAIT(N(run_away))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), ACTOR_FLAG_FLYING)
EVT_EXEC_WAIT(N(rMagikoopa_ShapeSpell))
EVT_ELSE
EVT_EXEC_WAIT(N(rMagikoopa_WandStrike))
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_FRAMES(15)
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
EVT_END_IF
EVT_WAIT_FRAMES(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_SUB(LW(0), 6)
EVT_ADD(LW(1), 12)
EVT_SUB(LW(2), 2)
EVT_CALL(PlayEffect, EFFECT_ID_33, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LW(0), 16)
EVT_ADD(LW(1), 31)
EVT_SUB(LW(2), 2)
EVT_CALL(PlayEffect, EFFECT_ID_33, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
EVT_SUB(LW(0), 12)
EVT_ADD(LW(1), 14)
EVT_SUB(LW(2), 2)
EVT_CALL(PlayEffect, EFFECT_ID_33, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_SUB(LW(0), 30)
EVT_ADD(LW(1), 36)
EVT_SUB(LW(2), 2)
EVT_CALL(PlayEffect, EFFECT_ID_33, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_END_IF
EVT_WAIT_FRAMES(30)
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
EVT_END_IF
EVT_WAIT_FRAMES(5)
EVT_THREAD
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, LW(8), 0x2DD)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_8026BF48, 1)
EVT_CALL(BoostAttack, LW(8), 1)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT_FRAMES(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

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

View File

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

181
src/battle/area_kzn/area.c Normal file
View File

@ -0,0 +1,181 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn
extern ActorBlueprint N(medi_guy);
extern ActorBlueprint N(spike_top);
extern ActorBlueprint N(lava_bubble);
extern ActorBlueprint N(putrid_piranha);
extern ActorBlueprint N(red_magikoopa_flying);
extern ActorBlueprint N(white_magikoopa_flying);
extern Stage N(kzn_01);
extern Stage N(kzn_01b);
extern Stage N(kzn_02);
extern Stage N(kzn_04);
extern Stage N(kzn_04b);
extern Stage N(kzn_04c);
extern Stage N(kzn_05);
Formation N(formation_00) = {
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_01) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_02) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(lava_bubble), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_03) = {
{ .actor = &N(lava_bubble), .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_04) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(medi_guy), .home = { .index = 6 }, .priority = 8 },
};
Formation N(formation_05) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(red_magikoopa_flying), .home = { .index = 6 }, .priority = 8 },
};
Formation N(formation_06) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(white_magikoopa_flying), .home = { .index = 6 }, .priority = 8 },
};
Formation N(formation_07) = {
{ .actor = &N(lava_bubble), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_08) = {
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_09) = {
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_0A) = {
{ .actor = &N(spike_top), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_0B) = {
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_0C) = {
{ .actor = &N(spike_top), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_0D) = {
{ .actor = &N(spike_top), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(putrid_piranha), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_0E) = {
{ .actor = &N(spike_top), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(lava_bubble), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(lava_bubble), .home = { .index = 3 }, .priority = 7 },
};
Formation N(formation_0F) = {
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 9 },
};
Formation N(formation_10) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_11) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(lava_bubble), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_12) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(putrid_piranha), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(spike_top), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_13) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
};
Formation N(formation_14) = {
{ .actor = &N(putrid_piranha), .home = { .index = 0 }, .priority = 10 },
{ .actor = &N(spike_top), .home = { .index = 1 }, .priority = 9 },
{ .actor = &N(putrid_piranha), .home = { .index = 2 }, .priority = 8 },
{ .actor = &N(spike_top), .home = { .index = 3 }, .priority = 7 },
};
BattleList N(formationTable) = {
BATTLE("バブルx2", N(formation_00), &N(kzn_01)),
BATTLE("バブルx3", N(formation_01), &N(kzn_01)),
BATTLE("バブルx4", N(formation_02), &N(kzn_01)),
BATTLE("バブル,トゲメットx", N(formation_03), &N(kzn_01)),
BATTLE("バブルx2,かいふくヘイホー", N(formation_04), &N(kzn_01)),
BATTLE("バブルx2,レッドカメック", N(formation_05), &N(kzn_01)),
BATTLE("バブルx2,ホワイトカメック", N(formation_06), &N(kzn_01)),
BATTLE("バブルx2,トゲメット", N(formation_07), &N(kzn_01)),
BATTLE("トゲメットx", N(formation_08), &N(kzn_01)),
BATTLE("トゲメット,バブル", N(formation_09), &N(kzn_01)),
BATTLE("トゲメットx,バブル", N(formation_0A), &N(kzn_01)),
BATTLE("トゲメット,ポイズンパックン", N(formation_0B), &N(kzn_01)),
BATTLE("トゲメットx,ポイズンパックン", N(formation_0C), &N(kzn_01)),
BATTLE("トゲメットx,ポイズンパックンx", N(formation_0D), &N(kzn_01)),
BATTLE("トゲメット,バブルx", N(formation_0E), &N(kzn_01)),
BATTLE("ポイズンパックンx", N(formation_0F), &N(kzn_01)),
BATTLE("ポイズンパックンx", N(formation_10), &N(kzn_01)),
BATTLE("ポイズンパックン,バブル,ポイズンパックン", N(formation_11), &N(kzn_01)),
BATTLE("ポイズンパックンx,トゲメット", N(formation_12), &N(kzn_01)),
BATTLE("ポイズンパックン,トゲメット,ポイズンパックン", N(formation_13), &N(kzn_01)),
BATTLE("ポイズンパックン,トゲメット,ポイズンパックン,トゲメット", N(formation_14), &N(kzn_01)),
{},
};
StageList N(stageTable) = {
{ "kzn_01", &N(kzn_01) },
{ "kzn_01b", &N(kzn_01b) },
{ "kzn_02", &N(kzn_02) },
{ "kzn_04", &N(kzn_04) },
{ "kzn_04b", &N(kzn_04b) },
{ "kzn_04c", &N(kzn_04c) },
{ "kzn_05", &N(kzn_05) },
{},
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_01
EvtScript N(beforeBattle_80227780) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 17, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_802277D0) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_802277E0)[] = {
0x0000000E, 0x0000000F, 0x00000018, 0x00000019, 0x0000001A, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt01_shape",
.hit = "kzn_bt01_hit",
.preBattle = N(beforeBattle_80227780),
.postBattle = N(afterBattle_802277D0),
.foregroundModelList = N(foregroundModelList_802277E0),
};

View File

@ -0,0 +1,29 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_01b
EvtScript N(beforeBattle_80227820) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8022785C) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_8022786C)[] = {
0x0000000E, 0x0000000F, 0x00000018, 0x00000019, 0x0000001A, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt01_shape",
.hit = "kzn_bt01_hit",
.preBattle = N(beforeBattle_80227820),
.postBattle = N(afterBattle_8022785C),
.foregroundModelList = N(foregroundModelList_8022786C),
};

View File

@ -0,0 +1,119 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_02
EvtScript N(802278B0) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
EVT_SUB(LW(0), -300)
EVT_SUB(LW(1), -500)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022797C) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
EVT_ADD(LW(0), 16384)
EVT_ADD(LW(1), 0)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80227A2C) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(9), LW(1))
EVT_SET(LW(8), LW(2))
EVT_SET(LW(7), LW(3))
EVT_LABEL(0)
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(8), LW(2), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(2), LW(8), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_80227BDC) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LW(0), 25)
EVT_SET(LW(1), 0)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 6)
EVT_SET(LW(1), 1)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 7)
EVT_SET(LW(1), 2)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 9)
EVT_SET(LW(1), 3)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 10)
EVT_SET(LW(1), 4)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 12)
EVT_SET(LW(1), 5)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 13)
EVT_SET(LW(1), 6)
EVT_EXEC(N(802278B0))
EVT_SET(LW(0), 24)
EVT_SET(LW(1), 180)
EVT_SET(LW(2), 0)
EVT_SET(LW(3), 200)
EVT_EXEC(N(80227A2C))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80227D98) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80227DA8)[] = {
0x0000001E, 0x0000001F, 0x00000020, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt02_shape",
.hit = "kzn_bt02_hit",
.preBattle = N(beforeBattle_80227BDC),
.postBattle = N(afterBattle_80227D98),
.foregroundModelList = N(foregroundModelList_80227DA8),
};

View File

@ -0,0 +1,125 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_04
EvtScript N(80227DE0) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
EVT_SUB(LW(0), -300)
EVT_SUB(LW(1), -500)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80227EAC) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
EVT_ADD(LW(0), 16384)
EVT_ADD(LW(1), 0)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80227F5C) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(9), LW(1))
EVT_SET(LW(8), LW(2))
EVT_SET(LW(7), LW(3))
EVT_LABEL(0)
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(8), LW(2), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(2), LW(8), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8022810C) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 30, 0)
EVT_CALL(SetGroupEnabled, 44, 0)
EVT_SET(LW(0), 4)
EVT_SET(LW(1), 0)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 5)
EVT_SET(LW(1), 1)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 6)
EVT_SET(LW(1), 2)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 7)
EVT_SET(LW(1), 3)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 15)
EVT_SET(LW(1), 4)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 32)
EVT_SET(LW(1), 5)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 33)
EVT_SET(LW(1), 6)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 43)
EVT_SET(LW(1), 7)
EVT_EXEC(N(80227DE0))
EVT_SET(LW(0), 13)
EVT_SET(LW(1), 8)
EVT_EXEC(N(80227EAC))
EVT_SET(LW(0), 14)
EVT_SET(LW(1), 9)
EVT_EXEC(N(80227EAC))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80228328) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80228338)[] = {
0x00000014, 0x00000015, 0x00000016, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt04_shape",
.hit = "kzn_bt04_hit",
.preBattle = N(beforeBattle_8022810C),
.postBattle = N(afterBattle_80228328),
.foregroundModelList = N(foregroundModelList_80228338),
};

View File

@ -0,0 +1,125 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_04b
EvtScript N(80228370) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
EVT_SUB(LW(0), -300)
EVT_SUB(LW(1), -500)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022843C) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
EVT_ADD(LW(0), 16384)
EVT_ADD(LW(1), 0)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(802284EC) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(9), LW(1))
EVT_SET(LW(8), LW(2))
EVT_SET(LW(7), LW(3))
EVT_LABEL(0)
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(8), LW(2), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(2), LW(8), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8022869C) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 39, 0)
EVT_CALL(SetGroupEnabled, 44, 0)
EVT_SET(LW(0), 4)
EVT_SET(LW(1), 0)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 5)
EVT_SET(LW(1), 1)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 6)
EVT_SET(LW(1), 2)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 7)
EVT_SET(LW(1), 3)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 15)
EVT_SET(LW(1), 4)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 24)
EVT_SET(LW(1), 5)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 25)
EVT_SET(LW(1), 6)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 43)
EVT_SET(LW(1), 7)
EVT_EXEC(N(80228370))
EVT_SET(LW(0), 13)
EVT_SET(LW(1), 8)
EVT_EXEC(N(8022843C))
EVT_SET(LW(0), 14)
EVT_SET(LW(1), 9)
EVT_EXEC(N(8022843C))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_802288B8) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_802288C8)[] = {
0x00000014, 0x00000015, 0x00000016, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt04_shape",
.hit = "kzn_bt04_hit",
.preBattle = N(beforeBattle_8022869C),
.postBattle = N(afterBattle_802288B8),
.foregroundModelList = N(foregroundModelList_802288C8),
};

View File

@ -0,0 +1,119 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_04c
EvtScript N(80228900) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
EVT_SUB(LW(0), -300)
EVT_SUB(LW(1), -500)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(802289CC) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
EVT_ADD(LW(0), 16384)
EVT_ADD(LW(1), 0)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80228A7C) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(9), LW(1))
EVT_SET(LW(8), LW(2))
EVT_SET(LW(7), LW(3))
EVT_LABEL(0)
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(8), LW(2), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(2), LW(8), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_80228C2C) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 39, 0)
EVT_CALL(SetGroupEnabled, 30, 0)
EVT_SET(LW(0), 4)
EVT_SET(LW(1), 0)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 5)
EVT_SET(LW(1), 1)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 6)
EVT_SET(LW(1), 2)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 7)
EVT_SET(LW(1), 3)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 15)
EVT_SET(LW(1), 4)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 43)
EVT_SET(LW(1), 7)
EVT_EXEC(N(80228900))
EVT_SET(LW(0), 13)
EVT_SET(LW(1), 8)
EVT_EXEC(N(802289CC))
EVT_SET(LW(0), 14)
EVT_SET(LW(1), 9)
EVT_EXEC(N(802289CC))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_80228DF0) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList_80228E00)[] = {
0x00000014, 0x00000015, 0x00000016, 0x00000000,
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt04_shape",
.hit = "kzn_bt04_hit",
.preBattle = N(beforeBattle_80228C2C),
.postBattle = N(afterBattle_80228DF0),
.foregroundModelList = N(foregroundModelList_80228E00),
};

View File

@ -0,0 +1,165 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kzn_kzn_05
EvtScript N(80228E40) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
EVT_SUB(LW(0), -300)
EVT_SUB(LW(1), -500)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80228F0C) = {
EVT_SET(LW(10), LW(1))
EVT_CALL(SetTexPanner, LW(0), LW(1))
EVT_SET(LW(0), 0)
EVT_SET(LW(1), 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
EVT_ADD(LW(0), 16384)
EVT_ADD(LW(1), 0)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80228FBC) = {
EVT_SET(LW(10), LW(0))
EVT_SET(LW(9), LW(1))
EVT_SET(LW(8), LW(2))
EVT_SET(LW(7), LW(3))
EVT_LABEL(0)
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(8), LW(2), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LW(2), LW(8))
EVT_ADD(LW(2), LW(9))
EVT_CALL(MakeLerp, LW(2), LW(8), LW(7), 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, LW(10), LW(0), 0, 0)
EVT_WAIT_FRAMES(1)
EVT_IF_EQ(LW(1), 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle_8022916C) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LW(0), 17)
EVT_SET(LW(1), 0)
EVT_EXEC(N(80228E40))
EVT_SET(LW(0), 15)
EVT_SET(LW(1), 1)
EVT_EXEC(N(80228E40))
EVT_SET(LW(0), 10)
EVT_SET(LW(1), 2)
EVT_EXEC(N(80228F0C))
EVT_SET(LW(0), 11)
EVT_SET(LW(1), 3)
EVT_EXEC(N(80228F0C))
EVT_SET(LW(0), 26)
EVT_SET(LW(1), 4)
EVT_EXEC(N(80228F0C))
EVT_SET(LW(0), 27)
EVT_SET(LW(1), 5)
EVT_EXEC(N(80228F0C))
EVT_CALL(EnableModel, 29, 0)
EVT_CALL(EnableModel, 30, 0)
EVT_CALL(EnableModel, 31, 0)
EVT_CALL(EnableModel, 32, 0)
EVT_CALL(EnableModel, 33, 0)
EVT_CALL(EnableModel, 34, 0)
EVT_CALL(EnableModel, 35, 0)
EVT_CALL(EnableModel, 36, 0)
EVT_CALL(EnableModel, 37, 0)
EVT_CALL(EnableModel, 38, 0)
EVT_CALL(EnableModel, 39, 0)
EVT_CALL(EnableModel, 40, 0)
EVT_CALL(EnableModel, 41, 0)
EVT_CALL(EnableModel, 42, 0)
EVT_CALL(EnableModel, 43, 0)
EVT_CALL(EnableModel, 44, 0)
EVT_CALL(EnableModel, 45, 0)
EVT_CALL(EnableModel, 46, 0)
EVT_CALL(EnableModel, 47, 0)
EVT_CALL(EnableModel, 48, 0)
EVT_CALL(EnableModel, 49, 0)
EVT_CALL(EnableModel, 50, 0)
EVT_CALL(EnableModel, 51, 0)
EVT_CALL(EnableModel, 52, 0)
EVT_CALL(EnableModel, 53, 0)
EVT_CALL(EnableModel, 54, 0)
EVT_CALL(EnableModel, 55, 0)
EVT_CALL(EnableModel, 56, 0)
EVT_CALL(EnableModel, 57, 0)
EVT_CALL(EnableModel, 58, 0)
EVT_CALL(EnableModel, 59, 0)
EVT_CALL(EnableModel, 60, 0)
EVT_CALL(EnableModel, 61, 0)
EVT_CALL(EnableModel, 62, 0)
EVT_CALL(EnableModel, 63, 0)
EVT_CALL(EnableModel, 64, 0)
EVT_CALL(EnableModel, 65, 0)
EVT_CALL(EnableModel, 66, 0)
EVT_CALL(EnableModel, 67, 0)
EVT_CALL(EnableModel, 68, 0)
EVT_CALL(EnableModel, 69, 0)
EVT_CALL(EnableModel, 70, 0)
EVT_CALL(EnableModel, 71, 0)
EVT_CALL(EnableModel, 72, 0)
EVT_CALL(EnableModel, 73, 0)
EVT_CALL(EnableModel, 74, 0)
EVT_CALL(EnableModel, 75, 0)
EVT_CALL(EnableModel, 76, 0)
EVT_CALL(EnableModel, 78, 0)
EVT_CALL(EnableModel, 79, 0)
EVT_CALL(EnableModel, 80, 0)
EVT_CALL(EnableModel, 81, 0)
EVT_CALL(EnableModel, 82, 0)
EVT_CALL(EnableModel, 83, 0)
EVT_CALL(EnableModel, 84, 0)
EVT_CALL(EnableModel, 85, 0)
EVT_CALL(EnableModel, 86, 0)
EVT_CALL(EnableModel, 87, 0)
EVT_CALL(EnableModel, 88, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle_8022974C) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kzn_tex",
.shape = "kzn_bt05_shape",
.hit = "kzn_bt05_hit",
.preBattle = N(beforeBattle_8022916C),
.postBattle = N(afterBattle_8022974C),
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_omo
#define NAMESPACE dup6_b_area_omo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_omo
#include "common/MediGuySpriteRotationFunc.inc.c"

View File

@ -1,9 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_omo
#define NAMESPACE dup7_b_area_omo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_omo
INCLUDE_ASM(s32, "battle/area_omo/512C90", func_8021878C_512D5C);

View File

@ -1,13 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_omo
#include "common/ItemEntityJumpToPos.inc.c"
#include "common/GetItemEntityPosition.inc.c"
INCLUDE_ASM(s32, "battle/area_omo/512E50", func_80218B38_513108);
#include "common/SpyGuyActionFunc.inc.c"
#include "common/StartRumbleWithParams.inc.c"

View File

@ -1,11 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_omo
#define NAMESPACE dup_b_area_omo
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_omo
#define NAMESPACE dup9_b_area_omo
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_omo

View File

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

View File

@ -1,5 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_omo
INCLUDE_ASM(s32, "battle/area_omo/513580", func_80218FB0_513580);

View File

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

View File

@ -0,0 +1,493 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#define NAMESPACE b_area_omo_anti_guy
extern s32 N(idleAnimations_80221A14)[];
extern EvtScript N(init_80221A60);
extern EvtScript N(takeTurn_802233AC);
extern EvtScript N(idle_80221AAC);
extern EvtScript N(handleEvent_80221C20);
s32 N(defenseTable_80221910)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable_8022191C)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 60,
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, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, -1,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(partsTable_802219C8)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_80221A14),
.defenseTable = N(defenseTable_80221910),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_ANTI_GUY,
.level = 42,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(partsTable_802219C8)),
.partsData = N(partsTable_802219C8),
.script = N(init_80221A60),
.statusTable = N(statusTable_8022191C),
.escapeChance = 50,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 0,
.size = { 30, 30 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_80221A14)[] = {
STATUS_NORMAL, NPC_ANIM_shy_guy_Palette_05_Anim_1,
STATUS_STONE, NPC_ANIM_shy_guy_Palette_05_Anim_0,
STATUS_SLEEP, NPC_ANIM_shy_guy_Palette_05_Anim_12,
STATUS_POISON, NPC_ANIM_shy_guy_Palette_05_Anim_1,
STATUS_STOP, NPC_ANIM_shy_guy_Palette_05_Anim_0,
STATUS_STATIC, NPC_ANIM_shy_guy_Palette_05_Anim_1,
STATUS_PARALYZE, NPC_ANIM_shy_guy_Palette_05_Anim_0,
STATUS_DIZZY, NPC_ANIM_shy_guy_Palette_05_Anim_13,
STATUS_FEAR, NPC_ANIM_shy_guy_Palette_05_Anim_13,
STATUS_END,
};
EvtScript N(init_80221A60) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802233AC)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221AAC)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221C20)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_80221AAC) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80221BBC) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_3)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80221C20) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_05_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_05_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(80221BBC))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_05_Anim_14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(802220FC) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_5)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(80221BBC))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80222824) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_9)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LW(0), 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 12, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(3), 0)
EVT_LOOP(20)
EVT_SUB(LW(3), 30)
EVT_IF_LT(LW(3), 0)
EVT_ADD(LW(3), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(3))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_9)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_7)
EVT_WAIT_FRAMES(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_10)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_13)
EVT_END_IF
EVT_WAIT_FRAMES(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_05_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_05_Anim_1)
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_802233AC) = {
EVT_CALL(RandInt, 1, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(802220FC))
EVT_ELSE
EVT_EXEC_WAIT(N(80222824))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,494 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#define NAMESPACE b_area_omo_blue_shy_guy
extern s32 N(idleAnimations_8021AE1C)[];
extern EvtScript N(init_8021AE68);
extern EvtScript N(takeTurn_8021C7B4);
extern EvtScript N(idle_8021AEB4);
extern EvtScript N(handleEvent_8021B028);
s32 N(defenseTable_8021AD10)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_8021AD24)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
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, 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(partsTable_8021ADD0)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AE1C),
.defenseTable = N(defenseTable_8021AD10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SHY_GUY,
.level = 14,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021ADD0)),
.partsData = N(partsTable_8021ADD0),
.script = N(init_8021AE68),
.statusTable = N(statusTable_8021AD24),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 28, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021AE1C)[] = {
STATUS_NORMAL, NPC_ANIM_shy_guy_Palette_01_Anim_1,
STATUS_STONE, NPC_ANIM_shy_guy_Palette_01_Anim_0,
STATUS_SLEEP, NPC_ANIM_shy_guy_Palette_01_Anim_12,
STATUS_POISON, NPC_ANIM_shy_guy_Palette_01_Anim_1,
STATUS_STOP, NPC_ANIM_shy_guy_Palette_01_Anim_0,
STATUS_STATIC, NPC_ANIM_shy_guy_Palette_01_Anim_1,
STATUS_PARALYZE, NPC_ANIM_shy_guy_Palette_01_Anim_0,
STATUS_DIZZY, NPC_ANIM_shy_guy_Palette_01_Anim_13,
STATUS_FEAR, NPC_ANIM_shy_guy_Palette_01_Anim_13,
STATUS_END,
};
EvtScript N(init_8021AE68) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021C7B4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021AEB4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021B028)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_8021AEB4) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021AFC4) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_3)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021B028) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_01_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_01_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8021AFC4))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_01_Anim_14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021B504) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_5)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8021AFC4))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021BC2C) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_9)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LW(0), 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(3), 0)
EVT_LOOP(20)
EVT_SUB(LW(3), 30)
EVT_IF_LT(LW(3), 0)
EVT_ADD(LW(3), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(3))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_9)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_7)
EVT_WAIT_FRAMES(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_10)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_13)
EVT_END_IF
EVT_WAIT_FRAMES(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_01_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_01_Anim_1)
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_8021C7B4) = {
EVT_CALL(RandInt, 1, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(8021B504))
EVT_ELSE
EVT_EXEC_WAIT(N(8021BC2C))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,494 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#define NAMESPACE b_area_omo_green_shy_guy
extern s32 N(idleAnimations_8021FF1C)[];
extern EvtScript N(init_8021FF68);
extern EvtScript N(takeTurn_802218B4);
extern EvtScript N(idle_8021FFB4);
extern EvtScript N(handleEvent_80220128);
s32 N(defenseTable_8021FE10)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_8021FE24)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
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, 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(partsTable_8021FED0)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021FF1C),
.defenseTable = N(defenseTable_8021FE10),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SHY_GUY,
.level = 14,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021FED0)),
.partsData = N(partsTable_8021FED0),
.script = N(init_8021FF68),
.statusTable = N(statusTable_8021FE24),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 28, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021FF1C)[] = {
STATUS_NORMAL, NPC_ANIM_shy_guy_Palette_02_Anim_1,
STATUS_STONE, NPC_ANIM_shy_guy_Palette_02_Anim_0,
STATUS_SLEEP, NPC_ANIM_shy_guy_Palette_02_Anim_12,
STATUS_POISON, NPC_ANIM_shy_guy_Palette_02_Anim_1,
STATUS_STOP, NPC_ANIM_shy_guy_Palette_02_Anim_0,
STATUS_STATIC, NPC_ANIM_shy_guy_Palette_02_Anim_1,
STATUS_PARALYZE, NPC_ANIM_shy_guy_Palette_02_Anim_0,
STATUS_DIZZY, NPC_ANIM_shy_guy_Palette_02_Anim_13,
STATUS_FEAR, NPC_ANIM_shy_guy_Palette_02_Anim_13,
STATUS_END,
};
EvtScript N(init_8021FF68) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802218B4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021FFB4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80220128)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_8021FFB4) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802200C4) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_3)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80220128) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_02_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_02_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(802200C4))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_02_Anim_14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80220604) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_5)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(802200C4))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80220D2C) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_9)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LW(0), 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(3), 0)
EVT_LOOP(20)
EVT_SUB(LW(3), 30)
EVT_IF_LT(LW(3), 0)
EVT_ADD(LW(3), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(3))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_9)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_7)
EVT_WAIT_FRAMES(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_10)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_13)
EVT_END_IF
EVT_WAIT_FRAMES(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_02_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_02_Anim_1)
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_802218B4) = {
EVT_CALL(RandInt, 1, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(80220604))
EVT_ELSE
EVT_EXEC_WAIT(N(80220D2C))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,830 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#include "sprite/npc/medi_guy.h"
#include "sprite/npc/groove_guy.h"
#define AREA b_area_omo
#define NAMESPACE A(groove_guy)
extern EvtScript N(init_80224B38);
extern EvtScript N(takeTurn_80226338);
extern EvtScript N(idle_80224B9C);
extern EvtScript N(handleEvent_80224D10);
extern EvtScript N(randomSummon);
extern EvtScript N(80226C00);
extern EvtScript N(80226DEC);
extern EvtScript N(802271A0);
extern Formation N(specialFormation_802273A8);
extern Formation N(specialFormation_802273C4);
extern Formation N(specialFormation_802273E0);
s32 N(idleAnimations_802249E0)[] = {
STATUS_NORMAL, NPC_ANIM_groove_guy_Palette_00_Anim_1,
STATUS_STONE, NPC_ANIM_groove_guy_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_groove_guy_Palette_00_Anim_6,
STATUS_POISON, NPC_ANIM_groove_guy_Palette_00_Anim_1,
STATUS_STOP, NPC_ANIM_groove_guy_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_groove_guy_Palette_00_Anim_1,
STATUS_PARALYZE, NPC_ANIM_groove_guy_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_groove_guy_Palette_00_Anim_7,
STATUS_FEAR, NPC_ANIM_groove_guy_Palette_00_Anim_7,
STATUS_END,
};
s32 N(defenseTable_80224A2C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_80224A40)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
STATUS_PARALYZE, 90,
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(partsTable_80224AEC)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_802249E0),
.defenseTable = N(defenseTable_80224A2C),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 246,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_GROOVE_GUY,
.level = 15,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_80224AEC)),
.partsData = N(partsTable_80224AEC),
.script = N(init_80224B38),
.statusTable = N(statusTable_80224A40),
.escapeChance = 50,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 70,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 28, 28 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init_80224B38) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80226338)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80224B9C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80224D10)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_80224B9C) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -13, 15, 4, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80224CAC) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80224D10) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_E)
EVT_SET_CONST(LW(2), NPC_ANIM_groove_guy_Palette_00_Anim_F)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_E)
EVT_SET_CONST(LW(2), NPC_ANIM_groove_guy_Palette_00_Anim_F)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_F)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(80224CAC))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_8)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_4)
EVT_SET_CONST(LW(2), NPC_ANIM_groove_guy_Palette_00_Anim_11)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_OR_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(basicAttack) = {
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, NPC_ANIM_groove_guy_Palette_00_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(80224CAC))
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_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(80224CAC))
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(sleepySpin) = {
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(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_10)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_SET(LW(0), 0)
EVT_LOOP(30)
EVT_ADD(LW(0), 48)
EVT_MOD(LW(0), 360)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_B)
EVT_WAIT_FRAMES(20)
EVT_IF_EQ(LW(0), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(80224CAC))
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(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0x00000002 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_200 | STATUS_FLAG_DIZZY | STATUS_FLAG_80000000, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(WasStatusInflicted, ACTOR_SELF, LW(0))
EVT_IF_EQ(LW(0), TRUE)
EVT_THREAD
EVT_SET(LW(0), 0)
EVT_LOOP(30)
EVT_ADD(LW(0), 48)
EVT_MOD(LW(0), 360)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0)
EVT_END_THREAD
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_B)
EVT_SET(LW(0), 0)
EVT_LOOP(15)
EVT_ADD(LW(0), 24)
EVT_MOD(LW(0), 360)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E4)
EVT_THREAD
EVT_SET(LW(0), 0)
EVT_LOOP(20)
EVT_ADD(LW(0), 72)
EVT_MOD(LW(0), 360)
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
EVT_END_THREAD
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_A)
EVT_WAIT_FRAMES(25)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(80224CAC))
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(getFirstOpenColumn) = {
EVT_SET(LF(1), 0)
EVT_SET(LF(2), 0)
EVT_SET(LF(3), 0)
EVT_SET(LF(4), 0)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LW(0), LW(5))
EVT_CALL(GetIndexFromHome, LW(0), LW(5))
EVT_MOD(LW(5), 4)
EVT_SWITCH(LW(5))
EVT_CASE_EQ(0)
EVT_SET(LF(1), 1)
EVT_CASE_EQ(1)
EVT_SET(LF(2), 1)
EVT_CASE_EQ(2)
EVT_SET(LF(3), 1)
EVT_CASE_EQ(3)
EVT_SET(LF(4), 1)
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LW(0))
EVT_IF_NE(LW(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LF(1), 0)
EVT_SET(LW(10), 0)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LF(2), 0)
EVT_SET(LW(10), 1)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LF(3), 0)
EVT_SET(LW(10), 2)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LF(4), 0)
EVT_SET(LW(10), 3)
EVT_RETURN
EVT_END_IF
EVT_SET(LW(10), -1)
EVT_RETURN
EVT_END
};
EvtScript N(countActiveSummoners) = {
EVT_SET(LW(9), 0)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
EVT_CALL(GetOriginalActorType, LW(0), LW(2))
EVT_SWITCH(LW(2))
EVT_CASE_EQ(ACTOR_TYPE_GROOVE_GUY)
EVT_CALL(GetStatusFlags, LW(0), LW(3))
EVT_IF_NOT_FLAG(LW(3), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, LW(0), 0, LW(3))
EVT_IF_NE(LW(3), 2)
EVT_ADD(LW(9), 1)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LW(0))
EVT_IF_NE(LW(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80226338) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_IF_EQ(LW(0), 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 60)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_DIZZY)
EVT_EXEC_WAIT(N(basicAttack))
EVT_ELSE
EVT_EXEC_WAIT(N(sleepySpin))
EVT_END_IF
EVT_ELSE
EVT_EXEC_WAIT(N(basicAttack))
EVT_END_IF
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(getFirstOpenColumn))
EVT_IF_EQ(LW(10), -1)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 60)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_DIZZY)
EVT_EXEC_WAIT(N(basicAttack))
EVT_ELSE
EVT_EXEC_WAIT(N(sleepySpin))
EVT_END_IF
EVT_ELSE
EVT_EXEC_WAIT(N(basicAttack))
EVT_END_IF
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(countActiveSummoners))
EVT_SWITCH(LW(9))
EVT_CASE_EQ(1)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 300)
EVT_EXEC_WAIT(N(randomSummon))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(2)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 150)
EVT_EXEC_WAIT(N(randomSummon))
EVT_RETURN
EVT_END_IF
EVT_CASE_EQ(3)
EVT_CALL(RandInt, 1000, LW(0))
EVT_IF_LT(LW(0), 100)
EVT_EXEC_WAIT(N(randomSummon))
EVT_RETURN
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 60)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_DIZZY)
EVT_EXEC_WAIT(N(basicAttack))
EVT_ELSE
EVT_EXEC_WAIT(N(sleepySpin))
EVT_END_IF
EVT_ELSE
EVT_EXEC_WAIT(N(basicAttack))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(randomSummon) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_11)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(RandInt, 2, LW(1))
EVT_SWITCH(LW(1))
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(80226C00))
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(80226DEC))
EVT_CASE_EQ(2)
EVT_EXEC_WAIT(N(802271A0))
EVT_END_SWITCH
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802249E0)))
EVT_RETURN
EVT_END
};
BSS EffectWhirlwind D_802310D0;
s32 func_8021878C_512D5C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 x, y, z;
f32 temp_f20;
s32 temp_v0;
x = evt_get_variable(script, *args++);
y = evt_get_variable(script, *args++);
z = evt_get_variable(script, *args++);
temp_f20 = evt_get_float_variable(script, *args++);
temp_v0 = evt_get_variable(script, *args++);
D_802310D0.unk_28 = x;
D_802310D0.unk_2C = y;
D_802310D0.unk_30 = z;
playFX_46_whirlwind(6, &D_802310D0, temp_f20, temp_v0);
return ApiStatus_DONE2;
}
EvtScript N(8022671C) = {
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_B)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_D)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_B)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_D)
EVT_WAIT_FRAMES(4)
EVT_THREAD
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E5)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(3))
EVT_IF_NOT_FLAG(LW(3), STATUS_FLAG_SHRINK)
EVT_SETF(LW(3), EVT_FLOAT(1.0))
EVT_ELSE
EVT_SETF(LW(3), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(func_8021878C_512D5C, LW(0), LW(1), LW(2), LW(3), 48)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2E6)
EVT_SET(LW(0), 0)
EVT_LOOP(48)
EVT_ADD(LW(0), 30)
EVT_IF_GE(LW(0), 360)
EVT_SUB(LW(0), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LW(0), 0)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 30)
EVT_CALL(PlayEffect, EFFECT_ID_11, 0, LW(0), LW(1), LW(2), 30, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x206D)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_groove_guy_Palette_00_Anim_A)
EVT_WAIT_FRAMES(8)
EVT_RETURN
EVT_END
};
EvtScript N(80226C00) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_EXEC_WAIT(N(8022671C))
EVT_CALL(SummonEnemy, EVT_ADDR(N(specialFormation_802273A8)), 0)
EVT_SET(LW(11), LW(0))
EVT_SET(LW(0), 200)
EVT_SET(LW(1), 0)
EVT_SET(LW(2), 0)
EVT_CALL(SetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_D)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetGoalToIndex, LW(11), LW(10))
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, LW(11), EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, LW(11), 0, FALSE)
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_CALL(GetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(ForceHomePos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(HPBarToHome, LW(11))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80226DEC) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_EXEC_WAIT(N(8022671C))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_D)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SummonEnemy, EVT_ADDR(N(specialFormation_802273C4)), 0)
EVT_SET(LW(11), LW(0))
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_groove_guy_Palette_00_Anim_C)
EVT_CALL(SetGoalToIndex, LW(11), LW(10))
EVT_CALL(GetGoalPos, LW(11), LW(3), LW(4), LW(5))
EVT_ADD(LW(3), 200)
EVT_CALL(SetActorPos, LW(11), LW(3), LW(4), LW(5))
EVT_THREAD
EVT_SET(LW(6), 0)
EVT_LOOP(50)
EVT_ADD(LW(6), 30)
EVT_MOD(LW(6), 360)
EVT_CALL(SetActorYaw, LW(11), LW(6))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, LW(11), 0)
EVT_END_THREAD
EVT_CALL(SetActorSounds, LW(11), 0, 0, 0)
EVT_THREAD
EVT_LOOP(2)
EVT_CALL(PlaySoundAtActor, LW(11), 0x2E2)
EVT_WAIT_FRAMES(25)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetActorSpeed, LW(11), EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, LW(11), 0, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20F3)
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_groove_guy_Palette_00_Anim_A)
EVT_CALL(GetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 20)
EVT_CALL(PlayEffect, EFFECT_ID_1A, 0, LW(0), LW(1), LW(2), 30, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(ForceHomePos, LW(11), LW(0), LW(1), LW(2))
EVT_WAIT_FRAMES(25)
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_groove_guy_Palette_00_Anim_1)
EVT_CALL(HPBarToHome, LW(11))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, LW(11), 0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, LW(11), 0, 2)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(802271A0) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_EXEC_WAIT(N(8022671C))
EVT_CALL(SummonEnemy, EVT_ADDR(N(specialFormation_802273E0)), 0)
EVT_SET(LW(11), LW(0))
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_medi_guy_Palette_00_Anim_5)
EVT_ADD(LW(10), 4)
EVT_CALL(SetGoalToIndex, LW(11), LW(10))
EVT_CALL(GetGoalPos, LW(11), LW(3), LW(4), LW(5))
EVT_SET(LW(0), 200)
EVT_SET(LW(1), LW(4))
EVT_SET(LW(2), LW(5))
EVT_CALL(SetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(SetActorSounds, LW(11), 0, 896, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_D)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetActorSpeed, LW(11), EVT_FLOAT(4.0))
EVT_CALL(RunToGoal, LW(11), 0, FALSE)
EVT_CALL(SetAnimation, LW(11), 1, NPC_ANIM_medi_guy_Palette_00_Anim_1)
EVT_CALL(GetActorPos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(ForceHomePos, LW(11), LW(0), LW(1), LW(2))
EVT_CALL(HPBarToHome, LW(11))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
extern ActorBlueprint A(red_shy_guy);
extern ActorBlueprint A(medi_guy);
Vec3i N(vector3D_8022739C) = { 0, 0xFFFFFC18, 0 };
Formation N(specialFormation_802273A8) = {
{ .actor = &A(red_shy_guy), .home = { .vec = &N(vector3D_8022739C) }, .priority = 100 },
};
Formation N(specialFormation_802273C4) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8022739C) }, .priority = 100 },
};
Formation N(specialFormation_802273E0) = {
{ .actor = &A(medi_guy), .home = { .vec = &N(vector3D_8022739C) }, .priority = 100 },
};

View File

@ -0,0 +1,9 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/medi_guy.h"
#define NAMESPACE b_area_omo_medi_guy
#include "battle/common/actor/medi_guy.inc.c"

View File

@ -0,0 +1,494 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#define NAMESPACE b_area_omo_pink_shy_guy
extern s32 N(idleAnimations_8021E41C)[];
extern EvtScript N(init_8021E468);
extern EvtScript N(takeTurn_8021FDB4);
extern EvtScript N(idle_8021E4B4);
extern EvtScript N(handleEvent_8021E628);
s32 N(defenseTable_8021E310)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_8021E324)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
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, 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(partsTable_8021E3D0)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021E41C),
.defenseTable = N(defenseTable_8021E310),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SHY_GUY,
.level = 14,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021E3D0)),
.partsData = N(partsTable_8021E3D0),
.script = N(init_8021E468),
.statusTable = N(statusTable_8021E324),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 28, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021E41C)[] = {
STATUS_NORMAL, NPC_ANIM_shy_guy_Palette_03_Anim_1,
STATUS_STONE, NPC_ANIM_shy_guy_Palette_03_Anim_0,
STATUS_SLEEP, NPC_ANIM_shy_guy_Palette_03_Anim_12,
STATUS_POISON, NPC_ANIM_shy_guy_Palette_03_Anim_1,
STATUS_STOP, NPC_ANIM_shy_guy_Palette_03_Anim_0,
STATUS_STATIC, NPC_ANIM_shy_guy_Palette_03_Anim_1,
STATUS_PARALYZE, NPC_ANIM_shy_guy_Palette_03_Anim_0,
STATUS_DIZZY, NPC_ANIM_shy_guy_Palette_03_Anim_13,
STATUS_FEAR, NPC_ANIM_shy_guy_Palette_03_Anim_13,
STATUS_END,
};
EvtScript N(init_8021E468) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021FDB4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021E4B4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021E628)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_8021E4B4) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8021E5C4) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_3)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021E628) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_03_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_03_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8021E5C4))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_03_Anim_14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021EB04) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_5)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8021E5C4))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021F22C) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_9)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LW(0), 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(3), 0)
EVT_LOOP(20)
EVT_SUB(LW(3), 30)
EVT_IF_LT(LW(3), 0)
EVT_ADD(LW(3), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(3))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_9)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_7)
EVT_WAIT_FRAMES(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_10)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_13)
EVT_END_IF
EVT_WAIT_FRAMES(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_03_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_03_Anim_1)
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_8021FDB4) = {
EVT_CALL(RandInt, 1, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(8021EB04))
EVT_ELSE
EVT_EXEC_WAIT(N(8021F22C))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,327 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/pyro_guy.h"
#define NAMESPACE b_area_omo_pyro_guy
extern EvtScript N(init_8022CC80);
extern EvtScript N(takeTurn_8022D344);
extern EvtScript N(idle_8022CCCC);
extern EvtScript N(handleEvent_8022CE60);
s32 N(idleAnimations_8022CB00)[] = {
STATUS_NORMAL, NPC_ANIM_pyro_guy_Palette_00_Anim_1,
STATUS_STONE, NPC_ANIM_pyro_guy_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_pyro_guy_Palette_00_Anim_7,
STATUS_POISON, NPC_ANIM_pyro_guy_Palette_00_Anim_1,
STATUS_STOP, NPC_ANIM_pyro_guy_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_pyro_guy_Palette_00_Anim_1,
STATUS_PARALYZE, NPC_ANIM_pyro_guy_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_pyro_guy_Palette_00_Anim_8,
STATUS_FEAR, NPC_ANIM_pyro_guy_Palette_00_Anim_8,
STATUS_END,
};
s32 N(defenseTable_8022CB4C)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_WATER, -2,
ELEMENT_ICE, -2,
ELEMENT_FIRE, 99,
ELEMENT_SHOCK, 0,
ELEMENT_HAMMER, 0,
ELEMENT_BLAST, -1,
ELEMENT_END,
};
s32 N(statusTable_8022CB88)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 80,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
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, 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(partsTable_8022CC34)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8022CB00),
.defenseTable = N(defenseTable_8022CB4C),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_PYRO_GUY,
.level = 15,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8022CC34)),
.partsData = N(partsTable_8022CC34),
.script = N(init_8022CC80),
.statusTable = N(statusTable_8022CB88),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 60,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 85,
.coinReward = 1,
.size = { 28, 36 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
EvtScript N(init_8022CC80) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8022D344)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8022CCCC)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8022CE60)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_8022CCCC) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(8022CDDC) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_4)
EVT_SET_CONST(LW(2), NPC_ANIM_pyro_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoReturnHome)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8022CE60) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_SET_CONST(LW(2), -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_SET_CONST(LW(2), -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8022CDDC))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoNormalHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_6)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_pyro_guy_Palette_00_Anim_9)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_3)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_pyro_guy_Palette_00_Anim_3)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_UP_AND_AWAY)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8022D344) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
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, NPC_ANIM_pyro_guy_Palette_00_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 70)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_pyro_guy_Palette_00_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 20)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_pyro_guy_Palette_00_Anim_5)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(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_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(8022CDDC))
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(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_pyro_guy_Palette_00_Anim_5)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_pyro_guy_Palette_00_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(YieldTurn)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(8022CDDC))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,494 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/shy_guy.h"
#define NAMESPACE b_area_omo_red_shy_guy
extern s32 N(idleAnimations_8021931C)[];
extern EvtScript N(init_80219368);
extern EvtScript N(takeTurn_8021ACB4);
extern EvtScript N(idle_802193B4);
extern EvtScript N(handleEvent_80219528);
s32 N(defenseTable_80219210)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SHOCK, 0,
ELEMENT_END,
};
s32 N(statusTable_80219224)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 70,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 90,
STATUS_FEAR, 100,
STATUS_STATIC, 50,
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, 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(partsTable_802192D0)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021931C),
.defenseTable = N(defenseTable_80219210),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = -10,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SHY_GUY,
.level = 14,
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_802192D0)),
.partsData = N(partsTable_802192D0),
.script = N(init_80219368),
.statusTable = N(statusTable_80219224),
.escapeChance = 60,
.airLiftChance = 85,
.spookChance = 80,
.baseStatusChance = 80,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 100,
.coinReward = 1,
.size = { 28, 24 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021931C)[] = {
STATUS_NORMAL, NPC_ANIM_shy_guy_Palette_00_Anim_1,
STATUS_STONE, NPC_ANIM_shy_guy_Palette_00_Anim_0,
STATUS_SLEEP, NPC_ANIM_shy_guy_Palette_00_Anim_12,
STATUS_POISON, NPC_ANIM_shy_guy_Palette_00_Anim_1,
STATUS_STOP, NPC_ANIM_shy_guy_Palette_00_Anim_0,
STATUS_STATIC, NPC_ANIM_shy_guy_Palette_00_Anim_1,
STATUS_PARALYZE, NPC_ANIM_shy_guy_Palette_00_Anim_0,
STATUS_DIZZY, NPC_ANIM_shy_guy_Palette_00_Anim_13,
STATUS_FEAR, NPC_ANIM_shy_guy_Palette_00_Anim_13,
STATUS_END,
};
EvtScript N(init_80219368) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021ACB4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802193B4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80219528)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle_802193B4) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
EVT_IF_FLAG(LW(0), STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(802194C4) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_3)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219528) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_D)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(802194C4))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
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(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT_FRAMES(10)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_3)
EVT_SET_CONST(LW(2), NPC_ANIM_shy_guy_Palette_00_Anim_14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80219A04) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 50)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_5)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 30)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_WAIT_FRAMES(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(802194C4))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021A12C) = {
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(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_9)
EVT_WAIT_FRAMES(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_3)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 80)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LW(0), 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LW(10), LW(0))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 10)
EVT_SET(LW(1), 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_5)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_SUB(LW(0), 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LW(0), 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_9)
EVT_THREAD
EVT_WAIT_FRAMES(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT_FRAMES(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LW(0))
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LW(3), 0)
EVT_LOOP(20)
EVT_SUB(LW(3), 30)
EVT_IF_LT(LW(3), 0)
EVT_ADD(LW(3), 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(3))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LW(0))
EVT_IF_FLAG(LW(0), BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_9)
EVT_WAIT_FRAMES(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_7)
EVT_WAIT_FRAMES(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_ADD(LW(0), 40)
EVT_SET(LW(1), 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_10)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LW(0))
EVT_IF_LT(LW(0), 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_13)
EVT_END_IF
EVT_WAIT_FRAMES(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LW(0), 1)
EVT_SET_CONST(LW(1), NPC_ANIM_shy_guy_Palette_00_Anim_4)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_shy_guy_Palette_00_Anim_1)
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_8021ACB4) = {
EVT_CALL(RandInt, 1, LW(0))
EVT_IF_EQ(LW(0), 0)
EVT_EXEC_WAIT(N(80219A04))
EVT_ELSE
EVT_EXEC_WAIT(N(8021A12C))
EVT_END_IF
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

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