mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
3 more battle maps (#724)
* area_pra2 * finish * sound enum * renamed enum member * fixed alignment * area_pra3 * area_sam * area_sam2
This commit is contained in:
parent
2de8e0c028
commit
76187e5c3b
@ -2406,16 +2406,16 @@ typedef struct SpriteShadingProfile {
|
||||
/* 0xAF */ s8 ambientPower; // ?
|
||||
} SpriteShadingProfile; // size = 0xB0
|
||||
|
||||
typedef struct UnkDuplighost {
|
||||
typedef struct WattEffectData {
|
||||
/* 0x00 */ s32 flags;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x08 */ s32 angle;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ s32 unk_10;
|
||||
/* 0x14 */ struct EffectInstance* effect1;
|
||||
/* 0x18 */ struct EffectInstance* effect2;
|
||||
/* 0x1C */ s32 debuff;
|
||||
} UnkDuplighost;
|
||||
} WattEffectData;
|
||||
|
||||
typedef struct UnkStruct1 {
|
||||
/* 0x00 */ char unk_00[8];
|
||||
|
@ -747,6 +747,13 @@ typedef struct MiscParticlesFXData {
|
||||
s32 unk_50;
|
||||
} MiscParticlesFXData; // size = ?
|
||||
|
||||
typedef struct StaticStatusFXData {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
} StaticStatusFXData; // size = ?
|
||||
|
||||
typedef struct ButterflyFXData {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
|
@ -582,18 +582,25 @@ enum SoundIDs {
|
||||
SOUND_25C = 0x0000025C,
|
||||
SOUND_25D = 0x0000025D,
|
||||
SOUND_262 = 0x00000262,
|
||||
SOUND_281 = 0x00000281,
|
||||
SOUND_282 = 0x00000282,
|
||||
SOUND_283 = 0x00000283,
|
||||
SOUND_289 = 0x00000289,
|
||||
SOUND_BOW_SPOOK = 0x00000291,
|
||||
SOUND_295 = 0x00000295,
|
||||
SOUND_299 = 0x00000299,
|
||||
SOUND_29A = 0x0000029A,
|
||||
SOUND_UNUSED_2C1 = 0x000002C1,
|
||||
SOUND_2C5 = 0x000002C5,
|
||||
SOUND_SMOKE_BURST = 0x000002CD,
|
||||
SOUND_DAYZEE_SONG = 0x000002D7,
|
||||
SOUND_POWER_UP = 0x000002D8,
|
||||
SOUND_2DB = 0x000002DB,
|
||||
SOUND_2DC = 0x000002DC,
|
||||
SOUND_2DE = 0x000002DE,
|
||||
SOUND_2DF = 0x000002DF,
|
||||
SOUND_2E0 = 0x000002E0,
|
||||
SOUND_2EA = 0x000002EA,
|
||||
SOUND_2F1 = 0x000002F1,
|
||||
SOUND_2F4 = 0x000002F4,
|
||||
SOUND_2F6 = 0x000002F6,
|
||||
@ -624,6 +631,7 @@ enum SoundIDs {
|
||||
SOUND_367 = 0x00000367,
|
||||
SOUND_368 = 0x00000368,
|
||||
SOUND_369 = 0x00000369,
|
||||
SOUND_36E = 0x0000036E,
|
||||
SOUND_372 = 0x00000372,
|
||||
SOUND_375 = 0x00000375,
|
||||
SOUND_376 = 0x00000376,
|
||||
@ -632,9 +640,11 @@ enum SoundIDs {
|
||||
SOUND_HIT_PLAYER_SHOCK = 0x0000037A,
|
||||
SOUND_HIT_SHOCK = 0x0000037B,
|
||||
SOUND_GENERAL_WHISTLE = 0x00000395,
|
||||
SOUND_3AB = 0x000003AB,
|
||||
SOUND_3AF = 0x000003AF,
|
||||
SOUND_OPEN_SHELL = 0x000003D4,
|
||||
SOUND_3D9 = 0x000003D9,
|
||||
SOUND_3E0 = 0x000003E0,
|
||||
SOUND_3E1 = 0x000003E1,
|
||||
SOUND_JUMP_3E2 = 0x000003E2,
|
||||
SOUND_MISS_JUMP = 0x000003E3,
|
||||
@ -646,7 +656,11 @@ enum SoundIDs {
|
||||
SOUND_749 = 0x00000749,
|
||||
SOUND_759 = 0x00000759,
|
||||
SOUND_2003 = 0x00002003,
|
||||
SOUND_2004 = 0x00002004,
|
||||
SOUND_2005 = 0x00002005,
|
||||
SOUND_2009 = 0x00002009,
|
||||
SOUND_200A = 0x0000200A,
|
||||
SOUND_200C = 0x0000200C,
|
||||
SOUND_200D = 0x0000200D,
|
||||
SOUND_BOW_VANISH = 0x0000200E,
|
||||
SOUND_BOW_APPEAR = 0x0000200F,
|
||||
@ -656,7 +670,9 @@ enum SoundIDs {
|
||||
SOUND_CANNON1 = 0x00002016,
|
||||
SOUND_CANNON2 = 0x00002017,
|
||||
SOUND_CANNON3 = 0x00002018,
|
||||
SOUND_20C1 = 0x000020C1,
|
||||
SOUND_2019 = 0x00002019,
|
||||
SOUND_201B = 0x0000201B,
|
||||
SOUND_2020 = 0x00002020,
|
||||
SOUND_202C = 0x0000202C,
|
||||
SOUND_202D = 0x0000202D,
|
||||
SOUND_202E = 0x0000202E,
|
||||
@ -664,6 +680,7 @@ enum SoundIDs {
|
||||
SOUND_2030 = 0x00002030,
|
||||
SOUND_INFLICT_SLEEP = 0x00002031,
|
||||
SOUND_INFLICT_STATUS = 0x00002032, //< Stop, poison, paralyze
|
||||
SOUND_2034 = 0x00002034,
|
||||
SOUND_2038 = 0x00002038,
|
||||
SOUND_2039 = 0x00002039,
|
||||
SOUND_205B = 0x0000205B,
|
||||
@ -680,13 +697,18 @@ enum SoundIDs {
|
||||
SOUND_2095 = 0x00002095,
|
||||
SOUND_20A3 = 0x000020A3,
|
||||
SOUND_20A4 = 0x000020A4,
|
||||
SOUND_20B8 = 0x000020B8,
|
||||
SOUND_20C1 = 0x000020C1,
|
||||
SOUND_20C5 = 0x000020C5,
|
||||
SOUND_SPELL_CAST1 = 0x000020D4,
|
||||
SOUND_SPELL_CAST2 = 0x000020D5,
|
||||
SOUND_SPELL_CAST3 = 0x000020D6,
|
||||
SOUND_SPELL_CAST4 = 0x000020D7,
|
||||
SOUND_SPELL_CAST5 = 0x000020D8,
|
||||
SOUND_20DE = 0x000020DE,
|
||||
SOUND_20E3 = 0x000020E3,
|
||||
SOUND_20E7 = 0x000020E7,
|
||||
SOUND_20EE = 0x000020EE,
|
||||
SOUND_20F6 = 0x000020F6,
|
||||
SOUND_2101 = 0x00002101,
|
||||
SOUND_2102 = 0x00002102,
|
||||
|
@ -1354,7 +1354,7 @@ EvtScript N(takeTurn_8021FE6C) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -1430,7 +1430,7 @@ EvtScript N(takeTurn_8021FE6C) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -588,7 +588,7 @@ EvtScript N(takeTurn_8021A628) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -664,7 +664,7 @@ EvtScript N(takeTurn_8021A628) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -320,7 +320,7 @@ EvtScript N(takeTurn_8021A5A0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -396,7 +396,7 @@ EvtScript N(takeTurn_8021A5A0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -318,7 +318,7 @@ EvtScript N(takeTurn_8021E0F0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -394,7 +394,7 @@ EvtScript N(takeTurn_8021E0F0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -320,7 +320,7 @@ EvtScript N(takeTurn_8021C3B0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -396,7 +396,7 @@ EvtScript N(takeTurn_8021C3B0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -318,7 +318,7 @@ EvtScript N(takeTurn_8021FAF0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -394,7 +394,7 @@ EvtScript N(takeTurn_8021FAF0) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -905,7 +905,7 @@ EvtScript N(8022ED10) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(CalculateRotationZ)(Evt* script, s32 isInitialCall);
|
||||
|
||||
EvtScript N(8022F468) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
@ -942,7 +942,7 @@ EvtScript N(8022F468) = {
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
|
||||
EVT_LOOP(20)
|
||||
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(N(CalculateRotationZ), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetPartRotation, -127, 2, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
@ -963,7 +963,7 @@ EvtScript N(8022F468) = {
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
|
||||
EVT_LOOP(14)
|
||||
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(N(CalculateRotationZ), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_SET(LW(7), LW(0))
|
||||
EVT_ADD(LW(7), 180)
|
||||
EVT_CALL(SetPartRotation, -127, 2, 0, 0, LW(7))
|
||||
@ -1002,7 +1002,7 @@ EvtScript N(8022F468) = {
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
|
||||
EVT_LOOP(20)
|
||||
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(N(CalculateRotationZ), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_CALL(SetPartRotation, -127, 2, 0, 0, LW(0))
|
||||
EVT_SET(LW(1), LW(4))
|
||||
EVT_SET(LW(2), LW(5))
|
||||
@ -1023,7 +1023,7 @@ EvtScript N(8022F468) = {
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(1), LW(2), LW(3))
|
||||
EVT_LOOP(14)
|
||||
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(N(CalculateRotationZ), LW(1), LW(2), LW(4), LW(5), LW(0))
|
||||
EVT_SET(LW(7), LW(0))
|
||||
EVT_ADD(LW(7), 180)
|
||||
EVT_CALL(SetPartRotation, -127, 2, 0, 0, LW(7))
|
||||
|
@ -791,7 +791,7 @@ EvtScript N(takeTurn_8021E788) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -867,7 +867,7 @@ EvtScript N(takeTurn_8021E788) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -333,7 +333,7 @@ EvtScript N(takeTurn_8021B19C) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -409,7 +409,7 @@ EvtScript N(takeTurn_8021B19C) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
@ -3,95 +3,27 @@
|
||||
|
||||
#define NAMESPACE b_area_kmr_part_3_sam_01
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_kmr_part_3/448E80", func_80219A40_448E80);
|
||||
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
|
||||
s32 N(D_802336E0_43AB20)[] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(802336F0) = {
|
||||
EVT_CALL(N(Set80071270_0_16))
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8023372C) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(RandInt, 30, LW(0))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_WAIT_FRAMES(LW(0))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_CALL(RotateModel, LW(10), LW(1), 0, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802337F4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(11), LW(1))
|
||||
EVT_EXEC(N(8023372C))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802338D4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle_80233998) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_EXEC(N(802336F0))
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 1)
|
||||
EVT_EXEC(N(802337F4))
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_SET(LW(1), 3)
|
||||
EVT_EXEC(N(802337F4))
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 4)
|
||||
EVT_EXEC(N(802337F4))
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 16)
|
||||
EVT_SET(LW(1), 2)
|
||||
EVT_EXEC(N(802337F4))
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
|
@ -39,7 +39,7 @@ ApiStatus func_80218BFC_6BC78C(Evt* script, s32 isInitialCall) {
|
||||
INCLUDE_ASM(s32, "battle/area_kpa3/6BBC60", func_80218F58_6BCAE8);
|
||||
|
||||
ApiStatus func_802193D4_6BCF64(Evt* script, s32 isInitialCall) {
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->flags = 0;
|
||||
|
||||
@ -56,7 +56,7 @@ ApiStatus func_802193D4_6BCF64(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_80219428_6BCFB8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
@ -64,7 +64,7 @@ ApiStatus func_80219428_6BCFB8(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_80219474_6BD004(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
@ -72,7 +72,7 @@ ApiStatus func_80219474_6BD004(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802194C0_6BD050(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
|
@ -1,900 +1,3 @@
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/magikoopa.h"
|
||||
#include "sprite/npc/flying_magikoopa.h"
|
||||
|
||||
#define NAMESPACE b_area_kzn_red_magikoopa
|
||||
|
||||
extern s32 N(idleAnimations_802210B0)[];
|
||||
extern s32 N(idleAnimations_802210FC)[];
|
||||
extern s32 N(idleAnimations_80221148)[];
|
||||
extern EvtScript N(init_80223298);
|
||||
extern EvtScript N(init_8022333C);
|
||||
extern EvtScript N(takeTurn_802233E0);
|
||||
extern EvtScript N(run_away);
|
||||
|
||||
s32 N(defenseTable_80220E60)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_80220E6C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_80220E78)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_80220F24)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(partsTable_80220FD0)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_802210B0),
|
||||
.defenseTable = N(defenseTable_80220E60),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0xFB,
|
||||
.unk_1D = 0xF4,
|
||||
},
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(partsTable_80220FF4)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_802210B0),
|
||||
.defenseTable = N(defenseTable_80220E6C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_800000,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0xFB,
|
||||
.unk_1D = 0xF4,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -10, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_802210FC),
|
||||
.defenseTable = N(defenseTable_80220E6C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1D = 248,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations_80221148),
|
||||
.defenseTable = N(defenseTable_80220E6C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_RED_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80220FD0)),
|
||||
.partsData = N(partsTable_80220FD0),
|
||||
.script = &N(init_80223298),
|
||||
.statusTable = N(statusTable_80220E78),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 36, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 32 },
|
||||
};
|
||||
|
||||
ActorBlueprint N(flying) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_FLYING_RED_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(partsTable_80220FF4)),
|
||||
.partsData = N(partsTable_80220FF4),
|
||||
.script = &N(init_8022333C),
|
||||
.statusTable = N(statusTable_80220F24),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 75,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 48, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -25, 20 },
|
||||
.statusMessageOffset = { 1, 34 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_802210B0)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_magikoopa_Palette_01_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_802210FC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations_80221148)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
#include "world/common/UnkFunc52.inc.c"
|
||||
|
||||
EvtScript N(idle_80221154) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent_80221164) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(N(run_away))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022167C) = {
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_80000)
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(GetSelectedMoveID), LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(131)
|
||||
EVT_CASE_OR_EQ(132)
|
||||
EVT_CASE_OR_EQ(133)
|
||||
EVT_CASE_OR_EQ(136)
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(80221788) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_POW)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_100000, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(2), 1)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x301)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 150, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(3))
|
||||
EVT_IF_EQ(LW(3), EVENT_15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_ADD(LW(4), 10)
|
||||
EVT_ADD(LW(5), 5)
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LW(3), LW(4), LW(5), EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_LOOP(20)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221164)))
|
||||
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA)
|
||||
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_ADDR(N(statusTable_80220E78)))
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LW(0))
|
||||
EVT_MOD(LW(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LW(0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent_80221D84) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(EVENT_HIT_COMBO)
|
||||
EVT_EXEC_WAIT(N(8022167C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
|
||||
EVT_EXEC_WAIT(N(8022167C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(80221788))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_15)
|
||||
EVT_EXEC_WAIT(N(8022167C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(80221788))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(N(run_away))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(rMagikoopa_ShapeSpell) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LW(0), LW(1), LW(2), EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(9))
|
||||
EVT_IF_FLAG(LW(9), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 50)
|
||||
EVT_SET(LW(4), 0)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 25)
|
||||
EVT_WAIT_FRAMES(50)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(14)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 10)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 20)
|
||||
EVT_WAIT_FRAMES(18)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_WAIT_FRAMES(19)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(rMagikoopa_WandStrike) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2DB)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 25)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(11)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2DC)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(run_away) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NE(LW(0), EVENT_SCARE_AWAY)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 200)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_EXEC_WAIT(ForceNextTarget)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(init_80223298) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221154)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802233E0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221164)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(init_8022333C) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle_80221154)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn_802233E0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_80221D84)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn_802233E0) = {
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
|
||||
EVT_CALL(GetIndexFromHome, LW(0), LW(1))
|
||||
EVT_CALL(GetBattleVar, 2, LW(2))
|
||||
EVT_IF_GT(LW(1), LW(2))
|
||||
EVT_CALL(N(UnkFunc52), LW(0), LW(3))
|
||||
EVT_IF_EQ(LW(3), 0)
|
||||
EVT_CALL(GetActorAttackBoost, LW(0), LW(4))
|
||||
EVT_IF_LT(LW(4), 3)
|
||||
EVT_SET(LW(8), LW(0))
|
||||
EVT_CALL(SetBattleVar, 2, LW(1))
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_EXEC_WAIT(N(run_away))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_EXEC_WAIT(N(rMagikoopa_ShapeSpell))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(rMagikoopa_WandStrike))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 6)
|
||||
EVT_ADD(LW(1), 12)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 16)
|
||||
EVT_ADD(LW(1), 31)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, LW(8), 0x2DD)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_8026BF48, 1)
|
||||
EVT_CALL(BoostAttack, LW(8), 1)
|
||||
EVT_CALL(func_8026BF48, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(WaitForBuffDone)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
#include "battle/common/actor/red_magikoopa.inc.c"
|
||||
|
@ -2824,7 +2824,7 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/area_mac/actor/lee", func_80219188_465618);
|
||||
|
||||
ApiStatus func_80219604_465A94(Evt* script, s32 isInitialCall) {
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[3];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.actorID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->flags = 0;
|
||||
|
||||
@ -2848,7 +2848,7 @@ EvtScript N(idle_80225B68) = {
|
||||
|
||||
ApiStatus func_80219658_465AE8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
@ -2856,7 +2856,7 @@ ApiStatus func_80219658_465AE8(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802196A4_465B34(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
@ -2864,7 +2864,7 @@ ApiStatus func_802196A4_465B34(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802196F0_465B80(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||
|
||||
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
|
@ -3,80 +3,16 @@
|
||||
|
||||
#define NAMESPACE b_area_pra2_sam_04
|
||||
|
||||
u16 D_802211E0_669930[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_pra2/660E10", func_802186C0_660E10);
|
||||
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
void func_802189E0_661130(void) {
|
||||
enable_background_wave();
|
||||
}
|
||||
|
||||
EvtScript N(802211F0) = {
|
||||
EVT_CALL(N(Set80071270_0_16))
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022122C) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(RandInt, 30, LW(0))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_WAIT_FRAMES(LW(0))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_CALL(RotateModel, LW(10), LW(1), 0, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802212F4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(11), LW(1))
|
||||
EVT_EXEC(N(8022122C))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802213D4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_EXEC(N(802211F0))
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,85 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#include "world/common/UnkFunc62.inc.c"
|
||||
|
||||
#include "common/ActorJumpToPos.inc.c"
|
||||
|
||||
#include "common/UnkActorSizeFunc.inc.c"
|
||||
|
||||
#include "common/UnkEffect6CFunc.inc.c"
|
||||
|
||||
ApiStatus func_80218AF4_66A874(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;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_pra3/669D80", func_80218B2C_66A8AC);
|
||||
|
||||
#define NAMESPACE dup2_b_area_pra3
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_pra3/669D80", func_80218C40_66A9C0);
|
||||
|
||||
#include "common/UnkActorPosFunc.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_pra3/669D80", func_80218E88_66AC08);
|
||||
|
||||
ApiStatus func_80219304_66B084(Evt* script, s32 isInitialCall) {
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->flags = 0;
|
||||
|
||||
if (unkDuplighost->effect1 != NULL) {
|
||||
unkDuplighost->effect1->flags |= 0x10;
|
||||
}
|
||||
|
||||
if (unkDuplighost->effect2 != NULL) {
|
||||
unkDuplighost->effect2->flags |= 0x10;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80219358_66B0D8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802193A4_66B124(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_pra3/669D80", func_802193F0_66B170);
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
ApiStatus func_802194B8_66B238(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_pra3/669D80", func_80219524_66B2A4);
|
||||
|
||||
#define NAMESPACE dup3_b_area_pra3
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#include "common/UnkBattleFunc2.inc.c"
|
@ -1,14 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#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,23 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#define NAMESPACE dup_b_area_pra3
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#define NAMESPACE dup_b_area_pra3
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#define NAMESPACE dup_b_area_pra3
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#define NAMESPACE dup_b_area_pra3
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
#define NAMESPACE dup_b_area_pra3
|
||||
#include "world/common/UnkFunc52.inc.c"
|
||||
#define NAMESPACE b_area_pra3
|
5
src/battle/area_pra3/actor/duplighost.c
Normal file
5
src/battle/area_pra3/actor/duplighost.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_duplighost
|
||||
|
||||
#include "battle/common/actor/duplighost.inc.c"
|
5
src/battle/area_pra3/actor/gray_magikoopa.c
Normal file
5
src/battle/area_pra3/actor/gray_magikoopa.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_gray_magikoopa
|
||||
|
||||
#include "battle/common/actor/gray_magikoopa.inc.c"
|
3
src/battle/area_pra3/actor/red_magikoopa.c
Normal file
3
src/battle/area_pra3/actor/red_magikoopa.c
Normal file
@ -0,0 +1,3 @@
|
||||
#define NAMESPACE b_area_pra3_red_magikoopa
|
||||
|
||||
#include "battle/common/actor/red_magikoopa.inc.c"
|
1194
src/battle/area_pra3/actor/swoopula.c
Normal file
1194
src/battle/area_pra3/actor/swoopula.c
Normal file
File diff suppressed because it is too large
Load Diff
5
src/battle/area_pra3/actor/white_clubba.c
Normal file
5
src/battle/area_pra3/actor/white_clubba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_white_clubba
|
||||
|
||||
#include "battle/common/actor/white_clubba.inc.c"
|
120
src/battle/area_pra3/area.c
Normal file
120
src/battle/area_pra3/area.c
Normal file
@ -0,0 +1,120 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3
|
||||
|
||||
extern ActorBlueprint N(swoopula);
|
||||
extern ActorBlueprint N(duplighost);
|
||||
extern ActorBlueprint N(red_magikoopa);
|
||||
extern ActorBlueprint N(gray_magikoopa);
|
||||
extern ActorBlueprint N(white_clubba);
|
||||
|
||||
extern Stage N(pra_01);
|
||||
extern Stage N(pra_02);
|
||||
extern Stage N(pra_03);
|
||||
extern Stage N(pra_03b);
|
||||
extern Stage N(pra_03c);
|
||||
extern Stage N(pra_04);
|
||||
|
||||
Vec3i N(pos_swoopula)[] = {
|
||||
{ 15, 133, -25 },
|
||||
{ 55, 133, -25 },
|
||||
{ 95, 133, -25 },
|
||||
{ 135, 133, -25 },
|
||||
};
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(swoopula), .home = { .vec = &N(pos_swoopula)[0] }, .priority = 10 },
|
||||
{ .actor = &N(swoopula), .home = { .vec = &N(pos_swoopula)[1] }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_03) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_04) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_05) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_06) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(swoopula), .home = { .vec = &N(pos_swoopula)[2] }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_07) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(swoopula), .home = { .vec = &N(pos_swoopula)[1] }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_08) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(red_magikoopa), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_09) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(red_magikoopa), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0A) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(white_clubba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
Formation N(formation_0B) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(gray_magikoopa), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(red_magikoopa), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_0C) = {
|
||||
{ .actor = &N(white_clubba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(white_clubba), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("バサバサチュルルx2,バケバケ", N(formation_01), &N(pra_01)),
|
||||
BATTLE("バケバケ", N(formation_02), &N(pra_01)),
|
||||
BATTLE("バケバケx2", N(formation_03), &N(pra_01)),
|
||||
BATTLE("バケバケx3", N(formation_04), &N(pra_01)),
|
||||
BATTLE("バケバケx4", N(formation_05), &N(pra_01)),
|
||||
BATTLE("バケバケx2,バサバサチュルル", N(formation_06), &N(pra_01)),
|
||||
BATTLE("バケバケ,バサバサチュルル,バケバケ", N(formation_07), &N(pra_01)),
|
||||
BATTLE("バケバケ,レッドカメック", N(formation_08), &N(pra_01)),
|
||||
BATTLE("バケバケx2,レッドカメック", N(formation_09), &N(pra_01)),
|
||||
BATTLE("バケバケ,ホワイトガボン,バケバケ", N(formation_0A), &N(pra_01)),
|
||||
BATTLE("バケバケx2,グレイカメック,レッドカメック", N(formation_0B), &N(pra_01)),
|
||||
BATTLE("ホワイトガボンx2,バケバケ", N(formation_0C), &N(pra_01)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "pra_01", &N(pra_01) },
|
||||
{ "pra_02", &N(pra_02) },
|
||||
{ "pra_03", &N(pra_03) },
|
||||
{ "pra_03b", &N(pra_03b) },
|
||||
{ "pra_03c", &N(pra_03c) },
|
||||
{ "pra_04", &N(pra_04) },
|
||||
{},
|
||||
};
|
32
src/battle/area_pra3/stage/pra_01.c
Normal file
32
src/battle/area_pra3/stage/pra_01.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/pra_bt01_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_01
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_CALL(func_802536A8, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
MODEL_o383, MODEL_o384, MODEL_o385, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt01_shape",
|
||||
.hit = "pra_bt01_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
95
src/battle/area_pra3/stage/pra_02.c
Normal file
95
src/battle/area_pra3/stage/pra_02.c
Normal file
@ -0,0 +1,95 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/pra_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_02
|
||||
|
||||
EvtScript N(80231B40) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(80231C10) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(80231CFC) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, 0, LW(0))
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 1, 0, LW(1))
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_CALL(func_802536A8, 1)
|
||||
EVT_SET(LW(0), 17)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(2), 3000)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_EXEC(N(80231B40))
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(2), 3000)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_EXEC(N(80231B40))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
MODEL_o383, MODEL_o384, MODEL_o385, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt02_shape",
|
||||
.hit = "pra_bt02_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
24
src/battle/area_pra3/stage/pra_03.c
Normal file
24
src/battle/area_pra3/stage/pra_03.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_03
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt03_shape",
|
||||
.hit = "pra_bt03_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
};
|
25
src/battle/area_pra3/stage/pra_03b.c
Normal file
25
src/battle/area_pra3/stage/pra_03b.c
Normal file
@ -0,0 +1,25 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_03b
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_CALL(SetGroupEnabled, 33, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt03_shape",
|
||||
.hit = "pra_bt03_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
};
|
26
src/battle/area_pra3/stage/pra_03c.c
Normal file
26
src/battle/area_pra3/stage/pra_03c.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_03c
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_CALL(SetGroupEnabled, 33, 0)
|
||||
EVT_CALL(SetGroupEnabled, 38, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt03_shape",
|
||||
.hit = "pra_bt03_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
};
|
89
src/battle/area_pra3/stage/pra_04.c
Normal file
89
src/battle/area_pra3/stage/pra_04.c
Normal file
@ -0,0 +1,89 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_pra3_pra_04
|
||||
|
||||
EvtScript N(802320D0) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), LW(1))
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802321A0) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, LW(0), 0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 1, LW(1), 0)
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8023228C) = {
|
||||
EVT_SET(LW(10), LW(1))
|
||||
EVT_SET(LW(11), LW(2))
|
||||
EVT_SET(LW(12), LW(3))
|
||||
EVT_CALL(SetTexPanner, LW(0), LW(1))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 0, 0, LW(0))
|
||||
EVT_CALL(SetTexPanOffset, LW(10), 1, 0, LW(1))
|
||||
EVT_ADD(LW(0), LW(11))
|
||||
EVT_ADD(LW(1), LW(12))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
|
||||
EVT_SET(LW(0), 1)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(2), 3000)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_EXEC(N(802320D0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LW(1), 1)
|
||||
EVT_SET(LW(2), 3000)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_EXEC(N(802320D0))
|
||||
EVT_CALL(func_802536A8, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "pra_tex",
|
||||
.shape = "pra_bt04_shape",
|
||||
.hit = "pra_bt04_hit",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
};
|
@ -1,98 +0,0 @@
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#include "world/common/UnkFunc62.inc.c"
|
||||
|
||||
#include "common/ActorJumpToPos.inc.c"
|
||||
|
||||
#include "common/UnkActorSizeFunc.inc.c"
|
||||
|
||||
#include "common/UnkEffect6CFunc.inc.c"
|
||||
|
||||
ApiStatus func_80218AF4_624694(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_80218B2C_6246CC(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;
|
||||
}
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
#include "common/UnkActorPosFunc.inc.c"
|
||||
|
||||
#define NAMESPACE dup_b_area_sam
|
||||
#include "common/UnkActorPosFunc.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/623BA0", func_80218E88_624A28);
|
||||
|
||||
ApiStatus func_80219304_624EA4(Evt* script, s32 isInitialCall) {
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
|
||||
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_80219358_624EF8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.actorID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802193A4_624F44(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802193F0_624F90(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
UnkDuplighost* unkDuplighost = (UnkDuplighost*)get_actor(script->owner1.enemyID)->state.varTable[2];
|
||||
|
||||
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
ApiStatus func_802194B8_625058(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_sam/623BA0", func_80219524_6250C4);
|
||||
|
||||
#define NAMESPACE dup_b_area_sam
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#include "common/UnkEffect6FFunc.inc.c"
|
@ -1,15 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
#include "world/common/UnkFunc52.inc.c"
|
@ -1,60 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_80219BB0_625750);
|
||||
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_80219ED0_625A70);
|
||||
|
||||
#define NAMESPACE dup_b_area_sam
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#define NAMESPACE dup_b_area_sam
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_8021A1F0_625D90);
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_8021A510_6260B0);
|
||||
|
||||
#define NAMESPACE dup3_b_area_sam
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#define NAMESPACE dup3_b_area_sam
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_8021A830_6263D0);
|
||||
|
||||
#define NAMESPACE dup4_b_area_sam
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#define NAMESPACE dup4_b_area_sam
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_8021AB50_6266F0);
|
||||
|
||||
#define NAMESPACE dup5_b_area_sam
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
#define NAMESPACE dup5_b_area_sam
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam/625750", func_8021AE70_626A10);
|
5
src/battle/area_sam/actor/duplighost.c
Normal file
5
src/battle/area_sam/actor/duplighost.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_duplighost
|
||||
|
||||
#include "battle/common/actor/duplighost.inc.c"
|
483
src/battle/area_sam/actor/frost_piranha.c
Normal file
483
src/battle/area_sam/actor/frost_piranha.c
Normal file
@ -0,0 +1,483 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/putrid_piranha.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_frost_piranha
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(handleEvent);
|
||||
extern EvtScript N(attack_bite);
|
||||
extern EvtScript N(attack_icy_breath);
|
||||
|
||||
s32 N(idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_putrid_piranha_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_putrid_piranha_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_PARALYZE, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_PARALYZE, NPC_ANIM_putrid_piranha_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_putrid_piranha_Palette_01_Anim_F,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_FIRE, -2,
|
||||
ELEMENT_ICE, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 95,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 50,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 90,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 85,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -15, 50 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_ICY,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 3,
|
||||
.unk_1D = -14,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_FROST_PIRANHA,
|
||||
.level = 22,
|
||||
.maxHP = 10,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 70,
|
||||
.airLiftChance = 20,
|
||||
.spookChance = 20,
|
||||
.baseStatusChance = 20,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 1,
|
||||
.size = { 60, 52 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -22, 32 },
|
||||
.statusMessageOffset = { 1, 44 },
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_DIZZY)
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -27, 33)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 5, -11)
|
||||
EVT_CALL(N(UnkBattleFunc1), -37, 9, -7, 31)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -15, 50)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 3, -14)
|
||||
EVT_CALL(N(UnkBattleFunc1), -22, 32, 1, 44)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(return_home) = {
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_putrid_piranha_Palette_01_Anim_11)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_putrid_piranha_Palette_01_Anim_11)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_11)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_EXEC_WAIT(N(return_home))
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_putrid_piranha_Palette_01_Anim_E)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_putrid_piranha_Palette_01_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
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_EXEC_WAIT(N(attack_bite))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_FROZEN)
|
||||
EVT_EXEC_WAIT(N(attack_bite))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(RandInt, 1000, LW(0))
|
||||
EVT_IF_LT(LW(0), 250)
|
||||
EVT_EXEC_WAIT(N(attack_icy_breath))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(attack_bite))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attack_bite) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_18)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 27)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SET(LW(3), LW(0))
|
||||
EVT_SET(LW(4), LW(1))
|
||||
EVT_SET(LW(5), LW(2))
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(6), LW(7), LW(8))
|
||||
EVT_ADD(LW(3), LW(6))
|
||||
EVT_ADD(LW(4), LW(7))
|
||||
EVT_ADD(LW(5), LW(8))
|
||||
EVT_DIV(LW(3), 2)
|
||||
EVT_DIV(LW(4), 2)
|
||||
EVT_DIV(LW(5), 2)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
|
||||
EVT_CALL(SetBattleCamTarget, LW(3), LW(4), LW(5))
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_17)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 27)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_1)
|
||||
EVT_END_IF
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20DE)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_5)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_6)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_7)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(14)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_18)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_17)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_EXEC_WAIT(N(return_home))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
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_putrid_piranha_Palette_01_Anim_5)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_6)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SET(LW(15), LW(0))
|
||||
EVT_SWITCH(LW(15))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_7)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_18)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_17)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_EXEC_WAIT(N(return_home))
|
||||
EVT_END_IF
|
||||
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/UnkEffect6FFunc.inc.c"
|
||||
|
||||
EvtScript N(attack_icy_breath) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_3)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 50)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_B)
|
||||
EVT_WAIT_FRAMES(11)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_3AB)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 12)
|
||||
EVT_SET(LW(1), 5)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(0.4))
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 32)
|
||||
EVT_SET(LW(1), 13)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkEffect6FFunc), LW(2), LW(0), LW(1), LW(2), LW(3), 30, 120, 0, 120)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_C)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_D)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(14)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_EXEC_WAIT(N(return_home))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(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(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_ICE | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 65535, 0x00000002 | STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_40 | 0x00000080 | STATUS_FLAG_200 | STATUS_FLAG_FROZEN, 0, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SET(LW(15), LW(0))
|
||||
EVT_SWITCH(LW(15))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_putrid_piranha_Palette_01_Anim_D)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_EXEC_WAIT(N(return_home))
|
||||
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_sam/actor/gray_magikoopa.c
Normal file
5
src/battle/area_sam/actor/gray_magikoopa.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_gray_magikoopa
|
||||
|
||||
#include "battle/common/actor/gray_magikoopa.inc.c"
|
493
src/battle/area_sam/actor/gulpit.c
Normal file
493
src/battle/area_sam/actor/gulpit.c
Normal file
@ -0,0 +1,493 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/gulpit.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_gulpit
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(handleEvent);
|
||||
|
||||
s32 N(idleAnimations1)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_gulpit_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_gulpit_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_gulpit_Palette_00_Anim_F,
|
||||
STATUS_POISON, NPC_ANIM_gulpit_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_gulpit_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_gulpit_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_gulpit_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_gulpit_Palette_00_Anim_E,
|
||||
STATUS_FEAR, NPC_ANIM_gulpit_Palette_00_Anim_E,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_gulpit_Palette_00_Anim_10,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations3)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_gulpit_Palette_00_Anim_12,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 80,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 90,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 10,
|
||||
STATUS_PARALYZE, 80,
|
||||
STATUS_SHRINK, 75,
|
||||
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, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 1,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -7, 48 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations1),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -3,
|
||||
.unk_1D = -23,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations2),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = 0,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations3),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = 0,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GULPIT,
|
||||
.level = 22,
|
||||
.maxHP = 12,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 60,
|
||||
.airLiftChance = 50,
|
||||
.spookChance = 50,
|
||||
.baseStatusChance = 70,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 1,
|
||||
.size = { 53, 50 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -3, 37 },
|
||||
.statusMessageOffset = { 10, 45 },
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(returnHome) = {
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attack_lick) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 80)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20EE)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_4)
|
||||
EVT_WAIT_FRAMES(9)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attack_rock) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(GetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_SUB(LW(2), 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_2)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20EE)
|
||||
EVT_CALL(GetActorVar, LW(10), 0, LW(0))
|
||||
EVT_SET(LW(11), LW(0))
|
||||
EVT_SWITCH(LW(11))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(RemoveActor, LW(10))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_6)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_7)
|
||||
EVT_SET(LW(10), 2)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_8)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(RemoveActor, LW(10))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_9)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_A)
|
||||
EVT_SET(LW(10), 3)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetPartSounds, ACTOR_SELF, LW(10), 2, 985, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(9), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(10), ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 5)
|
||||
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LW(10), EVT_FLOAT(14.0))
|
||||
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LW(10), EVT_FLOAT(0.01))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2), 0, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(10), ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_IF_EQ(LW(9), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
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(SetPartFlagBits, ACTOR_SELF, LW(10), ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LW(10), EVT_FLOAT(14.0))
|
||||
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LW(10), EVT_FLOAT(0.01))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2), 0, 1)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 7, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_1)
|
||||
EVT_CALL(GetPartOffset, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), -100)
|
||||
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LW(10), EVT_FLOAT(1.0))
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, LW(10), LW(0), LW(1), LW(2), 25, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(10), ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_EXEC_WAIT(N(attack_lick))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_EXEC_WAIT(N(attack_lick))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(10), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 65538)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
|
||||
EVT_CALL(GetOriginalActorType, LW(0), LW(2))
|
||||
EVT_IF_EQ(LW(2), ACTOR_TYPE_GULPIT_ROCKS)
|
||||
EVT_ADD(LW(10), 1)
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(11), LW(0))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LW(12), LW(0))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_SET(LW(13), LW(0))
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_EXEC_WAIT(N(attack_lick))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(0), LW(11))
|
||||
EVT_EXEC_WAIT(N(attack_rock))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(RandInt, 1, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LW(0), LW(11))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(0), LW(12))
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(N(attack_rock))
|
||||
EVT_CASE_GE(3)
|
||||
EVT_CALL(RandInt, 2, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LW(0), LW(11))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(0), LW(12))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LW(0), LW(13))
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(N(attack_rock))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
187
src/battle/area_sam/actor/gulpit_rocks.c
Normal file
187
src/battle/area_sam/actor/gulpit_rocks.c
Normal file
@ -0,0 +1,187 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/gulpit.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_gulpit_rocks
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(handleEvent);
|
||||
|
||||
s32 N(idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_gulpit_Palette_00_Anim_10,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_gulpit_Palette_00_Anim_12,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 0,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 0,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 0,
|
||||
STATUS_SHRINK, 0,
|
||||
STATUS_STOP, 0,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 14 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -6,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_40000 | ACTOR_FLAG_NO_ATTACK,
|
||||
.type = ACTOR_TYPE_GULPIT_ROCKS,
|
||||
.level = 0,
|
||||
.maxHP = 1,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 0,
|
||||
.airLiftChance = 100,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 100,
|
||||
.coinReward = 0,
|
||||
.size = { 32, 18 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations)))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_10)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_CALL(SetActorSize, ACTOR_SELF, 24, 15)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations2)))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_12)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_CALL(SetActorSize, ACTOR_SELF, 10, 8)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(setAnim) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(10))
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(1), LW(2))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(N(setAnim))
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(N(setAnim))
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_BURN_DEATH)
|
||||
EVT_CASE_OR_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_gulpit_Palette_00_Anim_10)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_gulpit_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(N(setAnim))
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_11)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_gulpit_Palette_00_Anim_13)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayEffect, EFFECT_LANDING_DUST, 1, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
5
src/battle/area_sam/actor/white_clubba.c
Normal file
5
src/battle/area_sam/actor/white_clubba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_white_clubba
|
||||
|
||||
#include "battle/common/actor/white_clubba.inc.c"
|
236
src/battle/area_sam/area.c
Normal file
236
src/battle/area_sam/area.c
Normal file
@ -0,0 +1,236 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_sam
|
||||
|
||||
extern ActorBlueprint N(duplighost);
|
||||
extern ActorBlueprint N(gulpit);
|
||||
extern ActorBlueprint N(gulpit_rocks);
|
||||
extern ActorBlueprint N(frost_piranha);
|
||||
extern ActorBlueprint N(gray_magikoopa);
|
||||
extern ActorBlueprint N(white_clubba);
|
||||
|
||||
extern Stage N(sam_01);
|
||||
extern Stage N(sam_02);
|
||||
extern Stage N(sam_02b);
|
||||
extern Stage N(sam_02c);
|
||||
extern Stage N(sam_02d);
|
||||
extern Stage N(sam_03);
|
||||
|
||||
|
||||
Vec3i N(pos_rocks_1)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_2)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_3)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_4)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_5)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_6)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_7)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Vec3i N(pos_rocks_8)[] = {
|
||||
{ -35, 0, -52 },
|
||||
{ -20, 0, -50 },
|
||||
{ -17, 0, -40 },
|
||||
{ -7, 0, -48 },
|
||||
{ -28, 0, -46 },
|
||||
};
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(gulpit), .home = { .index = 1 }, .priority = 20 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 2 }, .priority = 19 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_1)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_1)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_1)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_1)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_1)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_03) = {
|
||||
{ .actor = &N(gulpit), .home = { .index = 0 }, .priority = 20 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 1 }, .priority = 19 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 2 }, .priority = 18 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_2)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_2)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_2)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_2)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_2)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_04) = {
|
||||
{ .actor = &N(gulpit), .home = { .index = 0 }, .priority = 20 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 1 }, .priority = 19 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 2 }, .priority = 18 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_3)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_3)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_3)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_3)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_3)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_05) = {
|
||||
{ .actor = &N(gulpit), .home = { .index = 0 }, .priority = 20 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 19 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 2 }, .priority = 18 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_4)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_4)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_4)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_4)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_4)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_06) = {
|
||||
{ .actor = &N(gulpit), .home = { .index = 0 }, .priority = 20 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 19 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 2 }, .priority = 18 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 3 }, .priority = 17 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_5)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_5)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_5)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_5)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_5)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_07) = {
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_08) = {
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_09) = {
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 2 }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_6)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_6)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_6)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_6)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_6)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_0A) = {
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_7)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_7)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_7)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_7)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_7)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_0B) = {
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(gulpit), .home = { .index = 3 }, .priority = 7 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_8)[0] }, .priority = 9 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_8)[1] }, .priority = 8 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_8)[2] }, .priority = 7, .var0 = 1 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_8)[3] }, .priority = 6 },
|
||||
{ .actor = &N(gulpit_rocks), .home = { .vec = &N(pos_rocks_8)[4] }, .priority = 5, .var0 = 1 },
|
||||
};
|
||||
|
||||
Formation N(formation_0C) = {
|
||||
{ .actor = &N(white_clubba), .home = { .index = 1 }, .priority = 10 },
|
||||
{ .actor = &N(white_clubba), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
Formation N(formation_0D) = {
|
||||
{ .actor = &N(white_clubba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(white_clubba), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
Formation N(formation_0E) = {
|
||||
{ .actor = &N(white_clubba), .home = { .index = 0 }, .priority = 10 },
|
||||
{ .actor = &N(frost_piranha), .home = { .index = 1 }, .priority = 9 },
|
||||
{ .actor = &N(white_clubba), .home = { .index = 2 }, .priority = 8 },
|
||||
{ .actor = &N(gray_magikoopa), .home = { .index = 3 }, .priority = 7 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("バケバケx2", N(formation_01), &N(sam_01)),
|
||||
BATTLE("ゴックンx2", N(formation_02), &N(sam_01)),
|
||||
BATTLE("ゴックンx3", N(formation_03), &N(sam_01)),
|
||||
BATTLE("ゴックンx2,アイスパックン", N(formation_04), &N(sam_01)),
|
||||
BATTLE("ゴックン,アイスパックン,ゴックン", N(formation_05), &N(sam_01)),
|
||||
BATTLE("ゴックン,アイスパックン,ゴックン,アイスパックン", N(formation_06), &N(sam_01)),
|
||||
BATTLE("アイスパックンx2", N(formation_07), &N(sam_01)),
|
||||
BATTLE("アイスパックンx4", N(formation_08), &N(sam_01)),
|
||||
BATTLE("アイスパックンx2,ゴックン", N(formation_09), &N(sam_01)),
|
||||
BATTLE("アイスパックン,ゴックン,アイスパックン", N(formation_0A), &N(sam_01)),
|
||||
BATTLE("アイスパックン,ゴックン,アイスパックン,ゴックン", N(formation_0B), &N(sam_01)),
|
||||
BATTLE("ホワイトガボンx2", N(formation_0C), &N(sam_01)),
|
||||
BATTLE("ホワイトガボン,パックン,ガボン,パックン", N(formation_0D), &N(sam_01)),
|
||||
BATTLE("ホワイトガボン,パックン,ガボン,グレイカメック", N(formation_0E), &N(sam_01)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "sam_01", &N(sam_01) },
|
||||
{ "sam_02", &N(sam_02) },
|
||||
{ "sam_02b", &N(sam_02b) },
|
||||
{ "sam_02c", &N(sam_02c) },
|
||||
{ "sam_02d", &N(sam_02d) },
|
||||
{ "sam_03", &N(sam_03) },
|
||||
{},
|
||||
};
|
51
src/battle/area_sam/stage/sam_01.c
Normal file
51
src/battle/area_sam/stage/sam_01.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt01_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_01
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 1)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_SET(LW(1), 3)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 4)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 16)
|
||||
EVT_SET(LW(1), 2)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_saku, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt01_shape",
|
||||
.hit = "sam_bt01_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
53
src/battle/area_sam/stage/sam_02.c
Normal file
53
src/battle/area_sam/stage/sam_02.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_02
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 12, 0)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 24)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_END_THREAD
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
36
src/battle/area_sam/stage/sam_02b.c
Normal file
36
src/battle/area_sam/stage/sam_02b.c
Normal file
@ -0,0 +1,36 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_02b
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
37
src/battle/area_sam/stage/sam_02c.c
Normal file
37
src/battle/area_sam/stage/sam_02c.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_02c
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
38
src/battle/area_sam/stage/sam_02d.c
Normal file
38
src/battle/area_sam/stage/sam_02d.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_02d
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 12, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
55
src/battle/area_sam/stage/sam_03.c
Normal file
55
src/battle/area_sam/stage/sam_03.c
Normal file
@ -0,0 +1,55 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt03_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam_sam_03
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
void func_8021AE70_626A10(void) {
|
||||
enable_background_wave();
|
||||
}
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 16)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 25)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 19)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_END_THREAD
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_o278, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt03_shape",
|
||||
.hit = "sam_bt03_hit",
|
||||
.bg = "sam_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
@ -1,13 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63D1E0", func_80218000_63D1E0);
|
||||
|
||||
#include "common/Dist3D.inc.c"
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
@ -1,9 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup_b_area_sam2
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#include "common/BattleAreaAngleStuff.inc.c"
|
@ -1,15 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam2
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#include "world/common/UnkFunc52.inc.c"
|
@ -1,61 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_80218B80_63DD60);
|
||||
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_80218EA0_63E080);
|
||||
|
||||
#define NAMESPACE dup_b_area_sam2
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup_b_area_sam2
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_802191C0_63E3A0);
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam2
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup2_b_area_sam2
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_802194E0_63E6C0);
|
||||
|
||||
#define NAMESPACE dup3_b_area_sam2
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup3_b_area_sam2
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_80219800_63E9E0);
|
||||
|
||||
#define NAMESPACE dup4_b_area_sam2
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup4_b_area_sam2
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_80219B20_63ED00);
|
||||
|
||||
#define NAMESPACE dup5_b_area_sam2
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#define NAMESPACE dup5_b_area_sam2
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_sam2/63DD60", func_80219E40_63F020);
|
5
src/battle/area_sam2/actor/gray_magikoopa.c
Normal file
5
src/battle/area_sam2/actor/gray_magikoopa.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_gray_magikoopa
|
||||
|
||||
#include "battle/common/actor/gray_magikoopa.inc.c"
|
664
src/battle/area_sam2/actor/monstar.c
Normal file
664
src/battle/area_sam2/actor/monstar.c
Normal file
@ -0,0 +1,664 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite.h"
|
||||
#include "sprite/npc/monstar.h"
|
||||
#include "battle/area_sam2/actor/img.png.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_monstar
|
||||
|
||||
// probably the same as FoldImageRecPart
|
||||
typedef struct UnknownMonstarStruct {
|
||||
/* 0x00 */ u8* raster;
|
||||
/* 0x04 */ u8* palette;
|
||||
/* 0x08 */ u16 width;
|
||||
/* 0x0A */ u16 height;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ s32 unk_10;
|
||||
/* 0x14 */ Gfx* dlist;
|
||||
} UnknownMonstarStruct; // size = 0x18;
|
||||
|
||||
extern Gfx N(dlist)[];
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(handleEvent);
|
||||
extern EvtScript N(nextTurn);
|
||||
extern EvtScript N(OnBurn);
|
||||
extern EvtScript N(OnDeath);
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_COSMIC, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 0,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 0,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 0,
|
||||
STATUS_SHRINK, 0,
|
||||
STATUS_STOP, 0,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, 0,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
extern s32 N(idleAnimations)[];
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_100,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 1,
|
||||
.unk_1D = -15,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 50, 0 },
|
||||
.targetOffset = { -6, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_100,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 1,
|
||||
.unk_1D = -15,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_MONSTAR,
|
||||
.level = 45,
|
||||
.maxHP = 20,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 0,
|
||||
.airLiftChance = 0,
|
||||
.spookChance = 0,
|
||||
.baseStatusChance = 0,
|
||||
.upAndAwayChance = 0,
|
||||
.spinSmashReq = 4,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 0,
|
||||
.size = { 100, 98 },
|
||||
.hpBarOffset = { 0, 16 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_monstar_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_POISON, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_monstar_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_monstar_Palette_00_Anim_0,
|
||||
STATUS_PARALYZE, NPC_ANIM_monstar_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_DIZZY, NPC_ANIM_monstar_Palette_00_Anim_1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_monstar_Palette_00_Anim_4,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_ADDR(N(nextTurn)))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "battle/area_sam2/actor/img.png.inc.c"
|
||||
#include "battle/area_sam2/actor/img.pal.inc.c"
|
||||
|
||||
UnknownMonstarStruct D_8021A2B8_63F498 = {
|
||||
.raster = battle_area_sam2_actor_img_png,
|
||||
.palette = battle_area_sam2_actor_img_pal,
|
||||
.width = battle_area_sam2_actor_img_png_width,
|
||||
.height = battle_area_sam2_actor_img_png_height,
|
||||
.unk_0C = -4,
|
||||
.unk_10 = 0,
|
||||
.dlist = N(dlist),
|
||||
};
|
||||
|
||||
ApiStatus func_80218000_63D1E0(Evt* script, s32 isInitialCall) {
|
||||
ActorPart* part = get_actor_part(get_actor(script->owner1.actorID), 1);
|
||||
s32 i;
|
||||
u8 sp20[20];
|
||||
u8 sp38[20];
|
||||
u8 sp50[20];
|
||||
u8 sp68[20];
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = 0;
|
||||
script->functionTemp[2] = 0;
|
||||
script->functionTemp[0] = 0;
|
||||
func_802DE780(part->unk_84, 0, 17, 20, 0, 0, 255, 0);
|
||||
}
|
||||
|
||||
func_802DE780(part->unk_84, 1, 15, &D_8021A2B8_63F498, 255, 0, 255, 0);
|
||||
script->functionTemp[1] += 10;
|
||||
if (script->functionTemp[1] >= 360) {
|
||||
script->functionTemp[1] %= 360;
|
||||
}
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
sp20[i] = (cosine(script->functionTemp[1] + i * 25) + 1.0) * 56.0;
|
||||
sp38[i] = (cosine(script->functionTemp[1] + i * 25 + 45) + 1.0) * 56.0;
|
||||
sp50[i] = (cosine(script->functionTemp[1] + i * 25 + 90) + 1.0) * 56.0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
func_802DE780(part->unk_84, 0, 12, i, sp20[i] << 0x18 | sp38[i] << 0x10 | sp50[i] << 8 | 0xFF, 0, 255, 0);
|
||||
}
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
#include "common/Dist3D.inc.c"
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(func_80218000_63D1E0)
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(2), LW(3), LW(4))
|
||||
EVT_CALL(MakeLerp, 0, 10, 30, 10)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_ADD(LW(0), LW(3))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(2), LW(0), LW(4))
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(5))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(5), 1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(2), LW(3), LW(4))
|
||||
EVT_CALL(MakeLerp, 0, -10, 30, 10)
|
||||
EVT_LABEL(3)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_ADD(LW(0), LW(3))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(2), LW(0), LW(4))
|
||||
EVT_LABEL(4)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(5))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(5), 1)
|
||||
EVT_GOTO(4)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(3)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET(LW(0), 1)
|
||||
EVT_SET(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_SET(LW(2), -1)
|
||||
EVT_EXEC_WAIT(N(OnBurn))
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET(LW(0), 1)
|
||||
EVT_SET(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_SET(LW(2), -1)
|
||||
EVT_EXEC_WAIT(N(OnBurn))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CASE_EQ(EVENT_IMMUNE)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(unused) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
|
||||
EVT_CALL(SetBattleCamZoom, 10)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 5)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 30)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations2)))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 40)
|
||||
EVT_SUB(LW(2), 5)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 10, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 300, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(75)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attack) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamZoom, 250)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 55)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 30)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_4)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_6)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(UnkBackgroundFunc3))
|
||||
EVT_CALL(MakeLerp, 0, 200, 60, 1)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP)
|
||||
EVT_CALL(N(StartRumbleWithParams), 80, 120)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamZoom, 100)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 60)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 60)
|
||||
EVT_WAIT_FRAMES(60)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2EA)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_36E)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_LOOP(18)
|
||||
EVT_CALL(RandInt, 150, LW(0))
|
||||
EVT_ADD(LW(0), 100)
|
||||
EVT_CALL(N(StartRumbleWithParams), LW(0), 20)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(60)
|
||||
EVT_CALL(RandInt, 1, LW(0))
|
||||
EVT_ADD(LW(0), 2)
|
||||
EVT_CALL(RandInt, 400, LW(1))
|
||||
EVT_SUB(LW(1), 100)
|
||||
EVT_CALL(RandInt, 100, LW(2))
|
||||
EVT_SUB(LW(2), 50)
|
||||
EVT_SET(LW(3), LW(1))
|
||||
EVT_SUB(LW(3), 200)
|
||||
EVT_SET(LW(4), LW(2))
|
||||
EVT_CALL(RandInt, 10, LW(5))
|
||||
EVT_ADD(LW(5), 10)
|
||||
EVT_CALL(PlayEffect, EFFECT_STAR, LW(0), LW(1), 240, LW(2), LW(3), 0, LW(4), LW(5), 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_ADD(LW(2), 5)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 11, LW(0), LW(1), LW(2), EVT_FLOAT(0.8), 160, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_7)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 0, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_WAIT_FRAMES(170)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations)))
|
||||
EVT_CALL(MakeLerp, 200, 0, 60, 0)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(170)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_1)
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(idleAnimations)))
|
||||
EVT_CALL(MakeLerp, 200, 0, 60, 0)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(nextTurn) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_EXEC_WAIT(N(attack))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 72)
|
||||
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamZoom, 340)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ActorSpeak, MESSAGE_ID(0x12, 0x00E5), ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_9, NPC_ANIM_monstar_Palette_00_Anim_9)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ActorSpeak, MESSAGE_ID(0x12, 0x00E6), ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_9, NPC_ANIM_monstar_Palette_00_Anim_9)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(ActorSpeak, MESSAGE_ID(0x12, 0x00E7), ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_9, NPC_ANIM_monstar_Palette_00_Anim_9)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(ActorSpeak, MESSAGE_ID(0x12, 0x00E6), ACTOR_SELF, 1, NPC_ANIM_monstar_Palette_00_Anim_9, NPC_ANIM_monstar_Palette_00_Anim_9)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(AddActorVar, ACTOR_SELF, 3, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnDeath) = {
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_IF_NE(LW(1), -1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(0), LW(1))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_80269E80, LW(5))
|
||||
EVT_SWITCH(LW(5))
|
||||
EVT_CASE_OR_EQ(10)
|
||||
EVT_CASE_OR_EQ(14)
|
||||
EVT_CASE_OR_EQ(12)
|
||||
EVT_CASE_OR_EQ(16)
|
||||
EVT_CASE_OR_EQ(11)
|
||||
EVT_CASE_OR_EQ(15)
|
||||
EVT_CASE_OR_EQ(13)
|
||||
EVT_CASE_OR_EQ(17)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LW(1))
|
||||
EVT_SWITCH(LW(1))
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_BOB_OMB)
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_BULLET_BILL)
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_BOMBSHELL_BILL)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_NE(LW(2), -12345)
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_LOOP(24)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(2))
|
||||
EVT_ADD(LW(2), 30)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 10)
|
||||
EVT_ADD(LW(2), 10)
|
||||
EVT_CALL(PlayEffect, EFFECT_BIG_SMOKE_PUFF, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DEATH)
|
||||
EVT_CALL(DropStarPoints, ACTOR_SELF)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_LOOP(12)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, LW(3), 0, 0)
|
||||
EVT_ADD(LW(3), 8)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_EXEC_WAIT(ForceNextTarget)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnBurn) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(0), LW(1))
|
||||
EVT_CALL(func_80269E80, LW(3))
|
||||
EVT_SWITCH(LW(3))
|
||||
EVT_CASE_EQ(9)
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LW(7))
|
||||
EVT_SWITCH(LW(7))
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE)
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01))
|
||||
EVT_ADD(LW(5), 55)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LOOP(30)
|
||||
EVT_ADD(LW(7), 48)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(7))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LW(7))
|
||||
EVT_SWITCH(LW(7))
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE)
|
||||
EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SUB(LW(5), 55)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
|
||||
EVT_IF_EQ(LW(5), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_NE(LW(2), -1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(0), LW(2))
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(1))
|
||||
EVT_SWITCH(LW(1))
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LW(0), LW(1))
|
||||
EVT_IF_NOT_FLAG(LW(1), ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLOSIVE)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetActorSize, ACTOR_SELF, LW(3), LW(4))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
|
||||
EVT_IF_FLAG(LW(5), STATUS_FLAG_SHRINK)
|
||||
EVT_MULF(LW(3), EVT_FLOAT(0.4))
|
||||
EVT_MULF(LW(4), EVT_FLOAT(0.4))
|
||||
EVT_END_IF
|
||||
EVT_DIVF(LW(3), EVT_FLOAT(2.0))
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(5))
|
||||
EVT_IF_FLAG(LW(5), ACTOR_FLAG_HP_OFFSET_BELOW)
|
||||
EVT_SUBF(LW(1), LW(3))
|
||||
EVT_ELSE
|
||||
EVT_ADDF(LW(1), LW(3))
|
||||
EVT_END_IF
|
||||
EVT_ADDF(LW(2), EVT_FLOAT(5.0))
|
||||
EVT_DIVF(LW(3), EVT_FLOAT(10.0))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(5))
|
||||
EVT_IF_FLAG(LW(5), STATUS_FLAG_SHRINK)
|
||||
EVT_MULF(LW(3), EVT_FLOAT(0.4))
|
||||
EVT_IF_LT(LW(3), 1)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LW(0), LW(1), LW(2), LW(3), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
5
src/battle/area_sam2/actor/paragoomba.c
Normal file
5
src/battle/area_sam2/actor/paragoomba.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_paragoomba
|
||||
|
||||
#include "battle/common/actor/paragoomba.inc.c"
|
42
src/battle/area_sam2/area.c
Normal file
42
src/battle/area_sam2/area.c
Normal file
@ -0,0 +1,42 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
extern ActorBlueprint N(monstar);
|
||||
extern ActorBlueprint N(paragoomba);
|
||||
extern ActorBlueprint N(gray_magikoopa);
|
||||
|
||||
extern Stage N(sam_01);
|
||||
extern Stage N(sam_02);
|
||||
extern Stage N(sam_02b);
|
||||
extern Stage N(sam_02c);
|
||||
extern Stage N(sam_02d);
|
||||
extern Stage N(sam_03);
|
||||
|
||||
Vec3i N(80223490) = { 75, 16, 5 };
|
||||
|
||||
Formation N(formation_01) = {
|
||||
{ .actor = &N(monstar), .home = { .vec = &N(80223490) }, .priority = 10 },
|
||||
};
|
||||
|
||||
Formation N(formation_02) = {
|
||||
{ .actor = &N(paragoomba), .home = { .index = 5 }, .priority = 10 },
|
||||
{ .actor = &N(gray_magikoopa), .home = { .index = 2 }, .priority = 9 },
|
||||
};
|
||||
|
||||
BattleList N(formationTable) = {
|
||||
BATTLE("かいぶつ", N(formation_01), &N(sam_03)),
|
||||
BATTLE("パタクリ,グレイカメック(チェックよう)", N(formation_02), &N(sam_01)),
|
||||
{},
|
||||
};
|
||||
|
||||
StageList N(stageTable) = {
|
||||
{ "sam_01", &N(sam_01) },
|
||||
{ "sam_02", &N(sam_02) },
|
||||
{ "sam_02b", &N(sam_02b) },
|
||||
{ "sam_02c", &N(sam_02c) },
|
||||
{ "sam_02d", &N(sam_02d) },
|
||||
{ "sam_03", &N(sam_03) },
|
||||
{},
|
||||
};
|
42
src/battle/area_sam2/dlist.c
Normal file
42
src/battle/area_sam2/dlist.c
Normal file
@ -0,0 +1,42 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_monstar
|
||||
|
||||
extern Vtx monstar_bubbles[66];
|
||||
|
||||
Gfx N(dlist)[] = {
|
||||
gsSPVertex(&monstar_bubbles[0], 32, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
|
||||
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
|
||||
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
|
||||
gsSP2Triangles(16, 17, 18, 0, 16, 18, 19, 0),
|
||||
gsSP2Triangles(20, 21, 22, 0, 20, 22, 23, 0),
|
||||
gsSP2Triangles(24, 25, 26, 0, 24, 26, 27, 0),
|
||||
gsSP2Triangles(28, 29, 30, 0, 28, 30, 31, 0),
|
||||
gsSPVertex(&monstar_bubbles[32], 32, 0),
|
||||
gsSP2Triangles(0, 8, 9, 0, 0, 9, 10, 0),
|
||||
gsSP2Triangles(1, 11, 12, 0, 1, 12, 13, 0),
|
||||
gsSP2Triangles(2, 14, 15, 0, 2, 15, 16, 0),
|
||||
gsSP2Triangles(3, 17, 18, 0, 3, 18, 19, 0),
|
||||
gsSP2Triangles(4, 20, 21, 0, 4, 21, 22, 0),
|
||||
gsSP2Triangles(5, 23, 24, 0, 5, 24, 25, 0),
|
||||
gsSP2Triangles(6, 26, 27, 0, 6, 27, 28, 0),
|
||||
gsSP2Triangles(7, 29, 30, 0, 7, 30, 31, 0),
|
||||
gsSPVertex(&monstar_bubbles[8], 1, 0),
|
||||
gsSPVertex(&monstar_bubbles[11], 2, 1),
|
||||
gsSPVertex(&monstar_bubbles[15], 2, 3),
|
||||
gsSPVertex(&monstar_bubbles[19], 1, 5),
|
||||
gsSPVertex(&monstar_bubbles[35], 5, 6),
|
||||
gsSPVertex(&monstar_bubbles[51], 1, 11),
|
||||
gsSPVertex(&monstar_bubbles[54], 1, 12),
|
||||
gsSPVertex(&monstar_bubbles[57], 1, 13),
|
||||
gsSPVertex(&monstar_bubbles[60], 1, 14),
|
||||
gsSPVertex(&monstar_bubbles[63], 3, 15),
|
||||
gsSP2Triangles(1, 16, 0, 0, 3, 16, 2, 0),
|
||||
gsSP2Triangles(5, 16, 4, 0, 11, 16, 6, 0),
|
||||
gsSP2Triangles(12, 17, 7, 0, 13, 16, 8, 0),
|
||||
gsSP2Triangles(14, 16, 9, 0, 15, 16, 10, 0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
51
src/battle/area_sam2/stage/sam_01.c
Normal file
51
src/battle/area_sam2/stage/sam_01.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt01_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_01
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 1)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_SET(LW(1), 3)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 4)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 16)
|
||||
EVT_SET(LW(1), 2)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_saku, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt01_shape",
|
||||
.hit = "sam_bt01_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
53
src/battle/area_sam2/stage/sam_02.c
Normal file
53
src/battle/area_sam2/stage/sam_02.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_02
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 12, 0)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 24)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_END_THREAD
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
36
src/battle/area_sam2/stage/sam_02b.c
Normal file
36
src/battle/area_sam2/stage/sam_02b.c
Normal file
@ -0,0 +1,36 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_02b
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
37
src/battle/area_sam2/stage/sam_02c.c
Normal file
37
src/battle/area_sam2/stage/sam_02c.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_02c
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
38
src/battle/area_sam2/stage/sam_02d.c
Normal file
38
src/battle/area_sam2/stage/sam_02d.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt02_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_02d
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetGroupEnabled, 3, 0)
|
||||
EVT_CALL(SetGroupEnabled, 10, 0)
|
||||
EVT_CALL(SetGroupEnabled, 12, 0)
|
||||
EVT_CALL(SetGroupEnabled, 26, 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_kouri1, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt02_shape",
|
||||
.hit = "sam_bt02_hit",
|
||||
.bg = "yki_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
55
src/battle/area_sam2/stage/sam_03.c
Normal file
55
src/battle/area_sam2/stage/sam_03.c
Normal file
@ -0,0 +1,55 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "mapfs/sam_bt03_shape.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2_sam_03
|
||||
|
||||
#include "common/UnkModelStuff.inc.c"
|
||||
|
||||
void func_80219E40_63F020(void) {
|
||||
enable_background_wave();
|
||||
}
|
||||
|
||||
EvtScript N(beforeBattle) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 16)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript3))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 25)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 22)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_SET(LW(0), 19)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_EXEC(N(UnkModelStuffScript4))
|
||||
EVT_END_THREAD
|
||||
EVT_EXEC(N(UnkModelStuffScript1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(afterBattle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(foregroundModelList)[] = {
|
||||
-1, MODEL_o278, 0,
|
||||
};
|
||||
|
||||
Stage NAMESPACE = {
|
||||
.texture = "sam_tex",
|
||||
.shape = "sam_bt03_shape",
|
||||
.hit = "sam_bt03_hit",
|
||||
.bg = "sam_bg",
|
||||
.preBattle = &N(beforeBattle),
|
||||
.postBattle = &N(afterBattle),
|
||||
.foregroundModelList = N(foregroundModelList),
|
||||
};
|
5
src/battle/area_sam2/vtx.c
Normal file
5
src/battle/area_sam2/vtx.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE b_area_sam2
|
||||
|
||||
#include "battle/area_sam2/monstar_bubbles.vtx.inc.c"
|
@ -187,8 +187,8 @@ BattleArea gBattleAreas[0x30] = {
|
||||
{
|
||||
AREA(area_sam),
|
||||
.name = "エリア SAM",
|
||||
.battles = 0x80231164,
|
||||
.stages = 0x80231290,
|
||||
.battles = &b_area_sam_formationTable,
|
||||
.stages = &b_area_sam_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_sam2),
|
||||
@ -205,14 +205,14 @@ BattleArea gBattleAreas[0x30] = {
|
||||
{
|
||||
AREA(area_pra2),
|
||||
.name = "エリア PRA2",
|
||||
.battles = 0x802215A0,
|
||||
.stages = 0x802215C8,
|
||||
.battles = &b_area_pra2_formationTable,
|
||||
.stages = &b_area_pra2_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_pra3),
|
||||
.name = "エリア PRA3",
|
||||
.battles = 0x80232888,
|
||||
.stages = 0x8023298C,
|
||||
.battles = &b_area_pra3_formationTable,
|
||||
.stages = &b_area_pra3_stageTable,
|
||||
},
|
||||
{
|
||||
AREA(area_kpa),
|
||||
|
@ -67,4 +67,13 @@ extern StageList b_area_jan2_stageTable;
|
||||
extern BattleList b_area_kzn_formationTable;
|
||||
extern StageList b_area_kzn_stageTable;
|
||||
|
||||
extern BattleList b_area_sam_formationTable;
|
||||
extern StageList b_area_sam_stageTable;
|
||||
|
||||
extern BattleList b_area_pra2_formationTable;
|
||||
extern StageList b_area_pra2_stageTable;
|
||||
|
||||
extern BattleList b_area_pra3_formationTable;
|
||||
extern StageList b_area_pra3_stageTable;
|
||||
|
||||
#endif
|
||||
|
759
src/battle/common/actor/duplighost.inc.c
Normal file
759
src/battle/common/actor/duplighost.inc.c
Normal file
@ -0,0 +1,759 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/duplighost.h"
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(handleEvent);
|
||||
extern EvtScript N(nextTurn);
|
||||
|
||||
s32 N(idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_duplighost_Palette_00_Anim_2,
|
||||
STATUS_STONE, NPC_ANIM_duplighost_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_duplighost_Palette_00_Anim_D,
|
||||
STATUS_POISON, NPC_ANIM_duplighost_Palette_00_Anim_2,
|
||||
STATUS_STOP, NPC_ANIM_duplighost_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_duplighost_Palette_00_Anim_2,
|
||||
STATUS_PARALYZE, NPC_ANIM_duplighost_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_duplighost_Palette_00_Anim_E,
|
||||
STATUS_FEAR, NPC_ANIM_duplighost_Palette_00_Anim_E,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_duplighost_Palette_00_Anim_A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations3)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_duplighost_Palette_00_Anim_4,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 75,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 1,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -5, 25 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -2,
|
||||
.unk_1D = -10,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_DUPLIGHOST,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 36, 36 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_ADDR(N(nextTurn)))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(nextTurn) = {
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
|
||||
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
|
||||
EVT_CASE_EQ(PHASE_ENEMY_END)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LW(0))
|
||||
EVT_IF_EQ(LW(0), 3)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 2)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(returnHome) = {
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), -1)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), -1)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_2)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_4)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attack) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_duplighost_Palette_00_Anim_7)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 715, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_duplighost_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 17, FALSE, TRUE, FALSE)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), 0, LW(2))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_duplighost_Palette_00_Anim_2)
|
||||
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(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_duplighost_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, EVT_FLOAT(4.0), EVT_FLOAT(-6.0), 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -15, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_duplighost_Palette_00_Anim_9)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), 0, LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), 0, LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_EXEC_WAIT(N(returnHome))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnDeath) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_CALL(RemoveActor, LW(0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnHitElectric) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(0), LW(1))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(10))
|
||||
EVT_CALL(UseIdleAnimation, LW(10), FALSE)
|
||||
EVT_CALL(func_8027D32C, LW(10))
|
||||
EVT_CALL(CopyStatusEffects, ACTOR_SELF, LW(10))
|
||||
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_ADD(LW(2), 5)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(PlayEffect, EFFECT_BIG_SMOKE_PUFF, 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_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorHP, ACTOR_SELF, LW(11))
|
||||
EVT_CALL(SetEnemyHP, LW(10), LW(11))
|
||||
EVT_CALL(CopyBuffs, ACTOR_SELF, LW(10))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetActorPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetPartFlagBits, LW(10), 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, LW(10), 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
|
||||
EVT_CALL(SetActorFlagBits, LW(10), ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, 0)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(SetActorVar, LW(10), 8, 2)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(0), ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_CALL(SetIdleAnimations, LW(10), 1, EVT_ADDR(N(idleAnimations2)))
|
||||
EVT_CALL(SetAnimation, LW(10), 1, NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(GetActorPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_IF_GT(LW(12), 0)
|
||||
EVT_SET(LW(12), 0)
|
||||
EVT_CALL(SetActorJumpGravity, LW(10), EVT_FLOAT(0.5))
|
||||
EVT_CALL(SetActorSounds, LW(10), 2, 769, 0)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(ResetActorSounds, LW(10), 2)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 5, FALSE, TRUE, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ForceHomePos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(HPBarToHome, LW(10))
|
||||
EVT_CALL(SetIdleAnimations, LW(10), 1, EVT_ADDR(N(idleAnimations)))
|
||||
EVT_CALL(SetAnimation, LW(10), 1, NPC_ANIM_duplighost_Palette_00_Anim_2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnShockHit) = {
|
||||
EVT_SET(LW(9), LW(0))
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(0), LW(1))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(2), LW(3), LW(4))
|
||||
EVT_ADD(LW(2), 10)
|
||||
EVT_ADD(LW(3), 10)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(2), LW(3), LW(4))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(10))
|
||||
EVT_CALL(UseIdleAnimation, LW(10), FALSE)
|
||||
EVT_CALL(func_8027D32C, LW(10))
|
||||
EVT_CALL(CopyStatusEffects, ACTOR_SELF, LW(10))
|
||||
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_ADD(LW(2), 5)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(PlayEffect, EFFECT_BIG_SMOKE_PUFF, 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_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorHP, ACTOR_SELF, LW(11))
|
||||
EVT_CALL(SetEnemyHP, LW(10), LW(11))
|
||||
EVT_CALL(CopyBuffs, ACTOR_SELF, LW(10))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetActorPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetPartFlagBits, LW(10), 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, LW(10), 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
|
||||
EVT_CALL(SetActorFlagBits, LW(10), ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, 0)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(SetActorVar, LW(10), 8, 3)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LW(9), ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_CALL(SetIdleAnimations, LW(10), 1, EVT_ADDR(N(idleAnimations2)))
|
||||
EVT_CALL(SetAnimation, LW(10), 1, NPC_ANIM_duplighost_Palette_00_Anim_A)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetActorJumpGravity, LW(10), EVT_FLOAT(0.5))
|
||||
EVT_CALL(GetActorPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_ADD(LW(11), 30)
|
||||
EVT_SET(LW(12), 0)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 15, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(11), 20)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(11), 10)
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), LW(12), LW(13))
|
||||
EVT_CALL(JumpToGoal, LW(10), 5, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(AddActorDecoration, LW(10), 1, 0, 2)
|
||||
EVT_CALL(SetActorYaw, LW(10), 180)
|
||||
EVT_CALL(SetIdleAnimations, LW(10), 1, EVT_ADDR(N(idleAnimations3)))
|
||||
EVT_CALL(SetAnimation, LW(10), 1, NPC_ANIM_duplighost_Palette_00_Anim_4)
|
||||
EVT_CALL(SetActorSpeed, LW(10), EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(11), LW(12), LW(13))
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(11), 0, LW(13))
|
||||
EVT_CALL(RunToGoal, LW(10), 0, FALSE)
|
||||
EVT_CALL(SetAnimation, LW(10), 1, NPC_ANIM_duplighost_Palette_00_Anim_2)
|
||||
EVT_CALL(SetActorYaw, LW(10), 0)
|
||||
EVT_CALL(RemoveActorDecoration, LW(10), 1, 0)
|
||||
EVT_CALL(SetIdleAnimations, LW(10), 1, EVT_ADDR(N(idleAnimations)))
|
||||
EVT_CALL(ForceHomePos, LW(10), LW(11), 0, LW(13))
|
||||
EVT_CALL(HPBarToHome, LW(10))
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(OnShockDeath) = {
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(11), LW(1))
|
||||
EVT_SET(LW(12), LW(2))
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(10), LW(11))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 15)
|
||||
EVT_ADD(LW(1), 10)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LW(10), LW(11))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE)
|
||||
EVT_SET(LW(0), LW(10))
|
||||
EVT_SET(LW(1), LW(11))
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, LW(12), 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(15)
|
||||
EVT_ADD(LW(0), -48)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 60)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
Vec3i N(pos_summon) = { 0, -1000, 0 };
|
||||
|
||||
#include "ghost_goombario.inc.c"
|
||||
|
||||
Formation N(formation_goombario) = {
|
||||
{ .actor = &N(goombario), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_kooper.inc.c"
|
||||
|
||||
Formation N(formation_kooper) = {
|
||||
{ .actor = &N(kooper), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_bombette.inc.c"
|
||||
|
||||
Formation N(formation_bombette) = {
|
||||
{ .actor = &N(bombette), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_parakarry.inc.c"
|
||||
|
||||
Formation N(formation_parakarry) = {
|
||||
{ .actor = &N(parakarry), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_bow.inc.c"
|
||||
|
||||
Formation N(formation_bow) = {
|
||||
{ .actor = &N(bow), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_watt.inc.c"
|
||||
|
||||
Formation N(formation_watt) = {
|
||||
{ .actor = &N(watt), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_sushie.inc.c"
|
||||
|
||||
Formation N(formation_sushie) = {
|
||||
{ .actor = &N(sushie), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
#include "ghost_lakilester.inc.c"
|
||||
|
||||
Formation N(formation_lakilester) = {
|
||||
{ .actor = &N(lakilester), .home = { .vec = &N(pos_summon) }, .priority = 0 },
|
||||
};
|
||||
|
||||
ApiStatus N(GetPartnerAndLevel)(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;
|
||||
}
|
||||
|
||||
ApiStatus N(CopyPriority)(Evt* script, s32 isInitialCall) {
|
||||
s32 partnerID = evt_get_variable(script, *script->ptrReadPos);
|
||||
Actor* actor = get_actor(script->owner1.actorID);
|
||||
FormationRow* formation = NULL;
|
||||
|
||||
switch (partnerID) {
|
||||
case PARTNER_GOOMBARIO:
|
||||
formation = N(formation_goombario);
|
||||
break;
|
||||
case PARTNER_KOOPER:
|
||||
formation = N(formation_kooper);
|
||||
break;
|
||||
case PARTNER_BOMBETTE:
|
||||
formation = N(formation_bombette);
|
||||
break;
|
||||
case PARTNER_PARAKARRY:
|
||||
formation = N(formation_parakarry);
|
||||
break;
|
||||
case PARTNER_BOW:
|
||||
formation = N(formation_bow);
|
||||
break;
|
||||
case PARTNER_WATT:
|
||||
formation = N(formation_watt);
|
||||
break;
|
||||
case PARTNER_SUSHIE:
|
||||
formation = N(formation_sushie);
|
||||
break;
|
||||
case PARTNER_LAKILESTER:
|
||||
formation = N(formation_lakilester);
|
||||
break;
|
||||
}
|
||||
|
||||
formation->priority = actor->turnPriority;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(copyPartner) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B8)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_duplighost_Palette_00_Anim_6)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(0.4))
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_GATHER_ENERGY_PINK, 1, LW(0), LW(1), LW(2), LW(3), 40, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc3))
|
||||
EVT_CALL(MakeLerp, 0, 200, 20, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(GetPartnerAndLevel), LW(5), LW(6))
|
||||
EVT_CALL(N(CopyPriority), LW(5))
|
||||
EVT_SWITCH(LW(5))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_goombario)), 0)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_kooper)), 0)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_bombette)), 0)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_parakarry)), 0)
|
||||
EVT_CASE_EQ(9)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_bow)), 0)
|
||||
EVT_CASE_EQ(6)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_watt)), 0)
|
||||
EVT_CASE_EQ(7)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_sushie)), 0)
|
||||
EVT_CASE_EQ(8)
|
||||
EVT_CALL(SummonEnemy, EVT_ADDR(N(formation_lakilester)), 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(CopyStatusEffects, ACTOR_SELF, LW(10))
|
||||
EVT_CALL(SetBattleVar, 3, LW(5))
|
||||
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_ADD(LW(2), 5)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(PlayEffect, EFFECT_BIG_SMOKE_PUFF, 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_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 0)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, 1)
|
||||
EVT_CALL(GetActorHP, ACTOR_SELF, LW(0))
|
||||
EVT_CALL(SetEnemyHP, LW(10), LW(0))
|
||||
EVT_CALL(CopyBuffs, ACTOR_SELF, LW(10))
|
||||
EVT_CALL(GetOwnerID, LW(0))
|
||||
EVT_CALL(SetActorVar, LW(10), 0, LW(0))
|
||||
EVT_CALL(SetActorVar, LW(10), 1, LW(6))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 200, 0, 20, 0)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetActorSounds, LW(10), 2, 0, 0)
|
||||
EVT_SWITCH(LW(5))
|
||||
EVT_CASE_EQ(8)
|
||||
EVT_CALL(GetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, LW(10), EVT_FLOAT(0.01))
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(0), 10, LW(2))
|
||||
EVT_CALL(JumpToGoal, LW(10), 10, FALSE, FALSE, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CASE_OR_EQ(6)
|
||||
EVT_CASE_OR_EQ(9)
|
||||
EVT_CASE_OR_EQ(4)
|
||||
EVT_CALL(GetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetActorJumpGravity, LW(10), EVT_FLOAT(0.01))
|
||||
EVT_CALL(SetGoalPos, LW(10), LW(0), 30, LW(2))
|
||||
EVT_CALL(JumpToGoal, LW(10), 20, FALSE, FALSE, FALSE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(ForceHomePos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, LW(10))
|
||||
EVT_CALL(ResetActorSounds, LW(10), 2)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(RandInt, 1000, LW(0))
|
||||
EVT_IF_LT(LW(0), 600)
|
||||
EVT_CALL(GetBattleVar, 0, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), 0x4)
|
||||
EVT_CALL(GetBattleVar, 0, LW(0))
|
||||
EVT_BITWISE_OR_CONST(LW(0), 0x4)
|
||||
EVT_CALL(SetBattleVar, 0, LW(0))
|
||||
EVT_EXEC_WAIT(N(copyPartner))
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetBattleVar, 3, LW(0))
|
||||
EVT_CALL(N(GetPartnerAndLevel), LW(1), LW(2))
|
||||
EVT_IF_EQ(LW(0), LW(1))
|
||||
EVT_EXEC_WAIT(N(copyPartner))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(attack))
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(attack))
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_EXEC_WAIT(N(attack))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
|
||||
|
364
src/battle/common/actor/ghost_bombette.inc.c
Normal file
364
src/battle/common/actor/ghost_bombette.inc.c
Normal file
@ -0,0 +1,364 @@
|
||||
#include "sprite/npc/battle_bombette.h"
|
||||
|
||||
extern EvtScript N(bombette_init);
|
||||
extern EvtScript N(bombette_takeTurn);
|
||||
extern EvtScript N(bombette_idle);
|
||||
extern EvtScript N(bombette_handleEvent);
|
||||
|
||||
s32 N(bombette_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_bombette_Palette_00_Anim_4,
|
||||
STATUS_STONE, NPC_ANIM_battle_bombette_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_bombette_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_bombette_Palette_00_Anim_4,
|
||||
STATUS_STOP, NPC_ANIM_battle_bombette_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_bombette_Palette_00_Anim_4,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_bombette_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_bombette_Palette_00_Anim_1E,
|
||||
STATUS_FEAR, NPC_ANIM_battle_bombette_Palette_00_Anim_1E,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(bombette_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(bombette_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(bombette_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 22 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(bombette_idleAnimations),
|
||||
.defenseTable = N(bombette_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -2,
|
||||
.unk_1D = -7,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(bombette) = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GHOST_BOMBETTE,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(bombette_parts)),
|
||||
.partsData = N(bombette_parts),
|
||||
.script = &N(bombette_init),
|
||||
.statusTable = N(bombette_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 30, 28 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(bombette_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(bombette_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(bombette_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(bombette_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bombette_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bombette_playEffects) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FLOAT(0.75))
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
|
||||
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(4.5))
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_RING, 0, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_EXPLOSION, 0, LW(0), LW(1), LW(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMB_BLAST)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bombette_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(EVENT_HIT_COMBO)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CASE_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_13)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_EXEC_WAIT(N(bombette_playEffects))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_SET(LW(2), -12345)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_13)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(bombette_playEffects))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_SET(LW(2), -12345)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_13)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(bombette_playEffects))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_SET(LW(2), -12345)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_13)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_EXEC_WAIT(N(bombette_playEffects))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_14)
|
||||
EVT_SET(LW(2), -12345)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||
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/UnkActorPosFunc.inc.c"
|
||||
|
||||
EvtScript N(bombette_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0)
|
||||
EVT_CALL(MoveBattleCamOver, 30)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 30, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_F)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2020)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_10)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 15, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(0), 72)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -60, 0, 0)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(UnkActorPosFunc))
|
||||
EVT_END_THREAD
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_10)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 4, FALSE)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 8)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_11)
|
||||
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.4))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_E)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_11)
|
||||
EVT_ADD(LW(0), 40)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_E)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_11)
|
||||
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_battle_bombette_Palette_00_Anim_E)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_11)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_E)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
418
src/battle/common/actor/ghost_bow.inc.c
Normal file
418
src/battle/common/actor/ghost_bow.inc.c
Normal file
@ -0,0 +1,418 @@
|
||||
#include "sprite/npc/battle_bow.h"
|
||||
|
||||
extern EvtScript N(bow_takeTurn);
|
||||
extern EvtScript N(bow_idle);
|
||||
extern EvtScript N(bow_handleEvent);
|
||||
extern EvtScript N(bow_init);
|
||||
|
||||
s32 N(bow_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_bow_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_bow_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_bow_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_bow_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_bow_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_bow_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_bow_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_bow_Palette_00_Anim_1A,
|
||||
STATUS_FEAR, NPC_ANIM_battle_bow_Palette_00_Anim_1A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(bow_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(bow_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(bow_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(bow_idleAnimations),
|
||||
.defenseTable = N(bow_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -10,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 50, 0 },
|
||||
.targetOffset = { 0, -26 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = NULL,
|
||||
.defenseTable = N(bow_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -10,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(bow) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_GHOST_BOW,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(bow_parts)),
|
||||
.partsData = N(bow_parts),
|
||||
.script = &N(bow_init),
|
||||
.statusTable = N(bow_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 36, 29 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(bow_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(bow_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(bow_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(bow_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bow_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bow_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_18)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bow_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_18)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bow_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(N(OnShockHit))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_SET(LW(2), 14)
|
||||
EVT_EXEC_WAIT(N(OnShockDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bow_Palette_00_Anim_15)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(bow_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_3)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 4, -4, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -10, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 30)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_7)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), -45)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1A)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 3)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(10), 0)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(8))
|
||||
EVT_SWITCH(LW(8))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LW(8), 4)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(8), 5)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LW(8), 6)
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(7), LW(8))
|
||||
EVT_LOOP(LW(7))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2019)
|
||||
EVT_ADD(LW(10), 1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0))
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_7)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_IF_EQ(LW(10), LW(8))
|
||||
EVT_CALL(func_80269EAC, 12)
|
||||
EVT_ELSE
|
||||
EVT_CALL(func_80269EAC, 10)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_8)
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_IF_EQ(LW(10), LW(8))
|
||||
EVT_CALL(func_80269EAC, 13)
|
||||
EVT_ELSE
|
||||
EVT_CALL(func_80269EAC, 11)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
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, 1, EVT_FLOAT(0.5))
|
||||
EVT_CALL(ShakeCam, 1, 0, 1, EVT_FLOAT(0.2))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_CALL(GetActorHP, ACTOR_PLAYER, LW(1))
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_bow_Palette_00_Anim_1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
540
src/battle/common/actor/ghost_goombario.inc.c
Normal file
540
src/battle/common/actor/ghost_goombario.inc.c
Normal file
@ -0,0 +1,540 @@
|
||||
#include "sprite/npc/battle_goombario.h"
|
||||
|
||||
extern EvtScript N(goombario_init);
|
||||
extern EvtScript N(goombario_takeTurn);
|
||||
extern EvtScript N(goombario_idle);
|
||||
extern EvtScript N(goombario_handleEvent);
|
||||
|
||||
#include "world/common/UnkFunc62.inc.c"
|
||||
#include "common/ActorJumpToPos.inc.c"
|
||||
#include "common/UnkActorSizeFunc.inc.c"
|
||||
#include "common/UnkEffect6CFunc.inc.c"
|
||||
|
||||
ApiStatus N(UnkTattleEffectFunc1)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||
|
||||
((EffectInstanceData*)effect->data)->pos.y = -1000.0f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(UnkTattleEffectFunc2)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||
|
||||
((EffectInstanceData*)effect->data)->pos.y = 144.0f;
|
||||
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 N(goombario_idleAnimations)[] = {
|
||||
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_idle,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_goombario_default_still,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_goombario_default_daze,
|
||||
STATUS_FEAR, NPC_ANIM_battle_goombario_default_daze,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(goombario_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(goombario_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(goombario_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(goombario_idleAnimations),
|
||||
.defenseTable = N(goombario_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -1,
|
||||
.unk_1D = -9,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(goombario) = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GHOST_GOOMBARIO,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(goombario_parts)),
|
||||
.partsData = N(goombario_parts),
|
||||
.script = &N(goombario_init),
|
||||
.statusTable = N(goombario_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 29, 26 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(goombario_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(goombario_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(goombario_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(goombario_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_goombario_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_burn_pain)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_goombario_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_burn_dead)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(N(OnShockHit))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_SET(LW(2), 12)
|
||||
EVT_EXEC_WAIT(N(OnShockDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_run)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_goombario_default_pain)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_default_run)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_goombario_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
|
||||
};
|
||||
|
||||
EvtScript N(goombario_returnBack) = {
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
|
||||
EVT_SET(LW(0), 180)
|
||||
EVT_LOOP(15)
|
||||
EVT_SUB(LW(0), 60)
|
||||
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_fall)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 60)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SETF(LW(5), EVT_FLOAT(7.2))
|
||||
EVT_ELSE
|
||||
EVT_SET(LW(5), 18)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_charge)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(5), 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_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_battle_goombario_default_charge)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(5), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_charge)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(5), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.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_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_runToPlayer) = {
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_run)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_8021C7FC) = {
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(11), LW(12), LW(13))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(12), LW(13), LW(14))
|
||||
EVT_IF_GT(LW(11), LW(12))
|
||||
EVT_SUB(LW(11), LW(12))
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(12), LW(11))
|
||||
EVT_SET(LW(11), LW(12))
|
||||
EVT_END_IF
|
||||
EVT_SUB(LW(11), 20)
|
||||
EVT_DIVF(LW(11), EVT_FLOAT(10.5888671875))
|
||||
EVT_ADDF(LW(11), 15)
|
||||
EVT_SET(LW(10), LW(11))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_attack) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_EXEC_WAIT(N(goombario_runToPlayer))
|
||||
EVT_EXEC_WAIT(N(goombario_8021C7FC))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SETF(LW(0), EVT_FLOAT(7.2))
|
||||
EVT_SETF(LW(1), EVT_FLOAT(7.6))
|
||||
EVT_SETF(LW(1), EVT_FLOAT(3.6))
|
||||
EVT_ELSE
|
||||
EVT_SET(LW(0), 18)
|
||||
EVT_SET(LW(1), 19)
|
||||
EVT_SET(LW(2), 9)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_charge)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(1), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LW(2), 0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 5)
|
||||
EVT_CALL(SetJumpAnimations, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_200D)
|
||||
EVT_CALL(N(UnkFunc62), LW(10), 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetJumpAnimations, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(N(ActorJumpToPos))
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_EXEC_WAIT(N(goombario_returnBack))
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_10)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_10)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetActorHP, ACTOR_PLAYER, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(10), 24)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(6)
|
||||
EVT_ADD(LW(0), 30)
|
||||
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(SetJumpAnimations, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_281)
|
||||
EVT_CALL(N(UnkFunc62), LW(10), 3)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(6)
|
||||
EVT_ADD(LW(0), 30)
|
||||
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(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetJumpAnimations, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_281)
|
||||
EVT_CALL(N(UnkFunc62), LW(10), 3)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(6)
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, EVT_LIMIT, 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_SET(LW(0), 0)
|
||||
EVT_LOOP(LW(10))
|
||||
EVT_ADD(LW(0), 133)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, EVT_LIMIT, LW(0), EVT_LIMIT)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetJumpAnimations, ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk, NPC_ANIM_battle_goombario_default_headbonk)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_281)
|
||||
EVT_CALL(N(UnkFunc62), LW(10), 3)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_LABEL(100)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_EXEC_WAIT(N(goombario_returnBack))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_tattle) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4, 1)
|
||||
EVT_CALL(N(UnkEffect6CFunc), LW(5))
|
||||
EVT_WAIT_FRAMES(12)
|
||||
EVT_CALL(func_802535B4, 0)
|
||||
EVT_CALL(SetCamEnabled, 2, 1)
|
||||
EVT_CALL(SetCamFlag80, 2, 0)
|
||||
EVT_CALL(SetCamPerspective, 2, 6, 25, 16, 1024)
|
||||
EVT_CALL(SetCamViewport, 2, 37, 95, 138, 99)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(N(UnkActorSizeFunc))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_802CAE50, 2, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(func_802CABE8, 2, 0, LW(3), 100, 4)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_282)
|
||||
EVT_CALL(SetCamFlag80, 2, 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(ActorSpeak, MESSAGE_ID(0x1C, 0x0092), ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_talk, NPC_ANIM_battle_goombario_default_idle)
|
||||
EVT_CALL(N(UnkTattleEffectFunc2), LW(5))
|
||||
EVT_WAIT_FRAMES(12)
|
||||
EVT_CALL(SetCamEnabled, 2, 0)
|
||||
EVT_WAIT_FRAMES(32)
|
||||
EVT_CALL(func_802535B4, 1)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(goombario_takeTurn) = {
|
||||
EVT_CALL(RandInt, 100, LW(0))
|
||||
EVT_IF_LT(LW(0), 10)
|
||||
EVT_EXEC_WAIT(N(goombario_tattle))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(goombario_attack))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
535
src/battle/common/actor/ghost_kooper.inc.c
Normal file
535
src/battle/common/actor/ghost_kooper.inc.c
Normal file
@ -0,0 +1,535 @@
|
||||
#include "sprite/npc/battle_kooper.h"
|
||||
|
||||
extern EvtScript N(kooper_init);
|
||||
extern EvtScript N(kooper_takeTurn);
|
||||
extern EvtScript N(kooper_idle);
|
||||
extern EvtScript N(kooper_handleEvent);
|
||||
|
||||
s32 N(kooper_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_kooper_Palette_00_Anim_4,
|
||||
STATUS_STONE, NPC_ANIM_battle_kooper_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_kooper_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_kooper_Palette_00_Anim_4,
|
||||
STATUS_STOP, NPC_ANIM_battle_kooper_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_kooper_Palette_00_Anim_4,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_kooper_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_kooper_Palette_00_Anim_1C,
|
||||
STATUS_FEAR, NPC_ANIM_battle_kooper_Palette_00_Anim_1C,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(kooper_idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_kooper_Palette_00_Anim_19,
|
||||
STATUS_STONE, NPC_ANIM_battle_kooper_Palette_00_Anim_3,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_kooper_Palette_00_Anim_3,
|
||||
STATUS_POISON, NPC_ANIM_battle_kooper_Palette_00_Anim_19,
|
||||
STATUS_STOP, NPC_ANIM_battle_kooper_Palette_00_Anim_3,
|
||||
STATUS_STATIC, NPC_ANIM_battle_kooper_Palette_00_Anim_19,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_kooper_Palette_00_Anim_3,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_kooper_Palette_00_Anim_19,
|
||||
STATUS_FEAR, NPC_ANIM_battle_kooper_Palette_00_Anim_19,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(kooper_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 1,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(kooper_defenseTable2)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(kooper_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(kooper_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -2, 32 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(kooper_idleAnimations),
|
||||
.defenseTable = N(kooper_defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_FLIPABLE,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -16,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(kooper) = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GHOST_KOOPER,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(kooper_parts)),
|
||||
.partsData = N(kooper_parts),
|
||||
.script = &N(kooper_init),
|
||||
.statusTable = N(kooper_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 32, 38 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(kooper_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(kooper_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(kooper_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(kooper_handleEvent)))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
|
||||
//TODO find the way to include it
|
||||
ApiStatus N(kooper_UnkActorPosFunc)(Evt* script, s32 isInitialCall) {
|
||||
Actor* actor = get_actor(script->owner1.actorID);
|
||||
ActorState* actorState = &actor->state;
|
||||
|
||||
if (isInitialCall) {
|
||||
actor->state.currentPos.x = actor->currentPos.x;
|
||||
actor->state.currentPos.y = actor->currentPos.y;
|
||||
actor->state.currentPos.z = actor->currentPos.z;
|
||||
}
|
||||
|
||||
add_xz_vec3f(&actorState->currentPos, actor->state.speed, actor->state.angle);
|
||||
if (actor->state.speed < 4.0f) {
|
||||
play_movement_dust_effects(0, actor->state.currentPos.x, actor->state.currentPos.y, actor->state.currentPos.z, actor->state.angle);
|
||||
} else {
|
||||
play_movement_dust_effects(1, actor->state.currentPos.x, actor->state.currentPos.y, actor->state.currentPos.z, actor->state.angle);
|
||||
}
|
||||
|
||||
actorState->speed /= 1.5;
|
||||
actor->currentPos.x = actorState->currentPos.x;
|
||||
actor->currentPos.y = actorState->currentPos.y;
|
||||
actor->currentPos.z = actorState->currentPos.z;
|
||||
|
||||
if (actorState->speed < 1.0) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
EvtScript N(kooper_idle) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -2, 38)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -3, -9)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 25, 10, 25)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 5, 15)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, -6)
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(kooper_dispOffsets)[] = {
|
||||
9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0,
|
||||
};
|
||||
|
||||
EvtScript N(kooper_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_12)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_kooper_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_12)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_kooper_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_13)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_FLIP_TRIGGER)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 1)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 1)
|
||||
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_ADDR(N(kooper_defenseTable2)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(kooper_idleAnimations2)))
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 5, 15)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, -6)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
|
||||
EVT_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_THREAD
|
||||
EVT_USE_BUF(N(kooper_dispOffsets))
|
||||
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, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_4)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_4)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(3.0))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(kooper_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LW(0))
|
||||
EVT_SUB(LW(0), 1)
|
||||
EVT_IF_GT(LW(0), 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 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(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_19)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
|
||||
EVT_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_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(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_4)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
|
||||
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_ADDR(N(kooper_defenseTable)))
|
||||
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_ADDR(N(kooper_idleAnimations)))
|
||||
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -2, 38)
|
||||
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -3, -9)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_E)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_A)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_200C)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 75)
|
||||
EVT_CALL(func_8024ECF8, 1, 1, 1)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LW(0), 10)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LW(0), 20)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LW(0), 30)
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LW(9), 0)
|
||||
EVT_LOOP(LW(0))
|
||||
EVT_ADD(LW(9), 1)
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_LT(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_A)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
|
||||
EVT_CASE_EQ(20)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LW(4), LW(5), LW(6), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_CASE_LT(40)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_B)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0))
|
||||
EVT_CASE_EQ(40)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LW(4), LW(5), LW(6), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_CASE_LT(50)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_C)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
|
||||
EVT_CASE_EQ(50)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LW(4), LW(5), LW(6), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_CASE_LT(60)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_D)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0))
|
||||
EVT_CASE_EQ(60)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LW(4), LW(5), LW(6), 32, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_200A)
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 0, 0, 5)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(kooper_UnkActorPosFunc))
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_9)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, -8, 0, 0)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(2)
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(4), LW(5), LW(6))
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_IMPACT, 1, LW(4), LW(5), LW(6), 16, 4, 0, 10, 0, 0, 0, 0, 0)
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), -12)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_F)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 0, 0)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 8)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 60)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_F)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
379
src/battle/common/actor/ghost_lakilester.inc.c
Normal file
379
src/battle/common/actor/ghost_lakilester.inc.c
Normal file
@ -0,0 +1,379 @@
|
||||
#include "sprite/npc/battle_lakilester.h"
|
||||
|
||||
extern EvtScript N(lakilester_init);
|
||||
extern EvtScript N(lakilester_handleEvent);
|
||||
extern EvtScript N(lakilester_idle);
|
||||
extern EvtScript N(lakilester_takeTurn);
|
||||
|
||||
s32 N(lakilester_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_lakilester_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_lakilester_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_lakilester_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_lakilester_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_lakilester_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_lakilester_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_lakilester_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_lakilester_Palette_00_Anim_8,
|
||||
STATUS_FEAR, NPC_ANIM_battle_lakilester_Palette_00_Anim_1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(lakilester_idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_lakilester_Palette_00_Anim_14,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(lakilester_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(lakilester_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(lakilester_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -3, 33 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(lakilester_idleAnimations),
|
||||
.defenseTable = N(lakilester_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -2,
|
||||
.unk_1D = -10,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_100000,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(lakilester_idleAnimations2),
|
||||
.defenseTable = N(lakilester_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = 0,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(lakilester) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_GHOST_LAKILESTER,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(lakilester_parts)),
|
||||
.partsData = N(lakilester_parts),
|
||||
.script = &N(lakilester_init),
|
||||
.statusTable = N(lakilester_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 44, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(lakilester_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(lakilester_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(lakilester_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(lakilester_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(lakilester_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(lakilester_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_lakilester_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_C)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_lakilester_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_B)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_lakilester_Palette_00_Anim_A)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(lakilester_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, 20, 30, LW(2))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_1)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), -1)
|
||||
EVT_ADD(LW(1), 4)
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), -3)
|
||||
EVT_ADD(LW(1), 10)
|
||||
EVT_ADD(LW(2), 5)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 3, NPC_ANIM_battle_lakilester_Palette_00_Anim_14)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_F)
|
||||
EVT_LOOP(4)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADDF(LW(1), EVT_FLOAT(2.4))
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(1), 6)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), -3)
|
||||
EVT_ADD(LW(1), 16)
|
||||
EVT_ADD(LW(2), 2)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(0.4))
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), -8)
|
||||
EVT_ADD(LW(1), 40)
|
||||
EVT_ADD(LW(2), 5)
|
||||
EVT_SETF(LW(3), EVT_FLOAT(1.0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_ENERGY_IN_OUT, 0, LW(0), LW(1), LW(2), LW(3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2C5)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(15)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, 1, 0, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, -1, 0, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 3, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_11)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_12)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(SetPartSounds, ACTOR_SELF, 3, 2, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_201B)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 3, NPC_ANIM_battle_lakilester_Palette_00_Anim_15)
|
||||
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RandInt, 100, LW(3))
|
||||
EVT_SUB(LW(3), 50)
|
||||
EVT_ADD(LW(0), LW(3))
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, 3, LW(0), 0, LW(2), 20, 1)
|
||||
EVT_THREAD
|
||||
EVT_ADD(LW(0), -50)
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, 3, LW(0), 0, LW(2), 15, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 60)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
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, 3, NPC_ANIM_battle_lakilester_Palette_00_Anim_15)
|
||||
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 3, EVT_FLOAT(1.5))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, 3, LW(0), LW(1), LW(2), 20, 1)
|
||||
EVT_THREAD
|
||||
EVT_ADD(LW(0), -50)
|
||||
EVT_CALL(JumpPartTo, ACTOR_SELF, 3, LW(0), 0, LW(2), 15, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 8)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_lakilester_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
342
src/battle/common/actor/ghost_parakarry.inc.c
Normal file
342
src/battle/common/actor/ghost_parakarry.inc.c
Normal file
@ -0,0 +1,342 @@
|
||||
#include "sprite/npc/battle_parakarry.h"
|
||||
|
||||
extern EvtScript N(parakarry_init);
|
||||
extern EvtScript N(parakarry_takeTurn);
|
||||
extern EvtScript N(parakarry_idle);
|
||||
extern EvtScript N(parakarry_handleEvent);
|
||||
|
||||
s32 N(parakarry_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_parakarry_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_parakarry_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_parakarry_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_parakarry_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_parakarry_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_parakarry_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_parakarry_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_parakarry_Palette_00_Anim_1,
|
||||
STATUS_FEAR, NPC_ANIM_battle_parakarry_Palette_00_Anim_1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(parakarry_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 1,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(parakarry_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parakarry_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -3, 32 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(parakarry_idleAnimations),
|
||||
.defenseTable = N(parakarry_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -16,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 50, 0 },
|
||||
.targetOffset = { -3, -18 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = NULL,
|
||||
.defenseTable = N(parakarry_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -16,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(parakarry) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_GHOST_PARAKARRY,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(parakarry_parts)),
|
||||
.partsData = N(parakarry_parts),
|
||||
.script = &N(parakarry_init),
|
||||
.statusTable = N(parakarry_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 38, 38 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(parakarry_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(parakarry_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(parakarry_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(parakarry_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(parakarry_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(parakarry_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_F)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_parakarry_Palette_00_Anim_10)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_F)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_parakarry_Palette_00_Anim_10)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_10)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(N(OnShockHit))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_D)
|
||||
EVT_SET(LW(2), 22)
|
||||
EVT_EXEC_WAIT(N(OnShockDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_parakarry_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(parakarry_doTakeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_0)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(UseBattleCamPresetImmediately, 1)
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 1, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2004)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_14)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 10, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, 0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_4)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 15, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -20, 6)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2005)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_5)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, 0)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, 4)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_6)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(PlaySound, SOUND_0)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_5)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0)
|
||||
EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_parakarry_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
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_battle_parakarry_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, 0)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(parakarry_takeTurn) = {
|
||||
EVT_EXEC_WAIT(N(parakarry_doTakeTurn))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
453
src/battle/common/actor/ghost_sushie.inc.c
Normal file
453
src/battle/common/actor/ghost_sushie.inc.c
Normal file
@ -0,0 +1,453 @@
|
||||
#include "sprite/npc/battle_sushie.h"
|
||||
|
||||
extern EvtScript N(sushie_handleEvent);
|
||||
extern EvtScript N(sushie_takeTurn);
|
||||
extern EvtScript N(sushie_idle);
|
||||
extern EvtScript N(sushie_init);
|
||||
|
||||
s32 N(sushie_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_sushie_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_sushie_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_sushie_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_sushie_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_sushie_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_sushie_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_sushie_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_sushie_Palette_00_Anim_10,
|
||||
STATUS_FEAR, NPC_ANIM_battle_sushie_Palette_00_Anim_10,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(sushie_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(sushie_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(sushie_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 24 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(sushie_idleAnimations),
|
||||
.defenseTable = N(sushie_defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -12,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(sushie) = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GHOST_SUSHIE,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(sushie_parts)),
|
||||
.partsData = N(sushie_parts),
|
||||
.script = &N(sushie_init),
|
||||
.statusTable = N(sushie_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 37, 26 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(sushie_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(sushie_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(sushie_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(sushie_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(sushie_idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(sushie_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CALL(GetLastElement, LW(1))
|
||||
EVT_IF_FLAG(LW(1), DAMAGE_TYPE_ELECTRIC)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(N(OnHitElectric))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_E)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_sushie_Palette_00_Anim_F)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_E)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_sushie_Palette_00_Anim_F)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_F)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(N(OnShockHit))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_SET(LW(2), 20)
|
||||
EVT_EXEC_WAIT(N(OnShockDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_sushie_Palette_00_Anim_D)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(sushie_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), LW(0))
|
||||
EVT_DIV(LW(3), EVT_FLOAT(3.0))
|
||||
EVT_SET(LW(10), LW(3))
|
||||
EVT_IF_LT(LW(10), 0)
|
||||
EVT_MUL(LW(10), -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MoveBattleCamOver, LW(10))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_3)
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, LW(10), FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_I)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(AddBattleCamZoom, -50)
|
||||
EVT_CALL(MoveBattleCamOver, 30)
|
||||
EVT_CALL(func_8024ECF8, 1, 1, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_4)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_8)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 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_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.05), EVT_FLOAT(1.05), EVT_FLOAT(1.05))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5))
|
||||
EVT_END_SWITCH
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2034)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_6)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_7)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_CALL(LandJump, ACTOR_SELF)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -15, 0, 0)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 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_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.35), EVT_FLOAT(1.35), EVT_FLOAT(1.35))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.55), EVT_FLOAT(1.55), EVT_FLOAT(1.55))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(13)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.6), EVT_FLOAT(1.6), EVT_FLOAT(1.6))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.8), EVT_FLOAT(1.8), EVT_FLOAT(1.8))
|
||||
EVT_END_SWITCH
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2034)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_5)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_6)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_7)
|
||||
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(10))
|
||||
EVT_SWITCH(LW(10))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_6)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 60)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
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_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
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(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_29A)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_1)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_sushie_Palette_00_Anim_3)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
460
src/battle/common/actor/ghost_watt.inc.c
Normal file
460
src/battle/common/actor/ghost_watt.inc.c
Normal file
@ -0,0 +1,460 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_watt.h"
|
||||
#include "effects.h"
|
||||
|
||||
ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
|
||||
WattEffectData* wattEffectData;
|
||||
f32 x, y, z;
|
||||
Actor* actor = get_actor(script->owner1.enemyID);
|
||||
ActorState* state = &actor->state;
|
||||
|
||||
if (isInitialCall) {
|
||||
wattEffectData = heap_malloc(sizeof(*wattEffectData));
|
||||
actor->state.varTablePtr[2] = wattEffectData;
|
||||
wattEffectData->unk_04 = TRUE;
|
||||
wattEffectData->angle = 0;
|
||||
wattEffectData->unk_0C = TRUE;
|
||||
wattEffectData->unk_10 = 0;
|
||||
wattEffectData->effect1 = fx_static_status(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
||||
wattEffectData->effect2 = fx_static_status(1, actor->currentPos.x, -1000.0f, actor->currentPos.z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
||||
wattEffectData->flags = TRUE;
|
||||
wattEffectData->debuff = actor->debuff;
|
||||
}
|
||||
|
||||
wattEffectData = state->varTablePtr[2];
|
||||
if (wattEffectData->flags) {
|
||||
if (wattEffectData->unk_04 && actor->debuff != STATUS_STOP) {
|
||||
wattEffectData->angle += 15;
|
||||
wattEffectData->angle = clamp_angle(wattEffectData->angle);
|
||||
}
|
||||
actor->unk_19A = sin_rad(wattEffectData->angle * TAU / 360.0f) * 3.0f;
|
||||
|
||||
x = actor->currentPos.x + actor->headOffset.x;
|
||||
y = actor->currentPos.y + actor->headOffset.y + actor->unk_19A + (actor->debuff != STATUS_SHRINK ? 12.0 : 4.800000000000001); // 4.8 doesn't match
|
||||
z = actor->currentPos.z + actor->headOffset.z;
|
||||
if (wattEffectData->unk_0C) {
|
||||
switch (wattEffectData->unk_10) {
|
||||
case 0:
|
||||
if (wattEffectData->effect1 == NULL) {
|
||||
wattEffectData->effect1 = fx_static_status(0, x, y, z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
||||
}
|
||||
|
||||
if (wattEffectData->effect2 != NULL) {
|
||||
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect2 = NULL;
|
||||
}
|
||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_04 = x;
|
||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_08 = y;
|
||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_0C = z;
|
||||
break;
|
||||
case 1:
|
||||
if (wattEffectData->effect1 != NULL) {
|
||||
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect1 = NULL;
|
||||
}
|
||||
if (wattEffectData->effect2 == NULL) {
|
||||
wattEffectData->effect2 = fx_static_status(1, x, y, z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
||||
|
||||
}
|
||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_04 = x;
|
||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_08 = y;
|
||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_0C = z;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (wattEffectData->effect1 != NULL) {
|
||||
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect1 = NULL;
|
||||
}
|
||||
if (wattEffectData->effect2 != NULL) {
|
||||
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect2 = NULL;
|
||||
}
|
||||
}
|
||||
if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) {
|
||||
if (wattEffectData->effect1 != NULL) {
|
||||
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect1 = NULL;
|
||||
}
|
||||
if (wattEffectData->effect2 != NULL) {
|
||||
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
wattEffectData->effect2 = NULL;
|
||||
}
|
||||
}
|
||||
wattEffectData->debuff = actor->debuff;
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ApiStatus N(UnkWattEffectFunc2)(Evt* script, s32 isInitialCall) {
|
||||
WattEffectData* wattEffectData = get_actor(script->owner1.enemyID)->state.varTablePtr[2];
|
||||
|
||||
wattEffectData->flags = FALSE;
|
||||
|
||||
if (wattEffectData->effect1 != NULL) {
|
||||
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
}
|
||||
|
||||
if (wattEffectData->effect2 != NULL) {
|
||||
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(UnkWattEffectFunc3)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
WattEffectData* wattEffectData = get_actor(script->owner1.enemyID)->state.varTablePtr[2];
|
||||
|
||||
wattEffectData->unk_04 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(UnkWattEffectFunc4)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
WattEffectData* wattEffectData = get_actor(script->owner1.enemyID)->state.varTablePtr[2];
|
||||
|
||||
wattEffectData->unk_0C = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(UnkWattEffectFunc5)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
WattEffectData* wattEffectData = get_actor(script->owner1.enemyID)->state.varTablePtr[2];
|
||||
|
||||
wattEffectData->unk_10 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "common/UnkBackgroundFunc3.inc.c"
|
||||
|
||||
#include "common/SetBackgroundAlpha.inc.c"
|
||||
|
||||
extern EvtScript N(watt_init);
|
||||
extern EvtScript N(watt_takeTurn);
|
||||
extern EvtScript N(watt_idle);
|
||||
extern EvtScript N(watt_handleEvent);
|
||||
|
||||
s32 N(watt_idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_watt_Palette_00_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_watt_Palette_00_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_watt_Palette_00_Anim_0,
|
||||
STATUS_POISON, NPC_ANIM_battle_watt_Palette_00_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_watt_Palette_00_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_watt_Palette_00_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_watt_Palette_00_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_watt_Palette_00_Anim_F,
|
||||
STATUS_FEAR, NPC_ANIM_battle_watt_Palette_00_Anim_F,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(watt_defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_SHOCK, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(watt_statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 60,
|
||||
STATUS_POISON, 0,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 0,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, -1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, -1,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(watt_parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -1, 20 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(watt_idleAnimations),
|
||||
.defenseTable = N(watt_defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_ELECTRIFIED,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -8,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 50, 0 },
|
||||
.targetOffset = { -1, -30 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = NULL,
|
||||
.defenseTable = N(watt_defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_ELECTRIFIED,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -8,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint N(watt) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_GHOST_WATT,
|
||||
.level = 23,
|
||||
.maxHP = 15,
|
||||
.partCount = ARRAY_COUNT(N(watt_parts)),
|
||||
.partsData = N(watt_parts),
|
||||
.script = &N(watt_init),
|
||||
.statusTable = N(watt_statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 90,
|
||||
.coinReward = 2,
|
||||
.size = { 34, 28 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 20 },
|
||||
};
|
||||
|
||||
EvtScript N(watt_init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(watt_takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(watt_idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(watt_handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(watt_idle) = {
|
||||
EVT_SET_PRIORITY(99)
|
||||
EVT_CALL(N(UnkWattEffectFunc1))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(watt_handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(N(UnkWattEffectFunc3), 0)
|
||||
EVT_CALL(N(UnkWattEffectFunc4), 1)
|
||||
EVT_CALL(N(UnkWattEffectFunc5), 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_D)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_watt_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_D)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_watt_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CALL(N(UnkWattEffectFunc2))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_E)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_CALL(N(UnkWattEffectFunc2))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_CALL(N(UnkWattEffectFunc2))
|
||||
EVT_EXEC_WAIT(N(OnDeath))
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_3)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_3)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_watt_Palette_00_Anim_C)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(N(UnkWattEffectFunc3), 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(watt_takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamTarget, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetBattleCamZoom, 350)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_CALL(MoveBattleCamOver, 80)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_3)
|
||||
EVT_CALL(N(UnkWattEffectFunc5), 1)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 15, -10, 5)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_CALL(N(UnkWattEffectFunc5), 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(N(UnkWattEffectFunc3), 0)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 20, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -20, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_5)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, 10)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, 4)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkWattEffectFunc4), 1)
|
||||
EVT_CALL(N(UnkWattEffectFunc3), 1)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(N(UnkWattEffectFunc4), 0)
|
||||
EVT_SET(LW(10), 40)
|
||||
EVT_CALL(AddBattleCamZoom, -75)
|
||||
EVT_CALL(MoveBattleCamOver, LW(10))
|
||||
EVT_CALL(func_8024ECF8, 0, 0, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_289)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 4)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 8, LW(0), LW(1), LW(2), EVT_FLOAT(0.52), LW(10), 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 12)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 8, LW(0), LW(1), LW(2), EVT_FLOAT(1.3), LW(10), 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkBackgroundFunc3))
|
||||
EVT_SET(LW(9), 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_6)
|
||||
EVT_LOOP(LW(10))
|
||||
EVT_ADD(LW(9), 3)
|
||||
EVT_IF_GT(LW(9), 200)
|
||||
EVT_SET(LW(9), 200)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(SetBackgroundAlpha), LW(9))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_CALL(func_8026EA7C, ACTOR_SELF, 1, 9)
|
||||
EVT_CALL(AddBattleCamZoom, 75)
|
||||
EVT_CALL(MoveBattleCamOver, 5)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(N(SetBackgroundAlpha), 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LW(9))
|
||||
EVT_SWITCH(LW(9))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE, 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE, 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(N(UnkWattEffectFunc4), 1)
|
||||
EVT_CALL(N(UnkWattEffectFunc3), 1)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 10, 0)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -10, 10)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_3)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_watt_Palette_00_Anim_1)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -317,7 +317,7 @@ EvtScript N(takeTurn_8021A440) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -393,7 +393,7 @@ EvtScript N(takeTurn_8021A440) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
898
src/battle/common/actor/gray_magikoopa.inc.c
Normal file
898
src/battle/common/actor/gray_magikoopa.inc.c
Normal file
@ -0,0 +1,898 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/magikoopa.h"
|
||||
#include "sprite/npc/flying_magikoopa.h"
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(init_flying);
|
||||
extern EvtScript N(takeTurn);
|
||||
|
||||
extern EvtScript N(flee);
|
||||
|
||||
extern s32 N(idleAnimations1)[];
|
||||
extern s32 N(idleAnimations2)[];
|
||||
extern s32 N(idleAnimations3)[];
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable_flying)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable_flying)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations1),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -5,
|
||||
.unk_1D = -12,
|
||||
},
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts_flying)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations1),
|
||||
.defenseTable = N(defenseTable_flying),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -5,
|
||||
.unk_1D = -12,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -10, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations2),
|
||||
.defenseTable = N(defenseTable_flying),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_800000,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -8,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations3),
|
||||
.defenseTable = N(defenseTable_flying),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = 0,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_GRAY_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 75,
|
||||
.coinReward = 2,
|
||||
.size = { 36, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 32 },
|
||||
};
|
||||
|
||||
ActorBlueprint N(flying) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_FLYING_GRAY_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(parts_flying)),
|
||||
.partsData = N(parts_flying),
|
||||
.script = &N(init_flying),
|
||||
.statusTable = N(statusTable_flying),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 75,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 75,
|
||||
.coinReward = 2,
|
||||
.size = { 48, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -25, 20 },
|
||||
.statusMessageOffset = { 1, 34 },
|
||||
};
|
||||
|
||||
s32 N(idleAnimations1)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_magikoopa_Palette_05_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_magikoopa_Palette_05_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_magikoopa_Palette_05_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations2)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_flying_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_flying_magikoopa_Palette_05_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_flying_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_flying_magikoopa_Palette_05_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_flying_magikoopa_Palette_05_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_flying_magikoopa_Palette_05_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(idleAnimations3)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_05_Anim_A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#include "world/common/UnkFunc52.inc.c"
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_2)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(canBeKnockedOff) = {
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_80000)
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(GetSelectedMoveID), LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(MOVE_HEADBONK1)
|
||||
EVT_CASE_OR_EQ(MOVE_HEADBONK2)
|
||||
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
|
||||
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(knockOff) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_POW)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_100000, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(2), 1)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 150, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(3))
|
||||
EVT_IF_EQ(LW(3), EVENT_15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_4)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_ADD(LW(4), 10)
|
||||
EVT_ADD(LW(5), 5)
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LW(3), LW(4), LW(5), EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_LOOP(20)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GRAY_MAGIKOOPA)
|
||||
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_ADDR(N(statusTable)))
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LW(0))
|
||||
EVT_MOD(LW(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LW(0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent_flying) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(EVENT_HIT_COMBO)
|
||||
EVT_EXEC_WAIT(N(canBeKnockedOff))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
|
||||
EVT_EXEC_WAIT(N(canBeKnockedOff))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(knockOff))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_15)
|
||||
EVT_EXEC_WAIT(N(canBeKnockedOff))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(knockOff))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_2)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_05_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attackMagicBlast) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LW(0), LW(1), LW(2), EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(9))
|
||||
EVT_IF_FLAG(LW(9), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 50)
|
||||
EVT_SET(LW(4), 0)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 25)
|
||||
EVT_WAIT_FRAMES(50)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(14)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 10)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 20)
|
||||
EVT_WAIT_FRAMES(18)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_WAIT_FRAMES(19)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(attackWandStrike) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DB)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_2)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 25)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_3)
|
||||
EVT_WAIT_FRAMES(11)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2DC)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(flee) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NE(LW(0), EVENT_SCARE_AWAY)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 200)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_EXEC_WAIT(ForceNextTarget)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(init_flying) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent_flying)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
|
||||
EVT_CALL(GetIndexFromHome, LW(0), LW(1))
|
||||
EVT_CALL(GetBattleVar, 2, LW(2))
|
||||
EVT_IF_GT(LW(1), LW(2))
|
||||
EVT_CALL(N(UnkFunc52), LW(0), LW(3))
|
||||
EVT_IF_EQ(LW(3), 0)
|
||||
EVT_CALL(GetStatusFlags, LW(0), LW(4))
|
||||
EVT_IF_NOT_FLAG(LW(4), STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT)
|
||||
EVT_SET(LW(8), LW(0))
|
||||
EVT_CALL(SetBattleVar, 2, LW(1))
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_EXEC_WAIT(N(attackMagicBlast))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(attackWandStrike))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(100) // make ally invisible
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_2)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 6)
|
||||
EVT_ADD(LW(1), 12)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 6, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 16)
|
||||
EVT_ADD(LW(1), 31)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 6, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 6, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 6, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_05_Anim_1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_05_Anim_1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, LW(8), SOUND_2DB)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_8026BF48, 1)
|
||||
EVT_CALL(VanishActor, LW(8), 2)
|
||||
EVT_CALL(func_8026BF48, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(WaitForBuffDone)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -794,7 +794,7 @@ EvtScript N(takeTurn_8021D6E8) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -870,7 +870,7 @@ EvtScript N(takeTurn_8021D6E8) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
898
src/battle/common/actor/red_magikoopa.inc.c
Normal file
898
src/battle/common/actor/red_magikoopa.inc.c
Normal file
@ -0,0 +1,898 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "effects.h"
|
||||
#include "sprite/npc/magikoopa.h"
|
||||
#include "sprite/npc/flying_magikoopa.h"
|
||||
|
||||
extern EvtScript N(8022E6A0);
|
||||
extern EvtScript N(8022E558);
|
||||
extern EvtScript N(8022E5FC);
|
||||
|
||||
extern EvtScript N(8022E334);
|
||||
|
||||
extern s32 N(8022C370)[];
|
||||
extern s32 N(8022C3BC)[];
|
||||
extern s32 N(8022C408)[];
|
||||
|
||||
s32 N(8022C120)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(8022C12C)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(8022C138)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(8022C1E4)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 50,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 100,
|
||||
STATUS_FEAR, 0,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 80,
|
||||
STATUS_STOP, 90,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 0,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 0,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(8022C370),
|
||||
.defenseTable = N(8022C120),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -5,
|
||||
.unk_1D = -12,
|
||||
},
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(8022C2B4)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 2, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(8022C370),
|
||||
.defenseTable = N(8022C12C),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_800000,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = -5,
|
||||
.unk_1D = -12,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 2,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -10, 35 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(8022C3BC),
|
||||
.defenseTable = N(8022C12C),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = -8,
|
||||
},
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET,
|
||||
.index = 3,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { 0, 0 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(8022C408),
|
||||
.defenseTable = N(8022C12C),
|
||||
.eventFlags = 0,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 0,
|
||||
.unk_1D = 0,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_RED_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(8022E558),
|
||||
.statusTable = N(8022C138),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 80,
|
||||
.spookChance = 70,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 36, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 32 },
|
||||
};
|
||||
|
||||
ActorBlueprint N(flying) = {
|
||||
.flags = ACTOR_FLAG_FLYING,
|
||||
.type = ACTOR_TYPE_FLYING_RED_MAGIKOOPA,
|
||||
.level = 21,
|
||||
.maxHP = 11,
|
||||
.partCount = ARRAY_COUNT(N(8022C2B4)),
|
||||
.partsData = N(8022C2B4),
|
||||
.script = &N(8022E5FC),
|
||||
.statusTable = N(8022C1E4),
|
||||
.escapeChance = 40,
|
||||
.airLiftChance = 95,
|
||||
.spookChance = 75,
|
||||
.baseStatusChance = 40,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 48, 40 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -25, 20 },
|
||||
.statusMessageOffset = { 1, 34 },
|
||||
};
|
||||
|
||||
s32 N(8022C370)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_magikoopa_Palette_01_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(8022C3BC)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_8,
|
||||
STATUS_POISON, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_flying_magikoopa_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_FEAR, NPC_ANIM_flying_magikoopa_Palette_01_Anim_7,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(8022C408)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_flying_magikoopa_Palette_01_Anim_A,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
EvtScript N(8022C414) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "common/ShrinkActor.inc.c"
|
||||
#include "common/GetSelectedMoveID.inc.c"
|
||||
#include "common/UnkBattleFunc1.inc.c"
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
#include "world/common/UnkFunc52.inc.c"
|
||||
|
||||
EvtScript N(8022C424) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(N(8022E334))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, 0, 2, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 1, -4, 5, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022C93C) = {
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), BS_FLAGS1_80000)
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(GetSelectedMoveID), LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(131)
|
||||
EVT_CASE_OR_EQ(132)
|
||||
EVT_CASE_OR_EQ(133)
|
||||
EVT_CASE_OR_EQ(136)
|
||||
EVT_CALL(GetBattleFlags, LW(0))
|
||||
EVT_IF_FLAG(LW(0), BS_FLAGS1_40 | BS_FLAGS1_200)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022CA48) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetLastElement, LW(0))
|
||||
EVT_IF_FLAG(LW(0), DAMAGE_TYPE_POW)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_MULTI_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_MULTI_TARGET, 0)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_100000, 1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SUB(LW(2), 1)
|
||||
EVT_CALL(SetPartPos, ACTOR_SELF, 3, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_301)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(N(StartRumbleWithParams), 150, 10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(3))
|
||||
EVT_IF_EQ(LW(3), EVENT_15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_ADD(LW(4), 10)
|
||||
EVT_ADD(LW(5), 5)
|
||||
EVT_CALL(PlayEffect, EFFECT_SMOKE_BURST, 0, LW(3), LW(4), LW(5), EVT_FLOAT(1.0), 10, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
|
||||
EVT_LOOP(20)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 3, ACTOR_PART_FLAG_INVISIBLE, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, 0)
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(8022C424)))
|
||||
EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA)
|
||||
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_ADDR(N(8022C138)))
|
||||
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 32)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_1000, 1)
|
||||
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
|
||||
EVT_CALL(GetIndexFromPos, ACTOR_SELF, LW(0))
|
||||
EVT_MOD(LW(0), 4)
|
||||
EVT_CALL(SetGoalToIndex, ACTOR_SELF, LW(0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022D044) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(EVENT_HIT_COMBO)
|
||||
EVT_EXEC_WAIT(N(8022C93C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
|
||||
EVT_EXEC_WAIT(N(8022C93C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_EXEC_WAIT(N(8022CA48))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
|
||||
EVT_CASE_OR_EQ(EVENT_15)
|
||||
EVT_EXEC_WAIT(N(8022C93C))
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_EXEC_WAIT(N(8022CA48))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_5)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_6)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
|
||||
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(N(8022E334))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
|
||||
EVT_IF_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -3, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetPartDispOffset, ACTOR_SELF, 2, -15, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET_CONST(LW(0), 2)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_flying_magikoopa_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022D6A8) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlayEffect, EFFECT_GATHER_MAGIC, 0, LW(0), LW(1), LW(2), EVT_FLOAT(0.5), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(9))
|
||||
EVT_IF_FLAG(LW(9), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 50)
|
||||
EVT_SET(LW(4), 0)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 25)
|
||||
EVT_WAIT_FRAMES(50)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(14)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 2, 0, 2)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 2, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 8)
|
||||
EVT_ADD(LW(1), 8)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 20)
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(3), LW(4), LW(5))
|
||||
EVT_SUB(LW(3), 10)
|
||||
EVT_CALL(N(ShrinkActor), LW(0), LW(1), LW(5), LW(3), LW(4), LW(5), 20)
|
||||
EVT_WAIT_FRAMES(18)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_WAIT_FRAMES(19)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022DCC4) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2DB)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_ELSE
|
||||
EVT_ADD(LW(0), 25)
|
||||
EVT_END_IF
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_3)
|
||||
EVT_WAIT_FRAMES(11)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, 0x2DC)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_IF_EQ(LW(10), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET(LW(0), 200)
|
||||
EVT_LOOP(20)
|
||||
EVT_SUB(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, 10)
|
||||
EVT_SET(LW(0), 55)
|
||||
EVT_LOOP(20)
|
||||
EVT_ADD(LW(0), 10)
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, 255)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022E334) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NE(LW(0), EVENT_SCARE_AWAY)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_B)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(EnableActorBlur, ACTOR_SELF, 1)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 200)
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_EXEC_WAIT(ForceNextTarget)
|
||||
EVT_CALL(func_8027D32C, ACTOR_SELF)
|
||||
EVT_CALL(RemoveActor, ACTOR_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022E558) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(8022C414)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(8022E6A0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(8022C424)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022E5FC) = {
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(8022C414)))
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(8022E6A0)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(8022D044)))
|
||||
EVT_CALL(GetBattleVar, 2, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(8022E6A0) = {
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
|
||||
EVT_CALL(GetIndexFromHome, LW(0), LW(1))
|
||||
EVT_CALL(GetBattleVar, 2, LW(2))
|
||||
EVT_IF_GT(LW(1), LW(2))
|
||||
EVT_CALL(N(UnkFunc52), LW(0), LW(3))
|
||||
EVT_IF_EQ(LW(3), 0)
|
||||
EVT_CALL(GetActorAttackBoost, LW(0), LW(4))
|
||||
EVT_IF_LT(LW(4), 3)
|
||||
EVT_SET(LW(8), LW(0))
|
||||
EVT_CALL(SetBattleVar, 2, LW(1))
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 32770, LW(0))
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_EXEC_WAIT(N(8022E334))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_EXEC_WAIT(N(8022D6A8))
|
||||
EVT_ELSE
|
||||
EVT_EXEC_WAIT(N(8022DCC4))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(MoveBattleCamOver, 15)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_2)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 6)
|
||||
EVT_ADD(LW(1), 12)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 16)
|
||||
EVT_ADD(LW(1), 31)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(10))
|
||||
EVT_IF_FLAG(LW(10), STATUS_FLAG_SHRINK)
|
||||
EVT_SUB(LW(0), 12)
|
||||
EVT_ADD(LW(1), 14)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.12), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_SUB(LW(0), 30)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_SUB(LW(2), 2)
|
||||
EVT_CALL(PlayEffect, EFFECT_RADIAL_SHIMMER, 5, LW(0), LW(1), LW(2), EVT_FLOAT(0.3), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(GetActorFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), ACTOR_FLAG_FLYING)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_magikoopa_Palette_01_Anim_1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, NPC_ANIM_flying_magikoopa_Palette_01_Anim_1)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySoundAtActor, LW(8), 0x2DD)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_8026BF48, 1)
|
||||
EVT_CALL(BoostAttack, LW(8), 1)
|
||||
EVT_CALL(func_8026BF48, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(WaitForBuffDone)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -333,7 +333,7 @@ EvtScript N(takeTurn_8021F1BC) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
@ -409,7 +409,7 @@ EvtScript N(takeTurn_8021F1BC) = {
|
||||
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(N(CalculateRotationZ), 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))
|
||||
|
347
src/battle/common/actor/white_clubba.inc.c
Normal file
347
src/battle/common/actor/white_clubba.inc.c
Normal file
@ -0,0 +1,347 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_clubba.h"
|
||||
|
||||
extern EvtScript N(init);
|
||||
extern EvtScript N(idle);
|
||||
extern EvtScript N(takeTurn);
|
||||
extern EvtScript N(handleEvent);
|
||||
|
||||
s32 N(idleAnimations)[] = {
|
||||
STATUS_NORMAL, NPC_ANIM_battle_clubba_Palette_01_Anim_1,
|
||||
STATUS_STONE, NPC_ANIM_battle_clubba_Palette_01_Anim_0,
|
||||
STATUS_SLEEP, NPC_ANIM_battle_clubba_Palette_01_Anim_3,
|
||||
STATUS_POISON, NPC_ANIM_battle_clubba_Palette_01_Anim_1,
|
||||
STATUS_STOP, NPC_ANIM_battle_clubba_Palette_01_Anim_0,
|
||||
STATUS_STATIC, NPC_ANIM_battle_clubba_Palette_01_Anim_1,
|
||||
STATUS_PARALYZE, NPC_ANIM_battle_clubba_Palette_01_Anim_0,
|
||||
STATUS_DIZZY, NPC_ANIM_battle_clubba_Palette_01_Anim_5,
|
||||
STATUS_FEAR, NPC_ANIM_battle_clubba_Palette_01_Anim_5,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
s32 N(defenseTable)[] = {
|
||||
ELEMENT_NORMAL, 0,
|
||||
ELEMENT_FIRE, -2,
|
||||
ELEMENT_ICE, 99,
|
||||
ELEMENT_END,
|
||||
};
|
||||
|
||||
s32 N(statusTable)[] = {
|
||||
STATUS_NORMAL, 0,
|
||||
STATUS_DEFAULT, 0,
|
||||
STATUS_SLEEP, 80,
|
||||
STATUS_POISON, 50,
|
||||
STATUS_FROZEN, 0,
|
||||
STATUS_DIZZY, 75,
|
||||
STATUS_FEAR, 100,
|
||||
STATUS_STATIC, 50,
|
||||
STATUS_PARALYZE, 75,
|
||||
STATUS_SHRINK, 75,
|
||||
STATUS_STOP, 80,
|
||||
STATUS_DEFAULT_TURN_MOD, 0,
|
||||
STATUS_SLEEP_TURN_MOD, 1,
|
||||
STATUS_POISON_TURN_MOD, 0,
|
||||
STATUS_FROZEN_TURN_MOD, 0,
|
||||
STATUS_DIZZY_TURN_MOD, 0,
|
||||
STATUS_FEAR_TURN_MOD, 0,
|
||||
STATUS_STATIC_TURN_MOD, 0,
|
||||
STATUS_PARALYZE_TURN_MOD, 1,
|
||||
STATUS_SHRINK_TURN_MOD, 0,
|
||||
STATUS_STOP_TURN_MOD, -1,
|
||||
STATUS_END,
|
||||
};
|
||||
|
||||
ActorPartBlueprint N(parts)[] = {
|
||||
{
|
||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||
.index = 1,
|
||||
.posOffset = { 0, 0, 0 },
|
||||
.targetOffset = { -12, 32 },
|
||||
.opacity = 255,
|
||||
.idleAnimations = N(idleAnimations),
|
||||
.defenseTable = N(defenseTable),
|
||||
.eventFlags = ACTOR_EVENT_FLAG_ICY,
|
||||
.elementImmunityFlags = 0,
|
||||
.unk_1C = 8,
|
||||
.unk_1D = -3,
|
||||
},
|
||||
};
|
||||
|
||||
ActorBlueprint NAMESPACE = {
|
||||
.flags = 0,
|
||||
.type = ACTOR_TYPE_WHITE_CLUBBA,
|
||||
.level = 23,
|
||||
.maxHP = 12,
|
||||
.partCount = ARRAY_COUNT(N(parts)),
|
||||
.partsData = N(parts),
|
||||
.script = &N(init),
|
||||
.statusTable = N(statusTable),
|
||||
.escapeChance = 50,
|
||||
.airLiftChance = 50,
|
||||
.spookChance = 60,
|
||||
.baseStatusChance = 50,
|
||||
.upAndAwayChance = 95,
|
||||
.spinSmashReq = 0,
|
||||
.powerBounceChance = 80,
|
||||
.coinReward = 2,
|
||||
.size = { 42, 42 },
|
||||
.hpBarOffset = { 0, 0 },
|
||||
.statusIconOffset = { -10, 20 },
|
||||
.statusMessageOffset = { 10, 35 },
|
||||
};
|
||||
|
||||
EvtScript N(init) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_ADDR(N(takeTurn)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_ADDR(N(idle)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_ADDR(N(handleEvent)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(idle) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(handleEvent) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(GetLastEvent, ACTOR_SELF, LW(0))
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
|
||||
EVT_CASE_OR_EQ(EVENT_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_BURN_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_CASE_EQ(EVENT_BURN_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_6)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoBurnHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_7)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoSpinSmashHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_SHOCK_HIT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoJumpBack)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoShockHit)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoImmune)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(EVENT_DEATH)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoDeath)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_1)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CASE_EQ(EVENT_SCARE_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_2)
|
||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoScareAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoAirLift)
|
||||
EVT_CASE_EQ(EVENT_BLOW_AWAY)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_4)
|
||||
EVT_EXEC_WAIT(DoBlowAway)
|
||||
EVT_RETURN
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
|
||||
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
|
||||
EVT_CALL(func_8024ECF8, -1, 1, 0)
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 27)
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_SUB(LW(2), 6)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_2)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_SELF, LW(0))
|
||||
EVT_IF_NOT_FLAG(LW(0), STATUS_FLAG_SHRINK)
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 27, 0, -6)
|
||||
EVT_ELSE
|
||||
EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, -6)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, BS_FLAGS1_10)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_8)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_IF_EQ(LW(0), HIT_RESULT_LUCKY)
|
||||
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
|
||||
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetBattlePhase, LW(0))
|
||||
EVT_IF_EQ(LW(0), PHASE_FIRST_STRIKE)
|
||||
EVT_GOTO(40)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetActorHP, ACTOR_SELF, LW(0))
|
||||
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LW(1))
|
||||
EVT_MULF(LW(0), EVT_FLOAT(100.0))
|
||||
EVT_DIVF(LW(0), LW(1))
|
||||
EVT_IF_LT(LW(0), 30)
|
||||
EVT_GOTO(50)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RandInt, 100, LW(0))
|
||||
EVT_IF_LT(LW(0), 25)
|
||||
EVT_GOTO(50)
|
||||
EVT_END_IF
|
||||
EVT_LABEL(40) // heavy club attack
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_9)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_A)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
|
||||
EVT_END_THREAD
|
||||
EVT_GOTO(100)
|
||||
EVT_LABEL(50) // swift club attack
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_9)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_A)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorHP, ACTOR_PLAYER, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_9)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_A)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_40)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorHP, ACTOR_PLAYER, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_9)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C5)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_battle_clubba_Palette_01_Anim_A)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
|
||||
EVT_END_THREAD
|
||||
EVT_LABEL(100)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
|
||||
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_WAIT_FRAMES(19)
|
||||
EVT_CALL(YieldTurn)
|
||||
EVT_SET_CONST(LW(0), 1)
|
||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_clubba_Palette_01_Anim_2)
|
||||
EVT_EXEC_WAIT(DoReturnHome)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,29 +1,29 @@
|
||||
#include "common.h"
|
||||
|
||||
// TODO: Define the table.
|
||||
extern f32 N(floatTable)[];
|
||||
extern f32 N(sinTable)[];
|
||||
|
||||
u32 N(BattleAreaAngleStuff1)(f32 x, f32 y) {
|
||||
f32 tempF = abs(y) / length2D(x, y);
|
||||
u16 angle1 = 0;
|
||||
u16 angle2 = 90;
|
||||
u32 N(ArcsinDeg)(f32 x, f32 y) {
|
||||
f32 sinAngle = abs(y) / length2D(x, y);
|
||||
u16 minAngle = 0;
|
||||
u16 maxAngle = 90;
|
||||
u16 ret;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
u16 temp_v1 = angle1 + ((angle2 - angle1) / 2);
|
||||
u16 midAngle = minAngle + ((maxAngle - minAngle) / 2);
|
||||
|
||||
if (N(floatTable)[temp_v1] < tempF) {
|
||||
angle1 = temp_v1;
|
||||
if (N(sinTable)[midAngle] < sinAngle) {
|
||||
minAngle = midAngle;
|
||||
} else {
|
||||
angle2 = temp_v1;
|
||||
maxAngle = midAngle;
|
||||
}
|
||||
}
|
||||
|
||||
if (fabsf(N(floatTable)[angle1] - tempF) < fabsf(N(floatTable)[angle2] - tempF)) {
|
||||
ret = angle1;
|
||||
if (fabsf(N(sinTable)[minAngle] - sinAngle) < fabsf(N(sinTable)[maxAngle] - sinAngle)) {
|
||||
ret = minAngle;
|
||||
} else {
|
||||
ret = angle2;
|
||||
ret = maxAngle;
|
||||
}
|
||||
|
||||
if (x < 0.0f && y >= 0.0f) {
|
||||
@ -41,22 +41,22 @@ u32 N(BattleAreaAngleStuff1)(f32 x, f32 y) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus N(CalculateRotationZ)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
s32 var2 = evt_get_variable(script, *args++);
|
||||
s32 var3 = evt_get_variable(script, *args++);
|
||||
s32 var4 = evt_get_variable(script, *args++);
|
||||
s32 var5 = evt_get_variable(script, *args);
|
||||
s32 x1 = evt_get_variable(script, *args++);
|
||||
s32 y1 = evt_get_variable(script, *args++);
|
||||
s32 x2 = evt_get_variable(script, *args++);
|
||||
s32 y2 = evt_get_variable(script, *args++);
|
||||
s32 outVar = evt_get_variable(script, *args);
|
||||
|
||||
var3 -= var1;
|
||||
var4 -= var2;
|
||||
x2 -= x1;
|
||||
y2 -= y1;
|
||||
|
||||
if (var3 == 0 && var4 == 0) {
|
||||
evt_set_variable(script, *args, var5);
|
||||
if (x2 == 0 && y2 == 0) {
|
||||
evt_set_variable(script, *args, outVar);
|
||||
return ApiStatus_DONE2;
|
||||
} else {
|
||||
evt_set_variable(script, *args, N(BattleAreaAngleStuff1)(var3, var4) - 90);
|
||||
evt_set_variable(script, *args, N(ArcsinDeg)(x2, y2) - 90);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
}
|
||||
|
90
src/common/UnkModelStuff.inc.c
Normal file
90
src/common/UnkModelStuff.inc.c
Normal file
@ -0,0 +1,90 @@
|
||||
#include "common.h"
|
||||
|
||||
u16 N(UnkModelStuff_array)[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
void N(UnkModelStuff_func1)(s32 arg0) {
|
||||
Vtx* firstVertex;
|
||||
Vtx* copiedVertices;
|
||||
s32 numVertices;
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(arg0, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
Vtx* vtx = &copiedVertices[i];
|
||||
s16 temp1 = (sins(N(UnkModelStuff_array)[arg0] * (i % 3 + 1) + i) + 0x8000) / 2;
|
||||
s32 temp2 = temp1 * 155;
|
||||
vtx->v.cn[2] = temp2 / 0x8000 + 100;
|
||||
vtx->v.cn[1] = temp2 / 0x8000 + 50;
|
||||
|
||||
temp3 = sins(N(UnkModelStuff_array)[arg0] / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(UnkModelStuff_array)[arg0] / 0x4000 * 0x8000 + i) + 0x8000;
|
||||
vtx->v.cn[0] = vtx->v.cn[0] * temp3 / 0x10000;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(arg0));
|
||||
N(UnkModelStuff_array)[arg0] += 0x253;
|
||||
}
|
||||
|
||||
#include "common/Set80071270_0_16.inc.c"
|
||||
#include "common/UnkFloatFunc2.inc.c"
|
||||
|
||||
EvtScript N(UnkModelStuffScript1) = {
|
||||
EVT_CALL(N(Set80071270_0_16))
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(UnkModelStuffScript2) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(RandInt, 30, LW(0))
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_WAIT_FRAMES(LW(0))
|
||||
EVT_SET(LW(1), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LW(1), 36)
|
||||
EVT_CALL(RotateModel, LW(10), LW(1), 0, 1, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(UnkModelStuffScript3) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(11), LW(1))
|
||||
EVT_EXEC(N(UnkModelStuffScript2))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(UnkModelStuffScript4) = {
|
||||
EVT_SET(LW(10), LW(0))
|
||||
EVT_SET(LW(7), 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LW(7), 4)
|
||||
EVT_IF_GT(LW(7), 3599)
|
||||
EVT_SUB(LW(7), 3600)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(UnkFloatFunc2), LW(7), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(TranslateModel, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -3,7 +3,7 @@
|
||||
#include "BattleAreaAngleStuff.inc.c"
|
||||
|
||||
// TODO Merge this file with the included file when all data is disassembled.
|
||||
f32 N(floatTable)[] = {
|
||||
f32 N(sinTable)[] = {
|
||||
0.000000f, 0.017452f, 0.034899f, 0.052336f, 0.069756f, 0.087156f, 0.104528f, 0.121869f,
|
||||
0.139173f, 0.156434f, 0.173648f, 0.190809f, 0.207912f, 0.224951f, 0.241922f, 0.258819f,
|
||||
0.275637f, 0.292372f, 0.309017f, 0.325568f, 0.342020f, 0.358368f, 0.374607f, 0.390731f,
|
||||
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,134 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80219A40_448E80
|
||||
/* 448E80 80219A40 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 448E84 80219A44 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* 448E88 80219A48 0080B02D */ daddu $s6, $a0, $zero
|
||||
/* 448E8C 80219A4C 27A50010 */ addiu $a1, $sp, 0x10
|
||||
/* 448E90 80219A50 27A60014 */ addiu $a2, $sp, 0x14
|
||||
/* 448E94 80219A54 27A70018 */ addiu $a3, $sp, 0x18
|
||||
/* 448E98 80219A58 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 448E9C 80219A5C AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* 448EA0 80219A60 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* 448EA4 80219A64 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* 448EA8 80219A68 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 448EAC 80219A6C AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 448EB0 80219A70 0C0470AC */ jal mdl_get_copied_vertices
|
||||
/* 448EB4 80219A74 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 448EB8 80219A78 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 448EBC 80219A7C 18400052 */ blez $v0, .L80219BC8
|
||||
/* 448EC0 80219A80 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 448EC4 80219A84 3C038023 */ lui $v1, %hi(b_area_kmr_part_3_sam_01_D_802336E0_43AB20)
|
||||
/* 448EC8 80219A88 246336E0 */ addiu $v1, $v1, %lo(b_area_kmr_part_3_sam_01_D_802336E0_43AB20)
|
||||
/* 448ECC 80219A8C 00161040 */ sll $v0, $s6, 1
|
||||
/* 448ED0 80219A90 0043A021 */ addu $s4, $v0, $v1
|
||||
/* 448ED4 80219A94 3C135555 */ lui $s3, 0x5555
|
||||
/* 448ED8 80219A98 36735556 */ ori $s3, $s3, 0x5556
|
||||
/* 448EDC 80219A9C 34158000 */ ori $s5, $zero, 0x8000
|
||||
/* 448EE0 80219AA0 02130018 */ mult $s0, $s3
|
||||
.L80219AA4:
|
||||
/* 448EE4 80219AA4 001097C3 */ sra $s2, $s0, 0x1f
|
||||
/* 448EE8 80219AA8 00001810 */ mfhi $v1
|
||||
/* 448EEC 80219AAC 00721823 */ subu $v1, $v1, $s2
|
||||
/* 448EF0 80219AB0 00031040 */ sll $v0, $v1, 1
|
||||
/* 448EF4 80219AB4 00431021 */ addu $v0, $v0, $v1
|
||||
/* 448EF8 80219AB8 02021023 */ subu $v0, $s0, $v0
|
||||
/* 448EFC 80219ABC 96830000 */ lhu $v1, ($s4)
|
||||
/* 448F00 80219AC0 24420001 */ addiu $v0, $v0, 1
|
||||
/* 448F04 80219AC4 00620018 */ mult $v1, $v0
|
||||
/* 448F08 80219AC8 00101100 */ sll $v0, $s0, 4
|
||||
/* 448F0C 80219ACC 00001812 */ mflo $v1
|
||||
/* 448F10 80219AD0 00702021 */ addu $a0, $v1, $s0
|
||||
/* 448F14 80219AD4 8FA30014 */ lw $v1, 0x14($sp)
|
||||
/* 448F18 80219AD8 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 448F1C 80219ADC 0C01917C */ jal sins
|
||||
/* 448F20 80219AE0 00628821 */ addu $s1, $v1, $v0
|
||||
/* 448F24 80219AE4 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 448F28 80219AE8 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 448F2C 80219AEC 00551021 */ addu $v0, $v0, $s5
|
||||
/* 448F30 80219AF0 00021FC2 */ srl $v1, $v0, 0x1f
|
||||
/* 448F34 80219AF4 00431021 */ addu $v0, $v0, $v1
|
||||
/* 448F38 80219AF8 000213C0 */ sll $v0, $v0, 0xf
|
||||
/* 448F3C 80219AFC 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 448F40 80219B00 00021880 */ sll $v1, $v0, 2
|
||||
/* 448F44 80219B04 00621821 */ addu $v1, $v1, $v0
|
||||
/* 448F48 80219B08 00031140 */ sll $v0, $v1, 5
|
||||
/* 448F4C 80219B0C 00431823 */ subu $v1, $v0, $v1
|
||||
/* 448F50 80219B10 04610002 */ bgez $v1, .L80219B1C
|
||||
/* 448F54 80219B14 0060102D */ daddu $v0, $v1, $zero
|
||||
/* 448F58 80219B18 24627FFF */ addiu $v0, $v1, 0x7fff
|
||||
.L80219B1C:
|
||||
/* 448F5C 80219B1C 000223C3 */ sra $a0, $v0, 0xf
|
||||
/* 448F60 80219B20 24820064 */ addiu $v0, $a0, 0x64
|
||||
/* 448F64 80219B24 A222000E */ sb $v0, 0xe($s1)
|
||||
/* 448F68 80219B28 24820032 */ addiu $v0, $a0, 0x32
|
||||
/* 448F6C 80219B2C 02121823 */ subu $v1, $s0, $s2
|
||||
/* 448F70 80219B30 00032843 */ sra $a1, $v1, 1
|
||||
/* 448F74 80219B34 00B30018 */ mult $a1, $s3
|
||||
/* 448F78 80219B38 A222000D */ sb $v0, 0xd($s1)
|
||||
/* 448F7C 80219B3C 96840000 */ lhu $a0, ($s4)
|
||||
/* 448F80 80219B40 00031FC3 */ sra $v1, $v1, 0x1f
|
||||
/* 448F84 80219B44 000433C2 */ srl $a2, $a0, 0xf
|
||||
/* 448F88 80219B48 00004810 */ mfhi $t1
|
||||
/* 448F8C 80219B4C 01231823 */ subu $v1, $t1, $v1
|
||||
/* 448F90 80219B50 00031040 */ sll $v0, $v1, 1
|
||||
/* 448F94 80219B54 00431021 */ addu $v0, $v0, $v1
|
||||
/* 448F98 80219B58 00A22823 */ subu $a1, $a1, $v0
|
||||
/* 448F9C 80219B5C 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 448FA0 80219B60 00052BC0 */ sll $a1, $a1, 0xf
|
||||
/* 448FA4 80219B64 00C50018 */ mult $a2, $a1
|
||||
/* 448FA8 80219B68 00042382 */ srl $a0, $a0, 0xe
|
||||
/* 448FAC 80219B6C 000423C0 */ sll $a0, $a0, 0xf
|
||||
/* 448FB0 80219B70 00001812 */ mflo $v1
|
||||
/* 448FB4 80219B74 00642021 */ addu $a0, $v1, $a0
|
||||
/* 448FB8 80219B78 00902021 */ addu $a0, $a0, $s0
|
||||
/* 448FBC 80219B7C 0C01917C */ jal sins
|
||||
/* 448FC0 80219B80 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 448FC4 80219B84 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 448FC8 80219B88 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 448FCC 80219B8C 9223000C */ lbu $v1, 0xc($s1)
|
||||
/* 448FD0 80219B90 00551021 */ addu $v0, $v0, $s5
|
||||
/* 448FD4 80219B94 00620018 */ mult $v1, $v0
|
||||
/* 448FD8 80219B98 00001812 */ mflo $v1
|
||||
/* 448FDC 80219B9C 04610004 */ bgez $v1, .L80219BB0
|
||||
/* 448FE0 80219BA0 00031403 */ sra $v0, $v1, 0x10
|
||||
/* 448FE4 80219BA4 3402FFFF */ ori $v0, $zero, 0xffff
|
||||
/* 448FE8 80219BA8 00621821 */ addu $v1, $v1, $v0
|
||||
/* 448FEC 80219BAC 00031403 */ sra $v0, $v1, 0x10
|
||||
.L80219BB0:
|
||||
/* 448FF0 80219BB0 A222000C */ sb $v0, 0xc($s1)
|
||||
/* 448FF4 80219BB4 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 448FF8 80219BB8 26100001 */ addiu $s0, $s0, 1
|
||||
/* 448FFC 80219BBC 0202102A */ slt $v0, $s0, $v0
|
||||
/* 449000 80219BC0 1440FFB8 */ bnez $v0, .L80219AA4
|
||||
/* 449004 80219BC4 02130018 */ mult $s0, $s3
|
||||
.L80219BC8:
|
||||
/* 449008 80219BC8 3C03800A */ lui $v1, %hi(gMasterGfxPos)
|
||||
/* 44900C 80219BCC 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
|
||||
/* 449010 80219BD0 8C620000 */ lw $v0, ($v1)
|
||||
/* 449014 80219BD4 02C0202D */ daddu $a0, $s6, $zero
|
||||
/* 449018 80219BD8 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 44901C 80219BDC 24420008 */ addiu $v0, $v0, 8
|
||||
/* 449020 80219BE0 AC620000 */ sw $v0, ($v1)
|
||||
/* 449024 80219BE4 3C02DE00 */ lui $v0, 0xde00
|
||||
/* 449028 80219BE8 0C0470BB */ jal mdl_get_copied_gfx
|
||||
/* 44902C 80219BEC AE020000 */ sw $v0, ($s0)
|
||||
/* 449030 80219BF0 AE020004 */ sw $v0, 4($s0)
|
||||
/* 449034 80219BF4 3C028023 */ lui $v0, %hi(b_area_kmr_part_3_sam_01_D_802336E0_43AB20)
|
||||
/* 449038 80219BF8 244236E0 */ addiu $v0, $v0, %lo(b_area_kmr_part_3_sam_01_D_802336E0_43AB20)
|
||||
/* 44903C 80219BFC 00161840 */ sll $v1, $s6, 1
|
||||
/* 449040 80219C00 00621821 */ addu $v1, $v1, $v0
|
||||
/* 449044 80219C04 94620000 */ lhu $v0, ($v1)
|
||||
/* 449048 80219C08 24420253 */ addiu $v0, $v0, 0x253
|
||||
/* 44904C 80219C0C A4620000 */ sh $v0, ($v1)
|
||||
/* 449050 80219C10 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 449054 80219C14 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* 449058 80219C18 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* 44905C 80219C1C 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* 449060 80219C20 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* 449064 80219C24 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 449068 80219C28 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 44906C 80219C2C 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 449070 80219C30 03E00008 */ jr $ra
|
||||
/* 449074 80219C34 27BD0040 */ addiu $sp, $sp, 0x40
|
@ -1,134 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802186C0_660E10
|
||||
/* 660E10 802186C0 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 660E14 802186C4 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* 660E18 802186C8 0080B02D */ daddu $s6, $a0, $zero
|
||||
/* 660E1C 802186CC 27A50010 */ addiu $a1, $sp, 0x10
|
||||
/* 660E20 802186D0 27A60014 */ addiu $a2, $sp, 0x14
|
||||
/* 660E24 802186D4 27A70018 */ addiu $a3, $sp, 0x18
|
||||
/* 660E28 802186D8 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 660E2C 802186DC AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* 660E30 802186E0 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* 660E34 802186E4 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* 660E38 802186E8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 660E3C 802186EC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 660E40 802186F0 0C0470AC */ jal mdl_get_copied_vertices
|
||||
/* 660E44 802186F4 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 660E48 802186F8 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 660E4C 802186FC 18400052 */ blez $v0, .L80218848
|
||||
/* 660E50 80218700 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 660E54 80218704 3C038022 */ lui $v1, %hi(D_802211E0_669930)
|
||||
/* 660E58 80218708 246311E0 */ addiu $v1, $v1, %lo(D_802211E0_669930)
|
||||
/* 660E5C 8021870C 00161040 */ sll $v0, $s6, 1
|
||||
/* 660E60 80218710 0043A021 */ addu $s4, $v0, $v1
|
||||
/* 660E64 80218714 3C135555 */ lui $s3, 0x5555
|
||||
/* 660E68 80218718 36735556 */ ori $s3, $s3, 0x5556
|
||||
/* 660E6C 8021871C 34158000 */ ori $s5, $zero, 0x8000
|
||||
/* 660E70 80218720 02130018 */ mult $s0, $s3
|
||||
.L80218724:
|
||||
/* 660E74 80218724 001097C3 */ sra $s2, $s0, 0x1f
|
||||
/* 660E78 80218728 00001810 */ mfhi $v1
|
||||
/* 660E7C 8021872C 00721823 */ subu $v1, $v1, $s2
|
||||
/* 660E80 80218730 00031040 */ sll $v0, $v1, 1
|
||||
/* 660E84 80218734 00431021 */ addu $v0, $v0, $v1
|
||||
/* 660E88 80218738 02021023 */ subu $v0, $s0, $v0
|
||||
/* 660E8C 8021873C 96830000 */ lhu $v1, ($s4)
|
||||
/* 660E90 80218740 24420001 */ addiu $v0, $v0, 1
|
||||
/* 660E94 80218744 00620018 */ mult $v1, $v0
|
||||
/* 660E98 80218748 00101100 */ sll $v0, $s0, 4
|
||||
/* 660E9C 8021874C 00001812 */ mflo $v1
|
||||
/* 660EA0 80218750 00702021 */ addu $a0, $v1, $s0
|
||||
/* 660EA4 80218754 8FA30014 */ lw $v1, 0x14($sp)
|
||||
/* 660EA8 80218758 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 660EAC 8021875C 0C01917C */ jal sins
|
||||
/* 660EB0 80218760 00628821 */ addu $s1, $v1, $v0
|
||||
/* 660EB4 80218764 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 660EB8 80218768 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 660EBC 8021876C 00551021 */ addu $v0, $v0, $s5
|
||||
/* 660EC0 80218770 00021FC2 */ srl $v1, $v0, 0x1f
|
||||
/* 660EC4 80218774 00431021 */ addu $v0, $v0, $v1
|
||||
/* 660EC8 80218778 000213C0 */ sll $v0, $v0, 0xf
|
||||
/* 660ECC 8021877C 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 660ED0 80218780 00021880 */ sll $v1, $v0, 2
|
||||
/* 660ED4 80218784 00621821 */ addu $v1, $v1, $v0
|
||||
/* 660ED8 80218788 00031140 */ sll $v0, $v1, 5
|
||||
/* 660EDC 8021878C 00431823 */ subu $v1, $v0, $v1
|
||||
/* 660EE0 80218790 04610002 */ bgez $v1, .L8021879C
|
||||
/* 660EE4 80218794 0060102D */ daddu $v0, $v1, $zero
|
||||
/* 660EE8 80218798 24627FFF */ addiu $v0, $v1, 0x7fff
|
||||
.L8021879C:
|
||||
/* 660EEC 8021879C 000223C3 */ sra $a0, $v0, 0xf
|
||||
/* 660EF0 802187A0 24820064 */ addiu $v0, $a0, 0x64
|
||||
/* 660EF4 802187A4 A222000E */ sb $v0, 0xe($s1)
|
||||
/* 660EF8 802187A8 24820032 */ addiu $v0, $a0, 0x32
|
||||
/* 660EFC 802187AC 02121823 */ subu $v1, $s0, $s2
|
||||
/* 660F00 802187B0 00032843 */ sra $a1, $v1, 1
|
||||
/* 660F04 802187B4 00B30018 */ mult $a1, $s3
|
||||
/* 660F08 802187B8 A222000D */ sb $v0, 0xd($s1)
|
||||
/* 660F0C 802187BC 96840000 */ lhu $a0, ($s4)
|
||||
/* 660F10 802187C0 00031FC3 */ sra $v1, $v1, 0x1f
|
||||
/* 660F14 802187C4 000433C2 */ srl $a2, $a0, 0xf
|
||||
/* 660F18 802187C8 00004810 */ mfhi $t1
|
||||
/* 660F1C 802187CC 01231823 */ subu $v1, $t1, $v1
|
||||
/* 660F20 802187D0 00031040 */ sll $v0, $v1, 1
|
||||
/* 660F24 802187D4 00431021 */ addu $v0, $v0, $v1
|
||||
/* 660F28 802187D8 00A22823 */ subu $a1, $a1, $v0
|
||||
/* 660F2C 802187DC 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 660F30 802187E0 00052BC0 */ sll $a1, $a1, 0xf
|
||||
/* 660F34 802187E4 00C50018 */ mult $a2, $a1
|
||||
/* 660F38 802187E8 00042382 */ srl $a0, $a0, 0xe
|
||||
/* 660F3C 802187EC 000423C0 */ sll $a0, $a0, 0xf
|
||||
/* 660F40 802187F0 00001812 */ mflo $v1
|
||||
/* 660F44 802187F4 00642021 */ addu $a0, $v1, $a0
|
||||
/* 660F48 802187F8 00902021 */ addu $a0, $a0, $s0
|
||||
/* 660F4C 802187FC 0C01917C */ jal sins
|
||||
/* 660F50 80218800 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 660F54 80218804 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 660F58 80218808 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 660F5C 8021880C 9223000C */ lbu $v1, 0xc($s1)
|
||||
/* 660F60 80218810 00551021 */ addu $v0, $v0, $s5
|
||||
/* 660F64 80218814 00620018 */ mult $v1, $v0
|
||||
/* 660F68 80218818 00001812 */ mflo $v1
|
||||
/* 660F6C 8021881C 04610004 */ bgez $v1, .L80218830
|
||||
/* 660F70 80218820 00031403 */ sra $v0, $v1, 0x10
|
||||
/* 660F74 80218824 3402FFFF */ ori $v0, $zero, 0xffff
|
||||
/* 660F78 80218828 00621821 */ addu $v1, $v1, $v0
|
||||
/* 660F7C 8021882C 00031403 */ sra $v0, $v1, 0x10
|
||||
.L80218830:
|
||||
/* 660F80 80218830 A222000C */ sb $v0, 0xc($s1)
|
||||
/* 660F84 80218834 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 660F88 80218838 26100001 */ addiu $s0, $s0, 1
|
||||
/* 660F8C 8021883C 0202102A */ slt $v0, $s0, $v0
|
||||
/* 660F90 80218840 1440FFB8 */ bnez $v0, .L80218724
|
||||
/* 660F94 80218844 02130018 */ mult $s0, $s3
|
||||
.L80218848:
|
||||
/* 660F98 80218848 3C03800A */ lui $v1, %hi(gMasterGfxPos)
|
||||
/* 660F9C 8021884C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
|
||||
/* 660FA0 80218850 8C620000 */ lw $v0, ($v1)
|
||||
/* 660FA4 80218854 02C0202D */ daddu $a0, $s6, $zero
|
||||
/* 660FA8 80218858 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 660FAC 8021885C 24420008 */ addiu $v0, $v0, 8
|
||||
/* 660FB0 80218860 AC620000 */ sw $v0, ($v1)
|
||||
/* 660FB4 80218864 3C02DE00 */ lui $v0, 0xde00
|
||||
/* 660FB8 80218868 0C0470BB */ jal mdl_get_copied_gfx
|
||||
/* 660FBC 8021886C AE020000 */ sw $v0, ($s0)
|
||||
/* 660FC0 80218870 AE020004 */ sw $v0, 4($s0)
|
||||
/* 660FC4 80218874 3C028022 */ lui $v0, %hi(D_802211E0_669930)
|
||||
/* 660FC8 80218878 244211E0 */ addiu $v0, $v0, %lo(D_802211E0_669930)
|
||||
/* 660FCC 8021887C 00161840 */ sll $v1, $s6, 1
|
||||
/* 660FD0 80218880 00621821 */ addu $v1, $v1, $v0
|
||||
/* 660FD4 80218884 94620000 */ lhu $v0, ($v1)
|
||||
/* 660FD8 80218888 24420253 */ addiu $v0, $v0, 0x253
|
||||
/* 660FDC 8021888C A4620000 */ sh $v0, ($v1)
|
||||
/* 660FE0 80218890 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 660FE4 80218894 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* 660FE8 80218898 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* 660FEC 8021889C 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* 660FF0 802188A0 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* 660FF4 802188A4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 660FF8 802188A8 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 660FFC 802188AC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 661000 802188B0 03E00008 */ jr $ra
|
||||
/* 661004 802188B4 27BD0040 */ addiu $sp, $sp, 0x40
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80218B2C_66A8AC
|
||||
/* 66A8AC 80218B2C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 66A8B0 80218B30 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 66A8B4 80218B34 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 66A8B8 80218B38 0C0B1EAF */ jal evt_get_variable
|
||||
/* 66A8BC 80218B3C 8C450000 */ lw $a1, ($v0)
|
||||
/* 66A8C0 80218B40 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 66A8C4 80218B44 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 66A8C8 80218B48 3C014310 */ lui $at, 0x4310
|
||||
/* 66A8CC 80218B4C 44810000 */ mtc1 $at, $f0
|
||||
/* 66A8D0 80218B50 00000000 */ nop
|
||||
/* 66A8D4 80218B54 E4400008 */ swc1 $f0, 8($v0)
|
||||
/* 66A8D8 80218B58 8C830000 */ lw $v1, ($a0)
|
||||
/* 66A8DC 80218B5C 34630010 */ ori $v1, $v1, 0x10
|
||||
/* 66A8E0 80218B60 AC830000 */ sw $v1, ($a0)
|
||||
/* 66A8E4 80218B64 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 66A8E8 80218B68 24020002 */ addiu $v0, $zero, 2
|
||||
/* 66A8EC 80218B6C 03E00008 */ jr $ra
|
||||
/* 66A8F0 80218B70 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,81 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80218C40_66A9C0
|
||||
/* 66A9C0 80218C40 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 66A9C4 80218C44 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 66A9C8 80218C48 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 66A9CC 80218C4C AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 66A9D0 80218C50 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 66A9D4 80218C54 8C840148 */ lw $a0, 0x148($a0)
|
||||
/* 66A9D8 80218C58 0C09A75B */ jal get_actor
|
||||
/* 66A9DC 80218C5C 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 66A9E0 80218C60 0040882D */ daddu $s1, $v0, $zero
|
||||
/* 66A9E4 80218C64 12000007 */ beqz $s0, .L80218C84
|
||||
/* 66A9E8 80218C68 2632000C */ addiu $s2, $s1, 0xc
|
||||
/* 66A9EC 80218C6C C6200144 */ lwc1 $f0, 0x144($s1)
|
||||
/* 66A9F0 80218C70 C6220148 */ lwc1 $f2, 0x148($s1)
|
||||
/* 66A9F4 80218C74 C624014C */ lwc1 $f4, 0x14c($s1)
|
||||
/* 66A9F8 80218C78 E620000C */ swc1 $f0, 0xc($s1)
|
||||
/* 66A9FC 80218C7C E6220010 */ swc1 $f2, 0x10($s1)
|
||||
/* 66AA00 80218C80 E6240014 */ swc1 $f4, 0x14($s1)
|
||||
.L80218C84:
|
||||
/* 66AA04 80218C84 8E25004C */ lw $a1, 0x4c($s1)
|
||||
/* 66AA08 80218C88 8E260054 */ lw $a2, 0x54($s1)
|
||||
/* 66AA0C 80218C8C 0C09904A */ jal add_xz_vec3f
|
||||
/* 66AA10 80218C90 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 66AA14 80218C94 C622004C */ lwc1 $f2, 0x4c($s1)
|
||||
/* 66AA18 80218C98 3C014080 */ lui $at, 0x4080
|
||||
/* 66AA1C 80218C9C 44810000 */ mtc1 $at, $f0
|
||||
/* 66AA20 80218CA0 00000000 */ nop
|
||||
/* 66AA24 80218CA4 4600103C */ c.lt.s $f2, $f0
|
||||
/* 66AA28 80218CA8 00000000 */ nop
|
||||
/* 66AA2C 80218CAC 45000007 */ bc1f .L80218CCC
|
||||
/* 66AA30 80218CB0 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 66AA34 80218CB4 C6200054 */ lwc1 $f0, 0x54($s1)
|
||||
/* 66AA38 80218CB8 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 66AA3C 80218CBC 8E25000C */ lw $a1, 0xc($s1)
|
||||
/* 66AA40 80218CC0 8E260010 */ lw $a2, 0x10($s1)
|
||||
/* 66AA44 80218CC4 08086339 */ j .L80218CE4
|
||||
/* 66AA48 80218CC8 8E270014 */ lw $a3, 0x14($s1)
|
||||
.L80218CCC:
|
||||
/* 66AA4C 80218CCC C6200054 */ lwc1 $f0, 0x54($s1)
|
||||
/* 66AA50 80218CD0 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 66AA54 80218CD4 8E25000C */ lw $a1, 0xc($s1)
|
||||
/* 66AA58 80218CD8 8E260010 */ lw $a2, 0x10($s1)
|
||||
/* 66AA5C 80218CDC 8E270014 */ lw $a3, 0x14($s1)
|
||||
/* 66AA60 80218CE0 24040001 */ addiu $a0, $zero, 1
|
||||
.L80218CE4:
|
||||
/* 66AA64 80218CE4 0C0990BC */ jal play_movement_dust_effects
|
||||
/* 66AA68 80218CE8 00000000 */ nop
|
||||
/* 66AA6C 80218CEC C6400040 */ lwc1 $f0, 0x40($s2)
|
||||
/* 66AA70 80218CF0 3C013FF8 */ lui $at, 0x3ff8
|
||||
/* 66AA74 80218CF4 44811800 */ mtc1 $at, $f3
|
||||
/* 66AA78 80218CF8 44801000 */ mtc1 $zero, $f2
|
||||
/* 66AA7C 80218CFC 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 66AA80 80218D00 46220003 */ div.d $f0, $f0, $f2
|
||||
/* 66AA84 80218D04 C6420000 */ lwc1 $f2, ($s2)
|
||||
/* 66AA88 80218D08 46200020 */ cvt.s.d $f0, $f0
|
||||
/* 66AA8C 80218D0C E6400040 */ swc1 $f0, 0x40($s2)
|
||||
/* 66AA90 80218D10 E6220144 */ swc1 $f2, 0x144($s1)
|
||||
/* 66AA94 80218D14 C6400004 */ lwc1 $f0, 4($s2)
|
||||
/* 66AA98 80218D18 E6200148 */ swc1 $f0, 0x148($s1)
|
||||
/* 66AA9C 80218D1C C6400008 */ lwc1 $f0, 8($s2)
|
||||
/* 66AAA0 80218D20 E620014C */ swc1 $f0, 0x14c($s1)
|
||||
/* 66AAA4 80218D24 C6400040 */ lwc1 $f0, 0x40($s2)
|
||||
/* 66AAA8 80218D28 3C013FF0 */ lui $at, 0x3ff0
|
||||
/* 66AAAC 80218D2C 44811800 */ mtc1 $at, $f3
|
||||
/* 66AAB0 80218D30 44801000 */ mtc1 $zero, $f2
|
||||
/* 66AAB4 80218D34 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 66AAB8 80218D38 4622003C */ c.lt.d $f0, $f2
|
||||
/* 66AABC 80218D3C 00000000 */ nop
|
||||
/* 66AAC0 80218D40 45010002 */ bc1t .L80218D4C
|
||||
/* 66AAC4 80218D44 24020002 */ addiu $v0, $zero, 2
|
||||
/* 66AAC8 80218D48 0000102D */ daddu $v0, $zero, $zero
|
||||
.L80218D4C:
|
||||
/* 66AACC 80218D4C 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 66AAD0 80218D50 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 66AAD4 80218D54 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 66AAD8 80218D58 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 66AADC 80218D5C 03E00008 */ jr $ra
|
||||
/* 66AAE0 80218D60 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,323 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80232A18_684798
|
||||
.double 4.800000000000001
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80218E88_66AC08
|
||||
/* 66AC08 80218E88 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 66AC0C 80218E8C AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 66AC10 80218E90 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 66AC14 80218E94 AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 66AC18 80218E98 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 66AC1C 80218E9C F7B80040 */ sdc1 $f24, 0x40($sp)
|
||||
/* 66AC20 80218EA0 F7B60038 */ sdc1 $f22, 0x38($sp)
|
||||
/* 66AC24 80218EA4 F7B40030 */ sdc1 $f20, 0x30($sp)
|
||||
/* 66AC28 80218EA8 8C840148 */ lw $a0, 0x148($a0)
|
||||
/* 66AC2C 80218EAC 0C09A75B */ jal get_actor
|
||||
/* 66AC30 80218EB0 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 66AC34 80218EB4 0040882D */ daddu $s1, $v0, $zero
|
||||
/* 66AC38 80218EB8 1200003D */ beqz $s0, .L80218FB0
|
||||
/* 66AC3C 80218EBC 2632000C */ addiu $s2, $s1, 0xc
|
||||
/* 66AC40 80218EC0 0C00AB39 */ jal heap_malloc
|
||||
/* 66AC44 80218EC4 24040020 */ addiu $a0, $zero, 0x20
|
||||
/* 66AC48 80218EC8 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 66AC4C 80218ECC 24020001 */ addiu $v0, $zero, 1
|
||||
/* 66AC50 80218ED0 26250144 */ addiu $a1, $s1, 0x144
|
||||
/* 66AC54 80218ED4 26260148 */ addiu $a2, $s1, 0x148
|
||||
/* 66AC58 80218ED8 AE300090 */ sw $s0, 0x90($s1)
|
||||
/* 66AC5C 80218EDC AE020004 */ sw $v0, 4($s0)
|
||||
/* 66AC60 80218EE0 AE000008 */ sw $zero, 8($s0)
|
||||
/* 66AC64 80218EE4 AE02000C */ sw $v0, 0xc($s0)
|
||||
/* 66AC68 80218EE8 AE000010 */ sw $zero, 0x10($s0)
|
||||
/* 66AC6C 80218EEC 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66AC70 80218EF0 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 66AC74 80218EF4 10620005 */ beq $v1, $v0, .L80218F0C
|
||||
/* 66AC78 80218EF8 2627014C */ addiu $a3, $s1, 0x14c
|
||||
/* 66AC7C 80218EFC 3C013F80 */ lui $at, 0x3f80
|
||||
/* 66AC80 80218F00 44810000 */ mtc1 $at, $f0
|
||||
/* 66AC84 80218F04 080863C8 */ j .L80218F20
|
||||
/* 66AC88 80218F08 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F0C:
|
||||
/* 66AC8C 80218F0C 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 66AC90 80218F10 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 66AC94 80218F14 44810000 */ mtc1 $at, $f0
|
||||
/* 66AC98 80218F18 00000000 */ nop
|
||||
/* 66AC9C 80218F1C E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F20:
|
||||
/* 66ACA0 80218F20 24020005 */ addiu $v0, $zero, 5
|
||||
/* 66ACA4 80218F24 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 66ACA8 80218F28 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 66ACAC 80218F2C 8CA50000 */ lw $a1, ($a1)
|
||||
/* 66ACB0 80218F30 8CC60000 */ lw $a2, ($a2)
|
||||
/* 66ACB4 80218F34 8CE70000 */ lw $a3, ($a3)
|
||||
/* 66ACB8 80218F38 0C01C8EC */ jal fx_static_status
|
||||
/* 66ACBC 80218F3C 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 66ACC0 80218F40 26250144 */ addiu $a1, $s1, 0x144
|
||||
/* 66ACC4 80218F44 AE020014 */ sw $v0, 0x14($s0)
|
||||
/* 66ACC8 80218F48 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 66ACCC 80218F4C 2403000A */ addiu $v1, $zero, 0xa
|
||||
/* 66ACD0 80218F50 10430005 */ beq $v0, $v1, .L80218F68
|
||||
/* 66ACD4 80218F54 2627014C */ addiu $a3, $s1, 0x14c
|
||||
/* 66ACD8 80218F58 3C013F80 */ lui $at, 0x3f80
|
||||
/* 66ACDC 80218F5C 44810000 */ mtc1 $at, $f0
|
||||
/* 66ACE0 80218F60 080863DF */ j .L80218F7C
|
||||
/* 66ACE4 80218F64 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F68:
|
||||
/* 66ACE8 80218F68 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 66ACEC 80218F6C 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 66ACF0 80218F70 44810000 */ mtc1 $at, $f0
|
||||
/* 66ACF4 80218F74 00000000 */ nop
|
||||
/* 66ACF8 80218F78 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F7C:
|
||||
/* 66ACFC 80218F7C 24020005 */ addiu $v0, $zero, 5
|
||||
/* 66AD00 80218F80 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 66AD04 80218F84 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 66AD08 80218F88 8CA50000 */ lw $a1, ($a1)
|
||||
/* 66AD0C 80218F8C 3C06C47A */ lui $a2, 0xc47a
|
||||
/* 66AD10 80218F90 8CE70000 */ lw $a3, ($a3)
|
||||
/* 66AD14 80218F94 0C01C8EC */ jal fx_static_status
|
||||
/* 66AD18 80218F98 24040001 */ addiu $a0, $zero, 1
|
||||
/* 66AD1C 80218F9C AE020018 */ sw $v0, 0x18($s0)
|
||||
/* 66AD20 80218FA0 24020001 */ addiu $v0, $zero, 1
|
||||
/* 66AD24 80218FA4 AE020000 */ sw $v0, ($s0)
|
||||
/* 66AD28 80218FA8 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 66AD2C 80218FAC AE02001C */ sw $v0, 0x1c($s0)
|
||||
.L80218FB0:
|
||||
/* 66AD30 80218FB0 8E500084 */ lw $s0, 0x84($s2)
|
||||
/* 66AD34 80218FB4 8E020000 */ lw $v0, ($s0)
|
||||
/* 66AD38 80218FB8 104000C9 */ beqz $v0, .L802192E0
|
||||
/* 66AD3C 80218FBC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 66AD40 80218FC0 8E020004 */ lw $v0, 4($s0)
|
||||
/* 66AD44 80218FC4 1040000D */ beqz $v0, .L80218FFC
|
||||
/* 66AD48 80218FC8 24020008 */ addiu $v0, $zero, 8
|
||||
/* 66AD4C 80218FCC 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66AD50 80218FD0 1062000A */ beq $v1, $v0, .L80218FFC
|
||||
/* 66AD54 80218FD4 00000000 */ nop
|
||||
/* 66AD58 80218FD8 8E020008 */ lw $v0, 8($s0)
|
||||
/* 66AD5C 80218FDC 2442000F */ addiu $v0, $v0, 0xf
|
||||
/* 66AD60 80218FE0 44826000 */ mtc1 $v0, $f12
|
||||
/* 66AD64 80218FE4 00000000 */ nop
|
||||
/* 66AD68 80218FE8 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 66AD6C 80218FEC 0C00A6C9 */ jal clamp_angle
|
||||
/* 66AD70 80218FF0 AE020008 */ sw $v0, 8($s0)
|
||||
/* 66AD74 80218FF4 4600018D */ trunc.w.s $f6, $f0
|
||||
/* 66AD78 80218FF8 E6060008 */ swc1 $f6, 8($s0)
|
||||
.L80218FFC:
|
||||
/* 66AD7C 80218FFC 3C0140C9 */ lui $at, 0x40c9
|
||||
/* 66AD80 80219000 34210FD0 */ ori $at, $at, 0xfd0
|
||||
/* 66AD84 80219004 44810000 */ mtc1 $at, $f0
|
||||
/* 66AD88 80219008 C60C0008 */ lwc1 $f12, 8($s0)
|
||||
/* 66AD8C 8021900C 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 66AD90 80219010 46006302 */ mul.s $f12, $f12, $f0
|
||||
/* 66AD94 80219014 00000000 */ nop
|
||||
/* 66AD98 80219018 3C0143B4 */ lui $at, 0x43b4
|
||||
/* 66AD9C 8021901C 44810000 */ mtc1 $at, $f0
|
||||
/* 66ADA0 80219020 0C00A85B */ jal sin_rad
|
||||
/* 66ADA4 80219024 46006303 */ div.s $f12, $f12, $f0
|
||||
/* 66ADA8 80219028 3C014040 */ lui $at, 0x4040
|
||||
/* 66ADAC 8021902C 44811000 */ mtc1 $at, $f2
|
||||
/* 66ADB0 80219030 00000000 */ nop
|
||||
/* 66ADB4 80219034 46020002 */ mul.s $f0, $f0, $f2
|
||||
/* 66ADB8 80219038 00000000 */ nop
|
||||
/* 66ADBC 8021903C 86220152 */ lh $v0, 0x152($s1)
|
||||
/* 66ADC0 80219040 44821000 */ mtc1 $v0, $f2
|
||||
/* 66ADC4 80219044 00000000 */ nop
|
||||
/* 66ADC8 80219048 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 66ADCC 8021904C 4600018D */ trunc.w.s $f6, $f0
|
||||
/* 66ADD0 80219050 44033000 */ mfc1 $v1, $f6
|
||||
/* 66ADD4 80219054 00000000 */ nop
|
||||
/* 66ADD8 80219058 00031600 */ sll $v0, $v1, 0x18
|
||||
/* 66ADDC 8021905C C6200148 */ lwc1 $f0, 0x148($s1)
|
||||
/* 66ADE0 80219060 00021603 */ sra $v0, $v0, 0x18
|
||||
/* 66ADE4 80219064 A223019A */ sb $v1, 0x19a($s1)
|
||||
/* 66ADE8 80219068 46020000 */ add.s $f0, $f0, $f2
|
||||
/* 66ADEC 8021906C 44821000 */ mtc1 $v0, $f2
|
||||
/* 66ADF0 80219070 00000000 */ nop
|
||||
/* 66ADF4 80219074 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 66ADF8 80219078 86220150 */ lh $v0, 0x150($s1)
|
||||
/* 66ADFC 8021907C 46020000 */ add.s $f0, $f0, $f2
|
||||
/* 66AE00 80219080 2403000A */ addiu $v1, $zero, 0xa
|
||||
/* 66AE04 80219084 44821000 */ mtc1 $v0, $f2
|
||||
/* 66AE08 80219088 00000000 */ nop
|
||||
/* 66AE0C 8021908C 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 66AE10 80219090 46000121 */ cvt.d.s $f4, $f0
|
||||
/* 66AE14 80219094 C6200144 */ lwc1 $f0, 0x144($s1)
|
||||
/* 66AE18 80219098 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 66AE1C 8021909C 46020580 */ add.s $f22, $f0, $f2
|
||||
/* 66AE20 802190A0 3C018023 */ lui $at, %hi(D_80232A18_684798)
|
||||
/* 66AE24 802190A4 D4202A18 */ ldc1 $f0, %lo(D_80232A18_684798)($at)
|
||||
/* 66AE28 802190A8 50430006 */ beql $v0, $v1, .L802190C4
|
||||
/* 66AE2C 802190AC 46202000 */ add.d $f0, $f4, $f0
|
||||
/* 66AE30 802190B0 3C014028 */ lui $at, 0x4028
|
||||
/* 66AE34 802190B4 44810800 */ mtc1 $at, $f1
|
||||
/* 66AE38 802190B8 44800000 */ mtc1 $zero, $f0
|
||||
/* 66AE3C 802190BC 00000000 */ nop
|
||||
/* 66AE40 802190C0 46202000 */ add.d $f0, $f4, $f0
|
||||
.L802190C4:
|
||||
/* 66AE44 802190C4 46200520 */ cvt.s.d $f20, $f0
|
||||
/* 66AE48 802190C8 86220154 */ lh $v0, 0x154($s1)
|
||||
/* 66AE4C 802190CC C620014C */ lwc1 $f0, 0x14c($s1)
|
||||
/* 66AE50 802190D0 44821000 */ mtc1 $v0, $f2
|
||||
/* 66AE54 802190D4 00000000 */ nop
|
||||
/* 66AE58 802190D8 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 66AE5C 802190DC 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 66AE60 802190E0 10400059 */ beqz $v0, .L80219248
|
||||
/* 66AE64 802190E4 46020600 */ add.s $f24, $f0, $f2
|
||||
/* 66AE68 802190E8 8E030010 */ lw $v1, 0x10($s0)
|
||||
/* 66AE6C 802190EC 10600005 */ beqz $v1, .L80219104
|
||||
/* 66AE70 802190F0 24020001 */ addiu $v0, $zero, 1
|
||||
/* 66AE74 802190F4 1062002A */ beq $v1, $v0, .L802191A0
|
||||
/* 66AE78 802190F8 00000000 */ nop
|
||||
/* 66AE7C 802190FC 080864A0 */ j .L80219280
|
||||
/* 66AE80 80219100 00000000 */ nop
|
||||
.L80219104:
|
||||
/* 66AE84 80219104 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 66AE88 80219108 14400016 */ bnez $v0, .L80219164
|
||||
/* 66AE8C 8021910C 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 66AE90 80219110 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66AE94 80219114 10620005 */ beq $v1, $v0, .L8021912C
|
||||
/* 66AE98 80219118 00000000 */ nop
|
||||
/* 66AE9C 8021911C 3C013F80 */ lui $at, 0x3f80
|
||||
/* 66AEA0 80219120 44810000 */ mtc1 $at, $f0
|
||||
/* 66AEA4 80219124 08086450 */ j .L80219140
|
||||
/* 66AEA8 80219128 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L8021912C:
|
||||
/* 66AEAC 8021912C 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 66AEB0 80219130 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 66AEB4 80219134 44810000 */ mtc1 $at, $f0
|
||||
/* 66AEB8 80219138 00000000 */ nop
|
||||
/* 66AEBC 8021913C E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80219140:
|
||||
/* 66AEC0 80219140 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 66AEC4 80219144 4405B000 */ mfc1 $a1, $f22
|
||||
/* 66AEC8 80219148 4406A000 */ mfc1 $a2, $f20
|
||||
/* 66AECC 8021914C 4407C000 */ mfc1 $a3, $f24
|
||||
/* 66AED0 80219150 24020005 */ addiu $v0, $zero, 5
|
||||
/* 66AED4 80219154 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 66AED8 80219158 0C01C8EC */ jal fx_static_status
|
||||
/* 66AEDC 8021915C AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 66AEE0 80219160 AE020014 */ sw $v0, 0x14($s0)
|
||||
.L80219164:
|
||||
/* 66AEE4 80219164 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 66AEE8 80219168 10600005 */ beqz $v1, .L80219180
|
||||
/* 66AEEC 8021916C 00000000 */ nop
|
||||
/* 66AEF0 80219170 8C620000 */ lw $v0, ($v1)
|
||||
/* 66AEF4 80219174 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66AEF8 80219178 AC620000 */ sw $v0, ($v1)
|
||||
/* 66AEFC 8021917C AE000018 */ sw $zero, 0x18($s0)
|
||||
.L80219180:
|
||||
/* 66AF00 80219180 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 66AF04 80219184 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 66AF08 80219188 E4560004 */ swc1 $f22, 4($v0)
|
||||
/* 66AF0C 8021918C 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 66AF10 80219190 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 66AF14 80219194 E4540008 */ swc1 $f20, 8($v0)
|
||||
/* 66AF18 80219198 0808648F */ j .L8021923C
|
||||
/* 66AF1C 8021919C 8E020014 */ lw $v0, 0x14($s0)
|
||||
.L802191A0:
|
||||
/* 66AF20 802191A0 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 66AF24 802191A4 10600005 */ beqz $v1, .L802191BC
|
||||
/* 66AF28 802191A8 00000000 */ nop
|
||||
/* 66AF2C 802191AC 8C620000 */ lw $v0, ($v1)
|
||||
/* 66AF30 802191B0 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66AF34 802191B4 AC620000 */ sw $v0, ($v1)
|
||||
/* 66AF38 802191B8 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L802191BC:
|
||||
/* 66AF3C 802191BC 8E020018 */ lw $v0, 0x18($s0)
|
||||
/* 66AF40 802191C0 14400018 */ bnez $v0, .L80219224
|
||||
/* 66AF44 802191C4 00000000 */ nop
|
||||
/* 66AF48 802191C8 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66AF4C 802191CC 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 66AF50 802191D0 10620005 */ beq $v1, $v0, .L802191E8
|
||||
/* 66AF54 802191D4 00000000 */ nop
|
||||
/* 66AF58 802191D8 3C013F80 */ lui $at, 0x3f80
|
||||
/* 66AF5C 802191DC 44810000 */ mtc1 $at, $f0
|
||||
/* 66AF60 802191E0 0808647F */ j .L802191FC
|
||||
/* 66AF64 802191E4 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L802191E8:
|
||||
/* 66AF68 802191E8 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 66AF6C 802191EC 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 66AF70 802191F0 44810000 */ mtc1 $at, $f0
|
||||
/* 66AF74 802191F4 00000000 */ nop
|
||||
/* 66AF78 802191F8 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L802191FC:
|
||||
/* 66AF7C 802191FC 24040001 */ addiu $a0, $zero, 1
|
||||
/* 66AF80 80219200 4405B000 */ mfc1 $a1, $f22
|
||||
/* 66AF84 80219204 4406A000 */ mfc1 $a2, $f20
|
||||
/* 66AF88 80219208 4407C000 */ mfc1 $a3, $f24
|
||||
/* 66AF8C 8021920C 24020005 */ addiu $v0, $zero, 5
|
||||
/* 66AF90 80219210 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 66AF94 80219214 0C01C8EC */ jal fx_static_status
|
||||
/* 66AF98 80219218 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 66AF9C 8021921C AE020018 */ sw $v0, 0x18($s0)
|
||||
/* 66AFA0 80219220 8E020018 */ lw $v0, 0x18($s0)
|
||||
.L80219224:
|
||||
/* 66AFA4 80219224 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 66AFA8 80219228 E4560004 */ swc1 $f22, 4($v0)
|
||||
/* 66AFAC 8021922C 8E020018 */ lw $v0, 0x18($s0)
|
||||
/* 66AFB0 80219230 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 66AFB4 80219234 E4540008 */ swc1 $f20, 8($v0)
|
||||
/* 66AFB8 80219238 8E020018 */ lw $v0, 0x18($s0)
|
||||
.L8021923C:
|
||||
/* 66AFBC 8021923C 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 66AFC0 80219240 080864A0 */ j .L80219280
|
||||
/* 66AFC4 80219244 E458000C */ swc1 $f24, 0xc($v0)
|
||||
.L80219248:
|
||||
/* 66AFC8 80219248 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 66AFCC 8021924C 10600005 */ beqz $v1, .L80219264
|
||||
/* 66AFD0 80219250 00000000 */ nop
|
||||
/* 66AFD4 80219254 8C620000 */ lw $v0, ($v1)
|
||||
/* 66AFD8 80219258 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66AFDC 8021925C AC620000 */ sw $v0, ($v1)
|
||||
/* 66AFE0 80219260 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L80219264:
|
||||
/* 66AFE4 80219264 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 66AFE8 80219268 10600005 */ beqz $v1, .L80219280
|
||||
/* 66AFEC 8021926C 00000000 */ nop
|
||||
/* 66AFF0 80219270 8C620000 */ lw $v0, ($v1)
|
||||
/* 66AFF4 80219274 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66AFF8 80219278 AC620000 */ sw $v0, ($v1)
|
||||
/* 66AFFC 8021927C AE000018 */ sw $zero, 0x18($s0)
|
||||
.L80219280:
|
||||
/* 66B000 80219280 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66B004 80219284 8E02001C */ lw $v0, 0x1c($s0)
|
||||
/* 66B008 80219288 10430014 */ beq $v0, $v1, .L802192DC
|
||||
/* 66B00C 8021928C 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 66B010 80219290 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 66B014 80219294 10400011 */ beqz $v0, .L802192DC
|
||||
/* 66B018 80219298 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 66B01C 8021929C 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 66B020 802192A0 10600005 */ beqz $v1, .L802192B8
|
||||
/* 66B024 802192A4 00000000 */ nop
|
||||
/* 66B028 802192A8 8C620000 */ lw $v0, ($v1)
|
||||
/* 66B02C 802192AC 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66B030 802192B0 AC620000 */ sw $v0, ($v1)
|
||||
/* 66B034 802192B4 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L802192B8:
|
||||
/* 66B038 802192B8 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 66B03C 802192BC 10600005 */ beqz $v1, .L802192D4
|
||||
/* 66B040 802192C0 00000000 */ nop
|
||||
/* 66B044 802192C4 8C620000 */ lw $v0, ($v1)
|
||||
/* 66B048 802192C8 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 66B04C 802192CC AC620000 */ sw $v0, ($v1)
|
||||
/* 66B050 802192D0 AE000018 */ sw $zero, 0x18($s0)
|
||||
.L802192D4:
|
||||
/* 66B054 802192D4 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 66B058 802192D8 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802192DC:
|
||||
/* 66B05C 802192DC AE03001C */ sw $v1, 0x1c($s0)
|
||||
.L802192E0:
|
||||
/* 66B060 802192E0 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 66B064 802192E4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 66B068 802192E8 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 66B06C 802192EC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 66B070 802192F0 D7B80040 */ ldc1 $f24, 0x40($sp)
|
||||
/* 66B074 802192F4 D7B60038 */ ldc1 $f22, 0x38($sp)
|
||||
/* 66B078 802192F8 D7B40030 */ ldc1 $f20, 0x30($sp)
|
||||
/* 66B07C 802192FC 03E00008 */ jr $ra
|
||||
/* 66B080 80219300 27BD0048 */ addiu $sp, $sp, 0x48
|
@ -1,23 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802193F0_66B170
|
||||
/* 66B170 802193F0 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 66B174 802193F4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 66B178 802193F8 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 66B17C 802193FC AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 66B180 80219400 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 66B184 80219404 8E040148 */ lw $a0, 0x148($s0)
|
||||
/* 66B188 80219408 0C09A75B */ jal get_actor
|
||||
/* 66B18C 8021940C 8E11000C */ lw $s1, 0xc($s0)
|
||||
/* 66B190 80219410 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 66B194 80219414 8E250000 */ lw $a1, ($s1)
|
||||
/* 66B198 80219418 0C0B1EAF */ jal evt_get_variable
|
||||
/* 66B19C 8021941C 8C500090 */ lw $s0, 0x90($v0)
|
||||
/* 66B1A0 80219420 AE020010 */ sw $v0, 0x10($s0)
|
||||
/* 66B1A4 80219424 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 66B1A8 80219428 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 66B1AC 8021942C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 66B1B0 80219430 24020002 */ addiu $v0, $zero, 2
|
||||
/* 66B1B4 80219434 03E00008 */ jr $ra
|
||||
/* 66B1B8 80219438 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,180 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
|
||||
dlabel jtbl_80232A20_6847A0
|
||||
.word L80219578_66B2F8, L80219584_66B304, L80219590_66B310, L8021959C_66B31C, L802195D4_66B354, L802195B4_66B334, L802195C0_66B340, L802195CC_66B34C, L802195A8_66B328, 0, 0, 0
|
||||
|
||||
dlabel D_80232A50_6847D0
|
||||
.word 0x7072615F, 0x62743031, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232A60_6847E0
|
||||
.word 0x7072615F, 0x62743031, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232A70_6847F0
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232A78_6847F8
|
||||
.word 0x7072615F, 0x62743032, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232A88_684808
|
||||
.word 0x7072615F, 0x62743032, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232A98_684818
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232AA0_684820
|
||||
.word 0x7072615F, 0x62743033, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232AB0_684830
|
||||
.word 0x7072615F, 0x62743033, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232AC0_684840
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232AC8_684848
|
||||
.word 0x7072615F, 0x62743033, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232AD8_684858
|
||||
.word 0x7072615F, 0x62743033, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232AE8_684868
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232AF0_684870
|
||||
.word 0x7072615F, 0x62743033, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232B00_684880
|
||||
.word 0x7072615F, 0x62743033, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232B10_684890
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232B18_684898
|
||||
.word 0x7072615F, 0x62743034, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80232B28_6848A8
|
||||
.word 0x7072615F, 0x62743034, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80232B38_6848B8
|
||||
.word 0x7072615F, 0x74657800
|
||||
|
||||
dlabel D_80232B40_6848C0
|
||||
.word 0x837A838F, 0x83438367, 0x834B837B, 0x83937882, 0x512C836F, 0x8350836F, 0x83500000
|
||||
|
||||
dlabel D_80232B5C_6848DC
|
||||
.word 0x836F8350, 0x836F8350, 0x7882512C, 0x834F838C, 0x8343834A, 0x83818362, 0x834E2C83, 0x8C836283, 0x68834A83, 0x81836283, 0x4E000000
|
||||
|
||||
dlabel D_80232B88_684908
|
||||
.word 0x836F8350, 0x836F8350, 0x2C837A83, 0x8F834383, 0x67834B83, 0x7B83932C, 0x836F8350, 0x836F8350, 0x00000000
|
||||
|
||||
dlabel D_80232BAC_68492C
|
||||
.word 0x836F8350, 0x836F8350, 0x7882512C, 0x838C8362, 0x8368834A, 0x83818362, 0x834E0000
|
||||
|
||||
dlabel D_80232BC8_684948
|
||||
.word 0x836F8350, 0x836F8350, 0x2C838C83, 0x62836883, 0x4A838183, 0x62834E00
|
||||
|
||||
dlabel D_80232BE0_684960
|
||||
.word 0x836F8350, 0x836F8350, 0x2C836F83, 0x54836F83, 0x54836083, 0x85838B83, 0x8B2C836F, 0x8350836F, 0x83500000
|
||||
|
||||
dlabel D_80232C04_684984
|
||||
.word 0x836F8350, 0x836F8350, 0x7882512C, 0x836F8354, 0x836F8354, 0x83608385, 0x838B838B, 0x00000000
|
||||
|
||||
dlabel D_80232C24_6849A4
|
||||
.word 0x836F8350, 0x836F8350, 0x78340000
|
||||
|
||||
dlabel D_80232C30_6849B0
|
||||
.word 0x836F8350, 0x836F8350, 0x78330000
|
||||
|
||||
dlabel D_80232C3C_6849BC
|
||||
.word 0x836F8350, 0x836F8350, 0x78320000
|
||||
|
||||
dlabel D_80232C48_6849C8
|
||||
.word 0x836F8350, 0x836F8350, 0x00000000
|
||||
|
||||
dlabel D_80232C54_6849D4
|
||||
.word 0x836F8354, 0x836F8354, 0x83608385, 0x838B838B, 0x7882512C, 0x836F8350, 0x836F8350, 0x00000000
|
||||
|
||||
dlabel D_80232C74_6849F4
|
||||
.word 0x7072615F, 0x30340000
|
||||
|
||||
dlabel D_80232C7C_6849FC
|
||||
.word 0x7072615F, 0x30336300
|
||||
|
||||
dlabel D_80232C84_684A04
|
||||
.word 0x7072615F, 0x30336200
|
||||
|
||||
dlabel D_80232C8C_684A0C
|
||||
.word 0x7072615F, 0x30330000
|
||||
|
||||
dlabel D_80232C94_684A14
|
||||
.word 0x7072615F, 0x30320000
|
||||
|
||||
dlabel D_80232C9C_684A1C
|
||||
.word 0x7072615F, 0x30310000, 0x00000000, 0x00000000, 0x00000000
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80219524_66B2A4
|
||||
/* 66B2A4 80219524 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 66B2A8 80219528 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 66B2AC 8021952C 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 66B2B0 80219530 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 66B2B4 80219534 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 66B2B8 80219538 0C0B1EAF */ jal evt_get_variable
|
||||
/* 66B2BC 8021953C 8C450000 */ lw $a1, ($v0)
|
||||
/* 66B2C0 80219540 8E040148 */ lw $a0, 0x148($s0)
|
||||
/* 66B2C4 80219544 0C09A75B */ jal get_actor
|
||||
/* 66B2C8 80219548 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 66B2CC 8021954C 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 66B2D0 80219550 2610FFFF */ addiu $s0, $s0, -1
|
||||
/* 66B2D4 80219554 2E020009 */ sltiu $v0, $s0, 9
|
||||
/* 66B2D8 80219558 1040001E */ beqz $v0, L802195D4_66B354
|
||||
/* 66B2DC 8021955C 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 66B2E0 80219560 00101080 */ sll $v0, $s0, 2
|
||||
/* 66B2E4 80219564 3C018023 */ lui $at, %hi(jtbl_80232A20_6847A0)
|
||||
/* 66B2E8 80219568 00220821 */ addu $at, $at, $v0
|
||||
/* 66B2EC 8021956C 8C222A20 */ lw $v0, %lo(jtbl_80232A20_6847A0)($at)
|
||||
/* 66B2F0 80219570 00400008 */ jr $v0
|
||||
/* 66B2F4 80219574 00000000 */ nop
|
||||
dlabel L80219578_66B2F8
|
||||
/* 66B2F8 80219578 3C048022 */ lui $a0, %hi(D_8021D6E0_66F460)
|
||||
/* 66B2FC 8021957C 08086575 */ j L802195D4_66B354
|
||||
/* 66B300 80219580 2484D6E0 */ addiu $a0, $a0, %lo(D_8021D6E0_66F460)
|
||||
dlabel L80219584_66B304
|
||||
/* 66B304 80219584 3C048022 */ lui $a0, %hi(D_8021F394_671114)
|
||||
/* 66B308 80219588 08086575 */ j L802195D4_66B354
|
||||
/* 66B30C 8021958C 2484F394 */ addiu $a0, $a0, %lo(D_8021F394_671114)
|
||||
dlabel L80219590_66B310
|
||||
/* 66B310 80219590 3C048022 */ lui $a0, %hi(D_802205F4_672374)
|
||||
/* 66B314 80219594 08086575 */ j L802195D4_66B354
|
||||
/* 66B318 80219598 248405F4 */ addiu $a0, $a0, %lo(D_802205F4_672374)
|
||||
dlabel L8021959C_66B31C
|
||||
/* 66B31C 8021959C 3C048022 */ lui $a0, %hi(D_80221580_673300)
|
||||
/* 66B320 802195A0 08086575 */ j L802195D4_66B354
|
||||
/* 66B324 802195A4 24841580 */ addiu $a0, $a0, %lo(D_80221580_673300)
|
||||
dlabel L802195A8_66B328
|
||||
/* 66B328 802195A8 3C048022 */ lui $a0, %hi(D_80222950_6746D0)
|
||||
/* 66B32C 802195AC 08086575 */ j L802195D4_66B354
|
||||
/* 66B330 802195B0 24842950 */ addiu $a0, $a0, %lo(D_80222950_6746D0)
|
||||
dlabel L802195B4_66B334
|
||||
/* 66B334 802195B4 3C048022 */ lui $a0, %hi(D_8022384C_6755CC)
|
||||
/* 66B338 802195B8 08086575 */ j L802195D4_66B354
|
||||
/* 66B33C 802195BC 2484384C */ addiu $a0, $a0, %lo(D_8022384C_6755CC)
|
||||
dlabel L802195C0_66B340
|
||||
/* 66B340 802195C0 3C048022 */ lui $a0, %hi(D_802251E4_676F64)
|
||||
/* 66B344 802195C4 08086575 */ j L802195D4_66B354
|
||||
/* 66B348 802195C8 248451E4 */ addiu $a0, $a0, %lo(D_802251E4_676F64)
|
||||
dlabel L802195CC_66B34C
|
||||
/* 66B34C 802195CC 3C048022 */ lui $a0, %hi(D_80226484_678204)
|
||||
/* 66B350 802195D0 24846484 */ addiu $a0, $a0, %lo(D_80226484_678204)
|
||||
dlabel L802195D4_66B354
|
||||
/* 66B354 802195D4 806301F1 */ lb $v1, 0x1f1($v1)
|
||||
/* 66B358 802195D8 AC830008 */ sw $v1, 8($a0)
|
||||
/* 66B35C 802195DC 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 66B360 802195E0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 66B364 802195E4 24020002 */ addiu $v0, $zero, 2
|
||||
/* 66B368 802195E8 03E00008 */ jr $ra
|
||||
/* 66B36C 802195EC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,323 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80231318_63CEB8
|
||||
.double 4.800000000000001
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80218E88_624A28
|
||||
/* 624A28 80218E88 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 624A2C 80218E8C AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 624A30 80218E90 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 624A34 80218E94 AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 624A38 80218E98 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 624A3C 80218E9C F7B80040 */ sdc1 $f24, 0x40($sp)
|
||||
/* 624A40 80218EA0 F7B60038 */ sdc1 $f22, 0x38($sp)
|
||||
/* 624A44 80218EA4 F7B40030 */ sdc1 $f20, 0x30($sp)
|
||||
/* 624A48 80218EA8 8C840148 */ lw $a0, 0x148($a0)
|
||||
/* 624A4C 80218EAC 0C09A75B */ jal get_actor
|
||||
/* 624A50 80218EB0 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 624A54 80218EB4 0040882D */ daddu $s1, $v0, $zero
|
||||
/* 624A58 80218EB8 1200003D */ beqz $s0, .L80218FB0
|
||||
/* 624A5C 80218EBC 2632000C */ addiu $s2, $s1, 0xc
|
||||
/* 624A60 80218EC0 0C00AB39 */ jal heap_malloc
|
||||
/* 624A64 80218EC4 24040020 */ addiu $a0, $zero, 0x20
|
||||
/* 624A68 80218EC8 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 624A6C 80218ECC 24020001 */ addiu $v0, $zero, 1
|
||||
/* 624A70 80218ED0 26250144 */ addiu $a1, $s1, 0x144
|
||||
/* 624A74 80218ED4 26260148 */ addiu $a2, $s1, 0x148
|
||||
/* 624A78 80218ED8 AE300090 */ sw $s0, 0x90($s1)
|
||||
/* 624A7C 80218EDC AE020004 */ sw $v0, 4($s0)
|
||||
/* 624A80 80218EE0 AE000008 */ sw $zero, 8($s0)
|
||||
/* 624A84 80218EE4 AE02000C */ sw $v0, 0xc($s0)
|
||||
/* 624A88 80218EE8 AE000010 */ sw $zero, 0x10($s0)
|
||||
/* 624A8C 80218EEC 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624A90 80218EF0 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 624A94 80218EF4 10620005 */ beq $v1, $v0, .L80218F0C
|
||||
/* 624A98 80218EF8 2627014C */ addiu $a3, $s1, 0x14c
|
||||
/* 624A9C 80218EFC 3C013F80 */ lui $at, 0x3f80
|
||||
/* 624AA0 80218F00 44810000 */ mtc1 $at, $f0
|
||||
/* 624AA4 80218F04 080863C8 */ j .L80218F20
|
||||
/* 624AA8 80218F08 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F0C:
|
||||
/* 624AAC 80218F0C 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 624AB0 80218F10 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 624AB4 80218F14 44810000 */ mtc1 $at, $f0
|
||||
/* 624AB8 80218F18 00000000 */ nop
|
||||
/* 624ABC 80218F1C E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F20:
|
||||
/* 624AC0 80218F20 24020005 */ addiu $v0, $zero, 5
|
||||
/* 624AC4 80218F24 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 624AC8 80218F28 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 624ACC 80218F2C 8CA50000 */ lw $a1, ($a1)
|
||||
/* 624AD0 80218F30 8CC60000 */ lw $a2, ($a2)
|
||||
/* 624AD4 80218F34 8CE70000 */ lw $a3, ($a3)
|
||||
/* 624AD8 80218F38 0C01C8EC */ jal fx_static_status
|
||||
/* 624ADC 80218F3C 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 624AE0 80218F40 26250144 */ addiu $a1, $s1, 0x144
|
||||
/* 624AE4 80218F44 AE020014 */ sw $v0, 0x14($s0)
|
||||
/* 624AE8 80218F48 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 624AEC 80218F4C 2403000A */ addiu $v1, $zero, 0xa
|
||||
/* 624AF0 80218F50 10430005 */ beq $v0, $v1, .L80218F68
|
||||
/* 624AF4 80218F54 2627014C */ addiu $a3, $s1, 0x14c
|
||||
/* 624AF8 80218F58 3C013F80 */ lui $at, 0x3f80
|
||||
/* 624AFC 80218F5C 44810000 */ mtc1 $at, $f0
|
||||
/* 624B00 80218F60 080863DF */ j .L80218F7C
|
||||
/* 624B04 80218F64 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F68:
|
||||
/* 624B08 80218F68 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 624B0C 80218F6C 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 624B10 80218F70 44810000 */ mtc1 $at, $f0
|
||||
/* 624B14 80218F74 00000000 */ nop
|
||||
/* 624B18 80218F78 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80218F7C:
|
||||
/* 624B1C 80218F7C 24020005 */ addiu $v0, $zero, 5
|
||||
/* 624B20 80218F80 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 624B24 80218F84 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 624B28 80218F88 8CA50000 */ lw $a1, ($a1)
|
||||
/* 624B2C 80218F8C 3C06C47A */ lui $a2, 0xc47a
|
||||
/* 624B30 80218F90 8CE70000 */ lw $a3, ($a3)
|
||||
/* 624B34 80218F94 0C01C8EC */ jal fx_static_status
|
||||
/* 624B38 80218F98 24040001 */ addiu $a0, $zero, 1
|
||||
/* 624B3C 80218F9C AE020018 */ sw $v0, 0x18($s0)
|
||||
/* 624B40 80218FA0 24020001 */ addiu $v0, $zero, 1
|
||||
/* 624B44 80218FA4 AE020000 */ sw $v0, ($s0)
|
||||
/* 624B48 80218FA8 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 624B4C 80218FAC AE02001C */ sw $v0, 0x1c($s0)
|
||||
.L80218FB0:
|
||||
/* 624B50 80218FB0 8E500084 */ lw $s0, 0x84($s2)
|
||||
/* 624B54 80218FB4 8E020000 */ lw $v0, ($s0)
|
||||
/* 624B58 80218FB8 104000C9 */ beqz $v0, .L802192E0
|
||||
/* 624B5C 80218FBC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 624B60 80218FC0 8E020004 */ lw $v0, 4($s0)
|
||||
/* 624B64 80218FC4 1040000D */ beqz $v0, .L80218FFC
|
||||
/* 624B68 80218FC8 24020008 */ addiu $v0, $zero, 8
|
||||
/* 624B6C 80218FCC 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624B70 80218FD0 1062000A */ beq $v1, $v0, .L80218FFC
|
||||
/* 624B74 80218FD4 00000000 */ nop
|
||||
/* 624B78 80218FD8 8E020008 */ lw $v0, 8($s0)
|
||||
/* 624B7C 80218FDC 2442000F */ addiu $v0, $v0, 0xf
|
||||
/* 624B80 80218FE0 44826000 */ mtc1 $v0, $f12
|
||||
/* 624B84 80218FE4 00000000 */ nop
|
||||
/* 624B88 80218FE8 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 624B8C 80218FEC 0C00A6C9 */ jal clamp_angle
|
||||
/* 624B90 80218FF0 AE020008 */ sw $v0, 8($s0)
|
||||
/* 624B94 80218FF4 4600018D */ trunc.w.s $f6, $f0
|
||||
/* 624B98 80218FF8 E6060008 */ swc1 $f6, 8($s0)
|
||||
.L80218FFC:
|
||||
/* 624B9C 80218FFC 3C0140C9 */ lui $at, 0x40c9
|
||||
/* 624BA0 80219000 34210FD0 */ ori $at, $at, 0xfd0
|
||||
/* 624BA4 80219004 44810000 */ mtc1 $at, $f0
|
||||
/* 624BA8 80219008 C60C0008 */ lwc1 $f12, 8($s0)
|
||||
/* 624BAC 8021900C 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 624BB0 80219010 46006302 */ mul.s $f12, $f12, $f0
|
||||
/* 624BB4 80219014 00000000 */ nop
|
||||
/* 624BB8 80219018 3C0143B4 */ lui $at, 0x43b4
|
||||
/* 624BBC 8021901C 44810000 */ mtc1 $at, $f0
|
||||
/* 624BC0 80219020 0C00A85B */ jal sin_rad
|
||||
/* 624BC4 80219024 46006303 */ div.s $f12, $f12, $f0
|
||||
/* 624BC8 80219028 3C014040 */ lui $at, 0x4040
|
||||
/* 624BCC 8021902C 44811000 */ mtc1 $at, $f2
|
||||
/* 624BD0 80219030 00000000 */ nop
|
||||
/* 624BD4 80219034 46020002 */ mul.s $f0, $f0, $f2
|
||||
/* 624BD8 80219038 00000000 */ nop
|
||||
/* 624BDC 8021903C 86220152 */ lh $v0, 0x152($s1)
|
||||
/* 624BE0 80219040 44821000 */ mtc1 $v0, $f2
|
||||
/* 624BE4 80219044 00000000 */ nop
|
||||
/* 624BE8 80219048 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 624BEC 8021904C 4600018D */ trunc.w.s $f6, $f0
|
||||
/* 624BF0 80219050 44033000 */ mfc1 $v1, $f6
|
||||
/* 624BF4 80219054 00000000 */ nop
|
||||
/* 624BF8 80219058 00031600 */ sll $v0, $v1, 0x18
|
||||
/* 624BFC 8021905C C6200148 */ lwc1 $f0, 0x148($s1)
|
||||
/* 624C00 80219060 00021603 */ sra $v0, $v0, 0x18
|
||||
/* 624C04 80219064 A223019A */ sb $v1, 0x19a($s1)
|
||||
/* 624C08 80219068 46020000 */ add.s $f0, $f0, $f2
|
||||
/* 624C0C 8021906C 44821000 */ mtc1 $v0, $f2
|
||||
/* 624C10 80219070 00000000 */ nop
|
||||
/* 624C14 80219074 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 624C18 80219078 86220150 */ lh $v0, 0x150($s1)
|
||||
/* 624C1C 8021907C 46020000 */ add.s $f0, $f0, $f2
|
||||
/* 624C20 80219080 2403000A */ addiu $v1, $zero, 0xa
|
||||
/* 624C24 80219084 44821000 */ mtc1 $v0, $f2
|
||||
/* 624C28 80219088 00000000 */ nop
|
||||
/* 624C2C 8021908C 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 624C30 80219090 46000121 */ cvt.d.s $f4, $f0
|
||||
/* 624C34 80219094 C6200144 */ lwc1 $f0, 0x144($s1)
|
||||
/* 624C38 80219098 82220210 */ lb $v0, 0x210($s1)
|
||||
/* 624C3C 8021909C 46020580 */ add.s $f22, $f0, $f2
|
||||
/* 624C40 802190A0 3C018023 */ lui $at, %hi(D_80231318_63CEB8)
|
||||
/* 624C44 802190A4 D4201318 */ ldc1 $f0, %lo(D_80231318_63CEB8)($at)
|
||||
/* 624C48 802190A8 50430006 */ beql $v0, $v1, .L802190C4
|
||||
/* 624C4C 802190AC 46202000 */ add.d $f0, $f4, $f0
|
||||
/* 624C50 802190B0 3C014028 */ lui $at, 0x4028
|
||||
/* 624C54 802190B4 44810800 */ mtc1 $at, $f1
|
||||
/* 624C58 802190B8 44800000 */ mtc1 $zero, $f0
|
||||
/* 624C5C 802190BC 00000000 */ nop
|
||||
/* 624C60 802190C0 46202000 */ add.d $f0, $f4, $f0
|
||||
.L802190C4:
|
||||
/* 624C64 802190C4 46200520 */ cvt.s.d $f20, $f0
|
||||
/* 624C68 802190C8 86220154 */ lh $v0, 0x154($s1)
|
||||
/* 624C6C 802190CC C620014C */ lwc1 $f0, 0x14c($s1)
|
||||
/* 624C70 802190D0 44821000 */ mtc1 $v0, $f2
|
||||
/* 624C74 802190D4 00000000 */ nop
|
||||
/* 624C78 802190D8 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 624C7C 802190DC 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 624C80 802190E0 10400059 */ beqz $v0, .L80219248
|
||||
/* 624C84 802190E4 46020600 */ add.s $f24, $f0, $f2
|
||||
/* 624C88 802190E8 8E030010 */ lw $v1, 0x10($s0)
|
||||
/* 624C8C 802190EC 10600005 */ beqz $v1, .L80219104
|
||||
/* 624C90 802190F0 24020001 */ addiu $v0, $zero, 1
|
||||
/* 624C94 802190F4 1062002A */ beq $v1, $v0, .L802191A0
|
||||
/* 624C98 802190F8 00000000 */ nop
|
||||
/* 624C9C 802190FC 080864A0 */ j .L80219280
|
||||
/* 624CA0 80219100 00000000 */ nop
|
||||
.L80219104:
|
||||
/* 624CA4 80219104 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 624CA8 80219108 14400016 */ bnez $v0, .L80219164
|
||||
/* 624CAC 8021910C 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 624CB0 80219110 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624CB4 80219114 10620005 */ beq $v1, $v0, .L8021912C
|
||||
/* 624CB8 80219118 00000000 */ nop
|
||||
/* 624CBC 8021911C 3C013F80 */ lui $at, 0x3f80
|
||||
/* 624CC0 80219120 44810000 */ mtc1 $at, $f0
|
||||
/* 624CC4 80219124 08086450 */ j .L80219140
|
||||
/* 624CC8 80219128 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L8021912C:
|
||||
/* 624CCC 8021912C 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 624CD0 80219130 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 624CD4 80219134 44810000 */ mtc1 $at, $f0
|
||||
/* 624CD8 80219138 00000000 */ nop
|
||||
/* 624CDC 8021913C E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L80219140:
|
||||
/* 624CE0 80219140 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 624CE4 80219144 4405B000 */ mfc1 $a1, $f22
|
||||
/* 624CE8 80219148 4406A000 */ mfc1 $a2, $f20
|
||||
/* 624CEC 8021914C 4407C000 */ mfc1 $a3, $f24
|
||||
/* 624CF0 80219150 24020005 */ addiu $v0, $zero, 5
|
||||
/* 624CF4 80219154 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 624CF8 80219158 0C01C8EC */ jal fx_static_status
|
||||
/* 624CFC 8021915C AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 624D00 80219160 AE020014 */ sw $v0, 0x14($s0)
|
||||
.L80219164:
|
||||
/* 624D04 80219164 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 624D08 80219168 10600005 */ beqz $v1, .L80219180
|
||||
/* 624D0C 8021916C 00000000 */ nop
|
||||
/* 624D10 80219170 8C620000 */ lw $v0, ($v1)
|
||||
/* 624D14 80219174 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624D18 80219178 AC620000 */ sw $v0, ($v1)
|
||||
/* 624D1C 8021917C AE000018 */ sw $zero, 0x18($s0)
|
||||
.L80219180:
|
||||
/* 624D20 80219180 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 624D24 80219184 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 624D28 80219188 E4560004 */ swc1 $f22, 4($v0)
|
||||
/* 624D2C 8021918C 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 624D30 80219190 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 624D34 80219194 E4540008 */ swc1 $f20, 8($v0)
|
||||
/* 624D38 80219198 0808648F */ j .L8021923C
|
||||
/* 624D3C 8021919C 8E020014 */ lw $v0, 0x14($s0)
|
||||
.L802191A0:
|
||||
/* 624D40 802191A0 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 624D44 802191A4 10600005 */ beqz $v1, .L802191BC
|
||||
/* 624D48 802191A8 00000000 */ nop
|
||||
/* 624D4C 802191AC 8C620000 */ lw $v0, ($v1)
|
||||
/* 624D50 802191B0 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624D54 802191B4 AC620000 */ sw $v0, ($v1)
|
||||
/* 624D58 802191B8 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L802191BC:
|
||||
/* 624D5C 802191BC 8E020018 */ lw $v0, 0x18($s0)
|
||||
/* 624D60 802191C0 14400018 */ bnez $v0, .L80219224
|
||||
/* 624D64 802191C4 00000000 */ nop
|
||||
/* 624D68 802191C8 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624D6C 802191CC 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 624D70 802191D0 10620005 */ beq $v1, $v0, .L802191E8
|
||||
/* 624D74 802191D4 00000000 */ nop
|
||||
/* 624D78 802191D8 3C013F80 */ lui $at, 0x3f80
|
||||
/* 624D7C 802191DC 44810000 */ mtc1 $at, $f0
|
||||
/* 624D80 802191E0 0808647F */ j .L802191FC
|
||||
/* 624D84 802191E4 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L802191E8:
|
||||
/* 624D88 802191E8 3C013ECC */ lui $at, 0x3ecc
|
||||
/* 624D8C 802191EC 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 624D90 802191F0 44810000 */ mtc1 $at, $f0
|
||||
/* 624D94 802191F4 00000000 */ nop
|
||||
/* 624D98 802191F8 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
.L802191FC:
|
||||
/* 624D9C 802191FC 24040001 */ addiu $a0, $zero, 1
|
||||
/* 624DA0 80219200 4405B000 */ mfc1 $a1, $f22
|
||||
/* 624DA4 80219204 4406A000 */ mfc1 $a2, $f20
|
||||
/* 624DA8 80219208 4407C000 */ mfc1 $a3, $f24
|
||||
/* 624DAC 8021920C 24020005 */ addiu $v0, $zero, 5
|
||||
/* 624DB0 80219210 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 624DB4 80219214 0C01C8EC */ jal fx_static_status
|
||||
/* 624DB8 80219218 AFA00018 */ sw $zero, 0x18($sp)
|
||||
/* 624DBC 8021921C AE020018 */ sw $v0, 0x18($s0)
|
||||
/* 624DC0 80219220 8E020018 */ lw $v0, 0x18($s0)
|
||||
.L80219224:
|
||||
/* 624DC4 80219224 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 624DC8 80219228 E4560004 */ swc1 $f22, 4($v0)
|
||||
/* 624DCC 8021922C 8E020018 */ lw $v0, 0x18($s0)
|
||||
/* 624DD0 80219230 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 624DD4 80219234 E4540008 */ swc1 $f20, 8($v0)
|
||||
/* 624DD8 80219238 8E020018 */ lw $v0, 0x18($s0)
|
||||
.L8021923C:
|
||||
/* 624DDC 8021923C 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 624DE0 80219240 080864A0 */ j .L80219280
|
||||
/* 624DE4 80219244 E458000C */ swc1 $f24, 0xc($v0)
|
||||
.L80219248:
|
||||
/* 624DE8 80219248 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 624DEC 8021924C 10600005 */ beqz $v1, .L80219264
|
||||
/* 624DF0 80219250 00000000 */ nop
|
||||
/* 624DF4 80219254 8C620000 */ lw $v0, ($v1)
|
||||
/* 624DF8 80219258 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624DFC 8021925C AC620000 */ sw $v0, ($v1)
|
||||
/* 624E00 80219260 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L80219264:
|
||||
/* 624E04 80219264 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 624E08 80219268 10600005 */ beqz $v1, .L80219280
|
||||
/* 624E0C 8021926C 00000000 */ nop
|
||||
/* 624E10 80219270 8C620000 */ lw $v0, ($v1)
|
||||
/* 624E14 80219274 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624E18 80219278 AC620000 */ sw $v0, ($v1)
|
||||
/* 624E1C 8021927C AE000018 */ sw $zero, 0x18($s0)
|
||||
.L80219280:
|
||||
/* 624E20 80219280 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624E24 80219284 8E02001C */ lw $v0, 0x1c($s0)
|
||||
/* 624E28 80219288 10430014 */ beq $v0, $v1, .L802192DC
|
||||
/* 624E2C 8021928C 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 624E30 80219290 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 624E34 80219294 10400011 */ beqz $v0, .L802192DC
|
||||
/* 624E38 80219298 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 624E3C 8021929C 8E030014 */ lw $v1, 0x14($s0)
|
||||
/* 624E40 802192A0 10600005 */ beqz $v1, .L802192B8
|
||||
/* 624E44 802192A4 00000000 */ nop
|
||||
/* 624E48 802192A8 8C620000 */ lw $v0, ($v1)
|
||||
/* 624E4C 802192AC 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624E50 802192B0 AC620000 */ sw $v0, ($v1)
|
||||
/* 624E54 802192B4 AE000014 */ sw $zero, 0x14($s0)
|
||||
.L802192B8:
|
||||
/* 624E58 802192B8 8E030018 */ lw $v1, 0x18($s0)
|
||||
/* 624E5C 802192BC 10600005 */ beqz $v1, .L802192D4
|
||||
/* 624E60 802192C0 00000000 */ nop
|
||||
/* 624E64 802192C4 8C620000 */ lw $v0, ($v1)
|
||||
/* 624E68 802192C8 34420010 */ ori $v0, $v0, 0x10
|
||||
/* 624E6C 802192CC AC620000 */ sw $v0, ($v1)
|
||||
/* 624E70 802192D0 AE000018 */ sw $zero, 0x18($s0)
|
||||
.L802192D4:
|
||||
/* 624E74 802192D4 82230210 */ lb $v1, 0x210($s1)
|
||||
/* 624E78 802192D8 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802192DC:
|
||||
/* 624E7C 802192DC AE03001C */ sw $v1, 0x1c($s0)
|
||||
.L802192E0:
|
||||
/* 624E80 802192E0 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 624E84 802192E4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 624E88 802192E8 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 624E8C 802192EC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 624E90 802192F0 D7B80040 */ ldc1 $f24, 0x40($sp)
|
||||
/* 624E94 802192F4 D7B60038 */ ldc1 $f22, 0x38($sp)
|
||||
/* 624E98 802192F8 D7B40030 */ ldc1 $f20, 0x30($sp)
|
||||
/* 624E9C 802192FC 03E00008 */ jr $ra
|
||||
/* 624EA0 80219300 27BD0048 */ addiu $sp, $sp, 0x48
|
@ -1,205 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel jtbl_80231320_63CEC0
|
||||
.word L80219578_625118, L80219584_625124, L80219590_625130, L8021959C_62513C, L802195D4_625174, L802195B4_625154, L802195C0_625160, L802195CC_62516C, L802195A8_625148, 0, 0, 0
|
||||
|
||||
|
||||
|
||||
dlabel D_80231350_63CEF0
|
||||
.word 0x796B695F, 0x62670000
|
||||
|
||||
dlabel D_80231358_63CEF8
|
||||
.word 0x73616D5F, 0x62743031, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80231368_63CF08
|
||||
.word 0x73616D5F, 0x62743031, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80231378_63CF18
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_80231380_63CF20
|
||||
.word 0x796B695F, 0x62670000
|
||||
|
||||
dlabel D_80231388_63CF28
|
||||
.word 0x73616D5F, 0x62743032, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80231398_63CF38
|
||||
.word 0x73616D5F, 0x62743032, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_802313A8_63CF48
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_802313B0_63CF50
|
||||
.word 0x796B695F, 0x62670000
|
||||
|
||||
dlabel D_802313B8_63CF58
|
||||
.word 0x73616D5F, 0x62743032, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_802313C8_63CF68
|
||||
.word 0x73616D5F, 0x62743032, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_802313D8_63CF78
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_802313E0_63CF80
|
||||
.word 0x796B695F, 0x62670000
|
||||
|
||||
dlabel D_802313E8_63CF88
|
||||
.word 0x73616D5F, 0x62743032, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_802313F8_63CF98
|
||||
.word 0x73616D5F, 0x62743032, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80231408_63CFA8
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_80231410_63CFB0
|
||||
.word 0x796B695F, 0x62670000
|
||||
|
||||
dlabel D_80231418_63CFB8
|
||||
.word 0x73616D5F, 0x62743032, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80231428_63CFC8
|
||||
.word 0x73616D5F, 0x62743032, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80231438_63CFD8
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_80231440_63CFE0
|
||||
.word 0x73616D5F, 0x62670000
|
||||
|
||||
dlabel D_80231448_63CFE8
|
||||
.word 0x73616D5F, 0x62743033, 0x5F686974, 0x00000000
|
||||
|
||||
dlabel D_80231458_63CFF8
|
||||
.word 0x73616D5F, 0x62743033, 0x5F736861, 0x70650000
|
||||
|
||||
dlabel D_80231468_63D008
|
||||
.word 0x73616D5F, 0x74657800
|
||||
|
||||
dlabel D_80231470_63D010
|
||||
.word 0x837A838F, 0x83438367, 0x834B837B, 0x83932C83, 0x70836283, 0x4E83932C, 0x834B837B, 0x83932C83, 0x4F838C83, 0x43834A83, 0x81836283, 0x4E000000
|
||||
|
||||
dlabel D_802314A0_63D040
|
||||
.word 0x837A838F, 0x83438367, 0x834B837B, 0x83932C83, 0x70836283, 0x4E83932C, 0x834B837B, 0x83932C83, 0x70836283, 0x4E839300
|
||||
|
||||
dlabel D_802314C8_63D068
|
||||
.word 0x837A838F, 0x83438367, 0x834B837B, 0x83937882, 0x51000000
|
||||
|
||||
dlabel D_802314DC_63D07C
|
||||
.word 0x83418343, 0x83588370, 0x8362834E, 0x83932C83, 0x53836283, 0x4E83932C, 0x83418343, 0x83588370, 0x8362834E, 0x83932C83, 0x53836283, 0x4E839300
|
||||
|
||||
dlabel D_8023150C_63D0AC
|
||||
.word 0x83418343, 0x83588370, 0x8362834E, 0x83932C83, 0x53836283, 0x4E83932C, 0x83418343, 0x83588370, 0x8362834E, 0x83930000
|
||||
|
||||
dlabel D_80231534_63D0D4
|
||||
.word 0x83418343, 0x83588370, 0x8362834E, 0x83937882, 0x512C8353, 0x8362834E, 0x83930000
|
||||
|
||||
dlabel D_80231550_63D0F0
|
||||
.word 0x83418343, 0x83588370, 0x8362834E, 0x83937882, 0x53000000
|
||||
|
||||
dlabel D_80231564_63D104
|
||||
.word 0x83418343, 0x83588370, 0x8362834E, 0x83937882, 0x51000000
|
||||
|
||||
dlabel D_80231578_63D118
|
||||
.word 0x83538362, 0x834E8393, 0x2C834183, 0x43835883, 0x70836283, 0x4E83932C, 0x83538362, 0x834E8393, 0x2C834183, 0x43835883, 0x70836283, 0x4E839300
|
||||
|
||||
dlabel D_802315A8_63D148
|
||||
.word 0x83538362, 0x834E8393, 0x2C834183, 0x43835883, 0x70836283, 0x4E83932C, 0x83538362, 0x834E8393, 0x00000000
|
||||
|
||||
dlabel D_802315CC_63D16C
|
||||
.word 0x83538362, 0x834E8393, 0x78322C83, 0x41834383, 0x58837083, 0x62834E83, 0x93000000
|
||||
|
||||
dlabel D_802315E8_63D188
|
||||
.word 0x83538362, 0x834E8393, 0x78330000
|
||||
|
||||
dlabel D_802315F4_63D194
|
||||
.word 0x83538362, 0x834E8393, 0x78320000
|
||||
|
||||
dlabel D_80231600_63D1A0
|
||||
.word 0x836F8350, 0x836F8350, 0x78320000
|
||||
|
||||
dlabel D_8023160C_63D1AC
|
||||
.word 0x73616D5F, 0x30330000
|
||||
|
||||
dlabel D_80231614_63D1B4
|
||||
.word 0x73616D5F, 0x30326400
|
||||
|
||||
dlabel D_8023161C_63D1BC
|
||||
.word 0x73616D5F, 0x30326300
|
||||
|
||||
dlabel D_80231624_63D1C4
|
||||
.word 0x73616D5F, 0x30326200
|
||||
|
||||
dlabel D_8023162C_63D1CC
|
||||
.word 0x73616D5F, 0x30320000
|
||||
|
||||
dlabel D_80231634_63D1D4
|
||||
.word 0x73616D5F, 0x30310000, 0x00000000
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_80219524_6250C4
|
||||
/* 6250C4 80219524 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 6250C8 80219528 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 6250CC 8021952C 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 6250D0 80219530 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 6250D4 80219534 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 6250D8 80219538 0C0B1EAF */ jal evt_get_variable
|
||||
/* 6250DC 8021953C 8C450000 */ lw $a1, ($v0)
|
||||
/* 6250E0 80219540 8E040148 */ lw $a0, 0x148($s0)
|
||||
/* 6250E4 80219544 0C09A75B */ jal get_actor
|
||||
/* 6250E8 80219548 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 6250EC 8021954C 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 6250F0 80219550 2610FFFF */ addiu $s0, $s0, -1
|
||||
/* 6250F4 80219554 2E020009 */ sltiu $v0, $s0, 9
|
||||
/* 6250F8 80219558 1040001E */ beqz $v0, L802195D4_625174
|
||||
/* 6250FC 8021955C 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 625100 80219560 00101080 */ sll $v0, $s0, 2
|
||||
/* 625104 80219564 3C018023 */ lui $at, %hi(jtbl_80231320_63CEC0)
|
||||
/* 625108 80219568 00220821 */ addu $at, $at, $v0
|
||||
/* 62510C 8021956C 8C221320 */ lw $v0, %lo(jtbl_80231320_63CEC0)($at)
|
||||
/* 625110 80219570 00400008 */ jr $v0
|
||||
/* 625114 80219574 00000000 */ nop
|
||||
dlabel L80219578_625118
|
||||
/* 625118 80219578 3C048022 */ lui $a0, %hi(D_8021E660_62A200)
|
||||
/* 62511C 8021957C 08086575 */ j L802195D4_625174
|
||||
/* 625120 80219580 2484E660 */ addiu $a0, $a0, %lo(D_8021E660_62A200)
|
||||
dlabel L80219584_625124
|
||||
/* 625124 80219584 3C048022 */ lui $a0, %hi(D_80220314_62BEB4)
|
||||
/* 625128 80219588 08086575 */ j L802195D4_625174
|
||||
/* 62512C 8021958C 24840314 */ addiu $a0, $a0, %lo(D_80220314_62BEB4)
|
||||
dlabel L80219590_625130
|
||||
/* 625130 80219590 3C048022 */ lui $a0, %hi(D_80221574_62D114)
|
||||
/* 625134 80219594 08086575 */ j L802195D4_625174
|
||||
/* 625138 80219598 24841574 */ addiu $a0, $a0, %lo(D_80221574_62D114)
|
||||
dlabel L8021959C_62513C
|
||||
/* 62513C 8021959C 3C048022 */ lui $a0, %hi(D_80222500_62E0A0)
|
||||
/* 625140 802195A0 08086575 */ j L802195D4_625174
|
||||
/* 625144 802195A4 24842500 */ addiu $a0, $a0, %lo(D_80222500_62E0A0)
|
||||
dlabel L802195A8_625148
|
||||
/* 625148 802195A8 3C048022 */ lui $a0, %hi(D_802238D0_62F470)
|
||||
/* 62514C 802195AC 08086575 */ j L802195D4_625174
|
||||
/* 625150 802195B0 248438D0 */ addiu $a0, $a0, %lo(D_802238D0_62F470)
|
||||
dlabel L802195B4_625154
|
||||
/* 625154 802195B4 3C048022 */ lui $a0, %hi(D_802247CC_63036C)
|
||||
/* 625158 802195B8 08086575 */ j L802195D4_625174
|
||||
/* 62515C 802195BC 248447CC */ addiu $a0, $a0, %lo(D_802247CC_63036C)
|
||||
dlabel L802195C0_625160
|
||||
/* 625160 802195C0 3C048022 */ lui $a0, %hi(D_80226164_631D04)
|
||||
/* 625164 802195C4 08086575 */ j L802195D4_625174
|
||||
/* 625168 802195C8 24846164 */ addiu $a0, $a0, %lo(D_80226164_631D04)
|
||||
dlabel L802195CC_62516C
|
||||
/* 62516C 802195CC 3C048022 */ lui $a0, %hi(D_80227404_632FA4)
|
||||
/* 625170 802195D0 24847404 */ addiu $a0, $a0, %lo(D_80227404_632FA4)
|
||||
dlabel L802195D4_625174
|
||||
/* 625174 802195D4 806301F1 */ lb $v1, 0x1f1($v1)
|
||||
/* 625178 802195D8 AC830008 */ sw $v1, 8($a0)
|
||||
/* 62517C 802195DC 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 625180 802195E0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 625184 802195E4 24020002 */ addiu $v0, $zero, 2
|
||||
/* 625188 802195E8 03E00008 */ jr $ra
|
||||
/* 62518C 802195EC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,134 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80219BB0_625750
|
||||
/* 625750 80219BB0 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 625754 80219BB4 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* 625758 80219BB8 0080B02D */ daddu $s6, $a0, $zero
|
||||
/* 62575C 80219BBC 27A50010 */ addiu $a1, $sp, 0x10
|
||||
/* 625760 80219BC0 27A60014 */ addiu $a2, $sp, 0x14
|
||||
/* 625764 80219BC4 27A70018 */ addiu $a3, $sp, 0x18
|
||||
/* 625768 80219BC8 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 62576C 80219BCC AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* 625770 80219BD0 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* 625774 80219BD4 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* 625778 80219BD8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 62577C 80219BDC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 625780 80219BE0 0C0470AC */ jal mdl_get_copied_vertices
|
||||
/* 625784 80219BE4 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 625788 80219BE8 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 62578C 80219BEC 18400052 */ blez $v0, .L80219D38
|
||||
/* 625790 80219BF0 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 625794 80219BF4 3C038023 */ lui $v1, %hi(D_8022EFD0_63AB70)
|
||||
/* 625798 80219BF8 2463EFD0 */ addiu $v1, $v1, %lo(D_8022EFD0_63AB70)
|
||||
/* 62579C 80219BFC 00161040 */ sll $v0, $s6, 1
|
||||
/* 6257A0 80219C00 0043A021 */ addu $s4, $v0, $v1
|
||||
/* 6257A4 80219C04 3C135555 */ lui $s3, 0x5555
|
||||
/* 6257A8 80219C08 36735556 */ ori $s3, $s3, 0x5556
|
||||
/* 6257AC 80219C0C 34158000 */ ori $s5, $zero, 0x8000
|
||||
/* 6257B0 80219C10 02130018 */ mult $s0, $s3
|
||||
.L80219C14:
|
||||
/* 6257B4 80219C14 001097C3 */ sra $s2, $s0, 0x1f
|
||||
/* 6257B8 80219C18 00001810 */ mfhi $v1
|
||||
/* 6257BC 80219C1C 00721823 */ subu $v1, $v1, $s2
|
||||
/* 6257C0 80219C20 00031040 */ sll $v0, $v1, 1
|
||||
/* 6257C4 80219C24 00431021 */ addu $v0, $v0, $v1
|
||||
/* 6257C8 80219C28 02021023 */ subu $v0, $s0, $v0
|
||||
/* 6257CC 80219C2C 96830000 */ lhu $v1, ($s4)
|
||||
/* 6257D0 80219C30 24420001 */ addiu $v0, $v0, 1
|
||||
/* 6257D4 80219C34 00620018 */ mult $v1, $v0
|
||||
/* 6257D8 80219C38 00101100 */ sll $v0, $s0, 4
|
||||
/* 6257DC 80219C3C 00001812 */ mflo $v1
|
||||
/* 6257E0 80219C40 00702021 */ addu $a0, $v1, $s0
|
||||
/* 6257E4 80219C44 8FA30014 */ lw $v1, 0x14($sp)
|
||||
/* 6257E8 80219C48 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 6257EC 80219C4C 0C01917C */ jal sins
|
||||
/* 6257F0 80219C50 00628821 */ addu $s1, $v1, $v0
|
||||
/* 6257F4 80219C54 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 6257F8 80219C58 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 6257FC 80219C5C 00551021 */ addu $v0, $v0, $s5
|
||||
/* 625800 80219C60 00021FC2 */ srl $v1, $v0, 0x1f
|
||||
/* 625804 80219C64 00431021 */ addu $v0, $v0, $v1
|
||||
/* 625808 80219C68 000213C0 */ sll $v0, $v0, 0xf
|
||||
/* 62580C 80219C6C 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 625810 80219C70 00021880 */ sll $v1, $v0, 2
|
||||
/* 625814 80219C74 00621821 */ addu $v1, $v1, $v0
|
||||
/* 625818 80219C78 00031140 */ sll $v0, $v1, 5
|
||||
/* 62581C 80219C7C 00431823 */ subu $v1, $v0, $v1
|
||||
/* 625820 80219C80 04610002 */ bgez $v1, .L80219C8C
|
||||
/* 625824 80219C84 0060102D */ daddu $v0, $v1, $zero
|
||||
/* 625828 80219C88 24627FFF */ addiu $v0, $v1, 0x7fff
|
||||
.L80219C8C:
|
||||
/* 62582C 80219C8C 000223C3 */ sra $a0, $v0, 0xf
|
||||
/* 625830 80219C90 24820064 */ addiu $v0, $a0, 0x64
|
||||
/* 625834 80219C94 A222000E */ sb $v0, 0xe($s1)
|
||||
/* 625838 80219C98 24820032 */ addiu $v0, $a0, 0x32
|
||||
/* 62583C 80219C9C 02121823 */ subu $v1, $s0, $s2
|
||||
/* 625840 80219CA0 00032843 */ sra $a1, $v1, 1
|
||||
/* 625844 80219CA4 00B30018 */ mult $a1, $s3
|
||||
/* 625848 80219CA8 A222000D */ sb $v0, 0xd($s1)
|
||||
/* 62584C 80219CAC 96840000 */ lhu $a0, ($s4)
|
||||
/* 625850 80219CB0 00031FC3 */ sra $v1, $v1, 0x1f
|
||||
/* 625854 80219CB4 000433C2 */ srl $a2, $a0, 0xf
|
||||
/* 625858 80219CB8 00004810 */ mfhi $t1
|
||||
/* 62585C 80219CBC 01231823 */ subu $v1, $t1, $v1
|
||||
/* 625860 80219CC0 00031040 */ sll $v0, $v1, 1
|
||||
/* 625864 80219CC4 00431021 */ addu $v0, $v0, $v1
|
||||
/* 625868 80219CC8 00A22823 */ subu $a1, $a1, $v0
|
||||
/* 62586C 80219CCC 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 625870 80219CD0 00052BC0 */ sll $a1, $a1, 0xf
|
||||
/* 625874 80219CD4 00C50018 */ mult $a2, $a1
|
||||
/* 625878 80219CD8 00042382 */ srl $a0, $a0, 0xe
|
||||
/* 62587C 80219CDC 000423C0 */ sll $a0, $a0, 0xf
|
||||
/* 625880 80219CE0 00001812 */ mflo $v1
|
||||
/* 625884 80219CE4 00642021 */ addu $a0, $v1, $a0
|
||||
/* 625888 80219CE8 00902021 */ addu $a0, $a0, $s0
|
||||
/* 62588C 80219CEC 0C01917C */ jal sins
|
||||
/* 625890 80219CF0 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 625894 80219CF4 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 625898 80219CF8 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 62589C 80219CFC 9223000C */ lbu $v1, 0xc($s1)
|
||||
/* 6258A0 80219D00 00551021 */ addu $v0, $v0, $s5
|
||||
/* 6258A4 80219D04 00620018 */ mult $v1, $v0
|
||||
/* 6258A8 80219D08 00001812 */ mflo $v1
|
||||
/* 6258AC 80219D0C 04610004 */ bgez $v1, .L80219D20
|
||||
/* 6258B0 80219D10 00031403 */ sra $v0, $v1, 0x10
|
||||
/* 6258B4 80219D14 3402FFFF */ ori $v0, $zero, 0xffff
|
||||
/* 6258B8 80219D18 00621821 */ addu $v1, $v1, $v0
|
||||
/* 6258BC 80219D1C 00031403 */ sra $v0, $v1, 0x10
|
||||
.L80219D20:
|
||||
/* 6258C0 80219D20 A222000C */ sb $v0, 0xc($s1)
|
||||
/* 6258C4 80219D24 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 6258C8 80219D28 26100001 */ addiu $s0, $s0, 1
|
||||
/* 6258CC 80219D2C 0202102A */ slt $v0, $s0, $v0
|
||||
/* 6258D0 80219D30 1440FFB8 */ bnez $v0, .L80219C14
|
||||
/* 6258D4 80219D34 02130018 */ mult $s0, $s3
|
||||
.L80219D38:
|
||||
/* 6258D8 80219D38 3C03800A */ lui $v1, %hi(gMasterGfxPos)
|
||||
/* 6258DC 80219D3C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
|
||||
/* 6258E0 80219D40 8C620000 */ lw $v0, ($v1)
|
||||
/* 6258E4 80219D44 02C0202D */ daddu $a0, $s6, $zero
|
||||
/* 6258E8 80219D48 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 6258EC 80219D4C 24420008 */ addiu $v0, $v0, 8
|
||||
/* 6258F0 80219D50 AC620000 */ sw $v0, ($v1)
|
||||
/* 6258F4 80219D54 3C02DE00 */ lui $v0, 0xde00
|
||||
/* 6258F8 80219D58 0C0470BB */ jal mdl_get_copied_gfx
|
||||
/* 6258FC 80219D5C AE020000 */ sw $v0, ($s0)
|
||||
/* 625900 80219D60 AE020004 */ sw $v0, 4($s0)
|
||||
/* 625904 80219D64 3C028023 */ lui $v0, %hi(D_8022EFD0_63AB70)
|
||||
/* 625908 80219D68 2442EFD0 */ addiu $v0, $v0, %lo(D_8022EFD0_63AB70)
|
||||
/* 62590C 80219D6C 00161840 */ sll $v1, $s6, 1
|
||||
/* 625910 80219D70 00621821 */ addu $v1, $v1, $v0
|
||||
/* 625914 80219D74 94620000 */ lhu $v0, ($v1)
|
||||
/* 625918 80219D78 24420253 */ addiu $v0, $v0, 0x253
|
||||
/* 62591C 80219D7C A4620000 */ sh $v0, ($v1)
|
||||
/* 625920 80219D80 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 625924 80219D84 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* 625928 80219D88 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* 62592C 80219D8C 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* 625930 80219D90 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* 625934 80219D94 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 625938 80219D98 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 62593C 80219D9C 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 625940 80219DA0 03E00008 */ jr $ra
|
||||
/* 625944 80219DA4 27BD0040 */ addiu $sp, $sp, 0x40
|
@ -1,134 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80219ED0_625A70
|
||||
/* 625A70 80219ED0 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 625A74 80219ED4 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* 625A78 80219ED8 0080B02D */ daddu $s6, $a0, $zero
|
||||
/* 625A7C 80219EDC 27A50010 */ addiu $a1, $sp, 0x10
|
||||
/* 625A80 80219EE0 27A60014 */ addiu $a2, $sp, 0x14
|
||||
/* 625A84 80219EE4 27A70018 */ addiu $a3, $sp, 0x18
|
||||
/* 625A88 80219EE8 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 625A8C 80219EEC AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* 625A90 80219EF0 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* 625A94 80219EF4 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* 625A98 80219EF8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 625A9C 80219EFC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 625AA0 80219F00 0C0470AC */ jal mdl_get_copied_vertices
|
||||
/* 625AA4 80219F04 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 625AA8 80219F08 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 625AAC 80219F0C 18400052 */ blez $v0, .L8021A058
|
||||
/* 625AB0 80219F10 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 625AB4 80219F14 3C038023 */ lui $v1, %hi(D_8022F3E0_63AF80)
|
||||
/* 625AB8 80219F18 2463F3E0 */ addiu $v1, $v1, %lo(D_8022F3E0_63AF80)
|
||||
/* 625ABC 80219F1C 00161040 */ sll $v0, $s6, 1
|
||||
/* 625AC0 80219F20 0043A021 */ addu $s4, $v0, $v1
|
||||
/* 625AC4 80219F24 3C135555 */ lui $s3, 0x5555
|
||||
/* 625AC8 80219F28 36735556 */ ori $s3, $s3, 0x5556
|
||||
/* 625ACC 80219F2C 34158000 */ ori $s5, $zero, 0x8000
|
||||
/* 625AD0 80219F30 02130018 */ mult $s0, $s3
|
||||
.L80219F34:
|
||||
/* 625AD4 80219F34 001097C3 */ sra $s2, $s0, 0x1f
|
||||
/* 625AD8 80219F38 00001810 */ mfhi $v1
|
||||
/* 625ADC 80219F3C 00721823 */ subu $v1, $v1, $s2
|
||||
/* 625AE0 80219F40 00031040 */ sll $v0, $v1, 1
|
||||
/* 625AE4 80219F44 00431021 */ addu $v0, $v0, $v1
|
||||
/* 625AE8 80219F48 02021023 */ subu $v0, $s0, $v0
|
||||
/* 625AEC 80219F4C 96830000 */ lhu $v1, ($s4)
|
||||
/* 625AF0 80219F50 24420001 */ addiu $v0, $v0, 1
|
||||
/* 625AF4 80219F54 00620018 */ mult $v1, $v0
|
||||
/* 625AF8 80219F58 00101100 */ sll $v0, $s0, 4
|
||||
/* 625AFC 80219F5C 00001812 */ mflo $v1
|
||||
/* 625B00 80219F60 00702021 */ addu $a0, $v1, $s0
|
||||
/* 625B04 80219F64 8FA30014 */ lw $v1, 0x14($sp)
|
||||
/* 625B08 80219F68 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 625B0C 80219F6C 0C01917C */ jal sins
|
||||
/* 625B10 80219F70 00628821 */ addu $s1, $v1, $v0
|
||||
/* 625B14 80219F74 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 625B18 80219F78 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 625B1C 80219F7C 00551021 */ addu $v0, $v0, $s5
|
||||
/* 625B20 80219F80 00021FC2 */ srl $v1, $v0, 0x1f
|
||||
/* 625B24 80219F84 00431021 */ addu $v0, $v0, $v1
|
||||
/* 625B28 80219F88 000213C0 */ sll $v0, $v0, 0xf
|
||||
/* 625B2C 80219F8C 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 625B30 80219F90 00021880 */ sll $v1, $v0, 2
|
||||
/* 625B34 80219F94 00621821 */ addu $v1, $v1, $v0
|
||||
/* 625B38 80219F98 00031140 */ sll $v0, $v1, 5
|
||||
/* 625B3C 80219F9C 00431823 */ subu $v1, $v0, $v1
|
||||
/* 625B40 80219FA0 04610002 */ bgez $v1, .L80219FAC
|
||||
/* 625B44 80219FA4 0060102D */ daddu $v0, $v1, $zero
|
||||
/* 625B48 80219FA8 24627FFF */ addiu $v0, $v1, 0x7fff
|
||||
.L80219FAC:
|
||||
/* 625B4C 80219FAC 000223C3 */ sra $a0, $v0, 0xf
|
||||
/* 625B50 80219FB0 24820064 */ addiu $v0, $a0, 0x64
|
||||
/* 625B54 80219FB4 A222000E */ sb $v0, 0xe($s1)
|
||||
/* 625B58 80219FB8 24820032 */ addiu $v0, $a0, 0x32
|
||||
/* 625B5C 80219FBC 02121823 */ subu $v1, $s0, $s2
|
||||
/* 625B60 80219FC0 00032843 */ sra $a1, $v1, 1
|
||||
/* 625B64 80219FC4 00B30018 */ mult $a1, $s3
|
||||
/* 625B68 80219FC8 A222000D */ sb $v0, 0xd($s1)
|
||||
/* 625B6C 80219FCC 96840000 */ lhu $a0, ($s4)
|
||||
/* 625B70 80219FD0 00031FC3 */ sra $v1, $v1, 0x1f
|
||||
/* 625B74 80219FD4 000433C2 */ srl $a2, $a0, 0xf
|
||||
/* 625B78 80219FD8 00004810 */ mfhi $t1
|
||||
/* 625B7C 80219FDC 01231823 */ subu $v1, $t1, $v1
|
||||
/* 625B80 80219FE0 00031040 */ sll $v0, $v1, 1
|
||||
/* 625B84 80219FE4 00431021 */ addu $v0, $v0, $v1
|
||||
/* 625B88 80219FE8 00A22823 */ subu $a1, $a1, $v0
|
||||
/* 625B8C 80219FEC 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 625B90 80219FF0 00052BC0 */ sll $a1, $a1, 0xf
|
||||
/* 625B94 80219FF4 00C50018 */ mult $a2, $a1
|
||||
/* 625B98 80219FF8 00042382 */ srl $a0, $a0, 0xe
|
||||
/* 625B9C 80219FFC 000423C0 */ sll $a0, $a0, 0xf
|
||||
/* 625BA0 8021A000 00001812 */ mflo $v1
|
||||
/* 625BA4 8021A004 00642021 */ addu $a0, $v1, $a0
|
||||
/* 625BA8 8021A008 00902021 */ addu $a0, $a0, $s0
|
||||
/* 625BAC 8021A00C 0C01917C */ jal sins
|
||||
/* 625BB0 8021A010 3084FFFF */ andi $a0, $a0, 0xffff
|
||||
/* 625BB4 8021A014 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 625BB8 8021A018 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 625BBC 8021A01C 9223000C */ lbu $v1, 0xc($s1)
|
||||
/* 625BC0 8021A020 00551021 */ addu $v0, $v0, $s5
|
||||
/* 625BC4 8021A024 00620018 */ mult $v1, $v0
|
||||
/* 625BC8 8021A028 00001812 */ mflo $v1
|
||||
/* 625BCC 8021A02C 04610004 */ bgez $v1, .L8021A040
|
||||
/* 625BD0 8021A030 00031403 */ sra $v0, $v1, 0x10
|
||||
/* 625BD4 8021A034 3402FFFF */ ori $v0, $zero, 0xffff
|
||||
/* 625BD8 8021A038 00621821 */ addu $v1, $v1, $v0
|
||||
/* 625BDC 8021A03C 00031403 */ sra $v0, $v1, 0x10
|
||||
.L8021A040:
|
||||
/* 625BE0 8021A040 A222000C */ sb $v0, 0xc($s1)
|
||||
/* 625BE4 8021A044 8FA20018 */ lw $v0, 0x18($sp)
|
||||
/* 625BE8 8021A048 26100001 */ addiu $s0, $s0, 1
|
||||
/* 625BEC 8021A04C 0202102A */ slt $v0, $s0, $v0
|
||||
/* 625BF0 8021A050 1440FFB8 */ bnez $v0, .L80219F34
|
||||
/* 625BF4 8021A054 02130018 */ mult $s0, $s3
|
||||
.L8021A058:
|
||||
/* 625BF8 8021A058 3C03800A */ lui $v1, %hi(gMasterGfxPos)
|
||||
/* 625BFC 8021A05C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
|
||||
/* 625C00 8021A060 8C620000 */ lw $v0, ($v1)
|
||||
/* 625C04 8021A064 02C0202D */ daddu $a0, $s6, $zero
|
||||
/* 625C08 8021A068 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 625C0C 8021A06C 24420008 */ addiu $v0, $v0, 8
|
||||
/* 625C10 8021A070 AC620000 */ sw $v0, ($v1)
|
||||
/* 625C14 8021A074 3C02DE00 */ lui $v0, 0xde00
|
||||
/* 625C18 8021A078 0C0470BB */ jal mdl_get_copied_gfx
|
||||
/* 625C1C 8021A07C AE020000 */ sw $v0, ($s0)
|
||||
/* 625C20 8021A080 AE020004 */ sw $v0, 4($s0)
|
||||
/* 625C24 8021A084 3C028023 */ lui $v0, %hi(D_8022F3E0_63AF80)
|
||||
/* 625C28 8021A088 2442F3E0 */ addiu $v0, $v0, %lo(D_8022F3E0_63AF80)
|
||||
/* 625C2C 8021A08C 00161840 */ sll $v1, $s6, 1
|
||||
/* 625C30 8021A090 00621821 */ addu $v1, $v1, $v0
|
||||
/* 625C34 8021A094 94620000 */ lhu $v0, ($v1)
|
||||
/* 625C38 8021A098 24420253 */ addiu $v0, $v0, 0x253
|
||||
/* 625C3C 8021A09C A4620000 */ sh $v0, ($v1)
|
||||
/* 625C40 8021A0A0 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 625C44 8021A0A4 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* 625C48 8021A0A8 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* 625C4C 8021A0AC 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* 625C50 8021A0B0 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* 625C54 8021A0B4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 625C58 8021A0B8 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 625C5C 8021A0BC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 625C60 8021A0C0 03E00008 */ jr $ra
|
||||
/* 625C64 8021A0C4 27BD0040 */ addiu $sp, $sp, 0x40
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user