mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Disassemble mac, hos, and nok Battle Maps (#602)
* voodoo magic * Cleanup + match func_802180D0_464560 * work * Finish mac battle map * Add to gBattleAreas * splat * Disassembled hos and nok battle maps * Match Kent C Function * fix build * Fix * Work on disasm_script Co-authored-by: Ethan Roseman <ethteck@gmail.com>
This commit is contained in:
parent
55228bd3a7
commit
4657f3621b
@ -1075,9 +1075,6 @@ enum PlayerAnims {
|
||||
ANIM_8001B = 0x0008001B,
|
||||
ANIM_8001D = 0x0008001D,
|
||||
ANIM_8001E = 0x0008001E,
|
||||
ANIM_90004 = 0x00090004,
|
||||
ANIM_90005 = 0x00090005,
|
||||
ANIM_90006 = 0x00090006,
|
||||
};
|
||||
|
||||
enum AmbientSounds {
|
||||
|
@ -33,6 +33,7 @@ ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall);
|
||||
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 PlaySoundAtActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall);
|
||||
@ -61,6 +62,7 @@ ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetLastElement(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80269EAC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80269E80(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalToHome(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall);
|
||||
@ -161,6 +163,7 @@ ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetOwnerTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDistanceToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8026EA7C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddActorDecoration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveActorDecoration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall);
|
||||
@ -301,6 +304,13 @@ ApiStatus func_80276EFC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80273444(Evt *script, s32 isInitialCall);
|
||||
ApiStatus GetActionCommandMode(Evt*, s32);
|
||||
ApiStatus SetActionCommandMode(Evt*, s32);
|
||||
ApiStatus WaitForState(Evt*, s32);
|
||||
ApiStatus func_8026E020(Evt*, s32);
|
||||
ApiStatus GetActionResult(Evt*, s32);
|
||||
ApiStatus SetBattleState(Evt*, s32);
|
||||
ApiStatus func_8027D434(Evt*, s32);
|
||||
|
||||
extern EvtSource PlayerScriptDispatcher;
|
||||
extern EvtSource PeachScriptDispatcher;
|
||||
|
@ -284,6 +284,9 @@
|
||||
/// It also marks the end of any previous case.
|
||||
#define EVT_CASE_RANGE(MIN, MAX) EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX),
|
||||
|
||||
/// Marks the end of a switch case
|
||||
#define EVT_BREAK_SWITCH EVT_CMD(EVT_OP_BREAK_SWITCH),
|
||||
|
||||
/// Marks the end of a switch statement and any case.
|
||||
#define EVT_END_SWITCH EVT_CMD(EVT_OP_END_SWITCH),
|
||||
|
||||
@ -361,12 +364,12 @@
|
||||
/// `VAR &= VALUE`
|
||||
#define EVT_BITWISE_AND(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE),
|
||||
|
||||
/// `VAR |= VALUE`
|
||||
#define EVT_BITWISE_OR(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE),
|
||||
|
||||
/// `VAR &= CONST`, but CONST is treated as-is rather than dereferenced with evt_get_variable.
|
||||
#define EVT_BITWISE_AND_CONST(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST),
|
||||
|
||||
/// `VAR |= VALUE`
|
||||
#define EVT_BITWISE_OR(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE),
|
||||
|
||||
/// `VAR |= CONST`, but CONST is treated as-is rather than dereferenced with evt_get_variable.
|
||||
#define EVT_BITWISE_OR_CONST(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST),
|
||||
|
||||
|
8
src/battle/action_cmd/jump.h
Normal file
8
src/battle/action_cmd/jump.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef _JUMP_H_
|
||||
#define _JUMP_H_
|
||||
|
||||
#include "common_structs.h"
|
||||
|
||||
ApiStatus action_command_jump_CreateHudElements(Evt* script, s32 isInitialCall);
|
||||
|
||||
#endif
|
@ -1,10 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_hos
|
||||
|
||||
ApiStatus func_80218000_47F0B0(Evt* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
playerData->currentPartner = PARTNER_GOOMBARIO;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_hos
|
||||
|
||||
#include "common/UnkSfxFunc.inc.c"
|
||||
|
||||
#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"
|
@ -1,9 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802184C0_47F570);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802186B8_47F768);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802189D0_47FA80);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_80218CEC_47FD9C);
|
781
src/battle/area_hos/actor/ember.c
Normal file
781
src/battle/area_hos/actor/ember.c
Normal file
@ -0,0 +1,781 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/bubble.h"
|
||||
|
||||
#define NAMESPACE b_area_hos_ember
|
||||
|
||||
s32 N(defenseTable_8021ACB0)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_WATER, 4294967294,
|
||||
ELEMENT_ICE, 4294967294,
|
||||
ELEMENT_FIRE, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021ACD4)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 0,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 0,
|
||||
STATUS_SHRINK, 90,
|
||||
STATUS_STOP, 85,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021AE5C)[];
|
||||
extern s32 N(idleAnimations_8021AEA8)[];
|
||||
|
||||
ActorPartDesc N(partsTable_8021AD80)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -2, 25 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021AE5C),
|
||||
.defenseTable = N(defenseTable_8021ACB0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
|
||||
.elementImmunityFlags = 0,
|
||||
.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_8021AEA8),
|
||||
.defenseTable = N(defenseTable_8021ACB0),
|
||||
.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_8021AEA8),
|
||||
.defenseTable = N(defenseTable_8021ACB0),
|
||||
.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_8021AEA8),
|
||||
.defenseTable = N(defenseTable_8021ACB0),
|
||||
.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_8021AEA8),
|
||||
.defenseTable = N(defenseTable_8021ACB0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -10,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_8021AEB4);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_EMBER,
|
||||
.level = 24,
|
||||
.maxHP = 10,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021AD80)),
|
||||
.partsData = N(partsTable_8021AD80),
|
||||
.script = N(init_8021AEB4),
|
||||
.statusTable = N(statusTable_8021ACD4),
|
||||
.escapeChance = 60,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 75,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 33, 32 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021AE5C)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_bubble_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_bubble_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_bubble_Palette_01_Anim_1,
|
||||
STATUS_POISON, NPC_ANIM_bubble_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_bubble_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_bubble_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_bubble_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_bubble_Palette_01_Anim_A,
|
||||
STATUS_FEAR, NPC_ANIM_bubble_Palette_01_Anim_A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021AEA8)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_bubble_Palette_01_Anim_1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021D284);
|
||||
extern EvtSource N(idle_8021B07C);
|
||||
extern EvtSource N(handleEvent_8021B8BC);
|
||||
|
||||
EvtSource N(init_8021AEB4) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021D284)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021B07C)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021B8BC)))
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetActorVar, -127, 0, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetActorVar, -127, 0, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetPartScale, -127, 2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
|
||||
EVT_CALL(SetPartScale, -127, 3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
|
||||
EVT_CALL(SetPartScale, -127, 4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
|
||||
EVT_CALL(SetPartScale, -127, 5, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
|
||||
EVT_CALL(SetActorVar, -127, 1, 0)
|
||||
EVT_CALL(SetActorVar, -127, 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
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021B07C) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(MakeLerp, 0, 10, 25, 10)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(GetHomePos, -127, 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), 0x35D000)
|
||||
EVT_GOTO(11)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorVar, -127, 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, -127, 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), 0x35D000)
|
||||
EVT_GOTO(22)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorVar, -127, 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"
|
||||
|
||||
EvtSource N(8021B2FC) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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_01_Anim_1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021B398) = {
|
||||
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
|
||||
};
|
||||
|
||||
Vec3i N(vector3D_8021B594) = { 0, 0xFFFFFC18, 0, };
|
||||
|
||||
Formation N(specialFormation_8021B5A0) = {
|
||||
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8021B594) }},
|
||||
};
|
||||
|
||||
EvtSource N(split) = {
|
||||
EVT_CALL(GetLastDamage, -127, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorHP, -127, LW(0))
|
||||
EVT_IF_LE(LW(0), 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x20000000)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorVar, -127, 1, LW(0))
|
||||
EVT_IF_GE(LW(0), 2)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(8021B398))
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(1)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CASE_OR_EQ(3)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(specialFormation_8021B5A0)), 0)
|
||||
EVT_CALL(SetActorVar, LW(0), 2, 1)
|
||||
EVT_CALL(GetActorHP, -127, LW(11))
|
||||
EVT_CALL(SetEnemyHP, LW(0), LW(11))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetActorPos, LW(0), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetGoalToIndex, LW(0), LW(10))
|
||||
EVT_CALL(GetGoalPos, LW(0), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetHomePos, LW(0), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetActorJumpGravity, LW(0), EVT_FLOAT(1.2001953125))
|
||||
EVT_CALL(JumpToGoal, LW(0), 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(HPBarToHome, LW(0))
|
||||
EVT_CALL(GetActorVar, -127, 1, LW(1))
|
||||
EVT_SWITCH(LW(1))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetActorVar, LW(0), 1, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetActorVar, LW(0), 1, 2)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetActorVar, -127, 1, 3)
|
||||
EVT_CALL(SetActorVar, LW(0), 2, 0)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021B8BC) = {
|
||||
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(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_EXEC(N(split))
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_EXEC(N(split))
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_8)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_01_Anim_9)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_8)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_01_Anim_9)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_9)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_EXEC(N(split))
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_CASE_OR_EQ(28)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(56)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_bubble_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_bubble_Palette_01_Anim_3)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(61)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021BE64) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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_01_Anim_1)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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), 5)
|
||||
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, 2)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
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_01_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.6005859375))
|
||||
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, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_SET(LW(0), 1)
|
||||
EVT_SET(LW(1), 4587780)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021C454) = {
|
||||
EVT_SET(LW(6), 2)
|
||||
EVT_LOOP(4)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), 0x80000)
|
||||
EVT_CALL(SetPartScale, -127, LW(6), EVT_FLOAT(0.2001953125), EVT_FLOAT(0.2001953125), EVT_FLOAT(0.2001953125))
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartScale, -127, 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, -127, LW(6), 1, 0)
|
||||
EVT_CALL(SetPartMoveSpeed, -127, LW(6), EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetPartJumpGravity, -127, LW(6), EVT_FLOAT(0.0107421875))
|
||||
EVT_CALL(SetPartSounds, -127, LW(6), 2, 720, 0)
|
||||
EVT_CALL(JumpPartTo, -127, LW(6), LW(3), LW(4), LW(5), 0, 0)
|
||||
EVT_CALL(SetPartFlagBits, -127, LW(6), 1, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_ADD(LW(6), 1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021C5F8) = {
|
||||
EVT_EXEC(N(8021C454))
|
||||
EVT_CALL(GetDistanceToGoal, -127, LW(0))
|
||||
EVT_DIVF(LW(0), EVT_FLOAT(8.0))
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(LW(0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021C654) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
|
||||
EVT_CALL(UseBattleCamPreset, 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, -127, 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_01_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_01_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_Anim_5)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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(8021C5F8))
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
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_01_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(8021C5F8))
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT), 0, 0, 3, 32)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021CBC8) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorSounds, -127, 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.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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, -127, 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_01_Anim_4)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021B2FC))
|
||||
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, -127, 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.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_bubble_Palette_01_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, -127, 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, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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(8021B2FC))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8021D284) = {
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_EXEC_WAIT(N(8021BE64))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_EXEC_WAIT(N(8021CBC8))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x1000000)
|
||||
EVT_EXEC_WAIT(N(8021BE64))
|
||||
EVT_ELSE
|
||||
EVT_CALL(RandInt, 1000, LW(0))
|
||||
EVT_IF_LE(LW(0), 300)
|
||||
EVT_EXEC_WAIT(N(8021C654))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(8021BE64))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x1000000)
|
||||
EVT_EXEC_WAIT(N(8021CBC8))
|
||||
EVT_ELSE
|
||||
EVT_CALL(RandInt, 1000, LW(0))
|
||||
EVT_IF_LE(LW(0), 300)
|
||||
EVT_EXEC_WAIT(N(8021C654))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(8021CBC8))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
537
src/battle/area_hos/actor/goombario_tutor.c
Normal file
537
src/battle/area_hos/actor/goombario_tutor.c
Normal file
@ -0,0 +1,537 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "battle/action_cmd/jump.h"
|
||||
#include "sprite/npc/battle_goombario.h"
|
||||
|
||||
#define NAMESPACE b_area_hos_goombario_tutor
|
||||
|
||||
s32 N(idleAnimations_80219010)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_goombario_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_POISON, NPC_ANIM_battle_goombario_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8021905C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_80219068)[] = {
|
||||
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,
|
||||
};
|
||||
|
||||
ActorPartDesc N(partsTable_80219114)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -4, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80219010),
|
||||
.defenseTable = N(defenseTable_8021905C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_80219160);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_40000,
|
||||
.type = ACTOR_TYPE_GOOMBARIO_TUTOR1,
|
||||
.level = 99,
|
||||
.maxHP = 99,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80219114)),
|
||||
.partsData = N(partsTable_80219114),
|
||||
.script = N(init_80219160),
|
||||
.statusTable = N(statusTable_80219068),
|
||||
.escapeChance = 0,
|
||||
.airLiftChance = 0,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 0,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 0,
|
||||
.size = { 24, 32 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_80219444);
|
||||
extern EvtSource N(idle_802191D0);
|
||||
extern EvtSource N(handleEvent_802191E0);
|
||||
extern EvtSource N(80219C74);
|
||||
|
||||
EvtSource N(init_80219160) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80219444)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802191D0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802191E0)))
|
||||
EVT_CALL(SetActorVar, -127, 0, 1)
|
||||
EVT_EXEC(N(80219C74))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_802191D0) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_802191E0) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_8026BF48, 1)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(10)
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(RandInt, 2, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ActorSpeak, 655405, -127, 1, 589834, 589826)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ActorSpeak, 655406, -127, 1, 589834, 589826)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(func_8026BF48, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(48)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(1000)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_80219444) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(SetBattleCamZoom, 400)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 400)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
|
||||
EVT_CALL(GetBattleFlags2, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x200)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 10, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1005859375))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(4)
|
||||
EVT_ADD(LW(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_CALL(func_802694A4, 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(func_802A9120_421B10, 12, 3)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySound, SOUND_JUMP_3E2)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(GetActionCommandMode, LW(0))
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_CALL(SetActionCommandMode, 3)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActionCommandMode, LW(0))
|
||||
EVT_IF_LT(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(func_80269EAC, 5)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32)
|
||||
EVT_CALL(CloseActionCommandInfo)
|
||||
EVT_SET(LW(15), LW(0))
|
||||
EVT_SWITCH(LW(15))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), 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_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
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.80078125))
|
||||
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_SUB(LW(0), 10)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_run)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus func_80218000_47F0B0(Evt* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
playerData->currentPartner = PARTNER_GOOMBARIO;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(80219C74) = {
|
||||
EVT_CALL(SetBattleFlagBits, 33554432, 1)
|
||||
EVT_CALL(func_802535B4, 0)
|
||||
EVT_CALL(WaitForState, 13)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655385, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(func_8026E020, 1)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(WaitForState, 18)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, -73, 40, 202)
|
||||
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, 10)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655386, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(SetBattleFlagBits, 16384, 0)
|
||||
EVT_CALL(SetMessageBoxDuration, -1)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(15)
|
||||
EVT_CALL(SetMessageBoxDuration, 35)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, 10)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(WaitForState, 0)
|
||||
EVT_CALL(SetBattleFlagBits2, 512, 1)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActionCommandMode, LW(0))
|
||||
EVT_IF_NE(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655387, 256, 1, 2097161, 2097157)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonDown, 32768, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonPress, 32768, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionSuccess, 1)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(WaitForState, 8)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655389, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(WaitForState, 9)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655390, 512, 1, 589839, 589825)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(WaitForState, 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActionCommandMode, LW(0))
|
||||
EVT_IF_NE(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655391, 256, 1, 2097161, 2097157)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonDown, 32768, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonPress, 32768, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionSuccess, 1)
|
||||
EVT_CALL(SetActionCommandMode, -1)
|
||||
EVT_CALL(WaitForState, 6)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655392, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(WaitForState, 13)
|
||||
EVT_CALL(func_8026E020, 2)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(WaitForState, 18)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655394, 256, 1, 2097161, 2097157)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonDown, 262144, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonPress, 262144, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(WaitForState, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActionCommandMode, LW(0))
|
||||
EVT_IF_NE(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_CALL(CheckButtonDown, 262144, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetActionCommandMode, -1)
|
||||
EVT_CALL(PauseTakeTurn, 0)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655395, 256, 1, 2097161, 2097157)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonPress, 262144, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(ResumeTakeTurn, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActionResult, LW(0))
|
||||
EVT_IF_EQ(LW(0), 3)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655396, 256, 1, 2097161, 2097157)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(CheckButtonDown, 262144, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActionSuccess, 1)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(WaitForState, 8)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655397, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, 1)
|
||||
EVT_CALL(WaitForState, 0)
|
||||
EVT_CALL(WaitForState, 13)
|
||||
EVT_CALL(ShowBattleChoice, 1966109)
|
||||
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(ActorSpeak, 655399, 256, 1, 2097161, 2097157)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655400, 256, 1, 2097161, 2097157)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetActorVar, -127, 0, 0)
|
||||
EVT_CALL(SetBattleFlagBits2, 512, 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(func_8026E020, 131)
|
||||
EVT_CALL(SetActionCommandMode, 2)
|
||||
EVT_CALL(WaitForState, 18)
|
||||
EVT_CALL(GetMenuSelection, LW(0), LW(1), LW(2))
|
||||
EVT_IF_EQ(LW(0), 7)
|
||||
EVT_GOTO(99)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(WaitForState, 8)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(func_80269524, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(ActorSpeak, 655402, 256, 1, 2097161, 2097157)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ActorSpeak, 655403, 256, 1, 2097161, 2097157)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ActorSpeak, 655401, 256, 1, 2097161, 2097157)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(SetEnemyHP, 512, 99)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, 0)
|
||||
EVT_CALL(SetActionCommandMode, 1)
|
||||
EVT_CALL(WaitForState, 6)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(GetBlockResult, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(ActorSpeak, 655402, 256, 1, 2097161, 2097157)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ActorSpeak, 655403, 256, 1, 2097161, 2097157)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ActorSpeak, 655401, 256, 1, 2097161, 2097157)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
|
||||
EVT_CALL(WaitForState, 13)
|
||||
EVT_GOTO(10)
|
||||
EVT_LABEL(99)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
|
||||
EVT_CALL(ActorSpeak, 655404, 256, 1, 2097161, 2097157)
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(WaitForState, 0)
|
||||
EVT_CALL(SetBattleState, 30)
|
||||
EVT_CALL(func_80218000_47F0B0)
|
||||
EVT_WAIT_FRAMES(10000)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
2197
src/battle/area_hos/actor/magikoopa.c
Normal file
2197
src/battle/area_hos/actor/magikoopa.c
Normal file
File diff suppressed because it is too large
Load Diff
46
src/battle/area_hos/area.c
Normal file
46
src/battle/area_hos/area.c
Normal file
@ -0,0 +1,46 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_hos
|
||||
|
||||
extern ActorDesc N(goombario_tutor);
|
||||
extern ActorDesc N(ember);
|
||||
extern ActorDesc N(magikoopa_flying);
|
||||
|
||||
extern Stage N(hos_00);
|
||||
extern Stage N(hos_01);
|
||||
extern Stage N(hos_02);
|
||||
|
||||
Formation N(formation_00) = {
|
||||
{ .actor = &N(goombario_tutor), .home = { .index = 1 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(ember), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(ember), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(ember), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(ember), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(ember), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_03) = {
|
||||
{ .actor = &N(magikoopa_flying), .home = { .index = 5 }, .priority = 10 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("クリオ(ACヘルプ)", N(formation_00), &N(hos_02)),
|
||||
BATTLE("エルモスx2", N(formation_01), &N(hos_01)),
|
||||
BATTLE("エルモスx3", N(formation_02), &N(hos_01)),
|
||||
BATTLE("カメック(ACヘルプご)", N(formation_03), &N(hos_02)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "hos_00", &N(hos_00) },
|
||||
{ "hos_01", &N(hos_01) },
|
||||
{ "hos_02", &N(hos_02) },
|
||||
{},
|
||||
};
|
79
src/battle/area_hos/stage/hos_00.c
Normal file
79
src/battle/area_hos/stage/hos_00.c
Normal file
@ -0,0 +1,79 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_hos_hos_00
|
||||
|
||||
EvtSource N(802255E0) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(beforeBattle_802256E8) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 19)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 21)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 23)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 24)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 25)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 26)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 27)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 28)
|
||||
EVT_EXEC(N(802255E0))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8022589C) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_802258AC)[] = {
|
||||
0x00000020, 0x0000001E, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "nok_tex",
|
||||
.shape = "nok_bt02_shape",
|
||||
.hit = "nok_bt02_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_802256E8),
|
||||
.postBattle = N(afterBattle_8022589C),
|
||||
.foregroundModelList = N(foregroundModelList_802258AC),
|
||||
};
|
172
src/battle/area_hos/stage/hos_01.c
Normal file
172
src/battle/area_hos/stage/hos_01.c
Normal file
@ -0,0 +1,172 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_hos_hos_01
|
||||
|
||||
s32 func_802184C0_47F570(void);
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802184C0_47F570);
|
||||
|
||||
s32 func_802186B8_47F768(void);
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802186B8_47F768);
|
||||
|
||||
s32 func_802189D0_47FA80(void);
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802189D0_47FA80);
|
||||
|
||||
s32 func_80218CEC_47FD9C(void);
|
||||
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_80218CEC_47FD9C);
|
||||
|
||||
s32 D_80224BB0_48BC60[] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(beforeBattle_80224BD0) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 0, 5, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_ADDR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 5, 1, -1)
|
||||
EVT_CALL(SetModelFlags, 5, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, 16, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_ADDR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 16, 2, -1)
|
||||
EVT_CALL(SetModelFlags, 16, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 2, 19, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 3, EVT_ADDR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 19, 3, -1)
|
||||
EVT_CALL(SetModelFlags, 19, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 3, 28, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 4, EVT_ADDR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 28, 4, -1)
|
||||
EVT_CALL(SetModelFlags, 28, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 4, 31, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 5, EVT_ADDR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 31, 5, -1)
|
||||
EVT_CALL(SetModelFlags, 31, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 5, 7, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 6, EVT_ADDR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 7, 6, -1)
|
||||
EVT_CALL(SetModelFlags, 7, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 6, 37, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 7, EVT_ADDR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 37, 7, -1)
|
||||
EVT_CALL(SetModelFlags, 37, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 7, 9, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 8, EVT_ADDR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 9, 8, -1)
|
||||
EVT_CALL(SetModelFlags, 9, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 8, 25, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 9, EVT_ADDR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 25, 9, -1)
|
||||
EVT_CALL(SetModelFlags, 25, 128, 1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 9, 22, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 10, EVT_ADDR(func_80218CEC_47FD9C), 0)
|
||||
EVT_CALL(SetModelCustomGfx, 22, 10, -1)
|
||||
EVT_CALL(SetModelFlags, 22, 128, 1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetTexPanner, 4, 0)
|
||||
EVT_CALL(SetTexPanner, 12, 0)
|
||||
EVT_CALL(SetTexPanner, 13, 0)
|
||||
EVT_CALL(SetTexPanner, 14, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_ADD(LW(1), -150)
|
||||
EVT_IF_GT(LW(0), 32768)
|
||||
EVT_ADD(LW(0), -32768)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(LW(1), -32768)
|
||||
EVT_ADD(LW(1), 32768)
|
||||
EVT_END_IF
|
||||
EVT_ADD(LW(2), -50)
|
||||
EVT_ADD(LW(3), 100)
|
||||
EVT_IF_LT(LW(2), -32768)
|
||||
EVT_ADD(LW(2), 32768)
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(LW(3), 32768)
|
||||
EVT_ADD(LW(3), -32768)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, LW(0), LW(1))
|
||||
EVT_CALL(SetTexPanOffset, 0, 1, LW(2), LW(3))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(MakeLerp, -7, 7, 30, 10)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 18, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 19, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 27, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 28, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 31, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 30, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, 7, -7, 30, 10)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 18, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 19, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 27, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 28, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 31, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 30, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(2)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LABEL(3)
|
||||
EVT_CALL(MakeLerp, 7, -7, 30, 10)
|
||||
EVT_LABEL(4)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 33, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 34, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 15, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 16, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(4)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, -7, 7, 30, 10)
|
||||
EVT_LABEL(5)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 33, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 34, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 15, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 16, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(5)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(3)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_80225598) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_802255A8)[] = {
|
||||
0x00000005, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "hos_tex\0",
|
||||
.shape = "hos_bt01_shape",
|
||||
.hit = "hos_bt01_hit",
|
||||
.bg = "hos_bg",
|
||||
.preBattle = N(beforeBattle_80224BD0),
|
||||
.postBattle = N(afterBattle_80225598),
|
||||
.foregroundModelList = N(foregroundModelList_802255A8),
|
||||
};
|
102
src/battle/area_hos/stage/hos_02.c
Normal file
102
src/battle/area_hos/stage/hos_02.c
Normal file
@ -0,0 +1,102 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_hos_hos_02
|
||||
|
||||
EvtSource N(beforeBattle_802258E0) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetTexPanner, 21, 1)
|
||||
EVT_CALL(SetTexPanner, 22, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_ADD(LW(0), -50)
|
||||
EVT_ADD(LW(1), 300)
|
||||
EVT_ADD(LW(2), 90)
|
||||
EVT_ADD(LW(3), -200)
|
||||
EVT_CALL(SetTexPanOffset, 1, 0, LW(0), LW(1))
|
||||
EVT_CALL(SetTexPanOffset, 1, 1, LW(2), LW(3))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(10), 0)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(MakeLerp, -7, 7, 40, 10)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 17, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 21, 0, LW(0), 0)
|
||||
EVT_MUL(LW(0), 3)
|
||||
EVT_CALL(RotateModel, 17, LW(10), 0, 0, 1)
|
||||
EVT_ADD(LW(10), -3)
|
||||
EVT_CALL(ClampAngleFloat, LW(10))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, 7, -7, 40, 10)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 17, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 21, 0, LW(0), 0)
|
||||
EVT_MUL(LW(0), 3)
|
||||
EVT_CALL(RotateModel, 17, LW(10), 0, 0, 1)
|
||||
EVT_ADD(LW(10), -3)
|
||||
EVT_CALL(ClampAngleFloat, LW(10))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(2)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(10), 0)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(MakeLerp, -10, 4, 40, 10)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 19, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 22, 0, LW(0), 0)
|
||||
EVT_MUL(LW(0), -3)
|
||||
EVT_CALL(RotateModel, 19, LW(10), 0, 0, 1)
|
||||
EVT_ADD(LW(10), -3)
|
||||
EVT_CALL(ClampAngleFloat, LW(10))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, 4, -10, 40, 10)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(TranslateModel, 19, 0, LW(0), 0)
|
||||
EVT_CALL(TranslateModel, 22, 0, LW(0), 0)
|
||||
EVT_MUL(LW(0), -3)
|
||||
EVT_CALL(RotateModel, 19, LW(10), 0, 0, 1)
|
||||
EVT_ADD(LW(10), -3)
|
||||
EVT_CALL(ClampAngleFloat, LW(10))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(2)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_80225E20) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "hos_tex",
|
||||
.shape = "hos_bt02_shape",
|
||||
.hit = "hos_bt02_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_802258E0),
|
||||
.postBattle = N(afterBattle_80225E20),
|
||||
};
|
@ -1,456 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/goomba.h"
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_1_goomba
|
||||
|
||||
s32 N(defenseTable_80219610)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021961C)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 100,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 100,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_80219714)[];
|
||||
extern EvtSource N(init_802197AC);
|
||||
|
||||
ActorPartDesc N(partsTable_802196C8)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80219714),
|
||||
.defenseTable = N(defenseTable_80219610),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GOOMBA,
|
||||
.level = 5,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_802196C8)),
|
||||
.partsData = N(partsTable_802196C8),
|
||||
.script = N(init_802197AC),
|
||||
.statusTable = N(statusTable_8021961C),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 90,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 24, 24 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219714)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219760)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021A300);
|
||||
extern EvtSource N(idle_802197F8);
|
||||
extern EvtSource N(handleEvent_80219AD4);
|
||||
|
||||
EvtSource N(init_802197AC) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021A300)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_802197F8)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80219AD4)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_802197F8) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_80219760)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_80219714)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_80219760)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_80219714)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_80219AD4) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021A300) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 10)
|
||||
EVT_SET(EVT_VAR(1), 10)
|
||||
EVT_ADD(EVT_VAR(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_asleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(EVT_VAR(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(EVT_VAR(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pre_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 40)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "battle/common/actor/goomba.inc.c"
|
||||
|
@ -1,934 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/goomba.h"
|
||||
#include "sprite/npc/paragoomba.h"
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_1_paragoomba
|
||||
|
||||
ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall);
|
||||
|
||||
s32 N(defenseTable_8021CB00)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8021CB0C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021CB18)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 100,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 100,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021CBC4)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 80,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021E4EC)[];
|
||||
extern s32 N(idleAnimations_8021CD28)[];
|
||||
extern s32 N(idleAnimations_8021CDC0)[];
|
||||
extern s32 N(idleAnimations_8021CDCC)[];
|
||||
extern EvtSource N(init_8021CDD8);
|
||||
|
||||
ActorPartDesc N(partsTable_8021CC70)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021E4EC),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CD28),
|
||||
.defenseTable = N(defenseTable_8021CB0C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CDC0),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 4,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CDCC),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_PARAGOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021CC70)),
|
||||
.partsData = N(partsTable_8021CC70),
|
||||
.script = N(init_8021CDD8),
|
||||
.statusTable = N(statusTable_8021CBC4),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 100,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 36, 26 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CD28)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CD74)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CDC0)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_left_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CDCC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_right_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021D74C);
|
||||
extern EvtSource N(idle_8021CE24);
|
||||
extern EvtSource N(handleEvent_8021D158);
|
||||
|
||||
EvtSource N(init_8021CDD8) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021D74C)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021CE24)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021D158)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021CE24) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(0.6))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations_8021CD74)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(0.6))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations_8021CD28)))
|
||||
EVT_LOOP(40)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021D0E0) = {
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(7.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
extern EvtSource N(8021DF64);
|
||||
|
||||
EvtSource N(handleEvent_8021D158) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(GetBattlePhase, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 1)
|
||||
EVT_CALL(GetEncounterState, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 4)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_CASE_EQ(15)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_dizzy)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(56)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8021D74C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8416)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_SUB(EVT_VAR(0), 80)
|
||||
EVT_SET(EVT_VAR(1), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(4)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8415)
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_aim)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FIXED(3.0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FIXED(1.0))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8416)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
extern EvtSource N(8021E584);
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
EvtSource N(8021DF64) = {
|
||||
EVT_CALL(func_8027D32C, -127)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 2, 131077)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 3, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 4, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 1, 8388612)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, -9, 7, -2)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 4, 11, 7, -2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSounds, -127, 2, 769, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(0.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 100, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(0.3))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(ResetActorSounds, -127, 2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(3))
|
||||
EVT_IF_EQ(EVT_VAR(3), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5))
|
||||
EVT_ADD(EVT_VAR(4), 10)
|
||||
EVT_ADD(EVT_VAR(5), 5)
|
||||
EVT_CALL(PlayEffect, 0x27, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), EVT_FIXED(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 0)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_CALL(GetIndexFromHome, -127, EVT_VAR(0))
|
||||
EVT_MOD(EVT_VAR(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, -127, EVT_VAR(0))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetHomePos, -127, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_CALL(SetStatusTable, -127, EVT_PTR(N(statusTable_8021CB18)))
|
||||
EVT_CALL(SetActorType, -127, 7)
|
||||
EVT_EXEC_WAIT(N(8021E584))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4096, 1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// Copy of goomba.c follows..................
|
||||
// TODO: deduplicate
|
||||
|
||||
s32 N(idleAnimations_8021E4EC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021E538)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021F0D8);
|
||||
extern EvtSource N(idle_8021E5D0);
|
||||
extern EvtSource N(handleEvent_8021E8AC);
|
||||
|
||||
EvtSource N(8021E584) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021F0D8)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021E5D0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021E8AC)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021E5D0) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E538)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E4EC)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E538)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E4EC)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021E8AC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021F0D8) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 10)
|
||||
EVT_SET(EVT_VAR(1), 10)
|
||||
EVT_ADD(EVT_VAR(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_asleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(EVT_VAR(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(EVT_VAR(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pre_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 40)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "battle/common/actor/paragoomba.inc.c"
|
||||
|
@ -1,477 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/spiked_goomba.h"
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_1_spiked_goomba
|
||||
|
||||
s32 N(defenseTable_8021AFD0)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021AFDC)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 80,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021B0D4)[];
|
||||
extern EvtSource N(init_8021B16C);
|
||||
|
||||
ActorPartDesc N(partsTable_8021B088)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021B0D4),
|
||||
.defenseTable = N(defenseTable_8021AFD0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 244,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_SPIKED_GOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021B088)),
|
||||
.partsData = N(partsTable_8021B088),
|
||||
.script = N(init_8021B16C),
|
||||
.statusTable = N(statusTable_8021AFDC),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 90,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 24, 28 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B0D4)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B120)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_spiked_goomba_default_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021BDDC);
|
||||
extern EvtSource N(idle_8021B1B8);
|
||||
extern EvtSource N(handleEvent_8021B494);
|
||||
|
||||
EvtSource N(init_8021B16C) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021BDDC)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021B1B8)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021B494)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021B1B8) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021B494) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(27)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_IF_NOT_FLAG(EVT_VAR(0), 0x35D000)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(3))
|
||||
EVT_IF_FLAG(EVT_VAR(3), 0x80000)
|
||||
EVT_ADD(EVT_VAR(1), 10)
|
||||
EVT_ELSE
|
||||
EVT_ADD(EVT_VAR(1), 26)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, 0x1A, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 10)
|
||||
EVT_SET(EVT_VAR(1), 10)
|
||||
EVT_ADD(EVT_VAR(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_sleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(EVT_VAR(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(EVT_VAR(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 2, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 40)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(GetLastDamage, 0, EVT_VAR(0))
|
||||
EVT_IF_GT(EVT_VAR(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_IF
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "battle/common/actor/spiked_goomba.inc.c"
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "message_ids.h"
|
||||
#include "sprite/npc/goomba_bros.h"
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_2
|
||||
|
||||
|
@ -1,928 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/paragoomba.h"
|
||||
#include "sprite/npc/goomba.h"
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_3_paragoomba2
|
||||
|
||||
s32 N(defenseTable_8021F750)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8021F75C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021F768)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 100,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 100,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021F814)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 80,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8022113C)[];
|
||||
extern s32 N(idleAnimations_8021F978)[];
|
||||
extern s32 N(idleAnimations_8021FA10)[];
|
||||
extern s32 N(idleAnimations_8021FA1C)[];
|
||||
extern EvtSource N(init_8021FA28);
|
||||
extern EvtSource N(takeTurn_8022039C);
|
||||
extern EvtSource N(idle_8021FA74);
|
||||
extern EvtSource N(handleEvent_8021FDA8);
|
||||
|
||||
ActorPartDesc N(partsTable_8021F8C0)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8022113C),
|
||||
.defenseTable = N(defenseTable_8021F750),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021F978),
|
||||
.defenseTable = N(defenseTable_8021F75C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021FA10),
|
||||
.defenseTable = N(defenseTable_8021F750),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 4,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021FA1C),
|
||||
.defenseTable = N(defenseTable_8021F750),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_PARAGOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021F8C0)),
|
||||
.partsData = N(partsTable_8021F8C0),
|
||||
.script = N(init_8021FA28),
|
||||
.statusTable = N(statusTable_8021F814),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 100,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 36, 26 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021F978)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021F9C4)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021FA10)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_left_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021FA1C)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_right_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
EvtSource N(init_8021FA28) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8022039C)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021FA74)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021FDA8)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021FA74) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, LW(0))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6005859375))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_ADDR(N(idleAnimations_8021F9C4)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6005859375))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_ADDR(N(idleAnimations_8021F978)))
|
||||
EVT_LOOP(40)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021FD30) = {
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
extern EvtSource N(80220BB4);
|
||||
|
||||
EvtSource N(handleEvent_8021FDA8) = {
|
||||
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(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(GetEncounterState, LW(0))
|
||||
EVT_IF_EQ(LW(0), 4)
|
||||
EVT_EXEC_WAIT(N(80220BB4))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(80220BB4))
|
||||
EVT_CASE_EQ(15)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(80220BB4))
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_dizzy)
|
||||
EVT_EXEC_WAIT(N(8021FD30))
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(56)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021FD30))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000002)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_paragoomba_default_pain)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8022039C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E0)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
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(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_SUB(LW(0), 80)
|
||||
EVT_SET(LW(1), 20)
|
||||
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, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(4)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20DF)
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_aim)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FLOAT(3.0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0x80000000, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FLOAT(1.0))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021FD30))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20E0)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
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(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021FD30))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
extern EvtSource N(802211D4);
|
||||
|
||||
EvtSource N(80220BB4) = {
|
||||
EVT_CALL(func_8027D32C, -127)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 2, 131077)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 3, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 4, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 1, 8388612)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, -9, 7, -2)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 4, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 4, 11, 7, -2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_IF_EQ(LW(0), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSounds, -127, 2, 769, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.80078125))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 100, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.30078125))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(ResetActorSounds, -127, 2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(3))
|
||||
EVT_IF_EQ(LW(3), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_ADD(LW(4), 10)
|
||||
EVT_ADD(LW(5), 5)
|
||||
EVT_CALL(PlayEffect, 0x27, 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(10)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 0)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_CALL(GetIndexFromHome, -127, LW(0))
|
||||
EVT_MOD(LW(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, -127, LW(0))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetHomePos, -127, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_CALL(SetStatusTable, -127, EVT_ADDR(N(statusTable_8021F768)))
|
||||
EVT_CALL(SetActorType, -127, 7)
|
||||
EVT_EXEC_WAIT(N(802211D4))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4096, 1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8022113C)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80221188)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_80221D28);
|
||||
extern EvtSource N(idle_80221220);
|
||||
extern EvtSource N(handleEvent_802214FC);
|
||||
|
||||
EvtSource N(802211D4) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80221D28)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221220)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802214FC)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_80221220) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, LW(0))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80221188)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8022113C)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80221188)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8022113C)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_802214FC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_80221D28) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
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), 10)
|
||||
EVT_SET(LW(1), 10)
|
||||
EVT_ADD(LW(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_asleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0x80000000, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
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(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(LW(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pre_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), 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_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
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.80078125))
|
||||
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_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "battle/common/actor/paragoomba.inc.c"
|
||||
|
@ -1,5 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
@ -1,97 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/464560", func_802180D0_464560);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/464560", func_80218100_464590);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/464560", func_80218300_464790);
|
||||
|
||||
#include "common/ActorJumpToPos.inc.c"
|
||||
|
||||
#include "common/UnkActorSizeFunc.inc.c"
|
||||
|
||||
#include "common/UnkEffect6CFunc.inc.c"
|
||||
|
||||
ApiStatus func_80218DF4_465284(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkStruct0* unkStruct0 = (UnkStruct0*)evt_get_variable(script, *args++);
|
||||
|
||||
unkStruct0->unk_0C->unk_08 = -1000.0f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80218E2C_4652BC(Evt* script, s32 isInitialCall) {
|
||||
UnkStruct0* unkStruct0 = (UnkStruct0*) evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
unkStruct0->unk_0C->unk_08 = 144.0f;
|
||||
unkStruct0->flags |= 0x10;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#define NAMESPACE dup_b_area_mac
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
#include "common/UnkActorPosFunc.inc.c"
|
||||
|
||||
#define NAMESPACE dup_b_area_mac
|
||||
#include "common/UnkActorPosFunc.inc.c"
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/464560", func_80219188_465618);
|
||||
|
||||
ApiStatus func_80219604_465A94(Evt* script, s32 isInitialCall) {
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->flags = 0;
|
||||
|
||||
if (unkDuplighost->effect1 != NULL) {
|
||||
unkDuplighost->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
}
|
||||
|
||||
if (unkDuplighost->effect2 != NULL) {
|
||||
unkDuplighost->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80219658_465AE8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802196A4_465B34(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802196F0_465B80(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
ApiStatus func_802197B8_465C48(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, gPlayerData.currentPartner);
|
||||
evt_set_variable(script, *args++, gPlayerData.partners[gPlayerData.currentPartner].level);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/464560", func_80219824_465CB4);
|
@ -1,5 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_mac/465D90", func_80219900_465D90);
|
943
src/battle/area_mac/actor/chan.c
Normal file
943
src/battle/area_mac/actor/chan.c
Normal file
@ -0,0 +1,943 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/chan.h"
|
||||
|
||||
#define NAMESPACE b_area_mac_chan
|
||||
|
||||
s32 N(defenseTable_80219D50)[] = {
|
||||
ELEMENT_NORMAL, 2,
|
||||
ELEMENT_FIRE, 99,
|
||||
ELEMENT_BLAST, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_80219D6C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_80219D78)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 30,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 50,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 50,
|
||||
STATUS_SHRINK, 50,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_80219EBC)[];
|
||||
extern EvtSource N(init_8021CCDC);
|
||||
|
||||
ActorPartDesc N(partsTable_80219E24)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 16 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80219EBC),
|
||||
.defenseTable = N(defenseTable_80219D50),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 263,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_HP_OFFSET_BELOW,
|
||||
.type = ACTOR_TYPE_CHAN,
|
||||
.level = 0,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80219E24)),
|
||||
.partsData = N(partsTable_80219E24),
|
||||
.script = N(init_8021CCDC),
|
||||
.statusTable = N(statusTable_80219D78),
|
||||
.escapeChance = 100,
|
||||
.airLiftChance = 0,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 0,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 0,
|
||||
.size = { 22, 18 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219E70)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_chan_Palette_00_Anim_A,
|
||||
STATUS_POISON, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_chan_Palette_00_Anim_B,
|
||||
STATUS_FEAR, NPC_ANIM_chan_Palette_00_Anim_B,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219EBC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_chan_Palette_00_Anim_A,
|
||||
STATUS_POISON, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_chan_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_chan_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_chan_Palette_00_Anim_B,
|
||||
STATUS_FEAR, NPC_ANIM_chan_Palette_00_Anim_B,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219F08)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_chan_Palette_00_Anim_2,
|
||||
STATUS_STONE, NPC_ANIM_chan_Palette_00_Anim_F,
|
||||
STATUS_SLEEP, NPC_ANIM_chan_Palette_00_Anim_10,
|
||||
STATUS_POISON, NPC_ANIM_chan_Palette_00_Anim_2,
|
||||
STATUS_STOP, NPC_ANIM_chan_Palette_00_Anim_F,
|
||||
STATUS_STATIC, NPC_ANIM_chan_Palette_00_Anim_2,
|
||||
STATUS_DIZZY, NPC_ANIM_chan_Palette_00_Anim_11,
|
||||
STATUS_FEAR, NPC_ANIM_chan_Palette_00_Anim_11,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
extern EvtSource N(idle_8021A11C);
|
||||
extern EvtSource N(takeTurn_8021B81C);
|
||||
extern EvtSource N(handleEvent_8021A560);
|
||||
extern EvtSource N(takeTurn_Chan);
|
||||
extern EvtSource N(handleEvent_8021AAB8);
|
||||
|
||||
EvtSource N(80219F4C) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021A11C)))
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(SetActorVar, -127, 8, 0)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 0, 10, 0)
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021B81C)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021A560)))
|
||||
EVT_CALL(SetPartEventBits, -127, 1, 4096, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetActorVar, -127, 8, 1)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, 0, 16)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -9)
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_Chan)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021AAB8)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219E70)))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
|
||||
EVT_CALL(SetPartEventBits, -127, 1, 4096, 1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021A11C) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021A12C) = {
|
||||
EVT_CALL(func_8027D32C, -127)
|
||||
EVT_CALL(SetActorVar, -127, 8, 2)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, 0, 16)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -9)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_Chan)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021AAB8)))
|
||||
EVT_CALL(SetActorVar, -127, 9, 1)
|
||||
EVT_CALL(SetDefenseTable, -127, 1, EVT_ADDR(N(defenseTable_80219D6C)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219F08)))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
|
||||
EVT_CALL(SetPartEventBits, -127, 1, 16, 0)
|
||||
EVT_CALL(SetPartEventBits, -127, 1, 4096, 1)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(1), 24)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 769, 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.80078125))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(GetIndexFromPos, -127, LW(10))
|
||||
EVT_MOD(LW(10), 4)
|
||||
EVT_CALL(SetGoalToIndex, -127, LW(10))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(10), LW(11), LW(12))
|
||||
EVT_CALL(SetHomePos, -127, LW(10), LW(11), LW(12))
|
||||
EVT_SET(LW(13), LW(10))
|
||||
EVT_SET(LW(14), LW(11))
|
||||
EVT_SET(LW(15), LW(12))
|
||||
EVT_SUB(LW(13), LW(0))
|
||||
EVT_SUB(LW(14), LW(1))
|
||||
EVT_SUB(LW(15), LW(2))
|
||||
EVT_DIV(LW(13), 2)
|
||||
EVT_DIV(LW(14), 2)
|
||||
EVT_DIV(LW(15), 2)
|
||||
EVT_ADD(LW(0), LW(13))
|
||||
EVT_ADD(LW(1), LW(14))
|
||||
EVT_ADD(LW(2), LW(15))
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
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(10), LW(11), LW(12))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021A560) = {
|
||||
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(9)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CASE_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(8021A12C))
|
||||
EVT_CASE_EQ(13)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(8021A12C))
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(8021A12C))
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(23)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CASE_EQ(25)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x200000)
|
||||
EVT_EXEC_WAIT(N(8021A12C))
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021AA1C) = {
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(3))
|
||||
EVT_IF_EQ(LW(3), 2)
|
||||
EVT_SET(LW(1), LW(2))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(intTable_8021AA6C)[] = {
|
||||
0x00000007, 0x0000000D, 0x00000011, 0x00000015, 0x00000017, 0x00000018, 0x00000017, 0x00000015,
|
||||
0x00000011, 0x0000000D, 0x00000007, 0x00000000, 0x00000004, 0x00000007, 0x00000006, 0x00000004,
|
||||
0x00000000, 0x00000002, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021AAB8) = {
|
||||
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(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_NE(LW(0), 2)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_14)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_NE(LW(0), 2)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_14)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(13)
|
||||
EVT_CALL(SetActorVar, -127, 8, 2)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, 0, 16)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -9)
|
||||
EVT_CALL(SetActorVar, -127, 9, 1)
|
||||
EVT_CALL(SetDefenseTable, -127, 1, EVT_ADDR(N(defenseTable_80219D6C)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219F08)))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 12, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_THREAD
|
||||
EVT_USE_BUF(EVT_ADDR(N(intTable_8021AA6C)))
|
||||
EVT_LOOP(19)
|
||||
EVT_BUF_READ1(LW(0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(23)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_D)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(25)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_D)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(27)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(3))
|
||||
EVT_IF_FLAG(LW(3), 0x80000)
|
||||
EVT_ADD(LW(1), 9)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(1), 24)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, 0x1A, 0, LW(0), LW(1), LW(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_EXEC_WAIT(N(8021AA1C))
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_6)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(31)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_D)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8021B81C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorVar, -127, 8, 1)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, 0, 16)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -9)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_Chan)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021AAB8)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219E70)))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_HP_OFFSET_BELOW, 0)
|
||||
EVT_CALL(SetPartEventBits, -127, 1, 4096, 1)
|
||||
EVT_CALL(GetIndexFromPos, -127, LW(0))
|
||||
EVT_MOD(LW(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, -127, LW(0))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetHomePos, -127, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(4), LW(2))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(4), LW(2))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSounds, -127, 2, 769, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(UseBattleCamPreset, 5)
|
||||
EVT_CALL(SetBattleCamZoom, 430)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 20)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 3, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(SetPartYaw, -127, 1, 180)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(1), 24)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.80078125))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(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), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_0)
|
||||
EVT_END_THREAD
|
||||
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_WAIT_FRAMES(8)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_1)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(1), 24)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.80078125))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 3, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_0)
|
||||
EVT_END_THREAD
|
||||
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_WAIT_FRAMES(8)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_1)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_Chan) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_CALL(GetActorVar, -127, 9, LW(0))
|
||||
EVT_SUB(LW(0), 1)
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetActorVar, -127, 9, LW(0))
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_chan_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(0x8029BBB4)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorVar, -127, 8, 1)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, 0, 16)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -9)
|
||||
EVT_CALL(SetDefenseTable, -127, 1, EVT_ADDR(N(defenseTable_80219D50)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219E70)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8021A11C)))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_9)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2021)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetActorSounds, -127, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20D3)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 2, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_IF_GT(LW(0), LW(3))
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseBattleCamPreset, 1)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 200)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_D)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 2, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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.80078125))
|
||||
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_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_chan_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
|
||||
};
|
||||
|
||||
extern EvtSource N(handleEvent_8021D0CC);
|
||||
extern EvtSource N(nextTurn_8021CD7C);
|
||||
|
||||
EvtSource N(init_8021CCDC) = {
|
||||
EVT_EXEC_WAIT(N(80219F4C))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8021D0CC)))
|
||||
EVT_CALL(BindNextTurn, -127, EVT_ADDR(N(nextTurn_8021CD7C)))
|
||||
EVT_CALL(SetActorVar, -127, 0, 0)
|
||||
EVT_CALL(SetActorVar, -127, 1, 0)
|
||||
EVT_CALL(SetActorVar, -127, 2, 0)
|
||||
EVT_CALL(SetBattleFlagBits, 8388608, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(nextTurn_8021CD7C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(10)
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131103, -127, 1, 10682372, 10682371)
|
||||
EVT_CALL(SetActorVar, -127, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x37100A)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(10), NPC_ANIM_chan_Palette_00_Anim_4)
|
||||
EVT_SET_CONST(LW(11), NPC_ANIM_chan_Palette_00_Anim_3)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_SET_CONST(LW(10), NPC_ANIM_chan_Palette_00_Anim_7)
|
||||
EVT_SET_CONST(LW(11), NPC_ANIM_chan_Palette_00_Anim_2)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorHP, -127, LW(0))
|
||||
EVT_CALL(GetEnemyMaxHP, -127, LW(1))
|
||||
EVT_DIV(LW(1), 2)
|
||||
EVT_IF_LE(LW(0), LW(1))
|
||||
EVT_CALL(GetActorVar, -127, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131105, -127, 1, LW(10), LW(11))
|
||||
EVT_CALL(SetActorVar, -127, 2, 1)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetPlayerHP, LW(0))
|
||||
EVT_IF_LE(LW(0), 5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131106, -127, 1, LW(10), LW(11))
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021D0CC) = {
|
||||
EVT_EXEC_WAIT(N(handleEvent_8021AAB8))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(13)
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x20)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x3F1000)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_CALL(GetMenuSelection, LW(0), LW(1), LW(2))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(1)
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_CALL(GetActorVar, -127, 1, LW(0))
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131104, -127, 1, 10682375, 10682370)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetActorVar, -127, 1, LW(0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
4157
src/battle/area_mac/actor/lee.c
Normal file
4157
src/battle/area_mac/actor/lee.c
Normal file
File diff suppressed because it is too large
Load Diff
406
src/battle/area_mac/actor/master1.c
Normal file
406
src/battle/area_mac/actor/master1.c
Normal file
@ -0,0 +1,406 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/the_master.h"
|
||||
|
||||
#define NAMESPACE b_area_mac_master1
|
||||
|
||||
s32 N(idleAnimations_8022A260)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_the_master_Palette_00_Anim_5,
|
||||
STATUS_STONE, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_the_master_Palette_00_Anim_1C,
|
||||
STATUS_POISON, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_STOP, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_PARALYZE, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1E,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1E,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8022A2AC)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8022A2B8)[] = {
|
||||
STATUS_NORMAL, 50,
|
||||
STATUS_DEFAULT, 50,
|
||||
STATUS_SLEEP, 40,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 40,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 50,
|
||||
STATUS_SHRINK, 60,
|
||||
STATUS_STOP, 70,
|
||||
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, -1,
|
||||
STATUS_PARALYZE_TURN_MOD, -1,
|
||||
STATUS_SHRINK_TURN_MOD, -1,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartDesc N(partsTable_8022A364)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -5, 28 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8022A260),
|
||||
.defenseTable = N(defenseTable_8022A2AC),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 761,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_8022A3B0);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_THE_MASTER_1,
|
||||
.level = 0,
|
||||
.maxHP = 50,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8022A364)),
|
||||
.partsData = N(partsTable_8022A364),
|
||||
.script = N(init_8022A3B0),
|
||||
.statusTable = N(statusTable_8022A2B8),
|
||||
.escapeChance = 100,
|
||||
.airLiftChance = 0,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 0,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 0,
|
||||
.size = { 30, 35 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 30 },
|
||||
.statusMessageOffset = { 10, 30 },
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8022AA54);
|
||||
extern EvtSource N(idle_8022A494);
|
||||
extern EvtSource N(handleEvent_8022B2CC);
|
||||
extern EvtSource N(nextTurn_8022B06C);
|
||||
|
||||
EvtSource N(init_8022A3B0) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8022AA54)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8022A494)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8022B2CC)))
|
||||
EVT_CALL(BindNextTurn, -127, EVT_ADDR(N(nextTurn_8022B06C)))
|
||||
EVT_CALL(SetActorVar, -127, 0, 0)
|
||||
EVT_CALL(SetActorVar, -127, 1, 0)
|
||||
EVT_CALL(SetActorVar, -127, 2, 0)
|
||||
EVT_CALL(SetActorVar, -127, 3, 2)
|
||||
EVT_SET(GSWF(102), 1)
|
||||
EVT_CALL(SetBattleFlagBits, 8388608, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8022A494) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8022A4A4) = {
|
||||
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(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_1A)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_1B)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_1A)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_1B)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_5)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_17)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8022AA54) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.6005859375))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_11)
|
||||
EVT_WAIT_FRAMES(7)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_12)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 8, TRUE)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 0, 16)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 10, TRUE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
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_the_master_Palette_00_Anim_2)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
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, 0x3ED)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 6, 48)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 10, TRUE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_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_the_master_Palette_00_Anim_7)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_2)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(nextTurn_8022B06C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(10)
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131118, -127, 1, 10616841, 10616837)
|
||||
EVT_CALL(SetActorVar, -127, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x351000)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorHP, -127, LW(0))
|
||||
EVT_CALL(GetEnemyMaxHP, -127, LW(1))
|
||||
EVT_DIV(LW(1), 2)
|
||||
EVT_IF_LE(LW(0), LW(1))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131121, -127, 1, 10616841, 10616837)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetPlayerHP, LW(0))
|
||||
EVT_IF_LE(LW(0), 5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131122, -127, 1, 10616841, 10616837)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8022B2CC) = {
|
||||
EVT_EXEC_WAIT(N(8022A4A4))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x351000)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x240)
|
||||
EVT_CALL(GetLastDamage, -127, LW(0))
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetActorVar, -127, 2, 1)
|
||||
EVT_CALL(AddActorVar, -127, 3, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_CASE_OR_EQ(14)
|
||||
EVT_CASE_OR_EQ(11)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_CALL(GetActorVar, -127, 2, LW(10))
|
||||
EVT_CALL(GetActorVar, -127, 3, LW(11))
|
||||
EVT_CALL(SetActorVar, -127, 2, 0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x3F1000)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_CALL(GetMenuSelection, LW(0), LW(1), LW(2))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(1)
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_IF_EQ(LW(10), 1)
|
||||
EVT_IF_GT(LW(11), 2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131120, -127, 1, 10616841, 10616837)
|
||||
EVT_CALL(SetActorVar, -127, 3, 0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131119, -127, 1, 10616841, 10616837)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
631
src/battle/area_mac/actor/master2.c
Normal file
631
src/battle/area_mac/actor/master2.c
Normal file
@ -0,0 +1,631 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/the_master.h"
|
||||
|
||||
#define NAMESPACE b_area_mac_master2
|
||||
|
||||
s32 N(idleAnimations_8022B640)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_the_master_Palette_00_Anim_5,
|
||||
STATUS_STONE, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_the_master_Palette_00_Anim_1C,
|
||||
STATUS_POISON, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_STOP, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_PARALYZE, NPC_ANIM_the_master_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1E,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1E,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8022B68C)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_the_master_Palette_00_Anim_6,
|
||||
STATUS_STONE, NPC_ANIM_the_master_Palette_00_Anim_1,
|
||||
STATUS_SLEEP, NPC_ANIM_the_master_Palette_00_Anim_1D,
|
||||
STATUS_POISON, NPC_ANIM_the_master_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_the_master_Palette_00_Anim_1,
|
||||
STATUS_STATIC, NPC_ANIM_the_master_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_the_master_Palette_00_Anim_1,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1F,
|
||||
STATUS_DIZZY, NPC_ANIM_the_master_Palette_00_Anim_1F,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8022B6D8)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8022B6E4)[] = {
|
||||
STATUS_NORMAL, 50,
|
||||
STATUS_DEFAULT, 50,
|
||||
STATUS_SLEEP, 30,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 30,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 30,
|
||||
STATUS_SHRINK, 40,
|
||||
STATUS_STOP, 50,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -2,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, -1,
|
||||
STATUS_PARALYZE_TURN_MOD, -1,
|
||||
STATUS_SHRINK_TURN_MOD, -1,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartDesc N(partsTable_8022B790)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -5, 28 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8022B640),
|
||||
.defenseTable = N(defenseTable_8022B6D8),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 761,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_8022B7DC);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_THE_MASTER_2,
|
||||
.level = 0,
|
||||
.maxHP = 75,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8022B790)),
|
||||
.partsData = N(partsTable_8022B790),
|
||||
.script = N(init_8022B7DC),
|
||||
.statusTable = N(statusTable_8022B6E4),
|
||||
.escapeChance = 100,
|
||||
.airLiftChance = 0,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 0,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 75,
|
||||
.coinReward = 0,
|
||||
.size = { 30, 35 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 30 },
|
||||
.statusMessageOffset = { 10, 30 },
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8022CF48);
|
||||
extern EvtSource N(idle_8022B8B0);
|
||||
extern EvtSource N(handleEvent_8022D634);
|
||||
extern EvtSource N(nextTurn_8022CFFC);
|
||||
|
||||
EvtSource N(init_8022B7DC) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8022CF48)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_8022B8B0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_8022D634)))
|
||||
EVT_CALL(BindNextTurn, -127, EVT_ADDR(N(nextTurn_8022CFFC)))
|
||||
EVT_CALL(SetActorVar, -127, 0, 0)
|
||||
EVT_CALL(SetActorVar, -127, 1, 0)
|
||||
EVT_CALL(SetActorVar, -127, 2, 0)
|
||||
EVT_CALL(SetActorVar, -127, 3, 2)
|
||||
EVT_CALL(SetBattleFlagBits, 8388608, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8022B8B0) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8022B8C0) = {
|
||||
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(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_1A)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_1B)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_1A)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_1B)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_18)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_6)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_18)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_18)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_18)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_the_master_Palette_00_Anim_16)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(singleStrike2) = {
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.80078125))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BD)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BD)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_E)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_F)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BC)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 0, 16)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(EnableActorBlur, -127, 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(EnableActorBlur, -127, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
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_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableActorBlur, -127, 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE)
|
||||
EVT_CALL(EnableActorBlur, -127, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3ED)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 8, 48)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 20, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(0), 36)
|
||||
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), 50)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2001953125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_21)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BA)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_23)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_21)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3B4)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_23)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(doubleStrike2) = {
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 8)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(SetBattleCamZoom, 200)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 13)
|
||||
EVT_CALL(MoveBattleCamOver, 60)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_15)
|
||||
EVT_WAIT_FRAMES(40)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(UseBattleCamPreset, 7)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3B9)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 0, 16)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(EnableActorBlur, -127, 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_13)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(EnableActorBlur, -127, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
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_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableActorBlur, -127, 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_13)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE)
|
||||
EVT_CALL(EnableActorBlur, -127, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(1.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(4.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(3.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(2.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(1.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.5))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3ED)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 5, 16)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JUMP_3E2)
|
||||
EVT_CALL(EnableActorBlur, -127, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_14)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.900390625))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(EnableActorBlur, -127, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.5))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(1.5))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.5))
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.2001953125))
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3ED)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 6, 32)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BB)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 10, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(0), 36)
|
||||
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), 50)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_21)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BA)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_23)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_21)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x3B4)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_23)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.80078125))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_3)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8022CF48) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(RandInt, 100, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_LT(20)
|
||||
EVT_EXEC_WAIT(N(doubleStrike2))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_EXEC_WAIT(N(singleStrike2))
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(nextTurn_8022CFFC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(10)
|
||||
EVT_CALL(GetActorVar, -127, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 13)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(ActorSpeak, 131118, -127, 1, 10616841, 10616837)
|
||||
EVT_CALL(SetActorVar, -127, 0, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_D)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_C)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20B8)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_CALL(PlayEffect, 0x13, 1, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_0)
|
||||
EVT_LOOP(15)
|
||||
EVT_ADD(LW(0), 24)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_0)
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), 18)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 3)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(PlayEffect, 0x1, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_0)
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), 36)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_1)
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), 18)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8022B68C)))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_the_master_Palette_00_Anim_8)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131123, -127, 1, 10616842, 10616838)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x351000)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorHP, -127, LW(0))
|
||||
EVT_CALL(GetEnemyMaxHP, -127, LW(1))
|
||||
EVT_DIV(LW(1), 2)
|
||||
EVT_IF_LE(LW(0), LW(1))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131126, -127, 1, 10616842, 10616838)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetPlayerHP, LW(0))
|
||||
EVT_IF_LE(LW(0), 5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131127, -127, 1, 10616842, 10616838)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8022D634) = {
|
||||
EVT_EXEC_WAIT(N(8022B8C0))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x351000)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x240)
|
||||
EVT_CALL(GetLastDamage, -127, LW(0))
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetActorVar, -127, 2, 1)
|
||||
EVT_CALL(AddActorVar, -127, 3, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_CASE_OR_EQ(14)
|
||||
EVT_CASE_OR_EQ(11)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_CALL(GetActorVar, -127, 2, LW(10))
|
||||
EVT_CALL(GetActorVar, -127, 3, LW(11))
|
||||
EVT_CALL(SetActorVar, -127, 2, 0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x3F1000)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_CALL(GetMenuSelection, LW(0), LW(1), LW(2))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(1)
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_IF_EQ(LW(10), 1)
|
||||
EVT_IF_GT(LW(11), 2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131125, -127, 1, 10616842, 10616838)
|
||||
EVT_CALL(SetActorVar, -127, 3, 0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(ActorSpeak, 131124, -127, 1, 10616842, 10616838)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
1014
src/battle/area_mac/actor/master3.c
Normal file
1014
src/battle/area_mac/actor/master3.c
Normal file
File diff suppressed because it is too large
Load Diff
50
src/battle/area_mac/area.c
Normal file
50
src/battle/area_mac/area.c
Normal file
@ -0,0 +1,50 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "message_ids.h"
|
||||
|
||||
#define NAMESPACE b_area_mac
|
||||
|
||||
extern ActorDesc N(chan);
|
||||
extern ActorDesc N(lee);
|
||||
extern ActorDesc N(master1);
|
||||
extern ActorDesc N(master2);
|
||||
extern ActorDesc N(master3);
|
||||
|
||||
extern Stage N(mac_01);
|
||||
extern Stage N(mac_02);
|
||||
|
||||
Formation N(formation_00) = {
|
||||
{ .actor = &N(chan), .home = { .index = 2 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(lee), .home = { .index = 2 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(master1), .home = { .index = 2 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_03) = {
|
||||
{ .actor = &N(master2), .home = { .index = 2 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_04) = {
|
||||
{ .actor = &N(master3), .home = { .index = 2 }, .priority = 10 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("チェン", N(formation_00), &N(mac_02)),
|
||||
BATTLE("リー", N(formation_01), &N(mac_02)),
|
||||
BATTLE("シショー その1", N(formation_02), &N(mac_02)),
|
||||
BATTLE("シショー その2", N(formation_03), &N(mac_02)),
|
||||
BATTLE("シショー その3", N(formation_04), &N(mac_02)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "mac_01", &N(mac_01) },
|
||||
{ "mac_02", &N(mac_02) },
|
||||
{},
|
||||
};
|
292
src/battle/area_mac/stage/mac_01.c
Normal file
292
src/battle/area_mac/stage/mac_01.c
Normal file
@ -0,0 +1,292 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_mac_mac_01
|
||||
|
||||
ApiStatus func_80219900_465D90(Evt*, s32);
|
||||
INCLUDE_ASM(s32, "battle/area_mac/465D90", func_80219900_465D90);
|
||||
|
||||
EvtSource N(80231770) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(func_80219900_465D90, 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_80219900_465D90, 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_80219900_465D90, 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_80219900_465D90, 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_80219900_465D90, 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_80219900_465D90, 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
|
||||
};
|
||||
|
||||
EvtSource N(80231E00) = {
|
||||
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_802321A4)[] = {
|
||||
0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFB, 0xFFFFFFF8,
|
||||
0xFFFFFFF8, 0xFFFFFFF9, 0xFFFFFFFA, 0xFFFFFFFC, 0xFFFFFFFE, 0xFFFFFFFF, 0x00000000, 0x000000FF,
|
||||
};
|
||||
|
||||
EvtSource N(802321E4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(11), LW(1))
|
||||
EVT_SET(LW(5), 5)
|
||||
EVT_USE_BUF(EVT_ADDR(N(intTable_802321A4)))
|
||||
EVT_LABEL(0)
|
||||
EVT_BUF_READ1(LW(1))
|
||||
EVT_IF_EQ(LW(1), 255)
|
||||
EVT_USE_BUF(EVT_ADDR(N(intTable_802321A4)))
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(80232450) = {
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(beforeBattle_802327F4) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 44)
|
||||
EVT_EXEC(N(80231E00))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 47)
|
||||
EVT_EXEC(N(80231E00))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 46)
|
||||
EVT_EXEC(N(80231E00))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 45)
|
||||
EVT_EXEC(N(80231E00))
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LW(0), 40)
|
||||
EVT_EXEC(N(80231770))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_802328F0) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "mac_tex",
|
||||
.shape = "mac_bt01_shape",
|
||||
.hit = "mac_bt01_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_802327F4),
|
||||
.postBattle = N(afterBattle_802328F0),
|
||||
};
|
27
src/battle/area_mac/stage/mac_02.c
Normal file
27
src/battle/area_mac/stage/mac_02.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_mac_mac_02
|
||||
|
||||
EvtSource N(beforeBattle_80232930) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_CALL(func_802536A8, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8023297C) = {
|
||||
EVT_CALL(func_802536A8, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "mac_tex",
|
||||
.shape = "mac_bt02_shape",
|
||||
.hit = "mac_bt02_hit",
|
||||
.preBattle = N(beforeBattle_80232930),
|
||||
.postBattle = N(afterBattle_8023297C),
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#include "common/BattleAreaAngleStuff.inc.c"
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
#define NAMESPACE dup_b_area_nok
|
||||
#include "common/BattleAreaAngleStuff.inc.c"
|
@ -1,9 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#define NAMESPACE dup2_b_area_nok
|
||||
#include "common/BattleAreaAngleStuff.inc.c"
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
@ -1,5 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#include "common/UnkBattleFunc2.inc.c"
|
@ -1,11 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#define NAMESPACE dup_b_area_nok
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#define NAMESPACE dup_b_area_nok
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_nok
|
@ -1,21 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#define NAMESPACE dup2_b_area_nok
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
#define NAMESPACE dup2_b_area_nok
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_nok/48DCF0", func_80218C74_48DE14);
|
||||
|
||||
ApiStatus func_80218DF8_48DF98(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = args++;
|
||||
|
||||
evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
446
src/battle/area_nok/actor/fuzzy.c
Normal file
446
src/battle/area_nok/actor/fuzzy.c
Normal file
@ -0,0 +1,446 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/fuzzy.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_fuzzy
|
||||
|
||||
s32 N(defenseTable_80222050)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8022205C)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 95,
|
||||
STATUS_POISON, 90,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 90,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 70,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_80222154)[];
|
||||
|
||||
ActorPartDesc N(partsTable_80222108)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80222154),
|
||||
.defenseTable = N(defenseTable_80222050),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_802221A0);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_FUZZY,
|
||||
.level = 6,
|
||||
.maxHP = 3,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80222108)),
|
||||
.partsData = N(partsTable_80222108),
|
||||
.script = N(init_802221A0),
|
||||
.statusTable = N(statusTable_8022205C),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 95,
|
||||
.baseStatusChance = 95,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 33, 28 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80222154)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_fuzzy_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_fuzzy_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_fuzzy_Palette_00_Anim_E,
|
||||
STATUS_POISON, NPC_ANIM_fuzzy_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_fuzzy_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_fuzzy_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_fuzzy_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_fuzzy_Palette_00_Anim_F,
|
||||
STATUS_FEAR, NPC_ANIM_fuzzy_Palette_00_Anim_F,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_80222860);
|
||||
extern EvtSource N(idle_802221EC);
|
||||
extern EvtSource N(handleEvent_802221FC);
|
||||
|
||||
EvtSource N(init_802221A0) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_80222860)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802221EC)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_802221FC)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_802221EC) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_802221FC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x20)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(0x8029C0A4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x20)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_fuzzy_Palette_00_Anim_9)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_fuzzy_Palette_00_Anim_3)
|
||||
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
|
||||
};
|
||||
|
||||
#include "common/UnkBattleFunc2.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_80222860) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_00_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.80078125))
|
||||
EVT_EXEC_WAIT(0x8029C12C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_00_Anim_1)
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_00_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, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
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_00_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_00_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), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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_00_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.80078125))
|
||||
EVT_EXEC_WAIT(0x8029C12C)
|
||||
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(7)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), 0x2000)
|
||||
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_00_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, 32)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
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_00_Anim_7)
|
||||
EVT_WAIT_FRAMES(21)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_00_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.900390625), EVT_FLOAT(1.2001953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.80078125), EVT_FLOAT(1.30078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7001953125), EVT_FLOAT(1.400390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7001953125), EVT_FLOAT(1.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6005859375), EVT_FLOAT(1.6005859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, 32)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_Palette_00_Anim_1)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(GetLastDamage, 0, 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, 0x40, 0, LW(0), LW(1), LW(2), LW(3), 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(GetActorHP, -127, LW(0))
|
||||
EVT_ADD(LW(0), LW(3))
|
||||
EVT_CALL(SetEnemyHP, -127, LW(0))
|
||||
EVT_END_IF
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.6005859375), EVT_FLOAT(0.6005859375), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorRotationOffset, -127, 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.7001953125), 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.7001953125), 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.7001953125), EVT_FLOAT(1.400390625), 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.7001953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2001953125), 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.80078125))
|
||||
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.400390625), EVT_FLOAT(0.2001953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2001953125), 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, -127, 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_00_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.80078125))
|
||||
EVT_EXEC_WAIT(0x8029C12C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_fuzzy_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
|
||||
};
|
5
src/battle/area_nok/actor/goomba.c
Normal file
5
src/battle/area_nok/actor/goomba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_goomba
|
||||
|
||||
#include "battle/common/actor/goomba.inc.c"
|
1171
src/battle/area_nok/actor/kent_c_koopa.c
Normal file
1171
src/battle/area_nok/actor/kent_c_koopa.c
Normal file
File diff suppressed because it is too large
Load Diff
612
src/battle/area_nok/actor/koopa_troopa.c
Normal file
612
src/battle/area_nok/actor/koopa_troopa.c
Normal file
@ -0,0 +1,612 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/koopa_troopa.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_koopa_troopa
|
||||
|
||||
s32 N(defenseTable_8021FEE0)[] = {
|
||||
ELEMENT_NORMAL, 1,
|
||||
ELEMENT_HAMMER, 1,
|
||||
ELEMENT_JUMP, 1,
|
||||
ELEMENT_WATER, 1,
|
||||
ELEMENT_BLAST, 1,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8021FF0C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021FF18)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 90,
|
||||
STATUS_POISON, 60,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 90,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 90,
|
||||
STATUS_SHRINK, 90,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_80220010)[];
|
||||
|
||||
ActorPartDesc N(partsTable_8021FFC4)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -2, 36 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80220010),
|
||||
.defenseTable = N(defenseTable_8021FEE0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 249,
|
||||
},
|
||||
};
|
||||
|
||||
extern EvtSource N(init_802200F4);
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_KOOPA_TROOPA,
|
||||
.level = 6,
|
||||
.maxHP = 4,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021FFC4)),
|
||||
.partsData = N(partsTable_8021FFC4),
|
||||
.script = N(init_802200F4),
|
||||
.statusTable = N(statusTable_8021FF18),
|
||||
.escapeChance = 70,
|
||||
.airLiftChance = 90,
|
||||
.spookChance = 90,
|
||||
.baseStatusChance = 90,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 28, 36 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -15, 32 },
|
||||
.statusMessageOffset = { 5, 32 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80220010)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_koopa_troopa_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_koopa_troopa_Palette_01_Anim_11,
|
||||
STATUS_POISON, NPC_ANIM_koopa_troopa_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_koopa_troopa_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_koopa_troopa_Palette_01_Anim_13,
|
||||
STATUS_FEAR, NPC_ANIM_koopa_troopa_Palette_01_Anim_13,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8022005C)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_koopa_troopa_Palette_01_Anim_3,
|
||||
STATUS_STONE, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_koopa_troopa_Palette_01_Anim_11,
|
||||
STATUS_POISON, NPC_ANIM_koopa_troopa_Palette_01_Anim_3,
|
||||
STATUS_STOP, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_koopa_troopa_Palette_01_Anim_3,
|
||||
STATUS_PARALYZE, NPC_ANIM_koopa_troopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_koopa_troopa_Palette_01_Anim_13,
|
||||
STATUS_FEAR, NPC_ANIM_koopa_troopa_Palette_01_Anim_13,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_802200A8)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_koopa_troopa_Palette_01_Anim_F,
|
||||
STATUS_STONE, NPC_ANIM_koopa_troopa_Palette_01_Anim_10,
|
||||
STATUS_SLEEP, NPC_ANIM_koopa_troopa_Palette_01_Anim_12,
|
||||
STATUS_POISON, NPC_ANIM_koopa_troopa_Palette_01_Anim_F,
|
||||
STATUS_STOP, NPC_ANIM_koopa_troopa_Palette_01_Anim_10,
|
||||
STATUS_STATIC, NPC_ANIM_koopa_troopa_Palette_01_Anim_F,
|
||||
STATUS_PARALYZE, NPC_ANIM_koopa_troopa_Palette_01_Anim_10,
|
||||
STATUS_DIZZY, NPC_ANIM_koopa_troopa_Palette_01_Anim_14,
|
||||
STATUS_FEAR, NPC_ANIM_koopa_troopa_Palette_01_Anim_14,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8022131C);
|
||||
extern EvtSource N(idle_802202B0);
|
||||
extern EvtSource N(handleEvent_80220798);
|
||||
|
||||
EvtSource N(init_802200F4) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8022131C)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_802202B0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80220798)))
|
||||
EVT_CALL(SetActorVar, -127, 8, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
EvtSource N(80220158) = {
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_IF_FLAG(LW(1), 0x41000)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, -5, 15)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, 0, 0)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetTargetOffset, -127, 1, -4, 32)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -4)
|
||||
EVT_CALL(N(UnkBattleFunc1), -15, 32, 5, 32)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetTargetOffset, -127, 1, -5, 15)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, 0, 0)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_802202B0) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(RandInt, 80, LW(10))
|
||||
EVT_ADD(LW(10), 80)
|
||||
EVT_LOOP(LW(10))
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_EXEC_WAIT(N(80220158))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8022005C)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80220010)))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802200A8)))
|
||||
EVT_END_SWITCH
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_EXEC_WAIT(N(80220158))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_8022005C)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80220010)))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802200A8)))
|
||||
EVT_END_SWITCH
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(3)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_EXEC_WAIT(N(80220158))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(3)
|
||||
EVT_END_IF
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(3)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(D_80220740)[] = {
|
||||
0x00000009, 0x00000010, 0x00000016, 0x0000001A, 0x0000001E, 0x00000020, 0x00000021, 0x00000020,
|
||||
0x0000001E, 0x0000001A, 0x00000016, 0x00000010, 0x00000009, 0x00000000, 0x00000004, 0x00000006,
|
||||
0x00000007, 0x00000006, 0x00000004, 0x00000000, 0x00000002, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_80220798) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_koopa_troopa_Palette_01_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_koopa_troopa_Palette_01_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(13)
|
||||
EVT_CALL(SetActorVar, -127, 8, 1)
|
||||
EVT_CALL(SetActorVar, -127, 9, 2)
|
||||
EVT_CALL(SetDefenseTable, -127, 1, EVT_ADDR(N(defenseTable_8021FF0C)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802200A8)))
|
||||
EVT_CALL(SetTargetOffset, -127, 1, -5, 15)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, 0, 0)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 12, 0)
|
||||
EVT_CHILD_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_USE_BUF(EVT_ADDR(N(D_80220740)))
|
||||
EVT_LOOP(22)
|
||||
EVT_BUF_READ1(LW(0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x35D000)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_8)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetHomePos, -127, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_4)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_koopa_troopa_Palette_01_Anim_B)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_17)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_17)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(31)
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8022131C) = {
|
||||
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), 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_6)
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetActorVar, -127, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(GetActorVar, -127, 9, LW(0))
|
||||
EVT_SUB(LW(0), 1)
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetActorVar, -127, 9, LW(0))
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(3.0))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(3.0))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JUMP_3E2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_F)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 12, 0)
|
||||
EVT_CHILD_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), 15)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20BA)
|
||||
EVT_CALL(SetActorRotationOffset, -127, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_1)
|
||||
EVT_CALL(SetActorVar, -127, 8, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80220010)))
|
||||
EVT_CALL(SetDefenseTable, -127, 1, EVT_ADDR(N(defenseTable_8021FEE0)))
|
||||
EVT_CALL(SetTargetOffset, -127, 1, -4, 32)
|
||||
EVT_CALL(func_8027D4C8, -127, 1, -1, -4)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_400, 0)
|
||||
EVT_CALL(ResetActorSounds, -127, 2)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_7)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 4)
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(PlayEffect, 0x1D, 1, LW(0), LW(1), LW(2), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2021)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_6)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x20D3)
|
||||
EVT_CALL(SetActorSounds, -127, 0, 0, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(UseBattleCamPreset, 5)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 20)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_8)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
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_koopa_troopa_Palette_01_Anim_15)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_17)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_SUB(LW(1), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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_koopa_troopa_Palette_01_Anim_17)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_1)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetPartYaw, -127, 1, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 1, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
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.80078125))
|
||||
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_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_Palette_01_Anim_8)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_koopa_troopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_koopa_troopa_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
|
||||
};
|
5
src/battle/area_nok/actor/paragoomba.c
Normal file
5
src/battle/area_nok/actor/paragoomba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_paragoomba
|
||||
|
||||
#include "battle/common/actor/paragoomba.inc.c"
|
1165
src/battle/area_nok/actor/paratroopa.c
Normal file
1165
src/battle/area_nok/actor/paratroopa.c
Normal file
File diff suppressed because it is too large
Load Diff
5
src/battle/area_nok/actor/spiked_goomba.c
Normal file
5
src/battle/area_nok/actor/spiked_goomba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_spiked_goomba
|
||||
|
||||
#include "battle/common/actor/spiked_goomba.inc.c"
|
194
src/battle/area_nok/area.c
Normal file
194
src/battle/area_nok/area.c
Normal file
@ -0,0 +1,194 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_nok
|
||||
|
||||
extern ActorDesc N(goomba);
|
||||
extern ActorDesc N(spiked_goomba);
|
||||
extern ActorDesc N(paragoomba);
|
||||
extern ActorDesc N(koopa_troopa);
|
||||
extern ActorDesc N(paratroopa);
|
||||
extern ActorDesc N(fuzzy);
|
||||
extern ActorDesc N(kent_c_koopa);
|
||||
|
||||
extern Stage N(nok_01);
|
||||
extern Stage N(nok_02);
|
||||
extern Stage N(nok_03);
|
||||
extern Stage N(nok_04);
|
||||
|
||||
Formation N(formation_00) = {
|
||||
{ .actor = &N(goomba), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(goomba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(goomba), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(paragoomba), .home = { .index = 5 }, .priority = 10 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 6 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_03) = {
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 6 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_04) = {
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_05) = {
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(goomba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_06) = {
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_07) = {
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_08) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(goomba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_09) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_0A) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0B) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_0C) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0D) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0E) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 5 }, .priority = 9 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 6 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0F) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 6 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_10) = {
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(paragoomba), .home = { .index = 7 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_11) = {
|
||||
{ .actor = &N(paratroopa), .home = { .index = 5 }, .priority = 10 },
|
||||
{ .actor = &N(paratroopa), .home = { .index = 6 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_12) = {
|
||||
{ .actor = &N(paratroopa), .home = { .index = 5 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_13) = {
|
||||
{ .actor = &N(paratroopa), .home = { .index = 4 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_14) = {
|
||||
{ .actor = &N(paratroopa), .home = { .index = 4 }, .priority = 10 },
|
||||
{ .actor = &N(koopa_troopa), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(spiked_goomba), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_15) = {
|
||||
{ .actor = &N(fuzzy), .home = { .index = 1 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_16) = {
|
||||
{ .actor = &N(fuzzy), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(fuzzy), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_17) = {
|
||||
{ .actor = &N(fuzzy), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(fuzzy), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(fuzzy), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(fuzzy), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_18) = {
|
||||
{ .actor = &N(kent_c_koopa), .home = { .index = 1 }, .priority = 10 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("クリボーx2", N(formation_00), &N(nok_02)),
|
||||
BATTLE("クリボー,トゲクリボー", N(formation_01), &N(nok_02)),
|
||||
BATTLE("パタクリボーx2", N(formation_02), &N(nok_02)),
|
||||
BATTLE("トゲクリボー、パタクリボー", N(formation_03), &N(nok_02)),
|
||||
BATTLE("トゲクリボーx2", N(formation_04), &N(nok_02)),
|
||||
BATTLE("トゲクリボー、クリボーx2", N(formation_05), &N(nok_02)),
|
||||
BATTLE("トゲクリボーx3", N(formation_06), &N(nok_02)),
|
||||
BATTLE("トゲクリボーx4", N(formation_07), &N(nok_02)),
|
||||
BATTLE("ノコノコ、クリボー", N(formation_08), &N(nok_02)),
|
||||
BATTLE("ノコノコx2", N(formation_09), &N(nok_02)),
|
||||
BATTLE("ノコノコx3", N(formation_0A), &N(nok_02)),
|
||||
BATTLE("ノコノコ、トゲクリボー", N(formation_0B), &N(nok_02)),
|
||||
BATTLE("ノコノコx2、トゲクリ", N(formation_0C), &N(nok_02)),
|
||||
BATTLE("ノコノコ、トゲクリボーx2", N(formation_0D), &N(nok_02)),
|
||||
BATTLE("ノコノコ、パタクリボーx2", N(formation_0E), &N(nok_02)),
|
||||
BATTLE("ノコノコ、トゲクリボー,パタクリボー", N(formation_0F), &N(nok_02)),
|
||||
BATTLE("ノコノコx2、トゲクリボー,パタクリボー", N(formation_10), &N(nok_02)),
|
||||
BATTLE("パタパタx2", N(formation_11), &N(nok_02)),
|
||||
BATTLE("パタパタ、ノコノコ", N(formation_12), &N(nok_02)),
|
||||
BATTLE("パタパタ、ノコノコ、トゲクリボー", N(formation_13), &N(nok_02)),
|
||||
BATTLE("パタパタ、ノコノコ、トゲクリボーx2", N(formation_14), &N(nok_02)),
|
||||
BATTLE("チョロボン", N(formation_15), &N(nok_02)),
|
||||
BATTLE("チョロボンx2", N(formation_16), &N(nok_02)),
|
||||
BATTLE("チョロボンx4", N(formation_17), &N(nok_02)),
|
||||
BATTLE("ゼニノコー", N(formation_18), &N(nok_02)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "nok_01", &N(nok_01) },
|
||||
{ "nok_02", &N(nok_02) },
|
||||
{ "nok_03", &N(nok_03) },
|
||||
{ "nok_04", &N(nok_04) },
|
||||
{},
|
||||
};
|
60
src/battle/area_nok/stage/nok_01.c
Normal file
60
src/battle/area_nok/stage/nok_01.c
Normal file
@ -0,0 +1,60 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_nok_01
|
||||
|
||||
EvtSource N(8022B5F0) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(beforeBattle_8022B6F8) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_SET(LW(0), 19)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_SET(LW(0), 21)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_SET(LW(0), 23)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_SET(LW(0), 24)
|
||||
EVT_EXEC(N(8022B5F0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8022B7C0) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_8022B7D0)[] = {
|
||||
0x0000001E, 0x0000001D, 0x0000001C, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "nok_tex",
|
||||
.shape = "nok_bt01_shape",
|
||||
.hit = "nok_bt01_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_8022B6F8),
|
||||
.postBattle = N(afterBattle_8022B7C0),
|
||||
.foregroundModelList = N(foregroundModelList_8022B7D0),
|
||||
};
|
79
src/battle/area_nok/stage/nok_02.c
Normal file
79
src/battle/area_nok/stage/nok_02.c
Normal file
@ -0,0 +1,79 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_nok_02
|
||||
|
||||
EvtSource N(8022B810) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(TranslateModel, LW(10), 0, 0, 0)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(beforeBattle_8022B918) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 19)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 21)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 23)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 24)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 25)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 26)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 27)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 28)
|
||||
EVT_EXEC(N(8022B810))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8022BACC) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_8022BADC)[] = {
|
||||
0x0000001F, 0x00000020, 0x0000001E, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "nok_tex",
|
||||
.shape = "nok_bt02_shape",
|
||||
.hit = "nok_bt02_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_8022B918),
|
||||
.postBattle = N(afterBattle_8022BACC),
|
||||
.foregroundModelList = N(foregroundModelList_8022BADC),
|
||||
};
|
29
src/battle/area_nok/stage/nok_03.c
Normal file
29
src/battle/area_nok/stage/nok_03.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_nok_03
|
||||
|
||||
EvtSource N(beforeBattle_8022BB20) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8022BB40) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_8022BB50)[] = {
|
||||
0x0000000E, 0x0000000F, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "nok_tex",
|
||||
.shape = "nok_bt03_shape",
|
||||
.hit = "nok_bt03_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_8022BB20),
|
||||
.postBattle = N(afterBattle_8022BB40),
|
||||
.foregroundModelList = N(foregroundModelList_8022BB50),
|
||||
};
|
29
src/battle/area_nok/stage/nok_04.c
Normal file
29
src/battle/area_nok/stage/nok_04.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_nok_nok_04
|
||||
|
||||
EvtSource N(beforeBattle_8022BB90) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(afterBattle_8022BBB0) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList_8022BBC0)[] = {
|
||||
0x0000001B, 0x0000001A, 0x0000001D, 0x0000001C, 0x00000019, 0x00000000,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "nok_tex",
|
||||
.shape = "nok_bt04_shape",
|
||||
.hit = "nok_bt04_hit",
|
||||
.bg = "nok_bg",
|
||||
.preBattle = N(beforeBattle_8022BB90),
|
||||
.postBattle = N(afterBattle_8022BBB0),
|
||||
.foregroundModelList = N(foregroundModelList_8022BBC0),
|
||||
};
|
@ -16,6 +16,15 @@ extern StageList b_area_kmr_part_2_stageTable;
|
||||
extern BattleList b_area_kmr_part_3_formationTable;
|
||||
extern StageList b_area_kmr_part_3_stageTable;
|
||||
|
||||
extern BattleList b_area_mac_formationTable;
|
||||
extern StageList b_area_mac_stageTable;
|
||||
|
||||
extern BattleList b_area_hos_formationTable;
|
||||
extern StageList b_area_hos_stageTable;
|
||||
|
||||
extern BattleList b_area_nok_formationTable;
|
||||
extern StageList b_area_nok_stageTable;
|
||||
|
||||
BattleArea gBattleAreas[0x30] = {
|
||||
{
|
||||
AREA(area_kmr_part_1),
|
||||
@ -26,32 +35,32 @@ BattleArea gBattleAreas[0x30] = {
|
||||
{
|
||||
AREA(area_kmr_part_2),
|
||||
.name = "エリア KMR その2",
|
||||
.battles = b_area_kmr_part_2_formationTable,
|
||||
.stages = b_area_kmr_part_2_stageTable,
|
||||
.battles = &b_area_kmr_part_2_formationTable,
|
||||
.stages = &b_area_kmr_part_2_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_kmr_part_3),
|
||||
.name = "エリア KMR その3",
|
||||
.battles = b_area_kmr_part_3_formationTable,
|
||||
.stages = b_area_kmr_part_3_stageTable,
|
||||
.battles = &b_area_kmr_part_3_formationTable,
|
||||
.stages = &b_area_kmr_part_3_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_mac),
|
||||
.name = "エリア MAC",
|
||||
.battles = 0x80232A5C,
|
||||
.stages = 0x80232AD4,
|
||||
.battles = &b_area_mac_formationTable,
|
||||
.stages = &b_area_mac_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_hos),
|
||||
.name = "エリア HOS",
|
||||
.battles = 0x80225F24,
|
||||
.stages = 0x80225F88,
|
||||
.battles = &b_area_hos_formationTable,
|
||||
.stages = &b_area_hos_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_nok),
|
||||
.name = "エリア NOK",
|
||||
.battles = 0x80219520,
|
||||
.stages = 0x80219728,
|
||||
.battles = &b_area_nok_formationTable,
|
||||
.stages = &b_area_nok_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_trd_part_1),
|
||||
|
454
src/battle/common/actor/goomba.inc.c
Normal file
454
src/battle/common/actor/goomba.inc.c
Normal file
@ -0,0 +1,454 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/goomba.h"
|
||||
|
||||
s32 N(defenseTable_80219750)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021975C)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 100,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 100,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_80219854)[];
|
||||
extern EvtSource N(init_802198EC);
|
||||
|
||||
ActorPartDesc N(partsTable_80219808)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80219854),
|
||||
.defenseTable = N(defenseTable_80219750),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GOOMBA,
|
||||
.level = 5,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80219808)),
|
||||
.partsData = N(partsTable_80219808),
|
||||
.script = N(init_802198EC),
|
||||
.statusTable = N(statusTable_8021975C),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 90,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 24, 24 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80219854)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_802198A0)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021A440);
|
||||
extern EvtSource N(idle_80219938);
|
||||
extern EvtSource N(handleEvent_80219C14);
|
||||
|
||||
EvtSource N(init_802198EC) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_8021A440)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80219938)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80219C14)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_80219938) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, LW(0))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802198A0)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219854)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_802198A0)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations_80219854)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_80219C14) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021A440) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
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), 10)
|
||||
EVT_SET(LW(1), 10)
|
||||
EVT_ADD(LW(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_asleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
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(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(LW(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6005859375))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2001953125))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pre_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.80078125), 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_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
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.80078125))
|
||||
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_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
930
src/battle/common/actor/paragoomba.inc.c
Normal file
930
src/battle/common/actor/paragoomba.inc.c
Normal file
@ -0,0 +1,930 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/goomba.h"
|
||||
#include "sprite/npc/paragoomba.h"
|
||||
|
||||
s32 N(defenseTable_8021CB00)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_8021CB0C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021CB18)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 100,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 100,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021CBC4)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 80,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021E4EC)[];
|
||||
extern s32 N(idleAnimations_8021CD28)[];
|
||||
extern s32 N(idleAnimations_8021CDC0)[];
|
||||
extern s32 N(idleAnimations_8021CDCC)[];
|
||||
extern EvtSource N(init_8021CDD8);
|
||||
|
||||
ActorPartDesc N(partsTable_8021CC70)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021E4EC),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CD28),
|
||||
.defenseTable = N(defenseTable_8021CB0C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CDC0),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 4,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -16, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021CDCC),
|
||||
.defenseTable = N(defenseTable_8021CB00),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 246,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_PARAGOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021CC70)),
|
||||
.partsData = N(partsTable_8021CC70),
|
||||
.script = N(init_8021CDD8),
|
||||
.statusTable = N(statusTable_8021CBC4),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 100,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 36, 26 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CD28)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CD74)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_paragoomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_paragoomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_paragoomba_default_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_paragoomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_paragoomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CDC0)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_left_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021CDCC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_paragoomba_default_right_wing_only,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021D74C);
|
||||
extern EvtSource N(idle_8021CE24);
|
||||
extern EvtSource N(handleEvent_8021D158);
|
||||
|
||||
EvtSource N(init_8021CDD8) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021D74C)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021CE24)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021D158)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021CE24) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(0.6))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations_8021CD74)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(0.6))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 2, EVT_PTR(N(idleAnimations_8021CD28)))
|
||||
EVT_LOOP(40)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(8021D0E0) = {
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(7.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
extern EvtSource N(8021DF64);
|
||||
|
||||
EvtSource N(handleEvent_8021D158) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(GetBattlePhase, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 1)
|
||||
EVT_CALL(GetEncounterState, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 4)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(12)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_CASE_EQ(15)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(8021DF64))
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_dizzy)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(56)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_paragoomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000002)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_paragoomba_default_pain)
|
||||
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
|
||||
};
|
||||
|
||||
EvtSource N(takeTurn_8021D74C) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8416)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_SUB(EVT_VAR(0), 80)
|
||||
EVT_SET(EVT_VAR(1), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(4)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8415)
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_aim)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FIXED(3.0))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 2, EVT_FIXED(1.0))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 66)
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 8416)
|
||||
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(5.0))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
|
||||
EVT_CALL(SetActorSounds, -127, 1, 0, 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_run)
|
||||
EVT_EXEC_WAIT(N(8021D0E0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
extern EvtSource N(8021E584);
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
EvtSource N(8021DF64) = {
|
||||
EVT_CALL(func_8027D32C, -127)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 2, 131077)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 3, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 4, 1179652)
|
||||
EVT_CALL(SetPartFlags, ACTOR_SELF, 1, 8388612)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, -9, 7, -2)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 4, 11, 7, -2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_IF_EQ(EVT_VAR(0), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSounds, -127, 2, 769, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(0.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 100, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(0.3))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(ResetActorSounds, -127, 2)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(3))
|
||||
EVT_IF_EQ(EVT_VAR(3), 15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5))
|
||||
EVT_ADD(EVT_VAR(4), 10)
|
||||
EVT_ADD(EVT_VAR(5), 5)
|
||||
EVT_CALL(PlayEffect, 0x27, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), EVT_FIXED(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 0)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, -127, 3, 1, 1)
|
||||
EVT_CALL(SetPartFlagBits, -127, 4, 1, 1)
|
||||
EVT_CALL(GetIndexFromHome, -127, EVT_VAR(0))
|
||||
EVT_MOD(EVT_VAR(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, -127, EVT_VAR(0))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetHomePos, -127, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 512, 0)
|
||||
EVT_CALL(SetStatusTable, -127, EVT_PTR(N(statusTable_8021CB18)))
|
||||
EVT_CALL(SetActorType, -127, 7)
|
||||
EVT_EXEC_WAIT(N(8021E584))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4096, 1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// Copy of goomba.c follows..................
|
||||
// TODO: deduplicate
|
||||
|
||||
s32 N(idleAnimations_8021E4EC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021E538)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_STONE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_SLEEP, NPC_ANIM_goomba_normal_asleep,
|
||||
STATUS_POISON, NPC_ANIM_goomba_normal_idle,
|
||||
STATUS_STOP, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_STATIC, NPC_ANIM_goomba_normal_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_goomba_normal_still,
|
||||
STATUS_DIZZY, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_goomba_normal_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021F0D8);
|
||||
extern EvtSource N(idle_8021E5D0);
|
||||
extern EvtSource N(handleEvent_8021E8AC);
|
||||
|
||||
EvtSource N(8021E584) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021F0D8)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021E5D0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021E8AC)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021E5D0) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, EVT_VAR(0))
|
||||
EVT_ADD(EVT_VAR(0), 80)
|
||||
EVT_LOOP(EVT_VAR(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E538)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E4EC)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E538)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021E4EC)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, EVT_VAR(1))
|
||||
EVT_IF_FLAG(EVT_VAR(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021E8AC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, EVT_VAR(0))
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_pain)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_SET_CONST(EVT_VAR(2), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(EVT_VAR(0), 0x00000001)
|
||||
EVT_SET_CONST(EVT_VAR(1), NPC_ANIM_goomba_normal_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021F0D8) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
EVT_SET(EVT_VAR(10), EVT_VAR(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_SUB(EVT_VAR(0), 10)
|
||||
EVT_SET(EVT_VAR(1), 10)
|
||||
EVT_ADD(EVT_VAR(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_asleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(EVT_VAR(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(EVT_VAR(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(EVT_VAR(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6))
|
||||
EVT_CALL(N(AngleCalculate), EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, EVT_VAR(0))
|
||||
EVT_SET(EVT_VAR(1), EVT_VAR(4))
|
||||
EVT_SET(EVT_VAR(2), EVT_VAR(5))
|
||||
EVT_SET(EVT_VAR(3), EVT_VAR(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pre_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32)
|
||||
EVT_SWITCH(EVT_VAR(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_ADD(EVT_VAR(0), 40)
|
||||
EVT_SET(EVT_VAR(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(EVT_VAR(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
475
src/battle/common/actor/spiked_goomba.inc.c
Normal file
475
src/battle/common/actor/spiked_goomba.inc.c
Normal file
@ -0,0 +1,475 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/spiked_goomba.h"
|
||||
|
||||
s32 N(defenseTable_8021AFD0)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_8021AFDC)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 100,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 100,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 80,
|
||||
STATUS_STATIC, 80,
|
||||
STATUS_PARALYZE, 100,
|
||||
STATUS_SHRINK, 100,
|
||||
STATUS_STOP, 100,
|
||||
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,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations_8021B0D4)[];
|
||||
extern EvtSource N(init_8021B16C);
|
||||
|
||||
ActorPartDesc N(partsTable_8021B088)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_8021B0D4),
|
||||
.defenseTable = N(defenseTable_8021AFD0),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 244,
|
||||
},
|
||||
};
|
||||
|
||||
ActorDesc NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_SPIKED_GOOMBA,
|
||||
.level = 6,
|
||||
.maxHP = 2,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_8021B088)),
|
||||
.partsData = N(partsTable_8021B088),
|
||||
.script = N(init_8021B16C),
|
||||
.statusTable = N(statusTable_8021AFDC),
|
||||
.escapeChance = 90,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 90,
|
||||
.baseStatusChance = 100,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 24, 28 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B0D4)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_8021B120)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_spiked_goomba_default_run,
|
||||
STATUS_STONE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_SLEEP, NPC_ANIM_spiked_goomba_default_sleep,
|
||||
STATUS_POISON, NPC_ANIM_spiked_goomba_default_idle,
|
||||
STATUS_STOP, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_STATIC, NPC_ANIM_spiked_goomba_default_run,
|
||||
STATUS_PARALYZE, NPC_ANIM_spiked_goomba_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_FEAR, NPC_ANIM_spiked_goomba_default_dizzy,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern EvtSource N(takeTurn_8021BDDC);
|
||||
extern EvtSource N(idle_8021B1B8);
|
||||
extern EvtSource N(handleEvent_8021B494);
|
||||
|
||||
EvtSource N(init_8021B16C) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021BDDC)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021B1B8)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021B494)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(idle_8021B1B8) = {
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(RandInt, 80, LW(0))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_LOOP(20)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 5)
|
||||
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B120)))
|
||||
EVT_CALL(SetIdleGoal, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(IdleRunToGoal, -127, 0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_8021B0D4)))
|
||||
EVT_LOOP(80)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(1))
|
||||
EVT_IF_FLAG(LW(1), 0x35D000)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(handleEvent_8021B494) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(14)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(36)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_dead)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_burn_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(11)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(33)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(47)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CASE_EQ(38)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_electrocute)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(19)
|
||||
EVT_CASE_OR_EQ(23)
|
||||
EVT_CASE_OR_EQ(25)
|
||||
EVT_CASE_OR_EQ(31)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(32)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(53)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(49)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(57)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(58)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(22)
|
||||
EVT_SET_CONST(LW(0), 0x00000001)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(27)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x35D000)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(3))
|
||||
EVT_IF_FLAG(LW(3), 0x80000)
|
||||
EVT_ADD(LW(1), 10)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(1), 26)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, 0x1A, 0, LW(0), LW(1), LW(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/anglestuff.inc.c"
|
||||
|
||||
EvtSource N(takeTurn_8021BDDC) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, 63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(5)
|
||||
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), 10)
|
||||
EVT_SET(LW(1), 10)
|
||||
EVT_ADD(LW(2), 3)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_sleep)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_pain)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_IF_EQ(LW(10), 5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0x80000000)), 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
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(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(2.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 180)
|
||||
EVT_LOOP(4)
|
||||
EVT_SUB(LW(0), 45)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_dizzy)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FIXED(1.2))
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(16)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(N(AngleCalculate), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
EVT_SET(LW(3), LW(6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, 32)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.1), EVT_FIXED(0.8), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
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_FIXED(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_CALL(GetLastDamage, 0, LW(0))
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_IF
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_run)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(8.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FIXED(1.0))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -2,9 +2,10 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
#include "message_ids.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "message_ids.h"
|
||||
#include "battle/action_cmd/jump.h"
|
||||
#include "sprite/npc/battle_goombario.h"
|
||||
|
||||
extern EffectInstance* D_8023CDA0;
|
||||
@ -686,7 +687,7 @@ EvtSource N(8023A66C) = {
|
||||
|
||||
EvtSource N(8023A754) = {
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A52C)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A66C)
|
||||
EVT_CALL(SetAnimation, -127, 1, 589831)
|
||||
@ -754,7 +755,7 @@ EvtSource N(8023A754) = {
|
||||
EVT_CALL(func_80269524, EVT_VAR(15))
|
||||
EVT_CALL(CloseActionCommandInfo)
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_CALL(func_802694A4, 0)
|
||||
EVT_CALL(func_802A9120_421B10, 24, 3)
|
||||
EVT_SET(EVT_VAR(10), 24)
|
||||
@ -791,7 +792,7 @@ EvtSource N(8023A754) = {
|
||||
|
||||
EvtSource N(8023ADC4) = {
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A52C)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A66C)
|
||||
EVT_CALL(SetAnimation, -127, 1, 589831)
|
||||
@ -859,7 +860,7 @@ EvtSource N(8023ADC4) = {
|
||||
EVT_CALL(func_80269524, EVT_VAR(15))
|
||||
EVT_CALL(CloseActionCommandInfo)
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_CALL(func_802694A4, 0)
|
||||
EVT_CALL(func_802A9120_421B10, 24, 3)
|
||||
EVT_SET(EVT_VAR(10), 24)
|
||||
@ -898,7 +899,7 @@ EvtSource N(8023ADC4) = {
|
||||
|
||||
EvtSource N(8023B45C) = {
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A52C)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A66C)
|
||||
EVT_CALL(SetAnimation, -127, 1, 589831)
|
||||
@ -966,7 +967,7 @@ EvtSource N(8023B45C) = {
|
||||
EVT_CALL(func_80269524, EVT_VAR(15))
|
||||
EVT_CALL(CloseActionCommandInfo)
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_CALL(func_802694A4, 0)
|
||||
EVT_CALL(func_802A9120_421B10, 24, 3)
|
||||
EVT_SET(EVT_VAR(10), 24)
|
||||
@ -1020,7 +1021,7 @@ s32 D_8023BB98_6ECC78 = 0x000000C8;
|
||||
|
||||
EvtSource N(8023BB9C) = {
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A52C)
|
||||
EVT_EXEC_WAIT(battle_partner_goombario_8023A66C)
|
||||
EVT_CALL(SetAnimation, -127, 1, 589831)
|
||||
@ -1099,7 +1100,7 @@ EvtSource N(8023BB9C) = {
|
||||
EVT_CALL(CloseActionCommandInfo)
|
||||
EVT_CALL(func_8026919C, EVT_PTR(battle_partner_goombario_D_8023BB78_6ECC58))
|
||||
EVT_CALL(LoadActionCommand, 1)
|
||||
EVT_CALL(func_802A9000_430020)
|
||||
EVT_CALL(action_command_jump_CreateHudElements)
|
||||
EVT_SET(EVT_VAR(10), 24)
|
||||
EVT_SWITCH(EVT_VAR(15))
|
||||
EVT_CASE_EQ(0)
|
||||
|
@ -18,19 +18,16 @@ def script_lib(offset=0):
|
||||
"""
|
||||
LIB_LINE_RE = re.compile(r"\s+:\s+")
|
||||
NAME_RE = re.compile(r"({[^}]*})?\s*([a-zA-Z0-9_]+)")
|
||||
|
||||
for filename in Path(path.dirname(__file__), "star-rod", "database").rglob("*.lib"):
|
||||
with open(filename, "r") as file:
|
||||
for line in file.readlines():
|
||||
parts = LIB_LINE_RE.split(line)
|
||||
|
||||
if len(parts) >= 3:
|
||||
try:
|
||||
kind = parts[0]
|
||||
vaddr = int(parts[1].split(", ")[0], 16)
|
||||
if name := NAME_RE.match(parts[2]):
|
||||
name = name.group(2)
|
||||
|
||||
_script_lib[vaddr] = name
|
||||
except:
|
||||
pass
|
||||
@ -180,7 +177,6 @@ def get_constants():
|
||||
if f"#define {enum}_" in line:
|
||||
this_enum = enum
|
||||
break;
|
||||
|
||||
if this_enum:
|
||||
name = line.split(" ",2)[1]
|
||||
id_ = line.split("0x", 1)[1]
|
||||
@ -269,22 +265,19 @@ def fix_args(self, func, args, info):
|
||||
# continue
|
||||
|
||||
try:
|
||||
value = (argNum & 0x00FFFFFF)
|
||||
|
||||
if func == "SetAnimation" and int(new_args[1], 10) == 0:
|
||||
call = f"{CONSTANTS['PlayerAnims'][argNum]}"
|
||||
elif "EVT_" not in args[0] and int(args[0]) >= 0 and CONSTANTS["MAP_NPCS"].get(int(args[0])) == "NPC_PLAYER":
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} ({CONSTANTS['MAP_NPCS'][int(args[0])]}) -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
elif value in CONSTANTS["NPC_SPRITE"]:
|
||||
self.INCLUDES_NEEDED["sprites"].add(CONSTANTS['NPC_SPRITE'][str(value) + ".h"])
|
||||
call = CONSTANTS['NPC_SPRITE'][value]
|
||||
else:
|
||||
call = f"{CONSTANTS['PlayerAnims'][argNum]}"
|
||||
else:
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
else:
|
||||
call = make_anim_macro(self, sprite, palette, anim)
|
||||
call = f"{argNum:06X}"
|
||||
except ValueError:
|
||||
call = f"0x{argNum:06X}"
|
||||
except KeyError:
|
||||
call = f"0x{argNum:06X}"
|
||||
new_args.append(call)
|
||||
elif info[i] == "CustomMsg":
|
||||
type_ = (argNum & 0xFF0000) >> 16
|
||||
@ -301,7 +294,7 @@ def fix_args(self, func, args, info):
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append("((" + " | ".join(enabled) + "))")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "NpcIDs":
|
||||
if argNum >= 0:
|
||||
if argNum in CONSTANTS["MAP_NPCS"]:
|
||||
@ -322,6 +315,18 @@ def fix_args(self, func, args, info):
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "ActorPartFlags":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
flag = argNum & (1 << x)
|
||||
if flag:
|
||||
if flag in CONSTANTS["ActorPartFlags"]:
|
||||
enabled.append(CONSTANTS["ActorPartFlags"][flag])
|
||||
else:
|
||||
enabled.append(f"0x{flag:08X}")
|
||||
if not enabled:
|
||||
enabled.append(f"0")
|
||||
new_args.append(enabled[0] if len(enabled) == 1 else "(" + " | ".join(enabled) + ")")
|
||||
elif info[i] == "ActorFlags":
|
||||
enabled = []
|
||||
for x in range(32):
|
||||
@ -363,17 +368,23 @@ def fix_args(self, func, args, info):
|
||||
|
||||
|
||||
replace_funcs = {
|
||||
"ActorSpeak" :{0:"CustomMsg", 1:"ActorIDs", 3:"CustomAnim", 4:"CustomAnim"},
|
||||
"AddActorDecoration" :{0:"ActorIDs"},
|
||||
"AddKeyItem" :{0:"ItemIDs"},
|
||||
"AddGoalPos" :{0:"ActorIDs"},
|
||||
|
||||
"BattleCamTargetActor" :{0:"ActorIDs"},
|
||||
"BindHandleEvent" :{0:"ActorIDs"},
|
||||
"BindIdle" :{0:"ActorIDs"},
|
||||
"BindNextTurn" :{0:"ActorIDs"},
|
||||
"BindNpcAI" :{0:"NpcIDs"},
|
||||
"BindNpcDefeat" :{0:"NpcIDs"},
|
||||
"BindNpcIdle" :{0:"NpcIDs"},
|
||||
"BindNpcInteract" :{0:"NpcIDs"},
|
||||
"BindTakeTurn" :{0:"ActorIDs"},
|
||||
|
||||
"ContinueSpeech" :{1:"CustomAnim", 2:"CustomAnim", 4:"CustomMsg"},
|
||||
"CountPlayerTargets" :{0:"ActorIDs"},
|
||||
|
||||
"DisablePlayerInput" :{0:"Bool"},
|
||||
"DisablePlayerPhysics" :{0:"Bool"},
|
||||
@ -387,21 +398,31 @@ replace_funcs = {
|
||||
"EnemyTestTarget" :{0:"ActorIDs", 2:"DamageTypes"},
|
||||
|
||||
"FindKeyItem" :{0:"ItemIDs"},
|
||||
"FlyToGoal" :{0:"ActorIDs"},
|
||||
"ForceHomePos" :{0:"ActorIDs"},
|
||||
|
||||
"func_802CFE2C" :{0:"NpcIDs"},
|
||||
"func_802CFD30" :{0:"NpcIDs"},
|
||||
"func_802D2520" :{0:"PlayerAnims"},
|
||||
|
||||
"GetActorHP" :{0:"ActorIDs"},
|
||||
"GetActorPos" :{0:"ActorIDs"},
|
||||
"GetActorVar" :{0:"ActorIDs"},
|
||||
"GetDistanceToGoal" :{0:"ActorIDs"},
|
||||
"GetGoalPos" :{0:"ActorIDs"},
|
||||
"GetHomePos" :{0:"ActorIDs"},
|
||||
"GetItemPower" :{0:"ItemIDs"},
|
||||
"GetLastDamage" :{0:"ActorIDs"},
|
||||
"GetLastEvent" :{0:"ActorIDs"},
|
||||
"GetNpcPos" :{0:"NpcIDs"},
|
||||
"GetStatusFlags" :{0:"ActorIDs"},
|
||||
|
||||
"HidePlayerShadow" :{0:"Bool"},
|
||||
"HPBarToCurrent" :{0:"ActorIDs"},
|
||||
"HPBarToHome" :{0:"ActorIDs"},
|
||||
|
||||
"IdleFlyToGoal" :{0:"ActorIDs"},
|
||||
"IdleRunToGoal" :{0:"ActorIDs"},
|
||||
"InterpNpcYaw" :{0:"NpcIDs"},
|
||||
|
||||
"JumpToGoal" :{0:"ActorIDs"},
|
||||
@ -422,22 +443,34 @@ replace_funcs = {
|
||||
"PlaySoundAtActor" :{0:"ActorIDs", 1:"SoundIDs"},
|
||||
"PlaySoundAtNpc" :{0:"NpcIDs", 1:"SoundIDs"},
|
||||
|
||||
"RemoveActor" :{0:"ActorIDs"},
|
||||
"RemoveActorDecoration" :{0:"ActorIDs"},
|
||||
"RemoveNpc" :{0:"NpcIDs"},
|
||||
"ResetActorSounds" :{0:"ActorIDs"},
|
||||
"ResetAllActorSounds" :{0:"ActorIDs"},
|
||||
"RunToGoal" :{0:"ActorIDs", 2:"Bool"},
|
||||
"JumpToGoal" :{0:"ActorIDs", 2:"Bool", 3:"Bool", 4:"Bool"},
|
||||
|
||||
"SetActorDispOffset" :{0:"ActorIDs"},
|
||||
"SetActorFlagBits" :{0:"ActorIDs", 1:"ActorFlags"},
|
||||
"SetActorIdleSpeed" :{0:"ActorIDs"},
|
||||
"SetActorJumpGravity" :{0:"ActorIDs"},
|
||||
"SetActorPos" :{0:"ActorIDs"},
|
||||
"SetActorRotation" :{0:"ActorIDs"},
|
||||
"SetActorSpeed" :{0:"ActorIDs"},
|
||||
"SetActorScale" :{0:"ActorIDs"},
|
||||
"SetActorSounds" :{0:"ActorIDs"},
|
||||
"SetActorSpeed" :{0:"ActorIDs"},
|
||||
"SetActorType" :{0:"ActorIDs", 1:"ActorType"},
|
||||
"SetActorVar" :{0:"ActorIDs"},
|
||||
"SetActorYaw" :{0:"ActorIDs"},
|
||||
"SetAnimation" :{0:"ActorIDs", 2:"CustomAnim"},
|
||||
"SetAnimationRate" :{0:"ActorIDs"},
|
||||
"SetGoalPos" :{0:"ActorIDs"},
|
||||
"SetGoalToHome" :{0:"ActorIDs"},
|
||||
"SetGoalToTarget" :{0:"ActorIDs"},
|
||||
"SetHomePos" :{0:"ActorIDs"},
|
||||
"SetIdleAnimations" :{0:"ActorIDs"},
|
||||
"SetIdleGoal" :{0:"ActorIDs"},
|
||||
"SetJumpAnimations" :{0:"ActorIDs", 2:"PlayerAnims", 3:"PlayerAnims", 4:"PlayerAnims"},
|
||||
"SetMusicTrack" :{1:"SongIDs"},
|
||||
"SetNpcAnimation" :{0:"NpcIDs", 1:"CustomAnim"},
|
||||
@ -450,9 +483,16 @@ replace_funcs = {
|
||||
"SetNpcSpeed" :{0:"NpcIDs"},
|
||||
"SetNpcSprite" :{1:"Hex"},
|
||||
"SetNpcYaw" :{0:"NpcIDs"},
|
||||
"SetPartDispOffset" :{0:"ActorIDs"},
|
||||
"SetPartFlags" :{0:"ActorIDs"},
|
||||
"SetPartFlagBits" :{0:"ActorIDs", 2:"ActorPartFlags"},
|
||||
"SetPartPos" :{0:"ActorIDs"},
|
||||
"SetPartScale" :{0:"ActorIDs"},
|
||||
"SetPartSounds" :{0:"ActorIDs"},
|
||||
"SetPlayerAnimation" :{0:"PlayerAnims"},
|
||||
"SetSelfEnemyFlagBits" :{0:"NpcFlags", 1:"Bool"},
|
||||
#"SetSelfVar" :{1:"Bool"}, # apparently this was a bool in some scripts but it passes non-0/1 values, including negatives
|
||||
"SetStatusTable" :{0:"ActorIDs"},
|
||||
"SetTargetActor" :{0:"ActorIDs", 1:"ActorIDs"},
|
||||
"ShowChoice" :{0:"CustomMsg"},
|
||||
"ShowEmote" :{1:"Emotes"},
|
||||
@ -462,22 +502,6 @@ replace_funcs = {
|
||||
"SwitchMessage" :{0:"CustomMsg"},
|
||||
|
||||
"UseIdleAnimation" :{0:"ActorIDs", 1:"Bool"},
|
||||
"BindTakeTurn" :{0:"ActorIDs"},
|
||||
"BindIdle" :{0:"ActorIDs"},
|
||||
"BindHandleEvent" :{0:"ActorIDs"},
|
||||
"SetActorIdleSpeed" :{0:"ActorIDs"},
|
||||
"SetIdleAnimations" :{0:"ActorIDs"},
|
||||
"SetIdleGoal" :{0:"ActorIDs"},
|
||||
"IdleFlyToGoal" :{0:"ActorIDs"},
|
||||
"GetStatusFlags" :{0:"ActorIDs"},
|
||||
"ResetAllActorSounds" :{0:"ActorIDs"},
|
||||
"FlyToGoal" :{0:"ActorIDs"},
|
||||
"SetActorPos" :{0:"ActorIDs"},
|
||||
"HPBarToCurrent" :{0:"ActorIDs"},
|
||||
"SetActorFlagBits" :{0:"ActorIDs", 1:"ActorFlags"},
|
||||
"SetPartFlags" :{0:"ActorIDs"},
|
||||
"SetPartPos" :{0:"ActorIDs"},
|
||||
"SetPartDispOffset" :{0:"ActorIDs"},
|
||||
}
|
||||
|
||||
|
||||
@ -669,7 +693,6 @@ class ScriptDisassembler:
|
||||
if self.prelude:
|
||||
self.prefix_line(f"EvtSource {self.script_name} = {{")
|
||||
self.write_line("};")
|
||||
|
||||
self.done = True
|
||||
elif opcode == 0x02: self.write_line(f"EVT_RETURN")
|
||||
elif opcode == 0x03: self.write_line(f"EVT_LABEL({self.var(argv[0])})")
|
||||
@ -778,12 +801,10 @@ class ScriptDisassembler:
|
||||
sprite = (argNum & 0xFF0000) >> 16
|
||||
palette = (argNum & 0xFF00) >> 8
|
||||
anim = (argNum & 0xFF) >> 0
|
||||
|
||||
if sprite > 0:
|
||||
value = make_anim_macro(self, sprite, palette, anim)
|
||||
else:
|
||||
value = f"0x{argNum:08X}"
|
||||
|
||||
self.write_line(f"EVT_SET_CONST({self.var(argv[0])}, {value})")
|
||||
elif opcode == 0x26: self.write_line(f"EVT_SETF({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x27: self.write_line(f"EVT_ADD({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
@ -813,16 +834,14 @@ class ScriptDisassembler:
|
||||
elif opcode == 0x3D: self.write_line(f"EVT_USE_FLAG_ARRAY({self.var(argv[0])})")
|
||||
elif opcode == 0x3E: self.write_line(f"EVT_MALLOC_ARRAY({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x3F: self.write_line(f"EVT_BITWISE_AND({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x40: self.write_line(f"EVT_BITWISE_OR({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x41: self.write_line(f"EVT_BITWISE_AND_CONST({self.var(argv[0])}, 0x{argv[1]:X})")
|
||||
elif opcode == 0x40: self.write_line(f"EVT_BITWISE_AND_CONST({self.var(argv[0])}, {self.var(argv[1])})")
|
||||
elif opcode == 0x41: self.write_line(f"EVT_BITWISE_OR({self.var(argv[0])}, 0x{argv[1]:X})")
|
||||
elif opcode == 0x42: self.write_line(f"EVT_BITWISE_OR_CONST({self.var(argv[0])}, 0x{argv[1]:X})")
|
||||
elif opcode == 0x43:
|
||||
func = self.addr_ref(argv[0])
|
||||
args = [self.var(a, use_evt_ptr=True) for a in argv[1:]]
|
||||
|
||||
args_str = ', '.join(args)
|
||||
args_str = replace_constants(self, func, args_str)
|
||||
|
||||
if func.startswith("evt_"):
|
||||
# use func-specific macro
|
||||
self.write_line(f"{func}({args_str})")
|
||||
@ -877,32 +896,24 @@ class ScriptDisassembler:
|
||||
argv_str += ", "
|
||||
argv_str += f"0x{arg:X}"
|
||||
self.write_line(f"0x{opcode:02X}{argv_str}),")
|
||||
|
||||
def collider_id(self, arg):
|
||||
if arg >= 0x4000 and arg <= 0x5000:
|
||||
return f"EVT_ENTITY_INDEX({arg - 0x4000})"
|
||||
else:
|
||||
return self.var(arg)
|
||||
|
||||
|
||||
class UnsupportedScript(Exception):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("file", type=str, help="File to dissassemble from")
|
||||
parser.add_argument("offset", help="Offset to start dissassembling from")
|
||||
parser.add_argument("-end", "-e", "--e", type=lambda x: int(x, 16), default=0, dest="end", required=False, help="End offset to stop dissassembling from.\nOnly used as a way to find valid scripts.")
|
||||
parser.add_argument("-vram", "-v", "--v", type=lambda x: int(x, 16), default=0, dest="vram", required=False, help="VRAM start will be tracked and used for the script output name")
|
||||
parser.add_argument("-si", "--si", action="store_true", default=False, dest="si", required=False, help="Force si script output")
|
||||
|
||||
args = parser.parse_args()
|
||||
vram_base = args.vram
|
||||
get_constants()
|
||||
|
||||
INCLUDED = {}
|
||||
INCLUDED["functions"] = set()
|
||||
INCLUDED["includes"] = set()
|
||||
@ -911,7 +922,6 @@ if __name__ == "__main__":
|
||||
INCLUDES_NEEDED["forward"] = []
|
||||
INCLUDES_NEEDED["npcs"] = {}
|
||||
INCLUDES_NEEDED["sprites"] = set()
|
||||
|
||||
try:
|
||||
offset = int(args.offset, 0)
|
||||
except ValueError:
|
||||
@ -920,20 +930,16 @@ if __name__ == "__main__":
|
||||
print(f"{args.offset} is not a valid symbol name")
|
||||
exit(1)
|
||||
offset = info[0]
|
||||
|
||||
if args.end > offset:
|
||||
# Search the given memory range and report scripts
|
||||
with open(args.file, "rb") as f:
|
||||
gap = False
|
||||
first_print = False
|
||||
|
||||
while offset < args.end:
|
||||
f.seek(offset)
|
||||
|
||||
script = ScriptDisassembler(f, args.offset, {}, 0x978DE0, INCLUDES_NEEDED, INCLUDED)
|
||||
try:
|
||||
script_text = script.disassemble()
|
||||
|
||||
if script.instructions > 1 and "_EVT_CMD" not in script_text:
|
||||
if gap and first_print:
|
||||
potential_struct_sizes = { "StaticNpc": 0x1F0, "NpcAISettings":0x30, "NpcSettings":0x2C, "NpcGroupList":0xC }
|
||||
@ -944,7 +950,6 @@ if __name__ == "__main__":
|
||||
if gap_size % v == 0:
|
||||
potential_struct = k
|
||||
potential_count = gap_size // v
|
||||
|
||||
print(f"========== 0x{gap_size:X} byte gap ({potential_count} {potential_struct}?) 0x{gap_start:X} - 0x{offset:X} ==========")
|
||||
print()
|
||||
gap = False
|
||||
|
@ -939,18 +939,14 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0, namespace
|
||||
out += f"s32 {name}[] = {{"
|
||||
else:
|
||||
out += f"s32 {name} = {{"
|
||||
|
||||
for i in range(0, struct["length"], 4):
|
||||
if (i % 0x20) == 0:
|
||||
out += f"\n "
|
||||
|
||||
word = int.from_bytes(bytes.read(4), byteorder="big")
|
||||
|
||||
if word in symbol_map:
|
||||
out += f" {symbol_map[word][0][1]},"
|
||||
else:
|
||||
out += f" 0x{word:08X},"
|
||||
|
||||
out += f"\n}};\n"
|
||||
|
||||
out += "\n"
|
||||
@ -1226,5 +1222,3 @@ if __name__ == "__main__":
|
||||
|
||||
print("=======================================\n")
|
||||
print(disasm.rstrip())
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,19 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80225FB0_48D060
|
||||
.double 48.62745098039216
|
||||
|
||||
dlabel D_80225FB8_48D068
|
||||
.double 89.41176470588236
|
||||
|
||||
dlabel D_80225FC0_48D070
|
||||
.double 99.6078431372549
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_802186B8_47F768
|
||||
/* 47F768 802186B8 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 47F76C 802186BC AFB20028 */ sw $s2, 0x28($sp)
|
||||
|
@ -1,6 +1,16 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80225FC8_48D078
|
||||
.double 67.45098039215686
|
||||
|
||||
dlabel D_80225FD0_48D080
|
||||
.double 59.21568627450981
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_802189D0_47FA80
|
||||
/* 47FA80 802189D0 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 47FA84 802189D4 AFB20028 */ sw $s2, 0x28($sp)
|
||||
|
@ -1,6 +1,16 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80225FD8_48D088
|
||||
.double 80.3921568627451
|
||||
|
||||
dlabel D_80225FE0_48D090
|
||||
.double 96.07843137254902
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80218CEC_47FD9C
|
||||
/* 47FD9C 80218CEC 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 47FDA0 80218CF0 AFB20028 */ sw $s2, 0x28($sp)
|
||||
@ -212,5 +222,3 @@ glabel func_80218CEC_47FD9C
|
||||
/* 4800AC 80218FFC D7B40040 */ ldc1 $f20, 0x40($sp)
|
||||
/* 4800B0 80219000 03E00008 */ jr $ra
|
||||
/* 4800B4 80219004 27BD0048 */ addiu $sp, $sp, 0x48
|
||||
/* 4800B8 80219008 00000000 */ nop
|
||||
/* 4800BC 8021900C 00000000 */ nop
|
||||
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802180D0_464560
|
||||
/* 464560 802180D0 2403000B */ addiu $v1, $zero, 0xb
|
||||
/* 464564 802180D4 3C028023 */ lui $v0, %hi(D_80232C4C)
|
||||
/* 464568 802180D8 24422C4C */ addiu $v0, $v0, %lo(D_80232C4C)
|
||||
.L802180DC:
|
||||
/* 46456C 802180DC AC400000 */ sw $zero, ($v0)
|
||||
/* 464570 802180E0 2463FFFF */ addiu $v1, $v1, -1
|
||||
/* 464574 802180E4 0461FFFD */ bgez $v1, .L802180DC
|
||||
/* 464578 802180E8 2442FFFC */ addiu $v0, $v0, -4
|
||||
/* 46457C 802180EC 2402FFFF */ addiu $v0, $zero, -1
|
||||
/* 464580 802180F0 3C018023 */ lui $at, %hi(D_80232C50)
|
||||
/* 464584 802180F4 AC222C50 */ sw $v0, %lo(D_80232C50)($at)
|
||||
/* 464588 802180F8 03E00008 */ jr $ra
|
||||
/* 46458C 802180FC 24020002 */ addiu $v0, $zero, 2
|
@ -1,6 +1,37 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80232AF0_47EF80
|
||||
.double 47.0
|
||||
|
||||
dlabel D_80232AF8_47EF88
|
||||
.double 1.12
|
||||
|
||||
dlabel D_80232B00_47EF90
|
||||
.double 0.53
|
||||
|
||||
dlabel D_80232B08_47EF98
|
||||
.double 47.0
|
||||
|
||||
dlabel D_80232B10_47EFA0
|
||||
.double 0.8
|
||||
|
||||
dlabel D_80232B18_47EFA8
|
||||
.double 0.53
|
||||
|
||||
dlabel D_80232B20_47EFB0
|
||||
.double 0.8
|
||||
|
||||
dlabel D_80232B28_47EFB8
|
||||
.double 16.5
|
||||
|
||||
dlabel D_80232B30_47EFC0
|
||||
.double 33.0
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80218300_464790
|
||||
/* 464790 80218300 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 464794 80218304 AFB40020 */ sw $s4, 0x20($sp)
|
@ -1,6 +1,13 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80232B38_47EFC8
|
||||
.double 4.800000000000001
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80219188_465618
|
||||
/* 465618 80219188 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 46561C 8021918C AFBF002C */ sw $ra, 0x2c($sp)
|
@ -1,6 +1,13 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel jtbl_80232B40_47EFD0
|
||||
.word L80219878_465D08, L80219884_465D14, L80219890_465D20, L8021989C_465D2C, L802198D4_465D64, L802198B4_465D44, L802198C0_465D50, L802198CC_465D5C, L802198A8_465D38, 0, 0, 0
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80219824_465CB4
|
||||
/* 465CB4 80219824 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 465CB8 80219828 AFB00010 */ sw $s0, 0x10($sp)
|
||||
@ -24,36 +31,36 @@ glabel func_80219824_465CB4
|
||||
/* 465D00 80219870 00400008 */ jr $v0
|
||||
/* 465D04 80219874 00000000 */ nop
|
||||
dlabel L80219878_465D08
|
||||
/* 465D08 80219878 3C048022 */ lui $a0, %hi(D_80220524_46C9B4)
|
||||
/* 465D08 80219878 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_goombario)
|
||||
/* 465D0C 8021987C 08086635 */ j L802198D4_465D64
|
||||
/* 465D10 80219880 24840524 */ addiu $a0, $a0, %lo(D_80220524_46C9B4)
|
||||
/* 465D10 80219880 24840524 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_goombario)
|
||||
dlabel L80219884_465D14
|
||||
/* 465D14 80219884 3C048022 */ lui $a0, %hi(D_80222274_46E704)
|
||||
/* 465D14 80219884 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_kooper)
|
||||
/* 465D18 80219888 08086635 */ j L802198D4_465D64
|
||||
/* 465D1C 8021988C 24842274 */ addiu $a0, $a0, %lo(D_80222274_46E704)
|
||||
/* 465D1C 8021988C 24842274 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_kooper)
|
||||
dlabel L80219890_465D20
|
||||
/* 465D20 80219890 3C048022 */ lui $a0, %hi(D_8022336C_46F7FC)
|
||||
/* 465D20 80219890 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_bombette)
|
||||
/* 465D24 80219894 08086635 */ j L802198D4_465D64
|
||||
/* 465D28 80219898 2484336C */ addiu $a0, $a0, %lo(D_8022336C_46F7FC)
|
||||
/* 465D28 80219898 2484336C */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_bombette)
|
||||
dlabel L8021989C_465D2C
|
||||
/* 465D2C 8021989C 3C048022 */ lui $a0, %hi(D_802243F4_470884)
|
||||
/* 465D2C 8021989C 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_parakerry)
|
||||
/* 465D30 802198A0 08086635 */ j L802198D4_465D64
|
||||
/* 465D34 802198A4 248443F4 */ addiu $a0, $a0, %lo(D_802243F4_470884)
|
||||
/* 465D34 802198A4 248443F4 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_parakerry)
|
||||
dlabel L802198A8_465D38
|
||||
/* 465D38 802198A8 3C048022 */ lui $a0, %hi(D_80225958_471DE8)
|
||||
/* 465D38 802198A8 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_bow)
|
||||
/* 465D3C 802198AC 08086635 */ j L802198D4_465D64
|
||||
/* 465D40 802198B0 24845958 */ addiu $a0, $a0, %lo(D_80225958_471DE8)
|
||||
/* 465D40 802198B0 24845958 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_bow)
|
||||
dlabel L802198B4_465D44
|
||||
/* 465D44 802198B4 3C048022 */ lui $a0, %hi(D_80226960_472DF0)
|
||||
/* 465D44 802198B4 3C048022 */ lui $a0, %hi(b_area_mac_lee_formation_watt)
|
||||
/* 465D48 802198B8 08086635 */ j L802198D4_465D64
|
||||
/* 465D4C 802198BC 24846960 */ addiu $a0, $a0, %lo(D_80226960_472DF0)
|
||||
/* 465D4C 802198BC 24846960 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_watt)
|
||||
dlabel L802198C0_465D50
|
||||
/* 465D50 802198C0 3C048023 */ lui $a0, %hi(D_802283F0_474880)
|
||||
/* 465D50 802198C0 3C048023 */ lui $a0, %hi(b_area_mac_lee_formation_sushie)
|
||||
/* 465D54 802198C4 08086635 */ j L802198D4_465D64
|
||||
/* 465D58 802198C8 248483F0 */ addiu $a0, $a0, %lo(D_802283F0_474880)
|
||||
/* 465D58 802198C8 248483F0 */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_sushie)
|
||||
dlabel L802198CC_465D5C
|
||||
/* 465D5C 802198CC 3C048023 */ lui $a0, %hi(D_8022972C_475BBC)
|
||||
/* 465D60 802198D0 2484972C */ addiu $a0, $a0, %lo(D_8022972C_475BBC)
|
||||
/* 465D5C 802198CC 3C048023 */ lui $a0, %hi(b_area_mac_lee_formation_lakilester)
|
||||
/* 465D60 802198D0 2484972C */ addiu $a0, $a0, %lo(b_area_mac_lee_formation_lakilester)
|
||||
dlabel L802198D4_465D64
|
||||
/* 465D64 802198D4 806301F1 */ lb $v1, 0x1f1($v1)
|
||||
/* 465D68 802198D8 2463000A */ addiu $v1, $v1, 0xa
|
@ -1,101 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80218C74_48DE14
|
||||
/* 48DE14 80218C74 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 48DE18 80218C78 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 48DE1C 80218C7C 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 48DE20 80218C80 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 48DE24 80218C84 AFB40020 */ sw $s4, 0x20($sp)
|
||||
/* 48DE28 80218C88 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 48DE2C 80218C8C AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 48DE30 80218C90 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 48DE34 80218C94 F7BA0040 */ sdc1 $f26, 0x40($sp)
|
||||
/* 48DE38 80218C98 F7B80038 */ sdc1 $f24, 0x38($sp)
|
||||
/* 48DE3C 80218C9C F7B60030 */ sdc1 $f22, 0x30($sp)
|
||||
/* 48DE40 80218CA0 F7B40028 */ sdc1 $f20, 0x28($sp)
|
||||
/* 48DE44 80218CA4 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 48DE48 80218CA8 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DE4C 80218CAC 0C0B1EAF */ jal evt_get_variable
|
||||
/* 48DE50 80218CB0 26100004 */ addiu $s0, $s0, 4
|
||||
/* 48DE54 80218CB4 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 48DE58 80218CB8 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DE5C 80218CBC 0C0B1EAF */ jal evt_get_variable
|
||||
/* 48DE60 80218CC0 0040902D */ daddu $s2, $v0, $zero
|
||||
/* 48DE64 80218CC4 24040168 */ addiu $a0, $zero, 0x168
|
||||
/* 48DE68 80218CC8 0C00A67F */ jal rand_int
|
||||
/* 48DE6C 80218CCC 0040982D */ daddu $s3, $v0, $zero
|
||||
/* 48DE70 80218CD0 4482B000 */ mtc1 $v0, $f22
|
||||
/* 48DE74 80218CD4 00000000 */ nop
|
||||
/* 48DE78 80218CD8 4680B5A0 */ cvt.s.w $f22, $f22
|
||||
/* 48DE7C 80218CDC 3C014238 */ lui $at, 0x4238
|
||||
/* 48DE80 80218CE0 4481C000 */ mtc1 $at, $f24
|
||||
/* 48DE84 80218CE4 0C00A8D4 */ jal cos_deg
|
||||
/* 48DE88 80218CE8 4600B306 */ mov.s $f12, $f22
|
||||
/* 48DE8C 80218CEC 46180002 */ mul.s $f0, $f0, $f24
|
||||
/* 48DE90 80218CF0 00000000 */ nop
|
||||
/* 48DE94 80218CF4 4492A000 */ mtc1 $s2, $f20
|
||||
/* 48DE98 80218CF8 00000000 */ nop
|
||||
/* 48DE9C 80218CFC 4680A520 */ cvt.s.w $f20, $f20
|
||||
/* 48DEA0 80218D00 4600A000 */ add.s $f0, $f20, $f0
|
||||
/* 48DEA4 80218D04 4600008D */ trunc.w.s $f2, $f0
|
||||
/* 48DEA8 80218D08 44121000 */ mfc1 $s2, $f2
|
||||
/* 48DEAC 80218D0C 0C00A8BB */ jal sin_deg
|
||||
/* 48DEB0 80218D10 4600B306 */ mov.s $f12, $f22
|
||||
/* 48DEB4 80218D14 46180002 */ mul.s $f0, $f0, $f24
|
||||
/* 48DEB8 80218D18 00000000 */ nop
|
||||
/* 48DEBC 80218D1C 4493C000 */ mtc1 $s3, $f24
|
||||
/* 48DEC0 80218D20 00000000 */ nop
|
||||
/* 48DEC4 80218D24 4680C620 */ cvt.s.w $f24, $f24
|
||||
/* 48DEC8 80218D28 4600C000 */ add.s $f0, $f24, $f0
|
||||
/* 48DECC 80218D2C 3C014278 */ lui $at, 0x4278
|
||||
/* 48DED0 80218D30 4481D000 */ mtc1 $at, $f26
|
||||
/* 48DED4 80218D34 4600008D */ trunc.w.s $f2, $f0
|
||||
/* 48DED8 80218D38 44131000 */ mfc1 $s3, $f2
|
||||
/* 48DEDC 80218D3C 0C00A8D4 */ jal cos_deg
|
||||
/* 48DEE0 80218D40 4600B306 */ mov.s $f12, $f22
|
||||
/* 48DEE4 80218D44 461A0002 */ mul.s $f0, $f0, $f26
|
||||
/* 48DEE8 80218D48 00000000 */ nop
|
||||
/* 48DEEC 80218D4C 4600A500 */ add.s $f20, $f20, $f0
|
||||
/* 48DEF0 80218D50 4600A08D */ trunc.w.s $f2, $f20
|
||||
/* 48DEF4 80218D54 44141000 */ mfc1 $s4, $f2
|
||||
/* 48DEF8 80218D58 0C00A8BB */ jal sin_deg
|
||||
/* 48DEFC 80218D5C 4600B306 */ mov.s $f12, $f22
|
||||
/* 48DF00 80218D60 461A0002 */ mul.s $f0, $f0, $f26
|
||||
/* 48DF04 80218D64 00000000 */ nop
|
||||
/* 48DF08 80218D68 26100004 */ addiu $s0, $s0, 4
|
||||
/* 48DF0C 80218D6C 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DF10 80218D70 26100004 */ addiu $s0, $s0, 4
|
||||
/* 48DF14 80218D74 4600C600 */ add.s $f24, $f24, $f0
|
||||
/* 48DF18 80218D78 0240302D */ daddu $a2, $s2, $zero
|
||||
/* 48DF1C 80218D7C 4600C08D */ trunc.w.s $f2, $f24
|
||||
/* 48DF20 80218D80 44121000 */ mfc1 $s2, $f2
|
||||
/* 48DF24 80218D84 0C0B2026 */ jal evt_set_variable
|
||||
/* 48DF28 80218D88 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 48DF2C 80218D8C 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DF30 80218D90 26100004 */ addiu $s0, $s0, 4
|
||||
/* 48DF34 80218D94 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 48DF38 80218D98 0C0B2026 */ jal evt_set_variable
|
||||
/* 48DF3C 80218D9C 0260302D */ daddu $a2, $s3, $zero
|
||||
/* 48DF40 80218DA0 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DF44 80218DA4 26100004 */ addiu $s0, $s0, 4
|
||||
/* 48DF48 80218DA8 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 48DF4C 80218DAC 0C0B2026 */ jal evt_set_variable
|
||||
/* 48DF50 80218DB0 0280302D */ daddu $a2, $s4, $zero
|
||||
/* 48DF54 80218DB4 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 48DF58 80218DB8 8E050000 */ lw $a1, ($s0)
|
||||
/* 48DF5C 80218DBC 0C0B2026 */ jal evt_set_variable
|
||||
/* 48DF60 80218DC0 0240302D */ daddu $a2, $s2, $zero
|
||||
/* 48DF64 80218DC4 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 48DF68 80218DC8 8FB40020 */ lw $s4, 0x20($sp)
|
||||
/* 48DF6C 80218DCC 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 48DF70 80218DD0 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 48DF74 80218DD4 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 48DF78 80218DD8 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 48DF7C 80218DDC D7BA0040 */ ldc1 $f26, 0x40($sp)
|
||||
/* 48DF80 80218DE0 D7B80038 */ ldc1 $f24, 0x38($sp)
|
||||
/* 48DF84 80218DE4 D7B60030 */ ldc1 $f22, 0x30($sp)
|
||||
/* 48DF88 80218DE8 D7B40028 */ ldc1 $f20, 0x28($sp)
|
||||
/* 48DF8C 80218DEC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 48DF90 80218DF0 03E00008 */ jr $ra
|
||||
/* 48DF94 80218DF4 27BD0048 */ addiu $sp, $sp, 0x48
|
@ -3776,32 +3776,49 @@ segments:
|
||||
vram: 0x80218000
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x464490, c]
|
||||
- [0x464560, c]
|
||||
- [0x465D90, c]
|
||||
- [0x4661E0, data]
|
||||
- [0x464490, c, actor/chan]
|
||||
- [0x464560, c, actor/lee]
|
||||
- [0x465D90, c, actor/master1]
|
||||
- [0x465D90, c, actor/master2]
|
||||
- [0x465D90, c, actor/master3]
|
||||
- [0x465D90, c, stage/mac_01]
|
||||
- [0x4661E0, c, stage/mac_02]
|
||||
- [0x4661E0, c, area]
|
||||
- [0x4661E0]
|
||||
- dir: battle/area_hos
|
||||
type: code
|
||||
start: 0x47F0B0
|
||||
vram: 0x80218000
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x47F0B0, c]
|
||||
- [0x47F0D0, c]
|
||||
- [0x47F570, c]
|
||||
- [0x4800C0, data]
|
||||
- [0x47F0B0, c, actor/goombario_tutor]
|
||||
- [0x47F0D0, c, actor/ember]
|
||||
- [0x47F200, c, actor/magikoopa]
|
||||
- [0x47F570, c, stage/hos_01]
|
||||
- [0x4800C0, c, stage/hos_00]
|
||||
- [0x4800C0, c, stage/hos_02]
|
||||
- [0x4800C0, c, area]
|
||||
- [0x4800C0]
|
||||
- dir: battle/area_nok
|
||||
type: code
|
||||
start: 0x48D1A0
|
||||
vram: 0x80218000
|
||||
subalign: 4
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x48D1A0, c]
|
||||
- [0x48D700, c]
|
||||
- [0x48DA50, c]
|
||||
- [0x48DBC0, c]
|
||||
- [0x48DCF0, c]
|
||||
- [0x48DFC0, data]
|
||||
- [0x48D1A0, c, area]
|
||||
- [0x48D1A0, c, actor/goomba]
|
||||
- [0x48D420, c, actor/paragoomba]
|
||||
- [0x48D700, c, actor/spiked_goomba]
|
||||
- [0x48D980, c, actor/koopa_troopa]
|
||||
- [0x48DA50, c, actor/fuzzy]
|
||||
- [0x48DBC0, c, actor/paratroopa]
|
||||
- [0x48DCF0, c, actor/kent_c_koopa]
|
||||
- [0x48DFC0, c, stage/nok_01]
|
||||
- [0x48DFC0, c, stage/nok_02]
|
||||
- [0x48DFC0, c, stage/nok_03]
|
||||
- [0x48DFC0, c, stage/nok_04]
|
||||
- [0x48DFC0]
|
||||
- dir: battle/area_trd_part_1
|
||||
type: code
|
||||
start: 0x4A10A0
|
||||
|
@ -6666,14 +6666,14 @@ b_area_mac_SetBackgroundAlpha = 0x80219780; // type:func rom:0x465C10
|
||||
func_802197B8_465C48 = 0x802197B8; // type:func rom:0x465C48
|
||||
func_80219824_465CB4 = 0x80219824; // type:func rom:0x465CB4
|
||||
func_80219900_465D90 = 0x80219900; // type:func rom:0x465D90
|
||||
D_80220524_46C9B4 = 0x80220524; // type:data rom:0x46C9B4
|
||||
D_80222274_46E704 = 0x80222274; // type:data rom:0x46E704
|
||||
D_8022336C_46F7FC = 0x8022336C; // type:data rom:0x46F7FC
|
||||
D_802243F4_470884 = 0x802243F4; // type:data rom:0x470884
|
||||
D_80225958_471DE8 = 0x80225958; // type:data rom:0x471DE8
|
||||
D_80226960_472DF0 = 0x80226960; // type:data rom:0x472DF0
|
||||
D_802283F0_474880 = 0x802283F0; // type:data rom:0x474880
|
||||
D_8022972C_475BBC = 0x8022972C; // type:data rom:0x475BBC
|
||||
b_area_mac_lee_formation_goombario = 0x80220524; // type:data rom:0x46C9B4
|
||||
b_area_mac_lee_formation_kooper = 0x80222274; // type:data rom:0x46E704
|
||||
b_area_mac_lee_formation_bombette = 0x8022336C; // type:data rom:0x46F7FC
|
||||
b_area_mac_lee_formation_parakerry = 0x802243F4; // type:data rom:0x470884
|
||||
b_area_mac_lee_formation_bow = 0x80225958; // type:data rom:0x471DE8
|
||||
b_area_mac_lee_formation_watt = 0x80226960; // type:data rom:0x472DF0
|
||||
b_area_mac_lee_formation_sushie = 0x802283F0; // type:data rom:0x474880
|
||||
b_area_mac_lee_formation_lakilester = 0x8022972C; // type:data rom:0x475BBC
|
||||
D_80232AF0_47EF80 = 0x80232AF0; // type:data rom:0x47EF80
|
||||
D_80232AF8_47EF88 = 0x80232AF8; // type:data rom:0x47EF88
|
||||
D_80232B00_47EF90 = 0x80232B00; // type:data rom:0x47EF90
|
||||
|
Loading…
Reference in New Issue
Block a user